1 2018-09-08 Joel Brobecker <brobecker@adacore.com>
3 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
6 2018-09-08 Joel Brobecker <brobecker@adacore.com>
8 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
9 Move update of loop variable "fi".
11 2018-09-08 Joel Brobecker <brobecker@adacore.com>
13 * ada-lang.c (value_assign_to_component): In the case of
14 big-endian targets, extract the bits of the given VAL
15 using an src_offset of zero if container is not a scalar.
17 2018-09-06 Simon Ser <contact@emersion.fr>
20 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
21 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
22 * fbsd-tdep.c (fbsd_make_note_desc): New.
23 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
24 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
25 * target.h (enum target_object) Add FreeBSD-specific
26 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
28 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
30 * compile/compile-c.h (generate_c_for_variable_locations):
31 Change reference to pointer.
32 * compile/compile-c-support.c (compile_program) <compute>:
34 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
35 (generate_c_for_for_one_variable): Likewise
36 (generate_c_for_variable_locations): Likewise
37 * compile/compile-c-types.c (compile_c_instance::convert_type):
39 * compile/compile-cplus-symbols.c (convert_one_symbol):
40 std::move the scope passed to enter_scope.
41 * compile/compile-cplus-types.c
42 (compile_cplus_instance::enter_scope): Make parameter
44 (compile_cplus_instance::new_scope): Change reference to
46 (compile_cplus_instance::convert_type): Likewise
47 (compile_cplus_convert_typedef): std::move the scope passed to
49 (compile_cplus_convert_struct_or_union): Likewise.
50 (compile_cplus_convert_enum): Likewise.
51 (compile_cplus_convert_namespace): Likewise.
52 * compile/compile-cplus.h (compile_cplus_instance)
53 <enter_scope>: Make parameter rvalue-reference.
54 * compile/compile-internal.h (compile_instance)
55 <get_cached_type>: Likewise
56 * compile/compile-loc2c.c (push): Likewise
60 (print_label): Likewise
61 (pushf_register_address): Likewise
62 (pushf_register): Likewise
63 (do_compile_dwarf_expr_to_c): Likewise
64 (compile_dwarf_expr_to_c): Likewise
65 (compile_dwarf_bounds_to_c): Likewise
66 * compile/compile.c (compile_instance::get_cached_type):
68 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
69 (compile_dwarf_bounds_to_c): Likewise
70 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
71 (dwarf2_compile_property_to_c): Likewise
72 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
73 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
76 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
78 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
79 * tui/tui-data.c (init_content_element): Don't initialize it.
81 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
83 * tui/tui-data.h (struct tui_win_info)
84 <detail::opaque>: Remove.
85 * tui/tui-data.c (init_win_info): Remove assignment.
87 2018-09-05 Tom Tromey <tom@tromey.com>
89 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
91 * target-float.c (host_float_ops<T>::to_string)
92 (host_float_ops<T>::from_string): Use
93 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
96 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
98 * printcmd.c (printf_c_string): Use
99 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
100 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
102 2018-09-05 Tom Tromey <tom@tromey.com>
104 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
106 2018-09-05 Tom de Vries <tdevries@suse.de>
108 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
109 with resolve_abstract_p == true.
110 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
111 defaulting to false. Propagate resolve_abstract_p to
112 dwarf2_fetch_die_loc_sect_off.
113 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
114 parameter, defaulting to false.
115 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
116 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
118 * dwarf2read.h (struct die_info): Forward-declare.
119 (die_info_ptr): New typedef.
120 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
122 2018-09-05 Joel Brobecker <brobecker@adacore.com>
126 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
127 Pedro Alves <palves@redhat.com>
129 * gnulib/Makefile.in (aclocal_m4_deps): Move to
130 "aclocal-m4-deps.mk". Include file here.
131 $(srcdir)/aclocal.m4: Add "configure.ac".
132 * gnulib/aclocal-m4-deps.mk: New file.
133 * gnulib/update-gnulib.sh: Automatically update
134 "aclocal-m4-deps.mk".
136 2018-09-04 Tom Tromey <tom@tromey.com>
138 * configure: Rebuild.
139 * configure.ac: Remove multi-ice code.
141 2018-09-04 Tom Tromey <tom@tromey.com>
143 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
146 2018-09-04 Tom Tromey <tom@tromey.com>
148 * Makefile.in (printcmd.o, target-float.o): Remove.
149 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
151 2018-09-04 Tom Tromey <tom@tromey.com>
153 * gnulib/Makefile.in: Remove obsolete comment.
154 * Makefile.in: Remove obsolete comment.
156 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
158 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
161 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
163 * riscv-tdep.c: Add 'prologue-value.h' include.
164 (struct riscv_unwind_cache): New struct.
165 (riscv_debug_unwinder): New global.
166 (riscv_scan_prologue): Update arguments, capture register details
168 (riscv_skip_prologue): Reformat arguments line, move end of
169 prologue calculation into riscv_scan_prologue.
170 (riscv_frame_cache): Update return type, create
171 riscv_unwind_cache, scan the prologue, and fill in remaining cache
173 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
174 (riscv_frame_prev_register): Use the trad_frame within the
176 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
179 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
181 * trad-frame.h (trad_frame_set_realreg): Declare.
182 (trad_frame_set_addr): Declare.
183 * trad-frame.c (trad_frame_set_realreg): Define new function.
184 (trad_frame_set_addr): Define new function.
185 (trad_frame_set_reg_realreg): Use new function.
186 (trad_frame_set_reg_addr): Use new function.
188 2018-09-01 Keith Seitz <keiths@redhat.com>
190 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
191 pulongest instead of "%lld".
192 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
195 2018-08-31 Tom Tromey <tom@tromey.com>
197 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
200 2018-08-31 Pedro Alves <palves@redhat.com>
202 * gdbarch.h: Regenerate.
204 2018-08-31 Pedro Alves <palves@redhat.com>
206 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
207 * target.h (Hardware watchpoint interfaces): Describe
208 continuable/steppable/non-steppable watchpoints.
209 * gdbarch.h, gdbarch.c: Regenerate.
211 2018-08-31 Pedro Alves <palves@redhat.com>
213 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
216 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
217 * target.h (target_ops::have_continuable_watchpoint): Delete.
218 (target_have_continuable_watchpoint): Delete.
219 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
220 * target-delegates.c: Regenerate.
222 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
224 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
225 the files present in "gnulib/import/m4/".
227 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
229 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
230 c.sw, c.swsp, and c.sdsp.
232 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
234 * riscv-tdep.c (struct riscv_inferior_data): Delete.
235 (riscv_read_misa_reg): Don't cache value read into inferior data.
236 (riscv_new_inferior_data): Delete.
237 (riscv_inferior_data_cleanup): Delete.
238 (riscv_inferior_data): Delete.
239 (riscv_invalidate_inferior_data): Delete.
240 (_initialize_riscv_tdep): Remove initialisation of inferior data.
242 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
244 * compile/compile-cplus-types.c
245 (compile_cplus_instance::leave_scope): Take the address of scope
247 (compile_cplus_instance::convert_qualified_base): Compare quals
250 2018-08-30 Keith Seitz <keiths@redhat.com>
252 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
253 Use "%s" and host_address_to_string instead of "%p" in printf.
255 2018-08-29 Keith Seitz <keiths@redhat.com>
257 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
258 and compile-cplus-types.c.
259 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
260 * c-lang.c (cplus_language_defn): Set C++ compile functions.
261 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
263 * compile/compile-c-support.c: Include compile-cplus.h.
264 (load_libcompile): Templatize.
265 (get_compile_context): "New" function.
266 (c_get_compile_context): Use get_compile_context.
267 (cplus_get_compile_context): New function.
268 (cplus_push_user_expression, cplus_pop_user_expression)
269 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
270 (cplus_compute_program): Define new structs/functions.
271 * compile/compile-cplus-symmbols.c: New file.
272 * compile/compile-cplus-types.c: New file.
273 * compile/compile-cplus.h: New file.
274 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
276 * compile/compile-object-load.c (get_out_value_type): Use
277 strncmp_iw when comparing symbol names.
278 (compile_object_load): Add mst_bss and mst_data.
279 * compile/compile.c (_initialize_compile): Remove
280 -Wno-implicit-function-declaration from `compile_args'.
281 * compile/gcc-cp-plugin.h: New file.
282 * NEWS: Mention C++ compile support and new debug options.
284 2018-08-29 Keith Seitz <keiths@redhat.com>
286 * linespec.c (collect_info::add_symbol): Make virtual.
287 (struct symbol_searcher_collect_info): New struct.
288 (symbol_searcher::find_all_symbols): New method.
289 * symtab.h (class symbol_searcher): New class.
291 2018-08-29 Keith Seitz <keiths@redhat.com>
293 * linespec.c (struct linespec) <function_symbols, label_symbols>:
294 Change to vector of block_symbol. Update all users.
295 (struct collect_info) <symbols>: Likewise.
296 (collect_info::add_symbol): Take block_symbol as argument.
298 (decode_compound_collector) <m_symbols>: Change type to vector
299 of block_symbol. Update all users.
300 (decode_compound_collector::operator ()): Change parameter type
302 (find_method, find_function_symbols, find_linespec_symbols)
303 (find_label_symbols_in_block, find_label_symbols): Change symbol
304 vectors to block_symbol vectors.
305 * symtab.h (symbol_found_callback_ftype): Change parameter type to
308 2018-08-29 Keith Seitz <keiths@redhat.com>
310 * linespec.c (symbolp): Remove typedef and VEC definitions.
311 (bound_minimal_symbol_d): Likewise.
313 2018-08-29 Keith Seitz <keiths@redhat.com>
315 * linespec.c (decode_compound_collector::decode_compound_collector):
316 Remove initialization for `m_symtabs'.
317 (decode_compound_collector::release_symbols): Change return type
318 to std::vector. Update all callers.
319 (class decode_compound_collector) <m_symbols>: Change type to
321 (lookup_prefix_sym): Change return type to std::vector. Update all
323 (compare_symbols): Remove.
324 (std_compare_symbols): Rename to `compare_symbols'.
325 (find_method): Change `sym_classes' parameter to std::vector.
326 Update all callers. Use std::sort to sort sym_classes.
327 (find_linespec_symbols): Remove cleanup.
329 2018-08-29 Keith Seitz <keiths@redhat.com>
331 * linespec.c (struct linespec) <minimal_symbols>: Change type to
332 std::vector. Update all users.
333 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
334 (struct collect_info) <minimal_symbols>: Likewise.
335 (compare_msymbols): Return bool. Change parameters to const
336 bound_minimal_symbol references.
337 (find_method, find_function_symbols, find_linespec_symbols): Change
338 `minsyms' parameter to std::vector. Update all callers.
340 2018-08-29 Keith Seitz <keiths@redhat.com>
342 * linespec.c (struct linespec) <label_symbols>: Change type to
343 std::vector. Update all users.
344 (find_label_symbols_in_block): Change `result' parameter to
345 std::vector. Update all callers.
346 (find_label_symbols): Return std::vector. Update all callers.
348 2018-08-29 Keith Seitz <keiths@redhat.com>
350 * linespec.c (struct linespec) <function_symbols>: Change type to
351 std::vector. Update all users.
352 (struct collect_info) <function_symbols>: Likewise.
353 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
354 (std_compare_symbols): New function.
355 (find_method, find_function_symbols, find_linespec_symbols)
356 (find_label_symbols_in_block): Change `symbols' parameter to
357 std::vector. Update all callers.
358 (find_label_symbols): Likewise for `function_symbols' and
361 2018-08-29 Keith Seitz <keiths@redhat.com>
363 * linespec.c (symtab_vector_up): Define.
364 (struct linespec) <file_symtabs>: Change type to std::vector *.
366 (struct collect_info) <file_symtabs>: Likewise.
367 (collect_symtabs_from_filename): Return symtab_vector_up.
369 (decode_objc): Remove cleanup.
370 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
371 (symtab_collector::release_symtabs): Return symtab_vector_up.
373 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
375 (collect_symtabs_from_filename, symtabs_from_filename): Return
376 symtab_vector_up. Update all callers.
378 2018-08-29 Tom Tromey <tom@tromey.com>
380 * csky-tdep.c (csky_analyze_prologue): Use
381 core_addr_to_string_nz.
383 2018-08-29 Tom Tromey <tom@tromey.com>
385 * windows-nat.c (struct xlate_exception) <them>: Change type to
387 (xlate): Fix formatting. Remove last entry.
388 (struct xlate_exception, xlate): Comment out.
389 (windows_nat_target::resume): Use ranged for.
391 2018-08-29 Jim Wilson <jimw@sifive.com>
393 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
394 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
396 (riscv_linux_nat_target::store_registers): Likewise.
398 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
402 * gnulib/aclocal.m4: Regenerate.
403 * gnulib/config.in: Regenerate.
404 * gnulib/configure: Regenerate.
405 * gnulib/import/Makefile.am: Update.
406 * gnulib/import/Makefile.in: Update.
407 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
408 * gnulib/import/_Noreturn.h: ... this.
409 * gnulib/import/alloca.in.h: Update.
410 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
411 * gnulib/import/arg-nonnull.h: ... this.
412 * gnulib/import/assure.h: Update.
413 * gnulib/import/at-func.c: Update.
414 * gnulib/import/basename-lgpl.c: Update.
415 * gnulib/import/extra/snippet/c++defs.h: Rename to...
416 * gnulib/import/c++defs.h: ... this.
417 * gnulib/import/canonicalize-lgpl.c: Update.
418 * gnulib/import/cdefs.h: Update.
419 * gnulib/import/chdir-long.c: Update.
420 * gnulib/import/chdir-long.h: Update.
421 * gnulib/import/cloexec.c: Update.
422 * gnulib/import/cloexec.h: Update.
423 * gnulib/import/close.c: Update.
424 * gnulib/import/closedir.c: Update.
425 * gnulib/import/config.charset: Update.
426 * gnulib/import/dirent-private.h: Update.
427 * gnulib/import/dirent.in.h: Update.
428 * gnulib/import/dirfd.c: Update.
429 * gnulib/import/dirname-lgpl.c: Update.
430 * gnulib/import/dirname.h: Update.
431 * gnulib/import/dosname.h: Update.
432 * gnulib/import/dup-safer-flag.c: Update.
433 * gnulib/import/dup-safer.c: Update.
434 * gnulib/import/dup.c: Update.
435 * gnulib/import/dup2.c: Update.
436 * gnulib/import/errno.in.h: Update.
437 * gnulib/import/error.c: Update.
438 * gnulib/import/error.h: Update.
439 * gnulib/import/exitfail.c: Update.
440 * gnulib/import/exitfail.h: Update.
441 * gnulib/import/extra/update-copyright: Update.
442 * gnulib/import/fchdir.c: Update.
443 * gnulib/import/fcntl.c: Update.
444 * gnulib/import/fcntl.in.h: Update.
445 * gnulib/import/fd-hook.c: Update.
446 * gnulib/import/fd-hook.h: Update.
447 * gnulib/import/fd-safer-flag.c: Update.
448 * gnulib/import/fd-safer.c: Update.
449 * gnulib/import/fdopendir.c: Update.
450 * gnulib/import/filename.h: Update.
451 * gnulib/import/filenamecat-lgpl.c: Update.
452 * gnulib/import/filenamecat.h: Update.
453 * gnulib/import/flexmember.h: Update.
454 * gnulib/import/float+.h: Update.
455 * gnulib/import/float.c: Update.
456 * gnulib/import/float.in.h: Update.
457 * gnulib/import/fnmatch.c: Update.
458 * gnulib/import/fnmatch.in.h: Update.
459 * gnulib/import/fnmatch_loop.c: Update.
460 * gnulib/import/fpucw.h: Update.
461 * gnulib/import/frexp.c: Update.
462 * gnulib/import/frexpl.c: Update.
463 * gnulib/import/fstat.c: Update.
464 * gnulib/import/fstatat.c: Update.
465 * gnulib/import/getcwd-lgpl.c: Update.
466 * gnulib/import/getcwd.c: Update.
467 * gnulib/import/getdtablesize.c: Update.
468 * gnulib/import/getlogin_r.c: Update.
469 * gnulib/import/getprogname.c: Update.
470 * gnulib/import/getprogname.h: Update.
471 * gnulib/import/gettext.h: Update.
472 * gnulib/import/gettimeofday.c: Update.
473 * gnulib/import/glob-libc.h: Update.
474 * gnulib/import/glob.c: Update.
475 * gnulib/import/glob.in.h: Update.
476 * gnulib/import/glob_internal.h: Update.
477 * gnulib/import/glob_pattern_p.c: Update.
478 * gnulib/import/globfree.c: Update.
479 * gnulib/import/hard-locale.c: Update.
480 * gnulib/import/hard-locale.h: Update.
481 * gnulib/import/intprops.h: Update.
482 * gnulib/import/inttypes.in.h: Update.
483 * gnulib/import/isnan.c: Update.
484 * gnulib/import/isnand-nolibm.h: Update.
485 * gnulib/import/isnand.c: Update.
486 * gnulib/import/isnanl-nolibm.h: Update.
487 * gnulib/import/isnanl.c: Update.
488 * gnulib/import/itold.c: Update.
489 * gnulib/import/libc-config.h: Update.
490 * gnulib/import/limits.in.h: Update.
491 * gnulib/import/localcharset.c: Update.
492 * gnulib/import/localcharset.h: Update.
493 * gnulib/import/localtime-buffer.c: Update.
494 * gnulib/import/localtime-buffer.h: Update.
495 * gnulib/import/lstat.c: Update.
496 * gnulib/import/m4/00gnulib.m4: Update.
497 * gnulib/import/m4/__inline.m4: Update.
498 * gnulib/import/m4/absolute-header.m4: Update.
499 * gnulib/import/m4/alloca.m4: Update.
500 * gnulib/import/m4/builtin-expect.m4: Update.
501 * gnulib/import/m4/canonicalize.m4: Update.
502 * gnulib/import/m4/chdir-long.m4: Update.
503 * gnulib/import/m4/close.m4: Update.
504 * gnulib/import/m4/closedir.m4: Update.
505 * gnulib/import/m4/configmake.m4: Update.
506 * gnulib/import/m4/d-ino.m4: Update.
507 * gnulib/import/m4/d-type.m4: Update.
508 * gnulib/import/m4/dirent_h.m4: Update.
509 * gnulib/import/m4/dirfd.m4: Update.
510 * gnulib/import/m4/dirname.m4: Update.
511 * gnulib/import/m4/double-slash-root.m4: Update.
512 * gnulib/import/m4/dup.m4: Update.
513 * gnulib/import/m4/dup2.m4: Update.
514 * gnulib/import/m4/eealloc.m4: Update.
515 * gnulib/import/m4/environ.m4: Update.
516 * gnulib/import/m4/errno_h.m4: Update.
517 * gnulib/import/m4/error.m4: Update.
518 * gnulib/import/m4/exponentd.m4: Update.
519 * gnulib/import/m4/exponentl.m4: Update.
520 * gnulib/import/m4/extensions.m4: Update.
521 * gnulib/import/m4/extern-inline.m4: Update.
522 * gnulib/import/m4/fchdir.m4: Update.
523 * gnulib/import/m4/fcntl-o.m4: Update.
524 * gnulib/import/m4/fcntl.m4: Update.
525 * gnulib/import/m4/fcntl_h.m4: Update.
526 * gnulib/import/m4/fdopendir.m4: Update.
527 * gnulib/import/m4/filenamecat.m4: Update.
528 * gnulib/import/m4/flexmember.m4: Update.
529 * gnulib/import/m4/float_h.m4: Update.
530 * gnulib/import/m4/fnmatch.m4: Update.
531 * gnulib/import/m4/fnmatch_h.m4: Update.
532 * gnulib/import/m4/fpieee.m4: Update.
533 * gnulib/import/m4/frexp.m4: Update.
534 * gnulib/import/m4/frexpl.m4: Update.
535 * gnulib/import/m4/fstat.m4: Update.
536 * gnulib/import/m4/fstatat.m4: Update.
537 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
538 * gnulib/import/m4/getcwd-path-max.m4: Update.
539 * gnulib/import/m4/getcwd.m4: Update.
540 * gnulib/import/m4/getdtablesize.m4: Update.
541 * gnulib/import/m4/getlogin.m4: Update.
542 * gnulib/import/m4/getlogin_r.m4: Update.
543 * gnulib/import/m4/getpagesize.m4: Update.
544 * gnulib/import/m4/getprogname.m4: Update.
545 * gnulib/import/m4/gettimeofday.m4: Update.
546 * gnulib/import/m4/glibc21.m4: Update.
547 * gnulib/import/m4/glob.m4: Update.
548 * gnulib/import/m4/glob_h.m4: Update.
549 * gnulib/import/m4/gnulib-cache.m4: Update.
550 * gnulib/import/m4/gnulib-common.m4: Update.
551 * gnulib/import/m4/gnulib-comp.m4: Update.
552 * gnulib/import/m4/gnulib-tool.m4: Update.
553 * gnulib/import/m4/hard-locale.m4: Update.
554 * gnulib/import/m4/include_next.m4: Update.
555 * gnulib/import/m4/inttypes-pri.m4: Update.
556 * gnulib/import/m4/inttypes.m4: Update.
557 * gnulib/import/m4/isnand.m4: Update.
558 * gnulib/import/m4/isnanl.m4: Update.
559 * gnulib/import/m4/largefile.m4: Update.
560 * gnulib/import/m4/limits-h.m4: Update.
561 * gnulib/import/m4/localcharset.m4: Update.
562 * gnulib/import/m4/locale-fr.m4: Update.
563 * gnulib/import/m4/locale-ja.m4: Update.
564 * gnulib/import/m4/locale-zh.m4: Update.
565 * gnulib/import/m4/localtime-buffer.m4: Update.
566 * gnulib/import/m4/longlong.m4: Update.
567 * gnulib/import/m4/lstat.m4: Update.
568 * gnulib/import/m4/malloc.m4: Update.
569 * gnulib/import/m4/malloca.m4: Update.
570 * gnulib/import/m4/math_h.m4: Update.
571 * gnulib/import/m4/mbrtowc.m4: Update.
572 * gnulib/import/m4/mbsinit.m4: Update.
573 * gnulib/import/m4/mbsrtowcs.m4: Update.
574 * gnulib/import/m4/mbstate_t.m4: Update.
575 * gnulib/import/m4/memchr.m4: Update.
576 * gnulib/import/m4/memmem.m4: Update.
577 * gnulib/import/m4/mempcpy.m4: Update.
578 * gnulib/import/m4/memrchr.m4: Update.
579 * gnulib/import/m4/mkdir.m4: Update.
580 * gnulib/import/m4/mkstemp.m4: Update.
581 * gnulib/import/m4/mmap-anon.m4: Update.
582 * gnulib/import/m4/mode_t.m4: Update.
583 * gnulib/import/m4/msvc-inval.m4: Update.
584 * gnulib/import/m4/msvc-nothrow.m4: Update.
585 * gnulib/import/m4/multiarch.m4: Update.
586 * gnulib/import/m4/nocrash.m4: Update.
587 * gnulib/import/m4/off_t.m4: Update.
588 * gnulib/import/m4/onceonly.m4: Update.
589 * gnulib/import/m4/open-cloexec.m4: Update.
590 * gnulib/import/m4/open.m4: Update.
591 * gnulib/import/m4/openat.m4: Update.
592 * gnulib/import/m4/opendir.m4: Update.
593 * gnulib/import/m4/pathmax.m4: Update.
594 * gnulib/import/m4/rawmemchr.m4: Update.
595 * gnulib/import/m4/readdir.m4: Update.
596 * gnulib/import/m4/readlink.m4: Update.
597 * gnulib/import/m4/realloc.m4: Update.
598 * gnulib/import/m4/rename.m4: Update.
599 * gnulib/import/m4/rewinddir.m4: Update.
600 * gnulib/import/m4/rmdir.m4: Update.
601 * gnulib/import/m4/save-cwd.m4: Update.
602 * gnulib/import/m4/secure_getenv.m4: Update.
603 * gnulib/import/m4/setenv.m4: Update.
604 * gnulib/import/m4/signal_h.m4: Update.
605 * gnulib/import/m4/ssize_t.m4: Update.
606 * gnulib/import/m4/stat-time.m4: Update.
607 * gnulib/import/m4/stat.m4: Update.
608 * gnulib/import/m4/std-gnu11.m4: Update.
609 * gnulib/import/m4/stdbool.m4: Update.
610 * gnulib/import/m4/stddef_h.m4: Update.
611 * gnulib/import/m4/stdint.m4: Update.
612 * gnulib/import/m4/stdio_h.m4: Update.
613 * gnulib/import/m4/stdlib_h.m4: Update.
614 * gnulib/import/m4/strchrnul.m4: Update.
615 * gnulib/import/m4/strdup.m4: Update.
616 * gnulib/import/m4/strerror.m4: Update.
617 * gnulib/import/m4/string_h.m4: Update.
618 * gnulib/import/m4/strstr.m4: Update.
619 * gnulib/import/m4/strtok_r.m4: Update.
620 * gnulib/import/m4/sys_socket_h.m4: Update.
621 * gnulib/import/m4/sys_stat_h.m4: Update.
622 * gnulib/import/m4/sys_time_h.m4: Update.
623 * gnulib/import/m4/sys_types_h.m4: Update.
624 * gnulib/import/m4/tempname.m4: Update.
625 * gnulib/import/m4/time_h.m4: Update.
626 * gnulib/import/m4/unistd-safer.m4: Update.
627 * gnulib/import/m4/unistd_h.m4: Update.
628 * gnulib/import/m4/warn-on-use.m4: Update.
629 * gnulib/import/m4/wchar_h.m4: Update.
630 * gnulib/import/m4/wchar_t.m4: Update.
631 * gnulib/import/m4/wctype_h.m4: Update.
632 * gnulib/import/m4/wint_t.m4: Update.
633 * gnulib/import/malloc.c: Update.
634 * gnulib/import/malloc/scratch_buffer.h: Update.
635 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
636 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
637 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
638 * gnulib/import/malloca.c: Update.
639 * gnulib/import/malloca.h: Update.
640 * gnulib/import/malloca.valgrind: Update.
641 * gnulib/import/math.in.h: Update.
642 * gnulib/import/mbrtowc.c: Update.
643 * gnulib/import/mbsinit.c: Update.
644 * gnulib/import/mbsrtowcs-impl.h: Update.
645 * gnulib/import/mbsrtowcs-state.c: Update.
646 * gnulib/import/mbsrtowcs.c: Update.
647 * gnulib/import/memchr.c: Update.
648 * gnulib/import/memmem.c: Update.
649 * gnulib/import/mempcpy.c: Update.
650 * gnulib/import/memrchr.c: Update.
651 * gnulib/import/mkdir.c: Update.
652 * gnulib/import/mkstemp.c: Update.
653 * gnulib/import/msvc-inval.c: Update.
654 * gnulib/import/msvc-inval.h: Update.
655 * gnulib/import/msvc-nothrow.c: Update.
656 * gnulib/import/msvc-nothrow.h: Update.
657 * gnulib/import/open.c: Update.
658 * gnulib/import/openat-die.c: Update.
659 * gnulib/import/openat-priv.h: Update.
660 * gnulib/import/openat-proc.c: Update.
661 * gnulib/import/openat.c: Update.
662 * gnulib/import/openat.h: Update.
663 * gnulib/import/opendir.c: Update.
664 * gnulib/import/pathmax.h: Update.
665 * gnulib/import/pipe-safer.c: Update.
666 * gnulib/import/rawmemchr.c: Update.
667 * gnulib/import/readdir.c: Update.
668 * gnulib/import/readlink.c: Update.
669 * gnulib/import/realloc.c: Update.
670 * gnulib/import/ref-add.sin: Update.
671 * gnulib/import/ref-del.sin: Update.
672 * gnulib/import/rename.c: Update.
673 * gnulib/import/rewinddir.c: Update.
674 * gnulib/import/rmdir.c: Update.
675 * gnulib/import/same-inode.h: Update.
676 * gnulib/import/save-cwd.c: Update.
677 * gnulib/import/save-cwd.h: Update.
678 * gnulib/import/scratch_buffer.h: Update.
679 * gnulib/import/secure_getenv.c: Update.
680 * gnulib/import/setenv.c: Update.
681 * gnulib/import/signal.in.h: Update.
682 * gnulib/import/stat-time.c: Update.
683 * gnulib/import/stat-time.h: Update.
684 * gnulib/import/stat-w32.c: Update.
685 * gnulib/import/stat-w32.h: Update.
686 * gnulib/import/stat.c: Update.
687 * gnulib/import/stdbool.in.h: Update.
688 * gnulib/import/stddef.in.h: Update.
689 * gnulib/import/stdint.in.h: Update.
690 * gnulib/import/stdio.in.h: Update.
691 * gnulib/import/stdlib.in.h: Update.
692 * gnulib/import/str-two-way.h: Update.
693 * gnulib/import/strchrnul.c: Update.
694 * gnulib/import/strdup.c: Update.
695 * gnulib/import/streq.h: Update.
696 * gnulib/import/strerror-override.c: Update.
697 * gnulib/import/strerror-override.h: Update.
698 * gnulib/import/strerror.c: Update.
699 * gnulib/import/string.in.h: Update.
700 * gnulib/import/stripslash.c: Update.
701 * gnulib/import/strnlen1.c: Update.
702 * gnulib/import/strnlen1.h: Update.
703 * gnulib/import/strstr.c: Update.
704 * gnulib/import/strtok_r.c: Update.
705 * gnulib/import/sys_stat.in.h: Update.
706 * gnulib/import/sys_time.in.h: Update.
707 * gnulib/import/sys_types.in.h: Update.
708 * gnulib/import/tempname.c: Update.
709 * gnulib/import/tempname.h: Update.
710 * gnulib/import/time.in.h: Update.
711 * gnulib/import/unistd--.h: Update.
712 * gnulib/import/unistd-safer.h: Update.
713 * gnulib/import/unistd.in.h: Update.
714 * gnulib/import/unsetenv.c: Update.
715 * gnulib/import/verify.h: Update.
716 * gnulib/import/extra/snippet/warn-on-use.h: Update.
717 * gnulib/import/wchar.in.h: Update.
718 * gnulib/import/wctype.in.h: Update.
719 * gnulib/import/xalloc-oversized.h: Update.
720 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
721 "53e2c179f26a890fa6685af4b6c1397ee370433b".
723 2018-08-16 Gary Benson <gbenson@redhat.com>
726 * gdb/main.c (captured_main_1): Exit with nonzero status
727 in batch mode if the last command to be executed failed.
728 * NEWS: Mention the above.
730 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
732 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
733 end of warning message.
735 2018-08-29 Alan Hayward <alan.hayward@arm.com>
738 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
739 (aarch64_extract_return_value): Use
740 aapcs_is_vfp_call_or_return_candidate.
741 (aarch64_return_in_memory): Likewise.
742 (aarch64_store_return_value): Likewise.
744 2018-08-29 Alan Hayward <alan.hayward@arm.com>
747 (aapcs_is_vfp_call_or_return_candidate): Make static
748 (pass_in_v_or_stack): Remove function.
749 (pass_in_v_vfp_candidate): New function.
750 (aarch64_push_dummy_call): Check for float register candidates.
752 2018-08-29 Alan Hayward <alan.hayward@arm.com>
754 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
755 (aapcs_is_vfp_call_or_return_candidate_1): New function.
756 (aapcs_is_vfp_call_or_return_candidate): Likewise.
758 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
761 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
762 (struct ipa_sym_addresses): Rename to...
763 (struct ipa_sym_addresses_common): ... this.
764 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
766 2018-08-28 Tom Tromey <tom@tromey.com>
768 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
769 (token_fifo): Now a std::vector.
770 (yylex, c_parse): Update.
771 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
772 (token_fifo): Now a std::vector.
773 (yylex, d_parse): Update.
774 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
775 (token_fifo): Now a std::vector.
776 (yylex, go_parse): Update.
778 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
780 * parser-defs.h (struct type_stack) <elements>: Change type to
781 std::vector<union type_stack_elt>.
782 <depth, size>: Remove.
783 * parse.c (parse_exp_in_context_1): Adjust.
784 (type_stack_reserve): Remove.
785 (check_type_stack_depth): Remove.
786 (insert_into_type_stack): Adjust to std::vector.
787 (insert_type): Likewise.
788 (push_type): Likewise.
789 (push_type_int): Likewise.
790 (insert_type_address_space): Likewise.
791 (pop_type): Likewise.
792 (pop_type_int): Likewise.
793 (pop_typelist): Likewise.
794 (pop_type_stack): Likewise.
795 (append_type_stack): Likewise.
796 (push_type_stack): Likewise.
797 (get_type_stack): Likewise.
798 (type_stack_cleanup): Likewise.
799 (push_typelist): Likewise.
800 (follow_types): Likewise.
801 (_initialize_parse): Likewise.
803 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
805 * NEWS: Mention csky target.
807 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
808 Hafiz Abid Qadeer <abidh@codesourcery.com>
809 Don Breazeal <donb@codesourcery.com>
811 * csky-linux-tdep.c: New file.
812 * csky-tdep.c: Likewise.
813 * csky-tdep.h: Likewise.
814 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
816 (HFILES_NO_SRCDIR): Add csky-tdep.h.
817 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
818 * configure.tgt: Add csky support.
820 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
822 * python/py-framefilter.c (py_print_frame): Print frame architecture
823 when printing on an MI output.
825 2018-08-27 Tom Tromey <tom@tromey.com>
828 * configure: Rebuild.
829 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
831 2018-08-27 Tom Tromey <tom@tromey.com>
833 * aarch64-linux-tdep.c
834 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
837 2018-08-27 Tom Tromey <tom@tromey.com>
839 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
841 (ppc64_standard_linkage1, ppc64_standard_linkage2)
842 (ppc64_standard_linkage3, ppc64_standard_linkage4)
843 (ppc64_standard_linkage5, ppc64_standard_linkage6)
844 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
847 2018-08-27 Tom Tromey <tom@tromey.com>
849 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
850 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
852 2018-08-27 Tom Tromey <tom@tromey.com>
854 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
855 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
857 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
859 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
861 * sparc-linux-tdep.c (sparc32_linux_sigframe)
862 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
863 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
865 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
866 (ppc64_linux_sigaction_tramp_frame)
867 (ppc32_linux_sighandler_tramp_frame)
868 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
869 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
870 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
871 * mn10300-linux-tdep.c (am33_linux_sigframe)
872 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
873 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
874 * mips-linux-tdep.c (mips_linux_o32_sigframe)
875 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
876 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
877 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
878 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
879 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
880 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
881 * microblaze-linux-tdep.c
882 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
883 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
884 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
885 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
886 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
887 * common/common-types.h (ULONGEST_MAX): New define.
888 (CORE_ADDR_MAX): Fix formatting.
889 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
890 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
891 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
892 (arm_linux_rt_sigreturn_tramp_frame)
893 (arm_eabi_linux_sigreturn_tramp_frame)
894 (arm_eabi_linux_rt_sigreturn_tramp_frame)
895 (thumb2_eabi_linux_sigreturn_tramp_frame)
896 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
897 (arm_linux_restart_syscall_tramp_frame)
898 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
899 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
900 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
902 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
904 2018-08-27 Tom Tromey <tom@tromey.com>
906 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
908 * mips-tdep.c (mips_deal_with_atomic_sequence)
909 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
910 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
911 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
912 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
914 * aarch64-tdep.c (aarch64_software_single_step): Use
917 2018-08-27 Tom Tromey <tom@tromey.com>
919 * linespec.c (complete_linespec_component): Add cast to "char".
920 * completer.c (completion_tracker::build_completion_result): Add
923 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
925 * solist.h (struct solist, struct target_so_ops): Fix
928 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
930 * ada-tasks.c (ada_task_info_s): Remove typedef.
931 (DEF_VEC_O(ada_task_info_s)): Remove.
932 (struct ada_tasks_inferior_data): Initialize fields.
933 <task_list>: Make an std::vector.
934 (get_ada_tasks_inferior_data): Allocate with new.
935 (ada_get_task_number): Adjust.
936 (get_task_number_from_id): Likewise.
937 (valid_task_id): Likewise.
938 (ada_get_task_info_from_ptid): Likewise.
939 (iterate_over_live_ada_tasks): Likewise.
940 (add_ada_task): Likewise.
941 (read_known_tasks): Likewise.
942 (ada_build_task_list): Likewise.
943 (print_ada_task_info): Likewise.
944 (info_task): Likewise.
945 (task_command_1): Likewise.
947 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
949 * ada-lang.c (add_angle_brackets): Return std::string.
951 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
953 * python/py-threadevent.c (py_get_event_thread): Initialize
956 2018-08-24 Pedro Alves <palves@redhat.com>
958 * python/py-bpevent.c (create_breakpoint_event_object): Use
960 * python/py-continueevent.c (emit_continue_event): Use
962 * python/py-exitedevent.c (create_exited_event_object): Return a
964 (emit_exited_event): Use copy-initialization.
965 * python/py-inferior.c (python_new_inferior)
966 (python_inferior_deleted, add_thread_object): Use
968 * python/py-infevents.c (create_inferior_call_event_object)
969 (create_register_changed_event_object)
970 (create_memory_changed_event_object): Return a gdbpy_ref<>.
971 (emit_inferior_call_event, emit_memory_changed_event)
972 (emit_register_changed_event): Use copy-initialization.
973 * python/py-newobjfileevent.c (create_new_objfile_event_object):
974 Return a gdbpy_ref<>.
975 (emit_new_objfile_event): Use copy-initialization.
976 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
977 (emit_clear_objfiles_event): Use copy-initialization.
978 * python/py-signalevent.c (create_signal_event_object): Use
980 * python/py-threadevent.c (create_thread_event_object): Use
983 2018-08-24 Pedro Alves <palves@redhat.com>
984 Simon Marchi <simon.marchi@ericsson.com>
987 * python/py-continueevent.c: Include "gdbthread.h".
988 (create_continue_event_object): Add intro comment. Add 'ptid'
989 parameter. Use it to find thread to pass to
990 create_thread_event_object.
991 (emit_continue_event): Pass PTID down to
992 create_continue_event_object.
993 * python/py-event.h (py_get_event_thread): Declare.
994 (create_thread_event_object): Remove default from 'thread'
996 * python/py-stopevent.c (create_stop_event_object): Use
998 * python/py-threadevent.c (get_event_thread): Rename to ...
999 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1000 and use it to find the thread.
1001 (create_thread_event_object): Assert that THREAD isn't null.
1002 Don't find the event thread here.
1004 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1006 * block.h (blockrange, blockranges): New struct declarations.
1007 (struct block): Add new field named `ranges'.
1008 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1009 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1010 macros for accessing ranges in struct block.
1011 (make_blockranges): New declaration.
1012 block.c (make_blockranges): New function.
1013 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1015 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1016 * blockframe.c (cache_pc_function_block): New static global.
1017 (clear_pc_function_cache): Clear cache_pc_function_block.
1018 (find_pc_partial_function): Move comment to symtab.h. Add
1019 support for non-contiguous blocks.
1020 * cli/cli-cmds.c (block.h): Include.
1021 (print_disassembly): Handle printing of non-contiguous blocks.
1022 (disassemble_current_function): Likewise.
1023 (disassemble_command): Likewise.
1025 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1027 * blockframe.c (get_pc_function_start): Likewise.
1028 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1029 (gcc_symbol_address): Likewise.
1030 * compile/compile-object-run.c (compile_object_run): Likewise.
1031 * compile/compile.c (get_expr_block_and_pc): Likewise.
1032 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1033 (func_addr_to_tail_call_list): Likewise.
1034 * findvar.c (default_read_var_value): Likewise.
1035 * inline-frame.c (inline_frame_this_id): Likewise.
1036 (skip-inline_frames): Likewise.
1037 * infcmd.c (until_next_command): Likewise.
1038 * linespec.c (convert_linespec_to_sals): Likewise.
1039 * parse.c (parse_exp_in_context_1): Likewise.
1040 * printcmd.c (build_address_symbolic): likewise.
1041 (info_address_command): Likewise.
1042 symtab.c (find_function_start_sal): Likewise.
1043 (skip_prologue_sal): Likewise.
1044 (find_function_alias_target): Likewise.
1045 (find_gnu_ifunc): Likewise.
1046 * stack.c (find_frame_funname): Likewise.
1047 * symtab.c (fixup_symbol_section): Likewise.
1048 (find_function_start_sal): Likewise.
1049 (skip_prologue_sal): Likewsie.
1050 (find_function_alias_target): Likewise.
1051 (find_gnu_ifunc): Likewise.
1052 * tracepoint.c (info_scope_command): Likewise.
1053 * value.c (value_fn_field): Likewise.
1055 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1056 in place of find_pc_partial_function.
1057 * blockframe.c (find_function_entry_range_from_pc): New function.
1058 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1059 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1060 for each range in a block.
1063 2018-08-23 Xavier Roirand <roirand@adacore.com>
1065 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1068 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1070 * solib-svr4.c (read_program_headers_from_bfd): Return
1071 gdb::optional<gdb::byte_vector>.
1072 (svr4_exec_displacement): Adjust.
1074 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1076 * solib-svr4.c (read_program_header): Return
1077 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1078 (find_program_interpreter): Return
1079 gdb::optional<gdb::byte_vector>.
1080 (scan_dyntag_auxv): Adjust.
1081 (enable_break): Adjust.
1082 (svr4_exec_displacement): Adjust.
1084 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1086 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1087 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1089 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1091 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1093 * guile/scm-utils.c (gdbscm_printf): Likewise.
1094 * serial.c (serial_printf): Likewise.
1095 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1097 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1099 * stack.c (print_frame): Print frame architecture when printing on
1101 * NEWS: Mention new "arch" attribute in frame output.
1103 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1105 * arch/aarch64.h (aarch64_regnum): Update comment.
1107 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1109 * NEWS: Add SVE to 8.2 section.
1111 2018-08-21 Pedro Alves <palves@redhat.com>
1113 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1114 out from gdbscm_parse_function_args.
1115 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1116 gdbscm_parse_function_args_1.
1118 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1121 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1124 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1126 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1128 2018-08-19 Michael Spang <spang@google.com>
1131 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1132 for PT_TLS segments.
1134 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1136 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1137 dwarf_variable_value.
1138 * dwarf2-frame.c (class dwarf_expr_executor):
1139 Add override for dwarf_variable_value.
1140 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1141 (class symbol_needs_eval_context): Likewise.
1142 (indirect_synthetic_pointer): Add forward declaration.
1143 (sect_variable_value): New function.
1144 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1145 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1146 for DW_OP_GNU_variable_value.
1148 2018-08-16 Tom Tromey <tom@tromey.com>
1150 * top.c (read_command_file): Update.
1151 (command_line_input): Remove "repeat" argument.
1152 * ada-lang.c (get_selections): Update.
1153 * linespec.c (decode_line_2): Update.
1154 * defs.h (command_line_input): Remove argument.
1155 * cli/cli-script.c (read_next_line): Update.
1156 * python/py-gdb-readline.c: Update.
1158 2018-08-17 Tom Tromey <tom@tromey.com>
1160 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1163 2018-08-15 Tom Tromey <tom@tromey.com>
1165 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1167 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1169 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1170 If used, use find_pc_partial_function to find address range
1172 * mi/mi-main.c (mi_cmd_list_features): Report
1173 "data-disassemble-a-option" feature.
1174 * NEWS: Mention new -data-disassemble option -a.
1176 2018-08-13 Tom Tromey <tom@tromey.com>
1178 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1180 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1182 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1183 (aarch64_linux_collect_sve_regset): Likewise.
1184 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1185 * regcache.h (regcache_map_entry_size): New function.
1187 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1189 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1190 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1191 (SVE_HEADER_VL_LENGTH): Likewise.
1192 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1193 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1194 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1195 (SVE_HEADER_SIZE_OFFSET): Likewise.
1196 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1197 (SVE_HEADER_VL_OFFSET): Likewise.
1198 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1199 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1200 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1201 (SVE_HEADER_SIZE): Likewise.
1202 (aarch64_linux_core_read_vq): Add function.
1203 (aarch64_linux_core_read_description): Check for SVE section.
1205 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1207 * aarch64-fbsd-tdep.c
1208 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1210 * aarch64-linux-tdep.c
1211 (aarch64_linux_iterate_over_regset_sections): Likewise.
1212 * alpha-linux-tdep.c
1213 (alpha_linux_iterate_over_regset_sections):
1215 (alphanbsd_iterate_over_regset_sections): Likewise.
1217 (amd64fbsd_iterate_over_regset_sections): Likewise.
1218 * amd64-linux-tdep.c
1219 (amd64_linux_iterate_over_regset_sections): Likewise.
1221 (armbsd_iterate_over_regset_sections): Likewise.
1223 (arm_fbsd_iterate_over_regset_sections): Likewise.
1225 (arm_linux_iterate_over_regset_sections): Likewise.
1226 * corelow.c (get_core_registers_cb): Likewise.
1227 (core_target::fetch_registers): Likewise.
1228 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1229 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1230 * gdbarch.h (void): Regenerate.
1231 * gdbarch.sh: Add supply_size and collect_size.
1232 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1233 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1234 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1235 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1236 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1237 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1238 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1239 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1240 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1241 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1242 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1243 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1244 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1245 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1246 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1247 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1248 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1249 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1250 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1251 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1252 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1253 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1254 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1255 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1256 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1257 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1258 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1259 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1260 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1261 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1263 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1265 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1268 2018-08-10 Keith Seitz <keiths@redhat.com>
1270 * compile/compile-c-support.c (add_code_header, add_code_footer):
1271 Move into policy class.
1272 (c_push_user_expression, pop_user_expression_nop)
1273 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1274 (compile_program): New host class.
1275 (c_compile_program): New typedef.
1276 (c_compute_porgram): Use c_compile_program.
1278 2018-08-10 Keith Seitz <keiths@redhat.com>
1280 * compile/compile-internal.h (compile_instance::~compile_instance):
1281 Remove calls to htab_delete.
1282 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1283 * compile.c (compile_instance::compile_instance): Initialize
1284 htab unique pointers.
1285 (compile_instance::get_cached_type, compile_instance::insert_type)
1286 (compile_instance::error_symbol_once): Update for unique_ptr.
1288 2018-08-10 Keith Seitz <keiths@redhat.com>
1290 * compile/compile-c-symbols.c (struct symbol_error)
1291 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1292 (compile_instance::insert_symbol_error)
1293 (compile_instance::error_symbol_once): Move to ...
1294 * compile/compile.c: ... here.
1296 2018-08-10 Keith Seitz <keiths@redhat.com>
1298 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1299 instead of `new_compile_instance'.
1300 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1302 If the symbol error map is not initialized, create it.
1303 (generate_c_for_for_one_symbol): Do not check/initialize
1304 the symbol error map.
1305 * compile/compile-c-types.c (compile_c_instance): Make a class.
1307 (compile_instance::compile_instance): Initialize the type cache.
1308 (get_cached_type): New function.
1309 (insert_type): Update description.
1310 (compile_c_instance::m_default_cflags): Define.
1311 (convert_type): Update description. Use get_cached_type.
1312 (delete_instance): Moved to destructor.
1313 (new_compile_instance): Moved to constructor.
1314 * compile/compile-c.h (compile_c_instance): Make class inheriting
1315 from compile_instance.
1316 <base>: Remove field.
1317 <type_map, symbol_err_map>: Move to base class.
1318 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1319 * compile/compile-internal.h (compile_instance): Make class.
1320 <type_map_t, symbol_err_map_t>: Define.
1321 <fe>: Rename to `m_gcc_fe'.
1322 <scope, block, gcc_target_options>: Add `m_' prefix.
1323 <m_type_map, m_symbol_err_map>: New fields, moved from
1326 (convert_type, new_compile_instance): Remove.
1327 * compile/compile.c (cleanup_compile_instance): Remove.
1328 (compile_to_object): Use unique_ptr to eliminate cleanups.
1329 (compile_instance::set_print_callback, compile_instance::version)
1330 (compile_instance::set_verbose)
1331 (compile_instance::set_driver_filename)
1332 (compile_instance::set_triplet_regexp)
1333 (compile_instance::set_arguments)
1334 (compile_instance::set_source_file)
1335 (compile_instance::compile): Define.
1337 2018-08-10 Keith Seitz <keiths@redhat.com>
1339 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1340 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1341 gcc-c-fe.def to define C plugin.
1342 (delete_instance): Delete `c_plugin'.
1343 (new_compile_instance): Initialize `c_plugin'.
1344 * compile/compile-c.h: Include gcc_c_plugin.h.
1345 (struct compile_c_instance) <c_plugin>: New member.
1346 * gcc-c-plugin.h: New file.
1347 Update all callers with API change.
1349 2018-08-10 Keith Seitz <keiths@redhat.com>
1351 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1352 (HFILES_NO_SRCDIR): ... to here.
1353 Add compile-internal.h and compile-c.h.
1354 * compile/compile-c-support.c: Include compile-c.h.
1355 * compile/compile-c-symbols.c: Include compile-c.h.
1356 (generate_c_for_variable_locations): Update comment.
1357 * compile/compile-c-types.c: Include compile-c.h.
1358 * compile/compile-c.h: New file -- moved C language declarations
1359 from other files here.
1360 * compile/compile-internal.h: Do not include hashtab.h or
1361 common/enum-flags.h.
1362 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1363 (gcc_convert_symbol, gcc_symbol_address)
1364 (generate_c_for_variable_locations, c_get_mode_for_size)
1365 (c_get_range_decl_name): Definitions moved to compile-c.h.
1366 * compile/compile-loc2c.c: Include compile-c.h.
1368 2018-08-10 Keith Seitz <keiths@redhat.com>
1370 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1371 (c_symbol_substitution_name): ... this.
1374 2018-08-10 Keith Seitz <keiths@redhat.com>
1376 * compile/compile-c-support.c (c_compute_program): Use
1377 unique_xmalloc_ptr to eliminate cleanup.
1378 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1379 Return a unique_xmalloc_ptr and eliminate cleanup.
1380 * compile/compile-internal.h (generate_c_for_variable_locations):
1381 Return unique_xmalloc_ptr and update description.
1383 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1385 * corelow.c (core_target::get_core_register_section): Rename
1386 min_size to section_min_size.
1388 2018-08-09 Jim Wilson <jimw@sifive.com>
1390 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1391 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1392 * NEWS: Mention new GNU/Linux RISC-V target.
1393 * configure.host: Add riscv*-*-linux*.
1394 * configure.nat: Add riscv*.
1395 * configure.tgt: Add riscv*-*-linux*.
1396 * riscv-linux-nat.c: New file.
1397 * riscv-linux-tdep.c: New file.
1399 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1401 * infrun.c (resume): Make static, add forward declaration.
1402 (proceed): Update header comment.
1403 * infrun.h (resume): Delete declaration.
1405 2018-08-09 Tom Tromey <tom@tromey.com>
1407 * riscv-tdep.h: Minor formatting fixes.
1409 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1411 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1412 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1413 (test_mkdir_recursive): Likewise.
1414 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1416 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1418 * valarith.c (value_subscripted_rvalue): If an array is not in
1419 memory, and we don't know the upper bound, then we can't know that
1420 the requested element exists or not.
1422 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1424 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1425 (target_options_to_string): Add comment.
1427 2018-08-08 Tom Tromey <tom@tromey.com>
1429 * unittests/scoped_mmap-selftests.c: Check result of "write".
1431 2018-08-08 Jim Wilson <jimw@sifive.com>
1433 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1434 (decode_register_index_short): New.
1435 (decode_j_type_insn, decode_cj_type_insn): New.
1436 (decode_b_type_insn, decode_cb_type_insn): New.
1437 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1438 local xlen. Check xlen when decoding ambiguous compressed insns. In
1439 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1440 is_c_sw_insn instead of is_sw_insn.
1441 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1442 (riscv_software_single_step): New.
1443 * riscv-tdep.h (riscv_software_single_step): Declare.
1445 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1446 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1448 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1451 * target.c (dispose_inferior): Don't dispose of inferiors that are
1454 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1456 * remote.c (remote_target::download_tracepoint): Change char* to
1459 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1461 * target.h (target_options_to_string): Return an std::string.
1462 * target.c (str_comma_list_concat_elem): Return void, use
1464 (do_option): Likewise.
1465 (target_options_to_string): Return an std::string.
1466 * linux-nat.c (linux_nat_target::wait): Adjust.
1467 * target-debug.h (target_debug_print_options): Adjust.
1469 2018-08-07 Tom Tromey <tom@tromey.com>
1471 * Makefile.in (CPPFLAGS): New variable.
1472 (INTERNAL_CPPFLAGS): Use it.
1474 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1476 * NEWS: Mention the index cache.
1478 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1480 * common/pathstuff.h (get_standard_cache_dir): New.
1481 * common/pathstuff.c (get_standard_cache_dir): New.
1482 * build-id.h (build_id_to_string): New.
1483 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1484 DEBUG_STR_SUFFIX): Move to here.
1485 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1486 DEBUG_STR_SUFFIX): Move from there.
1487 (write_psymtabs_to_index): Make non-static, add basename
1488 parameter. Write to temporary files, rename when done.
1489 (save_gdb_index_command): Adjust call to
1490 write_psymtabs_to_index.
1491 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1493 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1494 (get_gdb_index_contents_from_cache): New.
1495 (get_gdb_index_contents_from_cache_dwz): New.
1496 (dwarf2_initialize_objfile): Read index from cache.
1497 (dwarf2_build_psymtabs): Save to index.
1498 * dwarf-index-cache.h: New file.
1499 * dwarf-index-cache.c: New file.
1500 * dwarf-index-write.h: New file.
1502 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1504 * gnulib/aclocal.m4: Re-generate.
1505 * gnulib/config.in: Re-generate.
1506 * gnulib/configure: Re-generate.
1507 * gnulib/import/Makefile.am: Re-generate.
1508 * gnulib/import/Makefile.in: Re-generate.
1509 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1510 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1511 * gnulib/import/m4/mkdir.m4: New file.
1512 * gnulib/import/mkdir.c: New file.
1513 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1516 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1518 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1519 * common/scoped_mmap.c: New file.
1520 * common/scoped_mmap.h (destroy): New method.
1521 (~scoped_mmap, reset): Use destroy.
1522 (scoped_mmap): New move constructor.
1523 (mmap_file): New declaration.
1524 * unittests/scoped_mmap-selftests.c (test_normal,
1525 test_invalid_filename, run_tests): New functions.
1526 (_initialize_scoped_mmap_selftests): Register selftest.
1528 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1530 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1531 (read_gdb_index_from_buffer): ... this. Remove section
1532 parameter, add buffer parameter.
1533 (get_gdb_index_contents_ftype,
1534 get_gdb_index_contents_dwz_ftype): New typedefs.
1535 (dwarf2_read_gdb_index): Add callback parameters to get the
1537 (get_gdb_index_contents_from_section): New.
1538 (dwarf2_initialize_objfile): Update call to
1539 dwarf2_read_gdb_index.
1541 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1543 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1544 (gdb_open_cloexec): Likewise.
1545 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1546 (commandline_from_pid): Likewise.
1547 (linux_xfer_osdata_threads): Likewise.
1548 (linux_xfer_osdata_fds): Likewise.
1549 * ada-lang.c (is_package_name): Likewise.
1550 * auxv.c (procfs_xfer_auxv): Likewise.
1551 * breakpoint.c (print_one_breakpoint_location): Use
1553 (print_one_catch_solib): Use string_printf.
1554 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1555 (add_pe_forwarded_sym): Likewise.
1556 * dwarf2read.c (create_type_unit_group): Likewise.
1557 (build_error_marker_type): Likewise.
1558 * infcall.c (get_function_name): Likewise.
1559 * valprint.c (print_converted_chars_to_obstack): Likewise.
1560 * xtensa-tdep.c (xtensa_register_type): Likewise.
1562 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1564 * remote.c (remote_target::download_tracepoint): Fix format
1567 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1569 * tracefile.c: Include common/byte-vector.h.
1570 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1571 with trace_regblock_size if needed. Update uses of buf.
1573 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1575 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1576 std::vector<unsigned char>.
1577 * tracepoint.c (collection_list::collection_list): Remove
1578 m_regs_mask initializer from initializer list. Resize
1579 m_regs_mask using the largest remote register number.
1580 (collection_list::add_remote_register): Remove size check on
1581 m_regs_mask. Use at to access element.
1582 (collection_list::stringify): Change type of temp_buf to
1583 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1584 stringify the register mask. Use pack_hex_byte for the register
1587 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1589 * tracepoint.h (class collection_list) <add_register>: Remove.
1590 <add_remote_register, add_ax_registers, add_local_register>:
1592 <add_memrange>: Add scope parameter.
1593 * tracepoint.c (encode_actions_1): Likewise.
1594 (collection_list::add_register): Rename to ...
1595 (collection_list::add_remote_register): ... this. Update
1597 (collection_list::add_ax_registers, add_local_register): New
1599 (collection_list::add_memrange): Add scope parameter. Call
1600 add_local_register instead of add_register.
1601 (finalize_tracepoint_aexpr): New function.
1602 (collection_list::collect_symbol): Update calls to add_memrange.
1603 Call add_local_register instead of add_register. Call
1604 add_ax_registers. Call finalize_tracepoint_aexpr.
1605 (encode_actions_1): Get remote regnos for $reg action. Call
1606 add_remote_register, add_ax_registers, and add_local_register.
1607 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1608 (validate_actionline): Call finalize_tracepoint_aexpr.
1610 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1612 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1613 Replace array buf with gdb::char_vector buf, of size
1614 get_remote_packet_size (). Replace references to buf and
1615 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1616 and xsnprintf with snprintf. Raise errors if the buffer is too
1619 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1621 * remote.c (remote_target::download_tracepoint): Fix the has_more
1622 predicate in the QTDP action list iteration.
1624 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1626 * remote.c (remote_target::download_tracepoint): Fix indentation
1629 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1631 * proc-api.c (_initialize_proc_api): Remove c, unused.
1632 * procfs.c (procfs_init_inferior): Remove signals, unused.
1633 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1636 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1637 Andrew Burgess <andrew.burgess@embecosm.com>
1639 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1640 'W_STOPCODE (0)' as this could be ambiguous.
1642 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1644 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1645 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1648 2018-08-02 Tom Tromey <tom@tromey.com>
1651 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1653 (process_structure_scope): Likewise.
1655 2018-08-02 Xavier Roirand <roirand@adacore.com>
1658 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1661 2018-08-02 Tom Tromey <tom@tromey.com>
1663 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1664 (darwin_suspend_inferior, darwin_resume_inferior)
1665 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1666 (darwin_check_new_threads): Check result of get_darwin_inferior.
1668 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1672 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1674 * varobj.c (varobj_get_path_expr_parent): Report an error if
1675 parent is a dynamic varobj.
1677 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1679 * gnulib/aclocal.m4: Re-generate.
1680 * gnulib/config.in: Re-generate.
1681 * gnulib/configure: Re-generate.
1682 * gnulib/import/Makefile.in: Re-generate.
1683 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1684 * gnulib/import/m4/onceonly.m4: Re-generate.
1686 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1688 * target-descriptions.c (struct xml_test_tdesc): New.
1689 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1690 (record_xml_tdesc): Update.
1691 (maintenance_check_xml_descriptions): Update.
1692 * target-descriptions.h (record_xml_tdesc): Update comment.
1694 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1696 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1697 checking array bounds are defined.
1699 2018-07-30 Tom Tromey <tom@tromey.com>
1701 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1702 irreflexivity violation.
1704 2018-07-30 Tom Tromey <tom@tromey.com>
1706 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1707 * value.c (unpack_long): Remove lint code.
1708 * valops.c (value_ind): Remove lint code.
1709 * valarith.c (value_x_binop, value_x_unop, value_equal)
1710 (value_pos): Remove lint code.
1712 2018-07-28 Tom de Vries <tdevries@suse.de>
1714 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1715 with undefined upper bound as <optimized out>.
1717 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1719 * gcore.in: Rename variable "name" to "prefix". Expand
1722 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1724 * windows-nat.c (windows_nat_target::create_inferior): Update to
1725 call close() in global namespace.
1727 2018-07-26 Tom Tromey <tom@tromey.com>
1729 * dwarf-index-write.c (add_address_entry): Don't add objfile
1731 * dbxread.c (find_stab_function): Rename from
1732 find_stab_function_addr. Return a bound_minimal_symbol.
1733 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1734 Don't add objfile offsets.
1735 (end_psymtab): Use raw_text_low, raw_text_high,
1736 MSYMBOL_VALUE_RAW_ADDRESS.
1737 (read_ofile_symtab): Update.
1738 (process_one_symbol): Update.
1739 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1741 (dw2_relocate): Remove.
1742 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1744 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1746 (process_psymtab_comp_unit_reader, add_partial_symbol)
1747 (add_partial_subprogram, dwarf2_ranges_read): Update.
1748 (load_partial_dies): Update.
1749 (add_address_entry): Don't add objfile offsets.
1750 (dwarf2_build_include_psymtabs): Update.
1751 (create_addrmap_from_aranges): Don't add objfile offsets.
1752 (dw2_find_pc_sect_compunit_symtab): Update.
1753 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1754 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1756 (parse_partial_symbols): Don't add objfile offsets. Use
1757 raw_text_low, raw_text_high. Update.
1758 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1759 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1760 or call 'relocate' quick function. Clear psymbol_map.
1761 * psympriv.h (struct partial_symbol) <address>: Add section
1763 <set_unrelocated_address>: Rename from set_address.
1764 <raw_text_low, raw_text_high>: New methods.
1765 <text_low, text_high>: Add objfile parameter.
1766 (add_psymbol_to_bcache): Add 'section' parameter. Call
1767 set_unrelocated_address.
1768 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1769 (find_pc_psymbol): Update.
1770 (fixup_psymbol_section, relocate_psymtabs): Remove.
1771 (dump_psymtab, psym_functions): Update.
1772 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1774 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1775 (start_psymtab_common): Update.
1776 * symfile-debug.c (debug_qf_relocate): Remove.
1777 (debug_sym_quick_functions): Update.
1778 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1779 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1782 2018-07-26 Tom Tromey <tromey@redhat.com>
1784 * dbxread.c (end_psymtab): Use text_high_valid and
1786 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1787 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1788 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1790 <text_low_valid, text_high_valid>: New fields.
1791 <set_text_low, set_text_high>: Update.
1792 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1794 2018-07-26 Tom Tromey <tom@tromey.com>
1796 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1798 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1799 textlow and texthigh fields.
1800 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1802 * mdebugread.c (parse_lines, parse_partial_symbols)
1803 (psymtab_to_symtab_1): Update.
1804 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1805 Rename fields. Update comment. Now private.
1806 <text_low, text_high, set_text_low, set_text_high>: New methods.
1807 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1808 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1809 (start_psymtab_common, maintenance_info_psymtabs)
1810 (maintenance_check_psymtabs): Update.
1811 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1813 (scan_xcoff_symtab): Update.
1815 2018-07-26 Tom Tromey <tromey@redhat.com>
1817 * psympriv.h (struct partial_symbol) <unrelocated_address,
1818 address, set_address>: New methods.
1819 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1820 (fixup_psymbol_section, relocate_psymtabs): Update.
1821 (print_partial_symbols): Add 'objfile' parameter. Update.
1822 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1825 2018-07-26 Tom Tromey <tom@tromey.com>
1827 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1828 (debug_names::write_psymbols): Update.
1829 * psympriv.h (struct partial_symbol): Derive from
1830 general_symbol_info.
1831 <obj_section>: New method.
1832 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1833 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1834 (find_pc_sect_psymbol, fixup_psymbol_section)
1835 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1836 (print_partial_symbols, recursively_search_psymtabs)
1837 (compare_psymbols, psymbol_hash, psymbol_compare)
1838 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1839 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1841 2018-07-26 Tom Tromey <tromey@redhat.com>
1843 * dbxread.c (end_psymtab): Remove dead code.
1845 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1847 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1848 DWARF unwinders are disabled.
1849 * dwarf2-frame.c: Add dwarf2read.h include.
1850 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1852 (dwarf2_frame_unwinders_enabled_p): Define.
1853 (show_dwarf_unwinders_enabled_p): New function.
1854 (_initialize_dwarf2_frame): Register switch to control DWARF
1856 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1857 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1858 (show_dwarf_cmdlist): Remove static keyword.
1859 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1860 (show_dwarf_cmdlist): Declare.
1861 * NEWS: Document new feature.
1863 2018-07-26 Tom de Vries <tdevries@suse.de>
1865 PR breakpoints/23366
1866 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1868 2018-07-26 Tom de Vries <tdevries@suse.de>
1870 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1871 DW_AT_count can't be translated to a dynamic prop.
1873 2018-07-25 Tom de Vries <tdevries@suse.de>
1875 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1878 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1880 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1882 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1884 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1886 2018-07-24 Keith Seitz <keiths@redhat.comt
1889 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1890 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1891 instead of add_symbol_to_list.
1892 (read_file_scope): Call prepare_one_comp_unit before reading
1895 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1897 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1899 2018-07-24 Tom Tromey <tom@tromey.com>
1901 * utils.c (malloc, realloc, free): Don't declare.
1902 * configure, config.in: Rebuild.
1903 * configure.ac: Don't check for declarations of free, malloc, or
1906 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1908 * aarch64-linux-nat.c
1909 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1911 * arm-linux-nat.c (fetch_regs): Likewise.
1912 (store_regs): Likewise.
1913 (fetch_vfp_regs): Likewise.
1914 (store_vfp_regs): Likewise.
1915 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1916 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1917 (arm_linux_nat_target::insert_watchpoint): Likewise.
1918 (arm_linux_nat_target::remove_watchpoint): Likewise.
1919 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1921 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1923 * ppc-linux-nat.c (fetch_register): Likewise.
1924 (fetch_all_gp_regs): Likewise.
1925 (fetch_ppc_registers): Likewise.
1926 (store_all_gp_regs): Likewise.
1927 (store_ppc_registers): Likewise.
1928 (hwdebug_insert_point): Likewise.
1929 (can_use_watchpoint_cond_accel): Likewise.
1930 * remote-sim.c (gdb_os_write_stdout): Likewise.
1932 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1933 Tom Tromey <tom@tromey.com>
1935 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1937 * configure: Rebuild.
1939 2018-07-22 Tom Tromey <tom@tromey.com>
1941 * regformats/regdat.sh: Define xmltarget_${name} inside
1942 #ifndef IN_PROCESS_AGENT.
1944 2018-07-22 Tom Tromey <tom@tromey.com>
1946 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1948 2018-07-22 Tom Tromey <tom@tromey.com>
1950 * symfile.c (reread_symbols): Notify iter, not objfile.
1952 2018-07-22 Tom Tromey <tom@tromey.com>
1954 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1956 (ravenscar_thread_target::prepare_to_store): Likewise.
1958 2018-07-22 Tom Tromey <tom@tromey.com>
1960 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1961 unused variable. Call value_fetch_lazy when needed.
1962 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1963 Remove unused variable. Call value_fetch_lazy when needed.
1965 2018-07-22 Tom Tromey <tom@tromey.com>
1967 * m32c-tdep.c (mark_dma): Return void.
1968 (make_regs): Remove unused declarations.
1970 2018-07-22 Tom Tromey <tom@tromey.com>
1972 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
1973 cmdscm_get_valid_command_smob_arg_unsafe for effect.
1974 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
1975 bkscm_get_valid_block_smob_arg_unsafe for effect.
1977 2018-07-22 Tom Tromey <tom@tromey.com>
1979 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
1982 2018-07-22 Tom Tromey <tom@tromey.com>
1984 * windows-nat.c (saved_context): Conditionally define.
1985 * remote.c (remote_target::remote_btrace_maybe_reopen):
1986 Conditionally declare "warned".
1987 * inflow.c (sigquit_ours): Conditionally define.
1988 (new_tty): Move "tty" declaration inside #if.
1989 * guile/guile.c (guile_datadir): Conditionally define.
1990 * charset.c (set_be_le_names): Move some declarations inside #if.
1991 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
1993 (parse_xml_btrace_conf): Likewise.
1995 2018-07-22 Tom Tromey <tom@tromey.com>
1997 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
1999 2018-07-22 Tom Tromey <tom@tromey.com>
2001 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2002 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2003 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2004 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2005 * stack.c (frame_apply_level_command): Remove unused variable.
2006 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2007 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2008 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2010 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2011 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2012 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2014 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2015 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2017 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2018 Remove unused variable.
2019 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2021 * common/tdesc.c (print_xml_feature::visit): Remove unused
2023 * compile/compile-object-load.c (store_regs): Remove unused
2025 * complaints.c (clear_complaints): Remove unused variable.
2026 * corelow.c (core_target_open): Remove unused variable.
2027 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2029 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2031 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2033 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2035 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2037 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2039 * ia64-tdep.c (examine_prologue): Remove unused variable.
2040 * infcall.c (run_inferior_call): Remove unused variable.
2041 * inferior.c (exit_inferior): Remove unused variable.
2042 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2043 * linespec.c (decode_line_2): Remove unused variable.
2044 * linux-nat.c (super_close): Remove.
2045 * linux-tdep.c (linux_info_proc): Remove unused variable.
2046 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2047 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2048 Remove unused variable.
2049 * parse.c (find_minsym_type_and_address): Remove unused variable.
2050 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2052 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2054 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2056 * record-btrace.c (record_btrace_target::store_registers): Remove
2058 (cmd_show_record_btrace_cpu): Remove unused variable.
2059 * riscv-tdep.c (riscv_register_reggroup_p)
2060 (riscv_push_dummy_call, riscv_return_value): Remove unused
2062 * rust-exp.y (literal): Remove unused variable.
2063 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2065 <STRUCTOP_ANONYMOUS>: Likewise.
2066 * s390-linux-tdep.c (s390_linux_init_abi_31)
2067 (s390_linux_init_abi_64): Remove unused variable.
2068 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2069 (file_select_thread, net_windows_open, _initialize_ser_windows):
2070 Remove unused variables.
2071 * symtab.c (find_pc_sect_line): Remove unused variable.
2072 * target-memory.c (compute_garbled_blocks): Remove unused
2074 (target_write_memory_blocks): Remove unused variable.
2075 * target.c (target_stack::unpush): Remove unused variables.
2076 * tracepoint.c (start_tracing, all_tracepoint_actions)
2077 (merge_uploaded_trace_state_variables)
2078 (print_one_static_tracepoint_marker): Remove unused variable.
2079 * unittests/basic_string_view/element_access/char/1.cc (test01):
2080 Remove unused variable.
2081 * windows-nat.c (windows_continue, windows_add_all_dlls)
2082 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2083 Remove unused variables.
2085 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2087 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2088 attr_profile in HAVE_ELF.
2089 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2092 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2094 * frame.c (frame_register_unwind): Change parameter name.
2095 (frame_unwind_register): Likewise.
2096 (frame_unwind_register_value): Likewise.
2097 (frame_unwind_register_signed): Likewise.
2098 (frame_unwind_register_unsigned): Likewise.
2099 * frame.h (frame_register_unwind): Likewise.
2100 (frame_unwind_register): Likewise.
2101 (frame_unwind_register_value): Likewise.
2102 (frame_unwind_register_signed): Likewise.
2103 (frame_unwind_register_unsigned): Likewise.
2104 (frame_unwind_arch): Likewise.
2106 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2108 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2111 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2113 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2114 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2117 2018-07-20 Keith Seitz <keiths@redhat.com>
2119 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2120 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2121 m_compunit_symtab, m_language>: Add "m_" prefix.
2123 * buildsym.c: Update all uses.
2125 2018-07-20 Tom Tromey <tom@tromey.com>
2127 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2128 * buildsym.h (record_line_ftype): Remove typedef.
2130 2018-07-20 Tom Tromey <tom@tromey.com>
2132 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2133 (end_expandable_symtab): Likewise.
2134 (end_symtab_get_static_block): Likewise.
2135 (end_symtab_from_static_block): Likewise.
2136 * buildsym-legacy.c (augment_type_symtab): Remove.
2137 (end_expandable_symtab): Remove.
2138 (end_symtab_get_static_block): Remove.
2139 (end_symtab_from_static_block): Remove.
2141 2018-07-20 Tom Tromey <tom@tromey.com>
2143 * dwarf2read.c: Include buildsym.h.
2144 (struct dwarf2_cu) <builder>: New method.
2145 (fixup_go_packaging): Update.
2146 (process_full_comp_unit, process_full_type_unit): Update. Don't
2147 use scoped_free_pendings.
2148 (using_directives): Add "cu" parameter, remove "language".
2149 (read_import_statement, setup_type_unit_groups, )
2150 (read_func_scope, read_lexical_block_scope)
2151 (dwarf2_record_block_ranges, read_namespace): Update.
2152 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2153 (lnp_state_machine::handle_end_sequence): Update.
2154 (class lnp_state_machine) <m_cu>: New member.
2155 <m_record_line_callback>: Remove.
2156 <m_currently_recording_lines>: New member.
2157 (lnp_state_machine::handle_set_file): Update.
2158 (noop_record_line): Remove.
2159 (dwarf_record_line_p): Add cu parameter.
2160 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2161 (lnp_state_machine::record_line)
2162 (lnp_state_machine::lnp_state_machine)
2163 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2164 (dwarf_decode_lines): Update.
2165 (dwarf2_start_subfile): Add cu parameter.
2166 (dwarf2_start_symtab, new_symbol): Update.
2167 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2168 Remove dwarf2_per_objfile parameter.
2169 (dwarf_decode_macros): Update.
2171 2018-07-20 Tom Tromey <tom@tromey.com>
2173 * stabsread.c (define_symbol): Update.
2174 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2175 * dwarf2read.c (new_symbol): Update.
2176 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2177 * cp-namespace.c: Include buildsym.h.
2178 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2179 * buildsym-legacy.c (get_buildsym_compunit): New function.
2181 2018-07-20 Tom Tromey <tom@tromey.com>
2183 * xcoffread.c: Include buildsym-legacy.h.
2184 * windows-nat.c: Include buildsym-legacy.h.
2185 * stabsread.c: Include buildsym-legacy.h.
2186 * mdebugread.c: Include buildsym-legacy.h.
2187 * buildsym-legacy.h: New file.
2188 * buildsym-legacy.c: New file, from buildsym.c.
2189 * go32-nat.c: Include buildsym-legacy.h.
2190 * dwarf2read.c: Include buildsym-legacy.h.
2191 * dbxread.c: Include buildsym-legacy.h.
2192 * cp-namespace.c: Include buildsym-legacy.h.
2193 * coffread.c: Include buildsym-legacy.h.
2194 * buildsym.h: Move some contents to buildsym-legacy.h.
2195 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2197 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2199 2018-07-20 Tom Tromey <tom@tromey.com>
2201 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2202 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2203 (buildsym_compunit::buildsym_compunit)
2204 (buildsym_compunit::~buildsym_compunit)
2205 (buildsym_compunit::get_macro_table): Define.
2207 2018-07-20 Tom Tromey <tom@tromey.com>
2209 * buildsym.c (reset_symtab_globals): Remove.
2210 (buildsym_compunit::end_symtab_from_static_block): Update.
2211 (buildsym_compunit::augment_type_symtab): Update.
2212 (end_symtab_from_static_block): Call free_buildsym_compunit.
2213 (augment_type_symtab, end_symtab, end_expandable_symtab):
2216 2018-07-20 Tom Tromey <tom@tromey.com>
2218 * arch-utils.c: Do not include buildsym.h.
2219 * mipsread.c: Do not include buildsym.h.
2220 * machoread.c: Do not include buildsym.h.
2221 * elfread.c: Do not include buildsym.h.
2223 2018-07-20 Tom Tromey <tom@tromey.com>
2225 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2227 (buildsym_compunit): Add new constructor.
2228 (struct buildsym_compunit) <get_last_source_file, finish_block,
2229 record_block_range, start_subfile, patch_subfile_names,
2230 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2231 set_last_source_start_addr, get_last_source_start_addr,
2232 get_local_using_directives, set_local_using_directives,
2233 get_global_using_directives, outermost_context_p,
2234 get_current_context_stack, get_context_stack_depth,
2235 get_current_subfile, get_local_symbols, get_file_symbols,
2236 get_global_symbols, record_debugformat, record_producer,
2237 push_context, pop_context, end_symtab_get_static_block,
2238 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2240 <record_pending_block, finish_block_internal, make_blockvector,
2241 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2245 2018-05-22 Tom Tromey <tom@tromey.com>
2247 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2249 (finish_block_internal): Update.
2251 2018-07-20 Tom Tromey <tom@tromey.com>
2253 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2255 (finish_block_internal): Update.
2257 2018-07-20 Tom Tromey <tom@tromey.com>
2259 * buildsym.h (EXTERN): Don't define or undef.
2260 * buildsym.c (EXTERN): Don't define.
2262 2018-07-20 Tom Tromey <tom@tromey.com>
2264 * buildsym.c: Remove TODO comment.
2266 2018-07-20 Tom Tromey <tom@tromey.com>
2268 * coffread.c (coff_symtab_read): Update.
2269 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2270 (xcoff_new_init): Update.
2271 * mipsread.c (mipscoff_new_init): Update.
2272 * mdebugread.c (mdebug_build_psymtabs): Update.
2273 * elfread.c (elf_new_init): Update.
2274 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2276 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2277 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2278 (stabsect_build_psymtabs): Update.
2279 * buildsym.h (buildsym_init): Don't declare.
2280 * buildsym.c: Update comment.
2281 (prepare_for_building): Remove.
2282 (start_symtab, restart_symtab): Update.
2283 (reset_symtab_globals): Update comment.
2284 (buildsym_init): Remove.
2286 2018-07-20 Tom Tromey <tom@tromey.com>
2288 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2289 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2290 (read_enum_type, common_block_start, common_block_end)
2291 (cleanup_undefined_types_1, finish_global_stabs): Update.
2292 * mdebugread.c (psymtab_to_symtab_1): Update.
2293 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2294 (read_lexical_block_scope, new_symbol): Update.
2295 * dbxread.c (process_one_symbol): Update.
2296 * coffread.c (coff_symtab_read, process_coff_symbol)
2297 (coff_read_enum_type): Update.
2298 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2300 (get_local_symbols, get_file_symbols, get_global_symbols): New
2302 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2304 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2305 (~scoped_free_pendings): Update.
2306 (finish_block, prepare_for_building, reset_symtab_globals)
2307 (end_symtab_get_static_block, end_symtab_with_blockvector)
2308 (augment_type_symtab, push_context): Update.
2309 (get_local_symbols, get_file_symbols, get_global_symbols): New
2311 (buildsym_init): Update.
2313 2018-07-20 Tom Tromey <tom@tromey.com>
2315 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2316 (process_full_type_unit): Likewise.
2317 (dwarf2_start_symtab): Set list_in_scope.
2319 2018-07-20 Tom Tromey <tom@tromey.com>
2321 * dwarf2read.c (process_psymtab_comp_unit_reader)
2322 (build_type_psymtabs_reader): Do not set list_in_scope.
2324 2018-07-20 Tom Tromey <tom@tromey.com>
2326 * buildsym.c (free_pendings): Remove.
2327 (add_symbol_to_list, scoped_free_pendings)
2328 (finish_block_internal, buildsym_init): Update.
2330 2018-07-20 Tom Tromey <tom@tromey.com>
2332 * xcoffread.c (read_xcoff_symtab): Update.
2333 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2335 * dbxread.c (process_one_symbol): Update.
2336 * coffread.c (coff_symtab_read): Update.
2337 * buildsym.h (finish_block): Update.
2338 * buildsym.c (finish_block): Remove "listhead" argument.
2339 (end_symtab_get_static_block): Update.
2341 2018-07-20 Tom Tromey <tom@tromey.com>
2343 * buildsym.h (class scoped_free_pendings): Remove constructor.
2344 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2346 <m_pending_block_obstack, m_pending_blocks>: New members.
2347 (pending_block_obstack, pending_blocks): Remove.
2348 (scoped_free_pendings::scoped_free_pendings): Default.
2349 (~scoped_free_pendings): Update.
2350 (free_pending_blocks): Remove.
2351 (finish_block_internal, record_pending_block, make_blockvector)
2352 (end_symtab_get_static_block, augment_type_symtab, push_context)
2353 (buildsym_init): Update.
2355 2018-07-20 Tom Tromey <tom@tromey.com>
2357 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2358 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2360 (pending_addrmap, pending_addrmap_obstack)
2361 (pending_addrmap_interesting): Remove.
2362 (scoped_free_pendings, record_block_range, make_blockvector)
2363 (prepare_for_building, reset_symtab_globals, buildsym_init):
2366 2018-07-20 Tom Tromey <tom@tromey.com>
2368 * xcoffread.c (process_linenos): Update.
2369 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2370 * mdebugread.c (psymtab_to_symtab_1): Update.
2371 * dwarf2read.c (setup_type_unit_groups)
2372 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2373 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2374 * dbxread.c (process_one_symbol): Update.
2375 * coffread.c (coff_symtab_read, enter_linenos)
2376 (process_coff_symbol): Update.
2377 * buildsym.h (current_subfile): Don't declare.
2378 (get_current_subfile): Declare.
2379 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2381 (start_subfile, free_buildsym_compunit, push_subfile)
2382 (prepare_for_building, start_symtab): Update.
2383 (get_current_subfile): New function.
2385 2018-07-20 Tom Tromey <tom@tromey.com>
2387 * coffread.c (coff_symtab_read): Update.
2388 * xcoffread.c (read_xcoff_symtab): Update.
2389 * dwarf2read.c (new_symbol): Update.
2390 (read_func_scope, read_lexical_block_scope): Update.
2391 * dbxread.c (process_one_symbol): Update.
2392 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2393 (outermost_context_p): Remove macro.
2394 (outermost_context_p, get_current_context_stack)
2395 (get_context_stack_depth): Declare.
2396 (pop_context): Return struct context_stack.
2397 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2399 (context_stack_size): Remove.
2400 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2401 (prepare_for_building, end_symtab_get_static_block)
2402 (augment_type_symtab, push_context): Update.
2403 (pop_context): Return struct context_stack.
2404 (outermost_context_p, get_current_context_stack)
2405 (get_context_stack_depth): New functions.
2406 (buildsym_init): Update.
2408 2018-07-20 Tom Tromey <tom@tromey.com>
2410 * rust-exp.y: Now a pure parser. Update all rules.
2411 (%union): Move earlier.
2412 (current_parser, work_obstack): Remove globals.
2413 (rust_parser, ~rust_parser): Update.
2414 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2415 lex_character, lex_number, lex_string, lex_identifier,
2416 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2417 convert_name, convert_params_to_expression,
2418 convert_ast_to_expression, ast_basic_type, ast_operation,
2419 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2420 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2421 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2422 ast_array_type, ast_slice_type, ast_reference_type,
2423 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2424 (rust_parse): Update.
2425 (rustyyerror, rustyylex): Add parser parameter.
2426 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2427 (rust_lex_stringish_test, rust_lex_test_sequence)
2428 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2429 (rust_lex_test_push_back, rust_lex_tests): Update.
2431 2018-07-19 Pedro Alves <palves@redhat.com>
2433 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2434 gdb::unique_xmalloc_ptr.
2435 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2436 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2437 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2438 copy-initialization.
2439 * guile/scm-pretty-print.c (ppscm_print_children): Use
2440 gdb::unique_xmalloc_ptr instead of cleanups.
2441 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2442 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2443 gdb::unique_xmalloc_ptr.
2444 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2445 Adjust to use gdb::unique_xmalloc_ptr.
2446 * guile/scm-utils.c (extract_arg): Adjust.
2447 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2448 gdb::unique_xmalloc_ptr instead of a cleanup.
2450 2018-07-19 Tom Tromey <tom@tromey.com>
2452 * utils.c (do_value_free_to_mark)
2453 (make_cleanup_value_free_to_mark): Remove.
2454 * utils.h (make_cleanup_value_free_to_mark): Remove.
2456 2018-07-19 Pedro Alves <palves@redhat.com>
2458 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2459 forwarding reference.
2461 2018-07-18 Pedro Alves <palves@redhat.com>
2463 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2464 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2467 2018-07-18 Pedro Alves <palves@redhat.com>
2469 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2471 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2473 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2474 directly instead of a cleanup.
2475 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2476 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2477 (vlscm_binop_gdbthrow): New, factored out from ...
2478 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2479 (vlscm_rich_compare): Use gdbscm_wrap.
2480 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2481 instead of a cleanup.
2482 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2484 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2485 Use xfree directly instead of a cleanup.
2486 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2487 Adjust to use gdbscm_wrap and scoped_value_mark.
2488 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2489 (gdbscm_value_address, gdbscm_value_dereference)
2490 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2492 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2493 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2495 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2496 gdbscm_wrap and scoped_value_mark.
2497 (gdbscm_value_to_string): Use xfree directly instead of a
2498 cleanup. Move 'buffer' unique_ptr to TRY scope.
2499 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2500 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2502 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2503 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2505 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2508 2018-07-18 Tom de Vries <tdevries@suse.de>
2510 * findvar.c (default_read_var_value): Also resolve dynamic type for
2511 LOC_OPTIMIZED_OUT vars.
2513 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2515 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2518 2018-07-17 Tom Tromey <tom@tromey.com>
2520 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2521 (compute_enum_list, pascm_set_param_value_x)
2522 (gdbscm_parameter_value): Update.
2523 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2524 (gdbscm_scm_to_host_string): Update.
2525 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2527 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2528 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2529 * guile/scm-string.c (gdbscm_scm_to_string): Return
2531 (gdbscm_scm_to_host_string): Likewise.
2533 2018-07-17 Tom Tromey <tom@tromey.com>
2535 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2536 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2537 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2538 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2541 2018-07-17 Tom Tromey <tom@tromey.com>
2543 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2544 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2546 * guile/scm-cmd.c (cmdscm_function): Update.
2547 * guile/scm-pretty-print.c
2548 (ppscm_print_exception_unless_memory_error): Update.
2549 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2550 Return unique_xmalloc_ptr.
2552 2018-07-17 Tom Tromey <tom@tromey.com>
2554 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2557 2018-07-17 Jim Wilson <jimw@sifive.com>
2559 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2560 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2561 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2562 unecessary braces after EF_RISCV_RVC test. Delete call to
2563 set_gdbarch_decr_pc_after_break.
2565 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2566 RISCV_LAST_FP_REGNUM + 1.
2567 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2569 2018-07-17 Tom Tromey <tom@tromey.com>
2571 * configure.ac: Remove --disable-gdbcli.
2572 * configure: Rebuild.
2573 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2574 (SUBDIR_CLI_CFLAGS): Remove.
2575 (SFILES): Use SUBDIR_CLI_SRCS.
2576 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2578 2018-07-17 Tom Tromey <tom@tromey.com>
2581 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2583 2018-07-16 Jim Wilson <jimw@sifive.com>
2585 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2587 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2589 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2591 (libunwind_frame_sniffer): Likewise.
2592 (libunwind_frame_prev_register): Likewise.
2593 (libunwind_sigtramp_frame_sniffer): Likewise.
2594 * ia64-tdep.c (ia64_access_reg): Likewise.
2595 (ia64_access_rse_reg): Likewise.
2596 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2597 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2599 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2601 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2603 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2605 * remote-sim.c (gdbsim_target::close,
2606 gdbsim_target::mourn_inferior): Remove unused variables.
2608 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2610 * ia64-tdep.c (ktab_buf): New global.
2611 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2612 (get_kernel_table): Adjust.
2614 2018-07-16 Tom Tromey <tom@tromey.com>
2616 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2617 * dwarf2read.c (using_directives, new_symbol): Use
2618 outermost_context_p.
2619 * dbxread.c (process_one_symbol): Use outermost_context_p.
2620 * coffread.c (coff_symtab_read): Use outermost_context_p.
2622 2018-07-16 Tom Tromey <tom@tromey.com>
2624 * dwarf2read.c (using_directives, read_func_scope)
2625 (read_lexical_block_scope): Update.
2626 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2627 * buildsym.h (local_using_directives, global_using_directives):
2629 (get_local_using_directives, set_local_using_directives)
2630 (get_global_using_directives): Declare.
2631 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2632 m_global_using_directives>: New members.
2633 (finish_block_internal, prepare_for_building)
2634 (reset_symtab_globals, end_symtab_get_static_block)
2635 (push_context): Update.
2636 (get_local_using_directives, set_local_using_directives)
2637 (get_global_using_directives): New functions.
2638 (buildsym_init): Update.
2640 2018-07-16 Tom Tromey <tom@tromey.com>
2642 * xcoffread.c (xcoff_initial_scan): Don't call
2643 free_pending_blocks.
2644 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2645 * buildsym.h (class scoped_free_pendings): Add constructor.
2646 (free_pending_blocks): Don't declare.
2647 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2648 (free_pending_blocks): Now static.
2650 2018-07-16 Tom Tromey <tom@tromey.com>
2652 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2653 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2655 (struct subfile_stack): Remove.
2656 (subfile_stack): Remove.
2657 (push_subfile, pop_subfile, buildsym_init): Update.
2659 2018-07-16 Tom Tromey <tom@tromey.com>
2661 * buildsym.c (push_subfile): Use gdb_assert.
2662 (pop_subfile): Use gdb_assert.
2664 2018-07-16 Tom Tromey <tom@tromey.com>
2666 * buildsym.h (merge_symbol_lists): Remove.
2667 * buildsym.c (merge_symbol_lists): Remove.
2669 2018-07-16 Tom Tromey <tom@tromey.com>
2671 * stabsread.c (scan_file_globals): Update comment.
2672 * stabsread.h (scan_file_globals): Move from buildsym.h.
2673 * buildsym.h (scan_file_globals): Move to stabsread.h.
2675 2018-07-16 Tom Tromey <tom@tromey.com>
2677 * xcoffread.c (xcoff_new_init): Update.
2678 * mipsread.c (mipscoff_new_init): Update.
2679 * mdebugread.c (mdebug_build_psymtabs): Update.
2680 * elfread.c (elf_new_init): Update.
2681 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2682 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2683 * buildsym.h (buildsym_new_init): Don't declare.
2684 * buildsym.c (buildsym_new_init): Remove.
2686 2018-07-16 Tom Tromey <tom@tromey.com>
2688 * stabsread.h (within_function): Move from buildsym.h.
2689 * stabsread.c (start_stabs): Clear within_function.
2690 * coffread.c (coff_start_symtab): Clear within_function.
2691 * buildsym.h (within_function): Move to stabsread.h.
2692 * buildsym.c (prepare_for_building): Update.
2694 2018-07-16 Tom Tromey <tom@tromey.com>
2696 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2697 * dwarf2read.c (dwarf2_start_symtab): Don't set
2698 processing_gcc_compilation.
2699 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2701 2018-07-16 Tom Tromey <tom@tromey.com>
2703 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2704 (next_symbol_text_func): Move from buildsym.h.
2705 * stabsread.c (hashname): Move from buildsym.c.
2706 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2707 (next_symbol_text_func, hashname): Move to stabsread.h.
2708 * buildsym.c: Don't include bcache.h
2709 (hashname): Move to stasbread.c.
2711 2018-07-16 Tom Tromey <tom@tromey.com>
2713 * buildsym.h (context_stack_size): Don't declare.
2714 * buildsym.c (context_stack_size): New global.
2716 2018-07-16 Tom Tromey <tom@tromey.com>
2718 * dbxread.c (processing_acc_compilation): New global.
2719 * buildsym.h (processing_acc_compilation): Don't declare.
2721 2018-07-16 Tom Tromey <tom@tromey.com>
2723 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2724 * dbxread.c (read_ofile_symtab): Update.
2725 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2726 * buildsym.h (last_source_start_addr): Remove.
2727 (set_last_source_start_addr, get_last_source_start_addr):
2729 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2731 (struct buildsym_compunit) <m_last_source_start_addr>: New
2733 (prepare_for_building): Remove start_addr parameter.
2734 (start_symtab, restart_symtab, end_symtab_get_static_block)
2735 (end_symtab_with_blockvector): Update.
2736 (set_last_source_start_addr, get_last_source_start_addr): New
2739 2018-07-16 Tom Tromey <tom@tromey.com>
2741 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2743 (have_line_numbers): Remove.
2744 (record_line, prepare_for_building, end_symtab_get_static_block)
2745 (augment_type_symtab): Update.
2747 2018-07-16 Tom Tromey <tom@tromey.com>
2749 * buildsym.c (~buildsym_compunit): Free the macro table.
2750 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2752 <m_pending_macros>: New member.
2753 (pending_macros): Remove.
2754 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2755 (reset_symtab_globals, end_symtab_get_static_block)
2756 (end_symtab_with_blockvector, augment_type_symtab)
2757 (buildsym_init): Update.
2759 2018-07-16 Tom Tromey <tom@tromey.com>
2761 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2763 (buildsym_compunit::set_last_source_file): New method.
2764 <m_last_source_file>: New member.
2765 (prepare_for_building): Remove "name" parameter.
2766 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2767 (last_source_file): Remove.
2768 (set_last_source_file, get_last_source_file): Update.
2770 2018-07-16 Tom Tromey <tom@tromey.com>
2772 * buildsym.c (prepare_for_building): Add assert.
2774 2018-07-16 Tom Tromey <tom@tromey.com>
2776 * buildsym.c (~buildsym_compunit): Update.
2777 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2778 (start_subfile, patch_subfile_names)
2779 (end_symtab_with_blockvector): Update.
2781 2018-07-16 Tom Tromey <tom@tromey.com>
2783 * buildsym.c (struct buildsym_compunit): Add constructor,
2784 destructor, initializers.
2785 (start_buildsym_compunit): Remove.
2786 (free_buildsym_compunit): Use "delete".
2787 (start_symtab, restart_symtab): Use "new".
2789 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2791 * symfile.c (set_objfile_default_section_offset): Remove struct
2794 2018-07-14 Stafford Horne <shorne@gmail.com>
2796 * (Responsible Maintainers): Add myself as or1k maintainer.
2798 2018-07-13 Tom Tromey <tom@tromey.com>
2800 * symfile.c (set_objfile_default_section_offset): Use extra braces
2803 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2805 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2808 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2810 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2811 unittests/cli-utils-selftests.c
2812 * unittests/cli-utils-selftests.c: New file.
2814 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2816 * NEWS: Mention new commands. Mention change to 'thread apply'.
2818 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2820 * thread.c (thr_try_catch_cmd): New function.
2821 (thread_apply_all_command): Handle qcs flags.
2822 (thread_apply_command): Handle qcs flags.
2823 (taas_command): New function.
2824 (tfaas_command): New function.
2825 (_initialize_thread): Update to setup the new commands 'taas
2826 and 'tfaas'. Change doc string for 'thread apply'.
2828 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2830 * stack.c: (trailing_outermost_frame): New function, mostly
2831 extracted from backtrace_command_1.
2832 (leading_innermost_frame): New function.
2833 (backtrace_command_1): Update to call trailing_outermost_frame.
2834 (frame_apply_command_count): New function.
2835 (frame_apply_level_command): New function.
2836 (frame_apply_all_command): New function.
2837 (frame_apply_command): New function.
2838 (faas_command): New function.
2839 (frame_cmd_list): New variable.
2840 (_initialize_stack): Update to setup the new commands 'frame apply'
2843 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2845 * cli-utils.c (number_or_range_parser::get_number): Only handle
2846 numbers or convenience var as numbers.
2847 (parse_flags): New function.
2848 (parse_flags_qcs): New function.
2849 (number_or_range_parser::finished): Ensure parsing end is detected
2850 before end of string.
2851 * cli-utils.h (parse_flags): New function.
2852 (parse_flags_qcs): New function.
2853 (number_or_range_parser): Remove m_finished bool.
2854 (number_or_range_parser::skip_range): Set m_in_range to false.
2856 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2858 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2861 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2862 Jan Kratochvil <jan.kratochvil@redhat.com>
2863 Paul Fertser <fercerpav@gmail.com>
2864 Tsutomu Seki <sekiriki@gmail.com>
2865 Pedro Alves <palves@redhat.com>
2867 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2868 'unittests/parse-connection-spec-selftests.c'.
2869 (COMMON_SFILES): Add 'common/netstuff.c'.
2870 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2871 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2872 * common/netstuff.c: New file.
2873 * common/netstuff.h: New file.
2874 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2875 (wait_for_connect): Update comment. New parameter
2876 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2877 Use 'sock' directly instead of 'scb->fd'.
2878 (try_connect): New function, with code from 'net_open'.
2879 (net_open): Rewrite main loop to deal with multiple
2880 sockets/addresses. Handle IPv6-style hostnames; implement
2881 support for IPv6 connections.
2882 * unittests/parse-connection-spec-selftests.c: New file.
2884 2018-07-11 Pedro Alves <palves@redhat.com>
2887 * remote.c (remote_target::remote_detach_pid): Call
2888 set_current_process.
2890 2018-07-11 Pedro Alves <palves@redhat.com>
2892 * h8300-tdep.c (h8300_gdbarch_init): Remove
2893 set_gdbarch_ecoff_reg_to_regnum calls.
2895 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2898 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2899 offsets/sizes for static members of a class/struct.
2901 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2903 * target-descriptions.c (tdesc_register_bitsize): Rename.
2904 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2905 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2906 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2908 2018-07-10 Tom Tromey <tom@tromey.com>
2910 * breakpoint.c (moribund_locations): Now static and a
2912 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2913 (build_bpstat_chain, update_global_location_list)
2914 (breakpoint_retire_moribund): Update.
2915 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2918 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2920 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2921 (riscv_register_reggroup_p): Use new function, remove unneeded
2923 (riscv_push_dummy_call): Extend assert to compare against xlen or
2924 flen based on register type.
2926 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2928 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2930 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2932 * remote.c (show_hardware_watchpoint_limit): New function.
2933 (show_hardware_watchpoint_length_limit): New function.
2934 (show_hardware_breakpoint_limit): New function.
2935 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2936 where appropriate, update help text.
2938 2018-07-09 Tom Tromey <tom@tromey.com>
2940 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2941 (CLIBS): Don't mention NAT_CLIBS.
2943 2018-07-09 Tom Tromey <tom@tromey.com>
2945 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2946 (LIBGDB_OBS, clean mostlyclean): Update.
2947 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2949 2018-07-09 Tom Tromey <tom@tromey.com>
2951 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2952 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2953 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2955 2018-07-09 Tom Tromey <tom@tromey.com>
2957 * Makefile.in (ALLDEPFILES): Remove exec.c.
2958 (COMMON_OBS): Remove exec.o.
2959 (COMMON_SFILES): Add exec.c.
2961 2018-07-09 Tom Tromey <tom@tromey.com>
2963 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2965 2018-07-09 Tom Tromey <tom@tromey.com>
2967 * Makefile.in (clean mostlyclean): Remove stamp-version.
2968 (version.c): Depend on stamp-version.
2969 (stamp-version): New rule, from version.c rule.
2971 2018-07-09 Tom Tromey <tom@tromey.com>
2973 * Makefile.in (init.c): Depend on stamp-init.
2974 (stamp-init): New rule, from init.c rule.
2975 (clean mostlyclean): Remove stamp-init.
2977 2018-07-09 Tom Tromey <tom@tromey.com>
2979 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
2980 SUBDIR_GCC_COMPILE_SRCS.
2982 2018-07-09 Tom Tromey <tom@tromey.com>
2984 * Makefile.in (init.c): Remove some unused sed rules.
2986 2018-07-09 Tom Tromey <tom@tromey.com>
2988 * Makefile.in (TSOBS): Remove.
2989 (INIT_FILES): Update.
2990 (LIBGDB_OBS): Update.
2991 (COMMON_SFILES): Add inflow.c.
2992 (SFILES): Remove inflow.c.
2994 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2996 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2998 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3000 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3001 get_saveloc_name, is_signal_frame_name, step_name,
3002 init_remote_name, create_addr_space_name,
3003 destroy_addr_space_name, search_unwind_table_name,
3004 find_dyn_list_name): Constify.
3006 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3008 * darwin-nat.c (darwin_pthread_kill): New function.
3009 (darwin_resume_thread): Use darwin_pthread_kill.
3011 2018-07-05 Tom de Vries <tdevries@suse.de>
3013 * macroexp.c (macro_buffer) <operator=>: New member function.
3015 2018-07-04 Tom Tromey <tom@tromey.com>
3017 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3019 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3021 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3022 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3023 * maint.c: Likewise.
3026 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3028 * NEWS: Create a new section for the next release branch.
3029 Rename the section of the current branch, now that it has
3032 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3034 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3035 * version.in: Bump version to 8.2.50.DATE-git.
3037 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3038 Pedro Alves <palves@redhat.com>
3040 * linux-nat.c (linux_init_ptrace): Rename to ...
3041 (linux_init_ptrace_procfs): ... this. Call
3042 linux_proc_init_warnings.
3043 (linux_nat_target::post_attach)
3044 (linux_nat_target::post_startup_inferior): Adjust.
3045 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3046 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3048 2018-07-04 Tom de Vries <tdevries@suse.de>
3050 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3052 (read_comp_unit_head): ... here.
3054 2018-07-03 Tom Tromey <tom@tromey.com>
3056 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3057 (stop_tracing, tstatus_command)
3058 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3059 (print_one_static_tracepoint_marker): Update.
3060 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3062 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3064 (all_tracepoints, static_tracepoints_here): Return std::vector.
3066 2018-07-03 Tom Tromey <tom@tromey.com>
3068 * common/ptid.c (ptid_equal): Remove.
3069 * common/ptid.h (ptid_equal): Don't declare.
3070 * ada-tasks.c: Update.
3071 * breakpoint.c: Update.
3072 * common/agent.c: Update.
3073 * corelow.c: Update.
3074 * darwin-nat-info.c: Update.
3075 * darwin-nat.c: Update.
3077 * dtrace-probe.c: Update.
3078 * dummy-frame.c: Update.
3079 * fbsd-nat.c: Update.
3081 * gdbthread.h: Update.
3082 * gnu-nat.c: Update.
3083 * go32-nat.c: Update.
3084 * inf-loop.c: Update.
3085 * inf-ptrace.c: Update.
3086 * infcall.c: Update.
3090 * linux-fork.c: Update.
3091 * linux-nat.c: Update.
3092 * linux-thread-db.c: Update.
3093 * mi/mi-cmd-var.c: Update.
3094 * mi/mi-interp.c: Update.
3095 * mi/mi-main.c: Update.
3096 * nto-procfs.c: Update.
3097 * ppc-linux-tdep.c: Update.
3099 * python/py-inferior.c: Update.
3100 * python/py-record-btrace.c: Update.
3101 * python/py-record.c: Update.
3102 * ravenscar-thread.c: Update.
3103 * regcache.c: Update.
3104 * remote-sim.c: Update.
3106 * sol-thread.c: Update.
3109 * tui/tui-stack.c: Update.
3111 * windows-nat.c: Update.
3112 * windows-tdep.c: Update.
3114 2018-07-03 Tom Tromey <tom@tromey.com>
3116 * common/ptid.c (ptid_match): Remove.
3117 * common/ptid.h (ptid_match): Don't declare.
3118 * fbsd-nat.c: Update.
3121 * linux-nat.c: Update.
3122 * record-btrace.c: Update.
3123 * regcache.c: Update.
3126 2018-07-03 Tom Tromey <tom@tromey.com>
3128 * common/ptid.c (ptid_tid_p): Remove.
3129 * common/ptid.h (ptid_tid_p): Don't declare.
3130 * sol-thread.c: Update.
3132 2018-07-03 Tom Tromey <tom@tromey.com>
3134 * common/ptid.c (ptid_lwp_p): Remove.
3135 * common/ptid.h (ptid_lwp_p): Don't declare.
3136 * fbsd-nat.c: Update.
3137 * linux-nat.c: Update.
3138 * nat/linux-procfs.c: Update.
3139 * nat/x86-linux-dregs.c: Update.
3140 * sol-thread.c: Update.
3142 2018-07-03 Tom Tromey <tom@tromey.com>
3144 * common/ptid.c (ptid_is_pid): Remove.
3145 * common/ptid.h (ptid_is_pid): Don't declare.
3147 * linux-nat.c: Update.
3148 * mi/mi-interp.c: Update.
3152 2018-07-03 Tom Tromey <tom@tromey.com>
3154 * common/ptid.c (ptid_get_tid): Remove.
3155 * common/ptid.h (ptid_get_tid): Don't declare.
3156 * ada-tasks.c: Update.
3157 * aix-thread.c: Update.
3158 * bsd-uthread.c: Update.
3159 * darwin-nat.c: Update.
3160 * fbsd-nat.c: Update.
3161 * i386-darwin-nat.c: Update.
3163 * linux-tdep.c: Update.
3164 * nto-procfs.c: Update.
3165 * ppc-ravenscar-thread.c: Update.
3166 * python/py-infthread.c: Update.
3167 * ravenscar-thread.c: Update.
3168 * sol-thread.c: Update.
3169 * sparc-ravenscar-thread.c: Update.
3170 * windows-nat.c: Update.
3172 2018-07-03 Tom Tromey <tom@tromey.com>
3174 * common/ptid.c (ptid_get_lwp): Remove.
3175 * common/ptid.h (ptid_get_lwp): Don't declare.
3176 * aarch64-linux-nat.c: Update.
3177 * ada-tasks.c: Update.
3178 * aix-thread.c: Update.
3179 * amd64-linux-nat.c: Update.
3180 * arm-linux-nat.c: Update.
3181 * corelow.c: Update.
3182 * fbsd-nat.c: Update.
3183 * fbsd-tdep.c: Update.
3184 * gnu-nat.c: Update.
3185 * i386-cygwin-tdep.c: Update.
3186 * i386-gnu-nat.c: Update.
3187 * i386-linux-nat.c: Update.
3188 * ia64-linux-nat.c: Update.
3189 * inf-ptrace.c: Update.
3191 * linux-fork.c: Update.
3192 * linux-nat.c: Update.
3193 * linux-tdep.c: Update.
3194 * linux-thread-db.c: Update.
3195 * mips-linux-nat.c: Update.
3196 * nat/aarch64-linux-hw-point.c: Update.
3197 * nat/aarch64-linux.c: Update.
3198 * nat/linux-btrace.c: Update.
3199 * nat/linux-osdata.c: Update.
3200 * nat/linux-procfs.c: Update.
3201 * nat/x86-linux-dregs.c: Update.
3202 * obsd-nat.c: Update.
3203 * ppc-fbsd-nat.c: Update.
3204 * ppc-linux-nat.c: Update.
3206 * python/py-infthread.c: Update.
3207 * ravenscar-thread.c: Update.
3209 * s390-linux-nat.c: Update.
3210 * sol-thread.c: Update.
3211 * sol2-tdep.c: Update.
3212 * spu-linux-nat.c: Update.
3213 * x86-linux-nat.c: Update.
3214 * xtensa-linux-nat.c: Update.
3216 2018-07-03 Tom Tromey <tom@tromey.com>
3218 * common/ptid.c (ptid_get_pid): Remove.
3219 * common/ptid.h (ptid_get_pid): Don't declare.
3220 * aarch64-linux-nat.c: Update.
3221 * ada-lang.c: Update.
3222 * aix-thread.c: Update.
3223 * alpha-bsd-nat.c: Update.
3224 * amd64-fbsd-nat.c: Update.
3225 * amd64-linux-nat.c: Update.
3226 * arm-linux-nat.c: Update.
3227 * arm-nbsd-nat.c: Update.
3229 * break-catch-syscall.c: Update.
3230 * breakpoint.c: Update.
3231 * bsd-uthread.c: Update.
3232 * corelow.c: Update.
3234 * darwin-nat.c: Update.
3235 * fbsd-nat.c: Update.
3236 * fbsd-tdep.c: Update.
3238 * gnu-nat.c: Update.
3239 * hppa-nbsd-nat.c: Update.
3240 * hppa-obsd-nat.c: Update.
3241 * i386-fbsd-nat.c: Update.
3242 * ia64-linux-nat.c: Update.
3243 * inf-ptrace.c: Update.
3245 * inferior.c: Update.
3246 * inferior.h: Update.
3249 * linux-fork.c: Update.
3250 * linux-nat.c: Update.
3251 * linux-tdep.c: Update.
3252 * linux-thread-db.c: Update.
3253 * m68k-bsd-nat.c: Update.
3254 * mi/mi-interp.c: Update.
3255 * mi/mi-main.c: Update.
3256 * mips-linux-nat.c: Update.
3257 * mips-nbsd-nat.c: Update.
3258 * mips64-obsd-nat.c: Update.
3259 * nat/aarch64-linux-hw-point.c: Update.
3260 * nat/aarch64-linux.c: Update.
3261 * nat/linux-btrace.c: Update.
3262 * nat/linux-osdata.c: Update.
3263 * nat/linux-procfs.c: Update.
3264 * nat/x86-linux-dregs.c: Update.
3265 * nto-procfs.c: Update.
3266 * obsd-nat.c: Update.
3267 * ppc-linux-nat.c: Update.
3268 * ppc-nbsd-nat.c: Update.
3269 * ppc-obsd-nat.c: Update.
3270 * proc-service.c: Update.
3272 * python/py-inferior.c: Update.
3273 * python/py-infthread.c: Update.
3274 * ravenscar-thread.c: Update.
3276 * remote-sim.c: Update.
3278 * rs6000-nat.c: Update.
3279 * s390-linux-nat.c: Update.
3280 * sh-nbsd-nat.c: Update.
3281 * sol-thread.c: Update.
3282 * sparc-nat.c: Update.
3283 * sparc64-tdep.c: Update.
3284 * spu-linux-nat.c: Update.
3285 * spu-tdep.c: Update.
3286 * target-debug.h: Update.
3289 * tid-parse.c: Update.
3290 * tracefile-tfile.c: Update.
3291 * vax-bsd-nat.c: Update.
3292 * windows-nat.c: Update.
3293 * x86-linux-nat.c: Update.
3294 * x86-nat.c: Update.
3296 2018-07-03 Tom Tromey <tom@tromey.com>
3298 * common/ptid.c (pid_to_ptid): Remove.
3299 * common/ptid.h (pid_to_ptid): Don't declare.
3300 * aix-thread.c: Update.
3301 * arm-linux-nat.c: Update.
3302 * common/ptid.c: Update.
3303 * common/ptid.h: Update.
3304 * corelow.c: Update.
3306 * darwin-nat.c: Update.
3307 * fbsd-nat.c: Update.
3308 * fork-child.c: Update.
3309 * gnu-nat.c: Update.
3310 * go32-nat.c: Update.
3311 * inf-ptrace.c: Update.
3313 * inferior.c: Update.
3315 * linux-fork.c: Update.
3316 * linux-nat.c: Update.
3317 * nat/aarch64-linux-hw-point.c: Update.
3318 * nat/fork-inferior.c: Update.
3319 * nat/x86-linux-dregs.c: Update.
3320 * nto-procfs.c: Update.
3321 * obsd-nat.c: Update.
3323 * progspace.c: Update.
3325 * rs6000-nat.c: Update.
3326 * s390-linux-nat.c: Update.
3327 * sol-thread.c: Update.
3328 * spu-linux-nat.c: Update.
3331 * tracefile-tfile.c: Update.
3332 * windows-nat.c: Update.
3334 2018-07-03 Tom Tromey <tom@tromey.com>
3336 * common/ptid.h (ptid_build): Don't declare.
3337 * common/ptid.c (ptid_build): Remove.
3338 * aix-thread.c: Update.
3339 * bsd-kvm.c: Update.
3340 * bsd-uthread.c: Update.
3341 * common/agent.c: Update.
3342 * common/ptid.c: Update.
3343 * common/ptid.h: Update.
3344 * corelow.c: Update.
3345 * darwin-nat.c: Update.
3346 * fbsd-nat.c: Update.
3347 * gnu-nat.c: Update.
3348 * linux-fork.c: Update.
3349 * linux-nat.c: Update.
3350 * linux-thread-db.c: Update.
3351 * nat/linux-osdata.c: Update.
3352 * nat/linux-procfs.c: Update.
3353 * nto-procfs.c: Update.
3354 * obsd-nat.c: Update.
3355 * proc-service.c: Update.
3357 * ravenscar-thread.c: Update.
3358 * remote-sim.c: Update.
3360 * sol-thread.c: Update.
3362 * windows-nat.c: Update.
3364 2018-07-03 Tom Tromey <tom@tromey.com>
3366 * infrun.c (follow_exec): Use exit_inferior_silent.
3367 * inferior.c (exit_inferior_num_silent): Remove.
3368 * inferior.h (exit_inferior_num_silent): Don't declare.
3370 2018-07-03 Tom Tromey <tom@tromey.com>
3373 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3374 inferior_ptid on error.
3376 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3377 Simon Marchi <simon.marchi@polymtl.ca>
3380 * disasm.h (gdb_disassembler): Add
3381 `m_disassembler_options_holder'. member
3382 * disasm.c (get_all_disassembler_options): New function.
3383 (gdb_disassembler::gdb_disassembler): Use it.
3384 (gdb_buffered_insn_length_init_dis): Likewise.
3385 (gdb_buffered_insn_length): Adjust accordingly.
3386 (set_disassembler_options): Handle options with arguments.
3387 (show_disassembler_options_sfunc): Likewise. Add a leading new
3388 line if showing options with descriptions.
3389 (disassembler_options_completer): Adapt to using the
3390 `disasm_options_and_args_t' structure.
3391 * mips-tdep.c (mips_disassembler_options): New variable.
3392 (mips_disassembler_options_o32): Likewise.
3393 (mips_disassembler_options_n32): Likewise.
3394 (mips_disassembler_options_n64): Likewise.
3395 (gdb_print_insn_mips): Don't set `disassembler_options'.
3396 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3398 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3399 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3400 `gdbarch_disassembler_options_implicit' and
3401 `gdbarch_valid_disassembler_options'.
3402 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3403 `disasm_options_and_args_t' structure.
3404 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3406 (valid_disassembler_options): Switch from `disasm_options_t' to
3407 the `disasm_options_and_args_t' structure.
3408 * NEWS: Document `set disassembler-options' support for the MIPS
3410 * gdbarch.h: Regenerate.
3411 * gdbarch.c: Regenerate.
3413 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3415 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3417 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3419 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3420 parameter in call to amd64_target_description.
3421 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3422 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3423 (amd64fbsd_init_abi): Likewise.
3424 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3425 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3426 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3427 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3429 2018-06-29 Pedro Alves <palves@redhat.com>
3431 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3432 "segments" parameter.
3433 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3434 (_initialize_amd64_tdep): Update call to
3435 amd64_create_target_description.
3436 (amd64_target_description): Add "segments" parameter. Adjust
3437 the implementation to use it.
3438 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3439 call to amd64_create_target_description.
3440 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3441 * gdb/arch/amd64.h (amd64_create_target_description): Add
3442 "segments" register.
3443 * gdb/arch/amd64.c (amd64_create_target_description): Add
3444 "segments" parameter. Call create_feature_i386_64bit_segments
3445 only if SEGMENTS is true.
3446 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3447 call to amd64_create_target_description.
3449 2018-06-29 Pedro Alves <palves@redhat.com>
3451 * thread.c (thread_target_id_str): New, factored out from ...
3452 (print_thread_info_1): ... here. Use it to compute the max
3453 "Target Id" column width.
3455 2018-06-29 Pedro Alves <palves@redhat.com>
3457 * remote.c (remote_target::extra_thread_info): Delete
3458 'display_buf' and 'n' locals. from the cache, regardless of
3459 packet mechanims is in use. Use cache for qThreadExtra and qP
3462 2018-06-29 Pedro Alves <palves@redhat.com>
3464 * blockframe.c (find_pc_sect_containing_function): New function.
3465 * breakpoint.c (print_breakpoint_location): Don't call
3466 find_pc_sect_function.
3467 * linespec.c (create_sals_line_offset): Record the location's
3469 * linespec.c (convert_address_location_to_sals): Fill in sal's
3470 symbol with find_pc_sect_containing_function.
3471 * symtab.c (find_function_start_sal): Rename to ...
3472 (find_function_start_sal_1): ... this.
3473 (find_function_start_sal): Reimplement as wrapper around
3474 find_function_start_sal_1, and use
3475 find_pc_sect_containing_function to fill in the sal's symbol.
3476 (find_function_start_sal(symbol*, bool)): Adjust.
3477 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3479 (find_pc_sect_containing_function): Declare.
3481 2018-06-29 Pedro Alves <palves@redhat.com>
3483 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3484 true if the the location has no symbol.
3486 2018-06-28 Tom Tromey <tom@tromey.com>
3488 * NEWS: Mention --enable-codesign.
3489 * silent-rules.mk (ECHO_SIGN): New variable.
3490 * configure.ac: Add --enable-codesign.
3491 * configure: Rebuild.
3492 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3493 (gdb$(EXEEXT)): Optionally invoke codesign.
3495 2018-06-28 Pedro Alves <palves@redhat.com>
3497 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3499 (switch_to_thread_no_regs): Adjust comment.
3500 * infcmd.c (stop_pc): Delete.
3501 (post_create_inferior, info_program_command): Replace references
3502 to stop_pc with references to thread_info->suspend.stop_pc.
3503 * inferior.h (stop_pc): Delete declaration.
3504 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3505 (handle_inferior_event_1, handle_signal_stop)
3506 (process_event_stop_test, keep_going_stepped_thread)
3507 (handle_step_into_function, handle_step_into_function_backward)
3508 (print_stop_location): Replace references to stop_pc with
3509 references to thread_info->suspend.stop_pc.
3510 (struct infcall_suspend_state) <stop_pc>: Delete field.
3511 (save_infcall_suspend_state, restore_infcall_suspend_state):
3512 Remove references to inf_stat->stop_pc.
3513 * linux-fork.c (fork_load_infrun_state): Likewise.
3514 * record-btrace.c (record_btrace_set_replay): Likewise.
3515 * record-full.c (record_full_goto_entry): Likewise.
3516 * remote.c (print_one_stopped_thread): Likewise.
3517 * target.c (target_resume): Extend comment.
3518 * thread.c (set_executing_thread): New.
3519 (set_executing): Use it.
3520 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3521 Remove references to stop_pc.
3523 2018-06-28 Pedro Alves <palves@redhat.com>
3525 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3526 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3528 2018-06-28 Tom Tromey <tom@tromey.com>
3530 * coffread.c (coff_symfile_finish): Update.
3531 * xcoffread.c (xcoff_symfile_finish): Update.
3532 * elfread.c (elf_symfile_finish): Update.
3533 * symfile.h (dwarf2_free_objfile): Don't declare.
3534 * dwarf2read.c (_initialize_dwarf2_read): Use
3535 register_objfile_data_with_cleanup.
3536 (dwarf2_free_objfile): Now static. Change signature.
3538 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3540 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3541 option "-o" to add-symbol-file-load to add an offset to each
3542 section's load address.
3543 * symfile.c (set_objfile_default_section_offset): New function.
3545 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3547 * symfile.c (add_symbol_file_command): Make sure that sections
3548 with the same name are sorted in the same order.
3550 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3552 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3553 require the second argument. If omitted, load sections at the
3554 addresses specified in the file.
3556 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3558 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3559 (_initialize_symfile): Add option "-o" to symbol-file to add an
3560 offset to each section of the symbol file.
3562 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3564 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3566 2018-06-27 Tom Tromey <tom@tromey.com>
3568 * stack.c (_initialize_stack): Update "func" help text.
3570 2018-06-27 Tom Tromey <tom@tromey.com>
3572 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3574 (unwind_infopy_str, pyuw_create_unwind_info)
3575 (unwind_infopy_add_saved_register, pyuw_sniffer)
3576 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3578 (struct saved_reg): Add constructor.
3579 <value>: Now a gdbpy_ref<>.
3581 2018-06-27 Tom Tromey <tom@tromey.com>
3583 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3585 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3587 * gdb-gdb.py.in: Format using autopep8.
3589 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3591 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3592 (type_lookup_function): Recognize CORE_ADDR values.
3594 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3596 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3599 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3601 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3604 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3606 * gdb-gdb.py: Move to...
3607 * gdb-gdb.py.in: ... here.
3608 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3609 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3611 (distclean): Remove gdb-gdb.py when cleaning.
3612 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3613 * configure: Re-generate.
3615 2018-06-27 Pedro Alves <palves@redhat.com>
3617 * proc-service.c (get_ps_regcache): New.
3618 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3619 (ps_lsetfpregs): Use it.
3621 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3624 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3625 (dwarf_decode_lines_1): Adjust.
3627 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3629 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3631 <info_proc>: Likewise.
3633 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3635 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3636 to windows_fetch_one_register, and only handle the case of
3637 fetching one register. Move the code that reloads the context
3638 and iterates over all registers if R is negative to...
3639 (windows_nat_target::fetch_registers): ... here.
3640 (do_windows_store_inferior_registers): Rename to
3641 windows_store_one_register, and only handle the case of storing
3642 one register. Move the code that handles the case where r is
3644 (windows_nat_target::store_registers) ... here.
3646 2018-06-26 Tom Tromey <tom@tromey.com>
3649 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3650 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3652 (rust_internal_print_type): Add podata parameter.
3653 (rust_print_type): Update.
3655 2018-06-26 Tom Tromey <tom@tromey.com>
3657 * typeprint.h (struct print_offset_data) <update, finish,
3658 maybe_print_hole>: New methods.
3659 <indentation>: New constant.
3660 * typeprint.c (print_offset_data::indentation): Define.
3661 (print_offset_data::maybe_print_hole, print_offset_data::update)
3662 (print_offset_data::finish): Move from c-typeprint.c and rename.
3663 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3664 (print_spaces_filtered_with_print_options): Update.
3665 (c_print_type_union_field_offset, maybe_print_hole)
3666 (c_print_type_struct_field_offset): Move to typeprint.c and
3668 (c_type_print_base_struct_union): Update.
3670 2018-06-25 Pedro Alves <palves@redhat.com>
3672 * gdbthread.h (thread_info_ref, delete_thread)
3673 (delete_thread_silent, first_thread_of_inferior)
3674 (any_thread_of_inferior, switch_to_thread)
3675 (enable_thread_stack_temporaries)
3676 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3677 (get_last_thread_stack_temporary)
3678 (value_in_thread_stack_temporaries, can_access_registers_thread):
3679 Spell out "struct thread_info" instead of just "thread_info".
3680 * inferior.h (notice_new_inferior): Likewise.
3682 2018-06-25 Pedro Alves <palves@redhat.com>
3684 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3685 pass thread_info pointer to delete_thread.
3686 (windows_nat_target::detach): Pass inferior pointer to
3688 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3690 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3691 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3692 and pass a thread_info pointer to delete_thread.
3693 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3694 pass thread_info pointer to delete_thread.
3695 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3696 delete_thread_silent call.
3697 * procfs.c (procfs_target::detach): Pass inferior pointer to
3699 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3700 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3701 delete_thread_silent call.
3702 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3703 pass thread_info pointer to delete_thread.
3704 (windows_nat_target::detach): Pass inferior pointer to
3707 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3709 * regcache.c (readable_regcache::read_part): Fix asserts.
3710 (reg_buffer::raw_collect_part): New function.
3711 (regcache::write_part): Fix asserts.
3712 (reg_buffer::raw_supply_part): New function.
3713 (regcache::transfer_regset_register): New helper function.
3714 (regcache::transfer_regset): Call new functions.
3715 (regcache_supply_regset): Use gdb_byte*.
3716 (regcache::supply_regset): Likewise.
3717 (regcache_collect_regset): Likewise.
3718 (regcache::collect_regset): Likewise.
3719 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3720 (reg_buffer::raw_supply_part): Likewise.
3721 (regcache::transfer_regset_register): Likewise.
3722 (regcache::transfer_regset): Use gdb_byte*.
3724 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3726 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3728 2018-06-21 Pedro Alves <palves@redhat.com>
3730 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3731 instead of a ptid_t. All callers adjusted.
3732 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3734 (print_ada_task_info, display_current_task_id, task_command_1):
3736 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3738 (breakpoint_kind): Adjust.
3739 (remove_breakpoints_pid): Rename to ...
3740 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3741 pointer. All callers adjusted.
3742 (bpstat_clear_actions): Use inferior_thread.
3743 (get_bpstat_thread): New.
3744 (bpstat_do_actions): Use it.
3745 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3746 to take a thread_info pointer. All callers adjusted.
3747 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3748 (breakpoint_re_set_thread): Use inferior_thread.
3749 * breakpoint.h (struct inferior): Forward declare.
3750 (bpstat_stop_status): Update.
3751 (remove_breakpoints_pid): Delete.
3752 (remove_breakpoints_inf): New.
3753 * bsd-uthread.c (bsd_uthread_target::wait)
3754 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3755 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3756 (maint_btrace_packet_history_cmd)
3757 (maint_btrace_clear_packet_history_cmd): Adjust.
3758 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3760 * cli/cli-interp.c: Include "inferior.h".
3761 * common/refcounted-object.h (struct
3762 refcounted_object_ref_policy): New.
3763 * compile/compile-object-load.c: Include gdbthread.h.
3764 (store_regs): Use inferior_thread.
3765 * corelow.c (core_target::close): Use current_inferior.
3766 (core_target_open): Adjust to use first_thread_of_inferior and use
3767 the current inferior.
3768 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3769 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3770 <thread>: ... this new field. All references adjusted.
3771 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3772 Take a thread_info pointer instead of a ptid_t.
3773 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3774 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3775 thread_info pointer instead of a ptid_t.
3776 * elfread.c: Include "inferior.h".
3777 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3778 Use inferior_thread.
3779 * eval.c (evaluate_subexp): Likewise.
3780 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3782 * gdb_proc_service.h (struct thread_info): Forward declare.
3783 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3784 <thread>: ... this new field. All references adjusted.
3785 * gdbarch.h, gdbarch.c: Regenerate.
3786 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3787 'thread' parameter. All implementations and callers adjusted.
3788 * gdbthread.h (thread_info) <set_running>: New method.
3789 (delete_thread, delete_thread_silent): Take a thread_info pointer
3791 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3792 (first_thread_of_process): Delete, replaced by ...
3793 (first_thread_of_inferior): ... this new function. All callers
3795 (any_live_thread_of_process): Delete, replaced by ...
3796 (any_live_thread_of_inferior): ... this new function. All callers
3798 (switch_to_thread, switch_to_no_thread): Declare.
3799 (is_executing): Delete.
3800 (enable_thread_stack_temporaries): Update comment.
3801 <enable_thread_stack_temporaries>: Take a thread_info pointer
3802 instead of a ptid_t. Incref the thread.
3803 <~enable_thread_stack_temporaries>: Decref the thread.
3806 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3807 (get_last_thread_stack_temporary)
3808 (value_in_thread_stack_temporaries, can_access_registers_thread):
3809 Take a thread_info pointer instead of a ptid_t. All callers
3811 * infcall.c (get_call_return_value): Use inferior_thread.
3812 (run_inferior_call): Work with thread pointers instead of ptid_t.
3813 (call_function_by_hand_dummy): Work with thread pointers instead
3814 of ptid_t. Use thread_info_ref.
3815 * infcmd.c (proceed_thread_callback): Access thread's state
3817 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3818 access thread's state directly.
3819 (continue_command): Use inferior_thread.
3820 (info_program_command): Use find_thread_ptid and access thread
3822 (proceed_after_attach_callback): Use thread state directly.
3823 (notice_new_inferior): Take a thread_info pointer instead of a
3824 ptid_t. All callers adjusted.
3825 (exit_inferior): Take an inferior pointer instead of a pid. All
3827 (exit_inferior_silent): New.
3828 (detach_inferior): Delete.
3829 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3830 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3831 (detach_inferior_command, kill_inferior_command): Use
3832 find_inferior_id instead of valid_gdb_inferior_id and
3833 gdb_inferior_id_to_pid.
3834 (inferior_command): Use inferior and thread pointers.
3835 * inferior.h (struct thread_info): Forward declare.
3836 (notice_new_inferior): Take a thread_info pointer instead of a
3837 ptid_t. All callers adjusted.
3838 (detach_inferior): Delete declaration.
3839 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3840 instead of a pid. All callers adjusted.
3841 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3842 (valid_gdb_inferior_id): Delete.
3843 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3844 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3845 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3847 <inf>: ... this new field.
3848 <step_ptid>: Delete, replaced by ...
3849 <step_thread>: ... this new field.
3850 (get_displaced_stepping_state): Take an inferior pointer instead
3851 of a pid. All callers adjusted.
3852 (displaced_step_in_progress_any_inferior): Adjust.
3853 (displaced_step_in_progress_thread): Take a thread pointer instead
3854 of a ptid_t. All callers adjusted.
3855 (displaced_step_in_progress, add_displaced_stepping_state): Take
3856 an inferior pointer instead of a pid. All callers adjusted.
3857 (get_displaced_step_closure_by_addr): Adjust.
3858 (remove_displaced_stepping_state): Take an inferior pointer
3859 instead of a pid. All callers adjusted.
3860 (displaced_step_prepare_throw, displaced_step_prepare)
3861 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3862 All callers adjusted.
3863 (start_step_over): Adjust.
3864 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3865 displaced step queue.
3866 (do_target_resume): Adjust.
3867 (fetch_inferior_event): Use inferior_thread.
3868 (context_switch, get_inferior_stop_soon): Take an
3869 execution_control_state pointer instead of a ptid_t. All callers
3871 (switch_to_thread_cleanup): Delete.
3872 (stop_all_threads): Use scoped_restore_current_thread.
3873 * inline-frame.c: Include "gdbthread.h".
3874 (inline_state) <inline_state>: Take a thread pointer instead of a
3875 ptid_t. All callers adjusted.
3876 <ptid>: Delete, replaced by ...
3877 <thread>: ... this new field.
3878 (find_inline_frame_state): Take a thread pointer instead of a
3879 ptid_t. All callers adjusted.
3880 (skip_inline_frames, step_into_inline_frame)
3881 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3882 pointer instead of a ptid_t. All callers adjusted.
3883 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3884 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3885 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3887 * linux-nat.c (get_detach_signal): Likewise.
3888 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3889 (thread_db_notice_clone): Adjust.
3890 (thread_db_find_new_threads_silently)
3891 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3892 a thread pointer instead of a ptid_t. All callers adjusted.
3893 * mi/mi-cmd-var.c: Include "inferior.h".
3894 (mi_cmd_var_update_iter): Update to use thread pointers.
3895 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3897 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3899 (mi_output_running): ... this new function.
3900 (mi_on_resume_1): Adjust to use it.
3901 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3902 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3904 (interrupt_thread_callback): : Adjust to use thread and inferior
3906 * proc-service.c: Include "gdbthread.h".
3907 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3908 * progspace-and-thread.c: Include "inferior.h".
3909 * progspace.c: Include "inferior.h".
3910 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3911 hold a reference to an inferior_object.
3912 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3914 * python/py-inferior.c (struct inferior_object): Give the type a
3915 tag name instead of a typedef.
3916 (python_on_normal_stop): No need to check if the current thread is
3918 (inferior_to_inferior_object): Change return type to
3919 inferior_object. All callers adjusted.
3920 (find_thread_object): Delete, bits factored out to ...
3921 (thread_to_thread_object): ... this new function.
3922 * python/py-infthread.c (create_thread_object): Use
3923 inferior_to_inferior_object.
3924 (thpy_is_stopped): Use thread pointer directly.
3925 (gdbpy_selected_thread): Use inferior_thread.
3926 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3927 field, replaced with ...
3928 <thread>: ... this new field. All users adjusted.
3929 (btpy_insn_or_gap_new): Drop const.
3930 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3932 * python/py-record.c: Include "gdbthread.h".
3933 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3934 a ptid_t. All callers adjusted.
3935 (gdbpy_current_recording): Use inferior_thread.
3936 * python/py-record.h (recpy_record_object) <ptid>: Delete
3937 field, replaced with ...
3938 <thread>: ... this new field. All users adjusted.
3939 (recpy_element_object) <ptid>: Delete
3940 field, replaced with ...
3941 <thread>: ... this new field. All users adjusted.
3942 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3943 a ptid_t. All callers adjusted.
3944 * python/py-threadevent.c: Include "gdbthread.h".
3945 (get_event_thread): Use thread_to_thread_object.
3946 * python/python-internal.h (struct inferior_object): Forward
3948 (find_thread_object, find_inferior_object): Delete declarations.
3949 (thread_to_thread_object, inferior_to_inferior_object): New
3951 * record-btrace.c: Include "inferior.h".
3952 (require_btrace_thread): Use inferior_thread.
3953 (record_btrace_frame_sniffer)
3954 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3955 (get_thread_current_frame): Use scoped_restore_current_thread and
3957 (get_thread_current_frame): Use thread pointer directly.
3958 (record_btrace_replay_at_breakpoint): Use thread's inferior
3960 * record-full.c: Include "inferior.h".
3961 * regcache.c: Include "gdbthread.h".
3962 (get_thread_arch_regcache): Use the inferior's address space
3964 (get_thread_regcache, registers_changed_thread): New.
3965 * regcache.h (get_thread_regcache(thread_info *thread)): New
3967 (registers_changed_thread): New.
3968 (remote_target) <remote_detach_1>: Swap order of parameters.
3969 (remote_add_thread): <remote_add_thread>: Return the new thread.
3970 (get_remote_thread_info(ptid_t)): New overload.
3971 (remote_target::remote_notice_new_inferior): Use thread pointers
3973 (remote_target::process_initial_stop_replies): Use
3974 thread_info::set_running.
3975 (remote_target::remote_detach_1, remote_target::detach)
3976 (extended_remote_target::detach): Adjust.
3977 * stack.c (frame_show_address): Use inferior_thread.
3978 * target-debug.h (target_debug_print_thread_info_pp): New.
3979 * target-delegates.c: Regenerate.
3980 * target.c (default_thread_address_space): Delete.
3981 (memory_xfer_partial_1): Use current_inferior.
3982 (target_detach): Use current_inferior.
3983 (target_thread_address_space): Delete.
3984 (generic_mourn_inferior): Use current_inferior.
3985 * target.h (struct target_ops) <thread_address_space>: Delete.
3986 (target_thread_address_space): Delete.
3987 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
3989 (delete_thread_1, delete_thread, delete_thread_silent): Take a
3990 thread pointer instead of a ptid_t. Adjust all callers.
3991 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
3992 (first_thread_of_process): Delete, replaced by ...
3993 (first_thread_of_inferior): ... this new function. All callers
3995 (any_thread_of_process): Rename to ...
3996 (any_thread_of_inferior): ... this, and take an inferior pointer.
3997 (any_live_thread_of_process): Rename to ...
3998 (any_live_thread_of_inferior): ... this, and take an inferior
4000 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4001 (value_in_thread_stack_temporaries)
4002 (get_last_thread_stack_temporary): Take a thread pointer instead
4003 of a ptid_t. Adjust all callers.
4004 (thread_info::set_running): New.
4005 (validate_registers_access): Use inferior_thread.
4006 (can_access_registers_ptid): Rename to ...
4007 (can_access_registers_thread): ... this, and take a thread
4009 (print_thread_info_1): Adjust to compare thread pointers instead
4011 (switch_to_no_thread, switch_to_thread): Make extern.
4012 (scoped_restore_current_thread::~scoped_restore_current_thread):
4013 Use m_thread pointer directly.
4014 (scoped_restore_current_thread::scoped_restore_current_thread):
4015 Use inferior_thread.
4016 (thread_command): Use thread pointer directly.
4017 (thread_num_make_value_helper): Use inferior_thread.
4018 * top.c (execute_command): Use inferior_thread.
4019 * tui/tui-interp.c: Include "inferior.h".
4020 * varobj.c (varobj_create): Use inferior_thread.
4021 (value_of_root_1): Use find_thread_global_id instead of
4022 global_thread_id_to_ptid.
4024 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4026 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4028 (regcache::write_part): Likewise.
4029 (readable_regcache::cooked_read_part): Update comment.
4030 (readable_regcache::cooked_write_part): Likewise.
4031 * regcache.h: (readable_regcache::read_part): Likewise.
4032 (regcache::write_part): Likewise.
4034 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4035 Dirk Schubert <dirk.schubert@arm.com>
4037 * aarch64-linux-nat.c (post_attach): New.
4038 (aarch64_linux_nat_target::post_attach): Override post_attach to
4039 record the number of hardware debug registers.
4041 2018-06-20 Tom Tromey <tom@tromey.com>
4043 * python/py-param.c (add_setshow_generic): Make parameters const.
4044 (parmpy_init): Update.
4046 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4048 * regcache.h (regcache_cooked_read_ftype): Rename to...
4049 (register_read_ftype): ...this, change type to function_view.
4050 (class reg_buffer) <save>: Remove src parameter.
4051 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4052 parameter non-const in first overload. Remove src parameter in
4054 * regcache.c (do_cooked_read): Remove.
4055 (readonly_detached_regcache::readonly_detached_regcache): Make
4056 parameter non-const, adjust call to other constructor.
4057 (reg_buffer::save): Remove src parameter.
4058 * frame.c (do_frame_register_read): Remove.
4059 (frame_save_as_regcache): Use lambda function.
4060 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4061 parameter to ppu2spu_data *.
4062 (ppu2spu_sniffer): Use lambda function.
4064 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4066 * record-full.c (record_full_target::insert_breakpoint): Remove
4067 "struct" keyword, add const.
4069 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4071 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4072 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4073 * configure.ac: Remove AC_PREREQ, add missing quoting.
4074 * gnulib/configure.ac: Modernize usage of
4075 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4076 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4077 (AUTOMAKE_VERSION): Bump to 1.15.1.
4078 * configure: Re-generate.
4079 * config.in: Re-generate.
4080 * aclocal.m4: Re-generate.
4081 * gnulib/aclocal.m4: Re-generate.
4082 * gnulib/config.in: Re-generate.
4083 * gnulib/configure: Re-generate.
4084 * gnulib/import/Makefile.in: Re-generate.
4086 2018-06-19 Pedro Alves <palves@redhat.com>
4088 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4089 (lookup_minimal_symbol_by_pc_section): ... here with
4090 gdb_assert_not_reached added.
4092 2018-06-19 Pedro Alves <palves@redhat.com>
4094 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4095 parameter with a block parameter. Compare location's block symbol
4096 with the frame's block instead of addresses.
4097 (skip_inline_frames): Pass the current block instead of the
4098 frame's address. Break out as soon as we determine the frame
4099 should not be skipped.
4101 2018-06-18 Tom Tromey <tom@tromey.com>
4103 * solib-aix.c (solib_aix_get_section_offsets): Return
4105 (solib_aix_solib_create_inferior_hook): Update.
4107 2018-06-18 Tom Tromey <tom@tromey.com>
4109 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4111 2018-06-18 Tom Tromey <tom@tromey.com>
4113 * solib-frv.c (frv_relocate_main_executable): Use
4115 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4118 2018-06-18 Tom Tromey <tom@tromey.com>
4120 * objfiles.h (inhibit_section_map_updates): Update.
4121 (resume_section_map_updates, resume_section_map_updates_cleanup):
4123 * solib-svr4.c (svr4_handle_solib_event): Update.
4124 * objfiles.c (inhibit_section_map_updates): Return
4125 scoped_restore_tmpl<int>.
4126 (resume_section_map_updates, resume_section_map_updates_cleanup):
4129 2018-06-18 Tom Tromey <tom@tromey.com>
4131 * valprint.h (read_string): Update.
4132 * valprint.c (read_string): Change type of "buffer".
4133 (val_print_string): Update.
4134 * python/py-value.c (valpy_string): Update.
4135 * language.h (struct language_defn) <la_get_string>: Change
4137 (default_get_string, c_get_string): Update.
4138 * language.c (default_get_string): Change type of "buffer".
4139 * guile/scm-value.c (gdbscm_value_to_string): Update.
4140 * c-lang.c (c_get_string): Change type of "buffer".
4142 2018-06-18 Tom Tromey <tom@tromey.com>
4144 * ser-mingw.c (struct pipe_state_destroyer): New.
4145 (pipe_state_up): New typedef.
4146 (cleanup_pipe_state): Remove.
4147 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4149 2018-06-18 Tom Tromey <tom@tromey.com>
4151 * rust-lang.h (rust_yyerror): Don't declare.
4152 * rust-lang.c (rust_language_defn): Update.
4153 * rust-exp.y (yyerror): Now static.
4154 * parse.c (parse_exp_in_context_1): Update.
4155 * p-lang.h (p_yyerror): Don't declare.
4156 * p-lang.c (p_language_defn): Update.
4157 * p-exp.y (yyerror): Now static.
4158 * opencl-lang.c (opencl_language_defn): Update.
4159 * objc-lang.c (objc_language_defn): Update.
4160 * m2-lang.h (m2_yyerror): Don't declare.
4161 * m2-lang.c (m2_language_defn): Update.
4162 * m2-exp.y (yyerror): Now static.
4163 * language.h (struct language_defn) <la_error>: Remove.
4164 * language.c (unk_lang_error): Remove.
4165 (unknown_language_defn, auto_language_defn): Remove.
4166 * go-lang.h (go_yyerror): Don't declare.
4167 * go-lang.c (go_language_defn): Update.
4168 * go-exp.y (yyerror): Now static.
4169 * f-lang.h (f_yyerror): Don't declare.
4170 * f-lang.c (f_language_defn): Update.
4171 * f-exp.y (yyerror): Now static.
4172 * d-lang.h (d_yyerror): Don't declare.
4173 * d-lang.c (d_language_defn): Update.
4174 * d-exp.y (yyerror): Now static.
4175 * c-lang.h (c_yyerror): Don't declare.
4176 * c-lang.c (c_language_defn, cplus_language_defn)
4177 (asm_language_defn, minimal_language_defn): Update.
4178 * c-exp.y (yyerror): Now static.
4179 * ada-lang.h (ada_yyerror): Don't declare.
4180 * ada-lang.c (ada_language_defn): Update.
4181 * ada-exp.y (yyerror): Now static.
4183 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4185 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4186 (store_sveregs_to_thread): Likewise.
4187 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4188 (aarch64_linux_store_inferior_registers): Likewise.
4189 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4191 (aarch64_sve_regs_copy_to_regcache): Likewise.
4192 (aarch64_sve_regs_copy_from_regcache): Likewise.
4193 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4195 (aarch64_sve_regs_copy_to_regcache): Likewise.
4196 (aarch64_sve_regs_copy_from_regcache): Likewise.
4197 (sve_context): Structure from Linux headers.
4198 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4199 (SVE_SIG_ZREG_SIZE): Likewise.
4200 (SVE_SIG_PREG_SIZE): Likewise.
4201 (SVE_SIG_FFR_SIZE): Likewise.
4202 (SVE_SIG_REGS_OFFSET): Likewise.
4203 (SVE_SIG_ZREGS_OFFSET): Likewise.
4204 (SVE_SIG_ZREG_OFFSET): Likewise.
4205 (SVE_SIG_ZREGS_SIZE): Likewise.
4206 (SVE_SIG_PREGS_OFFSET): Likewise.
4207 (SVE_SIG_PREG_OFFSET): Likewise.
4208 (SVE_SIG_PREGS_SIZE): Likewise.
4209 (SVE_SIG_FFR_OFFSET): Likewise.
4210 (SVE_SIG_REGS_SIZE): Likewise.
4211 (SVE_SIG_CONTEXT_SIZE): Likewise.
4212 (SVE_PT_REGS_MASK): Likewise.
4213 (SVE_PT_REGS_FPSIMD): Likewise.
4214 (SVE_PT_REGS_SVE): Likewise.
4215 (SVE_PT_VL_INHERIT): Likewise.
4216 (SVE_PT_VL_ONEXEC): Likewise.
4217 (SVE_PT_REGS_OFFSET): Likewise.
4218 (SVE_PT_FPSIMD_OFFSET): Likewise.
4219 (SVE_PT_FPSIMD_SIZE): Likewise.
4220 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4221 (SVE_PT_SVE_PREG_SIZE): Likewise.
4222 (SVE_PT_SVE_FFR_SIZE): Likewise.
4223 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4224 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4225 (__SVE_SIG_TO_PT): Likewise.
4226 (SVE_PT_SVE_OFFSET): Likewise.
4227 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4228 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4229 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4230 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4231 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4232 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4233 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4234 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4235 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4236 (SVE_PT_SVE_SIZE): Likewise.
4237 (SVE_PT_SIZE): Likewise.
4238 (HAS_SVE_STATE): New define.
4240 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4242 * nat/aarch64-sve-linux-sigcontext.h: New file.
4243 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4245 (SVE_VQ_MIN): Likewise.
4246 (SVE_VQ_MAX): Likewise.
4247 (SVE_VL_MIN): Likewise.
4248 (SVE_VL_MAX): Likewise.
4249 (SVE_NUM_ZREGS): Likewise.
4250 (SVE_NUM_PREGS): Likewise.
4251 (sve_vl_valid): Likewise.
4252 (struct user_sve_header): Likewise.
4254 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4255 Richard Bunt <Richard.Bunt@arm.com>
4257 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4258 was requested by GDB.
4260 2018-06-15 Tom de Vries <tdevries@suse.de>
4262 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4264 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4266 * gnulib/update-gnulib.sh: Print expected versions of
4269 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4271 * arch-utils.c (default_type_align): Use type_length_units.
4272 * gdbtypes.c (type_align): Use type_length_units.
4274 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4276 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4277 of 'define' command.
4279 2018-06-14 Tom de Vries <tdevries@suse.de>
4282 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4283 get_no_prettyformat_print_options.
4285 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4287 * sparc-nat.h: Include target.h.
4288 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4289 <fetch_registers>: Remove this argument in function call.
4290 <store_registers>: Remove this argument in function call, remove
4292 <low_forget_process>: Call sparc64_forget_process instead of
4293 sparc_forget_process.
4295 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4297 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4298 (procfs_target::make_corefile_notes): Adjust to new
4299 target_read_alloc return type.
4301 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4302 Stephen Roberts <stephen.roberts@arm.com>
4305 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4306 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4307 Move should_notify_stop local into more inner scope.
4309 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4310 Stephen Roberts <stephen.roberts@arm.com>
4313 * infrun.c (resume_1): Add call to mark_async_event_handler.
4315 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4317 * infrun.c (do_target_wait): Change old version of $pc printed.
4319 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4321 * dwarf2read.c (read_index_from_section): Rename to...
4322 (read_gdb_index_from_section): ... this, update all callers.
4323 (dwarf2_read_index): Rename to...
4324 (dwarf2_read_gdb_index): ... this, update all callers.
4326 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4328 * gdb/hppa-linux-nat.c
4329 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4330 hppa_linux_nat_target::fetch_registers.
4332 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4334 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4335 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4336 (AARCH64_DWARF_SVE_FFR): Likewise.
4337 (AARCH64_DWARF_SVE_P0): Likewise.
4338 (AARCH64_DWARF_SVE_Z0): Likewise.
4340 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4342 * common/common-regcache.h (raw_compare): New function.
4343 * regcache.c (regcache::raw_compare): Likewise.
4344 * regcache.h (regcache::raw_compare): New declaration.
4346 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4348 * common/common-regcache.h (reg_buffer_common): New structure.
4349 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4350 (reg_buffer::raw_supply): Likewise.
4351 (reg_buffer::raw_supply_integer): Likewise.
4352 (reg_buffer::raw_supply_zeroed): Likewise.
4353 (reg_buffer::raw_collect): Likewise.
4354 (reg_buffer::raw_collect_integer): Likewise.
4355 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4356 (reg_buffer::raw_supply): Likewise.
4357 (reg_buffer::raw_supply_integer): Likewise.
4358 (reg_buffer::raw_supply_zeroed): Likewise.
4359 (reg_buffer::raw_collect): Likewise.
4360 (reg_buffer::raw_collect_integer): Likewise.
4362 2018-06-10 Tom Tromey <tom@tromey.com>
4364 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4365 (class remote_state) <stop_reply_queue>: Now std::vector.
4366 (remote_state::~remote_state)
4367 (remote_target::stop_reply_queue_length): Update.
4368 (struct queue_iter_param, remove_child_of_pending_fork)
4369 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4370 (check_pending_event_prevents_wildcard_vcont_callback)
4371 (remove_stop_reply_for_inferior)
4372 (remove_stop_reply_of_remote_state)
4373 (remote_notif_remove_once_on_match)
4374 (stop_reply_match_ptid_and_ws)
4375 (remote_kill_child_of_pending_fork): Remove.
4376 (remote_target::remove_new_fork_children)
4377 (remote_target::check_pending_events_prevent_wildcard_vcont)
4378 (remote_target::discard_pending_stop_replies)
4379 (remote_target::discard_pending_stop_replies_in_queue)
4380 (remote_target::remote_notif_remove_queued_reply)
4381 (remote_target::queued_stop_reply)
4382 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4383 (remote_target::wait, remote_target::kill_new_fork_children)
4384 (remote_target::async): Update.
4386 2018-06-10 Tom Tromey <tom@tromey.com>
4388 * record-full.c (record_full_arch_list_cleanups): Remove.
4389 (record_full_message): Use try/catch.
4390 (record_full_wait_cleanups): Remove.
4391 (record_full_wait_1): Use try/catch.
4392 (record_full_restore): Likewise.
4394 2018-06-10 Tom Tromey <tom@tromey.com>
4396 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4397 declare VEC. Add constructor.
4398 <in_target_beneath>: Now bool.
4399 (record_full_breakpoints): Now a std::vector, static.
4400 (record_full_sync_record_breakpoints)
4401 (record_full_init_record_breakpoints)
4402 (record_full_target::insert_breakpoint)
4403 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4405 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4407 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4408 * serial.c (serial_interface_lookup): Remove struct keyword.
4410 2018-06-10 Tom Tromey <tom@tromey.com>
4412 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4414 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4416 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4418 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4419 "beneath" as a method.
4420 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4421 Use "beneath" as a method.
4423 2018-06-10 Tom Tromey <tom@tromey.com>
4425 * tracefile.c (struct trace_file_writer_deleter): New.
4426 <operator()>: Rename from trace_file_writer_xfree.
4427 (trace_file_writer_up): New typedef.
4428 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4430 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4432 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4433 <m_registers, m_register_status>: Change type to
4435 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4438 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4440 * common/common-regcache.h (enum register_status): Add
4441 underlying type "signed char".
4442 * regcache.h (reg_buffer) <m_register_status>: Change type to
4444 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4445 register_status instead of signed char.
4446 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4447 (reg_buffer::get_register_status): Remove cast.
4448 (readable_regcache::raw_read): Remove cast.
4449 (readable_regcache::cooked_read): Remove cast.
4451 2018-06-09 Tom Tromey <tom@tromey.com>
4453 * source.c (reverse_search_command, forward_search_command): Use
4456 2018-06-09 Tom Tromey <tom@tromey.com>
4458 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4459 (serial_ops_list): Now static, std::vector.
4460 (serial_interface_lookup, serial_add_interface): Update.
4462 2018-06-09 Tom Tromey <tom@tromey.com>
4464 * dwarf2read.c (process_cu_includes): Update.
4465 (process_full_comp_unit): Update.
4466 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4469 2018-06-08 Paul Koning <paul_koning@dell.com>
4473 * python/python.c (do_start_initialization):
4474 Avoid call to internal Python API.
4475 (init__gdb_module): New function.
4477 2018-06-08 Gary Benson <gbenson@redhat.com>
4479 * linux-thread-db.c (valprint.h): New include.
4480 (struct check_thread_db_info): New structure.
4481 (check_thread_db_on_load, tdb_testinfo): New static globals.
4482 (check_thread_db, check_thread_db_callback): New functions.
4483 (try_thread_db_load_1): Run integrity checks if requested.
4484 (maintenance_check_libthread_db): New function.
4485 (_initialize_thread_db): Register "maint check libthread-db"
4486 and "maint set/show check-libthread-db".
4487 * NEWS: Mention the above new commands.
4489 2018-06-08 Tom Tromey <tom@tromey.com>
4491 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4494 2018-06-08 Tom Tromey <tom@tromey.com>
4496 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4498 2018-06-08 Tom Tromey <tom@tromey.com>
4500 * common/btrace-common.h (struct btrace_data): Add constructor,
4501 destructor, move assignment operator.
4502 <empty, clear, fini>: New methods.
4503 <format>: Initialize.
4504 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4505 (btrace_data_empty): Don't declare.
4506 * common/btrace-common.c (btrace_data_init): Remove.
4507 (btrace_data::fini): Rename from btrace_data_fini.
4508 (btrace_data::empty): Rename from btrace_data_empty.
4509 (btrace_data::clear): Rename from btrace_data_clear. Return
4511 * btrace.h (make_cleanup_btrace_data): Don't declare.
4512 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4513 (parse_xml_btrace): Update.
4514 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4515 (maint_btrace_clear_packet_history_cmd): Update.
4517 2018-06-07 Pedro Alves <palves@redhat.com>
4519 * target.h (target_ops) <beneath>: Now a method. All references
4521 (class target_stack): New.
4522 * target.c (g_target_stack): New.
4523 (g_current_top_target): Delete.
4524 (current_top_target): Get the top target out of g_target_stack.
4525 (target_stack::push, target_stack::unpush): New.
4526 (push_target, unpush_target): Reimplement.
4527 (target_is_pushed): Reimplement in terms of g_target_stack.
4528 (target_ops::beneath, target_stack::find_beneath): New.
4530 2018-06-07 Pedro Alves <palves@redhat.com>
4532 * target.h (find_target_beneath): Delete declaration.
4533 * target.c (find_target_beneath): Delete definition.
4534 * aix-thread.c: All callers of find_target_beneath adjusted to
4535 call target_ops::beneath instead.
4536 * bsd-uthread.c: Likewise.
4537 * linux-thread-db.c: Likewise.
4538 * ravenscar-thread.c: Likewise.
4539 * sol-thread.c: Likewise.
4540 * spu-multiarch.c: Likewise.
4542 2018-06-07 Pedro Alves <palves@redhat.com>
4544 * target.h (target_ops) <beneath>: Now a method. All references
4546 (target_ops) <m_beneath>: New.
4547 * target.c (target_ops::beneath): New.
4548 * corelow.c: Adjust all references to target_ops::beneath.
4549 * linux-thread-db.c: Likewise.
4550 * make-target-delegates: Likewise.
4551 * record-btrace.c: Likewise.
4552 * record-full.c: Likewise.
4553 * remote.c: Likewise.
4554 * target.c: Likewise.
4555 * target-delegates.c: Regenerate.
4557 2018-06-07 Pedro Alves <palves@redhat.com>
4559 * target.h (target_stack): Delete.
4560 (current_top_target): Declare function.
4561 * target.c (target_stack): Delete.
4562 (g_current_top_target): New.
4563 (current_top_target): New function.
4564 * auxv.c: Use current_top_target instead of target_stack
4566 * avr-tdep.c: Likewise.
4567 * breakpoint.c: Likewise.
4568 * corefile.c: Likewise.
4569 * elfread.c: Likewise.
4571 * exceptions.c: Likewise.
4572 * frame.c: Likewise.
4573 * gdbarch-selftests.c: Likewise.
4574 * gnu-v3-abi.c: Likewise.
4575 * ia64-tdep.c: Likewise.
4576 * ia64-vms-tdep.c: Likewise.
4577 * infcall.c: Likewise.
4578 * infcmd.c: Likewise.
4579 * infrun.c: Likewise.
4580 * linespec.c: Likewise.
4581 * linux-tdep.c: Likewise.
4582 * minsyms.c: Likewise.
4583 * ppc-linux-nat.c: Likewise.
4584 * ppc-linux-tdep.c: Likewise.
4585 * procfs.c: Likewise.
4586 * regcache.c: Likewise.
4587 * remote.c: Likewise.
4588 * rs6000-tdep.c: Likewise.
4589 * s390-linux-nat.c: Likewise.
4590 * s390-tdep.c: Likewise.
4591 * solib-aix.c: Likewise.
4592 * solib-darwin.c: Likewise.
4593 * solib-dsbt.c: Likewise.
4594 * solib-spu.c: Likewise.
4595 * solib-svr4.c: Likewise.
4596 * solib-target.c: Likewise.
4597 * sparc-tdep.c: Likewise.
4598 * sparc64-tdep.c: Likewise.
4599 * spu-tdep.c: Likewise.
4600 * symfile.c: Likewise.
4601 * symtab.c: Likewise.
4602 * target-descriptions.c: Likewise.
4603 * target-memory.c: Likewise.
4604 * target.c: Likewise.
4605 * target.h: Likewise.
4606 * tracefile-tfile.c: Likewise.
4607 * tracepoint.c: Likewise.
4608 * valops.c: Likewise.
4609 * valprint.c: Likewise.
4610 * value.c: Likewise.
4611 * windows-tdep.c: Likewise.
4612 * mi/mi-main.c: Likewise.
4614 2018-06-07 Tom Tromey <tom@tromey.com>
4616 * valprint.h (build_address_symbolic): Declare.
4617 * printcmd.c (print_address_symbolic): Update.
4618 (build_address_symbolic): Change "name" and "filename" to
4620 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4622 * defs.h (build_address_symbolic): Remove declaration.
4624 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4626 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4627 (aarch64_vnv_type): Add function.
4628 (aarch64_pseudo_register_name): Add V regs for SVE.
4629 (aarch64_pseudo_register_type): Likewise.
4630 (aarch64_pseudo_register_reggroup_p): Likewise.
4631 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4632 (aarch64_pseudo_read_value): Add V regs for SVE.
4633 (aarch64_pseudo_write_2): Use V0 offset for SVE
4634 (aarch64_pseudo_write): Add V regs for SVE.
4635 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4637 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4639 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4640 (sve_vl_from_vq): Likewise.
4642 2018-06-05 Tom Tromey <tom@tromey.com>
4644 * cli/cli-cmds.c (show_version): Update.
4645 * top.c (print_gdb_version): Add "interactive" parameter.
4647 * main.c (captured_main_1): Update.
4648 * top.h (print_gdb_version): Add "interactive" parameter and a
4651 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4653 * common/enum-flags.h: Add trailing semicolon to example in
4656 2018-06-05 Tom Tromey <tom@tromey.com>
4659 * NEWS: Add entry about pager.
4660 * utils.c (pagination_disabled_for_command): New global.
4661 (prompt_for_continue): Allow "c" response to prompt.
4662 (reinitialize_more_filter): Clear
4663 pagination_disabled_for_command.
4664 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4666 2018-06-04 Tom Tromey <tom@tromey.com>
4668 * ada-lang.h (ada_lookup_symbol_list): Update.
4669 * ada-lang.c (resolve_subexp): Update.
4670 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4672 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4673 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4674 results parameter to std::vector.
4675 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4677 * ada-exp.y (block_lookup): Update.
4678 (select_possible_type_sym): Change type of syms. Remove nsyms
4680 (write_var_or_type, write_name_assoc): Update.
4682 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4684 * windows-nat.c (windows_nat_target::xfer_partial): Return
4685 TARGET_XFER_E_IO if we need to delegate to the target beneath
4686 but BENEATH is NULL.
4688 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4690 * Makefile.in (config.status): Add configure.nat as a
4693 2018-06-04 Tom Tromey <tom@tromey.com>
4695 * cp-name-parser.y (cpname_state): Add method declarations.
4696 (HANDLE_QUAL): Update.
4697 (cpname_state::d_grab, cpname_state::fill_comp)
4698 (cpname_state::make_operator, cpname_state::make_dtor)
4699 (cpname_state::make_builtin_type, cpname_state::make_name)
4700 (cpname_state::d_qualify, cpname_state::d_int_type)
4701 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4702 (%union): Move earlier.
4704 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4706 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4708 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4710 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4711 (aarch64_pseudo_write_1): Likewise.
4712 (aarch64_pseudo_read_value): Use helper.
4713 (aarch64_pseudo_write): Likewise.
4715 2018-06-04 Pedro Alves <palves@redhat.com>
4717 * darwin-nat.c (darwin_ops): Delete.
4718 (darwin_attach_pid): Use get_native_target.
4720 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4722 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4723 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4725 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4727 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4728 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4729 (aarch64_gdbarch_init): Check for SVE.
4730 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4732 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4734 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4735 * aarch64-tdep.h (aarch64_read_description): Likewise.
4736 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4737 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4738 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4739 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4740 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4742 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4744 * value.c (value_fetch_lazy_bitfield): New.
4745 (value_fetch_lazy_memory): New.
4746 (value_fetch_lazy_register): New.
4747 (value_fetch_lazy): Factor out to smaller functions.
4749 2018-06-01 Tom Tromey <tom@tromey.com>
4751 * cp-name-parser.y (backslashable, represented): Now const.
4753 2018-06-01 Tom Tromey <tom@tromey.com>
4755 * cp-name-parser.y: Include parser-defs.h.
4756 (parser_fprintf): Remove declaration.
4758 2018-06-01 Tom Tromey <tom@tromey.com>
4760 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4762 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4763 (global_result): Remove globals.
4764 (struct cpname_state): New.
4765 (yyparse): Don't declare.
4766 (yylex, yyerror): Move declarations after %union.
4767 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4768 (make_name): Add state parameter.
4770 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4772 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4774 (yylex): Add lvalp, state parameters.
4775 (yyerror): Add state parameter.
4776 (cp_demangled_name_to_comp): Update.
4778 2018-06-01 Tom Tromey <tom@tromey.com>
4780 * cp-name-parser.y (parser_fprintf): Declare.
4781 (GDB_YY_REMAP_PREFIX): Define.
4782 Include yy-remap.h. Don't redefine yy* identifiers.
4784 2018-06-01 Tom Tromey <tom@tromey.com>
4786 * python/py-type.c (typy_legacy_template_argument): Update.
4787 * cp-support.h (cp_demangled_name_to_comp): Update.
4788 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4789 parameter to be a "std::string *".
4792 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4794 * ada-lex.l: Include "diagnostics.h" instead of
4795 "common/diagnostics.h".
4796 * unittests/environ-selftests.c: Likewise.
4797 * common/diagnostics.h: Moved to ../include.
4799 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4801 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4802 to language_mode_manual while calling breakpoint_re_set_one.
4804 2018-06-01 Tom Tromey <tom@tromey.com>
4806 * valops.c (value_cast_structs, destructor_name_p): Update.
4807 * symtab.c (gdb_mangle_name): Update.
4808 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4810 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4811 (pascal_object_print_value_fields, pascal_object_print_value):
4813 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4814 * linespec.c (find_methods): Update.
4815 * gdbtypes.h (type_name_no_tag): Remove.
4816 (type_name_or_error): Rename from type_name_no_tag_or_error.
4817 * gdbtypes.c (type_name_no_tag): Remove.
4818 (type_name_or_error): Rename from type_name_no_tag_or_error.
4819 (lookup_struct_elt_type, check_typedef): Update.
4820 * expprint.c (print_subexp_standard): Update.
4821 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4822 * d-namespace.c (d_lookup_nested_symbol): Update.
4823 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4824 (cp_print_class_member): Update.
4825 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4826 * completer.c (add_struct_fields): Update.
4827 * c-typeprint.c (cp_type_print_derivation_info)
4828 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4830 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4831 (ada_prefer_type, ada_is_exception_sym): Update.
4833 2018-06-01 Tom Tromey <tom@tromey.com>
4835 * valops.c (enum_constant_from_type, value_namespace_elt)
4836 (value_maybe_namespace_elt): Update.
4837 * valarith.c (find_size_for_pointer_math): Update.
4838 * target-descriptions.c (make_gdb_type): Update.
4839 * symmisc.c (print_symbol): Update.
4840 * stabsread.c (define_symbol, read_type)
4841 (complain_about_struct_wipeout, add_undefined_type)
4842 (cleanup_undefined_types_1): Update.
4843 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4844 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4845 (rust_internal_print_type, rust_composite_type)
4846 (rust_evaluate_funcall, rust_evaluate_subexp)
4847 (rust_inclusive_range_type_p): Update.
4848 * python/py-type.c (typy_get_tag): Update.
4849 * p-typeprint.c (pascal_type_print_base): Update.
4850 * mdebugread.c (parse_symbol, parse_type): Update.
4851 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4853 * guile/scm-type.c (gdbscm_type_tag): Update.
4854 * go-lang.c (sixg_string_p): Update.
4855 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4857 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4858 (TYPE_TAG_NAME): Remove.
4859 * gdbtypes.c (type_name_no_tag): Simplify.
4860 (check_typedef, check_types_equal, recursive_dump_type)
4861 (copy_type_recursive, arch_composite_type): Update.
4862 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4863 in summary mode when needed.
4864 * eval.c (evaluate_funcall): Update.
4865 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4866 (process_structure_scope, read_enumeration_type)
4867 (read_namespace_type, read_module_type, determine_prefix): Update.
4868 * cp-support.c (inspect_type): Update.
4869 * coffread.c (process_coff_symbol, decode_base_type): Update.
4870 * c-varobj.c (c_is_path_expr_parent): Update.
4871 * c-typeprint.c (c_type_print_base_struct_union): Update.
4872 (c_type_print_base_1): Update. Print struct/class/union/enum in
4873 summary when using C language.
4874 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4875 (gen_maybe_namespace_elt): Update.
4876 * ada-lang.c (ada_type_name): Simplify.
4877 (empty_record, ada_template_to_fixed_record_type_1)
4878 (template_to_static_fixed_type)
4879 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4881 2018-06-01 Tom Tromey <tom@tromey.com>
4883 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4885 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4886 (c_print_type): Update.
4887 (c_print_type): New overload.
4888 (c_type_print_varspec_prefix, c_type_print_args)
4889 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4890 (c_type_print_base_struct_union, c_type_print_base_1)
4891 (cp_type_print_method_args): Add "language" parameter.
4892 (c_type_print_base): Update.
4893 * c-lang.h (c_print_type): Add new overload.
4895 2018-06-01 Tom Tromey <tom@tromey.com>
4897 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4898 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4900 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4902 * aarch64-tdep.c (aarch64_sve_register_names): New const
4904 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4905 (AARCH64_SVE_Z_REGS_NUM): New define.
4906 (AARCH64_SVE_P_REGS_NUM): Likewise.
4907 (AARCH64_SVE_NUM_REGS): Likewise.
4909 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4911 * nat/linux-ptrace.h [__alpha__]
4912 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4915 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4917 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4918 the endianness selected.
4919 * NEWS: Document `set endian auto' mode operation update.
4921 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4923 * Makefile.in: Add new header.
4924 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4925 (sve_vl_from_vg): Likewise.
4926 (sve_vq_from_vl): Likewise.
4927 (sve_vl_from_vq): Likewise.
4928 (sve_vq_from_vg): Likewise.
4929 (sve_vg_from_vq): Likewise.
4930 * configure.nat: Add new c file.
4931 * nat/aarch64-sve-linux-ptrace.c: New file.
4932 * nat/aarch64-sve-linux-ptrace.h: New file.
4934 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4936 * aarch64-linux-nat.c (aarch64_linux_read_description):
4938 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4940 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4941 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4942 (aarch64_gdbarch_init): Add parmeter zero.
4943 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4944 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4945 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4947 * doc/gdb.texinfo: Describe SVE feature
4948 * features/aarch64-sve.c: New file.
4950 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4953 * gdbarch.sh (significant_addr_bit): Default to zero when
4954 not set by target architecture.
4955 * gdbarch.c: Re-generated.
4956 * utils.c (address_significant): Update.
4958 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4960 * stack.c (func_command): Remove trailing newline in call to error.
4962 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4964 * regcache.h (regcache_raw_collect): Remove, update callers to
4965 use regcache::raw_collect.
4966 * regcache.c (regcache_raw_collect): Remove.
4968 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4970 * regcache.h (regcache_raw_supply): Remove, update callers to
4971 use detached_regcache::raw_supply.
4972 * regcache.c (regcache_raw_supply): Remove.
4974 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4976 * regcache.h (regcache_cooked_write_part): Remove, update
4977 callers to use regcache::cooked_write_part.
4978 * regcache.c (regcache_cooked_write_part): Remove.
4980 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4982 * regcache.h (regcache_cooked_read_part): Remove, update callers
4983 to use readable_regcache::cooked_read_part.
4984 * regcache.c (regcache_cooked_read_part): Remove.
4986 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4988 * regcache.h (regcache_cooked_read_value): Remove, update
4989 callers to use readable_regcache::cooked_read_value.
4990 * regcache.c (regcache_cooked_read_value): Remove.
4992 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4994 * regcache.h (regcache_cooked_write): Remove, update callers to
4995 use regcache::cooked_write.
4996 * regcache.c (regcache_cooked_write): Remove.
4998 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5000 * regcache.h (regcache_invalidate): Remove, update callers to
5001 use detached_regcache::invalidate instead.
5002 * regcache.c (regcache_invalidate): Remove.
5004 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5006 * regcache.h (regcache_raw_write_part): Remove, update callers
5007 to use regcache::raw_write_part instead.
5008 * regcache.c (regcache_raw_write_part): Remove.
5010 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5012 * regcache.h (regcache_raw_read_part): Remove, update callers to
5013 use readable_regcache::raw_read_part instead.
5014 * regcache.c (regcache_raw_read_part): Remove.
5016 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5018 * regcache.h (regcache_cooked_read): Remove, update callers to
5019 use readable_regcache::cooked_read instead.
5020 * regcache.c (regcache_cooked_read): Remove.
5022 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5024 * regcache.h (regcache_raw_write): Remove, update callers to use
5025 regcache::raw_write instead.
5026 * regcache.c (regcache_raw_write): Remove.
5028 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5030 * regcache.h (regcache_raw_read): Remove, update callers to use
5031 readable_regcache::raw_read instead.
5032 * regcache.c (regcache_raw_read): Remove.
5034 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5036 * regcache.h (regcache_raw_update): Remove, update callers to
5037 use readable_regcache::raw_update instead.
5038 * regcache.c (regcache_raw_update): Remove.
5040 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5042 * regcache.h (regcache_register_status): Remove, update callers
5043 to use reg_buffer::get_register_status directly instead.
5044 * regcache.c (regcache_register_status): Remove.
5046 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5048 * regcache.h (regcache_get_ptid): Remove, update all callers to
5049 call regcache::ptid instead.
5050 * regcache.c (regcache_get_ptid): Remove.
5052 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5054 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5056 2018-05-30 Pedro Alves <palves@redhat.com>
5058 * common/common-exceptions.h (exception_rethrow): Use
5061 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5063 * breakpoint.c (print_solib_event, check_status_catch_solib):
5064 Remove struct keyword in range-based for loops.
5065 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5066 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5068 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5070 * symfile.c (addr_info_make_relative): Likewise.
5071 * thread.c (value_in_thread_stack_temporaries): Likewise.
5073 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5076 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5077 aggregate type to get its real type before accessing it.
5079 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5081 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5082 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5083 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5084 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5085 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5086 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5087 * printcmd.c (info_address_command): Likewise.
5089 2018-05-29 Tom Tromey <tom@tromey.com>
5091 * windows-nat.c (handle_exception): Update fall-through comment.
5093 2018-05-29 Tom Tromey <tom@tromey.com>
5095 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5096 (struct program_space) <added_solibs>: Now a std::vector.
5097 * breakpoint.c (print_solib_event): Update.
5098 (check_status_catch_solib): Update.
5099 * progspace.c (clear_program_space_solib_cache): Update.
5100 * solib.c (update_solib_list): Update.
5102 2018-05-29 Tom Tromey <tom@tromey.com>
5104 * python/py-type.c (typy_richcompare): Update.
5105 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5106 * gdbtypes.h (types_deeply_equal): Return bool.
5107 (types_equal): Likewise.
5108 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5110 (check_types_equal): Change worklist to std::vector. Return
5112 (struct type_equality_entry): Add constructor.
5113 (compare_maybe_null_strings): Return bool.
5114 (check_types_worklist): Return bool. Change worklist to
5116 (types_deeply_equal): Use std::vector.
5117 (types_equal): Return bool.
5118 (compare_maybe_null_strings): Simplify.
5120 2018-05-29 Tom Tromey <tom@tromey.com>
5122 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5124 2018-05-29 Tom Tromey <tom@tromey.com>
5126 * objc-lang.h: Don't include cp-support.h.
5127 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5130 2018-05-27 Tom Tromey <tom@tromey.com>
5132 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5134 2018-05-25 Tom Tromey <tom@tromey.com>
5136 * value.c (value::location): Initialize.
5138 2018-05-25 Tom Tromey <tom@tromey.com>
5140 * dbxread.c (init_bincl_list): Remove.
5141 (bincl_list): Now a std::vector.
5142 (bincls_allocated, next_bincl): Remove.
5143 (free_bincl_list, do_free_bincl_list_cleanup)
5144 (make_cleanup_free_bincl_list): Remove.
5145 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5147 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5148 (struct header_file_location): Add constructor.
5149 (add_bincl_to_list): Remove.
5151 2018-05-25 Tom Tromey <tom@tromey.com>
5153 * tui/tui.c (tui_enable): Update.
5154 * mi/mi-interp.c (mi_interp::init): Update.
5155 * interps.h (class interp) <name>: New method.
5156 <m_name>: Rename from name.
5157 (~scoped_restore_interp): Update.
5158 * interps.c (interp::interp): Update.
5159 (interp_add, interp_set, interp_lookup_existing)
5160 (current_interp_named_p): Update.
5162 2018-05-25 Tom Tromey <tom@tromey.com>
5164 * interps.c (interp_name): Remove.
5165 * mi/mi-interp.c (mi_interp::init): Update.
5166 * interps.h (interp_name): Remove.
5167 (~scoped_restore_interp): Update.
5168 * tui/tui.c (tui_enable): Update.
5170 2018-05-25 Tom Tromey <tom@tromey.com>
5172 * utils.c (fputs_maybe_filtered): Update.
5173 * linespec.c (decode_line_full): Update.
5174 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5175 (mi_print_breakpoint_for_event, mi_solib_loaded)
5176 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5177 (mi_user_selected_context_changed): Update.
5178 * mi/mi-main.c (mi_execute_command): Update.
5179 * cli/cli-script.c (execute_control_command): Update.
5180 * python/python.c (execute_gdb_command): Update.
5181 * solib.c (info_sharedlibrary_command): Update.
5182 * interps.c (interp_ui_out): Remove.
5183 * interps.h (interp_ui_out): Remove.
5185 2018-05-25 Tom Tromey <tom@tromey.com>
5187 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5188 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5189 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5191 2018-05-25 Tom Tromey <tom@tromey.com>
5193 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5194 * interps.c (interp_exec): Use scoped_restore.
5196 2018-05-25 Tom Tromey <tom@tromey.com>
5198 * remote.c (remote_target::remote_file_get): Use
5200 (remote_target::remote_file_put): Likewise.
5202 2018-05-25 Tom Tromey <tom@tromey.com>
5204 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5206 (get_pe_section_index, add_pe_exported_sym): Update.
5207 (read_pe_exported_syms): Use gdb::def_vector.
5209 2018-05-25 Tom Tromey <tom@tromey.com>
5211 * frame.c (remove_prev_frame): Remove.
5212 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5214 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5216 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5218 * mips-linux-nat.c (supply_fpregset): Always call
5219 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5220 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5221 `mips_fill_fpregset'.
5222 * mips-linux-tdep.c (mips_supply_fpregset)
5223 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5224 (mips_fill_fpregset_wrapper): Remove functions.
5225 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5226 (mips_linux_fpregset): Remove variable.
5227 (mips_linux_iterate_over_regset_sections): Use
5228 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5229 (mips_linux_o32_sigframe_init): Remove comment.
5231 2018-05-25 Pedro Alves <palves@redhat.com>
5233 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5234 (struct readahead_cache, struct packet_reg, struct
5235 remote_arch_state, class remote_state): Move higher up in the
5237 (remote_target::m_remote_state): Now an object instead of a pointer.
5238 (remote_target::get_remote_state): Adjust.
5240 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5242 * stack.c (select_and_print_frame): Delete.
5243 (struct function_bounds): Move struct within function.
5244 (func_command): Most content moved into new function
5245 find_frame_for_function, use new function, print result, add
5247 (find_frame_for_function): New function, now returns a result.
5249 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5251 * stack.c (iterate_over_block_arg_vars): Fix comment.
5252 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5254 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5258 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5260 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5262 * frame.h (class scoped_restore_selected_frame): New class.
5263 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5264 of any exception, use scoped_restore_selected_frame to restore the
5267 2018-05-24 Pedro Alves <palves@redhat.com>
5269 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5272 2018-05-23 Tom Tromey <tom@tromey.com>
5274 * complaints.c (struct complaints): Remove.
5275 (symfile_complaint_book): Remove.
5276 (series): New global.
5277 (complaint_internal): Update.
5278 (clear_complaints): Update.
5280 2018-05-23 Tom Tromey <tom@tromey.com>
5282 * complaints.c (counters): New global.
5283 (struct complain): Remove.
5284 (struct complaints) <root>: Remove.
5285 (complaint_sentinel): Remove.
5286 (symfile_complaint_book): Update.
5287 (find_complaint) Remove.
5288 (complaint_internal, clear_complaints): Update.
5290 2018-05-23 Tom Tromey <tom@tromey.com>
5292 * complaints.c (struct complain) <file, line>: Remove.
5293 (find_complaint): Remove file, line parameters.
5294 (complaint_internal): Update.
5296 2018-05-23 Tom Tromey <tom@tromey.com>
5298 * complaints.c (vcomplaint): Remove.
5299 (complaint_internal) Merge in contents of vcomplaint.
5301 2018-05-23 Tom Tromey <tom@tromey.com>
5303 * complaints.c (struct complaints) <explanation>: Remove.
5304 (symfile_explanations): Remove.
5305 (symfile_complaint_book): Update.
5306 (vcomplaint): Update.
5307 (struct explanation): Remove.
5309 2018-05-23 Tom Tromey <tom@tromey.com>
5311 * complaints.c (symfile_complaints): Remove.
5312 (complaint_internal): Remove "complaints" parameter.
5313 (clear_complaints, vcomplaint): Remove "c" parameter.
5314 (get_complaints): Remove.
5315 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5316 (dwarf2_debug_line_missing_file_complaint)
5317 (dwarf2_debug_line_missing_end_sequence_complaint)
5318 (dwarf2_complex_location_expr_complaint)
5319 (dwarf2_const_value_length_mismatch_complaint)
5320 (dwarf2_section_buffer_overflow_complaint)
5321 (dwarf2_macro_malformed_definition_complaint)
5322 (dwarf2_invalid_attrib_class_complaint)
5323 (create_addrmap_from_index, dw2_symtab_iter_next)
5324 (dw2_expand_marked_cus)
5325 (dw2_debug_names_iterator::find_vec_in_debug_names)
5326 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5327 (create_debug_type_hash_table, init_cutu_and_read_dies)
5328 (partial_die_parent_scope, add_partial_enumeration)
5329 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5330 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5331 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5332 (create_cus_hash_table, create_dwp_hash_table)
5333 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5334 (dwarf2_rnglists_process, dwarf2_ranges_process)
5335 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5336 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5337 (handle_struct_member_die, process_structure_scope)
5338 (read_array_type, read_common_block, read_module_type)
5339 (read_tag_pointer_type, read_typedef, read_base_type)
5340 (read_subrange_type, load_partial_dies, partial_die_info::read)
5341 (partial_die_info::read, partial_die_info::read)
5342 (partial_die_info::read, read_checked_initial_length_and_offset)
5343 (dwarf2_string_attr, read_formatted_entries)
5344 (dwarf_decode_line_header)
5345 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5346 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5347 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5348 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5349 (get_signatured_type, get_DW_AT_signature_type)
5350 (decode_locdesc, file_file_name, consume_improper_spaces)
5351 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5352 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5353 (dwarf2_symbol_mark_computed, set_die_type)
5354 (read_attribute_value): Update.
5355 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5357 * dbxread.c (unknown_symtype_complaint)
5358 (lbrac_mismatch_complaint, repeated_header_complaint)
5359 (set_namestring, function_outside_compilation_unit_complaint)
5360 (read_dbx_symtab, process_one_symbol): Update.
5361 * gdbtypes.c (stub_noname_complaint): Update.
5362 * windows-nat.c (handle_unload_dll): Update.
5363 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5364 (decode_base_type): Update.
5365 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5366 (eb_complaint, record_include_begin, record_include_end)
5367 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5368 (process_xcoff_symbol, read_symbol)
5369 (function_outside_compilation_unit_complaint)
5370 (scan_xcoff_symtab): Update.
5371 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5372 * buildsym.c (finish_block_internal, make_blockvector)
5373 (end_symtab_get_static_block, augment_type_symtab): Update.
5374 * dtrace-probe.c (dtrace_process_dof)
5375 (dtrace_static_probe_ops::get_probes): Update.
5376 * complaints.h (struct complaint): Don't declare.
5377 (symfile_complaints): Remove.
5378 (complaint_internal): Remove "complaints" parameter.
5379 (complaint): Likewise.
5380 (clear_complaints): Likewise.
5381 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5382 (reread_symbols): Update.
5383 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5384 (dwarf2_frame_cache, decode_frame_entry): Update.
5385 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5386 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5387 (info_selectors_command): Update.
5388 * macrotab.c (macro_include, check_for_redefinition)
5389 (macro_undef): Update.
5390 * objfiles.c (filter_overlapping_sections): Update.
5391 * stabsread.c (invalid_cpp_abbrev_complaint)
5392 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5393 (define_symbol, error_type, read_type, rs6000_builtin_type)
5394 (stabs_method_name_from_physname, read_member_functions)
5395 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5396 (attach_fields_to_type, complain_about_struct_wipeout)
5397 (read_range_type, read_args, common_block_start)
5398 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5400 * mdebugread.c (index_complaint, unknown_ext_complaint)
5401 (basic_type_complaint, bad_tag_guess_complaint)
5402 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5403 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5404 (parse_procedure, parse_lines)
5405 (function_outside_compilation_unit_complaint)
5406 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5407 (bad_tag_guess_complaint, reg_value_complaint): Update.
5408 * cp-support.c (demangled_name_complaint): Update.
5409 * macroscope.c (sal_macro_scope): Update.
5410 * dwarf-index-write.c (class debug_names): Update.
5412 2018-05-23 Tom Tromey <tom@tromey.com>
5414 * complaints.c (clear_complaints): Remove "noisy" parameter.
5415 * complaints.h (clear_complaints): Update.
5416 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5417 (reread_symbols): Update.
5419 2018-05-23 Tom Tromey <tom@tromey.com>
5421 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5423 (vcomplaint, clear_complaints): Update.
5424 (symfile_explanations): Remove some messages.
5426 2018-05-23 Tom Tromey <tom@tromey.com>
5428 * complaints.c (internal_complaint): Remove.
5429 * complaints.h (internal_complaint): Remove.
5431 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5433 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5435 2018-05-22 Pedro Alves <palves@redhat.com>
5437 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5438 (remote_fileio_badfd, remote_fileio_return_errno)
5439 (remote_fileio_return_success, remote_fileio_func_open)
5440 (remote_fileio_func_open, remote_fileio_func_close)
5441 (remote_fileio_func_read, remote_fileio_func_write)
5442 (remote_fileio_func_lseek, remote_fileio_func_rename)
5443 (remote_fileio_func_unlink, remote_fileio_func_stat)
5444 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5445 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5446 remote_target parameter.
5447 (remote_fio_func_map) <func>: Add remote_target parameter.
5448 (do_remote_fileio_request, remote_fileio_request):
5449 * remote-fileio.h (remote_fileio_request):
5450 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5451 remote_target parameter.
5452 (remote_notif_process, handle_notification): Adjust to pass down
5454 (remote_notif_state_allocate): Add remote_target parameter. Save
5456 * remote-notif.h (struct remote_target): Forward declare.
5457 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5458 remote_target parameter.
5459 (struct remote_notif_state) <remote>: New field.
5460 (remote_notif_ack, remote_notif_parse): Add remote_target
5462 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5463 remote_target parameter.
5464 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5465 (threads_listing_context, rmt_thread_action, protocol_feature)
5466 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5467 (packet_result, struct threads_listing_context, remote_state):
5468 Move definitions and declarations higher up.
5469 (remote_target) <~remote_target>: Declare.
5470 (remote_download_command_source, remote_file_put, remote_file_get)
5471 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5472 (remote_hostio_pread_vFile, remote_hostio_send_command)
5473 (remote_hostio_set_filesystem, remote_hostio_open)
5474 (remote_hostio_close, remote_hostio_unlink, remote_state)
5475 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5476 (get_memory_write_packet_size, get_memory_read_packet_size)
5477 (append_pending_thread_resumptions, remote_detach_1)
5478 (append_resumption, remote_resume_with_vcont)
5479 (add_current_inferior_and_thread, wait_ns, wait_as)
5480 (process_stop_reply, remote_notice_new_inferior)
5481 (process_initial_stop_replies, remote_add_thread)
5482 (btrace_sync_conf, remote_btrace_maybe_reopen)
5483 (remove_new_fork_children, kill_new_fork_children)
5484 (discard_pending_stop_replies, stop_reply_queue_length)
5485 (check_pending_events_prevent_wildcard_vcont)
5486 (discard_pending_stop_replies_in_queue, stop_reply)
5487 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5488 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5489 (remote_interrupt_as, remote_interrupt_ns)
5490 (remote_get_noisy_reply, remote_query_attached)
5491 (remote_add_inferior, remote_current_thread, get_current_thread)
5492 (set_thread, set_general_thread, set_continue_thread)
5493 (set_general_process, write_ptid)
5494 (remote_unpack_thread_info_response, remote_get_threadinfo)
5495 (parse_threadlist_response, remote_get_threadlist)
5496 (remote_threadlist_iterator, remote_get_threads_with_ql)
5497 (remote_get_threads_with_qxfer)
5498 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5499 (get_offsets, remote_check_symbols, remote_supported_packet)
5500 (remote_query_supported, remote_packet_size)
5501 (remote_serial_quit_handler, remote_detach_pid)
5502 (remote_vcont_probe, remote_resume_with_hc)
5503 (send_interrupt_sequence, interrupt_query)
5504 (remote_notif_get_pending_events, fetch_register_using_p)
5505 (send_g_packet, process_g_packet, fetch_registers_using_g)
5506 (store_register_using_P, store_registers_using_G)
5507 (set_remote_traceframe, check_binary_download)
5508 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5509 (remote_xfer_live_readonly_partial, remote_read_bytes)
5510 (remote_send_printf, remote_flash_write, readchar)
5511 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5512 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5513 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5514 (extended_remote_disable_randomization, extended_remote_run)
5515 (send_environment_packet, extended_remote_environment_support)
5516 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5517 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5518 (packet_command): Now methods of ...
5519 (remote_target): ... this class.
5520 (m_remote_state) <remote_target>: New field.
5521 (struct remote_state) <stop_reply_queue,
5522 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5524 (remote_state::remote_state): Allocate stop_reply_queue.
5525 (remote_state): Delete global.
5526 (get_remote_state_raw): Delete.
5527 (remote_target::get_remote_state): Allocate m_remote_state on
5529 (get_current_remote_target): New.
5530 (remote_ops, extended_remote_ops): Delete.
5531 (wait_forever_enabled_p, remote_async_inferior_event_token):
5532 Delete, moved to struct remote_state.
5533 (remote_target::close): Delete self. Destruction bits split to
5535 (remote_target::~remote_target): ... this.
5536 (show_memory_packet_size): Adjust to use
5537 get_current_remote_target.
5538 (struct protocol_feature) <func>: Add remote_target parameter.
5539 All callers adjusted.
5540 (curr_quit_handler_target): New.
5541 (remote_serial_quit_handler): Reimplement.
5542 (remote_target::open_1): Adjust to use get_current_remote_target.
5543 Heap-allocate remote_target/extended_remote_target instances.
5544 (vcont_builder::vcont_builder): Add remote_target parameter, and
5545 save it in m_remote. All callers adjusted.
5546 (vcont_builder::m_remote): New field.
5547 (vcont_builder::restart, vcont_builder::flush)
5548 (vcont_builder::push_action): Use it.
5549 (remote_target::commit_resume): Use it.
5550 (struct queue_iter_param) <remote>: New field.
5551 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5552 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5553 (check_pending_event_prevents_wildcard_vcont_callback)
5554 (remote_target::check_pending_events_prevent_wildcard_vcont)
5555 (remote_target::discard_pending_stop_replies)
5556 (remote_target::discard_pending_stop_replies_in_queue)
5557 (remote_target::remote_notif_remove_queued_reply): Fill in
5559 (remote_notif_get_pending_events): New.
5560 (remote_target::readchar, remote_target::remote_serial_write):
5561 Save/restore curr_quit_handler_target.
5563 (kill_new_fork_children): Fill in 'remote' field.
5564 (packet_command): Use get_current_remote_target, defer to
5565 remote_target method of same name.
5566 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5567 parameter, and save it in m_remote. All callers adjusted.
5568 (scoped_remote_fd::release): Use m_remote.
5569 (scoped_remote_fd::m_remote): New field.
5570 (remote_file_put, remote_file_get, remote_file_delete): Use
5571 get_current_remote_target, defer to remote_target method of same
5573 (remote_btrace_reset): Add remote_state paremeter. Update all
5575 (remote_async_inferior_event_handler). Pass down 'data'.
5576 (remote_new_objfile): Use get_current_remote_target.
5577 (remote_target::vcont_r_supported): New.
5578 (set_range_stepping): Use get_current_remote_target and
5579 remote_target::vcont_r_supported.
5580 (_initialize_remote): Don't allocate 'remote_state' and
5581 'stop_reply_queue' globals.
5582 * remote.h (struct remote_target): Forward declare.
5583 (getpkt, putpkt, remote_notif_get_pending_events): Add
5584 'remote_target' parameter.
5586 2018-05-22 Pedro Alves <palves@redhat.com>
5588 * remote.c (vcont_builder): Now a class. Make all data members
5590 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5592 (vcont_builder_restart): Rename to ...
5593 (vcont_builder::restart): ... this.
5594 (vcont_builder_flush): Rename to ...
5595 (vcont_builder::flush): ... this.
5596 (vcont_builder_push_action): Rename to ...
5597 (vcont_builder::push_action): ... this.
5598 (remote_target::commit_resume): Adjust.
5600 2018-05-22 Pedro Alves <palves@redhat.com>
5602 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5603 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5604 (get_fixed_memory_packet_size): New.
5605 (get_memory_packet_size): Use it.
5606 (set_memory_packet_size): Don't override the config size with
5607 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5608 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5609 Don't refer to get_memory_packet_size if not connected to a remote
5610 target. Show "(default)" if configured size is 0.
5612 2018-05-22 Pedro Alves <palves@redhat.com>
5614 * remote.c (remote_target::mourn_inferior): Move
5615 discard_pending_stop_replies call here from ...
5616 (_initialize_remote): ... here.
5618 2018-05-22 Pedro Alves <palves@redhat.com>
5620 * remote.c (compare_section_command): Remove set_general_process
5623 2018-05-22 Pedro Alves <palves@redhat.com>
5625 * remote.c (struct packet_reg, struct remote_arch_state):
5626 Move higher up in the file.
5627 (remote_state) <m_arch_states>: Store remote_arch_state values
5628 instead of remote_arch_state pointers.
5629 (remote_state::get_remote_arch_state): Adjust.
5631 2018-05-22 Pedro Alves <palves@redhat.com>
5633 * remote.c: Include <unordered_map>.
5634 (remote_state): Now a class.
5635 (remote_state) <get_remote_arch_state>: Declare method.
5636 <get_remote_arch_state>: New field.
5637 (remote_arch_state) <remote_arch_state>: Declare ctor.
5638 <regs>: Now a unique_ptr.
5639 (remote_gdbarch_data_handle): Delete.
5640 (get_remote_arch_state): Delete.
5641 (remote_state::get_remote_arch_state): New.
5642 (get_remote_state): Adjust to call remote_state's
5643 get_remote_arch_state method.
5644 (init_remote_state): Delete, bits factored out to ...
5645 (remote_arch_state::remote_arch_state): ... this new method.
5646 (get_remote_packet_size, get_memory_packet_size)
5647 (process_g_packet, remote_target::fetch_registers)
5648 (remote_target::prepare_to_store, store_registers_using_G)
5649 (remote_target::store_registers, remote_target::get_trace_status):
5650 Adjust to call remote_state's method.
5651 (_initialize_remote): Remove reference to
5652 remote_gdbarch_data_handle.
5654 2018-05-22 Pedro Alves <palves@redhat.com>
5656 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5657 pread>: New method declarations.
5658 (remote_target::open_1): Adjust.
5659 (readahead_cache_invalidate): Rename to ...
5660 (readahead_cache::invalidate): ... this, and adjust to be a class
5662 (readahead_cache_invalidate_fd): Rename to ...
5663 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5665 (remote_hostio_pwrite): Adjust.
5666 (remote_hostio_pread_from_cache): Rename to ...
5667 (readahead_cache::pread): ... this, and adjust to be a class
5669 (remote_hostio_close): Adjust.
5671 2018-05-22 Pedro Alves <palves@redhat.com>
5673 * remote.c (remote_hostio_close_cleanup): Delete.
5674 (class scoped_remote_fd): New.
5675 (remote_file_put, remote_file_get): Use it.
5677 2018-05-22 Pedro Alves <palves@redhat.com>
5679 (struct vCont_action_support): Use bool and initialize all fields.
5680 (struct readahead_cache): Initialize all fields.
5681 (remote_state): Use bool and initialize all fields.
5682 (remote_state::remote_state, remote_state::~remote_state): New.
5683 (new_remote_state): Delete.
5684 (_initialize_remote): Use new to allocate remote_state.
5686 2018-05-22 Pedro Alves <palves@redhat.com>
5690 * c-exp.y: Include "c-support.h".
5691 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5692 of tolower. Use c_ident_is_alpha to scan names.
5693 * c-lang.c: Include "c-support.h".
5694 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5695 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5696 * c-support.h: New file, with bits factored out from ...
5697 * cp-name-parser.y: ... this file.
5698 Include "c-support.h".
5699 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5700 c-support.h and renamed.
5701 (symbol_end, yylex): Adjust.
5703 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5705 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5706 parameter type to CORE_ADDR.
5707 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5708 parameter type in declaration to CORE_ADDR.
5709 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5710 target_auxv_search to get AT_HWCAP and use the result to get the
5712 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5713 to CORE_ADDR. Remove the cast of the return value to unsigned
5714 long. Fix error predicate of target_auxv_search.
5715 (ppc_linux_nat_target::read_description): Change the type of the
5716 hwcap variable to CORE_ADDR.
5718 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5720 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5721 if the size of fpscr is larger than 32 bits.
5723 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5725 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5726 (ppc32_linux_vsxregmap): New global.
5727 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5728 regcache_supply_regset, and regcache_collect_regset.
5729 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5730 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5731 (fetch_vsx_register, store_vsx_register): Remove.
5732 (fetch_vsx_registers): Add regno parameter. Get regset using
5733 ppc_linux_vsxregset. Use regset to supply registers.
5734 (store_vsx_registers): Add regno parameter. Get regset using
5735 ppc_linux_vsxregset. Use regset to collect registers.
5736 (fetch_register): Call fetch_vsx_registers instead of
5738 (store_register): Call store_vsx_registers instead of
5740 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5741 new regno parameter.
5742 (store_ppc_registers): Call store_vsx_registers with -1 for the
5743 new regno parameter.
5744 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5745 (ppc_collect_vsxregset): Remove.
5747 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5749 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5751 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5752 for vector register offset fields.
5753 (ppc64_fbsd_reg_offsets): Likewise.
5754 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5755 to vector register offset fields.
5756 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5757 to vector register offset fields.
5758 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5759 vector register offset fields.
5760 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5761 initializers for vector register offset fields.
5762 (rs6000_aix64_reg_offsets): Likewise.
5763 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5764 (ppc_supply_vrregset): Remove.
5765 (ppc_collect_vrregset): Remove.
5766 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5767 (ppc_linux_vrregset) : New function.
5768 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5769 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5770 (ppc32_linux_vrregset): Remove.
5771 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5772 and use result instead of ppc32_linux_vrregset.
5773 (ppc32_linux_reg_offsets): Remove initializers for vector register
5775 (ppc64_linux_reg_offsets): Likewise.
5776 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5777 * ppc-linux-nat.c: Include regset.h.
5778 (gdb_vrregset_t): Adjust comment to account for little-endian
5780 (supply_vrregset, fill_vrregset): Remove.
5781 (fetch_altivec_register, store_altivec_register): Remove.
5782 (fetch_altivec_registers): Add regno parameter. Get regset using
5783 ppc_linux_vrregset. Use regset to supply registers.
5784 (store_altivec_registers): Add regno parameter. Get regset using
5785 ppc_linux_vrregset. Use regset to collect registers.
5786 (fetch_register): Call fetch_altivec_registers instead of
5787 fetch_altivec_register.
5788 (store_register): Call store_altivec_registers instead of
5789 store_altivec_register.
5790 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5791 the new regno parameter.
5792 (store_ppc_registers): Call store_altivec_registers with -1 for
5793 the new regno parameter.
5795 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5797 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5798 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5799 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5800 (gdb_vrregset_t): Change array type size to
5801 PPC_LINUX_SIZEOF_VRREGSET.
5802 (gdb_vsxregset_t): Change array type size to
5803 PPC_LINUX_SIZEOF_VSXREGSET.
5804 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5805 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5806 PPC_LINUX_SIZEOF_VSXREGSET.
5808 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5810 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5811 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5813 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5814 ppc_linux_target_wordsize with tid.
5815 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5817 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5818 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5819 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5820 tid parameter. Remove static specifier.
5821 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5822 (ppc_linux_target_wordsize): New declaration.
5824 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5826 * arch/ppc-linux-common.c: New file.
5827 * arch/ppc-linux-common.h: New file.
5828 * arch/ppc-linux-tdesc.h: New file.
5829 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5830 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5831 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5832 arch/ppc-linux-tdesc.h.
5833 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5834 arch/ppc-linux-tdesc.h.
5835 (ppc_linux_nat_target::read_description): Remove target
5836 description matching code. Fill a ppc_linux_features struct and
5837 call ppc_linux_match_description with it. Move comment about ISA
5838 2.05 to ppc-linux-common.c.
5839 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5840 arch/ppc-linux-tdesc.h.
5841 (ppc_linux_core_read_description): Remove target description
5842 matching code. Fill a ppc_linux_features struct and call
5843 ppc_linux_match_description with it.
5844 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5845 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5846 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5847 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5848 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5849 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5850 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5851 (tdesc_powerpc_e500l): Remove.
5853 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5855 * ada-lang.c (catch_assert_command): Pass empty string instead
5856 of NULL for excep_string argument.
5858 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5860 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5861 the width of the requested register exceeds the width of the
5864 2018-05-21 Tom Tromey <tom@tromey.com>
5866 * printcmd.c (output_command): Remove.
5867 (output_command_const): Rename to output_command.
5868 * valprint.h (output_command): Rename from output_command_const.
5869 * tracepoint.c (trace_dump_actions): Call output_command.
5871 2018-05-21 Tom Tromey <tom@tromey.com>
5873 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5874 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5875 * ada-lang.h (create_ada_exception_catchpoint): Update.
5876 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5878 (create_excep_cond_exprs, ~ada_catchpoint)
5879 (should_stop_exception, print_one_exception)
5880 (print_mention_exception, print_recreate_exception): Update.
5881 (ada_get_next_arg): Remove.
5882 (catch_ada_exception_command_split): Use std::string. Change type
5883 of "excep_string", "cond_string".
5884 (catch_ada_exception_command): Update.
5885 (create_ada_exception_catchpoint): Change type of excep_string.
5886 (ada_exception_sal): Remove excep_string parameter.
5887 (~ada_catchpoint): Remove.
5889 2018-05-21 Tom Tromey <tom@tromey.com>
5891 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5894 2018-05-21 Tom Tromey <tom@tromey.com>
5896 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5897 Return unique_xmalloc_ptr.
5898 (print_it_exception): Update.
5900 2018-05-21 Tom Tromey <tom@tromey.com>
5902 * tracepoint.c (trace_dump_actions): Use std::string.
5904 2018-05-21 Tom Tromey <tom@tromey.com>
5906 * symfile.c (reread_symbols): Use std::string for original_name.
5908 2018-05-21 Tom Tromey <tom@tromey.com>
5910 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5911 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5914 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5916 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5918 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5919 * objfiles.c (get_objfile_bfd_data): Allocate
5920 objfile_per_bfd_storage with obstack_new when allocating on
5923 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5925 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5927 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5928 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5929 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5930 (add_pending): Likewise.
5931 (parse_symbol): Likewise.
5932 (parse_partial_symbols): Likewise.
5933 (psymtab_to_symtab_1): Likewise.
5934 (new_psymtab): Likewise.
5935 (elfmdebug_build_psymtabs): Likewise.
5936 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5937 * objfiles.c (get_objfile_bfd_data): Likewise.
5938 (objfile_register_static_link): Likewise.
5939 * psymtab.c (allocate_psymtab): Likewise.
5940 * stabsread.c (read_member_functions): Likewise.
5941 * xcoffread.c (xcoff_end_psymtab): Likewise.
5943 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5945 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5946 compiler supports std::is_trivially_constructible.
5947 * common/poison.h: Include obstack.h.
5948 (IsMallocable): Define to is_trivially_constructible if the
5949 compiler supports it, define to true_type otherwise.
5953 (XOBNEWVEC): Redefine.
5954 * gdb_obstack.h (obstack_zalloc): New.
5955 (OBSTACK_ZALLOC): Redefine.
5956 (obstack_calloc): New.
5957 (OBSTACK_CALLOC): Redefine.
5959 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5960 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5962 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5963 obstack_calloc/obstack_zalloc.
5964 (gdbarch_obstack_zalloc): Remove.
5965 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5967 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5969 * stack.c (backtrace_command_1): Remove useless variable int i.
5971 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5973 * stack.c (print_frame_info): Fix comment.
5975 2018-05-18 Tom Tromey <tom@tromey.com>
5977 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
5978 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
5979 (~dwarf2_per_objfile): Update
5980 (dwarf2_get_dwz_file): Use new.
5981 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
5984 2018-05-18 Tom Tromey <tom@tromey.com>
5986 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
5988 * dwarf2read.c (struct dwp_file): Add constructor and
5990 (open_and_init_dwp_file): Return a unique_ptr.
5991 (dwarf2_per_objfile, create_dwp_hash_table)
5992 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
5993 (lookup_dwo_unit_in_dwp): Update.
5994 (open_and_init_dwp_file, get_dwp_file): Update.
5996 2018-05-18 Tom Tromey <tom@tromey.com>
5998 * dwarf2read.c (dwarf2_per_objfile): Update.
5999 (struct mapped_index): Add initializers.
6000 (dwarf2_read_index): Use new.
6001 (dw2_symtab_iter_init): Update.
6002 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6005 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6007 * dwarf2read.c (mapped_index) <total_size>: Remove.
6009 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6011 * unittests/format_pieces-selftests.c (test_format_specifier):
6014 2018-05-18 Tom Tromey <tom@tromey.com>
6016 * c-typeprint.c (maybe_print_hole): New function.
6017 (c_print_type_struct_field_offset): Update.
6018 (c_type_print_base_struct_union): Call maybe_print_hole.
6020 2018-05-17 Keith Seitz <keiths@redhat.com>
6022 * breakpoint.c (build_bpstat_chain): New function, moved from
6024 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6025 If no stop chain is passed, call build_bpstat_chain to build it.
6026 * breakpoint.h (build_bpstat_chain): Declare.
6027 (bpstat_stop_status): Move documentation here from breakpoint.c.
6028 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6029 build the stop chain and pass it to skip_inline_frames.
6030 Pass this stop chain to bpstat_stop_status.
6031 * inline-frame.c: Include breakpoint.h.
6032 (stopped_by_user_bp_inline_frame): New function.
6033 (skip_inline_frames): Add parameter `stop_chain'.
6034 Move documention to inline-frame.h.
6035 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6036 whether the frame should be elided.
6037 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6038 Add moved documentation and update for new parameter.
6040 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6043 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6044 unittests/format_pieces-selftests.c.
6045 * common/format.h (format_piece) <operator==>: New.
6046 (format_pieces) <operator[]>: Remove.
6047 * common/format.c (format_pieces::format_pieces): Handle \e.
6048 * unittests/format_pieces-selftests.c: New.
6050 2018-05-17 Tom Tromey <tom@tromey.com>
6053 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6054 (dw2_instantiate_symtab): Add skip_partial parameter.
6055 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6056 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6057 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6058 (dw2_expand_symtabs_matching_one)
6059 (dw2_find_pc_sect_compunit_symtab)
6060 (dw2_debug_names_lookup_symbol)
6061 (dw2_debug_names_expand_symtabs_for_function): Update.
6062 (init_cutu_and_read_dies): Add skip_partial parameter.
6063 (process_psymtab_comp_unit, build_type_psymtabs_1)
6064 (process_skeletonless_type_unit, load_partial_comp_unit)
6065 (psymtab_to_symtab_1): Update.
6066 (load_full_comp_unit): Add skip_partial parameter.
6067 (process_imported_unit_die, dwarf2_read_addr_index)
6068 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6069 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6070 (read_signatured_type): Update.
6072 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6074 * value.c (release_value): Remove unused variable.
6075 (record_latest_value): Likewise.
6076 (access_value_history): Likewise.
6077 (preserve_values): Likewise.
6079 2018-05-17 Tom Tromey <tom@tromey.com>
6081 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6084 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6087 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6088 Also handle registers whose width is not a multiple of
6090 (linux_nat_trad_target::store_register): Likewise.
6092 2018-05-16 Tom Tromey <tom@tromey.com>
6094 * gdbcore.h (core_bfd): Redefine.
6095 * corelow.c (core_target::close): Update.
6096 (core_target_open): Update.
6097 * progspace.h (struct program_space) <cbfd>: Now a
6100 2018-05-16 Tom Tromey <tom@tromey.com>
6103 * symfile-add-flags.h (enum symfile_add_flags)
6104 <SYMFILE_NOT_FILENAME>: New constant.
6105 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6106 objfile name from BFD.
6107 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6108 * minidebug.c (find_separate_debug_file_in_section): Put
6109 ".gnu_debugdata" into BFD's file name.
6111 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6113 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6116 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6119 * aarch64-tdep.c (aarch64_analyze_prologue,
6120 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6121 Indicate not interested in errors.
6123 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6125 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6126 Supply the MIPS_ZERO_REGNUM register.
6128 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6130 * mips-tdep.c (mask_address_var): Make variable static.
6132 2018-05-14 Tom Tromey <tom@tromey.com>
6134 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6136 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6138 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6139 FXSAVE_ADDR for the mxcsr register.
6141 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6143 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6145 2018-05-11 Pedro Alves <palves@redhat.com>
6147 * corelow.c (core_target) <core_target>: No longer inline.
6148 Initialize m_core_gdbarch, m_core_vec and build the section table
6150 <~core_target>: New.
6151 <core_gdbarch, get_core_register_section>: New methods.
6152 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6153 factored out from ...
6154 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6156 (sniff_core_bfd): Add gdbarch parameter.
6157 (core_close): Delete, merged into ...
6158 (core_target::close): ... here. Delete self.
6159 (core_close_cleanup): Delete.
6160 (core_target_open): Allocate a core_target on the heap. Use a
6161 unique_ptr instead of a cleanup. Bits moved into the core_target
6162 ctor. Adjust to use core_target methods instead of globals.
6163 (get_core_register_section): Rename to ...
6164 (core_target::get_core_register_section): ... this and adjust.
6165 (struct get_core_registers_cb_data): New.
6166 (get_core_registers_cb): Use it. Use bool.
6167 (core_target::fetch_registers, core_target::files_info)
6168 (core_target::xfer_partial, core_target::read_description)
6169 (core_target::pid_to, core_target::thread_name): Adjust to
6170 reference class fields instead of globals.
6171 * target.h (struct target_ops_deleter, target_ops_up): New.
6173 2018-05-11 Pedro Alves <palves@redhat.com>
6175 * corefile.c (core_file_command): Move to corelow.c.
6176 * corelow.c (the_core_target): Delete.
6177 (core_file_command): Moved from corefile.c. Check exec_bfd
6178 instead of the_core_target. Use target_detach instead of calling
6179 into the_core_target directly.
6180 (maybe_say_no_core_file_now): New.
6181 (core_target::detach): Use it.
6182 (_initialize_corelow): Remove references to the_core_target.
6183 * gdbcore.h (the_core_target): Delete.
6185 2018-05-11 Tom Tromey <tromey@redhat.com>
6186 Pedro Alves <palves@redhat.com>
6188 * corefile.c (core_bfd): Remove.
6189 * gdbcore.h (core_bfd): Now a macro.
6190 * progspace.h (struct program_space) <cbfd>: New field.
6192 2018-05-11 Tom Tromey <tom@tromey.com>
6194 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6197 2018-05-10 Tom Tromey <tom@tromey.com>
6199 * configure: Rebuild.
6200 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6202 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6205 * regformats/regdat.sh: Adjust script, following the addition
6206 of the new expedite_regs parameter to init_target_desc.
6208 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6211 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6212 set_gdbarch_significant_addr_bit.
6213 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6214 set_gdbarch_significant_addr_bit.
6215 * utils.c (address_significant): Update to sign extend addr.
6217 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6219 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6220 (xtensa_linux_init_abi): Limit tdep->num_regs by
6221 tdep->num_nopriv_regs.
6222 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6223 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6226 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6228 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6230 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6232 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6233 (I387_MXCSR_INIT_VAL): New constant.
6234 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6235 buffer if it was supplied by the inferior.
6236 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6237 (i387_xsave_get_clear_bv): New function.
6238 (i387_supply_xsave): Only read x87 control registers from the
6239 xsave buffer if the feature is enabled, and the state will have
6240 been written, otherwise, provide a suitable default.
6241 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6242 including x87 control registers. Update control registers if they
6243 have changed from the default value, and mark features as enabled
6245 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6247 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6249 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6251 2018-05-07 Tom Tromey <tom@tromey.com>
6253 * configure: Rebuild.
6254 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6256 2018-05-07 Tom Tromey <tom@tromey.com>
6259 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6260 bit. Use correct value for VDIV.
6262 2018-05-04 Tom Tromey <tom@tromey.com>
6264 * configure: Rebuild.
6265 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6267 2018-05-04 Tom Tromey <tom@tromey.com>
6269 * linux-record.c (record_linux_system_call) <case
6270 RECORD_SYS_RECVFROM>: Add "break".
6272 2018-05-04 Tom Tromey <tom@tromey.com>
6274 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6275 Add missing "break".
6276 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6277 Add missing "break".
6279 2018-05-04 Tom Tromey <tom@tromey.com>
6281 * rs6000-tdep.c (ppc_process_record_op4)
6282 (ppc_process_record_op63): Add fall-through comment.
6284 2018-05-04 Tom Tromey <tom@tromey.com>
6286 * i386-tdep.c (i386_process_record): Add fall-through comment.
6288 2018-05-04 Tom Tromey <tom@tromey.com>
6290 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6293 2018-05-04 Tom Tromey <tom@tromey.com>
6295 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6296 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6297 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6299 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6301 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6304 2018-05-04 Tom Tromey <tom@tromey.com>
6306 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6308 2018-05-04 Tom Tromey <tom@tromey.com>
6310 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6311 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6312 * symfile.c (section_is_mapped): Fix fall-through comment.
6313 * stabsread.c (define_symbol, read_member_functions): Fix
6314 fall-through comment.
6315 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6317 * remote.c (remote_wait_as): Fix fall-through comment.
6318 * p-exp.y (yylex): Fix fall-through comment.
6319 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6321 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6322 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6323 * jv-exp.y (yylex): Fix fall-through comment.
6324 * go-exp.y (lex_one_token): Fix fall-through comment.
6325 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6326 fall-through comment.
6327 * f-exp.y (yylex): Fix fall-through comment.
6328 * dwarf2read.c (process_die): Fix fall-through comments.
6329 * dbxread.c (process_one_symbol): Fix fall-through comment.
6330 * d-exp.y (lex_one_token): Fix fall-through comment.
6331 * cp-name-parser.y (yylex): Fix fall-through comment.
6332 * coffread.c (coff_symtab_read): Fix fall-through comment.
6333 * c-exp.y (lex_one_token): Fix fall-through comment.
6334 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6336 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6339 2018-05-04 Tom Tromey <tom@tromey.com>
6342 * NEWS: Mention gdb.execute change.
6343 * gdbcmd.h (execute_control_command): Don't declare.
6344 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6345 execute_control_commands, execute_control_commands_to_string.
6346 * cli/cli-script.h (execute_control_commands)
6347 (execute_control_commands_to_string): Declare.
6348 (execute_control_command): Add from_tty parameter.
6349 * cli/cli-script.c (execute_control_commands)
6350 (execute_control_commands_to_string): New functions.
6351 (execute_user_command): Use execute_control_commands.
6352 (execute_control_command_1): Add "from_tty" parameter. Update.
6353 (execute_control_command): Likewise.
6355 2018-05-04 Tom Tromey <tom@tromey.com>
6358 * NEWS: Mention that breakpoint commands are writable.
6359 * python/py-breakpoint.c (bppy_set_commands): New function.
6360 (breakpoint_object_getset) <"commands">: Use it.
6362 2018-05-04 Tom Tromey <tom@tromey.com>
6364 * tracepoint.c (actions_command): Update.
6365 * mi/mi-cmd-break.c (mi_command_line_array)
6366 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6367 (mi_read_next_line): Remove.
6368 (mi_cmd_break_commands): Update.
6369 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6371 * cli/cli-script.c (get_command_line): Update.
6372 (process_next_line): Use function_view. Constify.
6373 (recurse_read_control_structure, read_command_lines)
6374 (read_command_lines_1): Change argument types to function_view.
6375 (do_define_command, document_command): Update.
6376 * breakpoint.h (check_tracepoint_command): Don't declare.
6377 * breakpoint.c (check_tracepoint_command): Remove.
6378 (commands_command_1, create_tracepoint_from_upload): Update.
6380 2018-05-04 Tom Tromey <tom@tromey.com>
6383 * cli/cli-script.h (enum command_control_type) <define_control>:
6385 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6386 (build_command_line, execute_control_command_1)
6387 (process_next_line): Likewise.
6388 (do_define_command): New function, extracted from define_command.
6389 (define_command): Use it.
6391 2018-05-04 Tom Tromey <tom@tromey.com>
6393 * tracepoint.c (actions_command): Update.
6394 * cli/cli-script.h (read_command_lines): Update.
6395 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6396 (MAX_TMPBUF): Remove define.
6397 (define_command): Use string_printf.
6398 (document_command): Likewise.
6399 * breakpoint.c (commands_command_1): Update.
6401 2018-05-04 Tom Tromey <tom@tromey.com>
6403 * top.c (execute_command): Update.
6404 * cli/cli-script.h (print_command_lines): Now varargs.
6405 * cli/cli-script.c (print_command_lines): Now varargs.
6406 (execute_control_command_1) <case while_control, case if_control>:
6409 2018-05-04 Tom Tromey <tom@tromey.com>
6411 * tracepoint.c (all_tracepoint_actions): Rename from
6412 all_tracepoint_actions_and_cleanup. Change return type.
6413 (actions_command, encode_actions_1, encode_actions)
6414 (trace_dump_actions, tdump_command): Update.
6415 * remote.c (remote_download_command_source): Update.
6416 * python/python.c (gdbpy_eval_from_control_command)
6417 (python_command, python_interactive_command): Update.
6418 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6419 * guile/guile.c (guile_command)
6420 (gdbscm_eval_from_control_command, guile_command): Update.
6421 * compile/compile.c (compile_code_command)
6422 (compile_print_command, compile_to_object): Update.
6423 * cli/cli-script.h (struct command_lines_deleter): New.
6424 (counted_command_line): New typedef.
6425 (struct command_line): Add constructor, destructor.
6426 <body_list>: Remove.
6427 <body_list_0, body_list_1>: New members.
6428 (command_line_up): Remove typedef.
6429 (read_command_lines, read_command_lines_1, get_command_line):
6431 (copy_command_lines): Don't declare.
6432 * cli/cli-script.c (build_command_line): Use "new".
6433 (get_command_line): Return counted_command_line.
6434 (print_command_lines, execute_user_command)
6435 (execute_control_command_1, while_command, if_command): Update.
6436 (realloc_body_list): Remove.
6437 (process_next_line, recurse_read_control_structure): Update.
6438 (read_command_lines, read_command_lines_1): Return counted_command_line.
6439 (free_command_lines): Use "delete".
6440 (copy_command_lines): Remove.
6441 (define_command, document_command, show_user_1): Update.
6442 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6443 a counted_command_line.
6444 * breakpoint.h (counted_command_line): Remove typedef.
6445 (breakpoint_set_commands): Update.
6446 * breakpoint.c (check_no_tracepoint_commands)
6447 (validate_commands_for_breakpoint): Update.
6448 (breakpoint_set_commands): Change commands to be a
6449 counted_command_line.
6450 (commands_command_1, update_dprintf_command_list)
6451 (create_tracepoint_from_upload): Update.
6453 2018-05-04 Tom Tromey <tom@tromey.com>
6455 * cli/cli-decode.h (cmd_list_element): New constructor.
6456 (~cmd_list_element): New destructor.
6457 (struct cmd_list_element): Add initializers.
6458 * cli/cli-decode.c (do_add_cmd): Use "new".
6459 (delete_cmd): Use "delete".
6461 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6462 Pedro Alves <palves@redhat.com>
6464 PR breakpoints/19806 and support for PR external/20207.
6465 * NEWS: Mention Aarch64 watchpoint improvements.
6466 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6467 watchpoints and PR external/20207 watchpoints.
6468 * nat/aarch64-linux-hw-point.c
6469 (kernel_supports_any_contiguous_range): New.
6470 (aarch64_watchpoint_offset): New.
6471 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6472 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6473 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6474 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6475 next_addr_orig_p. Support PR external/20207 watchpoints.
6476 (aarch64_downgrade_regs): New.
6477 (aarch64_dr_state_insert_one_point): New parameters offset and
6479 (aarch64_dr_state_remove_one_point): Likewise.
6480 (aarch64_handle_breakpoint): Update caller.
6481 (aarch64_handle_aligned_watchpoint): Likewise.
6482 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6484 (aarch64_linux_set_debug_regs): Remove const from state. Call
6485 aarch64_downgrade_regs.
6486 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6487 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6488 (DR_CONTROL_MASK): ... this.
6489 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6490 (unsigned int aarch64_watchpoint_offset): New prototype.
6491 (aarch64_linux_set_debug_regs): Remove const from state.
6492 * utils.c (align_up, align_down): Move to ...
6493 * common/common-utils.c (align_up, align_down): ... here.
6494 * utils.h (align_up, align_down): Move to ...
6495 * common/common-utils.h (align_up, align_down): ... here.
6497 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6499 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6500 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6501 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6502 Re-implement to match the ABI as summarized in GCC's
6503 gcc/config/sparc/sparc.c. All callers updated.
6504 (sparc32_store_arguments): Remove assertion.
6506 2018-05-04 Tom Tromey <tom@tromey.com>
6508 * printcmd.c: Don't include tui.h.
6509 (decode_format): Use skip_spaces.
6511 2018-05-04 Tom Tromey <tom@tromey.com>
6514 * printcmd.c (last_count): New global.
6515 (x_command): Use saved count when repeating.
6517 2018-05-04 Tom Tromey <tom@tromey.com>
6519 * nto-procfs.c (do_closedir_cleanup): Remove.
6520 (procfs_pidlist): Use gdb_dir_up.
6521 * procfs.c (do_closedir_cleanup): Remove.
6522 (proc_update_threads): Use gdb_dir_up.
6523 * common/filestuff.h (struct gdb_dir_deleter): New.
6524 (gdb_dir_up): New typedef.
6526 2018-05-04 Tom Tromey <tom@tromey.com>
6528 * ada-lang.c (print_mention_exception): Use std::string.
6530 2018-05-04 Tom Tromey <tom@tromey.com>
6532 * ada-lang.c (create_excep_cond_exprs): Update.
6533 (ada_exception_catchpoint_cond_string): Use std::string.
6535 2018-05-04 Tom Tromey <tom@tromey.com>
6537 * ada-lang.c (xget_renaming_scope): Return std::string.
6538 (old_renaming_is_invisible): Update.
6540 2018-05-04 Tom Tromey <tom@tromey.com>
6542 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6543 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6545 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6547 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6549 2018-05-04 Tom Tromey <tom@tromey.com>
6551 * remote.c (remote_query_supported_append): Change type.
6552 (remote_check_symbols): Update.
6554 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6557 * configure.ac: Prepend libpython.
6558 * python/python-config.py: Likewise.
6559 * configure: Regenerate.
6561 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6563 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6565 2018-05-03 Pedro Alves <palves@redhat.com>
6568 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6569 override. Write 'true' instead of '1'.
6570 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6573 2018-05-02 Pedro Alves <palves@redhat.com>
6575 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6576 add_inf_child_target.
6577 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6578 add_inf_child_target.
6579 * aix-thread.c (aix_thread_target_info): New.
6580 (aix_thread_target) <shortname, longname, doc>: Delete.
6582 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6583 add_inf_child_target.
6584 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6585 add_inf_child_target.
6586 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6587 add_inf_child_target.
6588 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6589 add_inf_child_target.
6590 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6591 add_inf_child_target.
6592 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6593 add_inf_child_target.
6594 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6595 add_inf_child_target.
6596 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6597 add_inf_child_target.
6598 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6599 add_inf_child_target.
6600 * bfd-target.c (target_bfd_target_info): New.
6601 (target_bfd) <shortname, longname, doc>: Delete.
6603 * bsd-kvm.c (bsd_kvm_target_info): New.
6604 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6606 (bsd_kvm_target::open): Rename to ...
6607 (bsd_kvm_target_open): ... this. Adjust.
6608 * bsd-uthread.c (bsd_uthread_target_info): New.
6609 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6611 * corefile.c (core_file_command): Adjust.
6612 * corelow.c (core_target_info): New.
6613 (core_target) <shortname, longname, doc>: Delete.
6615 (core_target::open): Rename to ...
6616 (core_target_open): ... this. Adjust.
6617 * ctf.c (ctf_target_info): New.
6618 (ctf_target) <shortname, longname, doc>: Delete.
6620 (ctf_target::open): Rename to ...
6621 (ctf_target_open): ... this.
6622 (_initialize_ctf): Adjust.
6623 * exec.c (exec_target_info): New.
6624 (exec_target) <shortname, longname, doc>: Delete.
6626 (exec_target::open): Rename to ...
6627 (exec_target_open): ... this.
6628 * gdbcore.h (core_target_open): Declare.
6629 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6630 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6631 add_inf_child_target.
6632 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6633 add_inf_child_target.
6634 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6635 add_inf_child_target.
6636 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6637 add_inf_child_target.
6638 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6639 add_inf_child_target.
6640 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6641 add_inf_child_target.
6642 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6643 add_inf_child_target.
6644 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6645 add_inf_child_target.
6646 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6647 add_inf_child_target.
6648 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6649 add_inf_child_target.
6650 * inf-child.c (inf_child_target_info): New.
6651 (inf_child_target::info): New.
6652 (inf_child_open_target): Remove 'target' parameter. Use
6653 get_native_target instead.
6654 (inf_child_target::open): Delete.
6655 (add_inf_child_target): New.
6656 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6659 (add_inf_child_target): Declare.
6660 (inf_child_open_target): Declare.
6661 * linux-thread-db.c (thread_db_target_info): New.
6662 (thread_db_target) <shortname, longname, doc>: Delete.
6664 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6665 add_inf_child_target.
6666 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6667 add_inf_child_target.
6668 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6669 add_inf_child_target.
6670 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6671 add_inf_child_target.
6672 * make-target-delegates (print_class): Adjust.
6673 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6674 add_inf_child_target.
6675 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6676 add_inf_child_target.
6677 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6678 add_inf_child_target.
6679 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6680 add_inf_child_target.
6681 * nto-procfs.c (nto_native_target_info): New.
6682 (nto_procfs_target_native) <shortname, longname, doc>:
6685 (nto_procfs_target_info): New.
6686 (nto_procfs_target_procfs) <shortname, longname, doc>:
6689 (init_procfs_targets): Adjust.
6690 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6691 add_inf_child_target.
6692 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6693 add_inf_child_target.
6694 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6695 add_inf_child_target.
6696 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6697 add_inf_child_target.
6698 * ravenscar-thread.c (ravenscar_target_info): New.
6699 (ravenscar_thread_target) <shortname, longname, doc>:
6702 * record-btrace.c (record_btrace_target_info):
6703 (record_btrace_target) <shortname, longname, doc>: Delete.
6705 (record_btrace_target::open): Rename to ...
6706 (record_btrace_target_open): ... this. Adjust.
6707 * record-full.c (record_longname, record_doc): New.
6708 (record_full_base_target) <shortname, longname, doc>: Delete.
6710 (record_full_target_info): New.
6711 (record_full_target): <shortname>: Delete.
6713 (record_full_core_open_1, record_full_open_1): Update comments.
6714 (record_full_base_target::open): Rename to ...
6715 (record_full_open): ... this.
6716 (cmd_record_full_restore): Update.
6717 (_initialize_record_full): Update.
6718 * remote-sim.c (remote_sim_target_info): New.
6719 (gdbsim_target) <shortname, longname, doc>: Delete.
6721 (gdbsim_target::open): Rename to ...
6722 (gdbsim_target_open): ... this.
6723 (_initialize_remote_sim): Adjust.
6724 * remote.c (remote_doc): New.
6725 (remote_target_info): New.
6726 (remote_target) <shortname, longname, doc>: Delete.
6728 (extended_remote_target_info): New.
6729 (extended_remote_target) <shortname, longname, doc>: Delete.
6731 (remote_target::open_1): Make static. Adjust.
6732 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6733 * s390-linux-nat.c (_initialize_s390_nat): Use
6734 add_inf_child_target.
6735 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6736 add_inf_child_target.
6737 * sol-thread.c (thread_db_target_info): New.
6738 (sol_thread_target) <shortname, longname, doc>: Delete.
6740 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6741 add_inf_child_target.
6742 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6743 add_inf_child_target.
6744 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6745 add_inf_child_target.
6746 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6747 add_inf_child_target.
6748 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6749 add_inf_child_target.
6750 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6751 add_inf_child_target.
6752 * spu-linux-nat.c (_initialize_spu_nat): Use
6753 add_inf_child_target.
6754 * spu-multiarch.c (spu_multiarch_target_info): New.
6755 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6757 * target-delegates.c: Regenerate.
6758 * target.c: Include <unordered_map>.
6759 (target_ops_p): Delete.
6760 (DEF_VEC_P(target_ops_p)): Delete.
6761 (target_factories): New.
6762 (test_target_info): New.
6763 (test_target_ops::info): New.
6764 (open_target): Adjust to use target_factories.
6765 (add_target_with_completer): Rename to ...
6766 (add_target): ... this. Change prototype. Register target_info
6767 and open callback in target_factories. Register target_info in
6768 command context instead of target_ops.
6769 (add_target): Delete old implementation.
6770 (add_deprecated_target_alias): Change prototype. Adjust.
6771 (the_native_target): New.
6772 (set_native_target, get_native_target): New.
6773 (find_default_run_target): Use the_native_target.
6774 (find_attach_target, find_run_target): Simplify.
6775 (target_ops::open): Delete.
6776 (dummy_target_info): New.
6777 (dummy_target::shortname, dummy_target::longname)
6778 (dummy_target::doc): Delete.
6779 (dummy_target::info): New.
6780 (debug_target::shortname, debug_target::longname)
6781 (debug_target::doc): Delete.
6782 (debug_target::info): New.
6783 * target.h (struct target_info): New.
6784 (target_ops::~target_ops): Add comment.
6785 (target_ops::info): New.
6786 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6787 longer virtual. Implement in terms of target_info.
6788 (set_native_target, get_native_target): Declare.
6789 (target_open_ftype): New.
6790 (add_target, add_target_with_completer)
6791 (add_deprecated_target_alias): Change prototype.
6792 (test_target) <shortname, longname, doc>: Delete.
6794 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6795 add_inf_child_target.
6796 * tracefile-tfile.c (tfile_target_info): New.
6797 (tfile_target) <shortname, longname, doc>: Delete.
6799 (tfile_target::open): Rename to ...
6800 (tfile_target_open): ... this.
6801 (_initialize_tracefile_tfile): Adjust.
6802 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6803 add_inf_child_target.
6804 * windows-nat.c (_initialize_windows_nat): Use
6805 add_inf_child_target.
6806 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6807 add_inf_child_target.
6809 2018-05-02 Pedro Alves <palves@redhat.com>
6811 * linux-nat.h (linux_nat_target) <low_new_thread,
6812 low_delete_thread, low_new_fork, low_forget_process,
6813 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6814 New virtual methods.
6815 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6816 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6817 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6818 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6819 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6821 * linux-fork.c (delete_fork): Adjust to call low method.
6822 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6823 (linux_nat_new_fork, linux_nat_forget_process_hook)
6824 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6825 (linux_nat_status_is_event):
6826 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6827 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6829 (sigtrap_is_event): Rename to ...
6830 (linux_nat_target::low_status_is_event): ... this.
6831 (linux_nat_set_status_is_event): Delete.
6832 (save_stop_reason, linux_nat_wait_1)
6833 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6835 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6836 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6837 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6838 (linux_nat_set_prepare_to_resume): Delete.
6839 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6840 low virtual methods.
6841 * amd64-linux-nat.c: Likewise.
6842 * arm-linux-nat.c: Likewise.
6843 * i386-linux-nat.c: Likewise.
6844 * ia64-linux-nat.c: Likewise.
6845 * mips-linux-nat.c: Likewise.
6846 * ppc-linux-nat.c: Likewise.
6847 * s390-linux-nat.c: Likewise.
6848 * sparc64-linux-nat.c: Likewise.
6849 * x86-linux-nat.c: Likewise.
6850 * x86-linux-nat.h: Include "nat/x86-linux.h".
6851 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6852 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6855 2018-05-02 Pedro Alves <palves@redhat.com>
6857 * target.h (target_ops)
6858 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6859 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6860 stopped_by_watchpoint, have_continuable_watchpoint,
6861 stopped_data_address, watchpoint_addr_within_range,
6862 can_accel_watchpoint_condition, can_run, thread_alive,
6863 has_all_memory, has_memory, has_stack, has_registers,
6864 has_execution, can_async_p, is_async_p, supports_non_stop,
6865 always_non_stop_p, can_execute_reverse, supports_multi_process,
6866 supports_enable_disable_tracepoint,
6867 supports_disable_randomization, supports_string_tracing,
6868 supports_evaluation_of_breakpoint_conditions,
6869 can_run_breakpoint_commands, filesystem_is_local,
6870 can_download_tracepoint, get_trace_state_variable_value,
6871 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6872 record_is_replaying, record_will_replay,
6873 augmented_libraries_svr4_read>: Adjust to return bool.
6874 * aarch64-linux-nat.c: All implementations adjusted.
6875 * aix-thread.c: All implementations adjusted.
6876 * arm-linux-nat.c: All implementations adjusted.
6877 * breakpoint.c: All implementations adjusted.
6878 * bsd-kvm.c: All implementations adjusted.
6879 * bsd-uthread.c: All implementations adjusted.
6880 * corelow.c: All implementations adjusted.
6881 * ctf.c: All implementations adjusted.
6882 * darwin-nat.c: All implementations adjusted.
6883 * darwin-nat.h: All implementations adjusted.
6884 * exec.c: All implementations adjusted.
6885 * fbsd-nat.c: All implementations adjusted.
6886 * fbsd-nat.h: All implementations adjusted.
6887 * gnu-nat.c: All implementations adjusted.
6888 * gnu-nat.h: All implementations adjusted.
6889 * go32-nat.c: All implementations adjusted.
6890 * ia64-linux-nat.c: All implementations adjusted.
6891 * inf-child.c: All implementations adjusted.
6892 * inf-child.h: All implementations adjusted.
6893 * inf-ptrace.c: All implementations adjusted.
6894 * inf-ptrace.h: All implementations adjusted.
6895 * linux-nat.c: All implementations adjusted.
6896 * linux-nat.h: All implementations adjusted.
6897 * mips-linux-nat.c: All implementations adjusted.
6898 * nto-procfs.c: All implementations adjusted.
6899 * ppc-linux-nat.c: All implementations adjusted.
6900 * procfs.c: All implementations adjusted.
6901 * ravenscar-thread.c: All implementations adjusted.
6902 * record-btrace.c: All implementations adjusted.
6903 * record-full.c: All implementations adjusted.
6904 * remote-sim.c: All implementations adjusted.
6905 * remote.c: All implementations adjusted.
6906 * s390-linux-nat.c: All implementations adjusted.
6907 * sol-thread.c: All implementations adjusted.
6908 * spu-multiarch.c: All implementations adjusted.
6909 * target-delegates.c: All implementations adjusted.
6910 * target.c: All implementations adjusted.
6911 * target.h: All implementations adjusted.
6912 * tracefile-tfile.c: All implementations adjusted.
6913 * tracefile.c: All implementations adjusted.
6914 * tracefile.h: All implementations adjusted.
6915 * windows-nat.c: All implementations adjusted.
6916 * x86-linux-nat.h: All implementations adjusted.
6917 * x86-nat.h: All implementations adjusted.
6919 2018-05-02 Pedro Alves <palves@redhat.com>
6921 * make-target-delegates (scan_target_h): Don't trim lines here.
6922 Replace sequences of tabs and/or whitespace with a single
6924 (top level, parsing methods): Trim each line before processing it
6927 2018-05-02 Pedro Alves <palves@redhat.com>
6928 John Baldwin <jhb@freebsd.org>
6930 * target.h (enum strata) <debug_stratum>: New.
6931 (struct target_ops) <all delegation methods>: Replace by C++
6932 virtual methods, and drop "to_" prefix. All references updated
6934 <to_shortname, to_longname, to_doc, to_data,
6935 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6936 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6937 virtual methods. All references updated throughout.
6938 <can_attach, supports_terminal_ours, can_create_inferior,
6939 get_thread_control_capabilities, attach_no_wait>: New
6941 <insert_breakpoint, remove_breakpoint>: Now
6942 TARGET_DEFAULT_NORETURN methods.
6943 <info_proc>: Now returns bool.
6945 (OPS_MAGIC): Delete.
6946 (current_target): Delete. All references replaced by references
6948 (target_stack): ... this. New.
6949 (target_shortname, target_longname): Adjust.
6950 (target_can_run): Now a function declaration.
6951 (default_child_has_all_memory, default_child_has_memory)
6952 (default_child_has_stack, default_child_has_registers)
6953 (default_child_has_execution): Remove target_ops parameter.
6954 (complete_target_initialization): Delete.
6955 (memory_breakpoint_target): New template class.
6956 (test_target_ops): Refactor as a C++ class with virtual methods.
6957 * make-target-delegates (NAME_PART): Tighten.
6958 (POINTER_PART, CP_SYMBOL): New.
6959 (SIMPLE_RETURN_PART): Reimplement.
6960 (VEC_RETURN_PART): Expect less.
6961 (RETURN_PART, VIRTUAL_PART): New.
6962 (METHOD): Adjust to C++ virtual methods.
6963 (scan_target_h): Remove reference to C99.
6964 (dname): Output "target_ops::" prefix.
6965 (write_function_header): Adjust to output a C++ class method.
6966 (write_declaration): New.
6967 (write_delegator): Adjust to output a C++ class method.
6968 (tdname): Output "dummy_target::" prefix.
6969 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6971 (tdefault_names, debug_names): Delete.
6972 (return_types, tdefaults, styles, argtypes_array): New.
6973 (top level): All methods are delegators.
6975 (top level): Print dummy_target and debug_target classes.
6976 * target-delegates.c: Regenerate.
6977 * target-debug.h (target_debug_print_enum_info_proc_what)
6978 (target_debug_print_thread_control_capabilities)
6979 (target_debug_print_thread_info_p): New.
6980 * target.c (dummy_target): Delete.
6981 (the_dummy_target, the_debug_target): New.
6982 (target_stack): Now extern.
6983 (set_targetdebug): Push/unpush debug target.
6984 (default_child_has_all_memory, default_child_has_memory)
6985 (default_child_has_stack, default_child_has_registers)
6986 (default_child_has_execution): Remove target_ops parameter.
6987 (complete_target_initialization): Delete.
6988 (add_target_with_completer): No longer call
6989 complete_target_initialization.
6990 (target_supports_terminal_ours): Use regular delegation.
6991 (update_current_target): Delete.
6992 (push_target): No longer check magic number. Don't call
6993 update_current_target.
6994 (unpush_target): Don't call update_current_target.
6995 (target_is_pushed): No longer check magic number.
6996 (target_require_runnable): Skip for all stratums over
6998 (target_ops::info_proc): New.
6999 (target_info_proc): Use find_target_at and
7000 find_default_run_target.
7001 (target_supports_disable_randomization): Use regular delegation.
7002 (target_get_osdata): Use find_target_at.
7003 (target_ops::open, target_ops::close, target_ops::can_attach)
7004 (target_ops::attach, target_ops::can_create_inferior)
7005 (target_ops::create_inferior, target_ops::can_run)
7006 (target_can_run): New.
7007 (default_fileio_target): Use regular delegation.
7008 (target_ops::fileio_open, target_ops::fileio_pwrite)
7009 (target_ops::fileio_pread, target_ops::fileio_fstat)
7010 (target_ops::fileio_close, target_ops::fileio_unlink)
7011 (target_ops::fileio_readlink): New.
7012 (target_fileio_open_1, target_fileio_unlink)
7013 (target_fileio_readlink): Always call the target method. Handle
7015 (return_zero, return_zero_has_execution): Delete.
7016 (init_dummy_target): Delete.
7017 (dummy_target::dummy_target, dummy_target::shortname)
7018 (dummy_target::longname, dummy_target::doc)
7019 (debug_target::debug_target, debug_target::shortname)
7020 (debug_target::longname, debug_target::doc): New.
7021 (target_supports_delete_record): Use regular delegation.
7022 (setup_target_debug): Delete.
7023 (maintenance_print_target_stack): Skip debug_stratum.
7024 (initialize_targets): Instantiate the_dummy_target and
7026 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7028 (target_auxv_search, fprint_target_auxv): Adjust.
7029 (info_auxv_command): Adjust to use target_stack.
7030 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7031 * exceptions.c (print_flush): Handle a NULL target_stack.
7032 * regcache.c (target_ops_no_register): Refactor as class with
7035 * exec.c (exec_target): New class.
7036 (exec_ops): Now an exec_target.
7037 (exec_open, exec_close_1, exec_get_section_table)
7038 (exec_xfer_partial, exec_files_info, exec_has_memory)
7039 (exec_make_note_section): Refactor as exec_target methods.
7040 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7042 (exec_target::find_memory_regions): New.
7043 (_initialize_exec): Don't call init_exec_ops.
7044 * gdbcore.h (exec_file_clear): Delete.
7046 * corefile.c (core_target): Delete.
7047 (core_file_command): Adjust.
7048 * corelow.c (core_target): New class.
7049 (the_core_target): New.
7050 (core_close): Remove target_ops parameter.
7051 (core_close_cleanup): Adjust.
7052 (core_target::close): New.
7053 (core_open, core_detach, get_core_registers, core_files_info)
7054 (core_xfer_partial, core_thread_alive, core_read_description)
7055 (core_pid_to_str, core_thread_name, core_has_memory)
7056 (core_has_stack, core_has_registers, core_info_proc): Rework as
7057 core_target methods.
7058 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7059 (_initialize_corelow): Initialize the_core_target.
7060 * gdbcore.h (core_target): Delete.
7061 (the_core_target): New.
7063 * ctf.c: (ctf_target): New class.
7064 (ctf_ops): Now a ctf_target.
7065 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7066 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7067 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7069 (init_ctf_ops): Delete.
7070 (_initialize_ctf): Don't call it.
7071 * tracefile-tfile.c (tfile_target): New class.
7072 (tfile_ops): Now a tfile_target.
7073 (tfile_open, tfile_close, tfile_files_info)
7074 (tfile_get_tracepoint_status, tfile_trace_find)
7075 (tfile_fetch_registers, tfile_xfer_partial)
7076 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7077 Refactor as tfile_target methods.
7078 (tfile_xfer_partial_features): Remove target_ops parameter.
7079 (init_tfile_ops): Delete.
7080 (_initialize_tracefile_tfile): Don't call it.
7081 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7082 (tracefile_has_stack, tracefile_has_registers)
7083 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7084 tracefile_target methods.
7085 (init_tracefile_ops): Delete.
7086 (tracefile_target::tracefile_target): New.
7087 * tracefile.h: Include "target.h".
7088 (tracefile_target): New class.
7089 (init_tracefile_ops): Delete.
7091 * spu-multiarch.c (spu_multiarch_target): New class.
7092 (spu_ops): Now a spu_multiarch_target.
7093 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7094 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7095 (spu_search_memory, spu_mourn_inferior): Refactor as
7096 spu_multiarch_target methods.
7097 (init_spu_ops): Delete.
7098 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7099 complete_target_initialization.
7101 * ravenscar-thread.c (ravenscar_thread_target): New class.
7102 (ravenscar_ops): Now a ravenscar_thread_target.
7103 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7104 (ravenscar_thread_alive, ravenscar_pid_to_str)
7105 (ravenscar_fetch_registers, ravenscar_store_registers)
7106 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7107 (ravenscar_stopped_by_hw_breakpoint)
7108 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7109 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7110 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7112 (init_ravenscar_thread_ops): Delete.
7113 (_initialize_ravenscar): Remove references to
7114 init_ravenscar_thread_ops and complete_target_initialization.
7116 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7117 (bsd_uthread_target): New class.
7118 (bsd_uthread_ops): Now a bsd_uthread_target.
7119 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7120 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7121 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7122 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7123 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7124 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7125 (bsd_uthread_target): Delete function.
7126 (_initialize_bsd_uthread): Remove reference to
7127 complete_target_initialization.
7129 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7130 (target_bfd): ... this new class.
7131 (target_bfd_xfer_partial, target_bfd_get_section_table)
7132 (target_bfd_close): Refactor as target_bfd methods.
7133 (target_bfd::~target_bfd): New.
7134 (target_bfd_reopen): Adjust.
7135 (target_bfd::close): New.
7137 * record-btrace.c (record_btrace_target): New class.
7138 (record_btrace_ops): Now a record_btrace_target.
7139 (record_btrace_open, record_btrace_stop_recording)
7140 (record_btrace_disconnect, record_btrace_close)
7141 (record_btrace_async, record_btrace_info)
7142 (record_btrace_insn_history, record_btrace_insn_history_range)
7143 (record_btrace_insn_history_from, record_btrace_call_history)
7144 (record_btrace_call_history_range)
7145 (record_btrace_call_history_from, record_btrace_record_method)
7146 (record_btrace_is_replaying, record_btrace_will_replay)
7147 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7148 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7149 (record_btrace_store_registers, record_btrace_prepare_to_store)
7150 (record_btrace_to_get_unwinder)
7151 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7152 (record_btrace_commit_resume, record_btrace_wait)
7153 (record_btrace_stop, record_btrace_can_execute_reverse)
7154 (record_btrace_stopped_by_sw_breakpoint)
7155 (record_btrace_supports_stopped_by_sw_breakpoint)
7156 (record_btrace_stopped_by_hw_breakpoint)
7157 (record_btrace_supports_stopped_by_hw_breakpoint)
7158 (record_btrace_update_thread_list, record_btrace_thread_alive)
7159 (record_btrace_goto_begin, record_btrace_goto_end)
7160 (record_btrace_goto, record_btrace_stop_replaying_all)
7161 (record_btrace_execution_direction)
7162 (record_btrace_prepare_to_generate_core)
7163 (record_btrace_done_generating_core): Refactor as
7164 record_btrace_target methods.
7165 (init_record_btrace_ops): Delete.
7166 (_initialize_record_btrace): Remove reference to
7167 init_record_btrace_ops.
7168 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7169 the execution_direction global.
7170 (record_full_base_target, record_full_target)
7171 (record_full_core_target): New classes.
7172 (record_full_ops): Now a record_full_target.
7173 (record_full_core_ops): Now a record_full_core_target.
7174 (record_full_target::detach, record_full_target::disconnect)
7175 (record_full_core_target::disconnect)
7176 (record_full_target::mourn_inferior, record_full_target::kill):
7178 (record_full_open, record_full_close, record_full_async): Refactor
7179 as methods of the record_full_base_target class.
7180 (record_full_resume, record_full_commit_resume): Refactor
7181 as methods of the record_full_target class.
7182 (record_full_wait, record_full_stopped_by_watchpoint)
7183 (record_full_stopped_data_address)
7184 (record_full_stopped_by_sw_breakpoint)
7185 (record_full_supports_stopped_by_sw_breakpoint)
7186 (record_full_stopped_by_hw_breakpoint)
7187 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7188 methods of the record_full_base_target class.
7189 (record_full_store_registers, record_full_xfer_partial)
7190 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7191 Refactor as methods of the record_full_target class.
7192 (record_full_can_execute_reverse, record_full_get_bookmark)
7193 (record_full_goto_bookmark, record_full_execution_direction)
7194 (record_full_record_method, record_full_info, record_full_delete)
7195 (record_full_is_replaying, record_full_will_replay)
7196 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7197 (record_full_stop_replaying): Refactor as methods of the
7198 record_full_base_target class.
7199 (record_full_core_resume, record_full_core_kill)
7200 (record_full_core_fetch_registers)
7201 (record_full_core_prepare_to_store)
7202 (record_full_core_store_registers, record_full_core_xfer_partial)
7203 (record_full_core_insert_breakpoint)
7204 (record_full_core_remove_breakpoint)
7205 (record_full_core_has_execution): Refactor
7206 as methods of the record_full_core_target class.
7207 (record_full_base_target::supports_delete_record): New.
7208 (init_record_full_ops): Delete.
7209 (init_record_full_core_ops): Delete.
7210 (record_full_save): Refactor as method of the
7211 record_full_base_target class.
7212 (_initialize_record_full): Remove references to
7213 init_record_full_ops and init_record_full_core_ops.
7215 * remote.c (remote_target, extended_remote_target): New classes.
7216 (remote_ops): Now a remote_target.
7217 (extended_remote_ops): Now an extended_remote_target.
7218 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7219 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7220 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7221 (remote_pass_signals, remote_set_syscall_catchpoint)
7222 (remote_program_signals, )
7223 (remote_thread_always_alive): Remove target_ops parameter.
7224 (remote_thread_alive, remote_thread_name)
7225 (remote_update_thread_list, remote_threads_extra_info)
7226 (remote_static_tracepoint_marker_at)
7227 (remote_static_tracepoint_markers_by_strid)
7228 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7229 (remote_open): Refactor as methods of remote_target.
7230 (extended_remote_open, extended_remote_detach)
7231 (extended_remote_attach, extended_remote_post_attach):
7232 (extended_remote_supports_disable_randomization)
7233 (extended_remote_create_inferior): : Refactor as method of
7234 extended_remote_target.
7235 (remote_set_permissions, remote_open_1, remote_detach)
7236 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7237 (remote_resume, remote_commit_resume, remote_stop)
7238 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7239 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7240 (remote_prepare_to_store, remote_store_registers)
7241 (remote_flash_erase, remote_flash_done, remote_files_info)
7242 (remote_kill, remote_mourn, remote_insert_breakpoint)
7243 (remote_remove_breakpoint, remote_insert_watchpoint)
7244 (remote_watchpoint_addr_within_range)
7245 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7246 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7247 (remote_supports_stopped_by_sw_breakpoint)
7248 (remote_stopped_by_hw_breakpoint)
7249 (remote_supports_stopped_by_hw_breakpoint)
7250 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7251 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7252 (remote_verify_memory): Refactor as methods of remote_target.
7253 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7255 (remote_xfer_partial, remote_get_memory_xfer_limit)
7256 (remote_search_memory, remote_rcmd, remote_memory_map)
7257 (remote_pid_to_str, remote_get_thread_local_address)
7258 (remote_get_tib_address, remote_read_description): Refactor as
7259 methods of remote_target.
7260 (remote_target::fileio_open, remote_target::fileio_pwrite)
7261 (remote_target::fileio_pread, remote_target::fileio_close): New.
7262 (remote_hostio_readlink, remote_hostio_fstat)
7263 (remote_filesystem_is_local, remote_can_execute_reverse)
7264 (remote_supports_non_stop, remote_supports_disable_randomization)
7265 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7266 (remote_supports_enable_disable_tracepoint)
7267 (remote_supports_string_tracing)
7268 (remote_can_run_breakpoint_commands, remote_trace_init)
7269 (remote_download_tracepoint, remote_can_download_tracepoint)
7270 (remote_download_trace_state_variable, remote_enable_tracepoint)
7271 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7272 (remote_trace_start, remote_get_trace_status)
7273 (remote_get_tracepoint_status, remote_trace_stop)
7274 (remote_trace_find, remote_get_trace_state_variable_value)
7275 (remote_save_trace_data, remote_get_raw_trace_data)
7276 (remote_set_disconnected_tracing, remote_core_of_thread)
7277 (remote_set_circular_trace_buffer, remote_traceframe_info)
7278 (remote_get_min_fast_tracepoint_insn_len)
7279 (remote_set_trace_buffer_size, remote_set_trace_notes)
7280 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7281 (remote_disable_btrace, remote_teardown_btrace)
7282 (remote_read_btrace, remote_btrace_conf)
7283 (remote_augmented_libraries_svr4_read, remote_load)
7284 (remote_pid_to_exec_file, remote_can_do_single_step)
7285 (remote_execution_direction, remote_thread_handle_to_thread_info):
7286 Refactor as methods of remote_target.
7287 (init_remote_ops, init_extended_remote_ops): Delete.
7288 (remote_can_async_p, remote_is_async_p, remote_async)
7289 (remote_thread_events, remote_upload_tracepoints)
7290 (remote_upload_trace_state_variables): Refactor as methods of
7292 (_initialize_remote): Remove references to init_remote_ops and
7293 init_extended_remote_ops.
7295 * remote-sim.c (gdbsim_target): New class.
7296 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7297 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7298 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7299 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7300 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7301 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7302 Refactor as methods of gdbsim_target.
7303 (gdbsim_ops): Now a gdbsim_target.
7304 (init_gdbsim_ops): Delete.
7305 (gdbsim_cntrl_c): Adjust.
7306 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7308 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7309 (the_amd64_linux_nat_target): New.
7310 (amd64_linux_fetch_inferior_registers)
7311 (amd64_linux_store_inferior_registers): Refactor as methods of
7312 amd64_linux_nat_target.
7313 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7314 * i386-linux-nat.c: Don't include "linux-nat.h".
7315 (i386_linux_nat_target): New class.
7316 (the_i386_linux_nat_target): New.
7317 (i386_linux_fetch_inferior_registers)
7318 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7319 as methods of i386_linux_nat_target.
7320 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7321 * inf-child.c (inf_child_ops): Delete.
7322 (inf_child_fetch_inferior_registers)
7323 (inf_child_store_inferior_registers): Delete.
7324 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7325 methods of inf_child_target.
7326 (inf_child_target::supports_terminal_ours)
7327 (inf_child_target::terminal_init)
7328 (inf_child_target::terminal_inferior)
7329 (inf_child_target::terminal_ours_for_output)
7330 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7331 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7333 (inf_child_open, inf_child_disconnect, inf_child_close)
7334 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7335 (inf_child_post_startup_inferior, inf_child_can_run)
7336 (inf_child_pid_to_exec_file): Refactor as methods of
7338 (inf_child_follow_fork): Delete.
7339 (inf_child_target::can_create_inferior)
7340 (inf_child_target::can_attach): New.
7341 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7342 (inf_child_target::has_stack, inf_child_target::has_registers)
7343 (inf_child_target::has_execution): New.
7344 (inf_child_fileio_open, inf_child_fileio_pwrite)
7345 (inf_child_fileio_pread, inf_child_fileio_fstat)
7346 (inf_child_fileio_close, inf_child_fileio_unlink)
7347 (inf_child_fileio_readlink, inf_child_use_agent)
7348 (inf_child_can_use_agent): Refactor as methods of
7350 (return_zero, inf_child_target): Delete.
7351 (inf_child_target::inf_child_target): New.
7352 * inf-child.h: Include "target.h".
7353 (inf_child_target): Delete function prototype.
7354 (inf_child_target): New class.
7355 (inf_child_open_target, inf_child_mourn_inferior)
7356 (inf_child_maybe_unpush_target): Delete.
7357 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7358 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7359 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7360 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7361 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7362 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7363 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7364 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7365 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7366 methods of inf_ptrace_target.
7367 (inf_ptrace_target): Delete function.
7368 * inf-ptrace.h: Include "inf-child.h".
7369 (inf_ptrace_target): Delete function declaration.
7370 (inf_ptrace_target): New class.
7371 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7372 * linux-nat.c (linux_target): New.
7373 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7374 (linux_nat_target::~linux_nat_target): New.
7375 (linux_child_post_attach, linux_child_post_startup_inferior)
7376 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7377 (linux_child_remove_fork_catchpoint)
7378 (linux_child_insert_vfork_catchpoint)
7379 (linux_child_remove_vfork_catchpoint)
7380 (linux_child_insert_exec_catchpoint)
7381 (linux_child_remove_exec_catchpoint)
7382 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7383 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7384 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7385 (linux_nat_stopped_data_address)
7386 (linux_nat_stopped_by_sw_breakpoint)
7387 (linux_nat_supports_stopped_by_sw_breakpoint)
7388 (linux_nat_stopped_by_hw_breakpoint)
7389 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7390 (linux_nat_kill, linux_nat_mourn_inferior)
7391 (linux_nat_xfer_partial, linux_nat_thread_alive)
7392 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7393 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7394 (linux_child_static_tracepoint_markers_by_strid)
7395 (linux_nat_is_async_p, linux_nat_can_async_p)
7396 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7397 (linux_nat_supports_multi_process)
7398 (linux_nat_supports_disable_randomization, linux_nat_async)
7399 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7400 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7401 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7402 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7403 methods of linux_nat_target.
7404 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7405 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7407 (check_stopped_by_watchpoint): Adjust.
7408 (linux_xfer_partial): Delete.
7409 (linux_target_install_ops, linux_target, linux_nat_add_target):
7411 (linux_nat_target::linux_nat_target): New.
7412 * linux-nat.h: Include "inf-ptrace.h".
7413 (linux_nat_target): New.
7414 (linux_target, linux_target_install_ops, linux_nat_add_target):
7415 Delete function declarations.
7416 (linux_target): Declare global.
7417 * linux-thread-db.c (thread_db_target): New.
7418 (thread_db_target::thread_db_target): New.
7419 (thread_db_ops): Delete.
7420 (the_thread_db_target): New.
7421 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7422 (thread_db_update_thread_list, thread_db_pid_to_str)
7423 (thread_db_extra_thread_info)
7424 (thread_db_thread_handle_to_thread_info)
7425 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7426 (thread_db_resume): Refactor as methods of thread_db_target.
7427 (init_thread_db_ops): Delete.
7428 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7429 * x86-linux-nat.c: Don't include "linux-nat.h".
7430 (super_post_startup_inferior): Delete.
7431 (x86_linux_nat_target::~x86_linux_nat_target): New.
7432 (x86_linux_child_post_startup_inferior)
7433 (x86_linux_read_description, x86_linux_enable_btrace)
7434 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7435 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7436 methods of x86_linux_nat_target.
7437 (x86_linux_create_target): Delete. Bits folded ...
7438 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7440 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7441 (x86_linux_nat_target): New class.
7442 (x86_linux_create_target): Delete.
7443 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7444 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7445 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7446 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7447 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7448 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7450 (x86_use_watchpoints): Delete.
7451 * x86-nat.h: Include "breakpoint.h" and "target.h".
7452 (x86_use_watchpoints): Delete.
7453 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7454 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7455 (x86_insert_watchpoint, x86_remove_watchpoint)
7456 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7457 (x86_stopped_by_hw_breakpoint): New declarations.
7458 (x86_nat_target): New template class.
7460 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7461 (the_ppc_linux_nat_target): New.
7462 (ppc_linux_fetch_inferior_registers)
7463 (ppc_linux_can_use_hw_breakpoint)
7464 (ppc_linux_region_ok_for_hw_watchpoint)
7465 (ppc_linux_ranged_break_num_registers)
7466 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7467 (ppc_linux_insert_mask_watchpoint)
7468 (ppc_linux_remove_mask_watchpoint)
7469 (ppc_linux_can_accel_watchpoint_condition)
7470 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7471 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7472 (ppc_linux_watchpoint_addr_within_range)
7473 (ppc_linux_masked_watch_num_registers)
7474 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7475 (ppc_linux_read_description): Refactor as methods of
7476 ppc_linux_nat_target.
7477 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7479 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7480 (procfs_target): New class.
7481 (the_procfs_target): New.
7482 (procfs_target): Delete function.
7483 (procfs_auxv_parse, procfs_attach, procfs_detach)
7484 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7485 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7486 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7487 (procfs_create_inferior, procfs_update_thread_list)
7488 (procfs_thread_alive, procfs_pid_to_str)
7489 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7490 (procfs_stopped_data_address, procfs_insert_watchpoint)
7491 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7492 (proc_find_memory_regions, procfs_info_proc)
7493 (procfs_make_note_section): Refactor as methods of procfs_target.
7494 (_initialize_procfs): Adjust.
7495 * sol-thread.c (sol_thread_target): New class.
7496 (sol_thread_ops): Now a sol_thread_target.
7497 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7498 (sol_thread_fetch_registers, sol_thread_store_registers)
7499 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7500 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7501 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7502 (init_sol_thread_ops): Delete.
7503 (_initialize_sol_thread): Adjust. Remove references to
7504 init_sol_thread_ops and complete_target_initialization.
7506 * windows-nat.c (windows_nat_target): New class.
7507 (windows_fetch_inferior_registers)
7508 (windows_store_inferior_registers, windows_resume, windows_wait)
7509 (windows_attach, windows_detach, windows_pid_to_exec_file)
7510 (windows_files_info, windows_create_inferior)
7511 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7512 (windows_close, windows_pid_to_str, windows_xfer_partial)
7513 (windows_get_tib_address, windows_get_ada_task_ptid)
7514 (windows_thread_name, windows_thread_alive): Refactor as
7515 windows_nat_target methods.
7516 (do_initial_windows_stuff): Adjust.
7517 (windows_target): Delete function.
7518 (_initialize_windows_nat): Adjust.
7520 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7521 (darwin_mourn_inferior, darwin_kill_inferior)
7522 (darwin_create_inferior, darwin_attach, darwin_detach)
7523 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7524 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7525 (darwin_supports_multi_process): Refactor as darwin_nat_target
7527 (darwin_resume_to, darwin_files_info): Delete.
7528 (_initialize_darwin_inferior): Rename to ...
7529 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7530 * darwin-nat.h: Include "inf-child.h".
7531 (darwin_nat_target): New class.
7532 (darwin_complete_target): Delete.
7533 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7534 (darwin_target): New.
7535 (i386_darwin_fetch_inferior_registers)
7536 (i386_darwin_store_inferior_registers): Refactor as methods of
7538 (darwin_complete_target): Delete, with ...
7539 (_initialize_i386_darwin_nat): ... bits factored out here.
7541 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7542 (the_alpha_linux_nat_target): New.
7543 (alpha_linux_register_u_offset): Refactor as
7544 alpha_linux_nat_target method.
7545 (_initialize_alpha_linux_nat): Adjust.
7546 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7547 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7548 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7549 methods of linux_nat_trad_target.
7550 (linux_trad_target): Delete.
7551 * linux-nat-trad.h (linux_trad_target): Delete function.
7552 (linux_nat_trad_target): New class.
7553 * mips-linux-nat.c (mips_linux_nat_target): New class.
7554 (super_fetch_registers, super_store_registers, super_close):
7556 (the_mips_linux_nat_target): New.
7557 (mips64_linux_regsets_fetch_registers)
7558 (mips64_linux_regsets_store_registers)
7559 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7560 (mips_linux_register_u_offset, mips_linux_read_description)
7561 (mips_linux_can_use_hw_breakpoint)
7562 (mips_linux_stopped_by_watchpoint)
7563 (mips_linux_stopped_data_address)
7564 (mips_linux_region_ok_for_hw_watchpoint)
7565 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7566 (mips_linux_close): Refactor as methods of mips_linux_nat.
7567 (_initialize_mips_linux_nat): Adjust to C++ification.
7569 * aix-thread.c (aix_thread_target): New class.
7570 (aix_thread_ops): Now an aix_thread_target.
7571 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7572 (aix_thread_fetch_registers, aix_thread_store_registers)
7573 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7574 (aix_thread_thread_alive, aix_thread_pid_to_str)
7575 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7576 Refactor as methods of aix_thread_target.
7577 (init_aix_thread_ops): Delete.
7578 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7579 and complete_target_initialization.
7580 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7581 (rs6000_nat_target): New class.
7582 (the_rs6000_nat_target): New.
7583 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7584 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7585 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7586 (super_create_inferior): Delete.
7587 (_initialize_rs6000_nat): Adjust to C++ification.
7589 * arm-linux-nat.c (arm_linux_nat_target): New class.
7590 (the_arm_linux_nat_target): New.
7591 (arm_linux_fetch_inferior_registers)
7592 (arm_linux_store_inferior_registers, arm_linux_read_description)
7593 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7594 (arm_linux_remove_hw_breakpoint)
7595 (arm_linux_region_ok_for_hw_watchpoint)
7596 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7597 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7598 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7599 arm_linux_nat_target.
7600 (_initialize_arm_linux_nat): Adjust to C++ification.
7602 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7603 (the_aarch64_linux_nat_target): New.
7604 (aarch64_linux_fetch_inferior_registers)
7605 (aarch64_linux_store_inferior_registers)
7606 (aarch64_linux_child_post_startup_inferior)
7607 (aarch64_linux_read_description)
7608 (aarch64_linux_can_use_hw_breakpoint)
7609 (aarch64_linux_insert_hw_breakpoint)
7610 (aarch64_linux_remove_hw_breakpoint)
7611 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7612 (aarch64_linux_region_ok_for_hw_watchpoint)
7613 (aarch64_linux_stopped_data_address)
7614 (aarch64_linux_stopped_by_watchpoint)
7615 (aarch64_linux_watchpoint_addr_within_range)
7616 (aarch64_linux_can_do_single_step): Refactor as methods of
7617 aarch64_linux_nat_target.
7618 (super_post_startup_inferior): Delete.
7619 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7621 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7622 (the_hppa_linux_nat_target): New.
7623 (hppa_linux_fetch_inferior_registers)
7624 (hppa_linux_store_inferior_registers): Refactor as methods of
7625 hppa_linux_nat_target.
7626 (_initialize_hppa_linux_nat): Adjust to C++ification.
7628 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7629 (the_ia64_linux_nat_target): New.
7630 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7631 (ia64_linux_stopped_data_address)
7632 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7633 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7634 ia64_linux_nat_target methods.
7635 (super_xfer_partial): Delete.
7636 (_initialize_ia64_linux_nat): Adjust to C++ification.
7638 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7639 (the_m32r_linux_nat_target): New.
7640 (m32r_linux_fetch_inferior_registers)
7641 (m32r_linux_store_inferior_registers): Refactor as
7642 m32r_linux_nat_target methods.
7643 (_initialize_m32r_linux_nat): Adjust to C++ification.
7645 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7646 (the_m68k_linux_nat_target): New.
7647 (m68k_linux_fetch_inferior_registers)
7648 (m68k_linux_store_inferior_registers): Refactor as
7649 m68k_linux_nat_target methods.
7650 (_initialize_m68k_linux_nat): Adjust to C++ification.
7652 * s390-linux-nat.c (s390_linux_nat_target): New class.
7653 (the_s390_linux_nat_target): New.
7654 (s390_linux_fetch_inferior_registers)
7655 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7656 (s390_insert_watchpoint, s390_remove_watchpoint)
7657 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7658 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7659 (s390_auxv_parse, s390_read_description): Refactor as methods of
7660 s390_linux_nat_target.
7661 (_initialize_s390_nat): Adjust to C++ification.
7663 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7664 (the_sparc_linux_nat_target): New.
7665 (_initialize_sparc_linux_nat): Adjust to C++ification.
7666 * sparc-nat.c (sparc_fetch_inferior_registers)
7667 (sparc_store_inferior_registers): Remove target_ops parameter.
7668 * sparc-nat.h (sparc_fetch_inferior_registers)
7669 (sparc_store_inferior_registers): Remove target_ops parameter.
7670 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7671 (the_sparc64_linux_nat_target): New.
7672 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7674 * spu-linux-nat.c (spu_linux_nat_target): New class.
7675 (the_spu_linux_nat_target): New.
7676 (spu_child_post_startup_inferior, spu_child_post_attach)
7677 (spu_child_wait, spu_fetch_inferior_registers)
7678 (spu_store_inferior_registers, spu_xfer_partial)
7679 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7681 (_initialize_spu_nat): Adjust to C++ification.
7683 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7684 (the_tilegx_linux_nat_target): New.
7685 (fetch_inferior_registers, store_inferior_registers):
7686 Refactor as methods.
7687 (_initialize_tile_linux_nat): Adjust to C++ification.
7689 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7690 (the_xtensa_linux_nat_target): New.
7691 (xtensa_linux_fetch_inferior_registers)
7692 (xtensa_linux_store_inferior_registers): Refactor as
7693 xtensa_linux_nat_target methods.
7694 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7696 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7697 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7698 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7699 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7700 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7701 (fbsd_stopped_by_sw_breakpoint)
7702 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7703 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7704 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7705 (fbsd_post_startup_inferior, fbsd_post_attach)
7706 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7707 (fbsd_set_syscall_catchpoint)
7708 (super_xfer_partial, super_resume, super_wait)
7709 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7710 (fbsd_handle_debug_trap): Remove target_ops parameter.
7711 (fbsd_nat_add_target): Delete.
7712 * fbsd-nat.h: Include "inf-ptrace.h".
7713 (fbsd_nat_add_target): Delete.
7714 (USE_SIGTRAP_SIGINFO): Define.
7715 (fbsd_nat_target): New class.
7717 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7718 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7719 (amd64bsd_target): Delete.
7720 * amd64-bsd-nat.h: New file.
7721 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7723 (amd64_fbsd_nat_target): New class.
7724 (the_amd64_fbsd_nat_target): New.
7725 (amd64fbsd_read_description): Refactor as method of
7726 amd64_fbsd_nat_target.
7727 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7728 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7729 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7730 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7731 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7732 (i386bsd_target): Delete.
7733 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7734 (i386bsd_fetch_inferior_registers)
7735 (i386bsd_store_inferior_registers): Declare.
7736 (i386_bsd_nat_target): New class.
7737 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7738 (the_i386_fbsd_nat_target): New.
7739 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7740 i386_fbsd_nat_target methods.
7741 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7742 (_initialize_i386fbsd_nat): Adjust to C++ification.
7743 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7744 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7745 (_initialize_x86_bsd_nat): Adjust to C++ification.
7746 * x86-bsd-nat.h: Include "x86-nat.h".
7747 (x86bsd_target): Delete declaration.
7748 (x86bsd_nat_target): New class.
7750 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7751 (the_aarch64_fbsd_nat_target): New.
7752 (aarch64_fbsd_fetch_inferior_registers)
7753 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7754 aarch64_fbsd_nat_target.
7755 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7756 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7757 (the_alpha_bsd_nat_target): New.
7758 (alphabsd_fetch_inferior_registers)
7759 (alphabsd_store_inferior_registers): Refactor as
7760 alpha_bsd_nat_target methods.
7761 (_initialize_alphabsd_nat): Refactor as methods of
7762 alpha_bsd_nat_target.
7763 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7764 (the_amd64_nbsd_nat_target): New.
7765 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7766 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7767 (the_amd64_obsd_nat_target): New.
7768 (_initialize_amd64obsd_nat): Adjust to C++ification.
7769 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7770 (the_arm_fbsd_nat_target): New.
7771 (arm_fbsd_fetch_inferior_registers)
7772 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7773 (_initialize_arm_fbsd_nat): Refactor as methods of
7774 arm_fbsd_nat_target.
7775 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7776 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7777 (the_arm_netbsd_nat_target): New.
7778 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7779 arm_netbsd_nat_target.
7780 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7781 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7782 (the_hppa_nbsd_nat_target): New.
7783 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7784 hppa_nbsd_nat_target methods.
7785 (_initialize_hppanbsd_nat): Adjust to C++ification.
7786 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7787 (the_hppa_obsd_nat_target): New.
7788 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7789 methods of hppa_obsd_nat_target.
7790 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7792 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7793 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7795 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7796 (_initialize_i386obsd_nat): Use add_target.
7797 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7798 (the_m68k_bsd_nat_target): New.
7799 (m68kbsd_fetch_inferior_registers)
7800 (m68kbsd_store_inferior_registers): Refactor as methods of
7801 m68k_bsd_nat_target.
7802 (_initialize_m68kbsd_nat): Adjust to C++ification.
7803 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7804 (the_mips_fbsd_nat_target): New.
7805 (mips_fbsd_fetch_inferior_registers)
7806 (mips_fbsd_store_inferior_registers): Refactor as methods of
7807 mips_fbsd_nat_target.
7808 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7810 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7811 (the_mips_nbsd_nat_target): New.
7812 (mipsnbsd_fetch_inferior_registers)
7813 (mipsnbsd_store_inferior_registers): Refactor as methods of
7814 mips_nbsd_nat_target.
7815 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7816 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7817 (the_mips64_obsd_nat_target): New.
7818 (mips64obsd_fetch_inferior_registers)
7819 (mips64obsd_store_inferior_registers): Refactor as methods of
7820 mips64_obsd_nat_target.
7821 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7823 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7825 * nbsd-nat.h: Include "inf-ptrace.h".
7826 (nbsd_nat_target): New class.
7827 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7828 (obsd_wait): Refactor as methods of obsd_nat_target.
7829 (obsd_add_target): Delete.
7830 * obsd-nat.h: Include "inf-ptrace.h".
7831 (obsd_nat_target): New class.
7832 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7833 (the_ppc_fbsd_nat_target): New.
7834 (ppcfbsd_fetch_inferior_registers)
7835 (ppcfbsd_store_inferior_registers): Refactor as methods of
7836 ppc_fbsd_nat_target.
7837 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7839 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7840 (the_ppc_nbsd_nat_target): New.
7841 (ppcnbsd_fetch_inferior_registers)
7842 (ppcnbsd_store_inferior_registers): Refactor as methods of
7843 ppc_nbsd_nat_target.
7844 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7845 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7846 (the_ppc_obsd_nat_target): New.
7847 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7848 methods of ppc_obsd_nat_target.
7849 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7851 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7852 (the_sh_nbsd_nat_target): New.
7853 (shnbsd_fetch_inferior_registers)
7854 (shnbsd_store_inferior_registers): Refactor as methods of
7856 (_initialize_shnbsd_nat): Adjust to C++ification.
7857 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7858 (inf_ptrace_xfer_partial): Delete.
7859 (sparc_xfer_partial, sparc_target): Delete.
7860 * sparc-nat.h (sparc_fetch_inferior_registers)
7861 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7862 (sparc_target): Delete function declaration.
7863 (sparc_target): New template class.
7864 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7865 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7866 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7867 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7869 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7870 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7871 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7872 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7874 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7875 (the_vax_bsd_nat_target): New.
7876 (vaxbsd_fetch_inferior_registers)
7877 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7879 (_initialize_vaxbsd_nat): Adjust to C++ification.
7881 * bsd-kvm.c (bsd_kvm_target): New class.
7882 (bsd_kvm_ops): Now a bsd_kvm_target.
7883 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7884 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7885 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7887 (bsd_kvm_return_one): Delete.
7888 (bsd_kvm_add_target): Adjust to C++ification.
7890 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7891 (nto_procfs_target_procfs): New classes.
7892 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7893 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7894 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7895 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7896 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7897 (procfs_remove_hw_breakpoint, procfs_resume)
7898 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7899 (procfs_kill_inferior, procfs_store_registers)
7900 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7901 as methods of nto_procfs_target.
7902 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7903 (nto_native_ops): Delete.
7904 (procfs_open, procfs_native_open): Delete.
7905 (nto_native_ops): Now an nto_procfs_target_native.
7906 (init_procfs_targets): Adjust to C++ification.
7907 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7908 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7909 Refactor as methods of nto_procfs_target.
7911 * go32-nat.c (go32_nat_target): New class.
7912 (the_go32_nat_target): New.
7913 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7914 (go32_store_registers, go32_xfer_partial, go32_files_info)
7915 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7916 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7917 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7918 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7919 (go32_target): Delete.
7920 (_initialize_go32_nat): Adjust to C++ification.
7922 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7923 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7924 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7925 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7927 (gnu_target): Delete.
7928 * gnu-nat.h (gnu_target): Delete.
7929 (gnu_nat_target): New class.
7930 * i386-gnu-nat.c (gnu_base_target): New.
7931 (i386_gnu_nat_target): New class.
7932 (the_i386_gnu_nat_target): New.
7933 (_initialize_i386gnu_nat): Adjust to C++ification.
7935 2018-05-02 Pedro Alves <palves@redhat.com>
7937 * bfd-target.c (target_bfd_xclose): Rename to ...
7938 (target_bfd_close): ... this.
7939 (target_bfd_reopen): Adjust.
7940 * target.c (target_close): Remove references to to_xclose.
7941 * target.h (target_ops::to_xclose): Delete.
7942 (target_ops::to_close): Update comments.
7944 2018-05-02 Pedro Alves <palves@redhat.com>
7946 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7948 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7949 * inf-ptrace.c (inf_ptrace_register_u_offset)
7950 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7951 (inf_ptrace_store_register, inf_ptrace_store_registers)
7952 (inf_ptrace_trad_target): Move to ...
7953 * linux-nat-trad.c: ... this new file.
7954 * linux-nat-trad.h: New file.
7955 * linux-nat.c (linux_target_install_ops): Make extern.
7956 (linux_trad_target): Delete.
7957 * linux-nat.h (linux_trad_target): Delete declaration.
7958 (linux_target_install_ops): Declare.
7959 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7962 2018-05-02 Pedro Alves <palves@redhat.com>
7964 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7965 procfs_target/add_target here.
7966 * procfs.c (procfs_target): Make static.
7967 (_initialize_procfs): Call add_target here.
7968 * procfs.h (struct target_ops): Remove forward declaration.
7969 (procfs_target): Remove declaration.
7970 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
7972 2018-05-02 Pedro Alves <palves@redhat.com>
7974 * procfs.c (procfs_stopped_by_watchpoint)
7975 (procfs_insert_watchpoint, procfs_remove_watchpoint)
7976 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
7978 (procfs_use_watchpoints): Delete, move contents...
7979 (procfs_target): ... here.
7980 * procfs.h (procfs_use_watchpoints): Delete declaration.
7981 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7982 procfs_use_watchpoints.
7983 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
7984 procfs_use_watchpoints.
7986 2018-05-02 Tom Tromey <tom@tromey.com>
7989 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
7990 and var_zuinteger_unlimited.
7991 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
7992 and PARAM_ZUINTEGER_UNLIMITED.
7993 (set_parameter_value): Handle var_zuinteger and
7994 var_zuinteger_unlimited.
7995 (add_setshow_generic): Likewise.
7996 (parmpy_init): Likewise.
7998 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8001 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8002 pointer is not null before dereferencing it.
8004 2018-04-30 Tom Tromey <tom@tromey.com>
8006 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8009 2018-04-30 Tom Tromey <tom@tromey.com>
8011 * breakpoint.c (mention): Remove use of is_mi_like_p.
8012 (print_mention_ranged_breakpoint): Likewise.
8013 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8016 2018-04-30 Tom Tromey <tom@tromey.com>
8018 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8020 2018-04-30 Tom Tromey <tom@tromey.com>
8022 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8023 (info_spu_event_command): Remove some uses of is_mi_like_p.
8025 2018-04-30 Tom Tromey <tom@tromey.com>
8027 * python/py-framefilter.c (py_print_single_arg)
8028 (enumerate_locals, py_print_args, py_print_frame): Remove some
8029 uses of is_mi_like_p.
8031 2018-04-30 Tom Tromey <tom@tromey.com>
8034 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8035 * ui-out.h (ui_out::is_mi_like_p): Now const.
8036 (ui_out::do_is_mi_like_p): Now const.
8037 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8039 2018-04-30 Tom Tromey <tom@tromey.com>
8041 * varobj.c (varobj_set_visualizer): Use new_reference.
8042 * python/python.c (gdbpy_decode_line): Use new_reference.
8043 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8046 2018-04-30 Tom Tromey <tom@tromey.com>
8048 * varobj.c (install_new_value): Use new_reference.
8049 * value.h (value_incref): Return void. Swap intro comment with
8051 * value.c (set_value_parent): Use new_reference.
8052 (value_incref): Return void. Update intro comment.
8053 (release_value): Use new_reference.
8054 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8056 2018-04-30 Tom Tromey <tom@tromey.com>
8058 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8059 * gdb_bfd.h (new_bfd_ref): Remove.
8060 (gdb_bfd_open): Update comment.
8061 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8062 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8063 (gdb_bfd_fdopenr): Use new_reference.
8064 * exec.c (exec_file_attach): Use new_reference.
8066 2018-04-30 Tom Tromey <tom@tromey.com>
8068 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8071 2018-04-30 Tom Tromey <tom@tromey.com>
8073 * jit.c (jit_read_code_entry): Use type_align.
8074 * i386-tdep.c (i386_gdbarch_init): Don't call
8075 set_gdbarch_long_long_align_bit.
8076 * gdbarch.sh: Remove long_long_align_bit.
8077 * gdbarch.c, gdbarch.h: Rebuild.
8078 * arc-tdep.c (arc_type_align): New function.
8079 (arc_gdbarch_init): Use arc_type_align. Don't call
8080 set_gdbarch_long_long_align_bit.
8082 2018-04-30 Tom Tromey <tom@tromey.com>
8084 * rust-lang.c (rust_type_alignment): Remove.
8085 (rust_composite_type): Use type_align.
8087 2018-04-30 Tom Tromey <tom@tromey.com>
8089 * NEWS: Mention Type.align.
8090 * python/py-type.c (typy_get_alignof): New function.
8091 (type_object_getset): Add "alignof".
8093 2018-04-30 Tom Tromey <tom@tromey.com>
8097 * std-operator.def (UNOP_ALIGNOF): New operator.
8098 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8100 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8101 * c-lang.c (c_op_print_tab): Add alignof.
8102 * c-exp.y (ALIGNOF): New token.
8103 (exp): Add "ALIGNOF" production.
8104 (ident_tokens): Add _Alignof and alignof.
8106 2018-04-30 Tom Tromey <tom@tromey.com>
8108 * i386-tdep.c (i386_type_align): New function.
8109 (i386_gdbarch_init): Update.
8110 * gdbarch.sh (type_align): New method.
8111 * gdbarch.c, gdbarch.h: Rebuild.
8112 * arch-utils.h (default_type_align): Declare.
8113 * arch-utils.c (default_type_align): New function.
8114 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8115 (struct type) <align_log2>: New field.
8116 <instance_flags>: Now a bitfield.
8117 (TYPE_RAW_ALIGN): New macro.
8118 (type_align, type_raw_align, set_type_align): Declare.
8119 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8121 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8122 (get_alignment, maybe_set_alignment): New functions.
8123 (read_structure_type, read_enumeration_type, read_array_type)
8124 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8125 (read_subrange_type, read_base_type): Set type alignment.
8127 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8129 * dwarf2read.c (read_index_from_section): Use bool.
8131 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8134 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8137 2018-04-29 John Reiser <jreiser@BitWagon.com>
8140 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8141 last step, and do it atomically.
8143 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8145 * compile/compile-c-types.c (convert_int, convert_float):
8148 2018-04-27 Tom Tromey <tom@tromey.com>
8151 * rust-lang.c (rust_inclusive_range_type_p): New function.
8152 (rust_range): Handle inclusive ranges.
8153 (rust_compute_range): Likewise.
8154 * rust-exp.y (struct rust_op) <inclusive>: New field.
8155 (DOTDOTEQ): New constant.
8156 (range_expr): Add "..=" productions.
8157 (operator_tokens): Add "..=" token.
8158 (ast_range): Add "inclusive" parameter.
8159 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8161 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8163 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8164 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8166 * expprint.c (print_subexp_standard): Handle new bounds values.
8167 (dump_subexp_body_standard): Likewise.
8169 2018-04-27 Tom Tromey <tom@tromey.com>
8171 * configure: Rebuild.
8172 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8173 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8175 (class symbol_needs_eval_context): Likewise.
8176 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8177 (mock_mapped_index::symbol_name_at): Use "override". Remove
8179 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8181 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8182 * aarch64-tdep.c (instruction_reader::read): Use "override".
8183 (instruction_reader_test::read): Likewise.
8184 * arm-tdep.c (instruction_reader::read): Use "override".
8185 (instruction_reader_thumb::read): Likewise.
8187 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8190 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8191 instead of remote_send.
8192 (remote_send): Remove.
8194 2018-04-26 Pedro Alves <palves@redhat.com>
8196 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8197 find_function_start_sal instead of find_pc_line.
8199 2018-04-26 Pedro Alves <palves@redhat.com>
8201 * breakpoint.c (set_breakpoint_location_function): Handle
8203 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8204 * elfread.c (elf_symtab_read): Give data symbols with
8205 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8206 (elf_rel_plt_read): Update comment.
8207 * linespec.c (convert_linespec_to_sals): Handle
8209 (minsym_found): Handle mst_data_gnu_ifunc.
8210 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8211 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8212 * parse.c (find_minsym_type_and_address): Handle
8214 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8215 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8216 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8218 <mst_data_gnu_ifunc>: New enumerator.
8220 2018-04-26 Pedro Alves <palves@redhat.com>
8222 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8223 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8224 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8226 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8227 (lookup_minimal_symbol_by_pc): Adjust.
8228 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8229 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8230 * minsyms.h (lookup_msym_prefer): New enum.
8231 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8232 parameter by a lookup_msym_prefer parameter.
8234 2018-04-26 Pedro Alves <palves@redhat.com>
8236 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8237 ends in "@plt" instead of looking at the symbol's section.
8239 2018-04-26 Pedro Alves <palves@redhat.com>
8241 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8243 (find_pc_partial_function_gnu_ifunc): Rename to ...
8244 (find_pc_partial_function): ... this, and remove references to
8246 (find_pc_partial_function): Delete old implementation.
8247 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8249 2018-04-26 Pedro Alves <palves@redhat.com>
8251 * linespec.c (struct bound_minimal_symbol_search_key): New.
8252 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8253 skip first line if we found a GNU ifunc minimal symbol by name.
8254 (compare_msymbols): Change parameters to work with a destructured
8256 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8259 2018-04-26 Pedro Alves <palves@redhat.com>
8261 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8262 ifunc targets here. Instead, if we have an ifunc minsym, use its
8264 (add_location_to_breakpoint): Store the minsym and the objfile in
8265 the breakpoint location.
8266 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8267 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8268 Record the minsym in the sal.
8269 * symtab.h (symtab_and_line) <msymbol>: New field.
8271 2018-04-26 Pedro Alves <palves@redhat.com>
8273 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8274 unless we actually resolved the ifunc.
8276 2018-04-26 Pedro Alves <palves@redhat.com>
8278 * c-exp.y (variable production): Prefer ifunc minsyms over
8279 regular function symbols.
8280 * symtab.c (find_gnu_ifunc): New function.
8281 * minsyms.h (lookup_msym_prefer): New enum.
8282 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8283 parameter by a lookup_msym_prefer parameter.
8284 * symtab.h (find_gnu_ifunc): New declaration.
8286 2018-04-26 Pedro Alves <palves@redhat.com>
8288 * blockframe.c (find_gnu_ifunc_target_type): New function.
8289 (find_function_type): New.
8290 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8291 return a value with a memory address.
8292 (eval_call): For calls to GNU ifunc functions, try to find the
8293 type of the target function from the type that the resolver
8295 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8297 * infcall.c (find_function_return_type): Delete.
8298 (find_function_addr): Add 'function_type' parameter. For calls to
8299 GNU ifunc functions, try to find the type of the target function
8300 from the type that the resolver returns, and return it via
8302 (call_function_by_hand_dummy): Adjust to use the function type
8303 returned by find_function_addr.
8304 (find_function_addr): Add 'function_type' parameter and move
8306 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8309 2018-04-26 Pedro Alves <palves@redhat.com>
8311 * c-exp.y (variable production): Skip finding an alias for ifunc
8314 2018-04-26 Pedro Alves <palves@redhat.com>
8316 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8318 2018-04-25 Pedro Alves <palves@redhat.com>
8320 * infcmd.c (kill_command): Print the pid as string, not the whole
8321 thread's ptid. Add comment. s/has been killed/killed/ in output
8323 * remote.c (remote_detach_1): Print the pid as string, not the
8324 whole thread's ptid.
8326 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8327 Sergio Durigan Junior <sergiodj@redhat.com>
8328 Pedro Alves <palves@redhat.com>
8330 * infcmd.c (kill_command): Print message when inferior has
8332 * inferior.c (print_inferior_events): Remove 'static'. Set as
8334 (add_inferior): Improve message printed when
8335 'print_inferior_events' is on.
8336 (exit_inferior): Remove message printed when
8337 'print_inferior_events' is on.
8338 (detach_inferior): Improve message printed when
8339 'print_inferior_events' is on.
8340 (initialize_inferiors): Use 'add_inferior_silent' to set
8341 'current_inferior_'.
8342 * inferior.h (print_inferior_events): Declare here as
8344 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8345 '[Detaching...]' messages when 'print_inferior_events' is on.
8346 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8347 as prefix/suffix for messages. Remove periods. Fix erroneous
8348 'Detaching after fork from child...', replace it by '... from
8350 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8351 prefix/suffix when printing 'Detaching...' messages. Print
8352 them when 'print_inferior_events' is on.
8353 * remote.c (remote_detach_1): Print message when detaching
8354 from inferior and '!is_fork_parent'.
8356 2018-04-24 Tom Tromey <tom@tromey.com>
8358 * cli-out.h: Reindent.
8360 2018-04-24 Tom Tromey <tom@tromey.com>
8362 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8363 (cli_ui_out::do_field_string): Use fputs_filtered.
8364 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8366 2018-04-23 Tom Tromey <tom@tromey.com>
8368 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8369 gdb::unique_xmalloc_ptr.
8371 2018-04-23 Tom Tromey <tom@tromey.com>
8373 * configure: Rebuild.
8375 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8378 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8379 prepare_for_testing. Set normal_bp to r_debug_state if target
8382 2018-04-21 Pedro Alves <palves@redhat.com>
8383 Rajendra SY <rajendra.sy@gmail.com>
8385 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8386 * remote.c (extended_remote_attach): In all-stop mode, mark the
8387 thread as executing.
8389 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8391 * thread.c (thread_apply_all_command): Fix comment.
8392 (thread_command): Fix comment.
8394 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8396 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8398 * features/aarch64-core.c (create_feature_aarch64_core):
8400 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8402 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8404 * features/i386/32bit-avx512.c
8405 (create_feature_i386_32bit_avx512): Likewise.
8406 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8408 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8410 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8412 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8414 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8416 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8418 * features/i386/64bit-avx512.c
8419 (create_feature_i386_64bit_avx512): Likewise.
8420 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8422 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8424 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8426 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8428 * features/i386/64bit-segments.c
8429 (create_feature_i386_64bit_segments): Likewise.
8430 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8432 * features/i386/x32-core.c
8433 (create_feature_i386_x32_core): Likewise.
8434 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8435 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8436 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8437 * target-descriptions.c: In generated code, don't pass xml
8440 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8442 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8443 (print_xml_feature::visit_post): Likewise.
8444 (print_xml_feature::visit): Likewise.
8445 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8446 (print_xml_feature): Add new class.
8447 * regformats/regdat.sh: Null xmltarget on feature targets.
8448 * target-descriptions.c (struct target_desc): Add xmltarget.
8449 (maintenance_check_tdesc_xml_convert): Add unittest function.
8450 (tdesc_get_features_xml): Add function to get xml.
8451 (maintenance_check_xml_descriptions): Test xml generation.
8452 * xml-tdesc.c (string_read_description_xml): Add function.
8453 * xml-tdesc.h (string_read_description_xml): Add declaration.
8455 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8457 * features/Makefile: Add feature marker to targets with new style
8458 target descriptions.
8459 * regformats/aarch64.dat: Regenerate.
8460 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8461 * regformats/i386/amd64-avx-linux.dat: Likewise.
8462 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8463 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8464 * regformats/i386/amd64-linux.dat: Likewise.
8465 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8466 * regformats/i386/amd64.dat: Likewise.
8467 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8468 * regformats/i386/i386-avx-linux.dat: Likewise.
8469 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8470 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8471 * regformats/i386/i386-linux.dat: Likewise.
8472 * regformats/i386/i386-mmx-linux.dat: Likewise.
8473 * regformats/i386/i386-mpx-linux.dat: Likewise.
8474 * regformats/i386/i386.dat: Likewise.
8475 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8476 * regformats/i386/x32-avx-linux.dat: Likewise.
8477 * regformats/i386/x32-linux.dat: Likewise.
8478 * regformats/tic6x-c62x-linux.dat: Likewise.
8479 * regformats/tic6x-c64x-linux.dat: Likewise.
8480 * regformats/tic6x-c64xp-linux.dat: Likewise.
8481 * regformats/regdat.sh: Parse feature marker.
8483 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8485 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8486 (tdesc_osabi_name): Likewise.
8487 * target-descriptions.c (tdesc_architecture_name): Add new
8489 (tdesc_osabi_name): Likewise.
8491 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8493 * common/tdesc.c (tdesc_predefined_type): Move to here.
8494 (tdesc_named_type): Likewise.
8495 (tdesc_create_vector): Likewise.
8496 (tdesc_create_struct): Likewise.
8497 (tdesc_set_struct_size): Likewise.
8498 (tdesc_create_union): Likewise.
8499 (tdesc_create_flags): Likewise.
8500 (tdesc_create_enum): Likewise.
8501 (tdesc_add_field): Likewise.
8502 (tdesc_add_typed_bitfield): Likewise.
8503 (tdesc_add_bitfield): Likewise.
8504 (tdesc_add_flag): Likewise.
8505 (tdesc_add_enum_value): Likewise.
8506 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8507 (struct tdesc_type_vector): Likewise.
8508 (struct tdesc_type_field): Likewise.
8509 (struct tdesc_type_with_fields): Likewise.
8510 (tdesc_create_enum): Add declaration.
8511 (tdesc_add_typed_bitfield): Likewise.
8512 (tdesc_add_enum_value): Likewise.
8513 * target-descriptions.c (tdesc_type_field): Move from here.
8514 (tdesc_type_builtin): Likewise.
8515 (tdesc_type_vector): Likewise.
8516 (tdesc_type_with_fields): Likewise.
8517 (tdesc_predefined_types): Likewise.
8518 (tdesc_named_type): Likewise.
8519 (tdesc_create_vector): Likewise.
8520 (tdesc_create_struct): Likewise.
8521 (tdesc_set_struct_size): Likewise.
8522 (tdesc_create_union): Likewise.
8523 (tdesc_create_flags): Likewise.
8524 (tdesc_create_enum): Likewise.
8525 (tdesc_add_field): Likewise.
8526 (tdesc_add_typed_bitfield): Likewise.
8527 (tdesc_add_bitfield): Likewise.
8528 (tdesc_add_flag): Likewise.
8529 (tdesc_add_enum_value): Likewise.
8530 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8531 (tdesc_add_typed_bitfield): Likewise.
8532 (tdesc_add_enum_value): Likewise.
8534 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8536 * common/tdesc.c (tdesc_feature::accept): Move to here.
8537 (tdesc_feature::operator==): Likewise.
8538 (tdesc_create_reg): Likewise.
8539 * common/tdesc.h (tdesc_type_kind): Likewise.
8540 (struct tdesc_type): Likewise.
8541 (struct tdesc_feature): Likewise.
8542 * regformats/regdat.sh: Create a feature.
8543 * target-descriptions.c (tdesc_type_kind): Move from here.
8544 (tdesc_type): Likewise.
8545 (tdesc_type_up): Likewise.
8546 (tdesc_feature): Likewise.
8547 (tdesc_create_reg): Likewise.
8549 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8551 * Makefile.in: Add arch/tdesc.c
8552 * common/tdesc.c: New file.
8553 * common/tdesc.h (tdesc_element_visitor): Move to here.
8554 (tdesc_element): Likewise.
8555 (tdesc_reg): Likewise.
8556 (tdesc_reg_up): Likewise.
8557 * regformats/regdef.h (reg): Add offset to constructors.
8558 * target-descriptions.c (tdesc_element_visitor): Move from here.
8559 (tdesc_element): Likewise.
8560 (tdesc_reg): Likewise.
8561 (tdesc_reg_up): Likewise.
8563 2018-04-17 Tom Tromey <tom@tromey.com>
8565 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8568 2018-04-17 Tom Tromey <tom@tromey.com>
8570 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8572 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8574 * symtab.c (print_symbol_info): Skip printing filename and line
8575 number when `last' is NULL.
8576 (symtab_symbol_info): Use empty string instead of NULL for first
8577 invocation of print_symbol_info.
8578 (rbreak_command): Pass NULL to `last' parameter of
8581 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8583 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8586 2018-04-16 Pedro Alves <palves@redhat.com>
8588 * MAINTAINERS (sh): Remove.
8589 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8590 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8591 (ALLDEPFILES): Remove sh64-tdep.c.
8592 * NEWS: Mentions that support for SH-5/SH64 is removed.
8593 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8594 (sh*-*-openbsd*): Ditto.
8595 (sh64-*-elf*): Remove.
8597 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8598 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8599 * sh-tdep.c: No longer include "sh64-tdep.h".
8600 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8601 * sh64-tdep.c, sh64-tdep.h: Remove files.
8603 2018-04-16 Pedro Alves <palves@redhat.com>
8605 * MAINTAINERS: Remove m88k.
8606 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8607 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8608 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8609 * NEWS: Mention that support for m88k was removed.
8610 * configure.host (m88*-*-*): Remove support.
8611 * configure.nat (m88k-*-*): Remove support.
8612 * configure.tgt (m88*-*-openbsd*): Remove.
8613 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8615 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8617 * configure.tgt (x86_tobjs): New variable.
8618 (amd64_tobjs, i386_tobjs): Use it.
8620 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8622 * symtab.c (print_symbol_info): Precede the symbol definition by
8623 the line number when available.
8624 * NEWS: Advertise this enhancement.
8626 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8628 * NEWS (New options): announce set/show record btrace cpu.
8629 * btrace.c: Include record-btrace.h.
8630 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8631 the vendor is unknown.
8632 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8633 Maybe overwrite the btrace configuration's cpu.
8634 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8635 (btrace_fetch): Add cpu parameter. Update callers.
8636 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8637 Maybe overwrite the btrace configuration's cpu. Skip enabling
8638 errata workarounds if the vendor is unknown.
8639 * python/py-record-btrace.c: Include record-btrace.h.
8640 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8641 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8642 * record-btrace.c (record_btrace_cpu_state_kind): New.
8643 (record_btrace_cpu): New.
8644 (set_record_btrace_cpu_cmdlist): New.
8645 (record_btrace_get_cpu): New.
8646 (require_btrace_thread, record_btrace_info)
8647 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8648 (cmd_set_record_btrace_cpu_none): New.
8649 (cmd_set_record_btrace_cpu_auto): New.
8650 (cmd_set_record_btrace_cpu): New.
8651 (cmd_show_record_btrace_cpu): New.
8652 (_initialize_record_btrace): Initialize set/show record btrace cpu
8654 * record-btrace.h (record_btrace_get_cpu): New.
8656 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8658 * record.c (set_record_command): Fix typo in message.
8660 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8662 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8664 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8666 * infrun.c (process_event_stop_test): Call
8667 gdbarch_in_indirect_branch_thunk.
8668 * gdbarch.sh (in_indirect_branch_thunk): New.
8669 * gdbarch.c: Regenerated.
8670 * gdbarch.h: Regenerated.
8673 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8674 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8675 (ALLDEPFILES): Add x86-tdep.c.
8676 * arch-utils.h (default_in_indirect_branch_thunk): New.
8677 * arch-utils.c (default_in_indirect_branch_thunk): New.
8678 * i386-tdep: Include x86-tdep.h.
8679 (i386_in_indirect_branch_thunk): New.
8680 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8682 * amd64-tdep: Include x86-tdep.h.
8683 (amd64_in_indirect_branch_thunk): New.
8684 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8686 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8689 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8690 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8691 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8694 2018-04-12 Tom Tromey <tom@tromey.com>
8696 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8697 (rust_evaluate_subexp): Likewise.
8699 2018-04-12 Pedro Alves <palves@redhat.com>
8701 * procfs.c (procfs_detach): Make forward declaration's prototype
8702 match definition's protototype.
8703 (proc_get_LDT_entry): Remove stale do_cleanups call.
8705 2018-04-12 Pedro Alves <palves@redhat.com>
8707 * target.h (target_ops::to_has_exited): Delete.
8708 (target_has_exited): Delete.
8709 * target-delegates.c: Regenerate.
8711 2018-04-11 Pedro Alves <palves@redhat.com>
8713 * target.c (fileio_fh_t::t): Add comment.
8714 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8715 (target_fileio_close): Handle a NULL target.
8716 (invalidate_fileio_fh): New.
8717 (target_close): Call it.
8718 * remote.c (remote_hostio_send_command): No longer check whether
8719 remote_desc is open.
8721 2018-04-11 Pedro Alves <palves@redhat.com>
8723 * target.c (fileio_fh_t): Make it a named struct instead of a
8725 (fileio_fh_t::is_closed): New method.
8726 (DEF_VEC_O (fileio_fh_t)): Remove.
8727 (fileio_fhandles): Now a std::vector.
8728 (is_closed_fileio_fh): Delete.
8729 (acquire_fileio_fd): Adjust. Rename parameters.
8730 (release_fileio_fd): Adjust.
8731 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8732 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8733 (target_fileio_close): Adjust.
8735 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8737 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8740 2018-04-10 Pedro Alves <palves@redhat.com>
8742 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8743 (scoped_finish_thread_state): New class.
8744 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8746 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8747 (fetch_inferior_event, normal_stop): Likewise.
8748 * thread.c (finish_thread_state_cleanup): Delete.
8750 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8751 Pedro Alves <palves@redhat.com>
8753 * value.c: Include "selftest.h" and "common/array-view.h".
8754 (struct range) <operator ==>: New.
8755 (test_ranges_contain): New.
8756 (check_ranges_vector): New.
8757 (test_insert_into_bit_range_vector): New.
8758 (_initialize_values): Register selftests.
8759 * common/array-view.h (operator==, operator!=): New.
8761 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8763 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8765 * inline-frame.c: Include <algorithm>.
8766 (struct inline_state): Add constructor.
8767 (inline_state_s): Remove.
8768 (DEF_VEC_O(inline_state_s)): Remove.
8769 (inline_states): Change type to std::vector.
8770 (find_inline_frame_state): Adjust to std::vector.
8771 (allocate_inline_frame_state): Remove.
8772 (clear_inline_frame_state): Adjust to std::vector.
8773 (skip_inline_frames): Adjust to std::vector.
8775 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8777 * tracepoint.h (struct trace_state_variable): Add constructor.
8778 <name>: Change type to std::string.
8779 * tracepoint.c (tsv_s): Remove.
8780 (DEF_VEC_O(tsv_s)): Remove.
8781 (tvariables): Change to std::vector.
8782 (create_trace_state_variable): Adjust to std::vector.
8783 (find_trace_state_variable): Likewise.
8784 (find_trace_state_variable_by_number): Likewise.
8785 (delete_trace_state_variable): Likewise.
8786 (trace_variable_command): Adjust to std::string.
8787 (delete_trace_variable_command): Likewise.
8788 (tvariables_info_1): Adjust to std::vector.
8789 (save_trace_state_variables): Likewise.
8790 (start_tracing): Likewise.
8791 (merge_uploaded_trace_state_variables): Adjust to std::vector
8793 * target.h (struct target_ops)
8794 <to_download_trace_state_variable>: Pass reference to
8795 trace_state_variable.
8796 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8797 * target-delegates.c: Re-generate.
8798 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8799 (mi_tsv_deleted): Likewise.
8800 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8801 * remote.c (remote_download_trace_state_variable): Change
8802 pointer to reference and adjust.
8803 * make-target-delegates (parse_argtypes): Handle references.
8804 (write_function_header): Likewise.
8805 (munge_type): Likewise.
8807 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8809 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8810 string_view-selftests.c.
8811 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8813 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8814 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8815 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8816 * unittests/basic_string_view/element_access/char/1.cc:
8818 * unittests/basic_string_view/element_access/char/empty.cc:
8820 * unittests/basic_string_view/element_access/char/front_back.cc:
8822 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8823 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8825 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8827 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8829 * unittests/basic_string_view/operations/compare/char/1.cc:
8831 * unittests/basic_string_view/operations/compare/char/13650.cc:
8833 * unittests/basic_string_view/operations/copy/char/1.cc:
8835 * unittests/basic_string_view/operations/data/char/1.cc:
8837 * unittests/basic_string_view/operations/find/char/1.cc:
8839 * unittests/basic_string_view/operations/find/char/2.cc:
8841 * unittests/basic_string_view/operations/find/char/3.cc:
8843 * unittests/basic_string_view/operations/find/char/4.cc:
8845 * unittests/basic_string_view/operations/rfind/char/1.cc:
8847 * unittests/basic_string_view/operations/rfind/char/2.cc:
8849 * unittests/basic_string_view/operations/rfind/char/3.cc:
8851 * unittests/basic_string_view/operations/substr/char/1.cc:
8853 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8854 * unittests/string_view-selftests.c: New file.
8856 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8858 * unittests/basic_string_view/capacity/1.cc: New file.
8859 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8860 * unittests/basic_string_view/cons/char/1.cc: New file.
8861 * unittests/basic_string_view/cons/char/2.cc: New file.
8862 * unittests/basic_string_view/cons/char/3.cc: New file.
8863 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8864 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8865 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8866 * unittests/basic_string_view/element_access/char/1.cc: New file.
8867 * unittests/basic_string_view/element_access/char/2.cc: New file.
8868 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8869 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8870 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8871 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8872 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8873 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8874 * unittests/basic_string_view/include.cc: New file.
8875 * unittests/basic_string_view/inserters/char/1.cc: New file.
8876 * unittests/basic_string_view/inserters/char/2.cc: New file.
8877 * unittests/basic_string_view/inserters/char/3.cc: New file.
8878 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8879 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8880 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8881 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8882 * unittests/basic_string_view/literals/types.cc: New file.
8883 * unittests/basic_string_view/literals/values.cc: New file.
8884 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8885 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8886 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8887 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8888 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8889 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8890 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8891 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8892 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8893 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8894 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8895 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8896 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8897 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8898 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8899 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8900 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8901 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8902 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8903 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8904 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8905 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8906 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8907 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8908 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8909 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8910 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8911 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8912 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8913 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8914 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8915 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8916 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8917 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8918 * unittests/basic_string_view/operators/char/2.cc: New file.
8919 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8920 * unittests/basic_string_view/range_access/char/1.cc: New file.
8921 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8922 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8923 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8924 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8925 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8926 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8927 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8928 * unittests/basic_string_view/typedefs.cc: New file.
8929 * unittests/basic_string_view/types/1.cc: New file.
8931 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8933 * common/gdb_string_view.h: Remove libstdc++ implementation
8934 details, adjust to gdb reality.
8935 * common/gdb_string_view.tcc: Likewise.
8936 * cli/cli-script.c (struct string_view): Remove.
8937 (user_args) <m_args>: Change element type to gdb::string_view.
8938 (user_args::insert_args): Adjust.
8940 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8942 * common/gdb_string_view.h: New file.
8943 * common/gdb_string_view.tcc: New file.
8945 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8947 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8948 * configure: Re-generate.
8950 2018-04-09 Pedro Alves <palves@redhat.com>
8952 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8953 (set_target_gdbarch): Call
8954 gdb::observers::architecture_changed.notify instead of
8955 observer_notify_architecture_changed.
8957 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8959 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8960 (do_restore_current_traceframe_cleanup): Remove.
8961 (restore_current_traceframe_cleanup_dtor): Remove.
8962 (make_cleanup_restore_current_traceframe): Remove.
8963 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8965 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8966 * infrun.c (fetch_inferior_event): Use
8967 scoped_restore_current_traceframe.
8969 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8971 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
8973 <n_allocated_type_units>: Remove.
8974 <all_type_units>: Change to std::vector.
8975 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
8976 to std::vector change.
8977 (dwarf2_per_objfile::get_cutu): Likewise.
8978 (dwarf2_per_objfile::get_tu): Likewise.
8979 (create_signatured_type_table_from_index): Likewise.
8980 (create_signatured_type_table_from_debug_names): Likewise.
8981 (dw2_symtab_iter_next): Likewise.
8982 (dw2_print_stats): Likewise.
8983 (dw2_expand_all_symtabs): Likewise.
8984 (dw2_expand_marked_cus): Likewise.
8985 (dw2_debug_names_iterator::next): Likewise.
8986 (dwarf2_initialize_objfile): Likewise.
8987 (add_signatured_type_cu_to_table): Likewise.
8988 (create_all_type_units): Likewise.
8989 (add_type_unit): Likewise.
8990 (struct tu_abbrev_offset): Add constructor.
8991 (build_type_psymtabs_1): Adjust to std::vector change.
8992 (print_tu_stats): Likewise.
8993 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
8994 (write_debug_names): Likewise.
8996 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8998 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
8999 Make an std::vector.
9000 <n_comp_units>: Remove.
9001 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9002 to std::vector change.
9003 (dwarf2_per_objfile::get_cutu): Likewise.
9004 (dwarf2_per_objfile::get_cu): Likewise.
9005 (create_cus_from_index): Likewise.
9006 (create_addrmap_from_index): Likewise.
9007 (create_addrmap_from_aranges): Likewise.
9008 (dwarf2_read_index): Likewise.
9009 (dw2_find_last_source_symtab): Likewise.
9010 (dw2_map_symtabs_matching_filename): Likewise.
9011 (dw2_symtab_iter_next): Likewise.
9012 (dw2_print_stats): Likewise.
9013 (dw2_expand_all_symtabs): Likewise.
9014 (dw2_expand_symtabs_with_fullname): Likewise.
9015 (dw2_expand_marked_cus): Likewise.
9016 (dw2_map_symbol_filenames): Likewise.
9017 (create_cus_from_debug_names): Likewise.
9018 (dwarf2_read_debug_names): Likewise.
9019 (dw2_debug_names_iterator::next): Likewise.
9020 (dwarf2_initialize_objfile): Likewise.
9021 (set_partial_user): Likewise.
9022 (dwarf2_build_psymtabs_hard): Likewise.
9023 (read_comp_units_from_section): Remove arguments, adjust to
9025 (create_all_comp_units): Adjust to std::vector and
9026 read_comp_units_from_section changes.
9027 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9029 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9030 (psyms_seen_size): Likewise.
9031 (write_gdbindex): Likewise.
9032 (write_debug_names): Likewise.
9034 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9036 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9037 with dwarf2_per_objfile.
9038 (create_cus_from_index): Likewise.
9039 (create_signatured_type_table_from_index): Likewise.
9040 (dwarf2_read_index): Likewise.
9041 (dwarf2_initialize_objfile): Likewise.
9042 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9043 per_cu rather than get_dwarf2_per_objfile.
9045 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9047 * dwarf2read.h (struct signatured_type): Forward declare.
9048 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9050 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9051 (dw2_get_cutu): ...this.
9052 (dwarf2_per_objfile::get_cu): Rename from...
9053 (dw2_get_cu): ...this.
9054 (dwarf2_per_objfile::get_tu): New.
9055 (create_addrmap_from_index): Adjust.
9056 (create_addrmap_from_aranges): Adjust.
9057 (dw2_find_last_source_symtab): Adjust.
9058 (dw2_map_symtabs_matching_filename): Adjust.
9059 (dw2_symtab_iter_next): Adjust.
9060 (dw2_print_stats): Adjust.
9061 (dw2_expand_all_symtabs): Adjust.
9062 (dw2_expand_symtabs_with_fullname): Adjust.
9063 (dw2_expand_marked_cus): Adjust.
9064 (dw_expand_symtabs_matching_file_matcher): Adjust.
9065 (dw2_map_symbol_filenames): Adjust.
9066 (dw2_debug_names_iterator::next): Adjust.
9067 (dwarf2_initialize_objfile): Adjust.
9068 (set_partial_user): Adjust.
9069 (dwarf2_build_psymtabs_hard): Adjust.
9071 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9073 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9074 Remove unused variables.
9075 (dw2_map_symtabs_matching_filename): Likewise.
9076 (dwarf2_record_block_ranges): Likewise.
9077 (dwarf2_read_addr_index): Likewise.
9078 (follow_die_offset): Likewise.
9080 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9082 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9083 to symbol_file_add_main.
9085 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9088 * mi/mi-console.c (do_fputc_async_safe): New.
9089 (mi_console_file::write_async_safe): New.
9090 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9091 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9093 * ui-file.c (ui_file::putstrn): Adjust call to
9094 fputstrn_unfiltered.
9095 * utils.c (printchar): Replace do_fputs and do_fprintf
9096 parameters by do_fputc.
9097 (fputstr_filtered): Adjust call to printchar.
9098 (fputstr_unfiltered): Likewise.
9099 (fputstrn_filtered): Likewise.
9100 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9102 * utils.h (do_fputc_ftype): New typedef.
9103 (fputstrn_unfiltered): Add do_fputc parameter.
9105 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9107 * regformats/i386/i386-avx.dat: Remove.
9109 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9112 * amd64-tdep.c (amd64_none_init_abi): New function.
9113 (amd64_x32_none_init_abi): New function.
9114 (_initialize_amd64_tdep): Register handlers for x86-64 and
9115 x64_32 with GDB_OSABI_NONE.
9116 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9117 GDB_OSABI_NONE osabi.
9119 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9122 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9124 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9125 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9127 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9129 * common/byte-vector.h (char_vector): New type.
9130 * target.h (target_read_alloc): Return
9131 gdb::optional<byte_vector>.
9132 (target_read_stralloc): Return gdb::optional<char_vector>.
9133 (target_get_osdata): Return gdb::optional<char_vector>.
9134 * target.c (target_read_alloc_1): Templatize. Replacement
9135 manual memory management with vector.
9136 (target_read_alloc): Change return type, adjust.
9137 (target_read_stralloc): Change return type, adjust.
9138 (target_get_osdata): Change return type, adjust.
9139 * auxv.c (struct auxv_info) <length>: Remove.
9140 <data>: Change type to gdb::optional<byte_vector>.
9141 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9142 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9143 (target_auxv_search): Adjust.
9144 (fprint_target_auxv): Adjust.
9145 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9146 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9147 (linux_make_corefile_notes): Adjust.
9148 * osdata.c (get_osdata): Adjust.
9149 * remote.c (remote_get_threads_with_qxfer): Adjust.
9150 (remote_memory_map): Adjust.
9151 (remote_traceframe_info): Adjust.
9152 (btrace_read_config): Adjust.
9153 (remote_read_btrace): Adjust.
9154 (remote_pid_to_exec_file): Adjust.
9155 * solib-aix.c (solib_aix_get_library_list): Adjust.
9156 * solib-dsbt.c (decode_loadmap): Don't free buf.
9157 (dsbt_get_initial_loadmaps): Adjust.
9158 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9159 * solib-target.c (solib_target_current_sos): Adjust.
9160 * tracepoint.c (sdata_make_value): Adjust.
9161 * xml-support.c (xinclude_start_include): Adjust.
9162 (xml_fetch_content_from_file): Adjust.
9163 * xml-support.h (xml_fetch_another): Change return type.
9164 (xml_fetch_content_from_file): Change return type.
9165 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9166 * xml-tdesc.c (file_read_description_xml): Adjust.
9167 (fetch_available_features_from_target): Change return type.
9168 (target_fetch_description_xml): Adjust.
9169 (target_read_description_xml): Adjust.
9171 2018-04-06 Tom Tromey <tom@tromey.com>
9173 * value.c (~value): Update.
9174 (struct value) <contents>: Now unique_xmalloc_ptr.
9175 (value_contents_bits_eq, allocate_value_contents)
9176 (value_contents_raw, value_contents_all_raw)
9177 (value_contents_for_printing, value_contents_for_printing_const)
9178 (set_value_enclosing_type): Update.
9180 2018-04-06 Tom Tromey <tom@tromey.com>
9182 * value.c (range_s): Remove typedef, VEC.
9183 (struct range): Add operator<.
9184 (range_lessthan): Remove.
9185 (ranges_contain): Change type.
9187 (struct value) <unavailable, optimized_out>: Now std::vector.
9188 (value_entirely_available)
9189 (value_entirely_covered_by_range_vector)
9190 (value_entirely_unavailable, value_entirely_optimized_out):
9192 (insert_into_bit_range_vector): Change argument type.
9193 (find_first_range_overlap): Likewise.
9194 (struct ranges_and_idx, value_contents_bits_eq)
9195 (require_not_optimized_out, require_available): Update.
9196 (ranges_copy_adjusted): Change argument types.
9197 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9199 2018-04-06 Tom Tromey <tom@tromey.com>
9201 * value.c (~value): Update.
9202 (struct value) <parent>: Now a value_ref_ptr.
9203 (value_parent, set_value_parent, value_address, value_copy):
9206 2018-04-06 Tom Tromey <tom@tromey.com>
9208 * value.c (struct value): Add constructor, destructor, and member
9210 (allocate_value_lazy, value_decref): Update.
9212 2018-04-06 Tom Tromey <tom@tromey.com>
9214 * value.c (struct value) <released, next>: Remove.
9215 (all_values): Now a std::vector.
9216 (allocate_value_lazy): Update.
9217 (value_next): Remove.
9218 (value_mark, value_free_to_mark, release_value)
9219 (value_release_to_mark): Update.
9221 2018-04-06 Tom Tromey <tom@tromey.com>
9223 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9224 (free_value_chain): Remove.
9225 * value.c (free_value_chain): Remove.
9226 (value_release_to_mark): Return a std::vector.
9227 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9229 (check_condition): Update.
9230 * eval.c (fetch_subexp_value): Change "val_chain" to a
9232 * breakpoint.c (update_watchpoint): Update.
9233 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9235 2018-04-06 Tom Tromey <tom@tromey.com>
9237 * value.h (free_all_values): Remove.
9238 * value.c (free_all_values): Remove.
9240 2018-04-06 Tom Tromey <tom@tromey.com>
9242 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9243 (value_history_chain, value_history_count): Remove.
9244 (value_history): New global.
9245 (record_latest_value, access_value_history, show_values)
9246 (preserve_values): Update.
9248 2018-04-06 Tom Tromey <tom@tromey.com>
9250 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9251 * varobj.c (varobj_set_display_format, varobj_set_value)
9252 (install_default_visualizer, construct_visualizer)
9253 (install_new_value, ~varobj, varobj_get_value_type)
9254 (my_value_of_variable, varobj_editable_p): Update.
9255 * c-varobj.c (c_describe_child, c_value_of_variable)
9256 (cplus_number_of_children, cplus_describe_child): Update.
9257 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9258 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9259 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9261 2018-04-06 Tom Tromey <tom@tromey.com>
9263 * printcmd.c (last_examine_address): Change type to
9265 (do_examine, x_command): Update.
9267 2018-04-06 Tom Tromey <tom@tromey.com>
9269 * value.c (release_value): Update.
9270 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9271 (struct bpstats) <val>: Now a value_ref_ptr.
9272 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9273 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9274 (~watchpoint, print_it_watchpoint, watch_command_1)
9275 (invalidate_bp_value_on_memory_change): Update.
9277 2018-04-06 Tom Tromey <tom@tromey.com>
9279 * varobj.c (varobj_clear_saved_item)
9280 (update_dynamic_varobj_children, install_new_value, ~varobj):
9282 * value.h (value_incref): Move declaration earlier.
9283 (value_decref): Rename from value_free.
9284 (struct value_ref_policy): New.
9285 (value_ref_ptr): New typedef.
9286 (struct value_deleter): Remove.
9287 (gdb_value_up): Remove typedef.
9288 (release_value): Change return type.
9289 (release_value_or_incref): Remove.
9290 * value.c (set_value_parent): Update.
9291 (value_incref): Change return type.
9292 (value_decref): Rename from value_free.
9293 (value_free_to_mark, free_all_values, free_value_chain): Update.
9294 (release_value): Return value_ref_ptr.
9295 (release_value_or_incref): Remove.
9296 (record_latest_value, set_internalvar, clear_internalvar):
9298 * stack.c (info_frame_command): Don't call value_free.
9299 * python/py-value.c (valpy_dealloc, valpy_new)
9300 (value_to_value_object): Update.
9301 * printcmd.c (do_examine): Update.
9302 * opencl-lang.c (lval_func_free_closure): Update.
9303 * mi/mi-main.c (register_changed_p): Don't call value_free.
9304 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9305 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9306 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9308 * guile/scm-value.c (vlscm_free_value_smob)
9309 (vlscm_scm_from_value): Update.
9310 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9311 (frame_unwind_register_unsigned, get_frame_register_bytes)
9312 (put_frame_register_bytes): Don't call value_free.
9313 * findvar.c (address_from_register): Don't call value_free.
9314 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9315 * dwarf2loc.c (entry_data_value_free_closure)
9316 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9317 (dwarf2_evaluate_loc_desc_full): Update.
9318 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9319 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9320 (~watchpoint, watch_command_1)
9321 (invalidate_bp_value_on_memory_change): Update.
9322 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9324 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9327 * warning.m4: Add -Wno-error=deprecated-register.
9328 * configure: Re-generate.
9330 2018-04-05 Tom Tromey <tom@tromey.com>
9332 * linespec.h: Remove include of "vec.h".
9334 2018-04-05 Tom Tromey <tom@tromey.com>
9336 * linespec.c (typep): Remove typedef.
9337 (find_methods, find_superclass_methods): Take a std::vector.
9338 (find_method): Use std::vector.
9340 2018-04-05 Tom Tromey <tom@tromey.com>
9342 * utils.c (compare_strings): Remove.
9343 * utils.h (compare_strings): Remove.
9344 * objc-lang.h (find_imps): Update.
9345 * objc-lang.c (find_methods): Take a std::vector.
9346 (uniquify_strings, find_imps): Likewise.
9347 * linespec.c (find_methods): Take a std::vector.
9348 (decode_objc): Use std::vector.
9349 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9351 (find_method, find_function_symbols): Use std::vector.
9353 2018-04-05 Tom Tromey <tom@tromey.com>
9355 * completer.c (completion_tracker::completion_tracker): Remove
9357 (completion_tracker::discard_completions): Likewise.
9358 * breakpoint.c (ambiguous_names_p): Remove cast.
9359 * ada-lang.c (_initialize_ada_language): Remove cast.
9360 * utils.h (streq): Update.
9361 (streq_hash): Add new declaration.
9362 * utils.c (streq): Return bool.
9363 (streq_hash): New function.
9365 2018-04-05 Tom Tromey <tom@tromey.com>
9367 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9368 Remove a string copy.
9370 2018-04-05 Tom Tromey <tom@tromey.com>
9372 * linespec.c (filter_results): Use std::vector.
9373 (decode_line_2, decode_line_full): Update.
9375 2018-04-05 Tom Tromey <tom@tromey.com>
9377 * linespec.c (canonical_to_fullform): Return std::string.
9378 (filter_results): Update.
9379 (struct decode_line_2_item): Add constructor.
9380 <fullform, displayform>: Now std::string.
9381 (decode_line_2_compare_items): Now a std::sort comparator.
9382 (decode_line_2): Update.
9384 2018-04-05 Tom Tromey <tom@tromey.com>
9386 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9387 (unexpected_linespec_error): Update.
9388 (linespec_parse_basic, parse_linespec): Update.
9390 2018-04-05 Tom Tromey <tom@tromey.com>
9392 * linespec.c (linespec_parse_basic): Reindent.
9394 2018-04-05 Tom Tromey <tom@tromey.com>
9396 * minsyms.h (iterate_over_minimal_symbols): Update.
9397 * minsyms.c (iterate_over_minimal_symbols): Take a
9399 * linespec.c (struct collect_minsyms): Remove.
9400 (compare_msyms): Now a std::sort comparator.
9401 (add_minsym): Add parameters.
9402 (search_minsyms_for_name): Update. Use std::vector.
9404 2018-04-03 Tom Tromey <tom@tromey.com>
9406 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9409 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9411 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9413 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9416 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9417 printing static type.
9419 2018-04-01 Tom Tromey <tom@tromey.com>
9421 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9422 (rs6000_xfer_shared_libraries): Update.
9424 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9426 * common/gdb_vecs.h (char_ptr): Remove.
9427 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9429 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9431 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9433 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9435 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9437 * tracepoint.h (struct uploaded_tp): Initialize fields.
9438 <actions, step_actions, cmd_strings>: Change type to
9439 std::vector<char *>.
9440 * tracepoint.c (get_uploaded_tp): Allocate with new.
9441 (free_uploaded_tps): Free with delete.
9442 (parse_tracepoint_definition): Adjust to std::vector change.
9443 * breakpoint.c (read_uploaded_action): Likewise.
9444 (create_tracepoint_from_upload): Likewise.
9445 * ctf.c (ctf_write_uploaded_tp): Likewise.
9446 (SET_ARRAY_FIELD): Likewise.
9447 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9449 2018-03-30 Tom Tromey <tom@tromey.com>
9451 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9453 (svr4_keep_data_in_core): Update.
9454 (svr4_read_so_list): Update.
9456 2018-03-30 Tom Tromey <tom@tromey.com>
9458 * windows-nat.c (handle_output_debug_string, handle_exception):
9460 * target.h (target_read_string): Update.
9461 * target.c (target_read_string): Change "string" to
9463 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9465 * solib-frv.c (frv_current_sos): Update.
9466 * solib-dsbt.c (dsbt_current_sos): Update.
9467 * solib-darwin.c (darwin_current_sos): Update.
9468 * linux-thread-db.c (inferior_has_bug): Update.
9469 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9470 Update. Remove alloca.
9471 * ada-lang.c (ada_main_name): Update.
9473 2018-03-30 Tom Tromey <tom@tromey.com>
9475 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9476 (struct dwo_file_deleter): New.
9477 (dwo_file_up): New typedef.
9478 (open_and_init_dwo_file): Use dwo_file_up.
9479 (free_dwo_file_cleanup): Remove.
9481 2018-03-30 Tom Tromey <tom@tromey.com>
9483 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9484 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9486 2018-03-30 Tom Tromey <tom@tromey.com>
9488 * dwarf2read.c (class free_cached_comp_units): New class.
9489 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9490 (free_cached_comp_units): Remove function.
9492 2018-03-30 Tom Tromey <tom@tromey.com>
9494 * utils.h (make_cleanup_unpush_target): Remove.
9495 * inf-ptrace.c (struct target_unpusher): New.
9496 (target_unpush_up) New typedef.
9497 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9499 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9501 2018-03-27 Tom Tromey <tom@tromey.com>
9503 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9505 2018-03-27 Pedro Alves <palves@redhat.com>
9506 Tom Tromey <tom@tromey.com>
9508 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9509 destructor. Now a class.
9510 (gdb_readline_wrapper_cleanup): Remove function.
9511 (gdb_readline_wrapper): Remove cleanups.
9513 2018-03-27 Tom Tromey <tom@tromey.com>
9515 * typeprint.h (struct type_print_options) <local_typedefs,
9516 global_typedefs>: Remove "struct" keyword.
9517 (class typedef_hash_table): New class.
9518 (recursively_update_typedef_hash, add_template_parameters)
9519 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9520 (find_typedef_in_hash): Don't declare.
9521 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9522 (typedef_hash_table::recursively_update): Rename from
9523 recursively_update_typedef_hash. Now a member.
9524 (typedef_hash_table::add_template_parameters): Rename from
9525 add_template_parameters. Now a member.
9526 (typedef_hash_table::typedef_hash_table): Now a constructor;
9527 rename from create_typedef_hash.
9528 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9529 rename from free_typedef_hash.
9530 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9531 (do_free_global_table): Remove.
9532 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9533 from copy_type_recursive.
9534 (create_global_typedef_table): Remove.
9535 (typedef_hash_table::find_global_typedef): Now a member of
9537 (typedef_hash_table::find_typedef): Rename from
9538 find_typedef_in_hash; now a member.
9539 (whatis_exp): Update.
9540 * extension.h (struct ext_lang_type_printers): Add constructor and
9542 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9544 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9545 Now a constructor; rename from start_ext_lang_type_printers.
9546 (ext_lang_type_printers): Now a destructor; rename from
9547 free_ext_lang_type_printers.
9548 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9550 (c_type_print_base_struct_union): Update. Remove cleanups.
9552 2018-03-27 Tom Tromey <tom@tromey.com>
9554 * dwarf-index-write.c: Include <cmath>.
9556 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9558 * NEWS: Add entry describing new "set|show varsize-limit" command.
9559 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9561 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9564 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9566 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9568 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9569 * dwarf-index-common.c: New file.
9570 * dwarf-index-common.h: New file.
9571 * dwarf-index-write.c: New file.
9572 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9573 (struct dwarf2_section_info): Move from here.
9574 (dwarf2_section_info_def): Likewise.
9575 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9576 (offset_type): Likewise.
9577 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9578 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9579 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9580 (byte_swap): Likewise.
9581 (MAYBE_SWAP): Likewise.
9582 (dwarf2_per_cu_ptr): Likewise.
9583 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9584 (struct tu_stats): Likewise.
9585 (struct dwarf2_per_objfile): Likewise.
9586 (struct dwarf2_per_cu_data): Likewise.
9587 (struct signatured_type): Likewise.
9588 (sig_type_ptr): Likewise.
9589 (DEF_VEC_P (sig_type_ptr)): Likewise.
9590 (INDEX4_SUFFIX): Likewise.
9591 (INDEX5_SUFFIX): Likewise.
9592 (DEBUG_STR_SUFFIX): Likewise.
9593 (dwarf2_read_section): Make non-static.
9594 (mapped_index_string_hash): Move from here.
9595 (dwarf5_djb_hash): Likewise.
9596 (file_write): Likewise.
9597 (class data_buf): Likewise.
9598 (struct symtab_index_entry): Likewise.
9599 (struct mapped_symtab): Likewise.
9600 (find_slot): Likewise.
9601 (hash_expand): Likewise.
9602 (add_index_entry): Likewise.
9603 (uniquify_cu_indices): Likewise.
9604 (class c_str_view): Likewise.
9605 (class c_str_view_hasher): Likewise.
9606 (class vector_hasher): Likewise.
9607 (write_hash_table): Likewise.
9608 (psym_index_map): Likewise.
9609 (struct addrmap_index_data): Likewise.
9610 (add_address_entry): Likewise.
9611 (add_address_entry_worker): Likewise.
9612 (write_address_map): Likewise.
9613 (symbol_kind): Likewise.
9614 (write_psymbols): Likewise.
9615 (struct signatured_type_index_data): Likewise.
9616 (write_one_signatured_type): Likewise.
9617 (recursively_count_psymbols): Likewise.
9618 (recursively_write_psymbols): Likewise.
9619 (class debug_names): Likewise.
9620 (check_dwarf64_offsets): Likewise.
9621 (psyms_seen_size): Likewise.
9622 (write_gdbindex): Likewise.
9623 (write_debug_names): Likewise.
9624 (assert_file_size): Likewise.
9625 (write_psymtabs_to_index): Likewise.
9626 (save_gdb_index_command): Likewise.
9627 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9629 * dwarf2read.h: New file.
9631 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9634 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9635 symbol name if the CU's language stores symbol names in linkage
9637 * language.h (struct language_defn)
9638 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9639 all instances of this struct.
9641 2018-03-26 Tom Tromey <tom@tromey.com>
9643 * stack.c (backtrace_command_1): Remove verbose code.
9645 2018-03-26 Tom Tromey <tom@tromey.com>
9647 * python/py-framefilter.c (py_print_type): Don't catch
9648 exceptions. Return void.
9649 (py_print_value): Likewise.
9650 (py_print_single_arg): Likewise.
9651 (enumerate_args): Don't catch exceptions.
9652 (py_print_args): Likewise.
9653 (py_print_frame): Likewise.
9654 (gdbpy_apply_frame_filter): Catch exceptions here.
9656 2018-03-26 Tom Tromey <tom@tromey.com>
9658 * stack.c (_initialize_stack): Remove trailing newlines from help
9659 text. Add "Usage" line to "backtrace" help.
9661 2018-03-26 Tom Tromey <tom@tromey.com>
9664 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9666 2018-03-26 Tom Tromey <tom@tromey.com>
9668 * python/py-framefilter.c (py_print_single_arg): Return
9669 EXT_LANG_BT_ERROR from catch.
9671 2018-03-26 Tom Tromey <tom@tromey.com>
9674 * stack.c (backtrace_command_1): Move some code into no-filters
9677 2018-03-26 Tom Tromey <tom@tromey.com>
9679 * python/py-framefilter.c (throw_quit_or_print_exception): New
9681 (gdbpy_apply_frame_filter): Use it.
9683 2018-03-26 Tom Tromey <tom@tromey.com>
9686 * python/py-framefilter.c (py_print_type, py_print_value)
9687 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9690 2018-03-26 Tom Tromey <tom@tromey.com>
9692 * python/py-framefilter.c (enumerate_args): Use
9693 gdb::unique_xmalloc_ptr.
9695 2018-03-26 Tom Tromey <tom@tromey.com>
9697 * python/py-framefilter.c (py_print_frame): Return
9699 (gdbpy_apply_frame_filter): Update comment.
9700 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9702 <EXT_LANG_BT_NO_FILTERS>: Change value.
9704 2018-03-26 Tom Tromey <tom@tromey.com>
9707 * stack.c (backtrace_command): Parse "hide" argument.
9708 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9709 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9712 2018-03-26 Tom Tromey <tom@tromey.com>
9714 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9716 (backtrace_command): Remove "fulltrace", add "flags".
9718 2018-03-26 Tom Tromey <tom@tromey.com>
9720 * stack.c (backtrace_command): Rewrite command line parsing.
9722 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9724 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9726 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9728 * filename-seen-cache.h: Add include guard.
9730 2018-03-26 Keith Seitz <keiths@redhat.com>
9732 * symfile.c (place_section): Remove "struct" from section_addr_info
9734 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9735 "struct" keyword from section_addr_info.
9737 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9739 * regformats/regdef.h (reg): Add constructors.
9741 2018-03-25 Pedro Alves <palves@redhat.com>
9743 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9744 if then/else bodies in var_func_name extraction.
9746 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9748 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9749 lookup_minimal_symbol() to find symbol entry.
9750 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9752 2018-03-23 Keith Seitz <keiths@redhat.com>
9755 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9756 nested type definitions for C++, too.
9758 2018-03-23 Tom Tromey <tom@tromey.com>
9760 * machoread.c (struct oso_el): Add a constructor. Don't define as
9762 (macho_register_oso): Remove.
9763 (macho_symtab_read): Take a std::vector.
9764 (oso_el_compare_name): Now a std::sort comparator.
9765 (macho_symfile_read_all_oso): Take a std::vector.
9766 (macho_symfile_read): Use std::vector. Remove cleanups.
9768 2018-03-22 Tom Tromey <tom@tromey.com>
9770 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9771 (record_full_goto_bookmark): Use std::string.
9773 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9776 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9779 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9781 * rs6000-tdep.c (store_insn_p): New function.
9782 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9783 and cr_reg to their unshifted values. Use store_insn_p to
9784 match LR saves using either R1 or fdata->alloca_reg. Use
9785 store_insn_p to match CR saves. Set alloca_reg_offset
9786 when alloca_reg and framep are set. Remove lr_reg shift
9787 when assigning to fdata->lr_register.
9789 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9791 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9792 command line args instead of emitting a warning.
9794 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9796 * tracepoint.h (struct static_tracepoint_marker): Initialize
9797 fields, define default constructor, move constructor and move
9798 assignment, disable the rest.
9799 <str_id, extra>: Make std::string.
9800 (release_static_tracepoint_marker): Remove.
9801 (free_current_marker): Remove.
9802 * tracepoint.c (free_current_marker): Remove.
9803 (parse_static_tracepoint_marker_definition): Adjust to
9804 std::string, use new hex2str overload.
9805 (release_static_tracepoint_marker): Remove.
9806 (print_one_static_tracepoint_marker): Get marker by reference
9807 and adjust to std::string.
9808 (info_static_tracepoint_markers_command): Adjust to std::vector
9810 * target.h (static_tracepoint_marker_p): Remove typedef.
9811 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9812 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9814 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9816 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9817 (target_debug_print_std_vector_static_tracepoint_marker): New.
9818 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9820 (target_debug_print_static_tracepoint_marker_p): ... this.
9821 * target-delegates.c: Re-generate.
9822 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9824 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9825 (decode_static_tracepoint_spec): Adjust to std::vector.
9826 (tracepoint_print_one_detail): Adjust to std::string.
9827 (strace_marker_decode_location): Adjust to std::string.
9828 (update_static_tracepoint): Adjust to std::string, remove call
9829 to release_static_tracepoint_marker.
9830 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9831 Adjust to std::vector.
9832 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9833 (remote_static_tracepoint_markers_by_strid): Adjust to
9835 * common/rsp-low.h (hex2str): New overload with explicit count
9837 * common/rsp-low.c (hex2str): New overload with explicit count
9839 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9840 (_initialize_rsp_low_selftests): Add test_hex2str test.
9841 * unittests/tracepoint-selftests.c
9842 (test_parse_static_tracepoint_marker_definition): Adjust to
9845 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9847 * tracepoint.c (parse_static_tracepoint_marker_definition):
9848 Consider case where the definition is followed by more
9850 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9851 tracepoint-selftests.c.
9852 * unittests/tracepoint-selftests.c: New.
9854 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9856 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9859 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9861 * symtab.c (find_pc_sect_line): fixed indentation.
9863 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9865 * symtab.c (find_pc_sect_line): now uses binary search.
9867 2018-03-19 Tom Tromey <tom@tromey.com>
9869 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9872 2018-03-19 Pedro Alves <palves@redhat.com>
9873 Tom Tromey <tom@tromey.com>
9875 * unittests/observable-selftests.c: New file.
9876 * common/observable.h: New file.
9877 * observable.h: New file.
9878 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9879 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9880 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9881 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9882 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9883 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9884 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9885 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9886 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9887 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9888 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9889 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9890 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9891 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9892 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9893 tui/tui-interp.c, valops.c: Update all users.
9894 * tui/tui-hooks.c (tui_bp_created_observer)
9895 (tui_bp_deleted_observer, tui_bp_modified_observer)
9896 (tui_inferior_exit_observer, tui_before_prompt_observer)
9897 (tui_normal_stop_observer, tui_register_changed_observer):
9899 (tui_observers_token): New global.
9900 (attach_or_detach, tui_attach_detach_observers): New functions.
9901 (tui_install_hooks, tui_remove_hooks): Use
9902 tui_attach_detach_observers.
9903 * record-btrace.c (record_btrace_thread_observer): Remove.
9904 (record_btrace_thread_observer_token): New global.
9905 * observer.sh: Remove.
9906 * observer.c: Rename to observable.c.
9907 * observable.c (namespace gdb_observers): Define new objects.
9908 (observer_debug): Move into gdb_observers namespace.
9909 (struct observer, struct observer_list, xalloc_observer_list_node)
9910 (xfree_observer_list_node, generic_observer_attach)
9911 (generic_observer_detach, generic_observer_notify): Remove.
9912 (_initialize_observer): Update.
9913 Don't include observer.inc.
9914 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9915 (clean mostlyclean): Likewise.
9916 (observer.h, observer.inc): Remove targets.
9917 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9918 (COMMON_SFILES): Use observable.c, not observer.c.
9919 * .gitignore: Remove observer.h.
9921 2018-03-18 Tom Tromey <tom@tromey.com>
9923 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9925 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9927 2018-03-17 Tom Tromey <tom@tromey.com>
9929 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9931 2018-03-17 Tom Tromey <tom@tromey.com>
9933 * target.c (class scoped_target_fd): New.
9934 (target_fileio_close_cleanup): Remove.
9935 (target_fileio_read_alloc_1): Use scoped_target_fd.
9937 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9939 * silent-rules.mk: New.
9940 * Makefile.in: Include silent-rules.mk
9941 (srcdir, VPATH, top_srcdir): Move up.
9942 (COMPILE): Add ECHO_CXX.
9943 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9944 (init.c): Add ECHO_INIT_C.
9945 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9946 (version.c): Add ECHO_GEN.
9947 (printcmd.o): Add ECHO_CXX.
9948 (target-float.o): Add ECHO_CXX.
9949 (ada-exp.o): Add ECHO_CXX.
9950 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9951 (insight$(EXEEXT)): Add ECHO_CXXLD.
9952 * gnulib/configure.ac: Add AM_SILENT_RULES.
9953 * gnulib/aclocal.m4: Re-generate.
9954 * gnulib/configure: Re-generate.
9955 * gnulib/import/Makefile.in: Re-generate.
9957 2018-03-16 Tom Tromey <tom@tromey.com>
9959 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9960 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9961 * utils.c (do_free_section_addr_info)
9962 (make_cleanup_free_section_addr_info): Remove.
9963 * symfile.h (struct other_sections): Add constructor.
9964 (struct section_addr_info): Remove.
9965 (section_addr_info): New typedef.
9966 (struct sym_fns) <sym_offsets>: Change type of parameter.
9967 (build_section_addr_info_from_objfile)
9968 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9969 (default_symfile_offsets, symbol_file_add)
9970 (symbol_file_add_from_bfd)
9971 (build_section_addr_info_from_section_table): Update.
9972 (alloc_section_addr_info, free_section_addr_info): Don't declare.
9973 * symfile.c (alloc_section_addr_info): Remove.
9974 (build_section_addr_info_from_section_table): Change return type.
9976 (build_section_addr_info_from_bfd)
9977 (build_section_addr_info_from_objfile): Likewise.
9978 (free_section_addr_info): Remove.
9979 (relative_addr_info_to_section_offsets): Change type of "addrs".
9980 (addrs_section_compar): Now a std::sort comparator.
9981 (addrs_section_sort): Change return type.
9982 (addr_info_make_relative): Change type of "addrs". Update.
9983 (default_symfile_offsets, syms_from_objfile_1)
9984 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
9985 (symbol_file_add_separate): Update.
9986 (symbol_file_add): Change type of "addrs". Update.
9987 (add_symbol_file_command): Update. Remove cleanups.
9988 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
9990 * symfile-debug.c (debug_sym_offsets): Change type of "info".
9991 * solib.c (solib_read_symbols): Update.
9992 * objfiles.c (objfile_relocate): Update. Remove cleanups.
9993 * machoread.c (macho_symfile_offsets): Update.
9994 * jit.c (jit_bfd_try_read_symtab): Update.
9996 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
9998 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9999 unittests/utils-selftests.c.
10000 * unittests/utils-selftests.c: New file.
10002 2018-03-14 Tom Tromey <tom@tromey.com>
10005 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10008 2018-03-14 Tom Tromey <tom@tromey.com>
10011 * printcmd.c (printf_pointer): Allow "-" in format.
10013 2018-03-14 Tom Tromey <tom@tromey.com>
10015 * printcmd.c (_initialize_printcmd): Add usage to printf.
10017 2018-03-14 Yao Qi <qiyao@sourceware.org>
10019 * MAINTAINERS: Update my email address.
10021 2018-03-13 Tom Tromey <tom@tromey.com>
10023 * machoread.c (macho_check_dsym): Change filenamep to a
10025 (macho_symfile_read): Update.
10026 * symfile.c (load_command): Use std::string.
10028 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10030 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10031 to error message string.
10032 (riscv_register_name): Use xsnprintf instead of sprintf.
10033 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10035 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10037 (riscv_push_dummy_call): Likewise.
10039 2018-03-12 Tom Tromey <tom@tromey.com>
10041 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10042 Use gdb::byte_vector.
10043 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10045 2018-03-12 Yao Qi <yao.qi@linaro.org>
10047 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10048 parameter type to readable_regcache.
10049 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10052 2018-03-11 Tom Tromey <tom@tromey.com>
10054 * dwarf2read.c (struct nextfield): Add initializers.
10055 (struct nextfnfield): Remove.
10056 (struct fnfieldlist): Add initializers. Remove "length" and
10057 "head", use std::vector.
10058 (struct decl_field_list): Remove.
10059 (struct field_info): Add initializers.
10060 <fields, baseclasses>: Now std::vector.
10061 <nbaseclasses, nfnfields, typedef_field_list_count,
10062 nested_types_list_count>: Remove.
10063 (dwarf2_add_field, dwarf2_add_type_defn)
10064 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10065 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10066 (process_structure_scope): Update.
10068 2018-03-11 Tom Tromey <tom@tromey.com>
10070 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10071 for use by std::sort.
10072 (build_type_psymtabs_1): Use std::vector.
10074 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10076 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10077 and LIBMPFR in the printed configuration.
10079 2018-03-08 Tom Tromey <tom@tromey.com>
10081 * source.c (get_filename_and_charpos): Use scoped_fd.
10082 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10083 (procfs_pidlist): Likewise.
10084 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10085 (iterate_over_mappings): Likewise.
10087 2018-03-08 Tom Tromey <tom@tromey.com>
10089 * infcall.c (struct call_return_meta_info)
10090 <stack_temporaries_enabled>: Remove.
10091 (get_call_return_value, call_function_by_hand_dummy): Update.
10092 * thread.c (disable_thread_stack_temporaries): Remove.
10093 (enable_thread_stack_temporaries): Remove.
10094 (thread_stack_temporaries_enabled_p): Return bool.
10095 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10096 (get_last_thread_stack_temporary): Update.
10097 * eval.c (evaluate_subexp): Update.
10098 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10099 class, not a function.
10100 (value_ptr, value_vec): Remove typedefs.
10101 (class thread_info) <stack_temporaries_enabled>: Now bool.
10102 <stack_temporaries>: Now a std::vector.
10103 (thread_stack_temporaries_enabled_p)
10104 (value_in_thread_stack_temporaries): Return bool.
10106 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10108 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10109 (getpkt_or_notif_sane_1): Likewise.
10111 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10113 * build-id.c (build_id_to_debug_bfd): Use std::string.
10115 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10117 * build-id.c (find_separate_debug_file_by_buildid): Return
10119 * build-id.h (find_separate_debug_file_by_buildid): Return
10121 * coffread.c (coff_symfile_read): Adjust to std::string.
10122 * elfread.c (elf_symfile_read): Adjust to std::string.
10123 * symfile.c (separate_debug_file_exists): Change parameter to
10125 (find_separate_debug_file): Return std::string.
10126 (find_separate_debug_file_by_debuglink): Return std::string.
10127 * symfile.h (find_separate_debug_file_by_debuglink): Return
10130 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10132 * common/xml-utils.c (xml_escape_text): Move code to...
10133 (xml_escape_text_append): ... this new function.
10134 * common/xml-utils.h (xml_escape_text_append): New declaration.
10135 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10137 (_initialize_xml_utils): register test_xml_escape_text_append as
10140 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10142 * defs.h: Remove MAX_REGISTER_SIZE.
10143 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10145 * python/py-unwind.c (pyuw_sniffer): Likewise.
10147 2018-03-07 Tom Tromey <tom@tromey.com>
10149 * linux-tdep.c (linux_info_proc): Update.
10150 * target.h (struct target_ops) <to_fileio_readlink>: Return
10152 (target_fileio_readlink): Return optional<string>.
10153 * remote.c (remote_hostio_readlink): Return optional<string>.
10154 * inf-child.c (inf_child_fileio_readlink): Return
10156 * target.c (target_fileio_readlink): Return optional<string>.
10158 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10160 * regcache.c (cooked_read_test): Add riscv to the list of
10161 architectures that have a save_reggroup.
10163 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10165 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10166 value is not a dynamic class object.
10168 2018-03-06 Tom Tromey <tom@tromey.com>
10170 * rust-exp.y: Formatting fixes.
10172 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10174 * riscv-tdep.c (riscv_register_name): Remove target description
10176 (riscv_gdbarch_init): Remove target description check.
10178 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10180 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10182 * riscv-tdep.h: Likewise.
10184 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10186 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10187 (riscv_pseudo_register_write): Delete.
10188 (riscv_gdbarch_init): Remove all use of pseudo registers.
10190 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10192 * record-btrace.c (btrace_print_lines): Replace cleanup
10193 parameter with RAII equivalents.
10194 (btrace_insn_history): Replace cleanup with RAII equivalents.
10195 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10196 make_cleanup_ui_out_tuple_begin_end): Remove.
10197 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10198 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10199 make_cleanup_ui_out_list_begin_end): Remove.
10201 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10203 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10204 parameter types to std::vector. Use bool.
10205 (record_btrace_wait): Replace VEC(tp_t) with
10206 std::vector<thread_info *>.
10207 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10209 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10211 * record-btrace.c (record_btrace_disable_callback): Remove.
10212 (struct scoped_btrace_disable): New.
10213 (record_btrace_open): Use scoped_btrace_disable.
10215 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10217 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10218 reading values from registers.
10220 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10222 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10225 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10227 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10228 change parameter type. Use GDB's print functions, and use
10229 core_addr_to_string where appropriate.
10230 (riscv_push_dummy_call): Use core_addr_to_string where
10231 appropriate, update call to riscv_print_arg_location, and reindent
10233 (riscv_return_value): Update call to riscv_print_arg_location.
10235 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10236 Tim Newsome <tim@sifive.com>
10237 Albert Ou <a0u@eecs.berkeley.edu>
10238 Darius Rad <darius@bluespec.com>
10240 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10241 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10242 (ALLDEPFILES): Add riscv-tdep.c
10243 * configure.tgt: Add riscv support.
10244 * riscv-tdep.c: New file.
10245 * riscv-tdep.h: New file.
10246 * NEWS: Mention new target.
10247 * MAINTAINERS: Add entry for riscv.
10249 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10251 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10252 fields within aggregates.
10254 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10256 * record-btrace.c (btrace_print_lines): Change type of flags to
10257 gdb_disassembly_flags.
10259 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10261 * fbsd-nat.c: Include "inf-ptrace.h".
10262 (USE_SIGTRAP_SIGINFO): Conditionally define.
10263 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10264 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10265 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10267 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10269 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10271 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10272 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10273 "supports_stopped_by_hw_breakpoint" target methods.
10275 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10277 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10278 * fbsd-nat.c (debug_fbsd_nat): New variable.
10279 (show_fbsd_nat_debug): New function.
10280 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10281 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10283 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10285 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10286 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10288 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10289 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10292 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10294 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10295 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10297 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10299 * charset.c (struct charset_vector): New.
10300 (charsets): Change type to charset_vector.
10301 (find_charset_names): Adjust.
10303 (_initialize_charset): Adjust.
10305 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10307 * progspace.h (struct program_space) <deleted_solibs>: Change
10308 type to std::vector<std::string>.
10309 * progspace.c (clear_program_space_solib_cache): Adjust.
10310 * breakpoint.c (print_solib_event): Adjust.
10311 (check_status_catch_solib): Adjust.
10312 * solib.c (update_solib_list): Adjust.
10313 * ui-out.h (class ui_out) <field_string>: New overload.
10314 * ui-out.c (ui_out::field_string): New overload.
10316 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10318 * progspace.h (struct program_space): Add constructor and
10319 destructor, initialize fields.
10320 (add_program_space): Remove.
10321 * progspace.c (add_program_space): Rename to...
10322 (program_space::program_space): ... this.
10323 (release_program_space): Rename to...
10324 (program_space::~program_space): ... this.
10325 (delete_program_space): Use delete to delete program_space.
10326 (initialize_progspace): Use new to allocate program_space.
10327 * inferior.c (add_inferior_with_spaces): Likewise.
10328 (clone_inferior_command): Likewise.
10329 * infrun.c (follow_fork_inferior): Likewise.
10330 (handle_vfork_child_exec_or_exit): Likewise.
10332 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10334 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10335 (delim_string_to_char_ptr_vec): Return std::vector of
10336 gdb::unique_xmalloc_ptr.
10337 (dirnames_to_char_ptr_vec_append): Take std::vector of
10338 gdb::unique_xmalloc_ptr.
10339 (dirnames_to_char_ptr_vec): Return std::vector of
10340 gdb::unique_xmalloc_ptr.
10341 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10342 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10343 (delim_string_to_char_ptr_vec): Return an std::vector of
10344 gdb::unique_xmalloc_ptr, adjust the code.
10345 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10346 gdb::unique_xmalloc_ptr, adjust the code.
10347 (dirnames_to_char_ptr_vec): Return an std::vector of
10348 gdb::unique_xmalloc_ptr, adjust the code.
10349 * auto-load.c (auto_load_safe_path_vec): Change type to
10350 std::vector of gdb::unique_xmalloc_ptr.
10351 (auto_load_expand_dir_vars): Return an std::vector of
10352 gdb::unique_xmalloc_ptr, adjust the code.
10353 (auto_load_safe_path_vec_update): Adjust.
10354 (filename_is_in_auto_load_safe_path_vec): Adjust.
10355 (auto_load_objfile_script_1): Adjust.
10356 * build-id.c (build_id_to_debug_bfd): Adjust.
10357 * linux-thread-db.c (thread_db_load_search): Adjust.
10358 * source.c (add_path): Adjust.
10360 * symfile.c (find_separate_debug_file): Adjust.
10361 * utils.c (do_free_char_ptr_vec): Remove.
10362 (make_cleanup_free_char_ptr_vec): Remove.
10364 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10367 * common/pathstuff.c: Conditionally include "<windows.h>".
10369 2018-03-01 Georg Sauthoff <mail@georg.so>
10372 * gcore.in: Quote variables and switch interpreter to bash.
10374 2018-03-01 Tom Tromey <tom@tromey.com>
10376 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10377 assertion. Add assertion for discriminant_index.
10378 (quirk_rust_enum): Use correct base type name in univariant case.
10380 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10382 * record.c (get_call_history_modifiers): Return a
10383 record_print_flags.
10384 (cmd_record_call_history): Adjust.
10385 * record-btrace.c (record_btrace_call_history): Adjust.
10386 (record_btrace_call_history_range): Adjust.
10387 (record_btrace_call_history_from): Adjust.
10388 * target-debug.h (target_debug_print_record_print_flags): New.
10389 * target-delegates.c: Re-generate.
10390 * target.c (target_call_history): Change flags type.
10391 (target_call_history_from): Likewise.
10392 (target_call_history_range): Likewise.
10393 * target.h (struct target_ops) <target_call_history>: Likewise.
10394 (target_call_history_from): Likewise.
10395 (target_call_history_range): Likewise.
10397 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10398 Simon Marchi <simon.marchi@polymtl.ca>
10400 * common/common-utils.c: Include "sys/stat.h".
10401 (is_regular_file): Move here from "source.c"; change return
10403 * common/common-utils.h (is_regular_file): New prototype.
10404 * common/pathstuff.c (contains_dir_separator): New function.
10405 * common/pathstuff.h (contains_dir_separator): New prototype.
10406 * source.c: Don't include "sys/stat.h".
10407 (is_regular_file): Move to "common/common-utils.c".
10409 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10411 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10412 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10413 * auto-load.c: Include "common/pathstuff.h".
10414 * common/common-def.h (current_directory): Move here.
10415 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10417 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10419 * common/pathstuff.c: New file.
10420 * common/pathstuff.h: New file.
10421 * compile/compile.c: Include "common/pathstuff.h".
10422 * defs.h (current_directory): Move to "common/common-defs.h".
10423 * dwarf2read.c: Include "common/pathstuff.h".
10424 * exec.c: Likewise.
10425 * guile/scm-safe-call.c: Likewise.
10426 * linux-thread-db.c: Likewise.
10427 * main.c: Likewise.
10428 * nto-tdep.c: Likewise.
10429 * objfiles.c: Likewise.
10430 * source.c: Likewise.
10431 * symtab.c: Likewise.
10432 * utils.c: Include "common/pathstuff.h".
10433 (gdb_realpath): Move to "common/pathstuff.c".
10434 (gdb_realpath_keepfile): Likewise.
10435 (gdb_abspath): Likewise.
10436 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10437 (gdb_realpath_keepfile): Likewise.
10438 (gdb_abspath): Likewise.
10440 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10442 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10443 wildcard process pid for super_resume for kernels with a
10446 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10448 * compile/compile.c (get_args): Add additional comments
10449 explaining function.
10451 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10452 Tom Tromey <tom@tromey.com>
10454 * target.h (memory_write_request_s): Remove typedef. Don't define
10456 (target_write_memory_blocks): Change argument to std::vector.
10457 (struct memory_write_request): Add constructor.
10458 * target-memory.c (compare_block_starting_address): Return bool.
10459 Change argument types.
10460 (claim_memory): Change arguments to use std::vector.
10461 (split_regular_and_flash_blocks, blocks_to_erase)
10462 (compute_garbled_blocks): Likewise.
10463 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10464 (target_write_memory_blocks): Change argument to std::vector.
10465 * symfile.c (struct load_section_data): Add constructor and
10466 destructor. Use std::vector for "requests".
10467 (struct load_progress_data): Add initializers.
10468 (load_section_callback): Update. Use "new".
10469 (clear_memory_write_data): Remove.
10470 (generic_load): Update.
10472 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10474 * arch/aarch64.h: Use common/tdesc.h.
10476 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10478 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10479 architecture with a 64-bit ABI.
10481 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10483 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10484 ahead of target description loading.
10486 2018-02-26 Tom Tromey <tom@tromey.com>
10488 * stack.c (backtrace_command_1): Update.
10489 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10491 * python/py-framefilter.c (py_print_frame)
10492 (gdbpy_apply_frame_filter): Change type of "flags".
10493 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10495 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10496 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10497 * extension.h (enum frame_filter_flag): Rename from
10498 frame_filter_flags.
10499 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10500 (apply_ext_lang_frame_filter): Change type of "flags".
10501 * extension.c (apply_ext_lang_frame_filter): Change type of
10503 * extension-priv.h (struct extension_language_ops)
10504 <apply_frame_filter>: Change type of "flags".
10506 2018-02-26 Tom Tromey <tom@tromey.com>
10509 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10510 off-by-one in py_end computation.
10511 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10513 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10516 2018-02-26 Tom Tromey <tom@tromey.com>
10518 * dwarf2read.c (struct variant_field): New.
10519 (struct nextfield) <variant>: New field.
10520 (dwarf2_add_field): Handle DW_TAG_variant_part.
10521 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10522 discriminated union.
10523 (read_structure_type): Handle DW_TAG_variant_part.
10524 (handle_struct_member_die): New function, extracted from
10525 process_structure_scope. Handle DW_TAG_variant.
10526 (process_structure_scope): Handle discriminated unions. Call
10527 handle_struct_member_die.
10529 2018-02-26 Tom Tromey <tom@tromey.com>
10531 * rust-lang.h (rust_last_path_segment): Declare.
10532 * rust-lang.c (rust_last_path_segment): Now public. Change
10534 (struct disr_info): Remove.
10535 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10536 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10537 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10538 (rust_enum_p, rust_enum_variant): New function.
10539 (rust_underscore_fields): Remove "offset" parameter.
10540 (rust_print_enum): New function.
10541 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10542 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10543 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10545 (rust_internal_print_type): New function, from rust_print_type.
10547 (rust_print_type): Call rust_internal_print_type.
10548 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10549 Update enum handling.
10550 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10551 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10552 (rust_union_quirks): New functions.
10553 (process_full_comp_unit, process_full_type_unit): Call
10555 (process_structure_scope): Update rust_unions if necessary.
10557 2018-02-26 Tom Tromey <tom@tromey.com>
10559 * value.h (value_union_variant): Declare.
10560 * valops.c (value_union_variant): New function.
10561 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10562 (struct discriminant_info): New.
10563 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10565 (struct main_type) <flag_discriminated_union>: New field.
10567 2018-02-26 Tom Tromey <tom@tromey.com>
10569 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10570 unittests/unpack-selftests.c.
10571 * unittests/unpack-selftests.c: New file.
10572 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10574 2018-02-26 Yao Qi <yao.qi@linaro.org>
10576 * dwarf2read.c (struct partial_die_info) <read>: New method.
10577 (read_partial_die): Remove the declaration.
10578 (load_partial_dies): Update.
10579 (partial_die_info::partial_die_info):
10580 (read_partial_die): Change it to partial_die_info::read.
10582 2018-02-26 Yao Qi <yao.qi@linaro.org>
10584 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10585 (fixup_partial_die): Remove declaration.
10586 (scan_partial_symbols): Update.
10587 (partial_die_parent_scope): Likewise.
10588 (partial_die_full_name): Likewise.
10589 (fixup_partial_die): Change it to partial_die_info::fixup.
10591 2018-02-26 Yao Qi <yao.qi@linaro.org>
10593 * dwarf2read.c (read_partial_die): Update the declaration.
10594 (load_partial_dies): Caller update.
10595 (read_partial_die): Remove one argument abbrev_len.
10597 2018-02-26 Yao Qi <yao.qi@linaro.org>
10599 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10600 assignment operator.
10601 (load_partial_dies): Use ctor and copy ctor.
10602 (read_partial_die): Update.
10603 (dwarf2_cu::find_partial_die): Use ctor.
10605 2018-02-26 Yao Qi <yao.qi@linaro.org>
10607 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10608 (find_partial_die_in_comp_unit): Change it to
10609 dwarf2_cu::find_partial_die.
10610 (find_partial_die): Update.
10612 2018-02-26 Yao Qi <yao.qi@linaro.org>
10614 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10617 2018-02-26 Yao Qi <yao.qi@linaro.org>
10619 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10621 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10623 * arch/amd64.h: Use common/tdesc.h.
10624 * arch/i386.c: Likewise.
10625 * arch/i386.h: Likewise.
10626 * arch/tic6x.c: Likewise.
10627 * arch/tdesc.h: Move file from here...
10628 * common/tdesc.h: ...to here.
10629 * features/aarch64-core.c: Regenerate.
10630 * features/aarch64-fpu.c: Regenerate.
10631 * features/i386/32bit-avx.c: Regenerate.
10632 * features/i386/32bit-avx512.c: Regenerate.
10633 * features/i386/32bit-core.c: Regenerate.
10634 * features/i386/32bit-linux.c: Regenerate.
10635 * features/i386/32bit-mpx.c: Regenerate.
10636 * features/i386/32bit-pkeys.c: Regenerate.
10637 * features/i386/32bit-sse.c: Regenerate.
10638 * features/i386/64bit-avx.c: Regenerate.
10639 * features/i386/64bit-avx512.c: Regenerate.
10640 * features/i386/64bit-core.c: Regenerate.
10641 * features/i386/64bit-linux.c: Regenerate.
10642 * features/i386/64bit-mpx.c: Regenerate.
10643 * features/i386/64bit-pkeys.c: Regenerate.
10644 * features/i386/64bit-segments.c: Regenerate.
10645 * features/i386/64bit-sse.c: Regenerate.
10646 * features/i386/x32-core.c: Regenerate.
10647 * features/tic6x-c6xp.c: Regenerate.
10648 * features/tic6x-core.c: Regenerate.
10649 * features/tic6x-gp.c: Regenerate.
10650 * target-descriptions.c: Use common/tdesc.h.
10651 * target-descriptions.h: Likewise.
10653 2018-02-24 Tom Tromey <tom@tromey.com>
10655 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10656 (try_thread_db_load_from_dir, thread_db_load_search): Use
10658 (info_auto_load_libthread_db_compare): Return bool. Change
10660 (info_auto_load_libthread_db): Use std::vector, std::string.
10663 2018-02-24 Tom Tromey <tom@tromey.com>
10665 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10667 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10669 * gdbarch.c: Rebuild.
10670 * gdbarch.h: Rebuild.
10671 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10672 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10673 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10676 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10678 * gdbtypes.h (sect_offset): Change type to uint64_t.
10679 (sect_offset_str): New function.
10680 * dwarf2read.c (create_addrmap_from_aranges): Use
10682 (error_check_comp_unit_head): Likewise.
10683 (create_debug_type_hash_table): Likewise.
10684 (read_cutu_die_from_dwo): Likewise.
10685 (init_cutu_and_read_dies): Likewise.
10686 (init_cutu_and_read_dies_no_follow): Likewise.
10687 (process_psymtab_comp_unit_reader): Likewise.
10688 (partial_die_parent_scope): Likewise.
10689 (peek_die_abbrev): Likewise.
10690 (process_queue): Likewise.
10691 (dwarf2_physname): Likewise.
10692 (read_namespace_alias): Likewise.
10693 (read_import_statement): Likewise.
10694 (create_dwo_cu_reader): Likewise.
10695 (create_cus_hash_table): Likewise.
10696 (lookup_dwo_cutu): Likewise.
10697 (inherit_abstract_dies): Likewise.
10698 (read_func_scope): Likewise.
10699 (read_call_site_scope): Likewise.
10700 (dwarf2_add_member_fn): Likewise.
10701 (read_common_block): Likewise.
10702 (read_module_type): Likewise.
10703 (read_typedef): Likewise.
10704 (read_subrange_type): Likewise.
10705 (load_partial_dies): Likewise.
10706 (read_partial_die): Likewise.
10707 (find_partial_die): Likewise.
10708 (read_str_index): Likewise.
10709 (dwarf2_string_attr): Likewise.
10710 (build_error_marker_type): Likewise.
10711 (lookup_die_type): Likewise.
10712 (dump_die_shallow): Likewise.
10713 (follow_die_ref): Likewise.
10714 (dwarf2_fetch_die_loc_sect_off): Likewise.
10715 (dwarf2_fetch_constant_bytes): Likewise.
10716 (follow_die_sig): Likewise.
10717 (get_signatured_type): Likewise.
10718 (get_DW_AT_signature_type): Likewise.
10719 (dwarf2_find_containing_comp_unit): Likewise.
10720 (set_die_type): Likewise.
10722 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10724 * arch/aarch64.c: Include "common-defs.h".
10725 * arch/amd64.c: Likewise.
10726 * arch/i386.c: Likewise.
10728 2018-02-21 Tom Tromey <tom@tromey.com>
10730 * value.h: (extract_field_op): Update.
10731 * eval.c (extract_field_op): Return a const char *.
10732 * expression.h (parse_expression_for_completion): Update.
10733 * completer.c (complete_expression): Update.
10734 (add_struct_fields): Make fieldname const.
10735 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10736 (mark_completion_tag, parse_exp_in_context_1): Update.
10737 (parse_expression_for_completion): Change "name" to
10738 unique_xmalloc_ptr*.
10740 2018-02-21 Tom Tromey <tom@tromey.com>
10742 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10744 2018-02-21 Yao Qi <yao.qi@linaro.org>
10746 * avr-tdep.c (avr_read_pc): Change parameter type to
10748 * gdbarch.sh (read_pc): Likewise.
10749 * gdbarch.c: Re-generated.
10750 * gdbarch.h: Re-generated.
10751 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10753 * ia64-tdep.c (ia64_read_pc): Likewise.
10754 * mips-tdep.c (mips_read_pc): Likewise.
10755 * spu-tdep.c (spu_read_pc): Likewise.
10757 2018-02-21 Yao Qi <yao.qi@linaro.org>
10759 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10760 * regcache-dump.c: New file.
10761 * regcache.c: Move register_dump to regcache-dump.c.
10762 (maintenance_print_registers): Likewise.
10763 (maintenance_print_raw_registers): Likewise.
10764 (maintenance_print_cooked_registers): Likewise.
10765 (maintenance_print_register_groups): Likewise.
10766 (maintenance_print_remote_registers): Likewise.
10767 (_initialize_regcache): Likewise.
10768 * regcache.h (register_dump): Moved from regcache.c.
10770 2018-02-21 Yao Qi <yao.qi@linaro.org>
10772 * regcache.c (regcache::regcache): Update.
10773 (regcache::invalidate): Move it to detached_regcache::invalidate.
10774 (get_thread_arch_aspace_regcache): Update.
10775 (regcache::raw_update): Update.
10776 (regcache::cooked_read): Remove some code.
10777 (regcache::cooked_read_value): Likewise.
10778 (regcache::raw_write): Remove assert on m_readonly_p.
10779 (regcache::raw_supply_integer): Move it to
10780 detached_regcache::raw_supply_integer.
10781 (regcache::raw_supply_zeroed): Likewise.
10782 * regcache.h (detached_regcache) <raw_supply_integer>: New
10784 <raw_supply_zeroed, invalidate>: Likewise.
10785 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10786 <invalidate>: Likewise.
10787 <m_readonly_p>: Removed.
10789 2018-02-21 Yao Qi <yao.qi@linaro.org>
10791 * infcmd.c (get_return_value): Let stop_regs point to
10792 get_current_regcache.
10793 * regcache.c (regcache::regcache): Remove.
10794 (register_dump_reg_buffer): New class.
10795 (regcache_print): Adjust.
10796 * regcache.h (regcache): Remove constructors.
10798 2018-02-21 Yao Qi <yao.qi@linaro.org>
10800 * regcache.c (class register_dump): New class.
10801 (register_dump_regcache, register_dump_none): New class.
10802 (register_dump_remote, register_dump_groups): New class.
10803 (regcache_print): Update.
10804 * regcache.h (regcache_dump_what): Move it to regcache.c.
10805 (regcache) <dump>: Remove.
10807 2018-02-21 Yao Qi <yao.qi@linaro.org>
10809 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10811 (jit_unwind_reg_set_impl): Call raw_supply.
10812 (jit_frame_sniffer): Use reg_buffer_rw.
10813 * record-full.c (record_full_core_regbuf): Change its type.
10814 (record_full_core_open_1): Use reg_buffer_rw.
10815 (record_full_close): Likewise.
10816 (record_full_core_fetch_registers): Use regcache->raw_supply.
10817 (record_full_core_store_registers): Likewise.
10818 * regcache.c (regcache::get_register_status): Move it to
10820 (regcache_raw_set_cached_value): Remove.
10821 (regcache::raw_set_cached_value): Remove.
10822 (regcache::raw_write): Call raw_supply.
10823 (regcache::raw_supply): Move it to reg_buffer_rw.
10824 * regcache.h (regcache_raw_set_cached_value): Remove.
10825 (reg_buffer_rw): New class.
10827 2018-02-21 Yao Qi <yao.qi@linaro.org>
10829 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10830 readonly_detached_regcache.
10831 (dummy_frame_prev_register): Use regcache->cooked_read.
10832 * frame.c (frame_save_as_regcache): Change return type.
10833 (frame_pop): Update.
10834 * frame.h (frame_save_as_regcache): Update declaration.
10835 * inferior.h (get_infcall_suspend_state_regcache): Update
10837 * infrun.c (infcall_suspend_state) <registers>: use
10838 readonly_detached_regcache.
10839 (save_infcall_suspend_state): Don't use regcache_dup.
10840 (get_infcall_suspend_state_regcache): Change return type.
10841 * linux-fork.c (struct fork_info) <savedregs>: Change to
10842 readonly_detached_regcache.
10844 (fork_save_infrun_state): Don't use regcache_dup.
10845 (info_checkpoints_command): Adjust.
10846 * mi/mi-main.c (register_changed_p): Update declaration.
10847 (mi_cmd_data_list_changed_registers): Use
10848 readonly_detached_regcache.
10849 (register_changed_p): Change parameter type to
10850 readonly_detached_regcache.
10851 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10852 readonly_detached_regcache.
10853 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10854 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10856 (regcache::save): Move it to reg_buffer.
10857 (regcache::restore): Change parameter type.
10858 (regcache_dup): Remove.
10859 * regcache.h (reg_buffer) <save>: New method.
10860 (readonly_detached_regcache): New class.
10861 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10862 readonly_detached_regcache.
10863 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10865 2018-02-21 Yao Qi <yao.qi@linaro.org>
10867 * frame.c (frame_save_as_regcache): Use regcache method save.
10868 (frame_pop): Use regcache method restore.
10869 * infrun.c (restore_infcall_suspend_state): Likewise.
10870 * linux-fork.c (fork_load_infrun_state): Likewise.
10871 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10873 * regcache.c (regcache_save): Remove.
10874 (regcache::restore): More asserts.
10875 (regcache_cpy): Remove.
10876 * regcache.h (regcache_save): Remove the declaration.
10877 (regcache::restore): Move from private to public.
10878 Remove the friend declaration of regcache_cpy.
10879 (regcache_cpy): Remove declaration.
10881 2018-02-21 Yao Qi <yao.qi@linaro.org>
10883 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10884 parameter type to 'readable_regcache *'.
10885 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10886 * arm-tdep.c (arm_neon_quad_read): Likewise.
10887 (arm_pseudo_read): Likewise.
10888 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10889 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10890 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10891 * gdbarch.c: Re-generated.
10892 * gdbarch.h: Re-generated.
10893 * gdbarch.sh (pseudo_register_read): Change parameter type to
10894 'readable_regcache *'.
10895 (pseudo_register_read_value): Likewise.
10896 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10897 (h8300_pseudo_register_read): Likewise.
10898 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10899 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10900 (i386_pseudo_register_read_into_value): Likewise.
10901 (i386_pseudo_register_read_value): Likewise.
10902 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10904 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10905 * m32c-tdep.c (m32c_raw_read): Likewise.
10906 (m32c_read_flg): Likewise.
10907 (m32c_banked_register): Likewise.
10908 (m32c_banked_read): Likewise.
10909 (m32c_sb_read): Likewise.
10910 (m32c_part_read): Likewise.
10911 (m32c_cat_read): Likewise.
10912 (m32c_r3r2r1r0_read): Likewise.
10913 (m32c_pseudo_register_read): Likewise.
10914 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10915 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10916 (mep_pseudo_cr64_read): Likewise.
10917 (mep_pseudo_register_read): Likewise.
10918 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10919 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10920 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10921 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10922 (regcache::cooked_read): Likewise.
10923 (regcache::cooked_read_value): Likewise.
10924 (regcache_cooked_read_signed):
10925 (regcache::cooked_read): Likewise.
10926 * regcache.h (readable_regcache): New class.
10927 (regcache): Inherit readable_regcache. Move some methods to
10929 * rl78-tdep.c (rl78_pseudo_register_read): Change
10930 parameter type to 'readable_regcache *'.
10931 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10932 (e500_pseudo_register_read): Change parameter type to
10933 'readable_regcache *'.
10934 (dfp_pseudo_register_read): Likewise.
10935 (vsx_pseudo_register_read): Likewise.
10936 (efpr_pseudo_register_read): Likewise.
10937 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10938 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10939 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10940 (sh64_pseudo_register_read): Likewise.
10941 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10942 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10943 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10944 (spu_pseudo_register_read): Likewise.
10945 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10946 (xtensa_pseudo_register_read): Likewise.
10948 2018-02-21 Yao Qi <yao.qi@linaro.org>
10950 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10951 (regcache::arch): Move it to reg_buffer::arch.
10952 (regcache::register_buffer): Likewise.
10953 (regcache::assert_regnum): Likewise.
10954 (regcache::num_raw_registers): Likewise.
10955 * regcache.h (reg_buffer): New class.
10956 (regcache): Inherit reg_buffer.
10958 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10960 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10961 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10963 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10965 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10967 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10969 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10970 (SFILES): Remove common/*.c files.
10971 (COMMON_OBS): Remove some *.o files built from common/*.c files.
10972 * common/common.host: Add common reference.
10973 * configure.ac: Likewise.
10974 * configure: Regenerate.
10976 2018-02-16 Yao Qi <yao.qi@linaro.org>
10978 * block.c (block_namespace_info): Inherit allocate_on_obstack.
10979 (block_initialize_namespace): Use new.
10980 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
10981 (dwarf2_free_objfile): Use delete.
10982 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
10983 (copy_type_recursive): Use new.
10984 * gdb_obstack.h (allocate_on_obstack): New.
10986 2018-02-15 Yao Qi <yao.qi@linaro.org>
10989 * inferior.c (exit_inferior_1): Reset inf->control.
10991 2018-02-15 Joel Brobecker <brobecker@adacore.com>
10993 * ada-lang.c (ada_to_fixed_value_create): Delete advance
10996 2018-02-14 Pedro Alves <palves@redhat.com>
10998 * frame-unwind.c (frame_unwind_try_unwinder): Always call
10999 frame_cleanup_after_sniffer on exception.
11001 2018-02-14 Tom Tromey <tom@tromey.com>
11003 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11005 (solib_bfd_open): Make pathname const.
11006 * solib.c (solib_bfd_open): Make pathname const.
11007 * solib-spu.c (spu_bfd_fopen): Make name const.
11008 (spu_bfd_open): Make pathname const.
11009 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11010 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11012 2018-02-14 Tom Tromey <tom@tromey.com>
11014 * symfile.c (symfile_bfd_open): Update.
11015 * source.h (openp, source_full_path_of, find_and_open_source):
11016 Change argument type to unique_xmalloc_ptr.
11017 * source.c (openp): Take a unique_xmalloc_ptr.
11018 (source_full_path_of, find_and_open_source): Likewise.
11019 (open_source_file, symtab_to_fullname): Update.
11020 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11021 unique_xmalloc_ptr.
11022 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11023 (exec_file_find): Update.
11024 * psymtab.c (psymtab_to_fullname): Update.
11025 * nto-tdep.h (nto_find_and_open_solib): Update.
11026 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11027 unique_xmalloc_ptr.
11028 * exec.c (exec_file_attach): Update.
11029 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11030 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11032 2018-02-14 Tom Tromey <tom@tromey.com>
11034 * solib.c: Include source.h.
11035 * nto-tdep.c: Include source.h.
11036 * mi/mi-cmd-env.c: Include source.h.
11037 * infcmd.c: Include source.h.
11038 * exec.c: Include source.h.
11039 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11040 (add_path, directory_switch, source_path, init_source_path): Move
11042 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11043 (add_path, directory_switch, source_path, init_source_path):
11046 2018-02-14 Tom Tromey <tom@tromey.com>
11048 * solist.h (exec_file_find, solib_find): Return
11049 unique_xmalloc_ptr.
11050 (solib_bfd_fopen): Take a const char *.
11051 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11052 (exec_file_find, solib_find): Likewise.
11053 (solib_bfd_fopen): Do not take ownership of "pathname".
11054 (solib_bfd_open): Use unique_xmalloc_ptr.
11055 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11056 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11057 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11058 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11060 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11062 * ada-lang.c (name_match_type_from_name): Remove reference to
11063 ada_name_for_lookup in function's documentation.
11064 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11066 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11068 * defs.h (enum openp_flags): New enum.
11069 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11070 Move to enum openp_flags.
11071 (openp_flags): New enum flags.
11072 (openp): Change parameter type to openp_flags.
11073 * source.c (openp): Change parameter type to openp_flags.
11074 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11075 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11077 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11079 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11082 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11084 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11086 (class dwarf2_queue_guard): ...the destructor of this new class.
11087 (dw2_do_instantiate_symtab): Create instance of the new class
11088 dwarf2_queue_guard, remove cleanup.
11090 2018-02-09 Tom Tromey <tom@tromey.com>
11092 * source.c (find_source_lines): Don't reference past the end of
11095 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11097 * remote.c (remote_btrace_maybe_reopen): Change error message.
11098 * btrace.c (btrace_enable): Likewise.
11099 (parse_xml_btrace): Likewise.
11100 (parse_xml_btrace_conf): Likewise.
11102 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11104 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11105 (linux_enable_pt, linux_enable_bts): Call
11106 diagnose_perf_event_open_fail.
11108 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11110 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11111 Remove parameter and change return type. Update callers. Move it.
11112 (linux_enable_bts, linux_enable_pt): Improve error message.
11113 (linux_enable_pt): Remove zero buffer size check.
11114 (linux_enable_btrace): Improve error messages. Remove NULL return
11117 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11119 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11120 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11121 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11122 (linux_supports_pt, linux_supports_btrace): Remove.
11123 (linux_enable_bts): Call cpu_supports_bts.
11124 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11125 * remote.c (remote_supports_btrace): Remove.
11126 (init_remote_ops): Remove remote_supports_btrace.
11127 * target-delegates.c: Regenerated.
11128 * target.c (target_supports_btrace): Remove.
11129 * target.h (target_ops) <to_supports_btrace>: Remove
11130 (target_supports_btrace): Remove.
11131 * x86-linux-nat.c (x86_linux_create_target): Remove
11132 linux_supports_btrace.
11134 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11136 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11138 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11139 exception and use message in own exception.
11141 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11143 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11144 (perf_event_pt_event_type): Use gdb_file_up.
11145 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11146 scoped_fd, and scoped_mmap.
11148 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11150 * common/scoped_mmap.h: New.
11151 * unittests/scoped_mmap-selftest.c: New.
11152 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11153 unittests/scoped_mmap-selftest.c.
11155 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11157 * common/scoped_fd.h: New.
11158 * unittests/scoped_fd-selftest.c: New.
11159 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11160 unittests/scoped_fd-selftest.c.
11162 2018-02-09 Tom Tromey <tom@tromey.com>
11164 * auto-load.c (auto_load_section_scripts): Use
11165 gdb::unique_xmalloc_ptr.
11167 2018-02-09 Tom Tromey <tom@tromey.com>
11169 * auto-load.c (execute_script_contents): Use std::string.
11171 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11173 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11174 Python function, rather than a new command.
11176 2018-02-08 Tom Tromey <tom@tromey.com>
11178 * solib.c (solib_find_1): Use std::string.
11179 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11181 2018-02-08 Tom Tromey <tom@tromey.com>
11183 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11185 2018-02-08 Tom Tromey <tom@tromey.com>
11187 * source.c (find_source_lines): Use gdb::def_vector.
11189 2018-02-08 Tom Tromey <tom@tromey.com>
11191 * macrocmd.c (struct temporary_macro_definition): New.
11192 (macro_define_command): Use temporary_macro_definition. Remove
11194 (free_macro_definition_ptr): Remove.
11196 2018-02-08 Tom Tromey <tom@tromey.com>
11198 * macroexp.c (maybe_expand): Use std::string.
11200 2018-02-08 Tom Tromey <tom@tromey.com>
11202 * macroexp.c (struct macro_buffer): Add initializers for some
11204 (init_buffer, init_shared_buffer, free_buffer)
11205 (free_buffer_return_text): Remove.
11206 (macro_buffer): New constructors.
11207 (~macro_buffer): New destructor.
11208 (macro_buffer::set_shared): New method.
11209 (macro_buffer::resize_buffer, macro_buffer::appendc)
11210 (macro_buffer::appendmem): Now methods, not free functions.
11211 (set_token, append_tokens_without_splicing, stringify)
11212 (macro_stringify): Update.
11213 (gather_arguments): Change return type. Remove argc_p argument,
11214 add args_ptr argument. Use std::vector.
11215 (substitute_args): Remove argc argument. Accept std::vector.
11216 (expand): Update. Use std::vector.
11217 (scan, macro_expand, macro_expand_next): Update.
11219 2018-02-08 Tom Tromey <tom@tromey.com>
11221 * symtab.c (default_collect_symbol_completion_matches_break_on):
11222 Use unique_xmalloc_ptr.
11223 * macroscope.h: (sal_macro_scope, user_macro_scope)
11224 (default_macro_scope): Return unique_xmalloc_ptr.
11225 * macroscope.c (sal_macro_scope, user_macro_scope)
11226 (default_macro_scope): Return unique_xmalloc_ptr.
11227 * macroexp.h (macro_expand, macro_expand_once): Return
11228 unique_xmalloc_ptr.
11229 * macroexp.c (macro_expand, macro_expand_once): Return
11230 unique_xmalloc_ptr.
11231 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11232 (info_macro_command, info_macros_command): Use
11233 unique_xmalloc_ptr.
11234 * compile/compile-c-support.c (write_macro_definitions): Use
11235 unique_xmalloc_ptr.
11236 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11238 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11240 * value.c (value_static_field): Assign field type instead of
11241 containing type when returning an optimized out value.
11243 2018-02-06 Yao Qi <yao.qi@linaro.org>
11245 * ft32-tdep.c (ft32_read_pc): Remove.
11246 (ft32_write_pc): Remove.
11247 (ft32_gdbarch_init): Update.
11248 * m32r-tdep.c (m32r_read_pc): Remove.
11249 (m32r_gdbarch_init): Update.
11250 * mep-tdep.c (mep_read_pc): Remove.
11251 (mep_gdbarch_init): Update.
11252 * microblaze-tdep.c (microblaze_write_pc): Remove.
11253 (microblaze_gdbarch_init): Update.
11254 * mn10300-tdep.c (mn10300_read_pc): Remove.
11255 (mn10300_write_pc): Remove.
11256 (mn10300_gdbarch_init): Update.
11257 * moxie-tdep.c (moxie_read_pc): Remove.
11258 (moxie_write_pc): Remove.
11259 (moxie_gdbarch_init): Update.
11261 2018-02-06 Yao Qi <yao.qi@linaro.org>
11263 * expprint.c (print_subexp_standard): Handle
11264 OP_F77_UNDETERMINED_ARGLIST.
11265 (dump_subexp_body_standard): Likewise.
11267 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11269 * target-descriptions.c (tdesc_element_visitor) Add empty
11271 (tdesc_type): Move make_gdb_type from here.
11272 (tdesc_type_builtin): Likewise.
11273 (tdesc_type_vector): Likewise.
11274 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11275 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11276 (make_gdb_type_union): Likewise.
11277 (make_gdb_type_flags): Likewise.
11278 (make_gdb_type_enum): Likewise.
11279 (make_gdb_type): New function.
11280 (tdesc_register_type): Use static make_gdb_type.
11282 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11284 * infcmd.c (default_print_one_register_info): Align natural-format
11285 column values consistently one under another.
11286 (pad_to_column): New function.
11288 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11290 * dwarf2read.c (dwarf2_physname): Move commment.
11292 2018-02-01 Leszek Swirski <leszeks@google.com>
11294 * varobj.c (varobj_formatted_print_options): Allow recursive
11295 pretty printing if pretty printing is enabled.
11297 2018-02-01 Leszek Swirski <leszeks@google.com>
11299 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11300 names after a structop as a filename.
11302 2018-02-01 Yao Qi <yao.qi@linaro.org>
11304 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11305 (arm_record_coproc_data_proc): Likewise.
11307 2018-02-01 Yao Qi <yao.qi@linaro.org>
11309 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11311 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11313 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11314 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11316 2018-01-31 Pedro Alves <palves@redhat.com>
11318 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11319 * inflow.c (child_terminal_save_inferior): Wrap reference to
11320 tcgetpgrp in HAVE_TERMIOS_H.
11321 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11323 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11324 always iterate over all inferiors.
11325 (gdbsim_cntrl_c): Adjust.
11326 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11328 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11330 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11331 index type is objfile-owned if the element type is as well.
11333 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11337 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11339 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11340 "features/s390x-linux64.c".
11341 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11342 s390_linux32 and s390x_linux64.
11343 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11345 * s390-tdep.c: Include "features/s390-linux32.c" and
11346 "features/s390x-linux64.c".
11347 (s390_tdesc_valid): Add check for tdesc_has_registers.
11348 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11349 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11350 tdesc_s390x_linux64.
11351 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11352 tdesc_s390x_linux64 to...
11353 * s390-tdep.h: ...here.
11355 2018-01-30 Pedro Alves <palves@redhat.com>
11358 * config.in, configure: Regenerate.
11359 * configure.ac: Check for getpgid.
11360 * go32-nat.c (go32_pass_ctrlc): New.
11361 (go32_target): Install it.
11362 * inf-child.c (inf_child_target): Install
11363 child_terminal_save_inferior, child_pass_ctrlc and
11365 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11366 (inf_ptrace_target): No longer install it.
11367 * infcmd.c (interrupt_target_1): Adjust.
11368 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11369 (child_interrupt): Declare.
11370 (inferior::terminal_state): New.
11371 * inflow.c (struct terminal_info): Update comments.
11372 (inferior_process_group): Delete.
11373 (terminal_is_ours): Delete.
11374 (gdb_tty_state): New.
11375 (child_terminal_init): Adjust.
11376 (is_gdb_terminal, sharing_input_terminal_1)
11377 (sharing_input_terminal): New functions.
11378 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11379 Set the process's actual process group in the foreground if
11380 possible. Handle is_ours_for_output/is_ours distinction. Don't
11381 mark terminal as the inferior's if not sharing GDB's terminal.
11382 Don't check attach_flag.
11383 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11384 pass down a target_terminal_state.
11385 (child_terminal_save_inferior): New, factored out from ...
11386 (child_terminal_ours_1): ... this. Handle
11387 target_terminal_state::is_ours_for_output.
11388 (child_interrupt, child_pass_ctrlc): New.
11389 (inflow_inferior_exit): Clear the inferior's terminal_state.
11390 (copy_terminal_info): Copy the inferior's terminal state.
11391 (_initialize_inflow): Remove reference to terminal_is_ours.
11392 * inflow.h (inferior_process_group): Delete.
11393 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11394 * procfs.c (procfs_target): Don't install procfs_interrupt.
11395 (procfs_interrupt): Delete.
11396 * remote.c (remote_serial_quit_handler): Adjust.
11397 (remote_interrupt): Remove ptid parameter. Adjust.
11398 * target-delegates.c: Regenerate.
11399 * target.c: Include "terminal.h".
11400 (target_terminal::terminal_state): Rename to ...
11401 (target_terminal::m_terminal_state): ... this.
11402 (target_terminal::init): Adjust.
11403 (target_terminal::inferior): Adjust to per-inferior
11405 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11406 (target_terminal::ours, target_terminal::ours_for_output): Use
11407 target_terminal_is_ours_kind.
11408 (target_interrupt): Remove ptid parameter. Adjust.
11409 (default_target_pass_ctrlc): Adjust.
11410 * target.h (target_ops::to_terminal_save_inferior): New field.
11411 (target_ops::to_interrupt): Remove ptid_t parameter.
11412 (target_interrupt): Remove ptid_t parameter. Update comment.
11413 (target_pass_ctrlc): Update comment.
11414 * target/target.h (target_terminal_state): New scoped enum,
11415 factored out of ...
11416 (target_terminal::terminal_state): ... here.
11417 (target_terminal::inferior): Update comments.
11418 (target_terminal::restore_inferior): New.
11419 (target_terminal::is_inferior, target_terminal::is_ours)
11420 (target_terminal::is_ours_for_output): Adjust.
11421 (target_terminal::scoped_restore_terminal_state): Adjust to
11422 rename, and call restore_inferior() instead of inferior().
11423 (target_terminal::scoped_restore_terminal_state::m_state): Change
11425 (target_terminal::terminal_state): Rename to ...
11426 (target_terminal::m_terminal_state): ... this and change type.
11428 2018-01-30 Pedro Alves <palves@redhat.com>
11430 * linux-nat.c (wait_for_signal): New function.
11431 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11433 (async_terminal_is_ours)
11434 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11435 (linux_nat_add_target): Don't override
11436 to_terminal_inferior/to_terminal_ours.
11438 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11440 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11442 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11444 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11445 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11446 dwarf2_per_objfile_free here.
11447 (dwarf2_per_objfile_free): Remove.
11448 (_initialize_dwarf2_read): Don't register
11449 dwarf2_per_objfile_free as a registry cleanup.
11451 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11453 Avoid compilation errors in MinGW native builds
11455 The error is triggered by including python-internal.h, and the
11458 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11459 from build-gnulib/import/math.h:27,
11460 from d:/usr/Python26/include/pyport.h:235,
11461 from d:/usr/Python26/include/Python.h:58,
11462 from python/python-internal.h:94,
11463 from python/py-arch.c:24:
11464 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11468 This happens because Python headers define 'hypot' to expand t
11469 '_hypot' in the Windows builds.
11470 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11471 'hypoth'. This avoids a compilation error.
11473 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11475 * MAINTAINERS (Write After Approval): Fix ordering.
11477 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11479 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11481 2018-01-26 Alan Modra <amodra@gmail.com>
11483 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11484 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11485 Remove nop. Make const. Comment.
11486 (powerpc32_plt_stub_so_2): New.
11487 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11488 Correct count. Update uses.
11489 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11490 Move common code reading PLT entry word. Correct
11491 powerpc32_plt_stub PLT address calculation.
11492 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11493 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11494 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11495 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11496 (ppc64_standard_linkage8): Likewise.
11497 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11498 Correct insns description.
11499 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11501 2018-01-24 Pedro Alves <palves@redhat.com>
11503 GCC PR libstdc++/83906
11504 * gdbtypes.c (operator==(const dynamic_prop &,
11505 const dynamic_prop &)): New.
11506 (operator==(const range_bounds &, const range_bounds &)): New.
11507 (check_types_equal): Use them instead of memcmp.
11508 * gdbtypes.h (operator==(const dynamic_prop &,
11509 const dynamic_prop &)): Declare.
11510 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11511 (operator==(const range_bounds &, const range_bounds &)): Declare.
11512 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11514 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11516 * s390-linux-tdep.c (s390_record_address_mask)
11517 (s390_record_calc_disp_common, s390_record_calc_disp)
11518 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11519 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11520 (s390_process_record): Move to s390-tdep.c.
11521 (s390_linux_init_abi_any): Adjust.
11522 * s390-tdep.c (s390_record_address_mask)
11523 (s390_record_calc_disp_common, s390_record_calc_disp)
11524 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11525 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11526 (s390_process_record): Moved from s390-linux-tdep.c
11527 (s390_gdbarch_init): Adjust.
11529 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11531 * s390-linux-nat.c (s390-tdep.h): New include.
11532 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11533 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11534 (ALLDEPFILES): Add s390-tdep.c.
11535 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11536 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11537 * s390-tdep.h: ...this. New file.
11538 * s390-linux-tdep.c (s390-tdep.h): New include.
11539 (_initialize_s390_tdep): Rename to...
11540 (_initialize_s390_linux_tdep): ...this and adjust.
11541 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11542 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11544 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11545 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11546 (s390_is_partial_instruction, s390_software_single_step)
11547 (is_non_branch_ril, s390_displaced_step_copy_insn)
11548 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11549 (s390_prologue_data, s390_addr, s390_store, s390_load)
11550 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11551 (s390_register_call_saved, s390_guess_tracepoint_registers)
11552 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11553 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11554 (s390_pseudo_register_name, s390_pseudo_register_type)
11555 (s390_pseudo_register_read, s390_pseudo_register_write)
11556 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11557 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11558 (s390_addr_bits_remove, s390_address_class_type_flags)
11559 (s390_address_class_type_flags_to_name)
11560 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11561 (s390_function_arg_float, s390_function_arg_vector)
11562 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11563 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11564 (s390_frame_align, s390_register_return_value, s390_return_value)
11565 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11566 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11567 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11568 (s390_trad_frame_prev_register, s390_unwind_cache)
11569 (s390_prologue_frame_unwind_cache)
11570 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11571 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11572 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11573 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11574 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11575 (s390_frame_base_address, s390_local_base_address)
11576 (s390_frame_base, s390_gcc_target_options)
11577 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11578 (s390_validate_reg_range, s390_tdesc_valid)
11579 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11580 * s390-tdep.c: ...this. New file.
11582 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11584 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11585 (s390_process_record, s390_gdbarch_tdep_alloc)
11586 (s390_linux_init_abi_any): Use/set new hook.
11588 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11590 * s390-linux-tdep.c (osabi.h): New include.
11591 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11592 (s390_linux_init_abi_any): New functions.
11593 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11595 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11597 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11598 tdesc_has_registers check
11600 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11602 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11603 (s390_validate_reg_range): New macro.
11604 (s390_gdbarch_init): Adjust.
11606 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11608 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11609 (s390_gdbarch_tdep_alloc): Adjust.
11610 (s390_gdbarch_init): Adjust.
11612 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11614 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11615 <have_tdb>: Change type to bool.
11616 (s390_gdbarch_tdep_alloc): Adjust.
11617 (s390_gdbarch_init): Adjust.
11619 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11621 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11622 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11623 (s390_gdbarch_tdep_alloc): New function.
11624 (s390_gdbarch_init): Allocate tdep at start and use its fields
11625 instead of separate variables.
11627 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11629 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11630 when looking for cached gdbarch and add comment for remaining.
11632 2018-01-22 Pedro Alves <palves@redhat.com>
11633 Sergio Durigan Junior <sergiodj@redhat.com>
11635 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11638 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11640 * MAINTAINERS: Update my company e-mail address.
11642 2018-01-22 Yao Qi <yao.qi@linaro.org>
11644 * regcache.c (cooked_write_test): New function.
11645 (_initialize_regcache): Register the test.
11647 2018-01-22 Yao Qi <yao.qi@linaro.org>
11649 * ia64-tdep.c (ia64_pseudo_register_read): Call
11650 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11651 * m32c-tdep.c (m32c_cat_read): Likewise.
11652 (m32c_r3r2r1r0_read): Likewise.
11653 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11654 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11656 2018-01-22 Yao Qi <yao.qi@linaro.org>
11658 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11659 method raw_read instead of regcache_raw_read.
11660 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11661 * arm-tdep.c (arm_neon_quad_read): Likewise.
11662 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11663 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11664 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11665 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11666 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11667 (i386_pseudo_register_read_into_value): Likewise.
11668 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11669 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11670 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11671 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11672 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11673 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11674 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11675 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11676 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11678 2018-01-22 Yao Qi <yao.qi@linaro.org>
11680 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11681 * configure.tgt: Remove target mt.
11682 * mt-tdep.c: Remove.
11683 * regcache.c (cooked_read_test): Remove the check for mt.
11685 2018-01-22 Yao Qi <yao.qi@linaro.org>
11687 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11688 instead of gdbarch_pseudo_register_read_value.
11690 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11692 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11695 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11697 * linespec.c (create_sals_line_offset): Remove code that preserved
11698 the symtab_and_line's line number.
11700 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11702 * varobj.c (varobj_create): Don't set valid_block when creating a
11705 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11707 * varobj.c (varobj_create): Remove out of date comment.
11709 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11712 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11713 updating innermost block.
11714 * parse.c (innermost_block_tracker::update): Take extra type
11715 parameter, and check types match before updating innermost block.
11716 (write_dollar_variable): Update innermost block for registers.
11717 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11718 (innermost_block_tracker::innermost_block_tracker): Initialise
11720 (innermost_block_tracker::reset): Take type parameter.
11721 (innermost_block_tracker::update): Take type parameter, and pass
11722 type through as needed.
11723 (innermost_block_tracker::m_types): New member.
11724 * varobj.c (varobj_create): Pass type when reseting innermost
11727 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11729 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11730 * ada-lang.c (resolve_subexp): Likewise.
11731 * breakpoint.c (set_breakpoint_condition) Likewise.
11732 (watch_command_1) Likewise.
11733 * c-exp.y (variable): Likewise.
11734 * d-exp.y (PrimaryExpression): Likewise.
11735 * f-exp.y (variable): Likewise.
11736 * go-exp.y (variable): Likewise.
11737 * m2-exp.y (variable): Likewise.
11738 * objfiles.c (objfile::~objfile): Likewise.
11739 * p-exp.y (variable): Likewise.
11740 * parse.c (innermost_block): Change type.
11741 * parser-defs.h (class innermost_block_tracker): New.
11742 (innermost_block): Change to innermost_block_tracker.
11743 * printcmd.c (display_command): Switch to innermost_block API.
11744 (do_one_display): Likewise.
11745 * rust-exp.y (do_one_display): Likewise.
11746 * symfile.c (clear_symtab_users): Likewise.
11747 * varobj.c (varobj_create): Switch to innermost_block API, replace
11748 use of innermost_block with block stored on varobj object.
11750 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11752 * expression.h (innermost_block): Remove declaration.
11753 * varobj.c: Add 'parser-defs.h' include.
11755 2018-01-19 Tom Tromey <tom@tromey.com>
11757 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11758 symbols in the static and global blocks.
11760 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11762 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11763 gdb_ptrace.h, and move including gdb_wait.h ...
11764 * nat/linux-ptrace.h: ... to here.
11766 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11768 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11769 inf_ptrace_detach_success.
11770 (inf_ptrace_detach_success): Add inferior parameter, use it
11771 instead of inferior_ptid, pass it to detach_inferior.
11772 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11774 * inferior.c (detach_inferior): Add overload that takes an
11776 * inferior.h (detach_inferior): Likewise.
11777 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11778 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11779 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11781 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11783 * target.h (struct target_ops) <to_detach>: Add inferior
11785 (target_detach): Likewise.
11786 * target.c (dispose_inferior): Pass inferior down.
11787 (target_detach): Pass inferior down. Assert that it is equal to
11788 the current inferior.
11789 * aix-thread.c (aix_thread_detach): Pass inferior down.
11790 * corefile.c (core_file_command): Pass current_inferior() down.
11791 * corelow.c (core_detach): Add inferior parameter.
11792 * darwin-nat.c (darwin_detach): Likewise.
11793 * gnu-nat.c (gnu_detach): Likewise.
11794 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11795 * infcmd.c (detach_command): Pass current_inferior() down to
11797 * infrun.c (follow_fork_inferior): Pass parent_inf to
11799 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11801 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11802 * linux-thread-db.c (thread_db_detach): Likewise.
11803 * nto-procfs.c (procfs_detach): Likewise.
11804 * procfs.c (procfs_detach): Likewise.
11805 * record.c (record_detach): Likewise.
11806 * record.h (struct inferior): Forward-declare.
11807 (record_detach): Add inferior parameter.
11808 * remote-sim.c (gdbsim_detach): Likewise.
11809 * remote.c (remote_detach_1): Likewise.
11810 (remote_detach): Likewise.
11811 (extended_remote_detach): Likewise.
11812 * sol-thread.c (sol_thread_detach): Likewise.
11813 * target-debug.h (target_debug_print_inferior_p): New macro.
11814 * target-delegates.c: Re-generate.
11815 * top.c (kill_or_detach): Pass inferior down to target_detach.
11816 * windows-nat.c (windows_detach): Add inferior parameter.
11818 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11820 * target.h (struct target_ops) <to_detach>: Remove args
11822 (target_detach): Likewise.
11823 * target.c (dispose_inferior): Adjust.
11824 (target_detach): Remove args parameter, adjust.
11825 * aix-thread.c (aix_thread_detach): Adjust.
11826 * corefile.c (core_file_command): Adjust.
11827 * corelow.c (core_detach): Adjust.
11828 * darwin-nat.c (darwin_detach): Adjust.
11829 * gnu-nat.c (gnu_detach): Adjust.
11830 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11831 * infcmd.c (detach_command): Adjust
11832 * infrun.c (follow_fork_inferior): Adjust.
11833 (handle_vfork_child_exec_or_exit): Adjust.
11834 * linux-fork.c (linux_fork_detach): Remove args parameter.
11835 * linux-fork.h (linux_fork_detach): Likewise.
11836 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11837 * linux-thread-db.c (thread_db_detach): Likewise.
11838 * nto-procfs.c (procfs_detach): Likewise.
11839 * procfs.c (procfs_detach): Likewise.
11840 (do_detach): Remove signo parameter.
11841 * record.c (record_detach): Remove args parameter.
11842 * record.h (record_detach): Likewise.
11843 * remote-sim.c (gdbsim_detach): Likewise.
11844 * remote.c (remote_detach_1): Likewise.
11845 (remote_detach): Likewise.
11846 (extended_remote_detach): Likewise.
11847 * sol-thread.c (sol_thread_detach): Likewise.
11848 * target-delegates.c: Re-generate.
11849 * top.c (struct qt_args) <args>: Remove field.
11850 (kill_or_detach): Don't pass args.
11851 (quit_force): Don't set args.
11852 * windows-nat.c (windows_detach): Remove args parameter.
11854 2018-01-19 Yao Qi <yao.qi@linaro.org>
11856 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11857 (arm_linux_init_abi): Install it.
11859 2018-01-19 Yao Qi <yao.qi@linaro.org>
11861 * osabi.c (gdb_osabi_names): Extend the regexp for
11862 arm-linux-gnueabihf.
11864 2018-01-18 Yao Qi <yao.qi@linaro.org>
11866 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11868 (abbrev_table::add_abbrev): Update.
11869 (abbrev_table::lookup_abbrev): Update.
11871 2018-01-18 Yao Qi <yao.qi@linaro.org>
11873 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11875 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11877 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11880 2018-01-17 Tom Tromey <tom@tromey.com>
11882 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11884 2018-01-17 Tom Tromey <tom@tromey.com>
11886 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11887 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11888 (create_array_type_with_stride): Update.
11889 * dwarf2read.c (set_die_type): Update.
11891 2018-01-17 Tom Tromey <tom@tromey.com>
11893 * dwarf2read.c (delayed_method_info): Remove typedef.
11894 (dwarf2_cu::method_info): Now a std::vector.
11895 (add_to_method_list): Update.
11896 (free_delayed_list): Remove.
11897 (compute_delayed_physnames): Update.
11898 (process_full_comp_unit, process_full_type_unit): Clear the method
11899 list. Remove cleanups.
11900 (psymtab_include_file_name): Add name_holder parameter. Use
11901 unique_xmalloc_ptr.
11902 (dwarf_decode_lines): Update.
11904 2018-01-17 Tom Tromey <tom@tromey.com>
11905 Simon Marchi <simon.marchi@ericsson.com>
11907 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11908 (dwarf2_per_objfile::free_cached_comp_units)
11909 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11910 (init_cutu_and_read_dies_no_follow): Update.
11911 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11912 (dwarf2_cu::~dwarf2_cu): New.
11913 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11914 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11916 2018-01-17 Tom Tromey <tom@tromey.com>
11917 Simon Marchi <simon.marchi@ericsson.com>
11919 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11920 (struct die_reader_specs) <abbrev_table>: New member.
11921 (struct abbrev_table): Add constructor.
11922 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11923 <abbrev_obstack>: Now an auto_obstack.
11924 (abbrev_table_up): New typedef.
11925 (init_cu_die_reader): Add abbrev_table parameter.
11926 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11927 Add result_dwo_abbrev_table.
11928 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11929 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11931 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11933 (skip_children): Update.
11934 (abbrev_table::alloc_abbrev): Rename from
11935 abbrev_table_alloc_abbrev.
11936 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11937 (abbrev_table::lookup_abbrev): Rename from
11938 abbrev_table_lookup_abbrev.
11939 (abbrev_table_read_table): Return abbrev_table_up.
11940 (abbrev_table_free, abbrev_table_free_cleanup)
11941 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11942 (load_partial_dies): Update.
11944 2018-01-17 Tom Tromey <tom@tromey.com>
11946 * dwarf2read.c (dwarf2_compute_name): Update comment.
11947 (read_func_scope, read_variable): Update.
11948 (new_symbol): Remove.
11949 (new_symbol_full): Rename to new_symbol.
11951 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11954 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11955 a warning instead of throwing an error, set section size to 0 and return
11957 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11959 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11961 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11963 (linux_ptrace_attach_fail_reason_string): Likewise.
11964 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11966 (linux_ptrace_attach_fail_reason_string): Likewise.
11967 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11969 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11971 * linux-nat.c (linux_nat_attach): Remove xstrdup.
11973 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
11976 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
11977 checking for fs_base/gs_base fields in struct user_regs_struct.
11978 * configure: Regenerate.
11980 2018-01-17 Yao Qi <yao.qi@linaro.org>
11982 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
11984 (aarch64_linux_init_abi): Install it to gdbarch hook
11985 gcc_target_options.
11987 2018-01-15 Pedro Alves <palves@redhat.com>
11989 * common/signals-state-save-restore.c
11990 (save_original_signals_state): Fix typos.
11992 2017-01-12 Tom Tromey <tom@tromey.com>
11993 Sergio Durigan Junior <sergiodj@redhat.com>
11995 * Makefile.in (install-only): Install gdb-add-index.
11997 2018-01-12 John Baldwin <jhb@FreeBSD.org>
11999 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12001 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12003 * infrun.c (keep_going_pass_signal): Clear step-over info when
12004 insert_breakpoints fails.
12006 2018-01-11 Pedro Alves <palves@redhat.com>
12009 * infrun.c (resume): Rename to ...
12010 (resume_1): ... this.
12011 (resume): Reimplement as wrapper around resume_1.
12013 2018-01-11 Pedro Alves <palves@redhat.com>
12016 * remote.c (remote_parse_stop_reply): Default to the last-set
12017 general thread instead of to 'magic_null_ptid'.
12019 2018-01-10 Pedro Alves <palves@redhat.com>
12021 * language.h (language_get_symbol_name_matcher): Rename ...
12022 (get_symbol_name_matcher): ... this.
12023 * language.c (language_get_symbol_name_matcher): Ditto.
12024 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12027 2018-01-10 Pedro Alves <palves@redhat.com>
12031 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12032 Adjust to use language_get_symbol_name_matcher instead of
12033 language_defn::la_get_symbol_name_matcher.
12034 * language.c (language_get_symbol_name_matcher): If in Ada mode
12035 and the lookup name is a verbatim match, return Ada's matcher.
12036 * language.h (language_get_symbol_name_matcher): Adjust comment.
12037 (ada_lookup_name_info::verbatim_p):: New method.
12039 2018-01-10 Pedro Alves <palves@redhat.com>
12042 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12043 minsym's language is language_auto or language_cplus, pass down
12044 language_ada instead.
12045 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12047 2018-01-10 Pedro Alves <palves@redhat.com>
12050 * minsyms.c (linkage_name_str): New function.
12051 (iterate_over_minimal_symbols): Use it.
12053 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12055 * NEWS: Document that 'info proc' now works on FreeBSD.
12057 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12059 * configure.ac: Check for kinfo_getfile in libutil.
12060 * configure: Regenerate.
12061 * config.in: Regenerate.
12062 * fbsd-nat.c: Include "fbsd-tdep.h".
12063 (fbsd_fetch_cmdline): New.
12064 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12065 rather than calling error.
12066 (fbsd_info_proc): New.
12067 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12068 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12069 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12071 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12073 * fbsd-nat.c (struct free_deleter): Remove.
12074 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12076 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12078 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12079 NULL for an empty pathname.
12081 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12083 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12084 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12085 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12086 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12087 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12088 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12089 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12090 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12091 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12092 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12093 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12094 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12095 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12096 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12097 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12099 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12101 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12102 (gnu_xfer_auxv): New function.
12103 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12104 TARGET_OBJECT_AUXV.
12106 2018-01-08 Yao Qi <yao.qi@linaro.org>
12107 Simon Marchi <simon.marchi@ericsson.com>
12109 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12111 (COMMON_OBS): Remove selftest.o.
12112 * configure.ac: Append selftest-arch.c and common/selftest.c to
12113 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12114 * configure: Re-generated.
12115 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12117 (maintenance_info_selftests): Likewise.
12119 2018-01-08 Xavier Roirand <roirand@adacore.com>
12121 * ada-valprint.c (val_print_packed_array_elements): Use
12122 proper number of elements when printing an array indexed
12123 by an enumeration type.
12125 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12127 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12128 (dw2_get_file_names_reader): Adjust.
12129 (lookup_dwo_signatured_type): Adjust.
12130 (lookup_dwp_signatured_type): Adjust.
12131 (lookup_signatured_type): Adjust.
12132 (create_type_unit_group): Adjust.
12133 (get_type_unit_group): Adjust.
12134 (process_psymtab_comp_unit_reader): Adjust.
12135 (build_type_psymtabs_reader): Adjust.
12136 (scan_partial_symbols): Adjust.
12137 (add_partial_symbol): Adjust.
12138 (add_partial_subprogram): Adjust.
12139 (peek_die_abbrev): Adjust.
12140 (fixup_go_packaging): Adjust.
12141 (process_imported_unit_die): Adjust.
12142 (dwarf2_compute_name): Adjust.
12143 (dwarf2_physname): Adjust.
12144 (read_import_statement): Adjust.
12145 (handle_DW_AT_stmt_list): Adjust.
12146 (read_file_scope): Adjust.
12147 (read_func_scope): Adjust.
12148 (read_lexical_block_scope): Adjust.
12149 (read_call_site_scope): Adjust.
12150 (read_variable): Adjust.
12151 (dwarf2_rnglists_process): Adjust.
12152 (dwarf2_ranges_process): Adjust.
12153 (dwarf2_ranges_read): Adjust.
12154 (dwarf2_get_pc_bounds): Adjust.
12155 (dwarf2_record_block_ranges): Adjust.
12156 (dwarf2_add_field): Adjust.
12157 (dwarf2_add_member_fn): Adjust.
12158 (read_structure_type): Adjust.
12159 (process_structure_scope): Adjust.
12160 (read_enumeration_type): Adjust.
12161 (read_array_type): Adjust.
12162 (mark_common_block_symbol_computed): Adjust.
12163 (read_common_block): Adjust.
12164 (read_namespace_type): Adjust.
12165 (read_namespace): Adjust.
12166 (read_module_type): Adjust.
12167 (read_tag_pointer_type): Adjust.
12168 (read_tag_ptr_to_member_type): Adjust.
12169 (read_tag_string_type): Adjust.
12170 (read_subroutine_type): Adjust.
12171 (read_typedef): Adjust.
12172 (read_base_type): Adjust.
12173 (attr_to_dynamic_prop): Adjust.
12174 (read_subrange_type): Adjust.
12175 (read_unspecified_type): Adjust.
12176 (dwarf2_read_abbrevs): Adjust.
12177 (load_partial_dies): Adjust.
12178 (read_partial_die): Adjust.
12179 (find_partial_die): Adjust.
12180 (guess_partial_die_structure_name): Adjust.
12181 (fixup_partial_die): Adjust.
12182 (read_attribute_value): Adjust.
12183 (read_addr_index): Adjust.
12184 (read_addr_index_from_leb128): Adjust.
12185 (read_str_index): Adjust.
12186 (dwarf2_string_attr): Adjust.
12187 (get_debug_line_section): Adjust.
12188 (dwarf_decode_line_header): Adjust.
12189 (lnp_state_machine::check_line_address): Adjust.
12190 (dwarf_decode_lines_1): Adjust.
12191 (dwarf_decode_lines): Adjust.
12192 (dwarf2_start_symtab): Adjust.
12193 (var_decode_location): Adjust.
12194 (new_symbol_full): Adjust.
12195 (dwarf2_const_value_data): Adjust.
12196 (dwarf2_const_value_attr): Adjust.
12197 (dwarf2_const_value): Adjust.
12198 (die_type): Adjust.
12199 (die_containing_type): Adjust.
12200 (build_error_marker_type): Adjust.
12201 (lookup_die_type): Adjust.
12202 (guess_full_die_structure_name): Adjust.
12203 (anonymous_struct_prefix): Adjust.
12204 (determine_prefix): Adjust.
12205 (dwarf2_name): Adjust.
12206 (follow_die_ref_or_sig): Adjust.
12207 (follow_die_offset): Adjust.
12208 (follow_die_ref): Adjust.
12209 (follow_die_sig_1): Adjust.
12210 (follow_die_sig): Adjust.
12211 (get_signatured_type): Adjust.
12212 (get_DW_AT_signature_type): Adjust.
12213 (decode_locdesc): Adjust.
12214 (dwarf_decode_macros): Adjust.
12215 (cu_debug_loc_section): Adjust.
12216 (fill_in_loclist_baton): Adjust.
12217 (dwarf2_symbol_mark_computed): Adjust.
12218 (init_one_comp_unit): Don't assign
12219 dwarf2_cu::dwarf2_per_objfile.
12220 (set_die_type): Adjust.
12222 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12224 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12225 <dwarf2_per_objfile>: New field.
12226 (dwarf2_per_objfile): Remove global.
12227 (get_dwarf2_per_objfile): New function.
12228 (set_dwarf2_per_objfile): New function.
12229 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12230 dwarf2_per_objfile.
12231 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12232 (read_abbrev_offset): Likewise.
12233 (read_indirect_string): Likewise.
12234 (read_indirect_line_string): Likewise.
12235 (read_indirect_string_at_offset): Likewise.
12236 (read_indirect_string_from_dwz): Likewise.
12237 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12238 dwarf2_per_objfile.
12239 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12240 (create_all_comp_units): Change objfile parameter to
12241 dwarf2_per_objfile.
12242 (create_all_type_units): Likewise.
12243 (process_queue): Add dwarf2_per_objfile parameter.
12244 (read_and_check_comp_unit_head): Likewise.
12245 (lookup_dwo_unit_in_dwp): Likewise.
12246 (get_dwp_file): Likewise.
12247 (process_cu_includes): Likewise.
12248 (struct free_dwo_file_cleanup_data): New struct.
12249 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12250 set_dwarf2_per_objfile.
12251 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12252 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12253 context, adjust calls.
12254 (dw2_instantiate_symtab): Likewise.
12255 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12256 (dw2_get_cu): Likewise.
12257 (create_cu_from_index_list): Change objfile parameter to
12258 dwarf2_per_objfile.
12259 (create_cus_from_index_list): Get dwarf2_per_objfile from
12260 context, adjust calls.
12261 (create_cus_from_index): Likewise.
12262 (create_signatured_type_table_from_index): Change objfile
12263 parameter to dwarf2_per_objfile.
12264 (create_signatured_type_table_from_debug_names): Change objfile
12265 parameter to dwarf2_per_objfile.
12266 (create_addrmap_from_index): Likewise.
12267 (create_addrmap_from_aranges): Likewise.
12268 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12269 (dw2_setup): Remove.
12270 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12272 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12273 get_dwarf2_per_objfile.
12274 (dw2_forget_cached_source_info): Likewise.
12275 (dw2_map_symtabs_matching_filename): Likewise.
12276 (struct dw2_symtab_iterator) <index>: Remove.
12277 <dwarf2_per_objfile>: New field.
12278 (dw2_symtab_iter_init): Replace index parameter with
12279 dwarf2_per_objfile.
12280 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12281 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12282 (dw2_print_stats): Likewise.
12283 (dw2_dump): Likewise.
12284 (dw2_expand_symtabs_for_function): Likewise.
12285 (dw2_expand_all_symtabs): Likewise.
12286 (dw2_expand_symtabs_with_fullname): Likewise.
12287 (dw2_expand_marked_cus): Replace index and objfile parameters
12288 with dwarf2_per_objfile.
12289 (dw_expand_symtabs_matching_file_matcher): Add
12290 dwarf2_per_objfile parameter and adjust calls.
12291 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12293 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12294 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12296 (create_cus_from_debug_names_list): Replace objfile parameter
12297 with dwarf2_per_objfile and adjust calls.
12298 (create_cus_from_debug_names): Likewise.
12299 (dwarf2_read_debug_names): Likewise.
12300 (mapped_debug_names::namei_to_name): Adjust call.
12301 (dw2_debug_names_iterator::next): Likewise.
12302 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12303 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12304 (dw2_debug_names_dump): Likewise.
12305 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12306 (dw2_debug_names_expand_symtabs_matching): Likewise.
12307 (dwarf2_initialize_objfile): Likewise.
12308 (dwarf2_build_psymtabs): Likewise.
12309 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12311 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12312 (read_and_check_comp_unit_head): Likewise.
12313 (read_abbrev_offset): Likewise.
12314 (create_debug_type_hash_table): Likewise.
12315 (create_debug_types_hash_table): Likewise.
12316 (create_all_type_units): Replace objfile parameter with
12317 dwarf2_per_objfile.
12318 (add_type_unit): Add dwarf2_per_objfile parameter.
12319 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12320 with dwarf2_per_objfile.
12321 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12322 (lookup_dwp_signatured_type): Likewise.
12323 (lookup_signatured_type): Likewise.
12324 (read_cutu_die_from_dwo): Likewise.
12325 (init_tu_and_read_dwo_dies): Likewise.
12326 (init_cutu_and_read_dies): Likewise.
12327 (init_cutu_and_read_dies_no_follow): Likewise.
12328 (allocate_type_unit_groups_table): Add objfile parameter.
12329 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12330 (get_type_unit_group): Likewise.
12331 (process_psymtab_comp_unit): Update call.
12332 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12333 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12334 (print_tu_stats): Likewise.
12335 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12336 in void* parameter.
12337 (build_type_psymtabs): Change objfile parameter to
12338 dwarf2_per_objfile.
12339 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12340 passed in void* parameter.
12341 (process_skeletonless_type_units): Change objfile parameter to
12342 dwarf2_per_objfile.
12343 (set_partial_user): Likewise.
12344 (dwarf2_build_psymtabs_hard): Likewise.
12345 (read_comp_units_from_section): Likewise.
12346 (create_all_comp_units): Likewise.
12347 (scan_partial_symbols): Update calls.
12348 (add_partial_symbol): Likewise.
12349 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12350 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12351 (process_queue): Add dwarf2_per_objfile parameter.
12352 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12353 (compute_compunit_symtab_includes): Likewise.
12354 (process_cu_includes): Add dwarf2_per_objfile parameter.
12355 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12356 (process_full_type_unit): Likewise.
12357 (process_imported_unit_die): Update call.
12358 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12359 (read_file_scope): Likewise.
12360 (allocate_dwo_file_hash_table): Add objfile parameter.
12361 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12362 (create_cus_hash_table): Likewise.
12363 (create_dwp_hash_table): Likewise.
12364 (create_dwo_unit_in_dwp_v1): Likewise.
12365 (create_dwp_v2_section): Likewise.
12366 (create_dwo_unit_in_dwp_v2): Likewise.
12367 (lookup_dwo_unit_in_dwp): Likewise.
12368 (try_open_dwop_file): Likewise.
12369 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12370 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12371 cleanup to include a reference to dwarf2_per_objfile.
12372 (open_dwp_file): Add dwarf2_per_objfile parameter.
12373 (open_and_init_dwp_file): Likewise.
12374 (get_dwp_file): Likewise.
12375 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12376 (queue_and_load_all_dwo_tus): Update call.
12377 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12379 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12380 (dwarf2_ranges_process): Likewise.
12381 (dwarf2_get_pc_bounds): Likewise.
12382 (mark_common_block_symbol_computed): Likewise.
12383 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12384 (dwarf2_read_abbrevs): Update call.
12385 (read_partial_die): Use dwarf2_per_objfile from cu.
12386 (find_partial_die): Likewise.
12387 (fixup_partial_die): Likewise.
12388 (read_attribute_value): Likewise.
12389 (read_indirect_string_at_offset_from): Add objfile parameter.
12390 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12392 (read_indirect_string_from_dwz): Add objfile parameter.
12393 (read_indirect_string): Add objfile parameter.
12394 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12395 (read_addr_index): Use dwarf2_per_objfile from cu.
12396 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12398 (read_str_index): Use dwarf2_per_objfile from cu.
12399 (get_debug_line_section): Likewise.
12400 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12401 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12402 (new_symbol_full): Use dwarf2_per_objfile from cu.
12403 (build_error_marker_type): Likewise.
12404 (lookup_die_type): Likewise.
12405 (determine_prefix): Likewise.
12406 (follow_die_offset): Likewise.
12407 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12408 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12409 (dwarf2_fetch_die_type_sect_off): Likewise.
12410 (dwarf2_get_die_type): Likewise.
12411 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12412 (get_signatured_type): Likewise.
12413 (get_DW_AT_signature_type): Likewise.
12414 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12415 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12416 (cu_debug_loc_section): Likewise.
12417 (fill_in_loclist_baton): Likewise.
12418 (dwarf2_symbol_mark_computed): Likewise.
12419 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12420 dwarf2_per_objfile.
12421 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12423 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12424 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12425 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12426 (set_die_type): Use dwarf2_free_objfile from cu.
12427 (get_die_type_at_offset): Likewise.
12428 (dwarf2_per_objfile_free): Don't assign global variable.
12429 (debug_names) <constructor>: Add dwarf2_per_objfile
12430 parameter, update m_debugstrlookup construction.
12431 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12433 <m_dwarf2_per_objfile>: New field.
12434 <lookup>: Use m_dwarf2_per_objfile.
12435 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12436 (psyms_seen_size): Likewise.
12437 (write_gdbindex): Replace objfile parameter with
12438 dwarf2_per_objfile.
12439 (write_debug_names): Likewise.
12440 (write_psymtabs_to_index): Likewise.
12441 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12444 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12446 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12447 <dwarf2_per_objfile>: New field.
12448 (struct dwarf2_per_cu_data) <objfile>: Remove.
12449 <dwarf2_per_objfile>: New field.
12450 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12452 (create_signatured_type_table_from_index): Likewise.
12453 (create_debug_type_hash_table): Likewise.
12454 (fill_in_sig_entry_from_dwo_entry): Likewise.
12455 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12456 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12458 (create_partial_symtab): Access objfile through
12459 dwarf2_per_objfile.
12460 (process_psymtab_comp_unit_reader): Likewise.
12461 (read_comp_units_from_section): Likewise.
12462 (scan_partial_symbols): Likewise.
12463 (add_partial_symbol): Likewise.
12464 (add_partial_subprogram): Likewise.
12465 (peek_die_abbrev): Likewise.
12466 (fixup_go_packaging): Likewise.
12467 (process_full_comp_unit): Likewise.
12468 (process_full_type_unit): Likewise.
12469 (process_imported_unit_die): Likewise.
12470 (dwarf2_compute_name): Likewise.
12471 (dwarf2_physname): Likewise.
12472 (read_import_statement): Likewise.
12473 (create_cus_hash_table): Assign dwarf2_physname instead of
12475 (read_func_scope): Access objfile through dwarf2_per_objfile.
12476 (read_lexical_block_scope): Likewise.
12477 (read_call_site_scope): Likewise.
12478 (read_variable): Likewise.
12479 (dwarf2_rnglists_process): Likewise.
12480 (dwarf2_ranges_process): Likewise.
12481 (dwarf2_ranges_read): Likewise.
12482 (dwarf2_record_block_ranges): Likewise.
12483 (dwarf2_add_field): Likewise.
12484 (dwarf2_add_member_fn): Likewise.
12485 (read_structure_type): Likewise.
12486 (process_structure_scope): Likewise.
12487 (read_enumeration_type): Likewise.
12488 (read_array_type): Likewise.
12489 (read_common_block): Likewise.
12490 (read_namespace_type): Likewise.
12491 (read_namespace): Likewise.
12492 (read_module_type): Likewise.
12493 (read_tag_pointer_type): Likewise.
12494 (read_tag_ptr_to_member_type): Likewise.
12495 (read_tag_string_type): Likewise.
12496 (read_subroutine_type): Likewise.
12497 (read_typedef): Likewise.
12498 (read_base_type): Likewise.
12499 (attr_to_dynamic_prop): Likewise.
12500 (read_subrange_type): Likewise.
12501 (read_unspecified_type): Likewise.
12502 (load_partial_dies): Likewise.
12503 (read_partial_die): Likewise.
12504 (find_partial_die): Likewise.
12505 (guess_partial_die_structure_name): Likewise.
12506 (fixup_partial_die): Likewise.
12507 (read_attribute_value): Likewise.
12508 (read_addr_index_from_leb128): Likewise.
12509 (dwarf2_read_addr_index): Likewise.
12510 (dwarf2_string_attr): Likewise.
12511 (lnp_state_machine::check_line_address): Likewise.
12512 (dwarf_decode_lines_1): Likewise.
12513 (dwarf_decode_lines): Likewise.
12514 (dwarf2_start_symtab): Likewise.
12515 (var_decode_location): Likewise.
12516 (new_symbol_full): Likewise.
12517 (dwarf2_const_value_data): Likewise.
12518 (dwarf2_const_value_attr): Likewise.
12519 (dwarf2_const_value): Likewise.
12520 (die_type): Likewise.
12521 (die_containing_type): Likewise.
12522 (lookup_die_type): Likewise.
12523 (guess_full_die_structure_name): Likewise.
12524 (anonymous_struct_prefix): Likewise.
12525 (dwarf2_name): Likewise.
12526 (follow_die_ref_or_sig): Likewise.
12527 (follow_die_offset): Likewise.
12528 (follow_die_ref): Likewise.
12529 (dwarf2_fetch_die_loc_sect_off): Likewise.
12530 (dwarf2_fetch_constant_bytes): Likewise.
12531 (dwarf2_fetch_die_type_sect_off): Likewise.
12532 (dwarf2_get_die_type): Likewise.
12533 (follow_die_sig): Likewise.
12534 (decode_locdesc): Likewise.
12535 (dwarf2_per_cu_objfile): Likewise.
12536 (dwarf2_per_cu_text_offset): Likewise.
12537 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12539 (set_die_type): Access objfile through
12540 dwarf2_per_objfile.
12542 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12544 * valprint.c (converted_character_d): Remove typedef.
12545 (DEF_VEC_O (converted_character_d)): Remove.
12546 (count_next_character): Use std::vector.
12547 (print_converted_chars_to_obstack): Likewise.
12548 (generic_printstr): Likewise.
12550 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12552 * xml-support.h (struct gdb_xml_value): Add constructor.
12553 <value>: Change type to unique_xmalloc_ptr.
12554 (gdb_xml_value_s): Remove typedef.
12555 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12556 (gdb_xml_element_start_handler): Change parameter type to
12558 (xml_find_attribute): Likewise.
12559 * xml-support.c (xml_find_attribute): Change parameter type to
12560 std::vector and adjust.
12561 (gdb_xml_values_cleanup): Remove.
12562 (gdb_xml_parser::start_element): Adjust to std::vector.
12563 (xinclude_start_include): Change paraeter type to std::vector
12565 * btrace.c (check_xml_btrace_version): Likewise.
12566 (parse_xml_btrace_block): Likewise.
12567 (parse_xml_btrace_pt_config_cpu): Likewise.
12568 (parse_xml_btrace_pt): Likewise.
12569 (parse_xml_btrace_conf_bts): Likewise.
12570 (parse_xml_btrace_conf_pt): Likewise.
12571 * memory-map.c (memory_map_start_memory): Likewise.
12572 (memory_map_start_property): Likewise.
12573 * osdata.c (osdata_start_osdata): Likewise.
12574 (osdata_start_item): Likewise.
12575 (osdata_start_column): Likewise.
12576 * remote.c (start_thread): Likewise.
12577 * solib-aix.c (library_list_start_library): Likewise.
12578 (library_list_start_list): Likewise.
12579 * solib-svr4.c (library_list_start_library): Likewise.
12580 (svr4_library_list_start_list): Likewise.
12581 * solib-target.c (library_list_start_segment): Likewise.
12582 (library_list_start_section): Likewise.
12583 (library_list_start_library): Likewise.
12584 (library_list_start_list): Likewise.
12585 * tracepoint.c (traceframe_info_start_memory): Likewise.
12586 (traceframe_info_start_tvar): Likewise.
12587 * xml-syscall.c (syscall_start_syscall): Likewise.
12588 * xml-tdesc.c (tdesc_start_target): Likewise.
12589 (tdesc_start_feature): Likewise.
12590 (tdesc_start_reg): Likewise.
12591 (tdesc_start_union): Likewise.
12592 (tdesc_start_struct): Likewise.
12593 (tdesc_start_flags): Likewise.
12594 (tdesc_start_enum): Likewise.
12595 (tdesc_start_field): Likewise.
12596 (tdesc_start_enum_value): Likewise.
12597 (tdesc_start_vector): Likewise.
12599 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12601 * extension.h (struct xmethod_worker) <clone>: Remove.
12602 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12604 (python_xmethod_worker::clone): Remove.
12605 * valops.c (find_overload_match): Use std::move instead of
12608 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12610 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12611 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12612 <free_xmethod_worker_data>: Remove.
12613 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12614 <get_xmethod_arg_types>: Remove.
12615 <get_xmethod_result_type>: Remove.
12616 <invoke_xmethod>: Remove.
12617 * extension.c (new_xmethod_worker): Remove.
12618 (clone_xmethod_worker): Remove.
12619 (get_matching_xmethod_workers): Return void, pass std::vector by
12621 (get_xmethod_arg_types): Rename to...
12622 (xmethod_worker::get_arg_types): ... this, and adjust.
12623 (get_xmethod_result_type): Rename to...
12624 (xmethod_worker::get_result_type): ... this, and adjust.
12625 (invoke_xmethod): Remove.
12626 (free_xmethod_worker): Remove.
12627 (free_xmethod_worker_vec): Remove.
12628 * extension.h (enum ext_lang_rc): Move here from
12630 (struct xmethod_worker): Add constructor and destructor.
12633 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12634 virtual pure methods.
12635 <get_arg_types, get_result_type>: New methods.
12636 (xmethod_worker_ptr): Remove typedef.
12637 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12638 (xmethod_worker_vec): Remove typedef.
12639 (xmethod_worker_up): New typedef.
12640 (invoke_xmethod): Remove.
12641 (clone_xmethod_worker): Remove.
12642 (free_xmethod_worker): Remove.
12643 (free_xmethod_worker_vec): Remove.
12644 (get_xmethod_arg_types): Remove.
12645 (get_xmethod_result_type): Remove.
12646 * valops.c (find_method_list): Use std::vector, don't use
12647 intermediate vector.
12648 (value_find_oload_method_list): Use std::vector.
12649 (find_overload_match): Use std::vector.
12650 (find_oload_champ): Use std::vector.
12651 * value.c (value_free): Use operator delete.
12652 (value_of_xmethod): Rename to...
12653 (value_from_xmethod): ... this. Don't assign
12654 xmethod_worker::value, take rvalue-reference.
12655 (result_type_of_xmethod): Adjust.
12656 (call_xmethod): Adjust.
12657 * value.h: Include extension.h.
12658 (struct xmethod_worker): Don't forward-declare.
12659 (value_of_xmethod): Rename to...
12660 (value_from_xmethod): ... this, take rvalue-reference.
12661 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12662 (struct python_xmethod_worker): ... this, add constructor and
12664 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12665 (gdbpy_free_xmethod_worker_data): Rename to...
12666 (python_xmethod_worker::~python_xmethod_worker): ... this and
12668 (gdbpy_clone_xmethod_worker_data): Rename to...
12669 (python_xmethod_worker::clone): ... this and adjust.
12670 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12672 (gdbpy_get_xmethod_arg_types): Rename to...
12673 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12674 (gdbpy_get_xmethod_result_type): Rename to...
12675 (python_xmethod_worker::do_get_result_type): ... this and
12677 (gdbpy_invoke_xmethod): Rename to...
12678 (python_xmethod_worker::invoke): ... this and adjust.
12679 (new_python_xmethod_worker): Rename to...
12680 (python_xmethod_worker::python_xmethod_worker): ... this and
12682 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12684 (gdbpy_free_xmethod_worker_data): Remove.
12685 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12686 (gdbpy_get_xmethod_arg_types): Remove.
12687 (gdbpy_get_xmethod_result_type): Remove.
12688 (gdbpy_invoke_xmethod): Remove.
12689 * python/python.c (python_extension_ops): Remove obsolete
12692 2018-01-05 Pedro Alves <palves@redhat.com>
12695 * common/signals-state-save-restore.c
12696 (save_original_signals_state): New parameter 'quiet'. Warn if we
12697 find a custom handler preinstalled, instead of internal erroring.
12698 But only warn if !quiet.
12699 * common/signals-state-save-restore.h
12700 (save_original_signals_state): New parameter 'quiet'.
12701 * main.c (captured_main_1): Move save_original_signals_state call
12702 after option handling, and pass QUIET.
12704 2018-01-05 Pedro Alves <palves@redhat.com>
12706 * spu-tdep.c (spu_catch_start): Pass
12707 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12709 2018-01-05 Pedro Alves <palves@redhat.com>
12712 * ada-lang.c (literal_symbol_name_matcher): New function.
12713 (ada_get_symbol_name_matcher): Use it for
12714 symbol_name_match_type::SEARCH_NAME.
12715 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12716 it down instead of assuming symbol_name_match_type::FULL.
12717 * block.h (block_lookup_symbol): New parameter 'match_type'.
12718 * c-valprint.c (print_unpacked_pointer): Use
12719 lookup_symbol_search_name instead of lookup_symbol.
12720 * compile/compile-object-load.c (get_out_value_type): Pass down
12721 symbol_name_match_type::SEARCH_NAME.
12722 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12723 symbol_name_match_type::FULL.
12724 * cp-support.c (cp_get_symbol_name_matcher): Handle
12725 symbol_name_match_type::SEARCH_NAME.
12726 * infrun.c (insert_exception_resume_breakpoint): Use
12727 lookup_symbol_search_name.
12728 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12729 * psymtab.c (maintenance_check_psymtabs): Use
12730 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12731 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12732 SYMBOL_SEARCH_NAME.
12733 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12734 if symbol_name_match_type::SEARCH_NAME.
12735 (lookup_symbol_in_language): Pass down
12736 symbol_name_match_type::FULL.
12737 (lookup_symbol_search_name): New.
12738 (lookup_language_this): Pass down
12739 symbol_name_match_type::SEARCH_NAME.
12740 (lookup_symbol_aux, lookup_local_symbol): New parameter
12741 'match_type'. Pass it down.
12742 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12743 (lookup_symbol_search_name): New declaration.
12744 (lookup_symbol_in_block): New 'match_type' parameter.
12746 2018-01-05 Pedro Alves <palves@redhat.com>
12749 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12751 (ada_lookup_symbol): Reimplement in terms of
12752 ada_lookup_symbol_list, bits factored out from
12753 ada_lookup_encoded_symbol.
12755 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12757 * ada-exp.y (write_object_renaming): When subscripting an array
12758 using a symbol as the index, pass the block in call to
12759 ada_lookup_encoded_symbol when looking that symbol up.
12761 2018-01-05 Jerome Guitton <guitton@adacore.com>
12763 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12766 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12768 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12769 the case where VALUE_LVAL (val0) is not lval_memory.
12771 2018-01-05 Xavier Roirand <roirand@adacore.com>
12773 * ada-valprint.c (print_optional_low_bound): Handle
12774 character-indexed array printing like boolean-indexed array
12777 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12779 * NEWS: Create a new section for the next release branch.
12780 Rename the section of the current branch, now that it has
12783 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12785 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12786 * version.in: Bump version to 8.1.50.DATE-git.
12788 2018-01-03 Xavier Roirand <roirand@adacore.com>
12790 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12792 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12794 (default_exception_support_info) <catch_handlers_sym>: Add field.
12795 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12796 (ada_exception_name_addr_1): Add "catch handlers" handling.
12797 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12798 Update all callers.
12799 (create_excep_cond_exprs) <ex>: Add parameter.
12800 (re_set_exception): Update create_excep_cond_exprs call.
12801 (print_it_exception, print_one_exception, print_mention_exception)
12802 (print_recreate_exception): Add "catch handler" handling.
12803 (allocate_location_catch_handlers, re_set_catch_handlers)
12804 (check_status_catch_handlers, print_it_catch_handlers)
12805 (print_one_catch_handlers, print_mention_catch_handlers)
12806 (print_recreate_catch_handlers): New function.
12807 (catch_handlers_breakpoint_ops): New variable.
12808 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12809 Add parameter. Add "catch handler" handling.
12810 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12811 Add "catch handler" handling.
12812 (ada_exception_catchpoint_cond_string): Add "catch handler"
12814 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12816 (catch_ada_handlers_command): New function.
12817 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12818 operations structure.
12819 (_initialize_ada_language): Add "catch handlers" command entry.
12820 * NEWS: Document "catch handlers" feature.
12822 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12824 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12825 account when creating the array type of the slice.
12826 (ada_value_slice): Likewise.
12828 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12830 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12832 (create_array_type_with_stride): Add byte_stride_prop parameter.
12833 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12834 New parameter. Update all callers in this file.
12835 (array_type_has_dynamic_stride): New function.
12836 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12837 of arrays with dynamic byte strides.
12838 * dwarf2read.c (read_array_type): Add support for dynamic
12839 DW_AT_byte_stride attributes.
12841 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12843 * dwarf2read.c (read_unspecified_type): Treat
12844 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12846 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12848 Update copyright year range in all GDB files.
12850 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12852 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12853 and gdb/testsuite/gdb.base/step-line.c.
12855 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12857 * copyright.py (main): Dump the contents of
12858 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12859 even if BY_HAND is empty.
12861 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12863 * top.c (print_gdb_version): Update Copyright year in version
12866 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12868 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12870 For older changes see ChangeLog-2017.
12876 version-control: never