Automatic date update in version.in
[binutils-gdb.git] / gdb / ChangeLog-2018
bloba307904b239aa79d6192a62841c5d339b472c1e7
1 2018-12-31  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3         * top.c (command_line_input): Use unique_xmalloc_ptr to
4         manage memory allocated by readline.
6 2018-12-30  Tom Tromey  <tom@tromey.com>
8         * event-top.h (command_line_handler): Update.
9         * top.c (class gdb_readline_wrapper_cleanup) <m_handler_orig>:
10         Update.
11         (gdb_readline_wrapper_line): Update.
12         * top.h (struct ui) <input_handler>: Take a unique_xmalloc_ptr.
13         (handle_line_of_input): Update.
14         * event-top.c: Update.
15         (gdb_readline_no_editing_callback): Update.
16         (command_line_handler): Take a unique_xmalloc_ptr.
17         (handle_line_of_input): Take a const char *.
18         (command_line_append_input_line): Take a const char *.
20 2018-12-28  Tom Tromey  <tom@tromey.com>
22         * source-cache.c (get_language_name): Conditionally compile.
24 2018-12-28  Tom Tromey  <tom@tromey.com>
26         * jit.c (free_objfile_data): Only delete breakpoint if non-null.
28 2018-12-28  Tom Tromey  <tom@tromey.com>
30         * NEWS: Mention terminal styling.
32 2018-12-28  Tom Tromey  <tom@tromey.com>
34         * utils.h (can_emit_style_escape): Declare.
35         * utils.c (can_emit_style_escape): No longer static.
36         * cli/cli-style.c (set_style_enabled): New function.
37         (_initialize_cli_style): Use it.
38         * tui/tui-winsource.c (tui_show_source_line): Use tui_puts.
39         (tui_alloc_source_buffer): Change how source lines are allocated.
40         * tui/tui-source.c (copy_source_line): New function.
41         (tui_set_source_content): Use source cache.
42         * tui/tui-io.h (tui_puts): Update.
43         * tui/tui-io.c (tui_puts_internal): Add window parameter.
44         (tui_puts): Likewise.
45         (tui_redisplay_readline): Update.
46         * tui/tui-data.c (free_content_elements): Change how source window
47         contents are freed.
48         * source.c (forget_cached_source_info): Clear the source cache.
49         (print_source_lines_base): Use the source cache.
50         * source-cache.h: New file.
51         * source-cache.c: New file.
52         * configure.ac: Check for GNU Source Highlight library.
53         * configure: Update.
54         * config.in: Update.
55         * Makefile.in (SRCHIGH_LIBS, SRCHIGH_CFLAGS): New variables.
56         (INTERNAL_CFLAGS_BASE): Add SRCHIGH_CFLAGS.
57         (CLIBS): Add SRCHIGH_LIBS.
58         (COMMON_SFILES): Add source-cache.c.
59         (HFILES_NO_SRCDIR): Add source-cache.h.
61 2018-12-28  Tom Tromey  <tom@tromey.com>
63         * tui/tui-winsource.c (tui_show_source_line): Use wclrtoeol.
65 2018-12-28  Tom Tromey  <tom@tromey.com>
67         PR tui/14126:
68         * tui/tui.c (tui_enable): Call start_color and
69         use_default_colors.
70         * tui/tui-io.c (struct color_pair): New.
71         (color_pair_map, last_color_pair, last_style): New globals.
72         (tui_setup_io): Clean up color map when shutting down.
73         (curses_colors): New constant.
74         (get_color_pair, apply_ansi_escape): New functions.
75         (tui_write): Rewrite.
76         (tui_puts_internal): New function, from tui_puts.  Add "height"
77         parameter.
78         (tui_puts): Use tui_puts_internal.
79         (tui_redisplay_readline): Use tui_puts_internal.
80         (_initialize_tui_io): New function.
81         (color_map): New globals.
82         (get_color): New function.
83         * configure.ac: Check for use_default_colors.
84         * config.in, configure: Rebuild.
86 2018-12-28  Tom Tromey  <tom@tromey.com>
88         * ui-out.h (enum class ui_out_style_kind) <ADDRESS>: New
89         constant.
90         * ui-out.c (ui_out::field_core_addr): Add styling.
91         * stack.c (print_frame): Add styling.
92         * printcmd.c (print_address): Add styling.
93         (print_address_demangle, info_address_command): Likewise.
94         * cli/cli-style.h (address_style): Declare.
95         * cli/cli-style.c (address_style): New global.
96         (_initialize_cli_style): Register new commands.
97         * cli-out.c (cli_ui_out::do_field_string): Update.
99 2018-12-28  Tom Tromey  <tom@tromey.com>
101         * symfile.c (symbol_file_add_with_addrs): Style file name.
103 2018-12-28  Tom Tromey  <tom@tromey.com>
105         * top.c (print_gdb_version): Style gdb version number.
107 2018-12-28  Tom Tromey  <tom@tromey.com>
109         * printcmd.c (print_address_symbolic): Style function name.
111 2018-12-28  Tom Tromey  <tom@tromey.com>
113         * breakpoint.c (say_where): Style file name.
115 2018-12-28  Tom Tromey  <tom@tromey.com>
117         * ui-out.h (enum class ui_out_style_kind) <VARIABLE>: New global.
118         * stack.c (print_frame_arg): Style name.
119         * printcmd.c (print_variable_and_value): Style variable name.
120         * cli/cli-style.h (variable_name_style): Declare.
121         * cli/cli-style.c (variable_name_style): New global.
122         (_initialize_cli_style): Update.
123         * cli-out.c (cli_ui_out::do_field_string): Update.
125 2018-12-28  Tom Tromey  <tom@tromey.com>
127         * utils.h (reset_terminal_style): Declare.
128         * utils.c (can_emit_style_escape): New function.
129         (set_output_style): Use it.
130         (reset_terminal_style): New function.
131         * printcmd.c (printf_command): Call reset_terminal_style.
132         * cli/cli-cmds.c (echo_command): Call reset_terminal_style.
134 2018-12-28  Tom Tromey  <tom@tromey.com>
136         * utils.h (set_output_style, fprintf_styled)
137         (fputs_styled): Declare.
138         * utils.c (applied_style, desired_style): New globals.
139         (emit_style_escape, set_output_style): New function.
140         (prompt_for_continue): Emit style escapes.
141         (fputs_maybe_filtered): Likewise.
142         (fputs_styled, fprintf_styled): New functions.
143         * ui-out.h (enum class ui_out_style_kind): New.
144         (class ui_out) <field_string, field_stream, do_field_string>: Add
145         style parameter.
146         * ui-out.c (ui_out::field_stream, ui_out::field_string): Add style
147         parameter.
148         * tui/tui-out.h (class tui_ui_out) <do_field_string>: Add style
149         parameter.
150         * tui/tui-out.c (tui_ui_out::do_field_string): Add style
151         parameter.
152         (tui_ui_out::do_field_string): Update.
153         * tracepoint.c (print_one_static_tracepoint_marker): Style
154         output.
155         * stack.c (print_frame_info, print_frame): Style output.
156         * source.c (print_source_lines_base): Style output.
157         * skip.c (info_skip_command): Style output.
158         * record-btrace.c (btrace_call_history_src_line): Style output.
159         (btrace_call_history): Likewise.
160         * python/py-framefilter.c (py_print_frame): Style output.
161         * mi/mi-out.h (class mi_ui_out) <do_field_string>: Add style
162         parameter.
163         * mi/mi-out.c (mi_ui_out::do_table_header)
164         (mi_ui_out::do_field_int): Update.
165         (mi_ui_out::do_field_string): Update.
166         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
167         Style output.
168         * cli/cli-style.h: New file.
169         * cli/cli-style.c: New file.
170         * cli-out.h (class cli_ui_out) <do_field_string>: Add style
171         parameter.
172         * cli-out.c (cli_ui_out::do_table_header)
173         (cli_ui_out::do_field_int, cli_ui_out::do_field_skip): Update.
174         (cli_ui_out::do_field_string): Add style parameter.  Style the
175         output.
176         * breakpoint.c (print_breakpoint_location): Style output.
177         (update_static_tracepoint): Likewise.
178         * Makefile.in (SUBDIR_CLI_SRCS): Add cli-style.c.
179         (HFILES_NO_SRCDIR): Add cli-style.h.
181 2018-12-28  Tom Tromey  <tom@tromey.com>
183         * unittests/style-selftests.c: New file.
184         * ui-style.c: New file.
185         * ui-style.h: New file.
186         * ui-file.h: Include ui-style.h.
187         * Makefile.in (COMMON_SFILES): Add ui-style.c.
188         (HFILES_NO_SRCDIR): Add ui-style.h.
189         (SUBDIR_UNITTESTS_SRCS): Add style-selftests.c.
191 2018-12-28  Tom Tromey  <tom@tromey.com>
193         * command.h (add_setshow_enum_cmd): Add "context" argument.
194         * cli/cli-decode.c (add_setshow_enum_cmd): Add "context"
195         argument.  Call set_cmd_context.
197 2018-12-28  Tom Tromey  <tom@tromey.com>
199         * utils.c (filter_initialized): New global.
200         (wrap_buffer): Now a std::string.
201         (wrap_pointer): Remove.
202         (flush_wrap_buffer): New function.
203         (filtered_printing_initialized, set_width, wrap_here)
204         (fputs_maybe_filtered): Update.
206 2018-12-28  Eli Zaretskii  <eliz@gnu.org>
208         * coffread.c (coff_symtab_read): Don't record in minsyms symbols
209         that are unresolved.  This avoids triggering an internal error
210         when stepping outside of 'main' in MinGW programs.
212 2018-12-27  Tom Tromey  <tom@tromey.com>
214         * python/py-utils.c (gdbpy_handle_exception): Translate
215         PyExc_KeyboardInterrupt to quit.
217 2018-12-27  Tom Tromey  <tom@tromey.com>
219         * python/python-internal.h (gdbpy_print_stack_or_quit): Declare.
220         * python/py-unwind.c (pyuw_sniffer): Use
221         gdbpy_print_stack_or_quit.
222         * python/py-framefilter.c (throw_quit_or_print_exception):
223         Remove.
224         (gdbpy_apply_frame_filter): Use gdbpy_print_stack_or_quit.
225         * python/python.c (gdbpy_print_stack_or_quit): New function.
227 2018-12-27  Tom Tromey  <tom@tromey.com>
229         * python/py-value.c (convert_value_from_python): Use
230         gdbpy_convert_exception.
231         * python/py-param.c (parmpy_init): Use gdbpy_convert_exception.
232         * python/py-cmd.c (cmdpy_init): Use gdbpy_convert_exception.
233         * python/py-breakpoint.c (bppy_init): Use
234         gdbpy_convert_exception.
236 2018-12-27  Tom Tromey  <tom@tromey.com>
238         * configure.nat (NATDEPFILES): Use nat/ prefix.
239         * Makefile.in (CONFIG_SRC_SUBDIR): Add nat.
240         (%.o: ${srcdir}/nat/%.c): Remove rule.
241         (INIT_FILES): Do not filter out NATDEPFILES.
243 2018-12-27  Tom Tromey  <tom@tromey.com>
245         * Makefile.in (INIT_FILES): Redefine.
246         (stamp-init): Remove sed, tr invocations.  Use for loop.  Don't
247         set LANG or LC_ALL.
249 2018-12-27  Tom Tromey  <tom@tromey.com>
251         * Makefile.in (stamp-init): Remove gdbtypes special case.
253 2018-12-27  John Baldwin  <jhb@FreeBSD.org>
255         * config/i386/nm-fbsd.h: Remove file.
256         * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-fbsd.h.
257         * configure.nat: Remove NAT_FILE for FreeBSD/i386.
259 2018-12-27  Tom Tromey  <tom@tromey.com>
261         * minsyms.h (class minimal_symbol_reader): Use
262         DISABLE_COPY_AND_ASSIGN.
264 2018-12-27  Tom Tromey  <tom@tromey.com>
266         * python/python.c (python_interactive_command): Use std::string.
267         (gdbpy_parameter): Likewise.
268         * python/py-utils.c (unicode_to_encoded_string): Update comment.
269         * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
270         * python/py-record-btrace.c (recpy_bt_insn_data): Use
271         byte_vector.
272         * python/py-objfile.c (objfpy_get_build_id): Use
273         unique_xmalloc_ptr.
274         * python/py-inferior.c (infpy_read_memory): Use
275         unique_xmalloc_ptr.
276         * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
278 2018-12-26  Simon Marchi  <simon.marchi@polymtl.ca>
280         * target.c (target_terminal::restore_inferior): Remove struct keyword.
282 2018-12-26  Simon Marchi  <simon.marchi@ericsson.com>
284         * build-id.c (build_id_to_debug_bfd): Enhance debug output.
285         * symfile.c (separate_debug_file_exists): Likewise.
287 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
289         * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
290         SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
291         names.
292         (typename_stoken): New function.
294 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
296         * c-exp.y (field_name): New %token, and new rule.
297         (exp): Replace uses of 'name' with 'field_name' where appropriate.
299 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
301         PR gdb/13368
302         * c-exp.y (typebase): Extend the comment.
303         (ident_tokens): Likewise.
305 2018-12-18  Tom Tromey  <tom@tromey.com>
307         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
308         address of sect_off.
310 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
312         GDB 8.2.1 released.
314 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
316         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
317         assigning locations.
318         (riscv_return_value): Take more care not to read/write outside of
319         argument buffer.  Cast return value between the declared type and
320         the abi type.
322 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
324         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
325         fflags, and frm registers.
327 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
329         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
330         (riscv_gdbarch_init): Register new function with gdbarch.
331         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
333 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
335         * minsyms.c (mst_str): New.
336         (minimal_symbol_reader::record_full): Add debug output.
338 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
340         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
341         equal PL_FLAG_SI.
342         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
344 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
346         PR gdb/23974
347         * target.c (target_read_stralloc): Check for empty vector.
349 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
351         * top.c (print_gdb_configuration): Print "--without-python"
352         if GDB was configured without Python.
354 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
356         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
357         a signed offset as a string.
359 2018-12-21  Dave Murphy  <davem@devkitpro.org>
361         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
362         initialise.
363         * probe.c (any_static_probe_ops): Ditto.
364         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
365         * stap-probe.c (stap_static_probe_ops): Ditto.
366         * tui/tui-hooks.c (tui_observers_token): Ditto.
367         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
369 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
371         * dummy-frame.c (default_dummy_id): Defined new function.
372         * dummy-frame.h (default_dummy_id): Declare new function.
373         * frame-unwind.c (default_unwind_pc): Define new function.
374         (default_unwind_sp): Define new function.
375         * frame-unwind.h (default_unwind_pc): Declare new function.
376         (default_unwind_sp): Declare new function.
377         * frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
378         available.
379         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
380         * gdbarch.c: Regenerate.
381         * gdbarch.h: Regenerate.
382         * gdbarch.sh: Update definition of dummy_id, unwind_pc, and
383         unwind_sp.  Add additional header files to be included in
384         generated file.
386 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
388         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
389         sp clobbers.
391 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
393         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
394         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
395         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
396         'processing_has_namespace_info' from unsigned int to bool.  Update
397         comments.
398         (producer_is_icc_lt_14): Update return type.
399         (producer_is_gcc_lt_4_3): Likewise.
400         (producer_is_gxx_lt_4_6): Likewise.
401         (process_die): Write true instead of 1 into predicate fields.
402         (dwarf2_start_symtab): Likewise.
403         (var_decode_location): Likewise.
404         (dwarf2_mark_helper): Likewise.
405         (dwarf2_mark): Likewise.
406         (dwarf2_clear_marks): Write false instead of 0 into predicate
407         field.
408         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
409         0.
411 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
413         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
414         asm/sigcontext.h.
416 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
418         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
419         warning trailing new line.
421 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
423         * nat/linux-ptrace.c (kill_child): New function.
424         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
425         Add a call to kill_child in case of early return after fork.
426         (linux_check_ptrace_features): Use kill_child instead of local code.
427         (linux_test_for_tracefork): Likewise.
429 2018-12-14  Tom Tromey  <tom@tromey.com>
431         * Makefile.in: Remove "alloca" comment.
432         (INFOFILES): Remove.
433         (local-maintainer-clean): Don't use INFOFILES.
435 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
437         * syscalls/update-freebsd.sh: New file.
438         * syscalls/freebsd.xml: Regenerate.
440 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
442         * NEWS: Add entry documenting system call aliases.
443         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
444         to get_syscalls_by_name.
445         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
446         * gdbarch.h: Regenerate.
447         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
448         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
449         from get_syscall_by_name.  Now accepts a pointer to a vector of
450         integers and returns a bool.
451         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
452         (syscall_create_syscall_desc): Add alias parameter and pass it to
453         syscall_desc constructor.
454         (syscall_start_syscall): Handle alias attribute.
455         (syscall_attr): Add alias attribute.
456         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
457         Now accepts a pointer to a vector of integers and returns a
458         bool.  Add syscalls whose alias or name matches the requested
459         name.
460         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
461         accepts a pointer to a vector of integers and returns a bool.
462         * xml-syscall.h (get_syscalls_by_name): Likewise.
464 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
466         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
467         to get_syscalls_by_group.
468         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
469         false.
470         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
471         numbers to an existing vector of integers and return a bool.
472         (get_syscalls_by_group): Accept pointer to vector of integers
473         and change return type to bool.
474         * xml-syscall.h (get_syscalls_by_group): Likewise.
476 2018-12-13  Jim Wilson  <jimw@sifive.com>
478         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
479         comment for SD field, and correct xlen calculation.  For MISA, add
480         comment for MXL field, add call to register_size, and correct base
481         calculation.
483 2018-12-13  Stafford Horne  <shorne@gmail.com>
485         * NEWS(New targets): Add or1k*-*-linux*.
487 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
489         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
490         declare on one line to fix ARI warning.
492 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
494         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
495         (infcall_suspend_state::registers): New.
496         (infcall_suspend_state::restore): New.
497         (infcall_suspend_state::thread_suspend): Rename to...
498         (infcall_suspend_state::m_thread_suspend): ...this.
499         (infcall_suspend_state::registers): Rename to...
500         (infcall_suspend_state::m_registers): ...this.
501         (infcall_suspend_state::siginfo_gdbarch): Rename to...
502         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
503         (infcall_suspend_state::siginfo_data): Rename to...
504         (infcall_suspend_state::m_siginfo_data): ...this.
505         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
506         constructor.
507         (restore_infcall_suspend_state): Rewrite to use
508         infcall_suspend_state::restore method.
509         (get_infcall_suspend_state_regcache): Use
510         infcall_suspend_state::registers method.
512 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
514         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
515         arguments are passed in integer registers.
516         (riscv_call_arg_complex_float): Likewise.
518 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
520         * nat/linux-osdata.c (common_getter): New function.
521         (struct osdata_type): Change getter to take_snapshot.
522         Add LONGEST len_avail and struct buffer buffer.
523         Change all elements in the initializer.
524         Add an element for the list of types.
525         (linux_xfer_osdata_info_os_types): New function.
526         (linux_common_xfer_osdata): Use common_getter for the list of types.
527         Replace getter call by common_getter.
528         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
529         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
530         (linux_xfer_osdata_fds): Likewise.
531         (linux_xfer_osdata_modules): Likewise.
532         (linux_xfer_osdata_msg): Likewise.
533         (linux_xfer_osdata_processes): Likewise.
534         (linux_xfer_osdata_processgroups): Likewise.
535         (linux_xfer_osdata_sem): Likewise.
536         (linux_xfer_osdata_shm): Likewise.
537         (linux_xfer_osdata_isockets): Likewise.
538         (linux_xfer_osdata_threads): Likewise.
540 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
542         * nat/linux-osdata.c: Removed various trailing spaces.
544 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
546         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
547         leading whitespace before #include line.
549 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
550             Дилян Палаузов  <dilyan.palauzov@aegee.org>
552         PR gdb/23950
553         * configure.ac: Search for tgetent in libtinfow.
554         * configure: Re-generate.
556 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
558         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
559         (thread_db_err_str): Forward declare.
560         (delete_thread_db_info): Call td_ta_delete_p if available.
561         (try_thread_db_load_1): Acquire td_ta_delete address.
562         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
564 2018-12-08  Pedro Alves  <palves@redhat.com>
566         * source.c (forward_search_command): Rename to ...
567         (search_command_helper): ... this.  Add 'forward' parameter.
568         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
569         buffer.  Handle backward searches too.
570         (forward_search_command, reverse_search_command): Reimplement by
571         calling search_command_helper.
573 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
575         * .dir-locals.el: Copy most of the settings from c-mode over to
576         c++-mode.
578 2018-12-08  Stafford Horne  <shorne@gmail.com>
580         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
581         * configure.tgt: Add or1k*-*-linux*.
582         * or1k-linux-tdep.c: New file.
583         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
585 2018-12-07  Pedro Alves  <palves@redhat.com>
587         * dwarf2read.c (get_gdb_index_contents_from_section): Use
588         gdb::make_array_view.
590 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
592         * language.c (_initialize_language): Fix leak by assigning
593         a static string to language.  Same for range and case_sensitive,
594         even if no leak is detected for these variables.
596 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
598         * configure: Re-generate.
599         * configure.ac: Use separate sed expressions to escape variables
600         in auto-load directories.
602 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
604         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
605         (riscv_find_default_target_description): Use new function to
606         extract feature from gdbarch_info.
607         (riscv_gdbarch_init): Add error checks for xlen and flen between
608         target description and bfd headers.  Be smarter about when we
609         think the hardware floating point abi should be used.
611 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
613         * nat/aarch64-linux-hw-point.c
614         (aarch64_linux_any_set_debug_regs_state): New function.
615         * nat/aarch64-linux-hw-point.h
616         (aarch64_linux_any_set_debug_regs_state): New declaration.
617         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
618         BPs or WPs are set.
620 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
622         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
623         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
625 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
626             Simon Marchi  <simon.marchi@ericsson.com>
628         * linespec.c (symtab_vector_up): Remove.
629         (symtabs_from_filename): Change return type to std::vector.
630         (collect_symtabs_from_filename): Likewise.
631         (create_sals_line_offset): Assign return value of
632         collect_symtabs_from_filename to *ls->file_symtabs.
633         (convert_explicit_location_to_linespec): Remove call to release.
634         (parse_linespec): Likewise.
635         (symtab_collector) <symtab_collector>: Remove initialization of
636         m_symtabs.
637         <release_symtabs>: Change return type to std::vector<symtab *>.
638         <operator ()>: Adjust.
640 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
642         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
643         defined.
644         (union sigval32, struct siginfo32, fbsd_siginfo_size)
645         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
646         of KERN_PROC_AUXV and PT_LWPINFO.
647         (fbsd_nat_target::xfer_partial): Define method unconditionally.
648         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
649         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
650         Make TARGET_OBJECT_FREEBSD_VMMAP and
651         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
652         and KERN_PROC_PS_STRINGS.
653         * fbsd-nat.h: Include <sys/proc.h>.
654         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
656 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
658         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
659         header files.
660         (riscv_linux_nat_target::read_description): New method.
662 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
664         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
665         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
666         (riscv_tdesc_cache): New global.
667         (riscv_create_target_description): Look in the cache before
668         creating a new target description.
670 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
672         * arch/riscv.h (riscv_gdb_features::operator==): New.
673         (riscv_gdb_features::operator!=): New.
674         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
675         operator.
677 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
679         * arch/riscv.h (riscv_create_target_description): Make return type
680         const.
681         * arch/riscv.c (riscv_create_target_description): Likewise.
682         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
684 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
685             Keith Seitz  <keiths@redhat.com>
686             Tom Tromey  <tom@tromey.com>
687             Sergio Durigan Junior  <sergiodj@redhat.com>
689         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
690         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
691         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
692         inside the CU.
694 2018-11-30  Pedro Alves  <palves@redhat.com>
696         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
697         <stratum>: New override.
698         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
699         <stratum>: New override.
700         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
701         <stratum>: New override.
702         * exec.c (exec_target) <exec_target>: Delete.
703         <stratum>: New override.
704         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
705         stratum method instead of the to_stratum field.
706         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
707         <stratum>: New override.
708         (thread_db_target::thread_db_target): Delete.
709         * make-target-delegates (print_class): Don't print a ctor
710         declaration.  Print a stratum method override declaration.
711         * process-stratum-target.h (process_stratum_target)
712         <process_stratum_target>: Delete.
713         <stratum>: New override.
714         * ravenscar-thread.c (ravenscar_thread_target)
715         <ravenscar_thread_target>: Delete.
716         <stratum>: New override.
717         * record-btrace.c (record_btrace_target)
718         <record_btrace_target>: Delete.
719         <stratum>: New override.
720         * record-full.c (record_full_base_target)
721         <record_full_base_target>: Delete.
722         <stratum>: New override.
723         * record.c (record_disconnect, record_detach)
724         (record_mourn_inferior, record_kill): Adjust to use the stratum
725         method instead of the to_stratum field.
726         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
727         * sol-thread.c (sol_thread_target)
728         <sol_thread_target>: Delete.
729         <stratum>: New override.
730         * spu-multiarch.c (spu_multiarch_target)
731         <spu_multiarch_target>: Delete.
732         <stratum>: New override.
733         * target-delegates.c: Regenerate.
734         * target.c (target_stack::push, target_stack::unpush)
735         (pop_all_targets_above, pop_all_targets_at_and_above)
736         (info_target_command, target_require_runnable)
737         (target_stack::find_beneath): Adjust to use the stratum method
738         instead of the to_stratum field.
739         (dummy_target::dummy_target): Delete.
740         (dummy_target::stratum): New.
741         (debug_target::debug_target): Delete.
742         (debug_target::stratum): New.
743         (maintenance_print_target_stack): Adjust to use the stratum method
744         instead of the to_stratum field.
745         * target.h (struct target_ops) <stratum>: New method.
746         <to_stratum>: Delete.
747         <is_pushed>: Adjust to use the stratum method
748         instead of the to_stratum field.
750 2018-11-30  Pedro Alves  <palves@redhat.com>
752         * corelow.c (core_target) <has_all_memory, has_execution>: New
753         overrides.
754         * inf-child.c (inf_child_target::has_all_memory)
755         (inf_child_target::has_memory, inf_child_target::has_stack)
756         (inf_child_target::has_registers)
757         (inf_child_target::has_execution): Delete.
758         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
759         has_stack, has_registers, has_execution>: Delete.
760         * process-stratum-target.c
761         (process_stratum_target::has_all_memory)
762         (process_stratum_target::has_memory)
763         (process_stratum_target::has_stack)
764         (process_stratum_target::has_registers)
765         (process_stratum_target::has_execution): New.
766         * process-stratum-target.h (process_stratum_target)
767         <has_all_memory, has_memory, has_stack, has_registers,
768         has_execution>: New method overrides.
769         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
770         has_memory, has_stack, has_registers, has_execution>: Delete.
771         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
772         has_execution>: Delete.
773         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
774         has_registers, has_execution>: Delete.
775         * target.c (default_child_has_all_memory)
776         (default_child_has_memory, default_child_has_stack)
777         (default_child_has_registers, default_child_has_execution):
778         Delete.
779         * target.h (default_child_has_all_memory)
780         (default_child_has_memory, default_child_has_stack)
781         (default_child_has_registers, default_child_has_execution):
782         Delete.
783         * tracefile.h (tracefile_target) <has_execution>: New override.
785 2018-11-30  Pedro Alves  <palves@redhat.com>
787         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
788         * bsd-kvm.c: Include "process-stratum-target.h".
789         (bsd_kvm_target): Now inherits from process_stratum_target.
790         (bsd_kvm_target::bsd_kvm_target): Default it.
791         * corelow.c: Include "process-stratum-target.h".
792         (core_target): Now inherits from process_stratum_target.
793         (core_target::core_target): Don't set to_stratum here.
794         * inf-child.c (inf_child_target::inf_child_target): Delete.
795         * inf-child.h: Include "process-stratum-target.h".
796         (inf_child_target): Inherit from process_stratum_target.
797         (inf_child_target) <inf_child_target>: Default it.
798         <can_async_p, supports_non_stop, supports_disable_randomization>:
799         Delete overrides.
800         * process-stratum-target.c: New file.
801         * process-stratum-target.h: New file.
802         * remote-sim.c: Include "process-stratum-target.h".
803         (gdbsim_target): Inherit from process_stratum_target.
804         <gdbsim_target>: Default it.
805         * remote.c: Include "process-stratum-target.h".
806         (remote_target): Inherit from process_stratum_target.
807         <remote_target>: Default it.
808         * target.c (default_thread_address_space)
809         (default_thread_architecture): Delete.
810         * target.h (target_ops) <thread_architecture>: Now returns NULL by
811         default.
812         <thread_address_space>: Ditto.
813         * test-target.h: Include "process-stratum-target.h" instead of
814         "target.h".
815         (test_target_ops): Inherit from process_stratum_target.
816         <test_target_ops>: Default it.
817         * tracefile.c (tracefile_target::tracefile_target): Delete.
818         * tracefile.h: Include "process-stratum-target.h".
819         (tracefile_target): Inherit from process_stratum_target.
820         <tracefile_target>: Default it.
821         * target-delegates.c: Regenerate.
823 2018-11-30  Pedro Alves  <palves@redhat.com>
825         * Makefile.in (COMMON_SFILES): Add test-target.c.
826         * gdbarch-selftests.c: Include "test-target.h".
827         * regcache.c: Include "test-target.h".
828         * target.c (test_target_info, test_target_ops::info): Move to ...
829         * test-target.c: ... this new file.
830         * target.h (test_target_ops): Move to ...
831         * test-target.h: ... this new file.
833 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
835         * source.c (forward_search_command): Fix leak by using
836         xrealloc even for the first allocation in the loop, as buf
837         is static.
839 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
841         PR gdb/23093
842         * fbsd-tdep.c (fbsd_gdb_signal_from_target)
843         (fbsd_gdb_signal_to_target): New.
844         (fbsd_init_abi): Install gdbarch "signal_from_target" and
845         "signal_to_target" methods.
847 2018-11-29  Tom Tromey  <tom@tromey.com>
849         * valarith.c (value_x_unop): Don't set argvec[3].
851 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
853         PR gdb/23917
854         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
855         semicolon.
857 2018-11-26  Pedro Alves  <palves@redhat.com>
859         * procfs.c (procfs_notice_thread): Replace uses of
860         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
861         * sol-thread.c (sol_thread_target::wait)
862         (sol_update_thread_list_callback): Likewise.
864 2018-11-25  Tom Tromey  <tom@tromey.com>
866         * ui-out.c (ui_out::field_fmt): Remove comment.
867         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
868         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
870 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
872         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
873         leak in open_source_file' has been partially undone by '2179fbc36d23
874         Return scoped_fd from open_source_file'. Re-add the transfer of
875         current s->fullname to the unique_xmalloc_ptr fullname given
876         to find_and_open_source.
878 2018-11-23  Pedro Alves  <palves@redhat.com>
880         * gdbthread.h (enum thread_state): Move comments here.
881         (is_running, is_stopped, is_exited): Remove declarations.
883 2018-11-22  Pedro Alves  <palves@redhat.com>
885         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
886         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
887         ALL_NON_EXITED_THREADS with all_non_exited_threads.
888         (print_one_breakpoint_location): Replace ALL_INFERIORS with
889         all_inferiors.
890         * bsd-kvm.c: Include inferior.h.
891         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
892         with all_non_exited_threads.
893         * common/filtered-iterator.h: New.
894         * common/safe-iterator.h: New.
895         * corelow.c (core_target_open): Don't call init_thread_list here.
896         * darwin-nat.c (thread_info_from_private_thread_info): Replace
897         ALL_THREADS with all_threads.
898         * fbsd-nat.c (fbsd_nat_target::resume): Replace
899         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
900         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
901         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
902         * fork-child.c (postfork_hook): Don't call init_thread_list here.
903         * gdbarch-selftests.c (register_to_value_test): Adjust.
904         * gdbthread.h: Don't include "inferior.h" here.
905         (struct inferior): Forward declare.
906         (enum step_over_calls_kind): Moved here from inferior.h.
907         (thread_info::deletable): Definition moved to thread.c.
908         (find_thread_ptid (inferior *, ptid_t)): Declare.
909         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
910         Include "thread-iter.h".
911         (all_threads, all_non_exited_threads, all_threads_safe): New.
912         (any_thread_p): Declare.
913         (thread_list): Delete.
914         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
915         all_non_exited_threads.
916         (proceed_after_attach_callback): Delete.
917         (proceed_after_attach): Take an inferior pointer instead of an
918         integer PID.  Adjust to use range-for.
919         (attach_post_wait): Pass down inferior pointer instead of pid.
920         Use range-for instead of ALL_NON_EXITED_THREADS.
921         (detach_command): Remove init_thread_list call.
922         * inferior-iter.h: New.
923         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
924         (delete_thread_of_inferior): Delete.
925         (delete_inferior, exit_inferior_1): Use range-for with
926         inf->threads_safe() instead of iterate_over_threads.
927         (inferior_appeared): Call init_thread_list here.
928         (discard_all_inferiors): Use all_non_exited_inferiors.
929         (find_inferior_id, find_inferior_pid): Use all_inferiors.
930         (iterate_over_inferiors): Use all_inferiors_safe.
931         (have_inferiors, number_of_live_inferiors): Use
932         all_non_exited_inferiors.
933         (number_of_inferiors): Use all_inferiors and std::distance.
934         (print_inferior): Use all_inferiors.
935         * inferior.h: Include gdbthread.h.
936         (enum step_over_calls_kind): Moved to gdbthread.h.
937         (struct inferior) <thread_list>: New field.
938         <threads, non_exited_threads, threads_safe>: New methods.
939         (ALL_INFERIORS): Delete.
940         Include "inferior-iter.h".
941         (ALL_NON_EXITED_INFERIORS): Delete.
942         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
943         functions.
944         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
945         ALL_NON_EXITED_THREADS with all_non_exited_threads.
946         * infrun.c (follow_exec): Use all_threads_safe.
947         (clear_proceed_status, proceed): Use all_non_exited_threads.
948         (init_wait_for_inferior): Don't clear inline frame state here.
949         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
950         all_threads instead of ALL_NON_EXITED_THREADS.
951         (random_pending_event_thread): Use all_non_exited_threads instead
952         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
953         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
954         instead of ALL_NON_EXITED_THREADS.
955         (handle_no_resumed): Use all_non_exited_threads instead of
956         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
957         ALL_INFERIORS.
958         (restart_threads, switch_back_to_stepped_thread): Use
959         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
960         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
961         all_inferiors.
962         (kill_unfollowed_fork_children): Use inf->non_exited_threads
963         instead of ALL_NON_EXITED_THREADS.
964         * linux-tdep.c (linux_make_corefile_notes): Use
965         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
966         * linux-thread-db.c (thread_db_target::update_thread_list):
967         Replace ALL_INFERIORS with all_inferiors.
968         (thread_db_target::thread_handle_to_thread_info): Use
969         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
970         * mi/mi-interp.c (multiple_inferiors_p): New.
971         (mi_on_resume_1): Simplify using all_non_exited_threads and
972         multiple_inferiors_p.
973         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
974         instead of ALL_NON_EXITED_THREADS.
975         * nto-procfs.c (nto_procfs_target::open): Don't call
976         init_thread_list here.
977         * record-btrace.c (record_btrace_target_open)
978         (record_btrace_target::stop_recording)
979         (record_btrace_target::close)
980         (record_btrace_target::record_is_replaying)
981         (record_btrace_target::resume, record_btrace_target::wait)
982         (record_btrace_target::record_stop_replaying): Use
983         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
984         * record-full.c (record_full_wait_1): Use all_non_exited_threads
985         instead of ALL_NON_EXITED_THREADS.
986         * regcache.c (cooked_read_test): Remove reference to global
987         thread_list.
988         * remote-sim.c (gdbsim_target::create_inferior): Don't call
989         init_thread_list here.
990         * remote.c (remote_target::update_thread_list): Use
991         all_threads_safe instead of ALL_NON_EXITED_THREADS.
992         (remote_target::process_initial_stop_replies): Replace
993         ALL_INFERIORS with all_non_exited_inferiors and use
994         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
995         (remote_target::open_1): Don't call init_thread_list here.
996         (remote_target::append_pending_thread_resumptions)
997         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
998         instead of ALL_NON_EXITED_THREADS.
999         (remote_target::commit_resume)
1000         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
1001         with all_non_exited_inferiors and use all_non_exited_threads
1002         instead of ALL_NON_EXITED_THREADS.
1003         (remote_target::kill_new_fork_children): Use
1004         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
1005         init_thread_list and init_wait_for_inferior calls.
1006         (remote_target::remote_btrace_maybe_reopen)
1007         (remote_target::thread_handle_to_thread_info): Use
1008         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
1009         * target.c (target_terminal::restore_inferior)
1010         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
1011         all_non_exited_inferiors.
1012         * thread-iter.c: New file.
1013         * thread-iter.h: New file.
1014         * thread.c: Include "inline-frame.h".
1015         (thread_list): Delete.
1016         (clear_thread_inferior_resources): Call clear_inline_frame_state.
1017         (init_thread_list): Use all_threads_safe instead of
1018         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
1019         (new_thread): Adjust to per-inferior thread lists.
1020         (add_thread_silent): Pass inferior to find_thread_ptid.
1021         (thread_info::deletable): New, moved from the header.
1022         (delete_thread_1): Adjust to per-inferior thread lists.
1023         (find_thread_global_id): Use inf->threads().
1024         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
1025         find_thread_ptid.
1026         (find_thread_ptid(inferior*, ptid_t)): New overload.
1027         (iterate_over_threads): Use all_threads_safe.
1028         (any_thread_p): New.
1029         (thread_count): Use all_threads and std::distance.
1030         (live_threads_count): Use all_non_exited_threads and
1031         std::distance.
1032         (valid_global_thread_id): Use all_threads.
1033         (in_thread_list): Use find_thread_ptid.
1034         (first_thread_of_inferior): Adjust to per-inferior thread lists.
1035         (any_thread_of_inferior, any_live_thread_of_inferior): Use
1036         inf->non_exited_threads().
1037         (prune_threads, delete_exited_threads): Use all_threads_safe.
1038         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
1039         (set_resumed, set_running): Use all_non_exited_threads.
1040         (is_thread_state, is_stopped, is_exited, is_running)
1041         (is_executing): Delete.
1042         (set_executing, set_stop_requested, finish_thread_state): Use
1043         all_non_exited_threads.
1044         (print_thread_info_1): Use all_inferiors and all_threads.
1045         (thread_apply_all_command): Use all_non_exited_threads.
1046         (thread_find_command): Use all_threads.
1047         (update_threads_executing): Use all_non_exited_threads.
1048         * tid-parse.c (parse_thread_id): Use inf->threads.
1049         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
1051 2018-11-22  Pedro Alves  <palves@redhat.com>
1053         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
1054         switch to it before calling into try_open_exec_file.
1056 2018-11-22  Pedro Alves  <palves@redhat.com>
1058         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
1059         inferior_thread instead of find_thread_ptid, and only when
1060         inferior_ptid is not null_ptid.
1061         * inferior.c (add_inferior): Don't include target_pid_to_str
1062         output when the inferior is not started.
1063         * python/py-inferior.c (python_on_normal_stop): Don't use
1064         find_thread_ptid.
1065         (tui_on_user_selected_context_changed): Use inferior_thread
1066         instead of find_thread_ptid, and only when inferior_ptid is not
1067         null_ptid.
1069 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
1071         PR python/23714
1072         * python/python.c (execute_gdb_command): Call
1073         prevent_dont_repeat earlier to avoid affecting dont_repeat.
1075 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1077         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
1078         (HFILES_NO_SRCDIR): Add arch/riscv.h.
1079         * arch/riscv.c: New file.
1080         * arch/riscv.h: New file.
1081         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
1082         this list, and add arch/riscv.o.
1083         * features/Makefile: Add riscv features.
1084         * features/riscv/32bit-cpu.c: New file.
1085         * features/riscv/32bit-cpu.xml: New file.
1086         * features/riscv/32bit-csr.c: New file.
1087         * features/riscv/32bit-csr.xml: New file.
1088         * features/riscv/32bit-fpu.c: New file.
1089         * features/riscv/32bit-fpu.xml: New file.
1090         * features/riscv/64bit-cpu.c: New file.
1091         * features/riscv/64bit-cpu.xml: New file.
1092         * features/riscv/64bit-csr.c: New file.
1093         * features/riscv/64bit-csr.xml: New file.
1094         * features/riscv/64bit-fpu.c: New file.
1095         * features/riscv/64bit-fpu.xml: New file.
1096         * features/riscv/rebuild-csr-xml.sh: New file.
1097         * riscv-tdep.c: Add 'arch/riscv.h' include.
1098         (riscv_gdb_reg_names): Delete.
1099         (csr_reggroup): New global.
1100         (struct riscv_register_alias): Delete.
1101         (struct riscv_register_feature): New structure.
1102         (riscv_register_aliases): Delete.
1103         (riscv_xreg_feature): New global.
1104         (riscv_freg_feature): New global.
1105         (riscv_virtual_feature): New global.
1106         (riscv_csr_feature): New global.
1107         (riscv_create_csr_aliases): New function.
1108         (riscv_read_misa_reg): Delete.
1109         (riscv_has_feature): Delete.
1110         (riscv_isa_xlen): Simplify, just return cached xlen.
1111         (riscv_isa_flen): Simplify, just return cached flen.
1112         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
1113         (riscv_register_name): Update to make use of tdesc_register_name.
1114         Look up xreg and freg names in the new globals riscv_xreg_feature
1115         and riscv_freg_feature.  Don't supply csr aliases here.
1116         (riscv_fpreg_q_type): Delete.
1117         (riscv_register_type): Use tdesc_register_type in almost all
1118         cases, override the returned type in a few specific cases only.
1119         (riscv_print_one_register_info): Handle errors reading registers.
1120         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
1121         registers that are otherwise unknown to GDB.  Also check the
1122         csr_reggroup.
1123         (riscv_print_registers_info): Remove assert about upper register
1124         number, and use gdbarch_register_reggroup_p instead of
1125         short-cutting.
1126         (riscv_find_default_target_description): New function.
1127         (riscv_check_tdesc_feature): New function.
1128         (riscv_add_reggroups): New function.
1129         (riscv_setup_register_aliases): New function.
1130         (riscv_init_reggroups): New function.
1131         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
1132         setup register groups.  Register new riscv debug variable.
1133         * riscv-tdep.h: Add 'arch/riscv.h' include.
1134         (struct gdbarch_tdep): Remove abi union, and add
1135         riscv_gdbarch_features field.  Remove cached quad floating point
1136         type, and provide initialisation for double type field.
1137         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
1138         the list of targets using the feature based target descriptions.
1139         * NEWS: Mention target description support.
1141 2018-11-21  Pedro Alves  <palves@redhat.com>
1143         * valops.c (find_method_list, value_find_oload_method_list)
1144         (find_overload_match, find_oload_champ): Rename parameters and
1145         locals.
1147 2018-11-21  Pedro Alves  <palves@redhat.com>
1149         * valops.c (find_method_list): Replace pointer and length
1150         parameters with an gdb::array_view.  Adjust.
1151         (value_find_oload_method_list): Likewise.
1152         (find_overload_match): Use gdb::array_view for methods list.
1153         Adjust to find_oload_champ interface change.
1154         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
1155         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
1157 2018-11-21  Pedro Alves  <palves@redhat.com>
1159         * gdbtypes.c (compare_badness): Change type of parameters to const
1160         reference.  Adjust to badness_vector being a std::vector now.
1161         (rank_function): Adjust to badness_vector being a std::vector now.
1162         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
1163         (LENGTH_MATCH): Delete.
1164         (compare_badness): Change type of parameters to const reference.
1165         (rank_function): Return a badness_vector by value now.
1166         (find_overload_match): Adjust to badness_vector being a
1167         std::vector now.  Remove cleanups.
1168         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
1169         badness_vector pointer.
1170         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
1171         a badness_vector pointer.  Adjust to badness_vector being a
1172         std::vector now.  Remove cleanups.
1173         (find_oload_champ): 'oload_champ_bv' parameter now
1174         a badness_vector pointer.  Adjust to badness_vector being a
1175         std::vector now.  Remove cleanups.
1177 2018-11-21  Pedro Alves  <palves@redhat.com>
1179         * cp-support.c (sym_return_val_size, sym_return_val_index)
1180         (sym_return_val): Delete.
1181         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
1182         add to the vector.
1183         (make_symbol_overload_list): Adjust to return a std::vector
1184         instead of maintaining a global open coded vector.
1185         (make_symbol_overload_list_block): Add std::vector parameter.
1186         (make_symbol_overload_list_block): Rename to ...
1187         (add_symbol_overload_list_block): ... this and add std::vector
1188         parameter.
1189         (make_symbol_overload_list_namespace): Rename to ...
1190         (add_symbol_overload_list_namespace): ... this and add std::vector
1191         parameter.
1192         (make_symbol_overload_list_adl_namespace): Rename to ...
1193         (add_symbol_overload_list_adl_namespace): ... this and add
1194         std::vector parameter.
1195         (make_symbol_overload_list_adl): Delete.
1196         (add_symbol_overload_list_adl): New.
1197         (make_symbol_overload_list_using): Rename to ...
1198         (add_symbol_overload_list_using): ... this and add std::vector
1199         parameter.
1200         (make_symbol_overload_list_qualified): Rename to ...
1201         (add_symbol_overload_list_qualified): ... this and add std::vector
1202         parameter.
1203         * cp-support.h: Include "common/array-view.h" and <vector>.
1204         (make_symbol_overload_list): Change return type to std::vector.
1205         (make_symbol_overload_list_adl): Delete declaration.
1206         (add_symbol_overload_list_adl): New declaration.
1207         * valops.c (find_overload_match): Local 'oload_syms' now a
1208         std::vector.
1209         (find_oload_champ_namespace): 'oload_syms' parameter now a
1210         std::vector pointer.
1211         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
1212         std::vector pointer.  Adjust to new make_symbol_overload_list
1213         interface.
1215 2018-11-21  Pedro Alves  <palves@redhat.com>
1217         * common/array-view.h (array_view::splice(size_type, size_t)): New.
1218         (array_view::splice(size_type)): New.
1219         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
1220         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
1221         std::vector.
1222         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1223         * extension.h: Include "common/array-view.h".
1224         (xmethod_worker::invoke): Adjust to use gdb::array_view.
1225         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
1226         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1227         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
1228         (xmethod_worker::do_get_result_type): Adjust to use
1229         gdb::array_view.
1230         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
1231         * gdbtypes.h: Include "common/array-view.h".
1232         (rank_function): Adjust to use gdb::array_view.
1233         * python/py-xmethods.c (python_xmethod_worker::invoke)
1234         (python_xmethod_worker::do_get_arg_types)
1235         (python_xmethod_worker::do_get_result_type)
1236         (python_xmethod_worker::invoke): Adjust to new interfaces.
1237         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
1238         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
1239         * valops.c (find_overload_match, find_oload_champ_namespace)
1240         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
1241         gdb:array_view and the new xmethod_worker interfaces.
1242         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
1243         gdb::array_view.
1244         * value.h (find_overload_match, result_type_of_xmethod)
1245         (call_xmethod): Adjust to use gdb::array_view.
1246         * unittests/array-view-selftests.c: Add slicing tests.
1248 2018-11-21  Pedro Alves  <palves@redhat.com>
1250         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
1251         * common/array-view.h (make_array_view): New.
1252         * compile/compile-object-run.c (compile_object_run): Adjust to
1253         pass an array_view.
1254         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
1255         * eval.c (eval_call): Adjust to pass an array_view.
1256         (evaluate_subexp_standard): Adjust to pass an array_view.
1257         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
1258         * guile/scm-value.c (gdbscm_value_call): Likewise.
1259         * infcall.c (push_dummy_code): Replace pointer + size parameters
1260         with an array_view parameter.
1261         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
1262         adjust.
1263         * infcall.h: Include "common/array-view.h".
1264         (call_function_by_hand, call_function_by_hand_dummy): Replace
1265         pointer + size parameters with an array_view parameter.
1266         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1267         * linux-tdep.c (linux_infcall_mmap): Likewise.
1268         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1269         (value_nsstring, print_object_command): Likewise.
1270         * python/py-value.c (valpy_call): Likewise.
1271         * rust-lang.c (rust_evaluate_funcall): Likewise.
1272         * spu-tdep.c (flush_ea_cache): Likewise.
1273         * valarith.c (value_x_binop, value_x_unop): Likewise.
1274         * valops.c (value_allocate_space_in_inferior): Likewise.
1275         * unittests/array-view-selftests.c (run_tests): Add
1276         gdb::make_array_view test.
1278 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1280         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1281         than a fixed size buffer.
1283 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1285         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1286         and remove insertion of extra spaces in GDB's output.
1287         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1288         Layout field into a temporary buffer, and then output it as a
1289         string field.
1291 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1293         * NEWS: Document the language choice done by
1294         'info [types|functions|variables]|rbreak'.
1296 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1298         * symtab.c (treg_matches_sym_type_name): Use
1299         scoped_switch_to_sym_language_if_auto instead of local logic.
1300         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1301         to switch to SYM language when language mode is auto.
1303 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1305         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1307 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1309         * symtab.c (search_symbols): Properly check absence of type regexp
1310         before entering the loop scanning the minimal symbols.
1312 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1314         * s12z-tdep.c (s12z_extract_return_value): New function.
1315         (inv_reg_perm) New array.
1316         (s12z_return_value): Populate readbuf if non-null.
1318 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1320         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1321         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1322         to MinGW fixed by Gnulib.
1323         (O_NOINHERIT): Define if not defined.
1325 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1327         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1329 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1331         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1333 2018-11-19  Tom Tromey  <tom@tromey.com>
1335         * source.c (get_filename_and_charpos): Return void.
1337 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1339         * skip.c (_initialize_step_skip): Fix "info skip" help.
1341 2018-11-16  Tom Tromey  <tom@tromey.com>
1343         PR rust/23625:
1344         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1346 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1348         * infrun.c (displaced_step_inferior_states): Change type to
1349         std::forward_list.
1350         (get_displaced_stepping_state): Adjust.
1351         (displaced_step_in_progress_any_inferior): Adjust.
1352         (add_displaced_stepping_state): Adjust.
1353         (remove_displaced_stepping_state): Adjust.
1355 2018-11-18  Tom Tromey  <tom@tromey.com>
1357         PR build/23814:
1358         * target-delegates.c: Rebuild.
1359         * ia64-linux-nat.c (class ia64_linux_nat_target)
1360         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1361         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1362         "self" argument.
1363         (ia64_linux_nat_target::low_new_thread): Rename.
1364         (class ia64_linux_nat_target) <read_description>: Don't declare.
1365         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1366         bool.
1368 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1370         PR gdb/22736:
1371         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1372         lang_struct_return code.
1374 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1376         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1377         return_method.
1378         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1379         * amd64-tdep.c (amd64_push_arguments): Likewise.
1380         (amd64_push_dummy_call): Likewise.
1381         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1382         * arc-tdep.c (arc_push_dummy_call): Likewise.
1383         * arm-tdep.c (arm_push_dummy_call): Likewise.
1384         * avr-tdep.c (avr_push_dummy_call): Likewise.
1385         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1386         * cris-tdep.c (cris_push_dummy_call): Likewise.
1387         * csky-tdep.c (csky_push_dummy_call): Likewise.
1388         * frv-tdep.c (frv_push_dummy_call): Likewise.
1389         * gdbarch.c: Regenerate.
1390         * gdbarch.h: Regenerate.
1391         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1392         return_method.
1393         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1394         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1395         (hppa64_push_dummy_call): Likewise.
1396         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1397         * i386-tdep.c (i386_push_dummy_call): Likewise.
1398         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1399         * infcall.c (call_function_by_hand_dummy): Likewise.
1400         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1401         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1402         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1403         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1404         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1405         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1406         * mep-tdep.c (mep_push_dummy_call): Likewise.
1407         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1408         (mips_n32n64_push_dummy_call): Likewise.
1409         (mips_o32_push_dummy_call): Likewise.
1410         (mips_o64_push_dummy_call): Likewise.
1411         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1412         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1413         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1414         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1415         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1416         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1417         (ppc64_sysv_abi_push_dummy_call): Likewise.
1418         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1419         (ppc64_sysv_abi_push_dummy_call): Likewise.
1420         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1421         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1422         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1423         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1424         * rx-tdep.c (rx_push_dummy_call): Likewise.
1425         * s390-tdep.c (s390_push_dummy_call): Likewise.
1426         * score-tdep.c (score_push_dummy_call): Likewise.
1427         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1428         (sh_push_dummy_call_nofpu): Likewise.
1429         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1430         (sparc32_push_dummy_call): Likewise.
1431         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1432         (sparc64_push_dummy_call): Likewise.
1433         * spu-tdep.c (spu_push_dummy_call): Likewise.
1434         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1435         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1436         * v850-tdep.c (v850_push_dummy_call): Likewise.
1437         * vax-tdep.c (vax_push_dummy_call): Likewise.
1438         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1439         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1441 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1443         * gdbarch.sh (enum function_call_return_method): Add enum.
1444         * gdbarch.h: Regenerate.
1445         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1447 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1449         * unittests/copy_bitwise-selftests.c: New file.
1450         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1451         (selftests::copy_bitwise_tests): Delete, moving this code to
1452         unittests/copy_bitwise-selftests.c instead.
1453         (_initialize_utils): Do not register copy_bitwise tests.
1454         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1455         unittests/copy_bitwise-selftests.c.
1457 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1459         * ada-lang.c (move_bits): Delete. Update all callers to use
1460         copy_bitwise instead.
1461         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1462         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1463         Move from here to utils.c.
1464         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1465         selftests.
1466         * utils.h (copy_bitwise): Add declaration.
1467         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1468         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1469         Moved here from dwarf2loc.c.
1470         (_initialize_utils): Register copy_bitwise selftests.
1472 2018-11-14  Jim Wilson  <jimw@sifive.com>
1474         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1475         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1476         then increment next_regnum if odd.
1477         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1478         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1479         function type.  Pass new arg to riscv_arg_location based on function
1480         type.
1481         (riscv_return_value): Pass new arg to riscv_arg_location.
1483         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1484         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1485         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1487         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1488         setting len.  New local align, set to max of arg align and xlen,
1489         and pass to first riscv_assign_stack_location call.
1491 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1493         * skip.c (complete_skip_number): New function.
1494         (_initialize_step_skip): Add completers to some skip commands.
1496 2018-11-09  Tom Tromey  <tom@tromey.com>
1498         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1499         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1500         <guesses>: Now a std::vector.
1501         (remote_g_packet_data_init, register_remote_g_packet_guess):
1502         Update.
1503         (remote_read_description_p): Update.  Return bool.
1504         (remote_target::read_description): Update.
1505         (struct remote_g_packet_guess): Add constructor.
1507 2018-11-09  Tom Tromey  <tom@tromey.com>
1509         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1510         move assignment operator.
1511         * psymtab.c (psymtab_to_fullname): Update.
1512         * source.h (open_source_file): Return scoped_fd.
1513         (find_and_open_source): Likewise.
1514         * source.c (open_source_file): Return scoped_fd.
1515         (get_filename_and_charpos): Update.
1516         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1517         (forward_search_command): Likewise.
1518         (reverse_search_command): Likewise.
1519         (find_and_open_source): Return scoped_fd.
1520         * tui/tui-source.c (tui_set_source_content): Update.  Use
1521         gdb_file_up.
1523 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1525         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1526         overflow.
1528 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1530         * configure: Regenerate.
1532 2018-11-09  Tom de Vries  <tdevries@suse.de>
1534         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1535         unconditionally, to set the language of the symbol.  Manage freeing
1536         returned pointer using gdb::unique_xmalloc_ptr.
1538 2018-11-08  Tom Tromey  <tom@tromey.com>
1540         * record.c (require_record_target): Upper-case "<TAB>".
1542 2018-11-08  Tom Tromey  <tom@tromey.com>
1544         * python/lib/gdb/command/pretty_printers.py
1545         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1547 2018-11-08  Tom Tromey  <tom@tromey.com>
1549         PR gdb/23555:
1550         PR gdb/23838:
1551         * target.h (target_supports_terminal_ours): Return bool.
1552         * target.c (target_supports_terminal_ours): Handle case where
1553         current_top_target returns nullptr.  Return bool.
1555 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1557         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1558         return the correct count for potential HFAs.
1560 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1562         * i387-tdep.c (i387_supply_xsave): Split handling of
1563         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1564         (i387_collect_xsave): Likewise.
1566 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1568         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1569         (riscv_frame_this_id): Catch errors thrown while building the
1570         frame cache, leave the frame id as the default, which is the outer
1571         frame id.
1573 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1575         * ada-lang.c (read_atcb): Only set task_info->called_task if
1576         task_info->state == Entry_Caller_Sleep.
1577         (print_ada_task_info): Do not check task_info->state before
1578         checking task_info->called_task.
1579         (info_task): Likewise.
1581 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1583         * ada-tasks.c (read_atcb): Clear task_info before computing
1584         the value of each of its fields.
1586 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1588         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1589         NULL before dereferencing it.
1591 2018-11-06  Tom de Vries  <tdevries@suse.de>
1593         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1594         program headers.
1596 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1598         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1599         so that it applies to uclinux as well.
1601 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1603         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1604         when on AAPCS.
1606 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1608         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1609         RISCV_CSR_SSTATUS_REGNUM.
1611 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1613         * source.c (open_source_file): Fix leak by transferring the
1614         current s->fullname to the unique_xmalloc_ptr fullname given
1615         to find_and_open_source.
1617 2018-11-04  Tom Tromey  <tom@tromey.com>
1619         * varobj.c (install_default_visualizer): Update.
1620         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1621         Return gdbpy_ref.
1622         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1623         (find_pretty_printer_from_progspace)
1624         (find_pretty_printer_from_gdb, find_pretty_printer)
1625         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1626         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1627         Update.
1629 2018-11-04  Tom Tromey  <tom@tromey.com>
1631         * python/python.c (gdbpy_parameter_value): Update.
1632         * python/python-internal.h (python_string_to_unicode)
1633         (python_string_to_target_python_string)
1634         (host_string_to_python_string): Return gdbpy_ref.
1635         * python/py-utils.c (python_string_to_unicode)
1636         (unicode_to_encoded_python_string)
1637         (unicode_to_target_python_string)
1638         (python_string_to_target_string)
1639         (python_string_to_target_python_string): Return gdbpy_ref.
1640         (python_string_to_host_string): Update.
1641         (host_string_to_python_string): Return gdbpy_ref.
1642         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1643         (stpy_fullname): Update.
1644         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1645         Update.
1646         * python/py-prettyprint.c (print_string_repr): Update.
1647         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1648         (objfpy_get_build_id): Update.
1649         * python/py-breakpoint.c (bppy_get_location)
1650         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1651         Update.
1653 2018-11-04  Tom Tromey  <tom@tromey.com>
1655         * python/python-internal.h (gdb_py_object_from_longest)
1656         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1657         * python/py-value.c (valpy_int): Update.
1658         * python/py-utils.c (gdb_py_object_from_longest): Return
1659         gdbpy_ref.
1660         (gdb_py_object_from_ulongest): Likewise.
1661         * python/py-type.c (typy_get_alignof): Update.
1662         * python/py-linetable.c (ltpy_get_all_source_lines)
1663         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1664         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1666 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1668         * ada-lang.c (_initialize_ada_language): Fix typo.
1670 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1672         * language.c (type): Remove.
1673         (_initialize_language): Remove assignment to type.
1675 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1677         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1678         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1679         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1680         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1681         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1682         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1683         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1684         and aarch64-ravenscar-thread.o.
1685         * NEWS: Add entry documenting Ravenscar tasking support
1686         on AArch64 ELF.
1688 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1690         * symtab.c (info_functions_command): Initialize quiet flag.
1691         * stack.c (info_args_command): Likewise.
1693 2018-11-01  Jim Wilson  <jimw@sifive.com>
1695         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1696         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1697         debugging messages.
1699 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1701         * ada-lang.c (ada_watch_location_expression): New function.
1702         (ada_language_defn): Set la_watch_location_expression to
1703         ada_watch_location_expression.
1705 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1707         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1709 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1711         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1712         shifting.
1714 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1715             Joel Brobecker  <brobecker@adacore.com>
1717         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1718         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1719         * arm-pikeos-tdep.c: New file.
1720         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1721         embedded system.
1722         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1724 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1726         * common/pathstuff.c (get_standard_temp_dir): New.
1727         * common/pathstuff.h (get_standard_temp_dir): New.
1728         * config.in: Re-generate.
1729         * configure: Re-generate.
1730         * configure.ac: Don't check for mkdtemp.
1731         * gnulib/aclocal-m4-deps.mk: Re-generate.
1732         * gnulib/aclocal.m4: Re-generate.
1733         * gnulib/config.in: Re-generate.
1734         * gnulib/configure: Re-generate.
1735         * gnulib/import/Makefile.am: Re-generate.
1736         * gnulib/import/Makefile.in: Re-generate.
1737         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1738         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1739         * gnulib/import/m4/mkdtemp.m4: New file.
1740         * gnulib/import/mkdtemp.c: New file.
1741         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1742         Add mkdtemp module.
1743         * unittests/mkdir-recursive-selftests.c (test): Use
1744         get_standard_temp_dir.
1745         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1746         ifdef.
1747         * compile/compile.c (get_compile_file_tempdir): Likewise.
1749 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1751         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1752         (SIG_FRAME_LR_OFFSET64): New define.
1753         (SIG_FRAME_FP_OFFSET64): New define.
1754         (aix_sighandle_frame_cache): New Function.
1755         (aix_sighandle_frame_this_id): New Function.
1756         (aix_sighandle_frame_prev_register): New Function.
1757         (aix_sighandle_frame_sniffer): New Function.
1758         (aix_sighandle_frame_unwind): New global variable.
1759         (rs6000_aix_init_osabi): Install new frame unwinder.
1761 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1763         PR gdb/23835
1764         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1765         already defined.
1767 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1769         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1771 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1773         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1774         (producer_is_icc): New function.
1775         (check_producer): Set producer_is_icc field on dwarf2_cu.
1776         (dwarf2_init_integer_type): New function.
1777         (read_base_type): Call dwarf2_init_integer_type instead of
1778         init_integer_type in all cases.
1779         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1780         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1781         LEN is greater than 0.
1783 2018-10-30  Tom Tromey  <tom@tromey.com>
1785         * main.c (captured_main_1): Check return value of bfd_init.
1787 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1789         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1790         Adjust comments.
1792 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1794         * procfs.c: Include common/pathstuff.h.
1796 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1798         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1799         Add missing braces.  No functional change.
1801 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1803         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1804         to report a bad option and fix indentation.
1805         * demangle.c (demangle_command): Use report_unrecognized_option_error
1806         to report a bad option and correctly report the bad option.
1808 2018-10-27  Tom Tromey  <tom@tromey.com>
1810         PR cli/23364:
1811         * darwin-nat.c (copied_shell): New global.
1812         (may_have_sip): Rename from should_disable_startup_with_shell.
1813         (copy_shell_to_cache, maybe_cache_shell): New functions.
1814         (darwin_nat_target::create_inferior): Update.  Use
1815         copied_shell.
1817 2018-10-27  Tom Tromey  <tom@tromey.com>
1819         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1820         (run_tests): Call test_to_file.
1821         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1822         temporary files.
1823         * common/scoped_fd.h (scoped_fd::to_file): New method.
1825 2018-10-27  Tom Tromey  <tom@tromey.com>
1827         * unittests/scoped_mmap-selftests.c (test_normal): Use
1828         gdb_mkostemp_cloexec.
1829         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1830         Use gdb_mkostemp_cloexec.
1831         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1832         gnulib/config.in, gnulib/configure,
1833         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1834         gnulib/import/m4/gnulib-cache.m4,
1835         gnulib/import/m4/gnulib-comp.m4: Update.
1836         * gnulib/import/m4/mkostemp.m4: New file.
1837         * gnulib/import/m4/mkstemp.m4: Remove.
1838         * gnulib/import/mkostemp.c: New file.
1839         * gnulib/import/mkstemp.m4: Remove.
1840         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1841         mkstemp, add mkostemp.  Apply new patch.
1842         * gnulib/import/stdlib.in.h: Apply patch.
1843         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1844         New file.
1845         * dwarf-index-write.c (write_psymtabs_to_index): Use
1846         gdb_mkostemp_cloexec.
1847         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1849 2018-10-27  Tom Tromey  <tom@tromey.com>
1851         * unittests/mkdir-recursive-selftests.c: New file.
1852         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1853         unittests/mkdir-recursive-selftests.c.
1854         * dwarf-index-cache.c (mkdir_recursive): Move to
1855         common/filestuff.c.
1856         (index_cache::store): Check return value of mkdir_recursive.
1857         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1858         (_initialize_index_cache): Don't register test.
1859         * common/filestuff.h (mkdir_recursive): Declare.
1860         * common/filestuff.c (mkdir_recursive): Move from
1861         dwarf-index-cache.c.  Return bool.
1863 2018-10-27  Tom Tromey  <tom@tromey.com>
1865         * dwarf-index-write.c (write_psymtabs_to_index): Move
1866         make_temp_filename to common/pathstuff.c.
1867         * common/pathstuff.h (make_temp_filename): Declare.
1868         * common/pathstuff.c (make_temp_filename): New function, moved
1869         from dwarf-index-write.c.
1871 2018-10-27  Tom Tromey  <tom@tromey.com>
1873         * procfs.c (procfs_target::create_inferior): Use get_shell.
1874         * cli/cli-cmds.c (shell_escape): Use get_shell.
1875         * windows-nat.c (windows_nat_target::create_inferior): Use
1876         get_shell.
1877         * common/pathstuff.c (get_shell): New function.
1878         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1879         (fork_inferior): Use get_shell.
1880         * common/pathstuff.h (get_shell): Declare.
1882 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1884         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1886 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1888         * stack.c (print_variable_and_value_data): Add preg and treg.
1889         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1890         and update callers.
1891         (print_frame_arg_vars): Likewise.
1892         (prepare_reg): New function.
1893         (info_locals_command): Extract info print args and use them.
1894         (info_args_command): Likewise.
1895         (_initialize_stack): Modify on-line help.
1896         * symtab.c (treg_matches_sym_type_name): New function.
1897         (search_symbols): New arg t_regexp.
1898         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1899         (info_variables_command): Extract info print args and use them.
1900         (info_functions_command): Likewise.
1901         (info_types_command): Update call to symtab_symbol_info.
1902         (_initialize_symtab): Modify on-line help.
1903         * symtab.h (treg_matches_sym_type_name): New function.
1904         (search_symbols): New t_regexp arg.
1906 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1908         * cli-utils.c (extract_arg_maybe_quoted): New function.
1909         (extract_info_print_args): New function.
1910         (info_print_args_help): New function.
1911         (report_unrecognized_option_error): New function.
1912         * cli-utils.h (extract_arg_maybe_quoted): New function.
1913         (extract_info_print_args): New function.
1914         (info_print_args_help): New function.
1915         (report_unrecognized_option_error): New function.
1917 2018-10-26  Tom Tromey  <tom@tromey.com>
1919         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1920         (compute_compunit_symtab_includes): Update.
1921         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1922         (compunit_symtab_ptr): Likewise.
1924 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1926         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1927         default_print_auxv_entry for specific tag values.
1929 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1931         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1933 2018-10-26  Jim Wilson  <jimw@sifive.com>
1935         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1936         (riscv_linux_sigframe_init): Declare.
1937         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1938         (riscv_linux_sigframe): New.
1939         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1940         (riscv_linux_sigframe_init): Define.
1941         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1943         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1944         (riscv_isa_flen): Likewise.  Drop static.
1945         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1946         (riscv_isa_flen): Likewise.  Declare.
1948 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1949             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1951         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1952         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1953         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1954         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1955         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1956         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1957         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1958         Define.
1959         (struct ppc_linux_features) <htm>: New field.
1960         (ppc_linux_no_features): Add initializer for htm field.
1961         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1962         new tdescs.
1963         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1964         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1965         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1966         Define if not already defined.
1967         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1968         and rs6000/powerpc-isa207-htm-vsx64l.
1969         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1970         rs6000/powerpc-isa207-htm-vsx64l.xml.
1971         * features/rs6000/power-htm-spr.xml: New file.
1972         * features/rs6000/power-htm-core.xml: New file.
1973         * features/rs6000/power64-htm-core.xml: New file.
1974         * features/rs6000/power-htm-fpu.xml: New file.
1975         * features/rs6000/power-htm-altivec.xml: New file.
1976         * features/rs6000/power-htm-vsx.xml: New file.
1977         * features/rs6000/power-htm-ppr.xml: New file.
1978         * features/rs6000/power-htm-dscr.xml: New file.
1979         * features/rs6000/power-htm-tar.xml: New file.
1980         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1981         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1982         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1983         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1984         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1985         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1986         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1987         fetch_regset with HTM regsets.
1988         (store_register, store_ppc_registers): Call store_regset with HTM
1989         regsets.
1990         (ppc_linux_nat_target::read_description): Set htm field in the
1991         features struct if needed.
1992         * ppc-linux-tdep.c: Include
1993         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1994         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1995         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1996         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1997         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1998         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1999         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
2000         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
2001         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
2002         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
2003         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
2004         (ppc32_linux_ctarregset): New globals.
2005         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
2006         (ppc_linux_collect_core_cpgrregset): New function.
2007         (ppc_linux_iterate_over_regset_sections): Call back with the htm
2008         regsets.
2009         (ppc_linux_core_read_description): Check if the tm spr section is
2010         present and set htm in the features struct.
2011         (_initialize_ppc_linux_tdep): Call
2012         initialize_tdesc_powerpc_isa207_htm_vsx32l and
2013         initialize_tdesc_powerpc_isa207_htm_vsx64l.
2014         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
2015         Declare.
2016         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
2017         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
2018         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
2019         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
2020         New fields.
2021         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
2022         Likewise.
2023         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
2024         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
2025         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
2026         New enum fields.
2027         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
2028         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
2029         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
2030         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
2031         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
2032         <PPC_CTAR_REGNUM>: Likewise.
2033         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
2034         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
2035         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
2036         (IS_CEFP_PSEUDOREG): Define.
2037         (rs6000_register_name): Hide the upper halves of checkpointed VSX
2038         registers.  Return names for the checkpointed DFP, VSX, and EFP
2039         pseudo registers.
2040         (rs6000_pseudo_register_type): Remove initial assert and raise an
2041         internal error in the else clause instead.  Return types for the
2042         checkpointed DFP, VSX, and EFP pseudo registers.
2043         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
2044         checkpointed DFP pseudo registers.
2045         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
2046         checkpointed VSX pseudo registers.
2047         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
2048         from efpr_pseudo_register_read and
2049         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
2050         registers.
2051         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
2052         Handle checkpointed DFP, VSX, and EFP registers.
2053         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
2054         (efp_ax_pseudo_register_collect): New functions.
2055         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
2056         register logic to new functions.  Handle checkpointed DFP, VSX,
2057         and EFP pseudo registers.
2058         (rs6000_gdbarch_init): Look for and validate the htm features.
2059         Include checkpointed DFP, VSX and EFP pseudo-registers.
2060         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
2061         HTM registers.
2063 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2065         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
2066         without altivec or fpu.
2068 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2069             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2071         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
2072         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
2073         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
2074         Define if not already defined.
2075         * features/rs6000/power-ebb.xml: New file.
2076         * features/rs6000/power-linux-pmu.xml: New file.
2077         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
2078         features.
2079         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
2080         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
2081         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
2082         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
2083         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
2084         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
2085         fetch_regset with ebb and pmu regsets.
2086         (store_register, store_ppc_registers): Call store_regset with ebb
2087         and pmu regsets.
2088         (ppc_linux_nat_target::read_description): Set isa207 field in the
2089         features struct if ebb and pmu are avaiable.
2090         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
2091         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
2092         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
2093         and pmu regsets.
2094         (ppc_linux_core_read_description): Check if the pmu section is
2095         present and set isa207 in the features struct.
2096         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
2097         (ppc32_linux_pmuregset): Declare.
2098         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
2099         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
2100         <ppc_sier_regnum>: New field.
2101         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
2102         New enum values.
2103         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
2104         values.
2105         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
2106         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
2107         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
2108         ebb and pmu features.
2110 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2111             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2113         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
2114         (tdesc_powerpc_isa207_vsx64l): Declare.
2115         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
2116         (struct ppc_linux_features) <isa207>: New field.
2117         (ppc_linux_no_features): Add initializer for isa207 field.
2118         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
2119         new tdescs.
2120         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
2121         (NT_PPC_TAR): Define if not already defined.
2122         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
2123         rs6000/powerpc-isa207-vsx64l.
2124         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
2125         rs6000/powerpc-isa207-vsx64l.xml.
2126         * features/rs6000/power-tar.xml: New file.
2127         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
2128         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
2129         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
2130         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
2131         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
2132         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
2133         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
2134         fetch_regset with the TAR regset.
2135         (store_register, store_ppc_registers): Call store_regset with the
2136         TAR regset.
2137         (ppc_linux_nat_target::read_description): Set isa207 field in the
2138         features struct if needed.
2139         * ppc-linux-tdep.c: Include
2140         features/rs6000/powerpc-isa207-vsx32l.c and
2141         features/rs6000/powerpc-isa207-vsx64l.c.
2142         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
2143         (ppc_linux_iterate_over_regset_sections): Call back with the tar
2144         regset.
2145         (ppc_linux_core_read_description): Check if the tar section is
2146         present and set isa207 in the features struct.
2147         (_initialize_ppc_linux_tdep): Call
2148         initialize_tdesc_powerpc_isa207_vsx32l and
2149         initialize_tdesc_powerpc_isa207_vsx64l.
2150         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
2151         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
2152         (enum) <PPC_TAR_REGNUM>: New enum value.
2153         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
2154         feature.
2155         (ppc_process_record_op31): Record changes to TAR.
2157 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2158             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2160         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
2161         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2162         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
2163         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
2164         (struct ppc_linux_features) <ppr_dscr>: New field.
2165         (ppc_linux_no_features): Add initializer for ppr_dscr field.
2166         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
2167         new tdescs.
2168         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
2169         Define if not already defined.
2170         * features/Makefile (WHICH): Add
2171         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
2172         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
2173         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2174         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
2175         * features/rs6000/power-dscr.xml: New file.
2176         * features/rs6000/power-ppr.xml: New file.
2177         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
2178         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
2179         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
2180         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
2181         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
2182         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
2183         * ppc-linux-nat.c: Include <sys/uio.h>.
2184         (fetch_regset, store_regset, check_regset): New functions.
2185         (fetch_register, fetch_ppc_registers): Call fetch_regset with
2186         DSCR and PPR regsets.
2187         (store_register, store_ppc_registers): Call store_regset with
2188         DSCR and PPR regsets.
2189         (ppc_linux_get_hwcap2): New function.
2190         (ppc_linux_nat_target::read_description): Call
2191         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
2192         features struct if needed.
2193         * ppc-linux-tdep.c: Include
2194         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
2195         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
2196         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
2197         (ppc32_linux_dscrregset): New globals.
2198         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
2199         and dscr regsets.
2200         (ppc_linux_core_read_description): Check if the ppr and dscr
2201         sections are present and set ppr_dscr in the features struct.
2202         (_initialize_ppc_linux_tdep): Call
2203         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
2204         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
2205         * ppc-linux-tdep.h (ppc32_linux_pprregset)
2206         (ppc32_linux_dscrregset): Declare.
2207         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
2208         <ppc_dscr_regnum>: New field.
2209         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
2210         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
2211         and dscr features.
2212         (ppc_process_record_op31): Record changes to PPR and DSCR.
2214 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2216         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
2217         second initializer line for the have_* variables.  Initialize
2218         have_fpu to 0 instead of 1.
2220 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2222         * arch/ppc-linux-common.c (ppc_linux_match_description):
2223         Parenthesize tdesc assignements and indent them properly.
2225 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2227         * ppc-linux-nat.c (fetch_register): Change if statement to else
2228         if.
2229         (store_register): Likewise.
2231 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2233         * rs6000-tdep.c: Remove reggroups.h include.
2234         (rs6000_pseudo_register_reggroup_p): Remove.
2235         (rs6000_gdbarch_init): Remove call to
2236         set_tdesc_pseudo_register_reggroup_p.
2238 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2240         * reggroups.c (default_register_reggroup_p): Return true for
2241         decfloat registers and float_reggroup.
2243 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2245         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
2246         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
2247         ppc_linux_collect_vrregset by regcache_collect_regset.
2249 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2251         * linux-tdep.c (linux_collect_regset_section_cb): Use
2252         std::vector<gdb_byte> instead of char * and malloc for buf.
2253         Remove xfree.
2255 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2257         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
2258         symtab_start instead of always using language_unknown.
2260 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2262         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2263         READ_P parameter, catch and ignore register access errors from
2264         either the old or new MISA location.
2265         (riscv_has_feature): Update call to riscv_read_misa_reg.
2267 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2269         * python/py-function.c (convert_values_to_python): Return
2270         gdbpy_ref<>.  Add header comment.
2271         (fnpy_call): Adjust.
2273 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2275         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2276         (cmdpy_completer_handle_brkchars): Adjust.
2277         (cmdpy_completer): Adjust.
2279 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2281         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2282         Pass correct regnum to raw_supply_zeroed.
2284 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2286         * regcache.c (cooked_read_test): Add CSKY to the list of
2287         architectures with a save_reggroup
2289 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
2291         PR gdb/23368
2292         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2293         transfer terminal state from old new new inferior.
2294         * terminal.h (swap_terminal_info): New function.
2295         * inflow.c (swap_terminal_info): New function.
2297 2018-10-23  Tom Tromey  <tom@tromey.com>
2299         * record-btrace.c (get_thread_current_frame_id): Rename from
2300         get_thread_current_frame.  Return a frame_id.
2301         (record_btrace_start_replaying): Update.
2303 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2305         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2306         for CSRs.
2308 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2310         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2311         have_nonsteppable_watchpoint attribute to 1.
2313 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2315         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2316         register names.
2317         (struct register_alias): Rename to...
2318         (struct riscv_register_alias): ...this, and update comment.
2319         (riscv_register_aliases): Update type, and alias names.  Remove
2320         CSR names from this list.
2321         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2322         register names.  Add an extra assertion.
2323         (riscv_is_regnum_a_named_csr): New function.
2324         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2326 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2328         * configure.tgt: Add configuration for s12z.
2329         * s12z-tdep.c:  New file.
2330         * NEWS: Mention new target.
2332 2018-10-22  Jim Wilson  <jimw@sifive.com>
2334         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2335         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2337         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2338         (riscv_register_type): Use them.
2339         (riscv_print_one_register_info): Handle union of floats same as float.
2340         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2341         riscv_fpreg_q_type fields.
2343 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2345         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2346         * gdbarch.h: Re-generate.
2347         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2348         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2349         * eval.c (evaluate_subexp_standard): Likewise.
2350         * findvar.c (value_of_register): Likewise.
2351         (value_of_register_lazy): Likewise.
2352         (address_from_register): Likewise.
2353         * frame.c (get_frame_register_bytes): Likewise.
2354         * gdbarch-selftests.c (register_to_value_test): Likewise.
2355         * h8300-tdep.c (h8300_register_type): Likewise.
2356         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2357         (i386_svr4_reg_to_regnum): Likewise.
2358         * infcmd.c (default_print_registers_info): Likewise.
2359         (registers_info): Likewise.
2360         (print_vector_info): Likewise.
2361         (default_print_float_info): Likewise.
2362         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2363         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2364         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2365         (mi_cmd_data_list_changed_registers): Likewise.
2366         (mi_cmd_data_list_register_values): Likewise.
2367         (mi_cmd_data_write_register_values): Likewise.
2368         (mi_cmd_trace_frame_collected): Likewise.
2369         * mips-tdep.c (print_gp_register_row): Likewise.
2370         (mips_print_registers_info): Likewise.
2371         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2372         * regcache.c (init_regcache_descr): Likewise.
2373         (register_size): Likewise.
2374         (register_dump::dump): Likewise.
2375         (cooked_read_test): Likewise.
2376         (cooked_write_test): Likewise.
2377         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2378         (rs6000_gdbarch_init): Likewise.
2379         * stabsread.c (stab_reg_to_regnum): Likewise.
2380         * stack.c (info_frame_command): Likewise.
2381         * target-descriptions.c (tdesc_register_name): Likewise.
2382         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2383         * tui/tui-regs.c (tui_show_register_group): Likewise.
2384         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2385         (user_reg_map_regnum_to_name): Likewise.
2386         (value_of_user_reg): Likewise.
2387         (maintenance_print_user_registers): Likewise.
2388         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2389         (xtensa_register_name): Likewise.
2390         (xtensa_register_type): Likewise.
2391         (xtensa_reg_to_regnum): Likewise.
2392         (xtensa_pseudo_register_read): Likewise.
2393         (xtensa_pseudo_register_write): Likewise.
2395 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2397         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2398         correctly-sized buffer with raw_read.
2399         (amd64_pseudo_register_write): Use correctly-sized buffer for
2400         raw_read/raw_write.
2402 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2404         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2405         in add_prefix_cmd of set print type.
2407 2018-10-19  Tom Tromey  <tom@tromey.com>
2409         PR tui/18388:
2410         * NEWS: Mention tabset deprecation.
2411         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2412         (update_tab_width): New function.
2413         (tui_set_tab_width, tui_show_tab_width): New functions.
2414         (tui_set_tab_width_command): Use update_tab_width.
2415         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2416         Add new "set tui tab-width" command.
2417         * tui/tui-source.c (tui_set_source_content): Update.
2418         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2419         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2420         Don't declare.
2421         (tui_tab_width): Declare.
2422         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2423         (tui_set_default_tab_len): Remove.
2425 2018-10-19  Tom Tromey  <tom@tromey.com>
2427         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2428         (key_is_backspace, tui_getc): Don't declare.
2429         * tui/tui-io.c (key_is_start_sequence): Now static.
2430         (key_is_end_sequence, key_is_backspace): Remove.
2431         (tui_getc): Now static.
2433 2018-10-19  Tom Tromey  <tom@tromey.com>
2435         * symfile.c (reread_symbols): Clear "static_links".
2437 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2439         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2440         define.
2441         (aarch64_linux_sigframe_init): Extra boundary checks.
2443 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2445         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2446         the possibly non-existent tdesc type 'vec128', but the type of raw
2447         register v16 instead.
2449 2018-10-19  Gary Benson <gbenson@redhat.com>
2451         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2453 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2455         PR cli/23785
2456         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2457         NULL.
2459 2018-10-17  Paul Koning  <paul_koning@dell.com>
2461         * charset.c (convert_between_encodings): Fix unsigned overflow.
2463 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2465         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2466         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2467         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2468         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2469         New functions.
2470         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2471         and fbsd_info_proc_mappings_header.
2472         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2473         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2474         New.
2476 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2478         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2479         Solaris Maintainer.
2481 2018-10-15  Tom Tromey  <tom@tromey.com>
2483         * tui/tui.c (strcat_to_buf): Remove casts.
2484         * tui/tui-winsource.c (tui_show_source_line)
2485         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2486         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2487         * tui/tui-windata.c (tui_first_data_item_displayed)
2488         (tui_delete_data_content_windows, tui_erase_data_content)
2489         (tui_display_all_data, tui_display_data_from)
2490         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2491         * tui/tui-win.c (tui_set_win_height)
2492         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2493         casts.
2494         * tui/tui-win.c (tui_resize_all): Remove casts.
2495         (tui_scroll_backward_command, tui_set_focus)
2496         (tui_set_tab_width_command): Likewise.
2497         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2498         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2499         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2500         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2501         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2502         Remove casts.
2504 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2506         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2507         AArch64/ARM maintainer.
2509 2018-10-11  Gary Benson <gbenson@redhat.com>
2511         * interps.h (interp::m_name): Make private and mutable.
2512         * interps.c (interp::~interp): Free m_name.
2514 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2515             Simon Marchi <simark@simark.ca>
2517         * README (`configure' options): Add documentation for new
2518         "--enable-unit-tests" option.
2519         * acinclude.m4: Include "selftest.m4".
2520         * configure: Regenerate.
2521         * configure.ac: Use "GDB_AC_SELFTEST".
2522         * maint.c (maintenance_selftest): Update message informing
2523         that selftests have been disabled.
2524         (maintenance_info_selftests): Likewise.
2525         * selftest.m4: New file.
2527 2018-10-10  Gary Benson <gbenson@redhat.com>
2529         * remote.c (remote_target::remote_send_printf): Add
2530         missing va_end found by Coverity.
2532 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2534         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2536 2018-10-09  Tom Tromey  <tom@tromey.com>
2538         * configure: Rebuild.
2539         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2540         * NEWS: Update --enable-ubsan documentation.
2542 2018-10-09  Gary Benson <gbenson@redhat.com>
2544         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2545         found by Coverity.
2547 2018-10-08  Tom Tromey  <tom@tromey.com>
2549         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2550         variable.
2551         (riscv_fbsd_init_abi): Likewise.
2553 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2554         * valops.c (value_struct_elt_for_reference): Rename local variable
2555         to work around the shadowing a previous local warning.
2557 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2559         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2560         * NEWS: Mention new FreeBSD/riscv native configuration.
2561         * configure.host: Add riscv*-*-freebsd*.
2562         * configure.nat: Likewise.
2563         * riscv-fbsd-nat.c: New file.
2565 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2567         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2568         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2569         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2570         * NEWS: Mention new FreeBSD/riscv target.
2571         * configure.tgt: Add riscv*-*-freebsd*.
2572         * riscv-fbsd-tdep.c: New file.
2573         * riscv-fbsd-tdep.h: New file.
2575 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2577         * regcache.h (struct regcache_map_entry): Note that this type can
2578         be used with traditional frame caches.
2579         * trad-frame.c (trad_frame_set_reg_regmap): New.
2580         * trad-frame.h (trad_frame_set_reg_regmap): New.
2582 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2584         PR c++/16841
2585         * valops.c (get_virtual_base_offset): New function.
2586         (value_struct_elt_for_reference): Use it to get virtual base offset
2587         and add it in calculating class member address.
2589 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2591         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2592         (check_producer): Check if the producer is codewarrior.
2593         (producer_is_codewarrior): New function.
2594         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2595         produced by codewarrior.
2596         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2598 2018-10-06  Tom Tromey  <tom@tromey.com>
2600         PR python/19399:
2601         * python/py-inferior.c: Add "architecture" entry.
2602         (infpy_architecture): New function.
2604 2018-10-06  Tom Tromey  <tom@tromey.com>
2606         PR python/21765:
2607         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2608         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2609         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2610         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2612 2018-10-06  Tom Tromey  <tom@tromey.com>
2614         PR build/17077:
2615         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2616         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2617         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2618         #include.
2620 2018-10-06  Tom Tromey  <tom@tromey.com>
2622         * python/py-breakpoint.c (bppy_get_location): Handle a
2623         bp_breakpoint without a location.
2625 2018-10-06  Tom Tromey  <tom@tromey.com>
2627         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2628         (_RegEx): Reformat help text.
2629         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2630         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2631         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2632         text.
2633         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2634         (EnableXMethod, DisableXMethod): Remove help indentation.
2635         Capitalize meta-syntactic variables.
2636         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2637         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2638         Capitalize meta-syntactic variables.
2639         * python/lib/gdb/command/explore.py (ExploreCommand)
2640         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2641         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2642         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2643         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2644         Remove help indentation.
2645         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2646         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2647         (DisableFrameFilter, SetFrameFilterPriority)
2648         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2650 2018-10-06  Tom Tromey  <tom@tromey.com>
2652         PR tui/28819:
2653         * tui/tui-io.c (gdb_wgetch): New function.
2654         (tui_mld_getc, tui_getc): Use it.
2656 2018-10-05  Tom Tromey  <tom@tromey.com>
2658         * sol-thread.c (sol_thread_target::wait): Rename inner
2659         "save_ptid".
2661 2018-10-04  Tom Tromey  <tom@tromey.com>
2663         * configure: Rebuild.
2664         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2666 2018-10-04  Tom Tromey  <tom@tromey.com>
2668         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2669         declaration of "block".
2671 2018-10-04  Tom Tromey  <tom@tromey.com>
2673         * common/filestuff.c (fdwalk): Remove inner declaration of
2674         "result".
2676 2018-10-04  Tom Tromey  <tom@tromey.com>
2678         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2679         "structs_addr" and hoist declaration.
2681 2018-10-04  Tom Tromey  <tom@tromey.com>
2683         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2684         variable "size".
2686 2018-10-04  Tom Tromey  <tom@tromey.com>
2688         * mdebugread.c (parse_partial_symbols): Use std::string.
2690 2018-10-04  Tom Tromey  <tom@tromey.com>
2692         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2693         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2694         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2695         header.
2696         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2697         more inner scope.
2698         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2699         * varobj.c (varobj_update): Rename inner "newobj",
2700         "type_changed".
2701         * valprint.c (generic_emit_char): Rename inner "buf".
2702         * valops.c (find_overload_match): Rename inner "temp".
2703         (value_struct_elt_for_reference): Declare "v" in more inner
2704         scope.
2705         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2706         * unittests/array-view-selftests.c (run_tests): Rename inner
2707         "vec".
2708         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2709         header.
2710         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2711         "tsv" in more inner scope.
2712         (print_one_static_tracepoint_marker): Rename inner
2713         "tuple_emitter".
2714         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2715         (tic6x_push_dummy_call): Don't redeclare "addr".
2716         * target-float.c: Declare "dto" lower.
2717         * symtab.c (lookup_local_symbol): Rename inner "sym".
2718         (find_pc_sect_line): Rename inner "pc".
2719         * stack.c (print_frame): Don't redeclare "gdbarch".
2720         (return_command): Rename inner "gdbarch".
2721         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2722         "sp".
2723         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2724         header.
2725         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2726         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2727         scope.
2728         * remote.c (remote_target::update_thread_list): Don't redeclare
2729         "tp".
2730         (remote_target::process_initial_stop_replies): Rename inner
2731         "thread".
2732         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2733         (remote_target::wait_as): Don't redeclare "stop_reply".
2734         (remote_target::get_thread_local_address): Rename inner
2735         "result".
2736         (remote_target::get_tib_address): Likewise.
2738         * regcache.c (cooked_read_test): Rename "regnum".
2739         * record-btrace.c (cmd_record_btrace_start): Rename inner
2740         "exception".
2741         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2742         loop header.
2743         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2744         header.
2745         (ppu2spu_sniffer): Rename inner "buf".
2746         * parse.c (operator_check_standard): Rename inner "type",
2747         "objfile".
2748         * p-valprint.c (pascal_val_print): Introduce new scope for
2749         "low_bound", "high_bound".
2750         * p-exp.y (yylex): Declare "i" in loop header.
2751         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2752         Lower declaration of "s".
2753         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2754         header.
2755         (nios2_push_dummy_call): Rename "len".
2756         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2757         "buf".
2758         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2759         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2760         (linux_xfer_osdata_modules): Likewise.
2761         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2762         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2763         (mips_o64_push_dummy_call): Likewise.
2764         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2765         "op".
2766         * mi/mi-main.c (list_available_thread_groups): Rename inner
2767         "tuple_emitter".
2768         (mi_cmd_data_read_memory): Rename inner "opts".
2769         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2770         "tuple_emitter".
2771         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2772         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2773         more inner scope.
2774         (parse_partial_symbols): Rename inner "pst", "p", "name"
2775         * main.c (captured_main_1): Rename inner "i"s.
2776         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2777         "oso2".
2778         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2779         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2780         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2781         (handle_signal_stop): Rename inner "gdbarch".
2782         (handle_command): Declare "signum" in loop header.
2783         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2784         "status".
2785         (examine_prologue): Rename inner "sol" and "sof".
2786         (ia64_extract_return_value): Rename inner "val".  Declare another
2787         "val" in a more inner scope.
2788         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2789         inner scope.
2790         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2791         "except".
2792         * findvar.c (default_read_var_value): Don't redeclare "addr".
2793         * f-exp.y (yylex): Declare "i" in loop header.
2794         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2795         Rename inner "type", "expect_type".
2796         (evaluate_subexp_for_sizeof): Rename inner "pc".
2797         * elfread.c (elf_symfile_read): Rename inner "abfd".
2798         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2799         "bytes_read".
2800         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2801         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2802         (dwarf_decode_line_header): Rename inner "lh".
2803         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2804         "offset".  Declare "i" in loop header.
2805         (disassemble_dwarf_expression): Rename inner "addr_size".
2806         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2807         inner "result".
2808         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2809         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2810         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2811         "inner_list_emitter".
2812         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2813         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2814         declaration in a block.
2815         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2816         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2817         "obstack_final_size".
2818         * cp-support.c (inspect_type): Declare "i" in loop header.
2819         * compile/compile.c (compile_instance::insert_symbol_error):
2820         Rename inner "e".
2821         * common/agent.c (agent_run_command): Remove inner "ret"
2822         declaration.
2823         * coffread.c (coff_symfile_read): Rename inner "name".
2824         (coff_symfile_read): Rename inner "abfd".
2825         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2826         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2827         "high".
2828         * c-exp.y (lex_one_token): Move "len" declaration lower.
2829         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2830         "gdbarch".
2831         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2832         "b".
2833         (watch_command_1): Declare "mark" later.
2834         (clear_command): Don't shadow "a" or "b".
2835         (delete_command): Rename inner "b".
2836         (delete_trace_command): Likewise.
2837         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2838         "op".
2839         (arm_gdbarch_init): Remove inner "e_flags".
2840         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2841         "offset" in inner blocks.
2843 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2845         * dwarf-index-write.c (file_write): Don't write if the vector is
2846         empty.
2848 2018-10-05  Tom de Vries  <tdevries@suse.de>
2850         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2851         PyArg_ParseTuple call.
2853 2018-10-05  Tom de Vries  <tdevries@suse.de>
2855         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2856         PyArg_ParseTuple call.
2858 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2860         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2861         to avoid exceeding 80 characters per line limit.
2863 2018-10-04  Tom Tromey  <tom@tromey.com>
2865         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2866         (reread_symbols): Update.
2867         * complaints.h (clear_complaints): Remove argument.
2868         * complaints.c (enum complaint_series): Remove.
2869         (series): Remove global.
2870         (complaint_internal): Update.
2871         (clear_complaints): Remove argument.
2873 2018-10-04  Tom Tromey  <tom@tromey.com>
2875         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2876         debugging symbols" message if there is a separate debug objfile.
2878 2018-10-04  Tom Tromey  <tom@tromey.com>
2880         PR cli/19551:
2881         * symfile.c (symbol_file_add_with_addrs): Update output.
2882         * psymtab.c (require_partial_symbols): Update output.
2884 2018-10-04  Tom Tromey  <tom@tromey.com>
2886         PR cli/22234:
2887         * complaints.c: Emit \n.
2889 2018-10-04  Tom Tromey  <tom@tromey.com>
2891         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2892         (separate_debug_file_exists, find_separate_debug_file)
2893         (add_symbol_file_command, reread_symbols, allocate_symtab)
2894         (allocate_compunit_symtab): Use filtered printing, not
2895         unfiltered.
2896         * psymtab.c (require_partial_symbols, dump_psymtab)
2897         (allocate_psymtab): Use filtered printing, not unfiltered.
2899 2018-10-04  Tom Tromey  <tom@tromey.com>
2901         * complaints.c (complaint_internal): Correctly check complaint
2902         count.
2904 2018-10-04  Tom Tromey  <tom@tromey.com>
2906         * complaints.h (struct complaints): Remove declaration.
2907         * complaints.c (clear_complaints): Remove an unused variable.
2909 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2911         * MAINTAINERS (Write After Approval): Add self.
2913 2018-10-03  Tom Tromey  <tom@tromey.com>
2915         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2916         "buffer_contents".
2917         * coffread.c (coff_symtab_read): Initialize "newobj".
2919 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2921         * dwarf2read.c (read_func_scope): Remove struct keyword in
2922         range-based for.
2924 2018-10-03  Tom Tromey  <tom@tromey.com>
2926         * README: Mention --enable-ubsan.
2927         * NEWS: Mention --enable-ubsan.
2928         * acinclude.m4: Include sanitize.m4.
2929         * configure: Rebuild.
2930         * configure.ac: Call AM_GDB_UBSAN.
2931         * sanitize.m4: New file.
2933 2018-10-03  Tom Tromey  <tom@tromey.com>
2935         * expression.h (enum exp_opcode): Use uint8_t as base type.
2936         * expprint.c (op_name): Handle invalid opcodes.
2938 2018-10-03  Tom Tromey  <tom@tromey.com>
2940         * parse.c (prefixify_expression): Add assert.
2941         (parse_exp_in_context_1): Throw exception if the expression is
2942         empty.
2944 2018-10-03  Tom Tromey  <tom@tromey.com>
2946         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2948 2018-10-03  Tom Tromey  <tom@tromey.com>
2950         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2952 2018-10-03  Tom Tromey  <tom@tromey.com>
2954         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2955         unsigned.
2957 2018-10-03  Tom Tromey  <tom@tromey.com>
2959         * findvar.c (extract_integer): Do work in an unsigned type.
2961 2018-10-03  Tom Tromey  <tom@tromey.com>
2963         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2964         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2965         base type.
2966         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2967         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2968         type.
2969         * c-lang.h (enum c_string_type_values): Use unsigned as base
2970         type.
2971         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2973 2018-10-03  Tom Tromey  <tom@tromey.com>
2975         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2976         <~dwarf2_frame_state_reg_info>: Update.
2977         <dwarf2_frame_state_reg_info>: Update.
2978         <alloc_regs>: Add assertion.  Update.
2979         <reg>: Now a std::vector.
2980         <num_regs>: Remove.
2981         <swap>: Update.
2982         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2983         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2985 2018-10-03  Tom Tromey  <tom@tromey.com>
2987         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2989 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2991         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2993 2018-10-02  Tom Tromey  <tom@tromey.com>
2995         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2997 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2999         * NEWS: Mention changed commands.
3000         * ser-uds.c: New file.
3001         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
3002         * configure: Regenerate.
3003         * Makefile.in: Add new file.
3004         * serial.c (serial_open): Check if filename is a socket
3005         and lookup the appropriate interface accordingly.
3007 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
3009         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
3010         define.
3011         (AARCH64_EXTRA_MAGIC): Likewise.
3012         (AARCH64_FPSIMD_MAGIC): Likewise.
3013         (AARCH64_SVE_MAGIC): Likewise.
3014         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
3015         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
3016         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
3017         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
3018         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
3019         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
3020         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
3021         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
3022         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
3023         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
3024         (read_aarch64_ctx): Add function.
3025         (aarch64_linux_sigframe_init): Detect FP registers.
3027 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
3029         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
3030         (AARCH64_D0_REGNUM): Likewise.
3031         (AARCH64_S0_REGNUM): Likewise.
3032         (AARCH64_H0_REGNUM): Likewise.
3033         (AARCH64_B0_REGNUM): Likewise.
3034         (AARCH64_SVE_V0_REGNUM): Likewise.
3035         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
3036         (AARCH64_D0_REGNUM): Likewise.
3037         (AARCH64_S0_REGNUM): Likewise.
3038         (AARCH64_H0_REGNUM): Likewise.
3039         (AARCH64_B0_REGNUM): Likewise.
3040         (AARCH64_SVE_V0_REGNUM): Likewise.
3042 2018-10-01  Gary Benson <gbenson@redhat.com>
3044         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
3045         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
3046         prfpregset_t instead of gdb_prfpregset_t.
3047         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
3048         * configure, config.in: Rebuild.
3050 2018-10-01  Gary Benson <gbenson@redhat.com>
3052         * common/gdb_proc_service.h: New file, factored out from...
3053         * gdb_proc_service.h: Moved common code to the above file.
3054         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
3056 2018-10-01  Gary Benson <gbenson@redhat.com>
3058         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
3059         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
3061 2018-10-01  Gary Benson <gbenson@redhat.com>
3063         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
3064         (AC_CHECK_HEADERS): Check for linux/elf.h.
3065         * configure, config.in: Rebuild.
3066         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
3067         doesn't define elf_fpregset_t.
3069 2018-10-01  Gary Benson <gbenson@redhat.com>
3071         * gdb_proc_service.h: Whitespace change.
3073 2018-10-01  Tom Tromey  <tom@tromey.com>
3075         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
3076         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
3077         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
3079 2018-10-01  Tom Tromey  <tom@tromey.com>
3081         * README: Minor change.
3083 2018-09-30  Pedro Alves  <palves@redhat.com>
3085         * darwin-nat-info.c (darwin_debug_regions_recurse)
3086         (info_mach_exceptions_command): Remove unused local variables.
3087         * darwin-nat.c (darwin_decode_notify_message)
3088         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
3089         (darwin_stop_inferior, darwin_setup_exceptions)
3090         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
3091         (darwin_nat_target::attach, darwin_nat_target::detach)
3092         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
3093         local variables.
3094         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
3095         variables.
3097 2018-09-29  Tom Tromey  <tom@tromey.com>
3099         * README: Remove some leftover text.
3101 2018-09-29  Tom Tromey  <tom@tromey.com>
3103         * PROBLEMS: Rewrite.
3104         * README: Update.
3106 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
3108         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
3109         case with explicit breakpoint kind.
3110         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
3111         'additional_info' and related logic.
3112         (riscv_debug_breakpoints): New variable.
3113         (riscv_breakpoint_kind_from_pc): Use the length of the existing
3114         instruction to determine the breakpoint kind.
3115         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
3116         flag.  Update description of 'set/show riscv
3117         use-compressed-breakpoints' flag.
3119 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
3121         (NEWS): Mention changes to frame related commands.
3122         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
3123         (add_prefix_cmd_suppress_notification): New function.
3124         (add_com_suppress_notification): Call
3125         add_cmd_suppress_notification.
3126         * command.h (add_cmd_suppress_notification): Declare.
3127         (add_prefix_cmd_suppress_notification): Declare.
3128         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
3129         (parse_frame_specification): Moved from stack.c, with
3130         simplification to handle a single argument.
3131         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
3132         switch to the selected frame.  Add a header comment.
3133         * stack.c: Remove 'safe-ctype.h' include.
3134         (find_frame_for_function): Add declaration.
3135         (find_frame_for_address): New function.
3136         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
3137         (frame_selection_by_function_completer): New function.
3138         (info_frame_command): Rename to...
3139         (info_frame_command_core): ...this, and update parameter types.
3140         (select_frame_command): Rename to...
3141         (select_frame_command_core): ...this, and update parameter types.
3142         (frame_command): Rename to...
3143         (frame_command_core): ...this, and update parameter types.
3144         (class frame_command_helper): New class to wrap implementations of
3145         frame related sub-commands.
3146         (frame_apply_cmd_list): New static global.
3147         (frame_cmd_list): Make static.
3148         (select_frame_cmd_list): New global for sub-commands.
3149         (info_frame_cmd_list): New global for sub-commands.
3150         (_initialize_stack): Register sub-commands for 'frame',
3151         'select-frame', and 'info frame'.  Update 'frame apply' commands
3152         to use frame_apply_cmd_list.  Move function local static
3153         frame_apply_list to file static frame_apply_cmd_list for
3154         consistency.
3155         * stack.h (select_frame_command): Delete declarationn.
3156         (select_frame_for_mi): Declare new function.
3158 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3160         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
3161         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
3162         and NOP.
3164 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
3166         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
3168 2018-09-26  Tom Tromey  <tom@tromey.com>
3170         * valops.c (auto_abandon): Remove dead code.
3172 2018-09-26  Tom Tromey  <tom@tromey.com>
3174         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
3176 2018-09-24  Tom Tromey  <tom@tromey.com>
3178         * common/pathstuff.c (get_standard_cache_dir): Make
3179         "xdg_cache_home" and "home" const.
3180         * top.c (init_history): Make "tmpenv" const.
3181         * main.c (get_init_files): Make "homedir" const.
3183 2018-09-23  Tom Tromey  <tom@tromey.com>
3185         PR python/18852:
3186         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
3188 2018-09-23  Tom Tromey  <tom@tromey.com>
3190         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
3191         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
3192         * python/python-internal.h (gdbpy_handle_exception): Declare.
3193         * python/py-utils.c (gdbpy_handle_exception): New function.
3195 2018-09-23  Tom Tromey  <tom@tromey.com>
3197         PR python/17284:
3198         * python/py-type.c (typy_template_argument): Check for negative
3199         argument number.
3201 2018-09-23  Tom Tromey  <tom@tromey.com>
3203         PR python/14062:
3204         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
3206 2018-09-23  Tom Tromey  <tom@tromey.com>
3208         PR python/18170:
3209         * python/py-value.c (valpy_int): Allow conversion from pointer
3210         type.
3212 2018-09-23  Tom Tromey  <tom@tromey.com>
3214         PR python/20126:
3215         * python/py-value.c (valpy_int): Respect type sign.
3217 2018-09-23  Tom Tromey  <tom@tromey.com>
3219         PR python/18352;
3220         * python/py-value.c (valpy_float): Allow conversions from int or
3221         char.
3222         (valpy_int, valpy_long): Allow conversions from float.
3224 2018-09-23  Tom Tromey  <tom@tromey.com>
3226         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
3227         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
3229 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3231         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
3232         __sighndlr.
3233         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
3235 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
3237         * windows-nat.c (windows_nat_target::wait): Remove a spurious
3238         target_terminal::ours().
3240 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
3242         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
3243         of vl to ULONGEST.
3245 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
3247         * breakpoint.c (update_inserted_breakpoint_locations): Remove
3248         redundant condition.
3250 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3252         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
3254         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
3255         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
3256         * sol-thread.c (ps_pdmodel): Don't guard definition.
3258         * procfs.c: Fix formatting.
3260         * procfs.c (sysset_t_alloc): Remove.
3261         (create_procinfo): Use XNEW instead of sysset_t_alloc.
3262         (procfs_debug_inferior): Likewise.
3263         (procfs_set_exec_trap): Likewise.
3264         (proc_set_traced_sysentry): Don't allocate argp dynamically.
3265         (proc_set_traced_sysexit): Likewise.
3267         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3268         (dead_procinfo): Likewise.
3269         (proc_warn): Likewise.
3270         (proc_error): Likewise.
3271         (proc_get_LDT_entry): Likewise.
3272         (do_attach): Likewise.
3273         (procfs_target::pid_to_str): Likewise.
3274         (iterate_over_mappings): Likewise.
3276         * procfs.c (create_procinfo): Fix ARI warning.
3277         (proc_get_status): Likewise.
3278         (proc_stop_process): Likewise.
3279         (proc_run_process): Likewise.
3280         (proc_kill): Likewise.
3281         (proc_get_LDT_entry): Likewise.
3282         (procfs_find_LDT_entry): Likewise.
3283         (proc_update_threads): Likewise.
3284         (proc_iterate_over_threads): Likewise.
3285         (do_attach): Likewise.
3286         (procfs_xfer_memory): Likewise.
3287         (invalidate_cache): Likewise.
3288         (procfs_target::resume): Likewise.
3289         (procfs_init_inferior): Likewise.
3290         (procfs_set_exec_trap): Likewise.
3291         (procfs_target::thread_alive): Likewise.
3292         (procfs_target::pid_to_exec_file): Likewise.
3293         (iterate_over_mappings): Likewise.
3294         (procfs_target::make_corefile_notes): Likewise.
3295         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3297         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3298         (procfs_find_LDT_entry): Likewise.
3299         * sol-thread.c (ps_lgetLDT): Likewise.
3301 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3303         PR tdep/17903
3304         * procfs.c (procfs_target): Declare pid_to_exec_file.
3305         (procfs_target::pid_to_exec_file): New.
3307 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3309         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3310         renaming.
3311         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3312         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3314 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3316         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3317         (supply_fpregset, fill_fpregset): Move ...
3318         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3319         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3320         Remove references to ioctl-based procfs.
3321         Include <sys/reg.h>.
3322         Remove PR_MODEL_NATIVE guards.
3323         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3324         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3326 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3328         PR gdb/20981:
3329         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3330         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3331         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3333 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3335         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3336         (fbsd_print_sockaddr_in6): Likewise.
3338 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3339             Chris January  <chris.january@arm.com>
3341         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3342         (evaluate_subexp_standard): Return a dummy type when
3343         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3344         OP_F77_UNDETERMINED_ARGLIST case.
3345         * expression.h (enum noside): Update comment.
3347 2018-09-19  George Vasick <george.vasick@oracle.com>
3349         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3351 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3352             April Chin <april.chin@oracle.com>
3353             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3355         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3356         uint_t lwpid_t.
3357         (create_procinfo): Print pids in /proc without leading zeros.
3359 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3361         * nios2-tdep.c (nios2_gcc_target_options): New.
3362         (nios2_gdb_arch_init): Install new hook.
3364 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3366         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3367         New file.
3368         * update-gnulib.sh: Apply patch.
3369         * configure: Re-generate.
3371 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3373         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3374         description.  Make "info proc" command descriptions more
3375         consistent.
3377 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3379         * NEWS: Mention 'info proc files' command.
3381 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3383         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3384         descriptors for IP_FILES and IP_ALL.
3386 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3388         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3389         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3390         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3391         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3392         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3393         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3394         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3395         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3396         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3397         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3398         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3399         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3400         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3401         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3402         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3403         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3404         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3405         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3406         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3407         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3408         (struct fbsd_sockaddr_un): New types.
3409         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3410         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3411         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3412         (fbsd_core_info_proc_files): New functions.
3413         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3414         IP_ALL.
3415         * fbsd-tdep.h (fbsd_info_proc_files_header)
3416         (fbsd_info_proc_files_entry): New.
3418 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3420         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3421         * infcmd.c (info_proc_cmd_files): New function.
3422         (_initialize_infcmd): Register 'info proc files' command.
3424 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3426         * gnulib/aclocal-m4-deps.mk: Re-generate.
3427         * gnulib/aclocal.m4: Re-generate.
3428         * gnulib/config.in: Re-generate.
3429         * gnulib/configure: Re-generate.
3430         * gnulib/import/Makefile.am: Re-generate.
3431         * gnulib/import/Makefile.in: Re-generate.
3432         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3433         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3434         * gnulib/import/arpa_inet.in.h: New file.
3435         * gnulib/import/inet_ntop.c: New file.
3436         * gnulib/import/m4/arpa_inet_h.m4: New file.
3437         * gnulib/import/m4/inet_ntop.m4: New file.
3438         * gnulib/import/m4/netinet_in_h.m4: New file.
3439         * gnulib/import/m4/socklen.m4: New file.
3440         * gnulib/import/m4/sockpfaf.m4: New file.
3441         * gnulib/import/m4/stdalign.m4: New file.
3442         * gnulib/import/m4/sys_uio_h.m4: New file.
3443         * gnulib/import/netinet_in.in.h: New file.
3444         * gnulib/import/stdalign.in.h: New file.
3445         * gnulib/import/sys_socket.c: New file.
3446         * gnulib/import/sys_socket.in.h: New file.
3447         * gnulib/import/sys_uio.in.h: New file.
3448         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3449         module.
3451 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3453         * gnulib/aclocal-m4-deps.mk: New file.
3454         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3455         deterministically.
3457 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3459         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3460         KVE_PATH.
3462 2018-09-18  Tom Tromey  <tom@tromey.com>
3464         * compile/compile-object-load.c (struct
3465         link_hash_table_cleanup_data): Add constructor and destructor.
3466         Use DISABLE_COPY_AND_ASSIGN.
3467         (~link_hash_table_cleanup_data): Rename from
3468         link_hash_table_free.  Now a destructor.
3469         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3471 2018-09-18  Tom Tromey  <tom@tromey.com>
3473         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3474         * compile/compile-object-load.c (struct munmap_list): Move to
3475         header file.
3476         (munmap_list::add): Rename from munmap_list_add; rewrite.
3477         (munmap_list::~munmap_list): Rename from munmap_list_free.
3478         (munmap_listp_free_cleanup): Remove.
3479         (compile_object_load): Update.
3480         * compile/compile-object-load.h (struct munmap_list): Move from
3481         compile-object-load.c.  Rewrite.
3483 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3485         * aarch64-tdep.c (pass_in_v): Use register size.
3486         (aarch64_extract_return_value): Likewise.
3487         (aarch64_store_return_value): Likewise.
3489 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3491         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3492         rlim_t.
3494 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3496         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3497         Fix short help line.
3499 2018-09-17  Tom Tromey  <tom@tromey.com>
3501         PR python/20445:
3502         * configure: Rebuild.
3503         * configure.ac: Conditionally use -DNDEBUG for Python.
3505 2018-09-17  Tom Tromey  <tom@tromey.com>
3507         * configure: Rebuild.
3508         * configure.ac: Use gmp as a library dependency when checking for
3509         mpfr.
3511 2018-09-17  Pedro Alves  <palves@redhat.com>
3513         * python/py-inferior.c (find_inferior_object): Delete.
3515 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3517         * compile/compile-cplus-types.c
3518         (compile_cplus_instance::enter_scope): Don't use new_scope after
3519         std::move.
3521 2018-09-17  Tom Tromey  <tom@tromey.com>
3523         * common/pathstuff.c (get_standard_cache_dir): Use
3524         ~/Library/Caches on macOS.
3525         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3527 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3529         PR python/23669
3530         * breakpoint.c (commands_cmd_element): New.
3531         (_initialize_breakpoint): Assign commands_cmd_element.
3532         * breakpoint.h (commands_cmd_element): New.
3533         * cli/cli-script.c (while_cmd_element, if_command,
3534         define_cmd_element): New.
3535         (command_name_equals): Remove.
3536         (process_next_line): Compare commands by pointer, not by name.
3537         (_initialize_cli_script): Assign the various cmd_list_element
3538         variables.
3539         * compile/compile.c (compile_cmd_element): New.
3540         (_initialize_compile): Assign compile_cmd_element.
3541         * compile/compile.h (compile_cmd_element): New.
3542         * guile/guile.c (guile_cmd_element): New.
3543         (install_gdb_commands): Assign guile_cmd_element.
3544         * guile/guile.h (guile_cmd_element): New.
3545         * python/python.c (python_cmd_element): New.
3546         (_initialize_python): Assign python_cmd_element.
3547         * python/python.h (python_cmd_element): New.
3548         * tracepoint.c (while_stepping_cmd_element): New.
3549         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3550         * tracepoint.h (while_stepping_cmd_element): New.
3552 2018-09-17  Tom Tromey  <tom@tromey.com>
3554         * infrun.c (save_infcall_suspend_state): Return
3555         infcall_suspend_state_up.
3556         (save_infcall_control_state): Return infcall_control_state_up.
3557         * inferior.h (save_infcall_suspend_state)
3558         (save_infcall_control_state): Declare later.  Return unique
3559         pointers.
3561 2018-09-17  Tom Tromey  <tom@tromey.com>
3563         * infrun.c (struct stop_context): Declare constructor,
3564         destructor, "changed" method.
3565         (stop_context::stop_context): Rename from save_stop_context.
3566         (stop_context::~stop_context): Rename from
3567         release_stop_context_cleanup.
3568         (normal_stop): Update.
3569         (stop_context::changed): Rename from stop_context_changed.  Return
3570         bool.
3572 2018-09-17  Tom Tromey  <tom@tromey.com>
3574         * inferior.h (struct infcall_suspend_state_deleter): New.
3575         (infcall_suspend_state_up): New typedef.
3576         (struct infcall_control_state_deleter): New.
3577         (infcall_control_state_up): New typedef.
3578         (make_cleanup_restore_infcall_suspend_state)
3579         (make_cleanup_restore_infcall_control_state): Don't declare.
3580         * infcall.c (call_function_by_hand_dummy): Update.
3581         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3582         (make_cleanup_restore_infcall_suspend_state): Remove.
3583         (do_restore_infcall_control_state_cleanup)
3584         (make_cleanup_restore_infcall_control_state): Remove.
3586 2018-09-17  Tom Tromey  <tom@tromey.com>
3588         * gdbthread.h (struct thread_control_state): Add initializer.
3589         (class thread_info) <control>: Remove initializer.
3590         * inferior.h (struct inferior_control_state): Add initializer.
3591         (class inferior) <control>: Remove initializer.
3592         (exit_inferior_1): Update.
3593         * infrun.c (struct infcall_control_state): Add constructors.
3594         (save_infcall_control_state): Use new.
3595         (restore_infcall_control_state, discard_infcall_control_state):
3596         Use delete.
3598 2018-09-17  Tom Tromey  <tom@tromey.com>
3600         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3601         unique_ptr.
3602         <siginfo_data>: Now a unique_xmalloc_ptr.
3603         (save_infcall_suspend_state, restore_infcall_suspend_state)
3604         (discard_infcall_suspend_state)
3605         (get_infcall_suspend_state_regcache): Update.
3607 2018-09-17  Tom Tromey  <tom@tromey.com>
3609         * gdbthread.h (struct thread_suspend_state): Add initializers.
3610         (class thread_info) <suspend>: Remove initializer.
3611         * infrun.c (struct infcall_suspend_state): Add initializers.
3612         (save_infcall_suspend_state): Use new.
3613         (discard_infcall_suspend_state): Use delete.
3615 2018-09-16  Tom Tromey  <tom@tromey.com>
3617         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3618         Remove.
3619         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3620         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3621         (py_varobj_iter_new): Likewise.
3622         (py_varobj_get_iterator): Use gdbpy_ref.
3624 2018-09-16  Tom Tromey  <tom@tromey.com>
3626         * python/py-threadevent.c (py_get_event_thread): Simplify.
3627         * python/py-inferior.c (infpy_thread_from_thread_handle):
3628         Return immediately after calling thread_to_thread_object.  Use
3629         Py_RETURN_NONE.
3630         (thread_to_thread_object): Set the exception on a NULL return.
3632 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3634         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3636 2018-09-16  Tom Tromey  <tom@tromey.com>
3638         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3639         Remove.
3641 2018-09-16  Tom Tromey  <tom@tromey.com>
3643         * python/python-internal.h (thread_to_thread_object): Change
3644         return type.
3645         * python/py-inferior.c (thread_to_thread_object): Return a new
3646         reference.
3647         (infpy_thread_from_thread_handle): Update.
3648         * python/py-infthread.c (gdbpy_selected_thread): Update.
3649         * python/py-stopevent.c (create_stop_event_object): Update.
3650         * python/py-threadevent.c (py_get_event_thread): Return a new
3651         reference.
3652         (py_get_event_thread): Update.
3653         * python/py-event.h (py_get_event_thread): Change return type.
3654         * python/py-continueevent.c (create_continue_event_object):
3655         Update.
3657 2018-09-16  Tom Tromey  <tom@tromey.com>
3659         * python/py-progspace.c (pspy_get_objfiles): Update.
3660         * python/python-internal.h (objfile_to_objfile_object): Change
3661         return type.
3662         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3663         Update.
3664         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3665         Update.
3666         * python/python.c (gdbpy_get_current_objfile): Update.
3667         (gdbpy_objfiles): Update.
3668         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3669         Update.
3670         (objfile_to_objfile_object): Return a new reference.
3671         * python/py-symtab.c (stpy_get_objfile): Update.
3672         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3673         Update.
3675 2018-09-16  Tom Tromey  <tom@tromey.com>
3677         * python/py-inferior.c (infpy_get_progspace): Update.
3678         * python/python-internal.h (pspace_to_pspace_object): Change
3679         return type.
3680         * python/py-newobjfileevent.c
3681         (create_clear_objfiles_event_object): Update.
3682         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3683         Update.
3684         * python/python.c (gdbpy_get_current_progspace): Update.
3685         (gdbpy_progspaces): Update.
3686         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3687         reference.
3688         * python/py-objfile.c (objfpy_get_progspace): Update.
3689         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3690         Update.
3692 2018-09-16  Tom Tromey  <tom@tromey.com>
3694         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3695         (solib_name, block_for_pc, find_pc_line): New functions.
3696         (execute_unwinders): Update.
3697         * python/py-block.c (gdbpy_block_for_pc): Remove.
3698         * python/py-inferior.c (infpy_get_progspace): New function.
3699         (inferior_object_getset) <progspace>: Add.
3700         * python/py-progspace.c (pspy_objfiles): Rewrite.
3701         (pspy_solib_name, pspy_block_for_pc)
3702         (pspy_find_pc_line, pspy_is_valid): New functions.
3703         (progspace_object_methods): Add entries for solib_name,
3704         block_for_pc, find_pc_line, is_valid.
3705         * python/python-internal.h (gdbpy_block_for_pc)
3706         (build_objfiles_list): Don't declare.
3707         * python/python.c: Don't include solib.h.
3708         (gdbpy_solib_name, gdbpy_find_pc_line)
3709         (gdbpy_get_current_progspace, build_objfiles_list)
3710         (gdbpy_objfiles): Remove.
3711         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3712         solib_name, find_pc_line>: Remove entries.
3714 2018-09-16  Tom Tromey  <tom@tromey.com>
3716         * top.c (new_ui_command): Use GNU style for metasyntactic
3717         variables.
3718         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3719         variables.
3720         * maint.c (maintenance_translate_address): Remove "<>" around
3721         text.
3722         * interps.c (interpreter_exec_cmd): Use GNU style for
3723         metasyntactic variables.
3724         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3725         metasyntactic variables.
3726         * tracepoint.c (tfind_range_command): Use GNU style for
3727         metasyntactic variables.
3728         (tfind_outside_command): Likewise.
3729         (_initialize_tracepoint): Likewise.
3730         * remote.c (extended_remote_target::create_inferior): Use GNU
3731         style for metasyntactic variables.
3732         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3733         metasyntactic variables.
3734         (adi_assign_command): Likewise.
3736 2018-09-16  Tom Tromey  <tom@tromey.com>
3738         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3739         metasyntactic variables.  Print message if no disassembler options
3740         are available.
3742 2018-09-15  Tom Tromey  <tom@tromey.com>
3744         * infcmd.c (get_inferior_args): Return const char *.
3745         * inferior.h (get_inferior_args): Return type now const.
3746         * linux-tdep.c (linux_fill_prpsinfo): Update.
3747         * procfs.c (procfs_target::make_corefile_notes): Update.
3749 2018-09-07  Tom Tromey  <tom@tromey.com>
3751         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3752         inside the TRY.
3754 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3756         * nios2-tdep.c (nios2_type_align): New.
3757         (nios2_gdb_arch_init): Install type_align hook.
3759 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3761         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3762         type that is neither object file owned, nor gdbarch owned.
3763         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3764         gdbarch is non-NULL.
3765         (alloc_type_instance): Allocate non-objfile owned types on the
3766         gdbarch obstack.
3767         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3768         using TYPE_ALLOC to ensure memory is allocated on the correct
3769         obstack.
3770         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3771         obstack, or the gdbarch obstack.
3772         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3774 2018-09-14  Tom Tromey  <tom@tromey.com>
3776         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3777         block.
3779 2018-09-14  Tom Tromey  <tom@tromey.com>
3781         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3783 2018-09-13  Tom Tromey  <tom@tromey.com>
3785         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3786         static.
3788 2018-09-13  Tom Tromey  <tom@tromey.com>
3790         * exec.c (try_open_exec_file): Use std::string.
3792 2018-09-13  Tom Tromey  <tom@tromey.com>
3794         * utils.h (gdb_bfd_errmsg): Return std::string.
3795         * exec.c (exec_file_attach): Update.
3796         * compile/compile-object-load.c (compile_object_load): Update.
3797         * utils.c (gdb_bfd_errmsg): Return std::string.
3799 2018-09-13  Tom Tromey  <tom@tromey.com>
3801         * procfs.c (struct procinfo_deleter): New.
3802         (procinfo_up): New typedef.
3803         (do_destroy_procinfo_cleanup): Remove.
3804         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3806 2018-09-13  Tom Tromey  <tom@tromey.com>
3808         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3810 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3811 2018-09-13  Tom Tromey  <tom@tromey.com>
3813         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3814         (pspy_get_objfiles): New function.
3815         (progspace_object_methods): New.
3816         (pspace_object_type): Add tp_methods callback.
3817         * python/python-internal.h (build_objfiles_list): New
3818         declaration.
3819         * python/python.c (build_objfiles_list): New function.
3820         (gdbpy_objfiles): Implement using build_objfiles_list.
3821         * NEWS: Mention the Progspace.objfiles method.
3823 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3825         * python/py-inferior.c (infpy_get_progspace): New function.
3826         (inferior_object_getset): Add progspace property.
3827         * NEWS: Mention the new property.
3829 2018-09-13  Tom Tromey  <tom@tromey.com>
3831         PR rust/23650:
3832         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3834 2018-09-13  Tom Tromey  <tom@tromey.com>
3836         PR rust/23626:
3837         * rust-lang.c (rust_enum_variant): Now static.
3838         (rust_empty_enum_p): New function.
3839         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3840         Handle empty enum.
3842 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3844         * python/py-inferior.c (infpy_repr): New.
3845         (inferior_object_type): Register infpy_repr.
3846         * python/py-objfile.c (objfpy_repr): New.
3847         (objfile_object_type): Register objfpy_repr.
3849 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3851         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3853 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3855         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3856         typo.
3858 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3860         * common/common-utils.c: Don't include '<sys/stat.h>'.
3861         (is_regular_file): Move to...
3862         * common/filestuff.c (is_regular_file): ... here.
3863         * common/common-utils.h (is_regular_file): Move to...
3864         * common/filestuff.h (is_regular_file): ... here.
3866 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3868         * skip.c (debug_skip): New variable.
3869         (skiplist_entry::do_skip_file_p): Add debug output.
3870         (skiplist_entry::do_skip_gfile_p): Likewise.
3871         (skiplist_entry::skip_function_p): Likewise.
3872         (_initialize_step_skip): Create debug command.
3873         * NEWS: Mention set/show debug skip.
3875 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3877         * darwin-nat.c (should_disable_startup_with_shell):
3878         New function.
3879         (darwin_nat_target::create_inferior): Add call.
3881 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3883         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3884         inf_port, msg_state>: Initialize.
3885         (struct darwin_thread_info) <signaled, single_step>: Change
3886         type and initialize.
3887         (struct darwin_thread_info) <event>: Initialize.
3889 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3891         PR gdb/23555
3892         PR gdb/23558
3893         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3894         guesses.
3896 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3898         Revert:
3899         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3901         PR gdb/23555
3902         PR gdb/23558
3903         * gnulib/aclocal.m4: Regenerate.
3904         * gnulib/config.in: Regenerate.
3905         * gnulib/configure: Regenerate.
3906         * gnulib/import/Makefile.am: Update.
3907         * gnulib/import/Makefile.in: Update.
3908         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3909         * gnulib/import/_Noreturn.h: ... this.
3910         * gnulib/import/alloca.in.h: Update.
3911         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3912         * gnulib/import/arg-nonnull.h: ... this.
3913         * gnulib/import/assure.h: Update.
3914         * gnulib/import/at-func.c: Update.
3915         * gnulib/import/basename-lgpl.c: Update.
3916         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3917         * gnulib/import/c++defs.h: ... this.
3918         * gnulib/import/canonicalize-lgpl.c: Update.
3919         * gnulib/import/cdefs.h: Update.
3920         * gnulib/import/chdir-long.c: Update.
3921         * gnulib/import/chdir-long.h: Update.
3922         * gnulib/import/cloexec.c: Update.
3923         * gnulib/import/cloexec.h: Update.
3924         * gnulib/import/close.c: Update.
3925         * gnulib/import/closedir.c: Update.
3926         * gnulib/import/config.charset: Update.
3927         * gnulib/import/dirent-private.h: Update.
3928         * gnulib/import/dirent.in.h: Update.
3929         * gnulib/import/dirfd.c: Update.
3930         * gnulib/import/dirname-lgpl.c: Update.
3931         * gnulib/import/dirname.h: Update.
3932         * gnulib/import/dosname.h: Update.
3933         * gnulib/import/dup-safer-flag.c: Update.
3934         * gnulib/import/dup-safer.c: Update.
3935         * gnulib/import/dup.c: Update.
3936         * gnulib/import/dup2.c: Update.
3937         * gnulib/import/errno.in.h: Update.
3938         * gnulib/import/error.c: Update.
3939         * gnulib/import/error.h: Update.
3940         * gnulib/import/exitfail.c: Update.
3941         * gnulib/import/exitfail.h: Update.
3942         * gnulib/import/extra/update-copyright: Update.
3943         * gnulib/import/fchdir.c: Update.
3944         * gnulib/import/fcntl.c: Update.
3945         * gnulib/import/fcntl.in.h: Update.
3946         * gnulib/import/fd-hook.c: Update.
3947         * gnulib/import/fd-hook.h: Update.
3948         * gnulib/import/fd-safer-flag.c: Update.
3949         * gnulib/import/fd-safer.c: Update.
3950         * gnulib/import/fdopendir.c: Update.
3951         * gnulib/import/filename.h: Update.
3952         * gnulib/import/filenamecat-lgpl.c: Update.
3953         * gnulib/import/filenamecat.h: Update.
3954         * gnulib/import/flexmember.h: Update.
3955         * gnulib/import/float+.h: Update.
3956         * gnulib/import/float.c: Update.
3957         * gnulib/import/float.in.h: Update.
3958         * gnulib/import/fnmatch.c: Update.
3959         * gnulib/import/fnmatch.in.h: Update.
3960         * gnulib/import/fnmatch_loop.c: Update.
3961         * gnulib/import/fpucw.h: Update.
3962         * gnulib/import/frexp.c: Update.
3963         * gnulib/import/frexpl.c: Update.
3964         * gnulib/import/fstat.c: Update.
3965         * gnulib/import/fstatat.c: Update.
3966         * gnulib/import/getcwd-lgpl.c: Update.
3967         * gnulib/import/getcwd.c: Update.
3968         * gnulib/import/getdtablesize.c: Update.
3969         * gnulib/import/getlogin_r.c: Update.
3970         * gnulib/import/getprogname.c: Update.
3971         * gnulib/import/getprogname.h: Update.
3972         * gnulib/import/gettext.h: Update.
3973         * gnulib/import/gettimeofday.c: Update.
3974         * gnulib/import/glob-libc.h: Update.
3975         * gnulib/import/glob.c: Update.
3976         * gnulib/import/glob.in.h: Update.
3977         * gnulib/import/glob_internal.h: Update.
3978         * gnulib/import/glob_pattern_p.c: Update.
3979         * gnulib/import/globfree.c: Update.
3980         * gnulib/import/hard-locale.c: Update.
3981         * gnulib/import/hard-locale.h: Update.
3982         * gnulib/import/intprops.h: Update.
3983         * gnulib/import/inttypes.in.h: Update.
3984         * gnulib/import/isnan.c: Update.
3985         * gnulib/import/isnand-nolibm.h: Update.
3986         * gnulib/import/isnand.c: Update.
3987         * gnulib/import/isnanl-nolibm.h: Update.
3988         * gnulib/import/isnanl.c: Update.
3989         * gnulib/import/itold.c: Update.
3990         * gnulib/import/libc-config.h: Update.
3991         * gnulib/import/limits.in.h: Update.
3992         * gnulib/import/localcharset.c: Update.
3993         * gnulib/import/localcharset.h: Update.
3994         * gnulib/import/localtime-buffer.c: Update.
3995         * gnulib/import/localtime-buffer.h: Update.
3996         * gnulib/import/lstat.c: Update.
3997         * gnulib/import/m4/00gnulib.m4: Update.
3998         * gnulib/import/m4/__inline.m4: Update.
3999         * gnulib/import/m4/absolute-header.m4: Update.
4000         * gnulib/import/m4/alloca.m4: Update.
4001         * gnulib/import/m4/builtin-expect.m4: Update.
4002         * gnulib/import/m4/canonicalize.m4: Update.
4003         * gnulib/import/m4/chdir-long.m4: Update.
4004         * gnulib/import/m4/close.m4: Update.
4005         * gnulib/import/m4/closedir.m4: Update.
4006         * gnulib/import/m4/configmake.m4: Update.
4007         * gnulib/import/m4/d-ino.m4: Update.
4008         * gnulib/import/m4/d-type.m4: Update.
4009         * gnulib/import/m4/dirent_h.m4: Update.
4010         * gnulib/import/m4/dirfd.m4: Update.
4011         * gnulib/import/m4/dirname.m4: Update.
4012         * gnulib/import/m4/double-slash-root.m4: Update.
4013         * gnulib/import/m4/dup.m4: Update.
4014         * gnulib/import/m4/dup2.m4: Update.
4015         * gnulib/import/m4/eealloc.m4: Update.
4016         * gnulib/import/m4/environ.m4: Update.
4017         * gnulib/import/m4/errno_h.m4: Update.
4018         * gnulib/import/m4/error.m4: Update.
4019         * gnulib/import/m4/exponentd.m4: Update.
4020         * gnulib/import/m4/exponentl.m4: Update.
4021         * gnulib/import/m4/extensions.m4: Update.
4022         * gnulib/import/m4/extern-inline.m4: Update.
4023         * gnulib/import/m4/fchdir.m4: Update.
4024         * gnulib/import/m4/fcntl-o.m4: Update.
4025         * gnulib/import/m4/fcntl.m4: Update.
4026         * gnulib/import/m4/fcntl_h.m4: Update.
4027         * gnulib/import/m4/fdopendir.m4: Update.
4028         * gnulib/import/m4/filenamecat.m4: Update.
4029         * gnulib/import/m4/flexmember.m4: Update.
4030         * gnulib/import/m4/float_h.m4: Update.
4031         * gnulib/import/m4/fnmatch.m4: Update.
4032         * gnulib/import/m4/fnmatch_h.m4: Update.
4033         * gnulib/import/m4/fpieee.m4: Update.
4034         * gnulib/import/m4/frexp.m4: Update.
4035         * gnulib/import/m4/frexpl.m4: Update.
4036         * gnulib/import/m4/fstat.m4: Update.
4037         * gnulib/import/m4/fstatat.m4: Update.
4038         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4039         * gnulib/import/m4/getcwd-path-max.m4: Update.
4040         * gnulib/import/m4/getcwd.m4: Update.
4041         * gnulib/import/m4/getdtablesize.m4: Update.
4042         * gnulib/import/m4/getlogin.m4: Update.
4043         * gnulib/import/m4/getlogin_r.m4: Update.
4044         * gnulib/import/m4/getpagesize.m4: Update.
4045         * gnulib/import/m4/getprogname.m4: Update.
4046         * gnulib/import/m4/gettimeofday.m4: Update.
4047         * gnulib/import/m4/glibc21.m4: Update.
4048         * gnulib/import/m4/glob.m4: Update.
4049         * gnulib/import/m4/glob_h.m4: Update.
4050         * gnulib/import/m4/gnulib-cache.m4: Update.
4051         * gnulib/import/m4/gnulib-common.m4: Update.
4052         * gnulib/import/m4/gnulib-comp.m4: Update.
4053         * gnulib/import/m4/gnulib-tool.m4: Update.
4054         * gnulib/import/m4/hard-locale.m4: Update.
4055         * gnulib/import/m4/include_next.m4: Update.
4056         * gnulib/import/m4/inttypes-pri.m4: Update.
4057         * gnulib/import/m4/inttypes.m4: Update.
4058         * gnulib/import/m4/isnand.m4: Update.
4059         * gnulib/import/m4/isnanl.m4: Update.
4060         * gnulib/import/m4/largefile.m4: Update.
4061         * gnulib/import/m4/limits-h.m4: Update.
4062         * gnulib/import/m4/localcharset.m4: Update.
4063         * gnulib/import/m4/locale-fr.m4: Update.
4064         * gnulib/import/m4/locale-ja.m4: Update.
4065         * gnulib/import/m4/locale-zh.m4: Update.
4066         * gnulib/import/m4/localtime-buffer.m4: Update.
4067         * gnulib/import/m4/longlong.m4: Update.
4068         * gnulib/import/m4/lstat.m4: Update.
4069         * gnulib/import/m4/malloc.m4: Update.
4070         * gnulib/import/m4/malloca.m4: Update.
4071         * gnulib/import/m4/math_h.m4: Update.
4072         * gnulib/import/m4/mbrtowc.m4: Update.
4073         * gnulib/import/m4/mbsinit.m4: Update.
4074         * gnulib/import/m4/mbsrtowcs.m4: Update.
4075         * gnulib/import/m4/mbstate_t.m4: Update.
4076         * gnulib/import/m4/memchr.m4: Update.
4077         * gnulib/import/m4/memmem.m4: Update.
4078         * gnulib/import/m4/mempcpy.m4: Update.
4079         * gnulib/import/m4/memrchr.m4: Update.
4080         * gnulib/import/m4/mkdir.m4: Update.
4081         * gnulib/import/m4/mkstemp.m4: Update.
4082         * gnulib/import/m4/mmap-anon.m4: Update.
4083         * gnulib/import/m4/mode_t.m4: Update.
4084         * gnulib/import/m4/msvc-inval.m4: Update.
4085         * gnulib/import/m4/msvc-nothrow.m4: Update.
4086         * gnulib/import/m4/multiarch.m4: Update.
4087         * gnulib/import/m4/nocrash.m4: Update.
4088         * gnulib/import/m4/off_t.m4: Update.
4089         * gnulib/import/m4/onceonly.m4: Update.
4090         * gnulib/import/m4/open-cloexec.m4: Update.
4091         * gnulib/import/m4/open.m4: Update.
4092         * gnulib/import/m4/openat.m4: Update.
4093         * gnulib/import/m4/opendir.m4: Update.
4094         * gnulib/import/m4/pathmax.m4: Update.
4095         * gnulib/import/m4/rawmemchr.m4: Update.
4096         * gnulib/import/m4/readdir.m4: Update.
4097         * gnulib/import/m4/readlink.m4: Update.
4098         * gnulib/import/m4/realloc.m4: Update.
4099         * gnulib/import/m4/rename.m4: Update.
4100         * gnulib/import/m4/rewinddir.m4: Update.
4101         * gnulib/import/m4/rmdir.m4: Update.
4102         * gnulib/import/m4/save-cwd.m4: Update.
4103         * gnulib/import/m4/secure_getenv.m4: Update.
4104         * gnulib/import/m4/setenv.m4: Update.
4105         * gnulib/import/m4/signal_h.m4: Update.
4106         * gnulib/import/m4/ssize_t.m4: Update.
4107         * gnulib/import/m4/stat-time.m4: Update.
4108         * gnulib/import/m4/stat.m4: Update.
4109         * gnulib/import/m4/std-gnu11.m4: Update.
4110         * gnulib/import/m4/stdbool.m4: Update.
4111         * gnulib/import/m4/stddef_h.m4: Update.
4112         * gnulib/import/m4/stdint.m4: Update.
4113         * gnulib/import/m4/stdio_h.m4: Update.
4114         * gnulib/import/m4/stdlib_h.m4: Update.
4115         * gnulib/import/m4/strchrnul.m4: Update.
4116         * gnulib/import/m4/strdup.m4: Update.
4117         * gnulib/import/m4/strerror.m4: Update.
4118         * gnulib/import/m4/string_h.m4: Update.
4119         * gnulib/import/m4/strstr.m4: Update.
4120         * gnulib/import/m4/strtok_r.m4: Update.
4121         * gnulib/import/m4/sys_socket_h.m4: Update.
4122         * gnulib/import/m4/sys_stat_h.m4: Update.
4123         * gnulib/import/m4/sys_time_h.m4: Update.
4124         * gnulib/import/m4/sys_types_h.m4: Update.
4125         * gnulib/import/m4/tempname.m4: Update.
4126         * gnulib/import/m4/time_h.m4: Update.
4127         * gnulib/import/m4/unistd-safer.m4: Update.
4128         * gnulib/import/m4/unistd_h.m4: Update.
4129         * gnulib/import/m4/warn-on-use.m4: Update.
4130         * gnulib/import/m4/wchar_h.m4: Update.
4131         * gnulib/import/m4/wchar_t.m4: Update.
4132         * gnulib/import/m4/wctype_h.m4: Update.
4133         * gnulib/import/m4/wint_t.m4: Update.
4134         * gnulib/import/malloc.c: Update.
4135         * gnulib/import/malloc/scratch_buffer.h: Update.
4136         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4137         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4138         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4139         * gnulib/import/malloca.c: Update.
4140         * gnulib/import/malloca.h: Update.
4141         * gnulib/import/malloca.valgrind: Update.
4142         * gnulib/import/math.in.h: Update.
4143         * gnulib/import/mbrtowc.c: Update.
4144         * gnulib/import/mbsinit.c: Update.
4145         * gnulib/import/mbsrtowcs-impl.h: Update.
4146         * gnulib/import/mbsrtowcs-state.c: Update.
4147         * gnulib/import/mbsrtowcs.c: Update.
4148         * gnulib/import/memchr.c: Update.
4149         * gnulib/import/memmem.c: Update.
4150         * gnulib/import/mempcpy.c: Update.
4151         * gnulib/import/memrchr.c: Update.
4152         * gnulib/import/mkdir.c: Update.
4153         * gnulib/import/mkstemp.c: Update.
4154         * gnulib/import/msvc-inval.c: Update.
4155         * gnulib/import/msvc-inval.h: Update.
4156         * gnulib/import/msvc-nothrow.c: Update.
4157         * gnulib/import/msvc-nothrow.h: Update.
4158         * gnulib/import/open.c: Update.
4159         * gnulib/import/openat-die.c: Update.
4160         * gnulib/import/openat-priv.h: Update.
4161         * gnulib/import/openat-proc.c: Update.
4162         * gnulib/import/openat.c: Update.
4163         * gnulib/import/openat.h: Update.
4164         * gnulib/import/opendir.c: Update.
4165         * gnulib/import/pathmax.h: Update.
4166         * gnulib/import/pipe-safer.c: Update.
4167         * gnulib/import/rawmemchr.c: Update.
4168         * gnulib/import/readdir.c: Update.
4169         * gnulib/import/readlink.c: Update.
4170         * gnulib/import/realloc.c: Update.
4171         * gnulib/import/ref-add.sin: Update.
4172         * gnulib/import/ref-del.sin: Update.
4173         * gnulib/import/rename.c: Update.
4174         * gnulib/import/rewinddir.c: Update.
4175         * gnulib/import/rmdir.c: Update.
4176         * gnulib/import/same-inode.h: Update.
4177         * gnulib/import/save-cwd.c: Update.
4178         * gnulib/import/save-cwd.h: Update.
4179         * gnulib/import/scratch_buffer.h: Update.
4180         * gnulib/import/secure_getenv.c: Update.
4181         * gnulib/import/setenv.c: Update.
4182         * gnulib/import/signal.in.h: Update.
4183         * gnulib/import/stat-time.c: Update.
4184         * gnulib/import/stat-time.h: Update.
4185         * gnulib/import/stat-w32.c: Update.
4186         * gnulib/import/stat-w32.h: Update.
4187         * gnulib/import/stat.c: Update.
4188         * gnulib/import/stdbool.in.h: Update.
4189         * gnulib/import/stddef.in.h: Update.
4190         * gnulib/import/stdint.in.h: Update.
4191         * gnulib/import/stdio.in.h: Update.
4192         * gnulib/import/stdlib.in.h: Update.
4193         * gnulib/import/str-two-way.h: Update.
4194         * gnulib/import/strchrnul.c: Update.
4195         * gnulib/import/strdup.c: Update.
4196         * gnulib/import/streq.h: Update.
4197         * gnulib/import/strerror-override.c: Update.
4198         * gnulib/import/strerror-override.h: Update.
4199         * gnulib/import/strerror.c: Update.
4200         * gnulib/import/string.in.h: Update.
4201         * gnulib/import/stripslash.c: Update.
4202         * gnulib/import/strnlen1.c: Update.
4203         * gnulib/import/strnlen1.h: Update.
4204         * gnulib/import/strstr.c: Update.
4205         * gnulib/import/strtok_r.c: Update.
4206         * gnulib/import/sys_stat.in.h: Update.
4207         * gnulib/import/sys_time.in.h: Update.
4208         * gnulib/import/sys_types.in.h: Update.
4209         * gnulib/import/tempname.c: Update.
4210         * gnulib/import/tempname.h: Update.
4211         * gnulib/import/time.in.h: Update.
4212         * gnulib/import/unistd--.h: Update.
4213         * gnulib/import/unistd-safer.h: Update.
4214         * gnulib/import/unistd.in.h: Update.
4215         * gnulib/import/unsetenv.c: Update.
4216         * gnulib/import/verify.h: Update.
4217         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4218         * gnulib/import/wchar.in.h: Update.
4219         * gnulib/import/wctype.in.h: Update.
4220         * gnulib/import/xalloc-oversized.h: Update.
4221         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4222         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4224 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
4226         * record-btrace.c (get_thread_current_frame): Remove
4227         old_inferior_ptid.
4229 2018-09-10  Jerome Guitton  <guitton@adacore.com>
4231         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
4232         with check_tag to 1 if and only if the type is tagged and the
4233         component being searched cannot been found in the current
4234         view. Otherwise, always call ada_to_fixed_type with
4235         check_tag to 0.
4237 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4239         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
4240         declaration.
4241         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
4242         * ada-varobj.c (ada_varobj_get_number_of_children,
4243         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
4245 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4247         * ada-valprint.c (ada_value_print): Use type instead of
4248         enclosing type.
4250 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4252         * ada-lang.c (ada_value_subscript): Handle case when parameter is
4253         an array of access to unconstrained array.
4255 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4257         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4258         (ada_check_typedef): Use it.
4260 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4262         * ada-varobj.c (ada_varobj_describe_struct_child)
4263         (ada_varobj_describe_child): Handle union case like struct one.
4265 2018-09-10  Tom Tromey  <tom@tromey.com>
4267         PR python/18380:
4268         * python/python.c (_initialize_python): Make example in "python"
4269         help work in Python 3.
4271 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
4273         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4274         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
4275         $(EXEEXT) to the script, as it is not a program.
4277 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4279         * python/py-prettyprint.c (pretty_print_one_value): Return
4280         gdbpy_ref<>.
4281         (print_string_repr): Adjust.
4282         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4283         * python/python-internal.h (apply_varobj_pretty_printer): Return
4284         gdbpy_ref<>.
4285         * varobj.c (varobj_value_get_print_value): Adjust.
4287 2018-09-08  Tom Tromey  <tom@tromey.com>
4289         PR python/16047:
4290         * python/py-prettyprint.c (pretty_print_one_value): Check for
4291         to_string method.
4293 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4295         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4296         replace_operator_with_call.
4298 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4300         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4302 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4304         * ada-typeprint.c (print_range): Print the bounds using TYPE
4305         rather than its TYPE_TARGET_TYPE.
4307 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4309         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4310         call to ada_to_fixed_value_create.
4312 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4314         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4316 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4318         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4319         by calls to error.
4321 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4323         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4324         Move update of loop variable "fi".
4326 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4328         * ada-lang.c (value_assign_to_component): In the case of
4329         big-endian targets, extract the bits of the given VAL
4330         using an src_offset of zero if container is not a scalar.
4332 2018-09-06  Simon Ser  <contact@emersion.fr>
4334         PR gdb/23105
4335         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4336         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4337         * fbsd-tdep.c (fbsd_make_note_desc): New.
4338         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4339         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4340         * target.h (enum target_object) Add FreeBSD-specific
4341         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4343 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4345         * compile/compile-c.h (generate_c_for_variable_locations):
4346         Change reference to pointer.
4347         * compile/compile-c-support.c (compile_program) <compute>:
4348         Likewise.
4349         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4350         (generate_c_for_for_one_variable): Likewise
4351         (generate_c_for_variable_locations): Likewise
4352         * compile/compile-c-types.c (compile_c_instance::convert_type):
4353         Likewise
4354         * compile/compile-cplus-symbols.c (convert_one_symbol):
4355         std::move the scope passed to enter_scope.
4356         * compile/compile-cplus-types.c
4357         (compile_cplus_instance::enter_scope): Make parameter
4358         rvalue-reference.
4359         (compile_cplus_instance::new_scope): Change reference to
4360         pointer.
4361         (compile_cplus_instance::convert_type): Likewise
4362         (compile_cplus_convert_typedef): std::move the scope passed to
4363         enter_scope.
4364         (compile_cplus_convert_struct_or_union): Likewise.
4365         (compile_cplus_convert_enum): Likewise.
4366         (compile_cplus_convert_namespace): Likewise.
4367         * compile/compile-cplus.h (compile_cplus_instance)
4368         <enter_scope>: Make parameter rvalue-reference.
4369         * compile/compile-internal.h (compile_instance)
4370         <get_cached_type>: Likewise
4371         * compile/compile-loc2c.c (push): Likewise
4372         (pushf): Likewise
4373         (unary): Likewise
4374         (binary): Likewise
4375         (print_label): Likewise
4376         (pushf_register_address): Likewise
4377         (pushf_register): Likewise
4378         (do_compile_dwarf_expr_to_c): Likewise
4379         (compile_dwarf_expr_to_c): Likewise
4380         (compile_dwarf_bounds_to_c): Likewise
4381         * compile/compile.c (compile_instance::get_cached_type):
4382         Likewise
4383         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4384         (compile_dwarf_bounds_to_c): Likewise
4385         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4386         (dwarf2_compile_property_to_c): Likewise
4387         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4388         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4389         Likewise
4391 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4393         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4394         * tui/tui-data.c (init_content_element): Don't initialize it.
4396 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4398         * tui/tui-data.h (struct tui_win_info)
4399         <detail::opaque>: Remove.
4400         * tui/tui-data.c (init_win_info): Remove assignment.
4402 2018-09-05  Tom Tromey  <tom@tromey.com>
4404         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4405         -Wformat-nonliteral.
4406         * target-float.c (host_float_ops<T>::to_string)
4407         (host_float_ops<T>::from_string): Use
4408         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4409         * configure: Rebuild.
4411 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4413         * printcmd.c (printf_c_string): Use
4414         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4415         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4417 2018-09-05  Tom Tromey  <tom@tromey.com>
4419         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4421 2018-09-05  Tom de Vries  <tdevries@suse.de>
4423         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4424         with resolve_abstract_p == true.
4425         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4426         defaulting to false. Propagate resolve_abstract_p to
4427         dwarf2_fetch_die_loc_sect_off.
4428         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4429         parameter, defaulting to false.
4430         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4431         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4432         parameter.
4433         * dwarf2read.h (struct die_info): Forward-declare.
4434         (die_info_ptr): New typedef.
4435         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4437 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4439         GDB 8.2 released.
4441 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4442             Pedro Alves  <palves@redhat.com>
4444         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4445         "aclocal-m4-deps.mk".  Include file here.
4446         $(srcdir)/aclocal.m4: Add "configure.ac".
4447         * gnulib/aclocal-m4-deps.mk: New file.
4448         * gnulib/update-gnulib.sh: Automatically update
4449         "aclocal-m4-deps.mk".
4451 2018-09-04  Tom Tromey  <tom@tromey.com>
4453         * configure: Rebuild.
4454         * configure.ac: Remove multi-ice code.
4456 2018-09-04  Tom Tromey  <tom@tromey.com>
4458         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4459         (ada-exp.o): Update.
4461 2018-09-04  Tom Tromey  <tom@tromey.com>
4463         * Makefile.in (printcmd.o, target-float.o): Remove.
4464         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4466 2018-09-04  Tom Tromey  <tom@tromey.com>
4468         * gnulib/Makefile.in: Remove obsolete comment.
4469         * Makefile.in: Remove obsolete comment.
4471 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4473         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4474         line with '+'.
4476 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4478         * riscv-tdep.c: Add 'prologue-value.h' include.
4479         (struct riscv_unwind_cache): New struct.
4480         (riscv_debug_unwinder): New global.
4481         (riscv_scan_prologue): Update arguments, capture register details
4482         from prologue scan.
4483         (riscv_skip_prologue): Reformat arguments line, move end of
4484         prologue calculation into riscv_scan_prologue.
4485         (riscv_frame_cache): Update return type, create
4486         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4487         details.
4488         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4489         (riscv_frame_prev_register): Use the trad_frame within the
4490         riscv_unwind_cache.
4491         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4492         flag.
4494 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4496         * trad-frame.h (trad_frame_set_realreg): Declare.
4497         (trad_frame_set_addr): Declare.
4498         * trad-frame.c (trad_frame_set_realreg): Define new function.
4499         (trad_frame_set_addr): Define new function.
4500         (trad_frame_set_reg_realreg): Use new function.
4501         (trad_frame_set_reg_addr): Use new function.
4503 2018-09-01  Keith Seitz  <keiths@redhat.com>
4505         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4506         pulongest instead of "%lld".
4507         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4508         ATTRIBUTE_UNUSED.
4510 2018-08-31  Tom Tromey  <tom@tromey.com>
4512         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4513         variant part type.
4515 2018-08-31  Pedro Alves  <palves@redhat.com>
4517         * gdbarch.h: Regenerate.
4519 2018-08-31  Pedro Alves  <palves@redhat.com>
4521         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4522         * target.h (Hardware watchpoint interfaces): Describe
4523         continuable/steppable/non-steppable watchpoints.
4524         * gdbarch.h, gdbarch.c: Regenerate.
4526 2018-08-31  Pedro Alves  <palves@redhat.com>
4528         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4529         Delete.
4530         * s390-linux-nat.c
4531         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4532         * target.h (target_ops::have_continuable_watchpoint): Delete.
4533         (target_have_continuable_watchpoint): Delete.
4534         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4535         * target-delegates.c: Regenerate.
4537 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4539         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4540         the files present in "gnulib/import/m4/".
4542 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4544         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4545         c.sw, c.swsp, and c.sdsp.
4547 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4549         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4550         (riscv_read_misa_reg): Don't cache value read into inferior data.
4551         (riscv_new_inferior_data): Delete.
4552         (riscv_inferior_data_cleanup): Delete.
4553         (riscv_inferior_data): Delete.
4554         (riscv_invalidate_inferior_data): Delete.
4555         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4557 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4559         * compile/compile-cplus-types.c
4560         (compile_cplus_instance::leave_scope): Take the address of scope
4561         object.
4562         (compile_cplus_instance::convert_qualified_base): Compare quals
4563         to 0.
4565 2018-08-30  Keith Seitz  <keiths@redhat.com>
4567         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4568         Use "%s" and host_address_to_string instead of "%p" in printf.
4570 2018-08-29  Keith Seitz  <keiths@redhat.com>
4572         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4573         and compile-cplus-types.c.
4574         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4575         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4576         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4577         Declare.
4578         * compile/compile-c-support.c: Include compile-cplus.h.
4579         (load_libcompile): Templatize.
4580         (get_compile_context): "New" function.
4581         (c_get_compile_context): Use get_compile_context.
4582         (cplus_get_compile_context): New function.
4583         (cplus_push_user_expression, cplus_pop_user_expression)
4584         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4585         (cplus_compute_program): Define new structs/functions.
4586         * compile/compile-cplus-symmbols.c: New file.
4587         * compile/compile-cplus-types.c: New file.
4588         * compile/compile-cplus.h: New file.
4589         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4590         Declare.
4591         * compile/compile-object-load.c (get_out_value_type): Use
4592         strncmp_iw when comparing symbol names.
4593         (compile_object_load): Add mst_bss and mst_data.
4594         * compile/compile.c (_initialize_compile): Remove
4595         -Wno-implicit-function-declaration from `compile_args'.
4596         * compile/gcc-cp-plugin.h: New file.
4597         * NEWS: Mention C++ compile support and new debug options.
4599 2018-08-29  Keith Seitz  <keiths@redhat.com>
4601         * linespec.c (collect_info::add_symbol): Make virtual.
4602         (struct symbol_searcher_collect_info): New struct.
4603         (symbol_searcher::find_all_symbols): New method.
4604         * symtab.h (class symbol_searcher): New class.
4606 2018-08-29  Keith Seitz  <keiths@redhat.com>
4608         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4609         Change to vector of block_symbol.  Update all users.
4610         (struct collect_info) <symbols>: Likewise.
4611         (collect_info::add_symbol): Take block_symbol as argument.
4612         Update all callers.
4613         (decode_compound_collector) <m_symbols>: Change type to vector
4614         of block_symbol.  Update all users.
4615         (decode_compound_collector::operator ()): Change parameter type
4616         to block_symbol.
4617         (find_method, find_function_symbols, find_linespec_symbols)
4618         (find_label_symbols_in_block, find_label_symbols): Change symbol
4619         vectors to block_symbol vectors.
4620         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4621         block_symbol.
4623 2018-08-29  Keith Seitz  <keiths@redhat.com>
4625         * linespec.c (symbolp): Remove typedef and VEC definitions.
4626         (bound_minimal_symbol_d): Likewise.
4628 2018-08-29  Keith Seitz  <keiths@redhat.com>
4630         * linespec.c (decode_compound_collector::decode_compound_collector):
4631         Remove initialization for `m_symtabs'.
4632         (decode_compound_collector::release_symbols): Change return type
4633         to std::vector.  Update all callers.
4634         (class decode_compound_collector) <m_symbols>: Change type to
4635         std::vector.
4636         (lookup_prefix_sym): Change return type to std::vector.  Update all
4637         callers.
4638         (compare_symbols): Remove.
4639         (std_compare_symbols): Rename to `compare_symbols'.
4640         (find_method): Change `sym_classes' parameter to std::vector.
4641         Update all callers.  Use std::sort to sort sym_classes.
4642         (find_linespec_symbols): Remove cleanup.
4644 2018-08-29  Keith Seitz  <keiths@redhat.com>
4646         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4647         std::vector.  Update all users.
4648         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4649         (struct collect_info) <minimal_symbols>: Likewise.
4650         (compare_msymbols): Return bool.  Change parameters to const
4651         bound_minimal_symbol references.
4652         (find_method, find_function_symbols, find_linespec_symbols): Change
4653         `minsyms' parameter to std::vector.  Update all callers.
4655 2018-08-29  Keith Seitz  <keiths@redhat.com>
4657         * linespec.c (struct linespec) <label_symbols>: Change type to
4658         std::vector.  Update all users.
4659         (find_label_symbols_in_block): Change `result' parameter to
4660         std::vector.  Update all callers.
4661         (find_label_symbols): Return std::vector.  Update all callers.
4663 2018-08-29  Keith Seitz  <keiths@redhat.com>
4665         * linespec.c (struct linespec) <function_symbols>: Change type to
4666         std::vector.  Update all users.
4667         (struct collect_info) <function_symbols>: Likewise.
4668         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4669         (std_compare_symbols): New function.
4670         (find_method, find_function_symbols, find_linespec_symbols)
4671         (find_label_symbols_in_block): Change `symbols' parameter to
4672         std::vector.  Update all callers.
4673         (find_label_symbols): Likewise for `function_symbols' and
4674         `label_funcs_ret'.
4676 2018-08-29  Keith Seitz  <keiths@redhat.com>
4678         * linespec.c (symtab_vector_up): Define.
4679         (struct linespec) <file_symtabs>: Change type to std::vector *.
4680         Update all uses.
4681         (struct collect_info) <file_symtabs>: Likewise.
4682         (collect_symtabs_from_filename): Return symtab_vector_up.
4683         Update all callers.
4684         (decode_objc): Remove cleanup.
4685         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4686         (symtab_collector::release_symtabs): Return symtab_vector_up.
4687         Update all callers.
4688         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4689         Update all users.
4690         (collect_symtabs_from_filename, symtabs_from_filename): Return
4691         symtab_vector_up.  Update all callers.
4693 2018-08-29  Tom Tromey  <tom@tromey.com>
4695         * csky-tdep.c (csky_analyze_prologue): Use
4696         core_addr_to_string_nz.
4698 2018-08-29  Tom Tromey  <tom@tromey.com>
4700         * windows-nat.c (struct xlate_exception) <them>: Change type to
4701         DWORD.
4702         (xlate): Fix formatting.  Remove last entry.
4703         (struct xlate_exception, xlate): Comment out.
4704         (windows_nat_target::resume): Use ranged for.
4706 2018-08-29  Jim Wilson  <jimw@sifive.com>
4708         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4709         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4710         of NT_PRFPREG.
4711         (riscv_linux_nat_target::store_registers): Likewise.
4713 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4715         PR gdb/23555
4716         PR gdb/23558
4717         * gnulib/aclocal.m4: Regenerate.
4718         * gnulib/config.in: Regenerate.
4719         * gnulib/configure: Regenerate.
4720         * gnulib/import/Makefile.am: Update.
4721         * gnulib/import/Makefile.in: Update.
4722         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4723         * gnulib/import/_Noreturn.h: ... this.
4724         * gnulib/import/alloca.in.h: Update.
4725         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4726         * gnulib/import/arg-nonnull.h: ... this.
4727         * gnulib/import/assure.h: Update.
4728         * gnulib/import/at-func.c: Update.
4729         * gnulib/import/basename-lgpl.c: Update.
4730         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4731         * gnulib/import/c++defs.h: ... this.
4732         * gnulib/import/canonicalize-lgpl.c: Update.
4733         * gnulib/import/cdefs.h: Update.
4734         * gnulib/import/chdir-long.c: Update.
4735         * gnulib/import/chdir-long.h: Update.
4736         * gnulib/import/cloexec.c: Update.
4737         * gnulib/import/cloexec.h: Update.
4738         * gnulib/import/close.c: Update.
4739         * gnulib/import/closedir.c: Update.
4740         * gnulib/import/config.charset: Update.
4741         * gnulib/import/dirent-private.h: Update.
4742         * gnulib/import/dirent.in.h: Update.
4743         * gnulib/import/dirfd.c: Update.
4744         * gnulib/import/dirname-lgpl.c: Update.
4745         * gnulib/import/dirname.h: Update.
4746         * gnulib/import/dosname.h: Update.
4747         * gnulib/import/dup-safer-flag.c: Update.
4748         * gnulib/import/dup-safer.c: Update.
4749         * gnulib/import/dup.c: Update.
4750         * gnulib/import/dup2.c: Update.
4751         * gnulib/import/errno.in.h: Update.
4752         * gnulib/import/error.c: Update.
4753         * gnulib/import/error.h: Update.
4754         * gnulib/import/exitfail.c: Update.
4755         * gnulib/import/exitfail.h: Update.
4756         * gnulib/import/extra/update-copyright: Update.
4757         * gnulib/import/fchdir.c: Update.
4758         * gnulib/import/fcntl.c: Update.
4759         * gnulib/import/fcntl.in.h: Update.
4760         * gnulib/import/fd-hook.c: Update.
4761         * gnulib/import/fd-hook.h: Update.
4762         * gnulib/import/fd-safer-flag.c: Update.
4763         * gnulib/import/fd-safer.c: Update.
4764         * gnulib/import/fdopendir.c: Update.
4765         * gnulib/import/filename.h: Update.
4766         * gnulib/import/filenamecat-lgpl.c: Update.
4767         * gnulib/import/filenamecat.h: Update.
4768         * gnulib/import/flexmember.h: Update.
4769         * gnulib/import/float+.h: Update.
4770         * gnulib/import/float.c: Update.
4771         * gnulib/import/float.in.h: Update.
4772         * gnulib/import/fnmatch.c: Update.
4773         * gnulib/import/fnmatch.in.h: Update.
4774         * gnulib/import/fnmatch_loop.c: Update.
4775         * gnulib/import/fpucw.h: Update.
4776         * gnulib/import/frexp.c: Update.
4777         * gnulib/import/frexpl.c: Update.
4778         * gnulib/import/fstat.c: Update.
4779         * gnulib/import/fstatat.c: Update.
4780         * gnulib/import/getcwd-lgpl.c: Update.
4781         * gnulib/import/getcwd.c: Update.
4782         * gnulib/import/getdtablesize.c: Update.
4783         * gnulib/import/getlogin_r.c: Update.
4784         * gnulib/import/getprogname.c: Update.
4785         * gnulib/import/getprogname.h: Update.
4786         * gnulib/import/gettext.h: Update.
4787         * gnulib/import/gettimeofday.c: Update.
4788         * gnulib/import/glob-libc.h: Update.
4789         * gnulib/import/glob.c: Update.
4790         * gnulib/import/glob.in.h: Update.
4791         * gnulib/import/glob_internal.h: Update.
4792         * gnulib/import/glob_pattern_p.c: Update.
4793         * gnulib/import/globfree.c: Update.
4794         * gnulib/import/hard-locale.c: Update.
4795         * gnulib/import/hard-locale.h: Update.
4796         * gnulib/import/intprops.h: Update.
4797         * gnulib/import/inttypes.in.h: Update.
4798         * gnulib/import/isnan.c: Update.
4799         * gnulib/import/isnand-nolibm.h: Update.
4800         * gnulib/import/isnand.c: Update.
4801         * gnulib/import/isnanl-nolibm.h: Update.
4802         * gnulib/import/isnanl.c: Update.
4803         * gnulib/import/itold.c: Update.
4804         * gnulib/import/libc-config.h: Update.
4805         * gnulib/import/limits.in.h: Update.
4806         * gnulib/import/localcharset.c: Update.
4807         * gnulib/import/localcharset.h: Update.
4808         * gnulib/import/localtime-buffer.c: Update.
4809         * gnulib/import/localtime-buffer.h: Update.
4810         * gnulib/import/lstat.c: Update.
4811         * gnulib/import/m4/00gnulib.m4: Update.
4812         * gnulib/import/m4/__inline.m4: Update.
4813         * gnulib/import/m4/absolute-header.m4: Update.
4814         * gnulib/import/m4/alloca.m4: Update.
4815         * gnulib/import/m4/builtin-expect.m4: Update.
4816         * gnulib/import/m4/canonicalize.m4: Update.
4817         * gnulib/import/m4/chdir-long.m4: Update.
4818         * gnulib/import/m4/close.m4: Update.
4819         * gnulib/import/m4/closedir.m4: Update.
4820         * gnulib/import/m4/configmake.m4: Update.
4821         * gnulib/import/m4/d-ino.m4: Update.
4822         * gnulib/import/m4/d-type.m4: Update.
4823         * gnulib/import/m4/dirent_h.m4: Update.
4824         * gnulib/import/m4/dirfd.m4: Update.
4825         * gnulib/import/m4/dirname.m4: Update.
4826         * gnulib/import/m4/double-slash-root.m4: Update.
4827         * gnulib/import/m4/dup.m4: Update.
4828         * gnulib/import/m4/dup2.m4: Update.
4829         * gnulib/import/m4/eealloc.m4: Update.
4830         * gnulib/import/m4/environ.m4: Update.
4831         * gnulib/import/m4/errno_h.m4: Update.
4832         * gnulib/import/m4/error.m4: Update.
4833         * gnulib/import/m4/exponentd.m4: Update.
4834         * gnulib/import/m4/exponentl.m4: Update.
4835         * gnulib/import/m4/extensions.m4: Update.
4836         * gnulib/import/m4/extern-inline.m4: Update.
4837         * gnulib/import/m4/fchdir.m4: Update.
4838         * gnulib/import/m4/fcntl-o.m4: Update.
4839         * gnulib/import/m4/fcntl.m4: Update.
4840         * gnulib/import/m4/fcntl_h.m4: Update.
4841         * gnulib/import/m4/fdopendir.m4: Update.
4842         * gnulib/import/m4/filenamecat.m4: Update.
4843         * gnulib/import/m4/flexmember.m4: Update.
4844         * gnulib/import/m4/float_h.m4: Update.
4845         * gnulib/import/m4/fnmatch.m4: Update.
4846         * gnulib/import/m4/fnmatch_h.m4: Update.
4847         * gnulib/import/m4/fpieee.m4: Update.
4848         * gnulib/import/m4/frexp.m4: Update.
4849         * gnulib/import/m4/frexpl.m4: Update.
4850         * gnulib/import/m4/fstat.m4: Update.
4851         * gnulib/import/m4/fstatat.m4: Update.
4852         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4853         * gnulib/import/m4/getcwd-path-max.m4: Update.
4854         * gnulib/import/m4/getcwd.m4: Update.
4855         * gnulib/import/m4/getdtablesize.m4: Update.
4856         * gnulib/import/m4/getlogin.m4: Update.
4857         * gnulib/import/m4/getlogin_r.m4: Update.
4858         * gnulib/import/m4/getpagesize.m4: Update.
4859         * gnulib/import/m4/getprogname.m4: Update.
4860         * gnulib/import/m4/gettimeofday.m4: Update.
4861         * gnulib/import/m4/glibc21.m4: Update.
4862         * gnulib/import/m4/glob.m4: Update.
4863         * gnulib/import/m4/glob_h.m4: Update.
4864         * gnulib/import/m4/gnulib-cache.m4: Update.
4865         * gnulib/import/m4/gnulib-common.m4: Update.
4866         * gnulib/import/m4/gnulib-comp.m4: Update.
4867         * gnulib/import/m4/gnulib-tool.m4: Update.
4868         * gnulib/import/m4/hard-locale.m4: Update.
4869         * gnulib/import/m4/include_next.m4: Update.
4870         * gnulib/import/m4/inttypes-pri.m4: Update.
4871         * gnulib/import/m4/inttypes.m4: Update.
4872         * gnulib/import/m4/isnand.m4: Update.
4873         * gnulib/import/m4/isnanl.m4: Update.
4874         * gnulib/import/m4/largefile.m4: Update.
4875         * gnulib/import/m4/limits-h.m4: Update.
4876         * gnulib/import/m4/localcharset.m4: Update.
4877         * gnulib/import/m4/locale-fr.m4: Update.
4878         * gnulib/import/m4/locale-ja.m4: Update.
4879         * gnulib/import/m4/locale-zh.m4: Update.
4880         * gnulib/import/m4/localtime-buffer.m4: Update.
4881         * gnulib/import/m4/longlong.m4: Update.
4882         * gnulib/import/m4/lstat.m4: Update.
4883         * gnulib/import/m4/malloc.m4: Update.
4884         * gnulib/import/m4/malloca.m4: Update.
4885         * gnulib/import/m4/math_h.m4: Update.
4886         * gnulib/import/m4/mbrtowc.m4: Update.
4887         * gnulib/import/m4/mbsinit.m4: Update.
4888         * gnulib/import/m4/mbsrtowcs.m4: Update.
4889         * gnulib/import/m4/mbstate_t.m4: Update.
4890         * gnulib/import/m4/memchr.m4: Update.
4891         * gnulib/import/m4/memmem.m4: Update.
4892         * gnulib/import/m4/mempcpy.m4: Update.
4893         * gnulib/import/m4/memrchr.m4: Update.
4894         * gnulib/import/m4/mkdir.m4: Update.
4895         * gnulib/import/m4/mkstemp.m4: Update.
4896         * gnulib/import/m4/mmap-anon.m4: Update.
4897         * gnulib/import/m4/mode_t.m4: Update.
4898         * gnulib/import/m4/msvc-inval.m4: Update.
4899         * gnulib/import/m4/msvc-nothrow.m4: Update.
4900         * gnulib/import/m4/multiarch.m4: Update.
4901         * gnulib/import/m4/nocrash.m4: Update.
4902         * gnulib/import/m4/off_t.m4: Update.
4903         * gnulib/import/m4/onceonly.m4: Update.
4904         * gnulib/import/m4/open-cloexec.m4: Update.
4905         * gnulib/import/m4/open.m4: Update.
4906         * gnulib/import/m4/openat.m4: Update.
4907         * gnulib/import/m4/opendir.m4: Update.
4908         * gnulib/import/m4/pathmax.m4: Update.
4909         * gnulib/import/m4/rawmemchr.m4: Update.
4910         * gnulib/import/m4/readdir.m4: Update.
4911         * gnulib/import/m4/readlink.m4: Update.
4912         * gnulib/import/m4/realloc.m4: Update.
4913         * gnulib/import/m4/rename.m4: Update.
4914         * gnulib/import/m4/rewinddir.m4: Update.
4915         * gnulib/import/m4/rmdir.m4: Update.
4916         * gnulib/import/m4/save-cwd.m4: Update.
4917         * gnulib/import/m4/secure_getenv.m4: Update.
4918         * gnulib/import/m4/setenv.m4: Update.
4919         * gnulib/import/m4/signal_h.m4: Update.
4920         * gnulib/import/m4/ssize_t.m4: Update.
4921         * gnulib/import/m4/stat-time.m4: Update.
4922         * gnulib/import/m4/stat.m4: Update.
4923         * gnulib/import/m4/std-gnu11.m4: Update.
4924         * gnulib/import/m4/stdbool.m4: Update.
4925         * gnulib/import/m4/stddef_h.m4: Update.
4926         * gnulib/import/m4/stdint.m4: Update.
4927         * gnulib/import/m4/stdio_h.m4: Update.
4928         * gnulib/import/m4/stdlib_h.m4: Update.
4929         * gnulib/import/m4/strchrnul.m4: Update.
4930         * gnulib/import/m4/strdup.m4: Update.
4931         * gnulib/import/m4/strerror.m4: Update.
4932         * gnulib/import/m4/string_h.m4: Update.
4933         * gnulib/import/m4/strstr.m4: Update.
4934         * gnulib/import/m4/strtok_r.m4: Update.
4935         * gnulib/import/m4/sys_socket_h.m4: Update.
4936         * gnulib/import/m4/sys_stat_h.m4: Update.
4937         * gnulib/import/m4/sys_time_h.m4: Update.
4938         * gnulib/import/m4/sys_types_h.m4: Update.
4939         * gnulib/import/m4/tempname.m4: Update.
4940         * gnulib/import/m4/time_h.m4: Update.
4941         * gnulib/import/m4/unistd-safer.m4: Update.
4942         * gnulib/import/m4/unistd_h.m4: Update.
4943         * gnulib/import/m4/warn-on-use.m4: Update.
4944         * gnulib/import/m4/wchar_h.m4: Update.
4945         * gnulib/import/m4/wchar_t.m4: Update.
4946         * gnulib/import/m4/wctype_h.m4: Update.
4947         * gnulib/import/m4/wint_t.m4: Update.
4948         * gnulib/import/malloc.c: Update.
4949         * gnulib/import/malloc/scratch_buffer.h: Update.
4950         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4951         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4952         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4953         * gnulib/import/malloca.c: Update.
4954         * gnulib/import/malloca.h: Update.
4955         * gnulib/import/malloca.valgrind: Update.
4956         * gnulib/import/math.in.h: Update.
4957         * gnulib/import/mbrtowc.c: Update.
4958         * gnulib/import/mbsinit.c: Update.
4959         * gnulib/import/mbsrtowcs-impl.h: Update.
4960         * gnulib/import/mbsrtowcs-state.c: Update.
4961         * gnulib/import/mbsrtowcs.c: Update.
4962         * gnulib/import/memchr.c: Update.
4963         * gnulib/import/memmem.c: Update.
4964         * gnulib/import/mempcpy.c: Update.
4965         * gnulib/import/memrchr.c: Update.
4966         * gnulib/import/mkdir.c: Update.
4967         * gnulib/import/mkstemp.c: Update.
4968         * gnulib/import/msvc-inval.c: Update.
4969         * gnulib/import/msvc-inval.h: Update.
4970         * gnulib/import/msvc-nothrow.c: Update.
4971         * gnulib/import/msvc-nothrow.h: Update.
4972         * gnulib/import/open.c: Update.
4973         * gnulib/import/openat-die.c: Update.
4974         * gnulib/import/openat-priv.h: Update.
4975         * gnulib/import/openat-proc.c: Update.
4976         * gnulib/import/openat.c: Update.
4977         * gnulib/import/openat.h: Update.
4978         * gnulib/import/opendir.c: Update.
4979         * gnulib/import/pathmax.h: Update.
4980         * gnulib/import/pipe-safer.c: Update.
4981         * gnulib/import/rawmemchr.c: Update.
4982         * gnulib/import/readdir.c: Update.
4983         * gnulib/import/readlink.c: Update.
4984         * gnulib/import/realloc.c: Update.
4985         * gnulib/import/ref-add.sin: Update.
4986         * gnulib/import/ref-del.sin: Update.
4987         * gnulib/import/rename.c: Update.
4988         * gnulib/import/rewinddir.c: Update.
4989         * gnulib/import/rmdir.c: Update.
4990         * gnulib/import/same-inode.h: Update.
4991         * gnulib/import/save-cwd.c: Update.
4992         * gnulib/import/save-cwd.h: Update.
4993         * gnulib/import/scratch_buffer.h: Update.
4994         * gnulib/import/secure_getenv.c: Update.
4995         * gnulib/import/setenv.c: Update.
4996         * gnulib/import/signal.in.h: Update.
4997         * gnulib/import/stat-time.c: Update.
4998         * gnulib/import/stat-time.h: Update.
4999         * gnulib/import/stat-w32.c: Update.
5000         * gnulib/import/stat-w32.h: Update.
5001         * gnulib/import/stat.c: Update.
5002         * gnulib/import/stdbool.in.h: Update.
5003         * gnulib/import/stddef.in.h: Update.
5004         * gnulib/import/stdint.in.h: Update.
5005         * gnulib/import/stdio.in.h: Update.
5006         * gnulib/import/stdlib.in.h: Update.
5007         * gnulib/import/str-two-way.h: Update.
5008         * gnulib/import/strchrnul.c: Update.
5009         * gnulib/import/strdup.c: Update.
5010         * gnulib/import/streq.h: Update.
5011         * gnulib/import/strerror-override.c: Update.
5012         * gnulib/import/strerror-override.h: Update.
5013         * gnulib/import/strerror.c: Update.
5014         * gnulib/import/string.in.h: Update.
5015         * gnulib/import/stripslash.c: Update.
5016         * gnulib/import/strnlen1.c: Update.
5017         * gnulib/import/strnlen1.h: Update.
5018         * gnulib/import/strstr.c: Update.
5019         * gnulib/import/strtok_r.c: Update.
5020         * gnulib/import/sys_stat.in.h: Update.
5021         * gnulib/import/sys_time.in.h: Update.
5022         * gnulib/import/sys_types.in.h: Update.
5023         * gnulib/import/tempname.c: Update.
5024         * gnulib/import/tempname.h: Update.
5025         * gnulib/import/time.in.h: Update.
5026         * gnulib/import/unistd--.h: Update.
5027         * gnulib/import/unistd-safer.h: Update.
5028         * gnulib/import/unistd.in.h: Update.
5029         * gnulib/import/unsetenv.c: Update.
5030         * gnulib/import/verify.h: Update.
5031         * gnulib/import/extra/snippet/warn-on-use.h: Update.
5032         * gnulib/import/wchar.in.h: Update.
5033         * gnulib/import/wctype.in.h: Update.
5034         * gnulib/import/xalloc-oversized.h: Update.
5035         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
5036         "53e2c179f26a890fa6685af4b6c1397ee370433b".
5038 2018-08-16  Gary Benson <gbenson@redhat.com>
5040         PR gdb/13000:
5041         * main.c (captured_main_1): Exit with nonzero status
5042         in batch mode if the last command to be executed failed.
5043         * NEWS: Mention the above.
5045 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
5047         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
5048         end of warning message.
5050 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
5052         PR gdb/22943:
5053         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
5054         (aarch64_extract_return_value): Use
5055         aapcs_is_vfp_call_or_return_candidate.
5056         (aarch64_return_in_memory): Likewise.
5057         (aarch64_store_return_value): Likewise.
5059 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
5061         * aarch64-tdep.c
5062         (aapcs_is_vfp_call_or_return_candidate): Make static
5063         (pass_in_v_or_stack): Remove function.
5064         (pass_in_v_vfp_candidate): New function.
5065         (aarch64_push_dummy_call): Check for float register candidates.
5067 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
5069         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
5070         (aapcs_is_vfp_call_or_return_candidate_1): New function.
5071         (aapcs_is_vfp_call_or_return_candidate): Likewise.
5073 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
5075         PR build/23399
5076         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
5077         (struct ipa_sym_addresses): Rename to...
5078         (struct ipa_sym_addresses_common): ... this.
5079         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
5081 2018-08-28  Tom Tromey  <tom@tromey.com>
5083         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
5084         (token_fifo): Now a std::vector.
5085         (yylex, c_parse): Update.
5086         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
5087         (token_fifo): Now a std::vector.
5088         (yylex, d_parse): Update.
5089         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
5090         (token_fifo): Now a std::vector.
5091         (yylex, go_parse): Update.
5093 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5095         * parser-defs.h (struct type_stack) <elements>: Change type to
5096         std::vector<union type_stack_elt>.
5097         <depth, size>: Remove.
5098         * parse.c (parse_exp_in_context_1): Adjust.
5099         (type_stack_reserve): Remove.
5100         (check_type_stack_depth): Remove.
5101         (insert_into_type_stack): Adjust to std::vector.
5102         (insert_type): Likewise.
5103         (push_type): Likewise.
5104         (push_type_int): Likewise.
5105         (insert_type_address_space): Likewise.
5106         (pop_type): Likewise.
5107         (pop_type_int): Likewise.
5108         (pop_typelist): Likewise.
5109         (pop_type_stack): Likewise.
5110         (append_type_stack): Likewise.
5111         (push_type_stack): Likewise.
5112         (get_type_stack): Likewise.
5113         (type_stack_cleanup): Likewise.
5114         (push_typelist): Likewise.
5115         (follow_types): Likewise.
5116         (_initialize_parse): Likewise.
5118 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5120         * NEWS: Mention csky target.
5122 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
5123             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5124             Don Breazeal  <donb@codesourcery.com>
5126         * csky-linux-tdep.c: New file.
5127         * csky-tdep.c: Likewise.
5128         * csky-tdep.h: Likewise.
5129         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
5130         csky-tdep.o.
5131         (HFILES_NO_SRCDIR): Add csky-tdep.h.
5132         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
5133         * configure.tgt: Add csky support.
5135 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
5137         * python/py-framefilter.c (py_print_frame): Print frame architecture
5138         when printing on an MI output.
5140 2018-08-27  Tom Tromey  <tom@tromey.com>
5142         PR build/23087:
5143         * configure: Rebuild.
5144         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
5146 2018-08-27  Tom Tromey  <tom@tromey.com>
5148         * aarch64-linux-tdep.c
5149         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
5150         casts to int.
5152 2018-08-27  Tom Tromey  <tom@tromey.com>
5154         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
5155         unsigned.
5156         (ppc64_standard_linkage1, ppc64_standard_linkage2)
5157         (ppc64_standard_linkage3, ppc64_standard_linkage4)
5158         (ppc64_standard_linkage5, ppc64_standard_linkage6)
5159         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
5160         unsigned.
5162 2018-08-27  Tom Tromey  <tom@tromey.com>
5164         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
5165         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
5167 2018-08-27  Tom Tromey  <tom@tromey.com>
5169         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
5170         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
5171         ULONGEST_MAX.
5172         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
5173         ULONGEST_MAX.
5174         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
5175         ULONGEST_MAX.
5176         * sparc-linux-tdep.c (sparc32_linux_sigframe)
5177         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
5178         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
5179         ULONGEST_MAX.
5180         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
5181         (ppc64_linux_sigaction_tramp_frame)
5182         (ppc32_linux_sighandler_tramp_frame)
5183         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
5184         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
5185         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
5186         * mn10300-linux-tdep.c (am33_linux_sigframe)
5187         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
5188         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
5189         * mips-linux-tdep.c (mips_linux_o32_sigframe)
5190         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
5191         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
5192         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
5193         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
5194         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
5195         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
5196         * microblaze-linux-tdep.c
5197         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
5198         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
5199         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
5200         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
5201         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
5202         * common/common-types.h (ULONGEST_MAX): New define.
5203         (CORE_ADDR_MAX): Fix formatting.
5204         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
5205         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
5206         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
5207         (arm_linux_rt_sigreturn_tramp_frame)
5208         (arm_eabi_linux_sigreturn_tramp_frame)
5209         (arm_eabi_linux_rt_sigreturn_tramp_frame)
5210         (thumb2_eabi_linux_sigreturn_tramp_frame)
5211         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
5212         (arm_linux_restart_syscall_tramp_frame)
5213         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
5214         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
5215         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
5216         ULONGEST_MAX.
5217         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
5219 2018-08-27  Tom Tromey  <tom@tromey.com>
5221         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
5222         CORE_ADDR_MAX.
5223         * mips-tdep.c (mips_deal_with_atomic_sequence)
5224         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
5225         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
5226         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
5227         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
5228         CORE_ADDR_MAX.
5229         * aarch64-tdep.c (aarch64_software_single_step): Use
5230         CORE_ADDR_MAX.
5232 2018-08-27  Tom Tromey  <tom@tromey.com>
5234         * linespec.c (complete_linespec_component): Add cast to "char".
5235         * completer.c (completion_tracker::build_completion_result): Add
5236         cast to "char".
5238 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5240         * solist.h (struct solist, struct target_so_ops): Fix
5241         indentation.
5243 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5245         * ada-tasks.c (ada_task_info_s): Remove typedef.
5246         (DEF_VEC_O(ada_task_info_s)): Remove.
5247         (struct ada_tasks_inferior_data): Initialize fields.
5248         <task_list>: Make an std::vector.
5249         (get_ada_tasks_inferior_data): Allocate with new.
5250         (ada_get_task_number): Adjust.
5251         (get_task_number_from_id): Likewise.
5252         (valid_task_id): Likewise.
5253         (ada_get_task_info_from_ptid): Likewise.
5254         (iterate_over_live_ada_tasks): Likewise.
5255         (add_ada_task): Likewise.
5256         (read_known_tasks): Likewise.
5257         (ada_build_task_list): Likewise.
5258         (print_ada_task_info): Likewise.
5259         (info_task): Likewise.
5260         (task_command_1): Likewise.
5262 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5264         * ada-lang.c (add_angle_brackets): Return std::string.
5266 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
5268         * python/py-threadevent.c (py_get_event_thread): Initialize
5269         pythread.
5271 2018-08-24  Pedro Alves  <palves@redhat.com>
5273         * python/py-bpevent.c (create_breakpoint_event_object): Use
5274         copy-initialization.
5275         * python/py-continueevent.c (emit_continue_event): Use
5276         copy-initialization.
5277         * python/py-exitedevent.c (create_exited_event_object): Return a
5278         gdbpy_ref<>.
5279         (emit_exited_event): Use copy-initialization.
5280         * python/py-inferior.c (python_new_inferior)
5281         (python_inferior_deleted, add_thread_object): Use
5282         copy-initialization.
5283         * python/py-infevents.c (create_inferior_call_event_object)
5284         (create_register_changed_event_object)
5285         (create_memory_changed_event_object): Return a gdbpy_ref<>.
5286         (emit_inferior_call_event, emit_memory_changed_event)
5287         (emit_register_changed_event): Use copy-initialization.
5288         * python/py-newobjfileevent.c (create_new_objfile_event_object):
5289         Return a gdbpy_ref<>.
5290         (emit_new_objfile_event): Use copy-initialization.
5291         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5292         (emit_clear_objfiles_event): Use copy-initialization.
5293         * python/py-signalevent.c (create_signal_event_object): Use
5294         copy-initialization.
5295         * python/py-threadevent.c (create_thread_event_object): Use
5296         copy-initialization.
5298 2018-08-24  Pedro Alves  <palves@redhat.com>
5299             Simon Marchi  <simon.marchi@ericsson.com>
5301         PR gdb/23379
5302         * python/py-continueevent.c: Include "gdbthread.h".
5303         (create_continue_event_object): Add intro comment.  Add 'ptid'
5304         parameter.  Use it to find thread to pass to
5305         create_thread_event_object.
5306         (emit_continue_event): Pass PTID down to
5307         create_continue_event_object.
5308         * python/py-event.h (py_get_event_thread): Declare.
5309         (create_thread_event_object): Remove default from 'thread'
5310         parameter.
5311         * python/py-stopevent.c (create_stop_event_object): Use
5312         py_get_event_thread.
5313         * python/py-threadevent.c (get_event_thread): Rename to ...
5314         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5315         and use it to find the thread.
5316         (create_thread_event_object): Assert that THREAD isn't null.
5317         Don't find the event thread here.
5319 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5321         * block.h (blockrange, blockranges): New struct declarations.
5322         (struct block): Add new field named `ranges'.
5323         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5324         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5325         macros for accessing ranges in struct block.
5326         (make_blockranges): New declaration.
5327         block.c (make_blockranges): New function.
5328         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5329         for block.
5330         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5331         * blockframe.c (cache_pc_function_block): New static global.
5332         (clear_pc_function_cache): Clear cache_pc_function_block.
5333         (find_pc_partial_function): Move comment to symtab.h.  Add
5334         support for non-contiguous blocks.
5335         * cli/cli-cmds.c (block.h): Include.
5336         (print_disassembly): Handle printing of non-contiguous blocks.
5337         (disassemble_current_function): Likewise.
5338         (disassemble_command): Likewise.
5340         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5341         BLOCK_START.
5342         * blockframe.c (get_pc_function_start): Likewise.
5343         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5344         (gcc_symbol_address): Likewise.
5345         * compile/compile-object-run.c (compile_object_run): Likewise.
5346         * compile/compile.c (get_expr_block_and_pc): Likewise.
5347         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5348         (func_addr_to_tail_call_list): Likewise.
5349         * findvar.c (default_read_var_value): Likewise.
5350         * inline-frame.c (inline_frame_this_id): Likewise.
5351         (skip-inline_frames): Likewise.
5352         * infcmd.c (until_next_command): Likewise.
5353         * linespec.c (convert_linespec_to_sals): Likewise.
5354         * parse.c (parse_exp_in_context_1): Likewise.
5355         * printcmd.c (build_address_symbolic): likewise.
5356         (info_address_command): Likewise.
5357         symtab.c (find_function_start_sal): Likewise.
5358         (skip_prologue_sal): Likewise.
5359         (find_function_alias_target): Likewise.
5360         (find_gnu_ifunc): Likewise.
5361         * stack.c (find_frame_funname): Likewise.
5362         * symtab.c (fixup_symbol_section): Likewise.
5363         (find_function_start_sal): Likewise.
5364         (skip_prologue_sal): Likewsie.
5365         (find_function_alias_target): Likewise.
5366         (find_gnu_ifunc): Likewise.
5367         * tracepoint.c (info_scope_command): Likewise.
5368         * value.c (value_fn_field): Likewise.
5370         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5371         in place of find_pc_partial_function.
5372         * blockframe.c (find_function_entry_range_from_pc): New function.
5373         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5374         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5375         for each range in a block.
5378 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5380         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5381         incrementation.
5383 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5385         * solib-svr4.c (read_program_headers_from_bfd): Return
5386         gdb::optional<gdb::byte_vector>.
5387         (svr4_exec_displacement): Adjust.
5389 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5391         * solib-svr4.c (read_program_header): Return
5392         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5393         (find_program_interpreter): Return
5394         gdb::optional<gdb::byte_vector>.
5395         (scan_dyntag_auxv): Adjust.
5396         (enable_break): Adjust.
5397         (svr4_exec_displacement): Adjust.
5399 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5401         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5402         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5404 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5406         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5407         string_vprintf.
5408         * guile/scm-utils.c (gdbscm_printf): Likewise.
5409         * serial.c (serial_printf): Likewise.
5410         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5412 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5414         * stack.c (print_frame): Print frame architecture when printing on
5415         an MI output.
5416         * NEWS: Mention new "arch" attribute in frame output.
5418 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5420         * arch/aarch64.h (aarch64_regnum): Update comment.
5422 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5424         * NEWS: Add SVE to 8.2 section.
5426 2018-08-21  Pedro Alves  <palves@redhat.com>
5428         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5429         out from gdbscm_parse_function_args.
5430         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5431         gdbscm_parse_function_args_1.
5433 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5435         PR gdb/17816
5436         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5437         operator.
5439 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5441         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5443 2018-08-19  Michael Spang  <spang@google.com>
5445         PR gdb/11786
5446         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5447         for PT_TLS segments.
5449 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5451         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5452         dwarf_variable_value.
5453         * dwarf2-frame.c (class dwarf_expr_executor):
5454         Add override for dwarf_variable_value.
5455         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5456         (class symbol_needs_eval_context): Likewise.
5457         (indirect_synthetic_pointer): Add forward declaration.
5458         (sect_variable_value): New function.
5459         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5460         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5461         for DW_OP_GNU_variable_value.
5463 2018-08-16  Tom Tromey  <tom@tromey.com>
5465         * top.c (read_command_file): Update.
5466         (command_line_input): Remove "repeat" argument.
5467         * ada-lang.c (get_selections): Update.
5468         * linespec.c (decode_line_2): Update.
5469         * defs.h (command_line_input): Remove argument.
5470         * cli/cli-script.c (read_next_line): Update.
5471         * python/py-gdb-readline.c: Update.
5473 2018-08-17  Tom Tromey  <tom@tromey.com>
5475         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5476         command_line_input.
5478 2018-08-15  Tom Tromey  <tom@tromey.com>
5480         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5482 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5484         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5485         If used, use find_pc_partial_function to find address range
5486         to disassemble.
5487         * mi/mi-main.c (mi_cmd_list_features): Report
5488         "data-disassemble-a-option" feature.
5489         * NEWS: Mention new -data-disassemble option -a.
5491 2018-08-13  Tom Tromey  <tom@tromey.com>
5493         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5495 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5497         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5498         (aarch64_linux_collect_sve_regset): Likewise.
5499         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5500         * regcache.h (regcache_map_entry_size): New function.
5502 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5504         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5505         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5506         (SVE_HEADER_VL_LENGTH): Likewise.
5507         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5508         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5509         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5510         (SVE_HEADER_SIZE_OFFSET): Likewise.
5511         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5512         (SVE_HEADER_VL_OFFSET): Likewise.
5513         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5514         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5515         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5516         (SVE_HEADER_SIZE): Likewise.
5517         (aarch64_linux_core_read_vq): Add function.
5518         (aarch64_linux_core_read_description): Check for SVE section.
5520 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5522         * aarch64-fbsd-tdep.c
5523         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5524         collect_size.
5525         * aarch64-linux-tdep.c
5526         (aarch64_linux_iterate_over_regset_sections): Likewise.
5527         * alpha-linux-tdep.c
5528         (alpha_linux_iterate_over_regset_sections):
5529         * alpha-nbsd-tdep.c
5530         (alphanbsd_iterate_over_regset_sections): Likewise.
5531         * amd64-fbsd-tdep.c
5532         (amd64fbsd_iterate_over_regset_sections): Likewise.
5533         * amd64-linux-tdep.c
5534         (amd64_linux_iterate_over_regset_sections): Likewise.
5535         * arm-bsd-tdep.c
5536         (armbsd_iterate_over_regset_sections): Likewise.
5537         * arm-fbsd-tdep.c
5538         (arm_fbsd_iterate_over_regset_sections): Likewise.
5539         * arm-linux-tdep.c
5540         (arm_linux_iterate_over_regset_sections): Likewise.
5541         * corelow.c (get_core_registers_cb): Likewise.
5542         (core_target::fetch_registers): Likewise.
5543         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5544         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5545         * gdbarch.h (void): Regenerate.
5546         * gdbarch.sh: Add supply_size and collect_size.
5547         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5548         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5549         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5550         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5551         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5552         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5553         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5554         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5555         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5556         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5557         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5558         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5559         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5560         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5561         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5562         Likewise.
5563         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5564         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5565         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5566         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5567         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5568         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5569         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5570         Likewise.
5571         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5572         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5573         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5574         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5575         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5576         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5577         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5578         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5580 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5582         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5583         with string_printf.
5585 2018-08-10  Keith Seitz  <keiths@redhat.com>
5587         * compile/compile-c-support.c (add_code_header, add_code_footer):
5588         Move into policy class.
5589         (c_push_user_expression, pop_user_expression_nop)
5590         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5591         (compile_program): New host class.
5592         (c_compile_program): New typedef.
5593         (c_compute_porgram): Use c_compile_program.
5595 2018-08-10  Keith Seitz  <keiths@redhat.com>
5597         * compile/compile-internal.h (compile_instance::~compile_instance):
5598         Remove calls to htab_delete.
5599         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5600         * compile.c (compile_instance::compile_instance): Initialize
5601         htab unique pointers.
5602         (compile_instance::get_cached_type, compile_instance::insert_type)
5603         (compile_instance::error_symbol_once): Update for unique_ptr.
5605 2018-08-10  Keith Seitz  <keiths@redhat.com>
5607         * compile/compile-c-symbols.c (struct symbol_error)
5608         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5609         (compile_instance::insert_symbol_error)
5610         (compile_instance::error_symbol_once): Move to ...
5611         * compile/compile.c: ... here.
5613 2018-08-10  Keith Seitz  <keiths@redhat.com>
5615         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5616         instead of `new_compile_instance'.
5617         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5618         Update description.
5619         If the symbol error map is not initialized, create it.
5620         (generate_c_for_for_one_symbol): Do not check/initialize
5621         the symbol error map.
5622         * compile/compile-c-types.c (compile_c_instance): Make a class.
5623         Update all callers.
5624         (compile_instance::compile_instance): Initialize the type cache.
5625         (get_cached_type): New function.
5626         (insert_type): Update description.
5627         (compile_c_instance::m_default_cflags): Define.
5628         (convert_type): Update description.  Use get_cached_type.
5629         (delete_instance): Moved to destructor.
5630         (new_compile_instance): Moved to constructor.
5631         * compile/compile-c.h (compile_c_instance): Make class inheriting
5632         from compile_instance.
5633         <base>: Remove field.
5634         <type_map, symbol_err_map>: Move to base class.
5635         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5636         * compile/compile-internal.h (compile_instance): Make class.
5637         <type_map_t, symbol_err_map_t>: Define.
5638         <fe>: Rename to `m_gcc_fe'.
5639         <scope, block, gcc_target_options>: Add `m_' prefix.
5640         <m_type_map, m_symbol_err_map>: New fields, moved from
5641         compile_c_instance.
5642         <destroy>: Remove.
5643         (convert_type, new_compile_instance): Remove.
5644         * compile/compile.c (cleanup_compile_instance): Remove.
5645         (compile_to_object): Use unique_ptr to eliminate cleanups.
5646         (compile_instance::set_print_callback, compile_instance::version)
5647         (compile_instance::set_verbose)
5648         (compile_instance::set_driver_filename)
5649         (compile_instance::set_triplet_regexp)
5650         (compile_instance::set_arguments)
5651         (compile_instance::set_source_file)
5652         (compile_instance::compile): Define.
5654 2018-08-10  Keith Seitz  <keiths@redhat.com>
5656         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5657         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5658         gcc-c-fe.def to define C plugin.
5659         (delete_instance): Delete `c_plugin'.
5660         (new_compile_instance): Initialize `c_plugin'.
5661         * compile/compile-c.h: Include gcc_c_plugin.h.
5662         (struct compile_c_instance) <c_plugin>: New member.
5663         * gcc-c-plugin.h: New file.
5664         Update all callers with API change.
5666 2018-08-10  Keith Seitz  <keiths@redhat.com>
5668         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5669         (HFILES_NO_SRCDIR): ... to here.
5670         Add compile-internal.h and compile-c.h.
5671         * compile/compile-c-support.c: Include compile-c.h.
5672         * compile/compile-c-symbols.c: Include compile-c.h.
5673         (generate_c_for_variable_locations): Update comment.
5674         * compile/compile-c-types.c: Include compile-c.h.
5675         * compile/compile-c.h: New file -- moved C language declarations
5676         from other files here.
5677         * compile/compile-internal.h: Do not include hashtab.h or
5678         common/enum-flags.h.
5679         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5680         (gcc_convert_symbol, gcc_symbol_address)
5681         (generate_c_for_variable_locations, c_get_mode_for_size)
5682         (c_get_range_decl_name): Definitions moved to compile-c.h.
5683         * compile/compile-loc2c.c: Include compile-c.h.
5685 2018-08-10  Keith Seitz  <keiths@redhat.com>
5687         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5688         (c_symbol_substitution_name): ... this.
5689         Update all callers.
5691 2018-08-10  Keith Seitz  <keiths@redhat.com>
5693         * compile/compile-c-support.c (c_compute_program): Use
5694         unique_xmalloc_ptr to eliminate cleanup.
5695         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5696         Return a unique_xmalloc_ptr and eliminate cleanup.
5697         * compile/compile-internal.h (generate_c_for_variable_locations):
5698         Return unique_xmalloc_ptr and update description.
5700 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5702         * corelow.c (core_target::get_core_register_section): Rename
5703         min_size to section_min_size.
5705 2018-08-09  Jim Wilson  <jimw@sifive.com>
5707         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5708         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5709         * NEWS: Mention new GNU/Linux RISC-V target.
5710         * configure.host: Add riscv*-*-linux*.
5711         * configure.nat: Add riscv*.
5712         * configure.tgt: Add riscv*-*-linux*.
5713         * riscv-linux-nat.c: New file.
5714         * riscv-linux-tdep.c: New file.
5716 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5718         * infrun.c (resume): Make static, add forward declaration.
5719         (proceed): Update header comment.
5720         * infrun.h (resume): Delete declaration.
5722 2018-08-09  Tom Tromey  <tom@tromey.com>
5724         * riscv-tdep.h: Minor formatting fixes.
5726 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5728         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5729         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5730         (test_mkdir_recursive): Likewise.
5731         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5733 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5735         * valarith.c (value_subscripted_rvalue): If an array is not in
5736         memory, and we don't know the upper bound, then we can't know that
5737         the requested element exists or not.
5739 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5741         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5742         (target_options_to_string): Add comment.
5744 2018-08-08  Tom Tromey  <tom@tromey.com>
5746         * unittests/scoped_mmap-selftests.c: Check result of "write".
5748 2018-08-08  Jim Wilson  <jimw@sifive.com>
5750         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5751         (decode_register_index_short): New.
5752         (decode_j_type_insn, decode_cj_type_insn): New.
5753         (decode_b_type_insn, decode_cb_type_insn): New.
5754         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5755         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5756         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5757         is_c_sw_insn instead of is_sw_insn.
5758         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5759         (riscv_software_single_step): New.
5760         * riscv-tdep.h (riscv_software_single_step): Declare.
5762         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5763         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5765 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5767         PR gdb/18050:
5768         * target.c (dispose_inferior): Don't dispose of inferiors that are
5769         already killed.
5771 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5773         * remote.c (remote_target::download_tracepoint): Change char* to
5774         const char*.
5776 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5778         * target.h (target_options_to_string): Return an std::string.
5779         * target.c (str_comma_list_concat_elem): Return void, use
5780         std::string.
5781         (do_option): Likewise.
5782         (target_options_to_string): Return an std::string.
5783         * linux-nat.c (linux_nat_target::wait): Adjust.
5784         * target-debug.h (target_debug_print_options): Adjust.
5786 2018-08-07  Tom Tromey  <tom@tromey.com>
5788         * Makefile.in (CPPFLAGS): New variable.
5789         (INTERNAL_CPPFLAGS): Use it.
5791 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5793         * NEWS: Mention the index cache.
5795 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5797         * common/pathstuff.h (get_standard_cache_dir): New.
5798         * common/pathstuff.c (get_standard_cache_dir): New.
5799         * build-id.h (build_id_to_string): New.
5800         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5801         DEBUG_STR_SUFFIX): Move to here.
5802         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5803         DEBUG_STR_SUFFIX): Move from there.
5804         (write_psymtabs_to_index): Make non-static, add basename
5805         parameter.  Write to temporary files, rename when done.
5806         (save_gdb_index_command): Adjust call to
5807         write_psymtabs_to_index.
5808         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5809         field.
5810         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5811         (get_gdb_index_contents_from_cache): New.
5812         (get_gdb_index_contents_from_cache_dwz): New.
5813         (dwarf2_initialize_objfile): Read index from cache.
5814         (dwarf2_build_psymtabs): Save to index.
5815         * dwarf-index-cache.h: New file.
5816         * dwarf-index-cache.c: New file.
5817         * dwarf-index-write.h: New file.
5819 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5821         * gnulib/aclocal.m4: Re-generate.
5822         * gnulib/config.in: Re-generate.
5823         * gnulib/configure: Re-generate.
5824         * gnulib/import/Makefile.am: Re-generate.
5825         * gnulib/import/Makefile.in: Re-generate.
5826         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5827         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5828         * gnulib/import/m4/mkdir.m4: New file.
5829         * gnulib/import/mkdir.c: New file.
5830         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5831         module.
5833 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5835         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5836         * common/scoped_mmap.c: New file.
5837         * common/scoped_mmap.h (destroy): New method.
5838         (~scoped_mmap, reset): Use destroy.
5839         (scoped_mmap): New move constructor.
5840         (mmap_file): New declaration.
5841         * unittests/scoped_mmap-selftests.c (test_normal,
5842         test_invalid_filename, run_tests): New functions.
5843         (_initialize_scoped_mmap_selftests): Register selftest.
5845 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5847         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5848         (read_gdb_index_from_buffer): ... this.  Remove section
5849         parameter, add buffer parameter.
5850         (get_gdb_index_contents_ftype,
5851         get_gdb_index_contents_dwz_ftype): New typedefs.
5852         (dwarf2_read_gdb_index): Add callback parameters to get the
5853         index contents.
5854         (get_gdb_index_contents_from_section): New.
5855         (dwarf2_initialize_objfile): Update call to
5856         dwarf2_read_gdb_index.
5858 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5860         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5861         (gdb_open_cloexec): Likewise.
5862         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5863         (commandline_from_pid): Likewise.
5864         (linux_xfer_osdata_threads): Likewise.
5865         (linux_xfer_osdata_fds): Likewise.
5866         * ada-lang.c (is_package_name): Likewise.
5867         * auxv.c (procfs_xfer_auxv): Likewise.
5868         * breakpoint.c (print_one_breakpoint_location): Use
5869         uiout::field_fmt.
5870         (print_one_catch_solib): Use string_printf.
5871         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5872         (add_pe_forwarded_sym): Likewise.
5873         * dwarf2read.c (create_type_unit_group): Likewise.
5874         (build_error_marker_type): Likewise.
5875         * infcall.c (get_function_name): Likewise.
5876         * valprint.c (print_converted_chars_to_obstack): Likewise.
5877         * xtensa-tdep.c (xtensa_register_type): Likewise.
5879 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5881         * remote.c (remote_target::download_tracepoint): Fix format
5882         string errors.
5884 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5886         * tracefile.c: Include common/byte-vector.h.
5887         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5888         with trace_regblock_size if needed.  Update uses of buf.
5890 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5892         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5893         std::vector<unsigned char>.
5894         * tracepoint.c (collection_list::collection_list): Remove
5895         m_regs_mask initializer from initializer list.  Resize
5896         m_regs_mask using the largest remote register number.
5897         (collection_list::add_remote_register): Remove size check on
5898         m_regs_mask.  Use at to access element.
5899         (collection_list::stringify): Change type of temp_buf to
5900         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5901         stringify the register mask.  Use pack_hex_byte for the register
5902         mask.
5904 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5906         * tracepoint.h (class collection_list) <add_register>: Remove.
5907         <add_remote_register, add_ax_registers, add_local_register>:
5908         Declare.
5909         <add_memrange>: Add scope parameter.
5910         * tracepoint.c (encode_actions_1): Likewise.
5911         (collection_list::add_register): Rename to ...
5912         (collection_list::add_remote_register): ... this.  Update
5913         comment.
5914         (collection_list::add_ax_registers, add_local_register): New
5915         methods.
5916         (collection_list::add_memrange): Add scope parameter.  Call
5917         add_local_register instead of add_register.
5918         (finalize_tracepoint_aexpr): New function.
5919         (collection_list::collect_symbol): Update calls to add_memrange.
5920         Call add_local_register instead of add_register.  Call
5921         add_ax_registers.  Call finalize_tracepoint_aexpr.
5922         (encode_actions_1): Get remote regnos for $reg action.  Call
5923         add_remote_register, add_ax_registers, and add_local_register.
5924         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5925         (validate_actionline): Call finalize_tracepoint_aexpr.
5927 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5929         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5930         Replace array buf with gdb::char_vector buf, of size
5931         get_remote_packet_size ().  Replace references to buf and
5932         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5933         and xsnprintf with snprintf.  Raise errors if the buffer is too
5934         small.
5936 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5938         * remote.c (remote_target::download_tracepoint): Fix the has_more
5939         predicate in the QTDP action list iteration.
5941 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5943         * remote.c (remote_target::download_tracepoint): Fix indentation
5944         in for block.
5946 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5948         * proc-api.c (_initialize_proc_api): Remove c, unused.
5949         * procfs.c (procfs_init_inferior): Remove signals, unused.
5950         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5951         unused.
5953 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5954             Andrew Burgess  <andrew.burgess@embecosm.com>
5956         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5957         'W_STOPCODE (0)' as this could be ambiguous.
5959 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5961         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5962         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5963         "ai_socktype").
5965 2018-08-02  Tom Tromey  <tom@tromey.com>
5967         PR symtab/16842.
5968         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5969         symbols.
5970         (process_structure_scope): Likewise.
5972 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5974         PR gdb/22629:
5975         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5976         kill inferior.
5978 2018-08-02  Tom Tromey  <tom@tromey.com>
5980         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5981         (darwin_suspend_inferior, darwin_resume_inferior)
5982         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5983         (darwin_check_new_threads): Check result of get_darwin_inferior.
5985 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5987         GDB 8.1.1 released.
5989 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5991         * varobj.c (varobj_get_path_expr_parent): Report an error if
5992         parent is a dynamic varobj.
5994 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5996         * gnulib/aclocal.m4: Re-generate.
5997         * gnulib/config.in: Re-generate.
5998         * gnulib/configure: Re-generate.
5999         * gnulib/import/Makefile.in: Re-generate.
6000         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
6001         * gnulib/import/m4/onceonly.m4: Re-generate.
6003 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
6005         * target-descriptions.c (struct xml_test_tdesc): New.
6006         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
6007         (record_xml_tdesc): Update.
6008         (maintenance_check_xml_descriptions): Update.
6009         * target-descriptions.h (record_xml_tdesc): Update comment.
6011 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
6013         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
6014         checking array bounds are defined.
6016 2018-07-30  Tom Tromey  <tom@tromey.com>
6018         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
6019         irreflexivity violation.
6021 2018-07-30  Tom Tromey  <tom@tromey.com>
6023         * cli/cli-decode.c (lookup_cmd): Remove lint code.
6024         * value.c (unpack_long): Remove lint code.
6025         * valops.c (value_ind): Remove lint code.
6026         * valarith.c (value_x_binop, value_x_unop, value_equal)
6027         (value_pos): Remove lint code.
6029 2018-07-28  Tom de Vries  <tdevries@suse.de>
6031         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
6032         with undefined upper bound as <optimized out>.
6034 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
6036         * gcore.in: Rename variable "name" to "prefix".  Expand
6037         "usage" text.
6039 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
6041         * windows-nat.c (windows_nat_target::create_inferior): Update to
6042         call close() in global namespace.
6044 2018-07-26  Tom Tromey  <tom@tromey.com>
6046         * dwarf-index-write.c (add_address_entry): Don't add objfile
6047         offsets.
6048         * dbxread.c (find_stab_function): Rename from
6049         find_stab_function_addr.  Return a bound_minimal_symbol.
6050         (read_dbx_symtab): Use raw_text_low, raw_text_high.
6051         Don't add objfile offsets.
6052         (end_psymtab): Use raw_text_low, raw_text_high,
6053         MSYMBOL_VALUE_RAW_ADDRESS.
6054         (read_ofile_symtab): Update.
6055         (process_one_symbol): Update.
6056         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
6057         offsets.
6058         (dw2_relocate): Remove.
6059         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
6060         searching addrmap.
6061         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
6062         Update.
6063         (process_psymtab_comp_unit_reader, add_partial_symbol)
6064         (add_partial_subprogram, dwarf2_ranges_read): Update.
6065         (load_partial_dies): Update.
6066         (add_address_entry): Don't add objfile offsets.
6067         (dwarf2_build_include_psymtabs): Update.
6068         (create_addrmap_from_aranges): Don't add objfile offsets.
6069         (dw2_find_pc_sect_compunit_symtab): Update.
6070         * mdebugread.c (parse_symbol): Don't add objfile offsets.
6071         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
6072         Update.
6073         (parse_partial_symbols): Don't add objfile offsets.  Use
6074         raw_text_low, raw_text_high.  Update.
6075         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
6076         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
6077         or call 'relocate' quick function.  Clear psymbol_map.
6078         * psympriv.h (struct partial_symbol) <address>: Add section
6079         offset.
6080         <set_unrelocated_address>: Rename from set_address.
6081         <raw_text_low, raw_text_high>: New methods.
6082         <text_low, text_high>: Add objfile parameter.
6083         (add_psymbol_to_bcache): Add 'section' parameter.  Call
6084         set_unrelocated_address.
6085         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
6086         (find_pc_psymbol): Update.
6087         (fixup_psymbol_section, relocate_psymtabs): Remove.
6088         (dump_psymtab, psym_functions): Update.
6089         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
6090         parameter.
6091         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
6092         (start_psymtab_common): Update.
6093         * symfile-debug.c (debug_qf_relocate): Remove.
6094         (debug_sym_quick_functions): Update.
6095         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
6096         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
6097         Update.
6099 2018-07-26  Tom Tromey  <tromey@redhat.com>
6101         * dbxread.c (end_psymtab): Use text_high_valid and
6102         text_low_valid.
6103         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
6104         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
6105         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
6106         Update comment.
6107         <text_low_valid, text_high_valid>: New fields.
6108         <set_text_low, set_text_high>: Update.
6109         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
6111 2018-07-26  Tom Tromey  <tom@tromey.com>
6113         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
6114         Update.
6115         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
6116         textlow and texthigh fields.
6117         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
6118         Update.
6119         * mdebugread.c (parse_lines, parse_partial_symbols)
6120         (psymtab_to_symtab_1): Update.
6121         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
6122         Rename fields.  Update comment.  Now private.
6123         <text_low, text_high, set_text_low, set_text_high>: New methods.
6124         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
6125         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
6126         (start_psymtab_common, maintenance_info_psymtabs)
6127         (maintenance_check_psymtabs): Update.
6128         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
6129         texthigh fields.
6130         (scan_xcoff_symtab): Update.
6132 2018-07-26  Tom Tromey  <tromey@redhat.com>
6134         * psympriv.h (struct partial_symbol) <unrelocated_address,
6135         address, set_address>: New methods.
6136         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
6137         (fixup_psymbol_section, relocate_psymtabs): Update.
6138         (print_partial_symbols): Add 'objfile' parameter.  Update.
6139         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
6140         Update.
6142 2018-07-26  Tom Tromey  <tom@tromey.com>
6144         * dwarf-index-write.c (write_psymbols, debug_names::insert)
6145         (debug_names::write_psymbols): Update.
6146         * psympriv.h (struct partial_symbol): Derive from
6147         general_symbol_info.
6148         <obj_section>: New method.
6149         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
6150         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
6151         (find_pc_sect_psymbol, fixup_psymbol_section)
6152         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
6153         (print_partial_symbols, recursively_search_psymtabs)
6154         (compare_psymbols, psymbol_hash, psymbol_compare)
6155         (add_psymbol_to_bcache, maintenance_check_psymtabs)
6156         (psymbol_name_matches, psym_fill_psymbol_map): Update.
6158 2018-07-26  Tom Tromey  <tromey@redhat.com>
6160         * dbxread.c (end_psymtab): Remove dead code.
6162 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
6164         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
6165         DWARF unwinders are disabled.
6166         * dwarf2-frame.c: Add dwarf2read.h include.
6167         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
6168         disabled.
6169         (dwarf2_frame_unwinders_enabled_p): Define.
6170         (show_dwarf_unwinders_enabled_p): New function.
6171         (_initialize_dwarf2_frame): Register switch to control DWARF
6172         unwinder use.
6173         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
6174         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
6175         (show_dwarf_cmdlist): Remove static keyword.
6176         * dwarf2read.h (set_dwarf_cmdlist): Declare.
6177         (show_dwarf_cmdlist): Declare.
6178         * NEWS: Document new feature.
6180 2018-07-26  Tom de Vries  <tdevries@suse.de>
6182         PR breakpoints/23366
6183         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
6185 2018-07-26  Tom de Vries  <tdevries@suse.de>
6187         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
6188         DW_AT_count can't be translated to a dynamic prop.
6190 2018-07-25  Tom de Vries  <tdevries@suse.de>
6192         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
6193         try/catch.
6195 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
6197         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
6199 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
6201         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
6203 2018-07-24  Keith Seitz  <keiths@redhat.comt
6205         PR symtab/23010
6206         * dwarf2read.c (dw2_add_symbol_to_list): New function.
6207         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
6208         instead of add_symbol_to_list.
6209         (read_file_scope): Call prepare_one_comp_unit before reading
6210         any other DIEs.
6212 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
6214         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
6216 2018-07-24  Tom Tromey  <tom@tromey.com>
6218         * utils.c (malloc, realloc, free): Don't declare.
6219         * configure, config.in: Rebuild.
6220         * configure.ac: Don't check for declarations of free, malloc, or
6221         realloc.
6223 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
6225         * aarch64-linux-nat.c
6226         (aarch64_linux_nat_target::stopped_data_address): Remove unused
6227         variable.
6228         * arm-linux-nat.c (fetch_regs): Likewise.
6229         (store_regs): Likewise.
6230         (fetch_vfp_regs): Likewise.
6231         (store_vfp_regs): Likewise.
6232         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
6233         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
6234         (arm_linux_nat_target::insert_watchpoint): Likewise.
6235         (arm_linux_nat_target::remove_watchpoint): Likewise.
6236         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
6237         Likewise.
6238         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
6239         Likewise.
6240         * ppc-linux-nat.c (fetch_register): Likewise.
6241         (fetch_all_gp_regs): Likewise.
6242         (fetch_ppc_registers): Likewise.
6243         (store_all_gp_regs): Likewise.
6244         (store_ppc_registers): Likewise.
6245         (hwdebug_insert_point): Likewise.
6246         (can_use_watchpoint_cond_accel): Likewise.
6247         * remote-sim.c (gdb_os_write_stdout): Likewise.
6249 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
6250             Tom Tromey  <tom@tromey.com>
6252         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
6253         test for it.
6254         * configure: Rebuild.
6256 2018-07-22  Tom Tromey  <tom@tromey.com>
6258         * regformats/regdat.sh: Define xmltarget_${name} inside
6259         #ifndef IN_PROCESS_AGENT.
6261 2018-07-22  Tom Tromey  <tom@tromey.com>
6263         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6265 2018-07-22  Tom Tromey  <tom@tromey.com>
6267         * symfile.c (reread_symbols): Notify iter, not objfile.
6269 2018-07-22  Tom Tromey  <tom@tromey.com>
6271         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6272         Use arch_ops.
6273         (ravenscar_thread_target::prepare_to_store): Likewise.
6275 2018-07-22  Tom Tromey  <tom@tromey.com>
6277         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6278         unused variable.  Call value_fetch_lazy when needed.
6279         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6280         Remove unused variable.  Call value_fetch_lazy when needed.
6282 2018-07-22  Tom Tromey  <tom@tromey.com>
6284         * m32c-tdep.c (mark_dma): Return void.
6285         (make_regs): Remove unused declarations.
6287 2018-07-22  Tom Tromey  <tom@tromey.com>
6289         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6290         cmdscm_get_valid_command_smob_arg_unsafe for effect.
6291         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6292         bkscm_get_valid_block_smob_arg_unsafe for effect.
6294 2018-07-22  Tom Tromey  <tom@tromey.com>
6296         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6297         value_type.
6299 2018-07-22  Tom Tromey  <tom@tromey.com>
6301         * windows-nat.c (saved_context): Conditionally define.
6302         * remote.c (remote_target::remote_btrace_maybe_reopen):
6303         Conditionally declare "warned".
6304         * inflow.c (sigquit_ours): Conditionally define.
6305         (new_tty): Move "tty" declaration inside #if.
6306         * guile/guile.c (guile_datadir): Conditionally define.
6307         * charset.c (set_be_le_names): Move some declarations inside #if.
6308         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6309         #if.
6310         (parse_xml_btrace_conf): Likewise.
6312 2018-07-22  Tom Tromey  <tom@tromey.com>
6314         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6316 2018-07-22  Tom Tromey  <tom@tromey.com>
6318         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6319         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6320         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6321         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6322         * stack.c (frame_apply_level_command): Remove unused variable.
6323         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6324         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6325         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6326         unused variable.
6327         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6328         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6329         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6330         variable.
6331         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6332         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6333         variable.
6334         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6335         Remove unused variable.
6336         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6337         variable.
6338         * common/tdesc.c (print_xml_feature::visit): Remove unused
6339         variable.
6340         * compile/compile-object-load.c (store_regs): Remove unused
6341         variables.
6342         * complaints.c (clear_complaints): Remove unused variable.
6343         * corelow.c (core_target_open): Remove unused variable.
6344         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6345         variable.
6346         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6347         variable.
6348         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6349         variable.
6350         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6351         variable.
6352         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6353         variable.
6354         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6355         variable.
6356         * ia64-tdep.c (examine_prologue): Remove unused variable.
6357         * infcall.c (run_inferior_call): Remove unused variable.
6358         * inferior.c (exit_inferior): Remove unused variable.
6359         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6360         * linespec.c (decode_line_2): Remove unused variable.
6361         * linux-nat.c (super_close): Remove.
6362         * linux-tdep.c (linux_info_proc): Remove unused variable.
6363         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6364         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6365         Remove unused variable.
6366         * parse.c (find_minsym_type_and_address): Remove unused variable.
6367         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6368         variable.
6369         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6370         variable.
6371         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6372         variables.
6373         * record-btrace.c (record_btrace_target::store_registers): Remove
6374         unused variable.
6375         (cmd_show_record_btrace_cpu): Remove unused variable.
6376         * riscv-tdep.c (riscv_register_reggroup_p)
6377         (riscv_push_dummy_call, riscv_return_value): Remove unused
6378         variable.
6379         * rust-exp.y (literal): Remove unused variable.
6380         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6381         unused variable.
6382         <STRUCTOP_ANONYMOUS>: Likewise.
6383         * s390-linux-tdep.c (s390_linux_init_abi_31)
6384         (s390_linux_init_abi_64): Remove unused variable.
6385         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6386         (file_select_thread, net_windows_open, _initialize_ser_windows):
6387         Remove unused variables.
6388         * symtab.c (find_pc_sect_line): Remove unused variable.
6389         * target-memory.c (compute_garbled_blocks): Remove unused
6390         variable.
6391         (target_write_memory_blocks): Remove unused variable.
6392         * target.c (target_stack::unpush): Remove unused variables.
6393         * tracepoint.c (start_tracing, all_tracepoint_actions)
6394         (merge_uploaded_trace_state_variables)
6395         (print_one_static_tracepoint_marker): Remove unused variable.
6396         * unittests/basic_string_view/element_access/char/1.cc (test01):
6397         Remove unused variable.
6398         * windows-nat.c (windows_continue, windows_add_all_dlls)
6399         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6400         Remove unused variables.
6402 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6404         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6405         attr_profile in HAVE_ELF.
6406         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6407         HAVE_ELF.
6409 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6411         * frame.c (frame_register_unwind): Change parameter name.
6412         (frame_unwind_register): Likewise.
6413         (frame_unwind_register_value): Likewise.
6414         (frame_unwind_register_signed): Likewise.
6415         (frame_unwind_register_unsigned): Likewise.
6416         * frame.h (frame_register_unwind): Likewise.
6417         (frame_unwind_register): Likewise.
6418         (frame_unwind_register_value): Likewise.
6419         (frame_unwind_register_signed): Likewise.
6420         (frame_unwind_register_unsigned): Likewise.
6421         (frame_unwind_arch): Likewise.
6423 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6425         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6426         ISA maintenance.
6428 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6430         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6431         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6432         hand.
6434 2018-07-20  Keith Seitz  <keiths@redhat.com>
6436         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6437         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6438         m_compunit_symtab, m_language>: Add "m_" prefix.
6439         Update all uses.
6440         * buildsym.c: Update all uses.
6442 2018-07-20  Tom Tromey  <tom@tromey.com>
6444         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6445         * buildsym.h (record_line_ftype): Remove typedef.
6447 2018-07-20  Tom Tromey  <tom@tromey.com>
6449         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6450         (end_expandable_symtab): Likewise.
6451         (end_symtab_get_static_block): Likewise.
6452         (end_symtab_from_static_block): Likewise.
6453         * buildsym-legacy.c (augment_type_symtab): Remove.
6454         (end_expandable_symtab): Remove.
6455         (end_symtab_get_static_block): Remove.
6456         (end_symtab_from_static_block): Remove.
6458 2018-07-20  Tom Tromey  <tom@tromey.com>
6460         * dwarf2read.c: Include buildsym.h.
6461         (struct dwarf2_cu) <builder>: New method.
6462         (fixup_go_packaging): Update.
6463         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6464         use scoped_free_pendings.
6465         (using_directives): Add "cu" parameter, remove "language".
6466         (read_import_statement, setup_type_unit_groups, )
6467         (read_func_scope, read_lexical_block_scope)
6468         (dwarf2_record_block_ranges, read_namespace): Update.
6469         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6470         (lnp_state_machine::handle_end_sequence): Update.
6471         (class lnp_state_machine) <m_cu>: New member.
6472         <m_record_line_callback>: Remove.
6473         <m_currently_recording_lines>: New member.
6474         (lnp_state_machine::handle_set_file): Update.
6475         (noop_record_line): Remove.
6476         (dwarf_record_line_p): Add cu parameter.
6477         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6478         (lnp_state_machine::record_line)
6479         (lnp_state_machine::lnp_state_machine)
6480         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6481         (dwarf_decode_lines): Update.
6482         (dwarf2_start_subfile): Add cu parameter.
6483         (dwarf2_start_symtab, new_symbol): Update.
6484         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6485         Remove dwarf2_per_objfile parameter.
6486         (dwarf_decode_macros): Update.
6488 2018-07-20  Tom Tromey  <tom@tromey.com>
6490         * stabsread.c (define_symbol): Update.
6491         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6492         * dwarf2read.c (new_symbol): Update.
6493         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6494         * cp-namespace.c: Include buildsym.h.
6495         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6496         * buildsym-legacy.c (get_buildsym_compunit): New function.
6498 2018-07-20  Tom Tromey  <tom@tromey.com>
6500         * xcoffread.c: Include buildsym-legacy.h.
6501         * windows-nat.c: Include buildsym-legacy.h.
6502         * stabsread.c: Include buildsym-legacy.h.
6503         * mdebugread.c: Include buildsym-legacy.h.
6504         * buildsym-legacy.h: New file.
6505         * buildsym-legacy.c: New file, from buildsym.c.
6506         * go32-nat.c: Include buildsym-legacy.h.
6507         * dwarf2read.c: Include buildsym-legacy.h.
6508         * dbxread.c: Include buildsym-legacy.h.
6509         * cp-namespace.c: Include buildsym-legacy.h.
6510         * coffread.c: Include buildsym-legacy.h.
6511         * buildsym.h: Move some contents to buildsym-legacy.h.
6512         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6513         buildsym-legacy.c.
6514         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6516 2018-07-20  Tom Tromey  <tom@tromey.com>
6518         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6519         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6520         (buildsym_compunit::buildsym_compunit)
6521         (buildsym_compunit::~buildsym_compunit)
6522         (buildsym_compunit::get_macro_table): Define.
6524 2018-07-20  Tom Tromey  <tom@tromey.com>
6526         * buildsym.c (reset_symtab_globals): Remove.
6527         (buildsym_compunit::end_symtab_from_static_block): Update.
6528         (buildsym_compunit::augment_type_symtab): Update.
6529         (end_symtab_from_static_block): Call free_buildsym_compunit.
6530         (augment_type_symtab, end_symtab, end_expandable_symtab):
6531         Likewise.
6533 2018-07-20  Tom Tromey  <tom@tromey.com>
6535         * arch-utils.c: Do not include buildsym.h.
6536         * mipsread.c: Do not include buildsym.h.
6537         * machoread.c: Do not include buildsym.h.
6538         * elfread.c: Do not include buildsym.h.
6540 2018-07-20  Tom Tromey  <tom@tromey.com>
6542         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6543         initialization.
6544         (buildsym_compunit): Add new constructor.
6545         (struct buildsym_compunit) <get_last_source_file, finish_block,
6546         record_block_range, start_subfile, patch_subfile_names,
6547         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6548         set_last_source_start_addr, get_last_source_start_addr,
6549         get_local_using_directives, set_local_using_directives,
6550         get_global_using_directives, outermost_context_p,
6551         get_current_context_stack, get_context_stack_depth,
6552         get_current_subfile, get_local_symbols, get_file_symbols,
6553         get_global_symbols, record_debugformat, record_producer,
6554         push_context, pop_context, end_symtab_get_static_block,
6555         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6556         New public methods.
6557         <record_pending_block, finish_block_internal, make_blockvector,
6558         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6559         private methods.
6560         Update all users.
6562 2018-05-22  Tom Tromey  <tom@tromey.com>
6564         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6565         parameter.
6566         (finish_block_internal): Update.
6568 2018-07-20  Tom Tromey  <tom@tromey.com>
6570         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6571         parameter.
6572         (finish_block_internal): Update.
6574 2018-07-20  Tom Tromey  <tom@tromey.com>
6576         * buildsym.h (EXTERN): Don't define or undef.
6577         * buildsym.c (EXTERN): Don't define.
6579 2018-07-20  Tom Tromey  <tom@tromey.com>
6581         * buildsym.c: Remove TODO comment.
6583 2018-07-20  Tom Tromey  <tom@tromey.com>
6585         * coffread.c (coff_symtab_read): Update.
6586         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6587         (xcoff_new_init): Update.
6588         * mipsread.c (mipscoff_new_init): Update.
6589         * mdebugread.c (mdebug_build_psymtabs): Update.
6590         * elfread.c (elf_new_init): Update.
6591         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6592         Update.
6593         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6594         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6595         (stabsect_build_psymtabs): Update.
6596         * buildsym.h (buildsym_init): Don't declare.
6597         * buildsym.c: Update comment.
6598         (prepare_for_building): Remove.
6599         (start_symtab, restart_symtab): Update.
6600         (reset_symtab_globals): Update comment.
6601         (buildsym_init): Remove.
6603 2018-07-20  Tom Tromey  <tom@tromey.com>
6605         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6606         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6607         (read_enum_type, common_block_start, common_block_end)
6608         (cleanup_undefined_types_1, finish_global_stabs): Update.
6609         * mdebugread.c (psymtab_to_symtab_1): Update.
6610         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6611         (read_lexical_block_scope, new_symbol): Update.
6612         * dbxread.c (process_one_symbol): Update.
6613         * coffread.c (coff_symtab_read, process_coff_symbol)
6614         (coff_read_enum_type): Update.
6615         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6616         declare.
6617         (get_local_symbols, get_file_symbols, get_global_symbols): New
6618         functions.
6619         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6620         m_global_symbols.
6621         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6622         (~scoped_free_pendings): Update.
6623         (finish_block, prepare_for_building, reset_symtab_globals)
6624         (end_symtab_get_static_block, end_symtab_with_blockvector)
6625         (augment_type_symtab, push_context): Update.
6626         (get_local_symbols, get_file_symbols, get_global_symbols): New
6627         functions.
6628         (buildsym_init): Update.
6630 2018-07-20  Tom Tromey  <tom@tromey.com>
6632         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6633         (process_full_type_unit): Likewise.
6634         (dwarf2_start_symtab): Set list_in_scope.
6636 2018-07-20  Tom Tromey  <tom@tromey.com>
6638         * dwarf2read.c (process_psymtab_comp_unit_reader)
6639         (build_type_psymtabs_reader): Do not set list_in_scope.
6641 2018-07-20  Tom Tromey  <tom@tromey.com>
6643         * buildsym.c (free_pendings): Remove.
6644         (add_symbol_to_list, scoped_free_pendings)
6645         (finish_block_internal, buildsym_init): Update.
6647 2018-07-20  Tom Tromey  <tom@tromey.com>
6649         * xcoffread.c (read_xcoff_symtab): Update.
6650         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6651         Update.
6652         * dbxread.c (process_one_symbol): Update.
6653         * coffread.c (coff_symtab_read): Update.
6654         * buildsym.h (finish_block): Update.
6655         * buildsym.c (finish_block): Remove "listhead" argument.
6656         (end_symtab_get_static_block): Update.
6658 2018-07-20  Tom Tromey  <tom@tromey.com>
6660         * buildsym.h (class scoped_free_pendings): Remove constructor.
6661         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6662         method.
6663         <m_pending_block_obstack, m_pending_blocks>: New members.
6664         (pending_block_obstack, pending_blocks): Remove.
6665         (scoped_free_pendings::scoped_free_pendings): Default.
6666         (~scoped_free_pendings): Update.
6667         (free_pending_blocks): Remove.
6668         (finish_block_internal, record_pending_block, make_blockvector)
6669         (end_symtab_get_static_block, augment_type_symtab, push_context)
6670         (buildsym_init): Update.
6672 2018-07-20  Tom Tromey  <tom@tromey.com>
6674         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6675         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6676         members.
6677         (pending_addrmap, pending_addrmap_obstack)
6678         (pending_addrmap_interesting): Remove.
6679         (scoped_free_pendings, record_block_range, make_blockvector)
6680         (prepare_for_building, reset_symtab_globals, buildsym_init):
6681         Update.
6683 2018-07-20  Tom Tromey  <tom@tromey.com>
6685         * xcoffread.c (process_linenos): Update.
6686         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6687         * mdebugread.c (psymtab_to_symtab_1): Update.
6688         * dwarf2read.c (setup_type_unit_groups)
6689         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6690         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6691         * dbxread.c (process_one_symbol): Update.
6692         * coffread.c (coff_symtab_read, enter_linenos)
6693         (process_coff_symbol): Update.
6694         * buildsym.h (current_subfile): Don't declare.
6695         (get_current_subfile): Declare.
6696         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6697         member.
6698         (start_subfile, free_buildsym_compunit, push_subfile)
6699         (prepare_for_building, start_symtab): Update.
6700         (get_current_subfile): New function.
6702 2018-07-20  Tom Tromey  <tom@tromey.com>
6704         * coffread.c (coff_symtab_read): Update.
6705         * xcoffread.c (read_xcoff_symtab): Update.
6706         * dwarf2read.c (new_symbol): Update.
6707         (read_func_scope, read_lexical_block_scope): Update.
6708         * dbxread.c (process_one_symbol): Update.
6709         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6710         (outermost_context_p): Remove macro.
6711         (outermost_context_p, get_current_context_stack)
6712         (get_context_stack_depth): Declare.
6713         (pop_context): Return struct context_stack.
6714         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6715         member.
6716         (context_stack_size): Remove.
6717         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6718         (prepare_for_building, end_symtab_get_static_block)
6719         (augment_type_symtab, push_context): Update.
6720         (pop_context): Return struct context_stack.
6721         (outermost_context_p, get_current_context_stack)
6722         (get_context_stack_depth): New functions.
6723         (buildsym_init): Update.
6725 2018-07-20  Tom Tromey  <tom@tromey.com>
6727         * rust-exp.y: Now a pure parser.  Update all rules.
6728         (%union): Move earlier.
6729         (current_parser, work_obstack): Remove globals.
6730         (rust_parser, ~rust_parser): Update.
6731         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6732         lex_character, lex_number, lex_string, lex_identifier,
6733         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6734         convert_name, convert_params_to_expression,
6735         convert_ast_to_expression, ast_basic_type, ast_operation,
6736         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6737         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6738         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6739         ast_array_type, ast_slice_type, ast_reference_type,
6740         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6741         (rust_parse): Update.
6742         (rustyyerror, rustyylex): Add parser parameter.
6743         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6744         (rust_lex_stringish_test, rust_lex_test_sequence)
6745         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6746         (rust_lex_test_push_back, rust_lex_tests): Update.
6748 2018-07-19  Pedro Alves  <palves@redhat.com>
6750         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6751         gdb::unique_xmalloc_ptr.
6752         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6753         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6754         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6755         copy-initialization.
6756         * guile/scm-pretty-print.c (ppscm_print_children): Use
6757         gdb::unique_xmalloc_ptr instead of cleanups.
6758         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6759         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6760         gdb::unique_xmalloc_ptr.
6761         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6762         Adjust to use gdb::unique_xmalloc_ptr.
6763         * guile/scm-utils.c (extract_arg): Adjust.
6764         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6765         gdb::unique_xmalloc_ptr instead of a cleanup.
6767 2018-07-19  Tom Tromey  <tom@tromey.com>
6769         * utils.c (do_value_free_to_mark)
6770         (make_cleanup_value_free_to_mark): Remove.
6771         * utils.h (make_cleanup_value_free_to_mark): Remove.
6773 2018-07-19  Pedro Alves  <palves@redhat.com>
6775         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6776         forwarding reference.
6778 2018-07-18  Pedro Alves  <palves@redhat.com>
6780         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6781         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6782         cleanup.
6784 2018-07-18  Pedro Alves  <palves@redhat.com>
6786         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6787         exceptions.
6788         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6789         (gdbscm_wrap): New.
6790         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6791         directly instead of a cleanup.
6792         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6793         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6794         (vlscm_binop_gdbthrow): New, factored out from ...
6795         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6796         (vlscm_rich_compare): Use gdbscm_wrap.
6797         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6798         instead of a cleanup.
6799         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6800         cleanup.
6801         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6802         Use xfree directly instead of a cleanup.
6803         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6804         Adjust to use gdbscm_wrap and scoped_value_mark.
6805         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6806         (gdbscm_value_address, gdbscm_value_dereference)
6807         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6808         scoped_value_mark.
6809         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6810         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6811         scoped_value_mark.
6812         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6813         gdbscm_wrap and scoped_value_mark.
6814         (gdbscm_value_to_string): Use xfree directly instead of a
6815         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6816         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6817         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6818         scoped_value_mark.
6819         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6820         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6821         scoped_value_mark.
6822         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6823         gdbscm_wrap.
6825 2018-07-18  Tom de Vries  <tdevries@suse.de>
6827         * findvar.c (default_read_var_value): Also resolve dynamic type for
6828         LOC_OPTIMIZED_OUT vars.
6830 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6832         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6833         decoding.
6835 2018-07-17  Tom Tromey  <tom@tromey.com>
6837         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6838         (compute_enum_list, pascm_set_param_value_x)
6839         (gdbscm_parameter_value): Update.
6840         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6841         (gdbscm_scm_to_host_string): Update.
6842         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6843         Update.
6844         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6845         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6846         * guile/scm-string.c (gdbscm_scm_to_string): Return
6847         unique_xmalloc_ptr.
6848         (gdbscm_scm_to_host_string): Likewise.
6850 2018-07-17  Tom Tromey  <tom@tromey.com>
6852         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6853         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6854         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6855         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6856         unique_xmalloc_ptr.
6858 2018-07-17  Tom Tromey  <tom@tromey.com>
6860         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6861         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6862         Update.
6863         * guile/scm-cmd.c (cmdscm_function): Update.
6864         * guile/scm-pretty-print.c
6865         (ppscm_print_exception_unless_memory_error): Update.
6866         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6867         Return unique_xmalloc_ptr.
6869 2018-07-17  Tom Tromey  <tom@tromey.com>
6871         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6872         Use string_printf.
6874 2018-07-17  Jim Wilson  <jimw@sifive.com>
6876         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6877         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6878         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6879         unecessary braces after EF_RISCV_RVC test.  Delete call to
6880         set_gdbarch_decr_pc_after_break.
6882         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6883         RISCV_LAST_FP_REGNUM + 1.
6884         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6886 2018-07-17  Tom Tromey  <tom@tromey.com>
6888         * configure.ac: Remove --disable-gdbcli.
6889         * configure: Rebuild.
6890         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6891         (SUBDIR_CLI_CFLAGS): Remove.
6892         (SFILES): Use SUBDIR_CLI_SRCS.
6893         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6895 2018-07-17  Tom Tromey  <tom@tromey.com>
6897         PR gdb/18624:
6898         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6900 2018-07-16  Jim Wilson  <jimw@sifive.com>
6902         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6904 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6906         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6907         variable.
6908         (libunwind_frame_sniffer): Likewise.
6909         (libunwind_frame_prev_register): Likewise.
6910         (libunwind_sigtramp_frame_sniffer): Likewise.
6911         * ia64-tdep.c (ia64_access_reg): Likewise.
6912         (ia64_access_rse_reg): Likewise.
6913         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6914         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6916 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6918         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6920 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6922         * remote-sim.c (gdbsim_target::close,
6923         gdbsim_target::mourn_inferior): Remove unused variables.
6925 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6927         * ia64-tdep.c (ktab_buf): New global.
6928         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6929         (get_kernel_table): Adjust.
6931 2018-07-16  Tom Tromey  <tom@tromey.com>
6933         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6934         * dwarf2read.c (using_directives, new_symbol): Use
6935         outermost_context_p.
6936         * dbxread.c (process_one_symbol): Use outermost_context_p.
6937         * coffread.c (coff_symtab_read): Use outermost_context_p.
6939 2018-07-16  Tom Tromey  <tom@tromey.com>
6941         * dwarf2read.c (using_directives, read_func_scope)
6942         (read_lexical_block_scope): Update.
6943         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6944         * buildsym.h (local_using_directives, global_using_directives):
6945         Don't declare.
6946         (get_local_using_directives, set_local_using_directives)
6947         (get_global_using_directives): Declare.
6948         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6949         m_global_using_directives>: New members.
6950         (finish_block_internal, prepare_for_building)
6951         (reset_symtab_globals, end_symtab_get_static_block)
6952         (push_context): Update.
6953         (get_local_using_directives, set_local_using_directives)
6954         (get_global_using_directives): New functions.
6955         (buildsym_init): Update.
6957 2018-07-16  Tom Tromey  <tom@tromey.com>
6959         * xcoffread.c (xcoff_initial_scan): Don't call
6960         free_pending_blocks.
6961         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6962         * buildsym.h (class scoped_free_pendings): Add constructor.
6963         (free_pending_blocks): Don't declare.
6964         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6965         (free_pending_blocks): Now static.
6967 2018-07-16  Tom Tromey  <tom@tromey.com>
6969         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6970         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6971         member.
6972         (struct subfile_stack): Remove.
6973         (subfile_stack): Remove.
6974         (push_subfile, pop_subfile, buildsym_init): Update.
6976 2018-07-16  Tom Tromey  <tom@tromey.com>
6978         * buildsym.c (push_subfile): Use gdb_assert.
6979         (pop_subfile): Use gdb_assert.
6981 2018-07-16  Tom Tromey  <tom@tromey.com>
6983         * buildsym.h (merge_symbol_lists): Remove.
6984         * buildsym.c (merge_symbol_lists): Remove.
6986 2018-07-16  Tom Tromey  <tom@tromey.com>
6988         * stabsread.c (scan_file_globals): Update comment.
6989         * stabsread.h (scan_file_globals): Move from buildsym.h.
6990         * buildsym.h (scan_file_globals): Move to stabsread.h.
6992 2018-07-16  Tom Tromey  <tom@tromey.com>
6994         * xcoffread.c (xcoff_new_init): Update.
6995         * mipsread.c (mipscoff_new_init): Update.
6996         * mdebugread.c (mdebug_build_psymtabs): Update.
6997         * elfread.c (elf_new_init): Update.
6998         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6999         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
7000         * buildsym.h (buildsym_new_init): Don't declare.
7001         * buildsym.c (buildsym_new_init): Remove.
7003 2018-07-16  Tom Tromey  <tom@tromey.com>
7005         * stabsread.h (within_function): Move from buildsym.h.
7006         * stabsread.c (start_stabs): Clear within_function.
7007         * coffread.c (coff_start_symtab): Clear within_function.
7008         * buildsym.h (within_function): Move to stabsread.h.
7009         * buildsym.c (prepare_for_building): Update.
7011 2018-07-16  Tom Tromey  <tom@tromey.com>
7013         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
7014         * dwarf2read.c (dwarf2_start_symtab): Don't set
7015         processing_gcc_compilation.
7016         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
7018 2018-07-16  Tom Tromey  <tom@tromey.com>
7020         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
7021         (next_symbol_text_func): Move from buildsym.h.
7022         * stabsread.c (hashname): Move from buildsym.c.
7023         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
7024         (next_symbol_text_func, hashname): Move to stabsread.h.
7025         * buildsym.c: Don't include bcache.h
7026         (hashname): Move to stasbread.c.
7028 2018-07-16  Tom Tromey  <tom@tromey.com>
7030         * buildsym.h (context_stack_size): Don't declare.
7031         * buildsym.c (context_stack_size): New global.
7033 2018-07-16  Tom Tromey  <tom@tromey.com>
7035         * dbxread.c (processing_acc_compilation): New global.
7036         * buildsym.h (processing_acc_compilation): Don't declare.
7038 2018-07-16  Tom Tromey  <tom@tromey.com>
7040         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
7041         * dbxread.c (read_ofile_symtab): Update.
7042         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
7043         * buildsym.h (last_source_start_addr): Remove.
7044         (set_last_source_start_addr, get_last_source_start_addr):
7045         Declare.
7046         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
7047         parameter.
7048         (struct buildsym_compunit) <m_last_source_start_addr>: New
7049         member.
7050         (prepare_for_building): Remove start_addr parameter.
7051         (start_symtab, restart_symtab, end_symtab_get_static_block)
7052         (end_symtab_with_blockvector): Update.
7053         (set_last_source_start_addr, get_last_source_start_addr): New
7054         functions.
7056 2018-07-16  Tom Tromey  <tom@tromey.com>
7058         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
7059         member.
7060         (have_line_numbers): Remove.
7061         (record_line, prepare_for_building, end_symtab_get_static_block)
7062         (augment_type_symtab): Update.
7064 2018-07-16  Tom Tromey  <tom@tromey.com>
7066         * buildsym.c (~buildsym_compunit): Free the macro table.
7067         (struct buildsym_compunit) <get_macro_table, release_macros>: New
7068         methods.
7069         <m_pending_macros>: New member.
7070         (pending_macros): Remove.
7071         (~scoped_free_pendings, get_macro_table, prepare_for_building)
7072         (reset_symtab_globals, end_symtab_get_static_block)
7073         (end_symtab_with_blockvector, augment_type_symtab)
7074         (buildsym_init): Update.
7076 2018-07-16  Tom Tromey  <tom@tromey.com>
7078         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
7079         parameter.
7080         (buildsym_compunit::set_last_source_file): New method.
7081         <m_last_source_file>: New member.
7082         (prepare_for_building): Remove "name" parameter.
7083         (start_symtab, restart_symtab, reset_symtab_globals): Update.
7084         (last_source_file): Remove.
7085         (set_last_source_file, get_last_source_file): Update.
7087 2018-07-16  Tom Tromey  <tom@tromey.com>
7089         * buildsym.c (prepare_for_building): Add assert.
7091 2018-07-16  Tom Tromey  <tom@tromey.com>
7093         * buildsym.c (~buildsym_compunit): Update.
7094         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
7095         (start_subfile, patch_subfile_names)
7096         (end_symtab_with_blockvector): Update.
7098 2018-07-16  Tom Tromey  <tom@tromey.com>
7100         * buildsym.c (struct buildsym_compunit): Add constructor,
7101         destructor, initializers.
7102         (start_buildsym_compunit): Remove.
7103         (free_buildsym_compunit): Use "delete".
7104         (start_symtab, restart_symtab): Use "new".
7106 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
7108         * symfile.c (set_objfile_default_section_offset): Remove struct
7109         keyword.
7111 2018-07-14  Stafford Horne  <shorne@gmail.com>
7113         * (Responsible Maintainers): Add myself as or1k maintainer.
7115 2018-07-13  Tom Tromey  <tom@tromey.com>
7117         * symfile.c (set_objfile_default_section_offset): Use extra braces
7118         around initializer.
7120 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7122         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
7123         non-branching basr.
7125 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7127         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7128         unittests/cli-utils-selftests.c
7129         * unittests/cli-utils-selftests.c: New file.
7131 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7133         * NEWS: Mention new commands. Mention change to 'thread apply'.
7135 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7137         * thread.c (thr_try_catch_cmd): New function.
7138         (thread_apply_all_command): Handle qcs flags.
7139         (thread_apply_command): Handle qcs flags.
7140         (taas_command): New function.
7141         (tfaas_command): New function.
7142         (_initialize_thread): Update to setup the new commands 'taas
7143         and 'tfaas'. Change doc string for 'thread apply'.
7145 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7147         * stack.c: (trailing_outermost_frame): New function, mostly
7148         extracted from backtrace_command_1.
7149         (leading_innermost_frame): New function.
7150         (backtrace_command_1): Update to call trailing_outermost_frame.
7151         (frame_apply_command_count): New function.
7152         (frame_apply_level_command): New function.
7153         (frame_apply_all_command): New function.
7154         (frame_apply_command): New function.
7155         (faas_command): New function.
7156         (frame_cmd_list): New variable.
7157         (_initialize_stack): Update to setup the new commands 'frame apply'
7158         and 'faas'.
7160 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7162         * cli-utils.c (number_or_range_parser::get_number): Only handle
7163         numbers or convenience var as numbers.
7164         (parse_flags): New function.
7165         (parse_flags_qcs): New function.
7166         (number_or_range_parser::finished): Ensure parsing end is detected
7167         before end of string.
7168         * cli-utils.h (parse_flags): New function.
7169         (parse_flags_qcs): New function.
7170         (number_or_range_parser): Remove m_finished bool.
7171         (number_or_range_parser::skip_range): Set m_in_range to false.
7173 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7175         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
7176         on Windows.
7178 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
7179             Jan Kratochvil  <jan.kratochvil@redhat.com>
7180             Paul Fertser  <fercerpav@gmail.com>
7181             Tsutomu Seki  <sekiriki@gmail.com>
7182             Pedro Alves  <palves@redhat.com>
7184         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7185         'unittests/parse-connection-spec-selftests.c'.
7186         (COMMON_SFILES): Add 'common/netstuff.c'.
7187         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
7188         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
7189         * common/netstuff.c: New file.
7190         * common/netstuff.h: New file.
7191         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
7192         (wait_for_connect): Update comment.  New parameter
7193         'gdb::optional<int> sock' instead of 'struct serial *scb'.
7194         Use 'sock' directly instead of 'scb->fd'.
7195         (try_connect): New function, with code from 'net_open'.
7196         (net_open): Rewrite main loop to deal with multiple
7197         sockets/addresses.  Handle IPv6-style hostnames; implement
7198         support for IPv6 connections.
7199         * unittests/parse-connection-spec-selftests.c: New file.
7201 2018-07-11  Pedro Alves  <palves@redhat.com>
7203         PR gdb/23377
7204         * remote.c (remote_target::remote_detach_pid): Call
7205         set_current_process.
7207 2018-07-11  Pedro Alves  <palves@redhat.com>
7209         * h8300-tdep.c (h8300_gdbarch_init): Remove
7210         set_gdbarch_ecoff_reg_to_regnum calls.
7212 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
7214         PR c++/23373
7215         * c-typeprint.c (c_type_print_base_struct_union): Don't print
7216         offsets/sizes for static members of a class/struct.
7218 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
7220         * target-descriptions.c (tdesc_register_bitsize): Rename.
7221         * target-descriptions.h (tdesc_register_bitsize): Likewise.
7222         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
7223         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
7225 2018-07-10  Tom Tromey  <tom@tromey.com>
7227         * breakpoint.c (moribund_locations): Now static and a
7228         std::vector.
7229         (breakpoint_init_inferior, moribund_breakpoint_here_p)
7230         (build_bpstat_chain, update_global_location_list)
7231         (breakpoint_retire_moribund): Update.
7232         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
7233         VEC.
7235 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7237         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
7238         (riscv_register_reggroup_p): Use new function, remove unneeded
7239         parenthesis.
7240         (riscv_push_dummy_call): Extend assert to compare against xlen or
7241         flen based on register type.
7243 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7245         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
7247 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
7249         * remote.c (show_hardware_watchpoint_limit): New function.
7250         (show_hardware_watchpoint_length_limit): New function.
7251         (show_hardware_breakpoint_limit): New function.
7252         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
7253         where appropriate, update help text.
7255 2018-07-09  Tom Tromey  <tom@tromey.com>
7257         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
7258         (CLIBS): Don't mention NAT_CLIBS.
7260 2018-07-09  Tom Tromey  <tom@tromey.com>
7262         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7263         (LIBGDB_OBS, clean mostlyclean): Update.
7264         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7266 2018-07-09  Tom Tromey  <tom@tromey.com>
7268         * Makefile.in (%.c: %.y): Use ECHO_YACC.
7269         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
7270         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7272 2018-07-09  Tom Tromey  <tom@tromey.com>
7274         * Makefile.in (ALLDEPFILES): Remove exec.c.
7275         (COMMON_OBS): Remove exec.o.
7276         (COMMON_SFILES): Add exec.c.
7278 2018-07-09  Tom Tromey  <tom@tromey.com>
7280         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7282 2018-07-09  Tom Tromey  <tom@tromey.com>
7284         * Makefile.in (clean mostlyclean): Remove stamp-version.
7285         (version.c): Depend on stamp-version.
7286         (stamp-version): New rule, from version.c rule.
7288 2018-07-09  Tom Tromey  <tom@tromey.com>
7290         * Makefile.in (init.c): Depend on stamp-init.
7291         (stamp-init): New rule, from init.c rule.
7292         (clean mostlyclean): Remove stamp-init.
7294 2018-07-09  Tom Tromey  <tom@tromey.com>
7296         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7297         SUBDIR_GCC_COMPILE_SRCS.
7299 2018-07-09  Tom Tromey  <tom@tromey.com>
7301         * Makefile.in (init.c): Remove some unused sed rules.
7303 2018-07-09  Tom Tromey  <tom@tromey.com>
7305         * Makefile.in (TSOBS): Remove.
7306         (INIT_FILES): Update.
7307         (LIBGDB_OBS): Update.
7308         (COMMON_SFILES): Add inflow.c.
7309         (SFILES): Remove inflow.c.
7311 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7313         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7315 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7317         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7318         get_saveloc_name, is_signal_frame_name, step_name,
7319         init_remote_name, create_addr_space_name,
7320         destroy_addr_space_name, search_unwind_table_name,
7321         find_dyn_list_name): Constify.
7323 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7325         * darwin-nat.c (darwin_pthread_kill): New function.
7326         (darwin_resume_thread): Use darwin_pthread_kill.
7328 2018-07-05  Tom de Vries  <tdevries@suse.de>
7330         * macroexp.c (macro_buffer) <operator=>: New member function.
7332 2018-07-04  Tom Tromey  <tom@tromey.com>
7334         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7336 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7338         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7339         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7340         * maint.c: Likewise.
7341         * top.c: Likewise.
7343 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7345         * NEWS: Create a new section for the next release branch.
7346         Rename the section of the current branch, now that it has
7347         been cut.
7349 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7351         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7352         * version.in: Bump version to 8.2.50.DATE-git.
7354 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7355             Pedro Alves  <palves@redhat.com>
7357         * linux-nat.c (linux_init_ptrace): Rename to ...
7358         (linux_init_ptrace_procfs): ... this.  Call
7359         linux_proc_init_warnings.
7360         (linux_nat_target::post_attach)
7361         (linux_nat_target::post_startup_inferior): Adjust.
7362         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7363         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7365 2018-07-04  Tom de Vries  <tdevries@suse.de>
7367         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7368         check ...
7369         (read_comp_unit_head): ... here.
7371 2018-07-03  Tom Tromey  <tom@tromey.com>
7373         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7374         (stop_tracing, tstatus_command)
7375         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7376         (print_one_static_tracepoint_marker): Update.
7377         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7378         std::vector.
7379         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7380         VEC.
7381         (all_tracepoints, static_tracepoints_here): Return std::vector.
7383 2018-07-03  Tom Tromey  <tom@tromey.com>
7385         * common/ptid.c (ptid_equal): Remove.
7386         * common/ptid.h (ptid_equal): Don't declare.
7387         * ada-tasks.c: Update.
7388         * breakpoint.c: Update.
7389         * common/agent.c: Update.
7390         * corelow.c: Update.
7391         * darwin-nat-info.c: Update.
7392         * darwin-nat.c: Update.
7393         * dcache.c: Update.
7394         * dtrace-probe.c: Update.
7395         * dummy-frame.c: Update.
7396         * fbsd-nat.c: Update.
7397         * frame.c: Update.
7398         * gdbthread.h: Update.
7399         * gnu-nat.c: Update.
7400         * go32-nat.c: Update.
7401         * inf-loop.c: Update.
7402         * inf-ptrace.c: Update.
7403         * infcall.c: Update.
7404         * infcmd.c: Update.
7405         * inflow.c: Update.
7406         * infrun.c: Update.
7407         * linux-fork.c: Update.
7408         * linux-nat.c: Update.
7409         * linux-thread-db.c: Update.
7410         * mi/mi-cmd-var.c: Update.
7411         * mi/mi-interp.c: Update.
7412         * mi/mi-main.c: Update.
7413         * nto-procfs.c: Update.
7414         * ppc-linux-tdep.c: Update.
7415         * procfs.c: Update.
7416         * python/py-inferior.c: Update.
7417         * python/py-record-btrace.c: Update.
7418         * python/py-record.c: Update.
7419         * ravenscar-thread.c: Update.
7420         * regcache.c: Update.
7421         * remote-sim.c: Update.
7422         * remote.c: Update.
7423         * sol-thread.c: Update.
7424         * solib.c: Update.
7425         * target.c: Update.
7426         * tui/tui-stack.c: Update.
7427         * varobj.c: Update.
7428         * windows-nat.c: Update.
7429         * windows-tdep.c: Update.
7431 2018-07-03  Tom Tromey  <tom@tromey.com>
7433         * common/ptid.c (ptid_match): Remove.
7434         * common/ptid.h (ptid_match): Don't declare.
7435         * fbsd-nat.c: Update.
7436         * infcmd.c: Update.
7437         * infrun.c: Update.
7438         * linux-nat.c: Update.
7439         * record-btrace.c: Update.
7440         * regcache.c: Update.
7441         * remote.c: Update.
7443 2018-07-03  Tom Tromey  <tom@tromey.com>
7445         * common/ptid.c (ptid_tid_p): Remove.
7446         * common/ptid.h (ptid_tid_p): Don't declare.
7447         * sol-thread.c: Update.
7449 2018-07-03  Tom Tromey  <tom@tromey.com>
7451         * common/ptid.c (ptid_lwp_p): Remove.
7452         * common/ptid.h (ptid_lwp_p): Don't declare.
7453         * fbsd-nat.c: Update.
7454         * linux-nat.c: Update.
7455         * nat/linux-procfs.c: Update.
7456         * nat/x86-linux-dregs.c: Update.
7457         * sol-thread.c: Update.
7459 2018-07-03  Tom Tromey  <tom@tromey.com>
7461         * common/ptid.c (ptid_is_pid): Remove.
7462         * common/ptid.h (ptid_is_pid): Don't declare.
7463         * infrun.c: Update.
7464         * linux-nat.c: Update.
7465         * mi/mi-interp.c: Update.
7466         * remote.c: Update.
7467         * thread.c: Update.
7469 2018-07-03  Tom Tromey  <tom@tromey.com>
7471         * common/ptid.c (ptid_get_tid): Remove.
7472         * common/ptid.h (ptid_get_tid): Don't declare.
7473         * ada-tasks.c: Update.
7474         * aix-thread.c: Update.
7475         * bsd-uthread.c: Update.
7476         * darwin-nat.c: Update.
7477         * fbsd-nat.c: Update.
7478         * i386-darwin-nat.c: Update.
7479         * infrun.c: Update.
7480         * linux-tdep.c: Update.
7481         * nto-procfs.c: Update.
7482         * ppc-ravenscar-thread.c: Update.
7483         * python/py-infthread.c: Update.
7484         * ravenscar-thread.c: Update.
7485         * sol-thread.c: Update.
7486         * sparc-ravenscar-thread.c: Update.
7487         * windows-nat.c: Update.
7489 2018-07-03  Tom Tromey  <tom@tromey.com>
7491         * common/ptid.c (ptid_get_lwp): Remove.
7492         * common/ptid.h (ptid_get_lwp): Don't declare.
7493         * aarch64-linux-nat.c: Update.
7494         * ada-tasks.c: Update.
7495         * aix-thread.c: Update.
7496         * amd64-linux-nat.c: Update.
7497         * arm-linux-nat.c: Update.
7498         * corelow.c: Update.
7499         * fbsd-nat.c: Update.
7500         * fbsd-tdep.c: Update.
7501         * gnu-nat.c: Update.
7502         * i386-cygwin-tdep.c: Update.
7503         * i386-gnu-nat.c: Update.
7504         * i386-linux-nat.c: Update.
7505         * ia64-linux-nat.c: Update.
7506         * inf-ptrace.c: Update.
7507         * infrun.c: Update.
7508         * linux-fork.c: Update.
7509         * linux-nat.c: Update.
7510         * linux-tdep.c: Update.
7511         * linux-thread-db.c: Update.
7512         * mips-linux-nat.c: Update.
7513         * nat/aarch64-linux-hw-point.c: Update.
7514         * nat/aarch64-linux.c: Update.
7515         * nat/linux-btrace.c: Update.
7516         * nat/linux-osdata.c: Update.
7517         * nat/linux-procfs.c: Update.
7518         * nat/x86-linux-dregs.c: Update.
7519         * obsd-nat.c: Update.
7520         * ppc-fbsd-nat.c: Update.
7521         * ppc-linux-nat.c: Update.
7522         * procfs.c: Update.
7523         * python/py-infthread.c: Update.
7524         * ravenscar-thread.c: Update.
7525         * remote.c: Update.
7526         * s390-linux-nat.c: Update.
7527         * sol-thread.c: Update.
7528         * sol2-tdep.c: Update.
7529         * spu-linux-nat.c: Update.
7530         * x86-linux-nat.c: Update.
7531         * xtensa-linux-nat.c: Update.
7533 2018-07-03  Tom Tromey  <tom@tromey.com>
7535         * common/ptid.c (ptid_get_pid): Remove.
7536         * common/ptid.h (ptid_get_pid): Don't declare.
7537         * aarch64-linux-nat.c: Update.
7538         * ada-lang.c: Update.
7539         * aix-thread.c: Update.
7540         * alpha-bsd-nat.c: Update.
7541         * amd64-fbsd-nat.c: Update.
7542         * amd64-linux-nat.c: Update.
7543         * arm-linux-nat.c: Update.
7544         * arm-nbsd-nat.c: Update.
7545         * auxv.c: Update.
7546         * break-catch-syscall.c: Update.
7547         * breakpoint.c: Update.
7548         * bsd-uthread.c: Update.
7549         * corelow.c: Update.
7550         * ctf.c: Update.
7551         * darwin-nat.c: Update.
7552         * fbsd-nat.c: Update.
7553         * fbsd-tdep.c: Update.
7554         * gcore.c: Update.
7555         * gnu-nat.c: Update.
7556         * hppa-nbsd-nat.c: Update.
7557         * hppa-obsd-nat.c: Update.
7558         * i386-fbsd-nat.c: Update.
7559         * ia64-linux-nat.c: Update.
7560         * inf-ptrace.c: Update.
7561         * infcmd.c: Update.
7562         * inferior.c: Update.
7563         * inferior.h: Update.
7564         * inflow.c: Update.
7565         * infrun.c: Update.
7566         * linux-fork.c: Update.
7567         * linux-nat.c: Update.
7568         * linux-tdep.c: Update.
7569         * linux-thread-db.c: Update.
7570         * m68k-bsd-nat.c: Update.
7571         * mi/mi-interp.c: Update.
7572         * mi/mi-main.c: Update.
7573         * mips-linux-nat.c: Update.
7574         * mips-nbsd-nat.c: Update.
7575         * mips64-obsd-nat.c: Update.
7576         * nat/aarch64-linux-hw-point.c: Update.
7577         * nat/aarch64-linux.c: Update.
7578         * nat/linux-btrace.c: Update.
7579         * nat/linux-osdata.c: Update.
7580         * nat/linux-procfs.c: Update.
7581         * nat/x86-linux-dregs.c: Update.
7582         * nto-procfs.c: Update.
7583         * obsd-nat.c: Update.
7584         * ppc-linux-nat.c: Update.
7585         * ppc-nbsd-nat.c: Update.
7586         * ppc-obsd-nat.c: Update.
7587         * proc-service.c: Update.
7588         * procfs.c: Update.
7589         * python/py-inferior.c: Update.
7590         * python/py-infthread.c: Update.
7591         * ravenscar-thread.c: Update.
7592         * record.c: Update.
7593         * remote-sim.c: Update.
7594         * remote.c: Update.
7595         * rs6000-nat.c: Update.
7596         * s390-linux-nat.c: Update.
7597         * sh-nbsd-nat.c: Update.
7598         * sol-thread.c: Update.
7599         * sparc-nat.c: Update.
7600         * sparc64-tdep.c: Update.
7601         * spu-linux-nat.c: Update.
7602         * spu-tdep.c: Update.
7603         * target-debug.h: Update.
7604         * target.c: Update.
7605         * thread.c: Update.
7606         * tid-parse.c: Update.
7607         * tracefile-tfile.c: Update.
7608         * vax-bsd-nat.c: Update.
7609         * windows-nat.c: Update.
7610         * x86-linux-nat.c: Update.
7611         * x86-nat.c: Update.
7613 2018-07-03  Tom Tromey  <tom@tromey.com>
7615         * common/ptid.c (pid_to_ptid): Remove.
7616         * common/ptid.h (pid_to_ptid): Don't declare.
7617         * aix-thread.c: Update.
7618         * arm-linux-nat.c: Update.
7619         * common/ptid.c: Update.
7620         * common/ptid.h: Update.
7621         * corelow.c: Update.
7622         * ctf.c: Update.
7623         * darwin-nat.c: Update.
7624         * fbsd-nat.c: Update.
7625         * fork-child.c: Update.
7626         * gnu-nat.c: Update.
7627         * go32-nat.c: Update.
7628         * inf-ptrace.c: Update.
7629         * infcmd.c: Update.
7630         * inferior.c: Update.
7631         * infrun.c: Update.
7632         * linux-fork.c: Update.
7633         * linux-nat.c: Update.
7634         * nat/aarch64-linux-hw-point.c: Update.
7635         * nat/fork-inferior.c: Update.
7636         * nat/x86-linux-dregs.c: Update.
7637         * nto-procfs.c: Update.
7638         * obsd-nat.c: Update.
7639         * procfs.c: Update.
7640         * progspace.c: Update.
7641         * remote.c: Update.
7642         * rs6000-nat.c: Update.
7643         * s390-linux-nat.c: Update.
7644         * sol-thread.c: Update.
7645         * spu-linux-nat.c: Update.
7646         * target.c: Update.
7647         * top.c: Update.
7648         * tracefile-tfile.c: Update.
7649         * windows-nat.c: Update.
7651 2018-07-03  Tom Tromey  <tom@tromey.com>
7653         * common/ptid.h (ptid_build): Don't declare.
7654         * common/ptid.c (ptid_build): Remove.
7655         * aix-thread.c: Update.
7656         * bsd-kvm.c: Update.
7657         * bsd-uthread.c: Update.
7658         * common/agent.c: Update.
7659         * common/ptid.c: Update.
7660         * common/ptid.h: Update.
7661         * corelow.c: Update.
7662         * darwin-nat.c: Update.
7663         * fbsd-nat.c: Update.
7664         * gnu-nat.c: Update.
7665         * linux-fork.c: Update.
7666         * linux-nat.c: Update.
7667         * linux-thread-db.c: Update.
7668         * nat/linux-osdata.c: Update.
7669         * nat/linux-procfs.c: Update.
7670         * nto-procfs.c: Update.
7671         * obsd-nat.c: Update.
7672         * proc-service.c: Update.
7673         * procfs.c: Update.
7674         * ravenscar-thread.c: Update.
7675         * remote-sim.c: Update.
7676         * remote.c: Update.
7677         * sol-thread.c: Update.
7678         * target.c: Update.
7679         * windows-nat.c: Update.
7681 2018-07-03  Tom Tromey  <tom@tromey.com>
7683         * infrun.c (follow_exec): Use exit_inferior_silent.
7684         * inferior.c (exit_inferior_num_silent): Remove.
7685         * inferior.h (exit_inferior_num_silent): Don't declare.
7687 2018-07-03  Tom Tromey  <tom@tromey.com>
7689         PR cli/23340:
7690         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7691         inferior_ptid on error.
7693 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7694             Simon Marchi  <simon.marchi@polymtl.ca>
7696         PR tdep/8282
7697         * disasm.h (gdb_disassembler): Add
7698         `m_disassembler_options_holder'. member
7699         * disasm.c (get_all_disassembler_options): New function.
7700         (gdb_disassembler::gdb_disassembler): Use it.
7701         (gdb_buffered_insn_length_init_dis): Likewise.
7702         (gdb_buffered_insn_length): Adjust accordingly.
7703         (set_disassembler_options): Handle options with arguments.
7704         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7705         line if showing options with descriptions.
7706         (disassembler_options_completer): Adapt to using the
7707         `disasm_options_and_args_t' structure.
7708         * mips-tdep.c (mips_disassembler_options): New variable.
7709         (mips_disassembler_options_o32): Likewise.
7710         (mips_disassembler_options_n32): Likewise.
7711         (mips_disassembler_options_n64): Likewise.
7712         (gdb_print_insn_mips): Don't set `disassembler_options'.
7713         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7714         functions.
7715         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7716         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7717         `gdbarch_disassembler_options_implicit' and
7718         `gdbarch_valid_disassembler_options'.
7719         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7720         `disasm_options_and_args_t' structure.
7721         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7722         method.
7723         (valid_disassembler_options): Switch from `disasm_options_t' to
7724         the `disasm_options_and_args_t' structure.
7725         * NEWS: Document `set disassembler-options' support for the MIPS
7726         target.
7727         * gdbarch.h: Regenerate.
7728         * gdbarch.c: Regenerate.
7730 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7732         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7734 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7736         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7737         parameter in call to amd64_target_description.
7738         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7739         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7740         (amd64fbsd_init_abi): Likewise.
7741         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7742         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7743         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7744         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7746 2018-06-29  Pedro Alves  <palves@redhat.com>
7748         * amd64-tdep.h (amd64_create_target_description): Add
7749         "segments" parameter.
7750         * amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7751         (_initialize_amd64_tdep): Update call to
7752         amd64_create_target_description.
7753         (amd64_target_description): Add "segments" parameter.  Adjust
7754         the implementation to use it.
7755         * amd64-linux-tdep.c (amd64_linux_read_description): Update
7756         call to amd64_create_target_description.
7757         * amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7758         * arch/amd64.h (amd64_create_target_description): Add
7759         "segments" register.
7760         * arch/amd64.c (amd64_create_target_description): Add
7761         "segments" parameter.  Call create_feature_i386_64bit_segments
7762         only if SEGMENTS is true.
7763         * gdbserver/win32-i386-low.c (i386_arch_setup): Update
7764         call to amd64_create_target_description.
7766 2018-06-29  Pedro Alves  <palves@redhat.com>
7768         * thread.c (thread_target_id_str): New, factored out from ...
7769         (print_thread_info_1): ... here.  Use it to compute the max
7770         "Target Id" column width.
7772 2018-06-29  Pedro Alves  <palves@redhat.com>
7774         * remote.c (remote_target::extra_thread_info): Delete
7775         'display_buf' and 'n' locals.  from the cache, regardless of
7776         packet mechanims is in use.  Use cache for qThreadExtra and qP
7777         methods too.
7779 2018-06-29  Pedro Alves  <palves@redhat.com>
7781         * blockframe.c (find_pc_sect_containing_function): New function.
7782         * breakpoint.c (print_breakpoint_location): Don't call
7783         find_pc_sect_function.
7784         * linespec.c (create_sals_line_offset): Record the location's
7785         symbol in the sal.
7786         * linespec.c (convert_address_location_to_sals): Fill in sal's
7787         symbol with find_pc_sect_containing_function.
7788         * symtab.c (find_function_start_sal): Rename to ...
7789         (find_function_start_sal_1): ... this.
7790         (find_function_start_sal): Reimplement as wrapper around
7791         find_function_start_sal_1, and use
7792         find_pc_sect_containing_function to fill in the sal's symbol.
7793         (find_function_start_sal(symbol*, bool)): Adjust.
7794         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7795         comments.
7796         (find_pc_sect_containing_function): Declare.
7798 2018-06-29  Pedro Alves  <palves@redhat.com>
7800         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7801         true if the the location has no symbol.
7803 2018-06-28  Tom Tromey  <tom@tromey.com>
7805         * NEWS: Mention --enable-codesign.
7806         * silent-rules.mk (ECHO_SIGN): New variable.
7807         * configure.ac: Add --enable-codesign.
7808         * configure: Rebuild.
7809         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7810         (gdb$(EXEEXT)): Optionally invoke codesign.
7812 2018-06-28  Pedro Alves  <palves@redhat.com>
7814         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7815         comments.
7816         (switch_to_thread_no_regs): Adjust comment.
7817         * infcmd.c (stop_pc): Delete.
7818         (post_create_inferior, info_program_command): Replace references
7819         to stop_pc with references to thread_info->suspend.stop_pc.
7820         * inferior.h (stop_pc): Delete declaration.
7821         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7822         (handle_inferior_event_1, handle_signal_stop)
7823         (process_event_stop_test, keep_going_stepped_thread)
7824         (handle_step_into_function, handle_step_into_function_backward)
7825         (print_stop_location): Replace references to stop_pc with
7826         references to thread_info->suspend.stop_pc.
7827         (struct infcall_suspend_state) <stop_pc>: Delete field.
7828         (save_infcall_suspend_state, restore_infcall_suspend_state):
7829         Remove references to inf_stat->stop_pc.
7830         * linux-fork.c (fork_load_infrun_state): Likewise.
7831         * record-btrace.c (record_btrace_set_replay): Likewise.
7832         * record-full.c (record_full_goto_entry): Likewise.
7833         * remote.c (print_one_stopped_thread): Likewise.
7834         * target.c (target_resume): Extend comment.
7835         * thread.c (set_executing_thread): New.
7836         (set_executing): Use it.
7837         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7838         Remove references to stop_pc.
7840 2018-06-28  Pedro Alves  <palves@redhat.com>
7842         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7843         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7845 2018-06-28  Tom Tromey  <tom@tromey.com>
7847         * coffread.c (coff_symfile_finish): Update.
7848         * xcoffread.c (xcoff_symfile_finish): Update.
7849         * elfread.c (elf_symfile_finish): Update.
7850         * symfile.h (dwarf2_free_objfile): Don't declare.
7851         * dwarf2read.c (_initialize_dwarf2_read): Use
7852         register_objfile_data_with_cleanup.
7853         (dwarf2_free_objfile): Now static.  Change signature.
7855 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7857         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7858         option "-o" to add-symbol-file-load to add an offset to each
7859         section's load address.
7860         * symfile.c (set_objfile_default_section_offset): New function.
7862 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7864         * symfile.c (add_symbol_file_command): Make sure that sections
7865         with the same name are sorted in the same order.
7867 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7869         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7870         require the second argument.  If omitted, load sections at the
7871         addresses specified in the file.
7873 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7875         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7876         (_initialize_symfile): Add option "-o" to symbol-file to add an
7877         offset to each section of the symbol file.
7879 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7881         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7883 2018-06-27  Tom Tromey  <tom@tromey.com>
7885         * stack.c (_initialize_stack): Update "func" help text.
7887 2018-06-27  Tom Tromey  <tom@tromey.com>
7889         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7890         std::vector.
7891         (unwind_infopy_str, pyuw_create_unwind_info)
7892         (unwind_infopy_add_saved_register, pyuw_sniffer)
7893         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7894         Update.
7895         (struct saved_reg): Add constructor.
7896         <value>: Now a gdbpy_ref<>.
7898 2018-06-27  Tom Tromey  <tom@tromey.com>
7900         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7902 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7904         * gdb-gdb.py.in: Format using autopep8.
7906 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7908         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7909         (type_lookup_function): Recognize CORE_ADDR values.
7911 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7913         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7914         print tag_name.
7916 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7918         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7919         <__lt__>: Add.
7921 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7923         * gdb-gdb.py: Move to...
7924         * gdb-gdb.py.in: ... here.
7925         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7926         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7927         dependencies.
7928         (distclean): Remove gdb-gdb.py when cleaning.
7929         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7930         * configure: Re-generate.
7932 2018-06-27  Pedro Alves  <palves@redhat.com>
7934         * proc-service.c (get_ps_regcache): New.
7935         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7936         (ps_lsetfpregs): Use it.
7938 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7940         PR gdb/21695
7941         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7942         declaration.
7943         (dwarf_decode_lines_1): Adjust.
7945 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7947         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7948         override.
7949         <info_proc>: Likewise.
7951 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7953         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7954         to windows_fetch_one_register, and only handle the case of
7955         fetching one register.  Move the code that reloads the context
7956         and iterates over all registers if R is negative to...
7957         (windows_nat_target::fetch_registers): ... here.
7958         (do_windows_store_inferior_registers): Rename to
7959         windows_store_one_register, and only handle the case of storing
7960         one register.  Move the code that handles the case where r is
7961         negative to...
7962         (windows_nat_target::store_registers) ... here.
7964 2018-06-26  Tom Tromey  <tom@tromey.com>
7966         PR rust/22574:
7967         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7968         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7969         Update.
7970         (rust_internal_print_type): Add podata parameter.
7971         (rust_print_type): Update.
7973 2018-06-26  Tom Tromey  <tom@tromey.com>
7975         * typeprint.h (struct print_offset_data) <update, finish,
7976         maybe_print_hole>: New methods.
7977         <indentation>: New constant.
7978         * typeprint.c (print_offset_data::indentation): Define.
7979         (print_offset_data::maybe_print_hole, print_offset_data::update)
7980         (print_offset_data::finish): Move from c-typeprint.c and rename.
7981         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7982         (print_spaces_filtered_with_print_options): Update.
7983         (c_print_type_union_field_offset, maybe_print_hole)
7984         (c_print_type_struct_field_offset): Move to typeprint.c and
7985         rename.
7986         (c_type_print_base_struct_union): Update.
7988 2018-06-25  Pedro Alves  <palves@redhat.com>
7990         * gdbthread.h (thread_info_ref, delete_thread)
7991         (delete_thread_silent, first_thread_of_inferior)
7992         (any_thread_of_inferior, switch_to_thread)
7993         (enable_thread_stack_temporaries)
7994         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7995         (get_last_thread_stack_temporary)
7996         (value_in_thread_stack_temporaries, can_access_registers_thread):
7997         Spell out "struct thread_info" instead of just "thread_info".
7998         * inferior.h (notice_new_inferior): Likewise.
8000 2018-06-25  Pedro Alves  <palves@redhat.com>
8002         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
8003         pass thread_info pointer to delete_thread.
8004         (windows_nat_target::detach): Pass inferior pointer to
8005         detach_inferior.
8006         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
8007         delete_thread.
8008         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
8009         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
8010         and pass a thread_info pointer to delete_thread.
8011         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
8012         pass thread_info pointer to delete_thread.
8013         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
8014         delete_thread_silent call.
8015         * procfs.c (procfs_target::detach): Pass inferior pointer to
8016         detach_inferior.
8017         (procfs_target::wait): Pass thread_info pointer to delete_thread.
8018         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
8019         delete_thread_silent call.
8020         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
8021         pass thread_info pointer to delete_thread.
8022         (windows_nat_target::detach): Pass inferior pointer to
8023         delete_inferior.
8025 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
8027         * regcache.c (readable_regcache::read_part): Fix asserts.
8028         (reg_buffer::raw_collect_part): New function.
8029         (regcache::write_part): Fix asserts.
8030         (reg_buffer::raw_supply_part): New function.
8031         (regcache::transfer_regset_register): New helper function.
8032         (regcache::transfer_regset): Call new functions.
8033         (regcache_supply_regset): Use gdb_byte*.
8034         (regcache::supply_regset): Likewise.
8035         (regcache_collect_regset): Likewise.
8036         (regcache::collect_regset): Likewise.
8037         * regcache.h (reg_buffer::raw_collect_part): New declaration.
8038         (reg_buffer::raw_supply_part): Likewise.
8039         (regcache::transfer_regset_register): Likewise.
8040         (regcache::transfer_regset): Use gdb_byte*.
8042 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
8044         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
8046 2018-06-21  Pedro Alves  <palves@redhat.com>
8048         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
8049         instead of a ptid_t.  All callers adjusted.
8050         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
8051         adjusted.
8052         (print_ada_task_info, display_current_task_id, task_command_1):
8053         Adjust.
8054         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
8055         inferior_thread.
8056         (breakpoint_kind): Adjust.
8057         (remove_breakpoints_pid): Rename to ...
8058         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
8059         pointer.  All callers adjusted.
8060         (bpstat_clear_actions): Use inferior_thread.
8061         (get_bpstat_thread): New.
8062         (bpstat_do_actions): Use it.
8063         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
8064         to take a thread_info pointer.  All callers adjusted.
8065         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
8066         (breakpoint_re_set_thread): Use inferior_thread.
8067         * breakpoint.h (struct inferior): Forward declare.
8068         (bpstat_stop_status): Update.
8069         (remove_breakpoints_pid): Delete.
8070         (remove_breakpoints_inf): New.
8071         * bsd-uthread.c (bsd_uthread_target::wait)
8072         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
8073         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
8074         (maint_btrace_packet_history_cmd)
8075         (maint_btrace_clear_packet_history_cmd): Adjust.
8076         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
8077         inferior_thread.
8078         * cli/cli-interp.c: Include "inferior.h".
8079         * common/refcounted-object.h (struct
8080         refcounted_object_ref_policy): New.
8081         * compile/compile-object-load.c: Include gdbthread.h.
8082         (store_regs): Use inferior_thread.
8083         * corelow.c (core_target::close): Use current_inferior.
8084         (core_target_open): Adjust to use first_thread_of_inferior and use
8085         the current inferior.
8086         * ctf.c (ctf_target::close): Adjust to use current_inferior.
8087         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
8088         <thread>: ... this new field.  All references adjusted.
8089         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
8090         Take a thread_info pointer instead of a ptid_t.
8091         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
8092         (dummy_frame_discard, register_dummy_frame_dtor): Take a
8093         thread_info pointer instead of a ptid_t.
8094         * elfread.c: Include "inferior.h".
8095         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
8096         Use inferior_thread.
8097         * eval.c (evaluate_subexp): Likewise.
8098         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
8099         inferior_thread.
8100         * gdb_proc_service.h (struct thread_info): Forward declare.
8101         (struct ps_prochandle) <ptid>: Delete, replaced by ...
8102         <thread>: ... this new field.  All references adjusted.
8103         * gdbarch.h, gdbarch.c: Regenerate.
8104         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
8105         'thread' parameter.  All implementations and callers adjusted.
8106         * gdbthread.h (thread_info) <set_running>: New method.
8107         (delete_thread, delete_thread_silent): Take a thread_info pointer
8108         instead of a ptid.
8109         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
8110         (first_thread_of_process): Delete, replaced by ...
8111         (first_thread_of_inferior): ... this new function.  All callers
8112         adjusted.
8113         (any_live_thread_of_process): Delete, replaced by ...
8114         (any_live_thread_of_inferior): ... this new function.  All callers
8115         adjusted.
8116         (switch_to_thread, switch_to_no_thread): Declare.
8117         (is_executing): Delete.
8118         (enable_thread_stack_temporaries): Update comment.
8119         <enable_thread_stack_temporaries>: Take a thread_info pointer
8120         instead of a ptid_t.  Incref the thread.
8121         <~enable_thread_stack_temporaries>: Decref the thread.
8122         <m_ptid>: Delete
8123         <m_thr>: New.
8124         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8125         (get_last_thread_stack_temporary)
8126         (value_in_thread_stack_temporaries, can_access_registers_thread):
8127         Take a thread_info pointer instead of a ptid_t.  All callers
8128         adjusted.
8129         * infcall.c (get_call_return_value): Use inferior_thread.
8130         (run_inferior_call): Work with thread pointers instead of ptid_t.
8131         (call_function_by_hand_dummy): Work with thread pointers instead
8132         of ptid_t.  Use thread_info_ref.
8133         * infcmd.c (proceed_thread_callback): Access thread's state
8134         directly.
8135         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
8136         access thread's state directly.
8137         (continue_command): Use inferior_thread.
8138         (info_program_command): Use find_thread_ptid and access thread
8139         state directly.
8140         (proceed_after_attach_callback): Use thread state directly.
8141         (notice_new_inferior): Take a thread_info pointer instead of a
8142         ptid_t.  All callers adjusted.
8143         (exit_inferior): Take an inferior pointer instead of a pid.  All
8144         callers adjusted.
8145         (exit_inferior_silent): New.
8146         (detach_inferior): Delete.
8147         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
8148         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
8149         (detach_inferior_command, kill_inferior_command): Use
8150         find_inferior_id instead of valid_gdb_inferior_id and
8151         gdb_inferior_id_to_pid.
8152         (inferior_command): Use inferior and thread pointers.
8153         * inferior.h (struct thread_info): Forward declare.
8154         (notice_new_inferior): Take a thread_info pointer instead of a
8155         ptid_t.  All callers adjusted.
8156         (detach_inferior): Delete declaration.
8157         (exit_inferior, exit_inferior_silent): Take an inferior pointer
8158         instead of a pid.  All callers adjusted.
8159         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
8160         (valid_gdb_inferior_id): Delete.
8161         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
8162         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
8163         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
8164         ...
8165         <inf>: ... this new field.
8166         <step_ptid>: Delete, replaced by ...
8167         <step_thread>: ... this new field.
8168         (get_displaced_stepping_state): Take an inferior pointer instead
8169         of a pid.  All callers adjusted.
8170         (displaced_step_in_progress_any_inferior): Adjust.
8171         (displaced_step_in_progress_thread): Take a thread pointer instead
8172         of a ptid_t.  All callers adjusted.
8173         (displaced_step_in_progress, add_displaced_stepping_state): Take
8174         an inferior pointer instead of a pid.  All callers adjusted.
8175         (get_displaced_step_closure_by_addr): Adjust.
8176         (remove_displaced_stepping_state): Take an inferior pointer
8177         instead of a pid.  All callers adjusted.
8178         (displaced_step_prepare_throw, displaced_step_prepare)
8179         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
8180         All callers adjusted.
8181         (start_step_over): Adjust.
8182         (infrun_thread_ptid_changed): Remove bit updating ptids in the
8183         displaced step queue.
8184         (do_target_resume): Adjust.
8185         (fetch_inferior_event): Use inferior_thread.
8186         (context_switch, get_inferior_stop_soon): Take an
8187         execution_control_state pointer instead of a ptid_t.  All callers
8188         adjusted.
8189         (switch_to_thread_cleanup): Delete.
8190         (stop_all_threads): Use scoped_restore_current_thread.
8191         * inline-frame.c: Include "gdbthread.h".
8192         (inline_state) <inline_state>: Take a thread pointer instead of a
8193         ptid_t.  All callers adjusted.
8194         <ptid>: Delete, replaced by ...
8195         <thread>: ... this new field.
8196         (find_inline_frame_state): Take a thread pointer instead of a
8197         ptid_t.  All callers adjusted.
8198         (skip_inline_frames, step_into_inline_frame)
8199         (inline_skipped_frames, inline_skipped_symbol): Take a thread
8200         pointer instead of a ptid_t.  All callers adjusted.
8201         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
8202         (inline_skipped_frames, inline_skipped_symbol): Likewise.
8203         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
8204         pointers directly.
8205         * linux-nat.c (get_detach_signal): Likewise.
8206         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
8207         (thread_db_notice_clone): Adjust.
8208         (thread_db_find_new_threads_silently)
8209         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
8210         a thread pointer instead of a ptid_t.  All callers adjusted.
8211         * mi/mi-cmd-var.c: Include "inferior.h".
8212         (mi_cmd_var_update_iter): Update to use thread pointers.
8213         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
8214         inferior directly.
8215         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
8216         out to ...
8217         (mi_output_running): ... this new function.
8218         (mi_on_resume_1): Adjust to use it.
8219         (mi_user_selected_context_changed): Adjust to use inferior_thread.
8220         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
8221         directly.
8222         (interrupt_thread_callback): : Adjust to use thread and inferior
8223         pointers.
8224         * proc-service.c: Include "gdbthread.h".
8225         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
8226         * progspace-and-thread.c: Include "inferior.h".
8227         * progspace.c: Include "inferior.h".
8228         * python/py-exitedevent.c (create_exited_event_object): Adjust to
8229         hold a reference to an inferior_object.
8230         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
8231         inferior_thread.
8232         * python/py-inferior.c (struct inferior_object): Give the type a
8233         tag name instead of a typedef.
8234         (python_on_normal_stop): No need to check if the current thread is
8235         listed.
8236         (inferior_to_inferior_object): Change return type to
8237         inferior_object.  All callers adjusted.
8238         (find_thread_object): Delete, bits factored out to ...
8239         (thread_to_thread_object): ... this new function.
8240         * python/py-infthread.c (create_thread_object): Use
8241         inferior_to_inferior_object.
8242         (thpy_is_stopped): Use thread pointer directly.
8243         (gdbpy_selected_thread): Use inferior_thread.
8244         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
8245         field, replaced with ...
8246         <thread>: ... this new field.  All users adjusted.
8247         (btpy_insn_or_gap_new): Drop const.
8248         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
8249         callers adjusted.
8250         * python/py-record.c: Include "gdbthread.h".
8251         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8252         a ptid_t.  All callers adjusted.
8253         (gdbpy_current_recording): Use inferior_thread.
8254         * python/py-record.h (recpy_record_object) <ptid>: Delete
8255         field, replaced with ...
8256         <thread>: ... this new field.  All users adjusted.
8257         (recpy_element_object) <ptid>: Delete
8258         field, replaced with ...
8259         <thread>: ... this new field.  All users adjusted.
8260         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8261         a ptid_t.  All callers adjusted.
8262         * python/py-threadevent.c: Include "gdbthread.h".
8263         (get_event_thread): Use thread_to_thread_object.
8264         * python/python-internal.h (struct inferior_object): Forward
8265         declare.
8266         (find_thread_object, find_inferior_object): Delete declarations.
8267         (thread_to_thread_object, inferior_to_inferior_object): New
8268         declarations.
8269         * record-btrace.c: Include "inferior.h".
8270         (require_btrace_thread): Use inferior_thread.
8271         (record_btrace_frame_sniffer)
8272         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8273         (get_thread_current_frame): Use scoped_restore_current_thread and
8274         switch_to_thread.
8275         (get_thread_current_frame): Use thread pointer directly.
8276         (record_btrace_replay_at_breakpoint): Use thread's inferior
8277         pointer directly.
8278         * record-full.c: Include "inferior.h".
8279         * regcache.c: Include "gdbthread.h".
8280         (get_thread_arch_regcache): Use the inferior's address space
8281         directly.
8282         (get_thread_regcache, registers_changed_thread): New.
8283         * regcache.h (get_thread_regcache(thread_info *thread)): New
8284         overload.
8285         (registers_changed_thread): New.
8286         (remote_target) <remote_detach_1>: Swap order of parameters.
8287         (remote_add_thread): <remote_add_thread>: Return the new thread.
8288         (get_remote_thread_info(ptid_t)): New overload.
8289         (remote_target::remote_notice_new_inferior): Use thread pointers
8290         directly.
8291         (remote_target::process_initial_stop_replies): Use
8292         thread_info::set_running.
8293         (remote_target::remote_detach_1, remote_target::detach)
8294         (extended_remote_target::detach): Adjust.
8295         * stack.c (frame_show_address): Use inferior_thread.
8296         * target-debug.h (target_debug_print_thread_info_pp): New.
8297         * target-delegates.c: Regenerate.
8298         * target.c (default_thread_address_space): Delete.
8299         (memory_xfer_partial_1): Use current_inferior.
8300         (target_detach): Use current_inferior.
8301         (target_thread_address_space): Delete.
8302         (generic_mourn_inferior): Use current_inferior.
8303         * target.h (struct target_ops) <thread_address_space>: Delete.
8304         (target_thread_address_space): Delete.
8305         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8306         pointers directly.
8307         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8308         thread pointer instead of a ptid_t.  Adjust all callers.
8309         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8310         (first_thread_of_process): Delete, replaced by ...
8311         (first_thread_of_inferior): ... this new function.  All callers
8312         adjusted.
8313         (any_thread_of_process): Rename to ...
8314         (any_thread_of_inferior): ... this, and take an inferior pointer.
8315         (any_live_thread_of_process): Rename to ...
8316         (any_live_thread_of_inferior): ... this, and take an inferior
8317         pointer.
8318         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8319         (value_in_thread_stack_temporaries)
8320         (get_last_thread_stack_temporary): Take a thread pointer instead
8321         of a ptid_t.  Adjust all callers.
8322         (thread_info::set_running): New.
8323         (validate_registers_access): Use inferior_thread.
8324         (can_access_registers_ptid): Rename to ...
8325         (can_access_registers_thread): ... this, and take a thread
8326         pointer.
8327         (print_thread_info_1): Adjust to compare thread pointers instead
8328         of ptids.
8329         (switch_to_no_thread, switch_to_thread): Make extern.
8330         (scoped_restore_current_thread::~scoped_restore_current_thread):
8331         Use m_thread pointer directly.
8332         (scoped_restore_current_thread::scoped_restore_current_thread):
8333         Use inferior_thread.
8334         (thread_command): Use thread pointer directly.
8335         (thread_num_make_value_helper): Use inferior_thread.
8336         * top.c (execute_command): Use inferior_thread.
8337         * tui/tui-interp.c: Include "inferior.h".
8338         * varobj.c (varobj_create): Use inferior_thread.
8339         (value_of_root_1): Use find_thread_global_id instead of
8340         global_thread_id_to_ptid.
8342 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8344         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8345         possible.
8346         (regcache::write_part): Likewise.
8347         (readable_regcache::cooked_read_part): Update comment.
8348         (readable_regcache::cooked_write_part): Likewise.
8349         * regcache.h: (readable_regcache::read_part): Likewise.
8350         (regcache::write_part): Likewise.
8352 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8353             Dirk Schubert  <dirk.schubert@arm.com>
8355         * aarch64-linux-nat.c (post_attach): New.
8356         (aarch64_linux_nat_target::post_attach): Override post_attach to
8357         record the number of hardware debug registers.
8359 2018-06-20  Tom Tromey  <tom@tromey.com>
8361         * python/py-param.c (add_setshow_generic): Make parameters const.
8362         (parmpy_init): Update.
8364 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8366         * regcache.h (regcache_cooked_read_ftype): Rename to...
8367         (register_read_ftype): ...this, change type to function_view.
8368         (class reg_buffer) <save>: Remove src parameter.
8369         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8370         parameter non-const in first overload.  Remove src parameter in
8371         second overload.
8372         * regcache.c (do_cooked_read): Remove.
8373         (readonly_detached_regcache::readonly_detached_regcache): Make
8374         parameter non-const, adjust call to other constructor.
8375         (reg_buffer::save): Remove src parameter.
8376         * frame.c (do_frame_register_read): Remove.
8377         (frame_save_as_regcache): Use lambda function.
8378         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8379         parameter to ppu2spu_data *.
8380         (ppu2spu_sniffer): Use lambda function.
8382 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8384         * record-full.c (record_full_target::insert_breakpoint): Remove
8385         "struct" keyword, add const.
8387 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8389         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8390         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8391         * configure.ac: Remove AC_PREREQ, add missing quoting.
8392         * gnulib/configure.ac: Modernize usage of
8393         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8394         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8395         (AUTOMAKE_VERSION): Bump to 1.15.1.
8396         * configure: Re-generate.
8397         * config.in: Re-generate.
8398         * aclocal.m4: Re-generate.
8399         * gnulib/aclocal.m4: Re-generate.
8400         * gnulib/config.in: Re-generate.
8401         * gnulib/configure: Re-generate.
8402         * gnulib/import/Makefile.in: Re-generate.
8404 2018-06-19  Pedro Alves  <palves@redhat.com>
8406         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8407         (lookup_minimal_symbol_by_pc_section): ... here with
8408         gdb_assert_not_reached added.
8410 2018-06-19  Pedro Alves  <palves@redhat.com>
8412         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8413         parameter with a block parameter.  Compare location's block symbol
8414         with the frame's block instead of addresses.
8415         (skip_inline_frames): Pass the current block instead of the
8416         frame's address.  Break out as soon as we determine the frame
8417         should not be skipped.
8419 2018-06-18  Tom Tromey  <tom@tromey.com>
8421         * solib-aix.c (solib_aix_get_section_offsets): Return
8422         unique_xmalloc_ptr.
8423         (solib_aix_solib_create_inferior_hook): Update.
8425 2018-06-18  Tom Tromey  <tom@tromey.com>
8427         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8429 2018-06-18  Tom Tromey  <tom@tromey.com>
8431         * solib-frv.c (frv_relocate_main_executable): Use
8432         unique_xmalloc_ptr.
8433         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8434         unique_xmalloc_ptr.
8436 2018-06-18  Tom Tromey  <tom@tromey.com>
8438         * objfiles.h (inhibit_section_map_updates): Update.
8439         (resume_section_map_updates, resume_section_map_updates_cleanup):
8440         Remove.
8441         * solib-svr4.c (svr4_handle_solib_event): Update.
8442         * objfiles.c (inhibit_section_map_updates): Return
8443         scoped_restore_tmpl<int>.
8444         (resume_section_map_updates, resume_section_map_updates_cleanup):
8445         Remove.
8447 2018-06-18  Tom Tromey  <tom@tromey.com>
8449         * valprint.h (read_string): Update.
8450         * valprint.c (read_string): Change type of "buffer".
8451         (val_print_string): Update.
8452         * python/py-value.c (valpy_string): Update.
8453         * language.h (struct language_defn) <la_get_string>: Change
8454         type of "buffer".
8455         (default_get_string, c_get_string): Update.
8456         * language.c (default_get_string): Change type of "buffer".
8457         * guile/scm-value.c (gdbscm_value_to_string): Update.
8458         * c-lang.c (c_get_string): Change type of "buffer".
8460 2018-06-18  Tom Tromey  <tom@tromey.com>
8462         * ser-mingw.c (struct pipe_state_destroyer): New.
8463         (pipe_state_up): New typedef.
8464         (cleanup_pipe_state): Remove.
8465         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8467 2018-06-18  Tom Tromey  <tom@tromey.com>
8469         * rust-lang.h (rust_yyerror): Don't declare.
8470         * rust-lang.c (rust_language_defn): Update.
8471         * rust-exp.y (yyerror): Now static.
8472         * parse.c (parse_exp_in_context_1): Update.
8473         * p-lang.h (p_yyerror): Don't declare.
8474         * p-lang.c (p_language_defn): Update.
8475         * p-exp.y (yyerror): Now static.
8476         * opencl-lang.c (opencl_language_defn): Update.
8477         * objc-lang.c (objc_language_defn): Update.
8478         * m2-lang.h (m2_yyerror): Don't declare.
8479         * m2-lang.c (m2_language_defn): Update.
8480         * m2-exp.y (yyerror): Now static.
8481         * language.h (struct language_defn) <la_error>: Remove.
8482         * language.c (unk_lang_error): Remove.
8483         (unknown_language_defn, auto_language_defn): Remove.
8484         * go-lang.h (go_yyerror): Don't declare.
8485         * go-lang.c (go_language_defn): Update.
8486         * go-exp.y (yyerror): Now static.
8487         * f-lang.h (f_yyerror): Don't declare.
8488         * f-lang.c (f_language_defn): Update.
8489         * f-exp.y (yyerror): Now static.
8490         * d-lang.h (d_yyerror): Don't declare.
8491         * d-lang.c (d_language_defn): Update.
8492         * d-exp.y (yyerror): Now static.
8493         * c-lang.h (c_yyerror): Don't declare.
8494         * c-lang.c (c_language_defn, cplus_language_defn)
8495         (asm_language_defn, minimal_language_defn): Update.
8496         * c-exp.y (yyerror): Now static.
8497         * ada-lang.h (ada_yyerror): Don't declare.
8498         * ada-lang.c (ada_language_defn): Update.
8499         * ada-exp.y (yyerror): Now static.
8501 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8503         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8504         (store_sveregs_to_thread): Likewise.
8505         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8506         (aarch64_linux_store_inferior_registers): Likewise.
8507         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8508         function.
8509         (aarch64_sve_regs_copy_to_regcache): Likewise.
8510         (aarch64_sve_regs_copy_from_regcache): Likewise.
8511         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8512         declaration.
8513         (aarch64_sve_regs_copy_to_regcache): Likewise.
8514         (aarch64_sve_regs_copy_from_regcache): Likewise.
8515         (sve_context): Structure from Linux headers.
8516         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8517         (SVE_SIG_ZREG_SIZE): Likewise.
8518         (SVE_SIG_PREG_SIZE): Likewise.
8519         (SVE_SIG_FFR_SIZE): Likewise.
8520         (SVE_SIG_REGS_OFFSET): Likewise.
8521         (SVE_SIG_ZREGS_OFFSET): Likewise.
8522         (SVE_SIG_ZREG_OFFSET): Likewise.
8523         (SVE_SIG_ZREGS_SIZE): Likewise.
8524         (SVE_SIG_PREGS_OFFSET): Likewise.
8525         (SVE_SIG_PREG_OFFSET): Likewise.
8526         (SVE_SIG_PREGS_SIZE): Likewise.
8527         (SVE_SIG_FFR_OFFSET): Likewise.
8528         (SVE_SIG_REGS_SIZE): Likewise.
8529         (SVE_SIG_CONTEXT_SIZE): Likewise.
8530         (SVE_PT_REGS_MASK): Likewise.
8531         (SVE_PT_REGS_FPSIMD): Likewise.
8532         (SVE_PT_REGS_SVE): Likewise.
8533         (SVE_PT_VL_INHERIT): Likewise.
8534         (SVE_PT_VL_ONEXEC): Likewise.
8535         (SVE_PT_REGS_OFFSET): Likewise.
8536         (SVE_PT_FPSIMD_OFFSET): Likewise.
8537         (SVE_PT_FPSIMD_SIZE): Likewise.
8538         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8539         (SVE_PT_SVE_PREG_SIZE): Likewise.
8540         (SVE_PT_SVE_FFR_SIZE): Likewise.
8541         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8542         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8543         (__SVE_SIG_TO_PT): Likewise.
8544         (SVE_PT_SVE_OFFSET): Likewise.
8545         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8546         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8547         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8548         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8549         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8550         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8551         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8552         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8553         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8554         (SVE_PT_SVE_SIZE): Likewise.
8555         (SVE_PT_SIZE): Likewise.
8556         (HAS_SVE_STATE): New define.
8558 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8560         * nat/aarch64-sve-linux-sigcontext.h: New file.
8561         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8562         new files.
8563         (SVE_VQ_MIN): Likewise.
8564         (SVE_VQ_MAX): Likewise.
8565         (SVE_VL_MIN): Likewise.
8566         (SVE_VL_MAX): Likewise.
8567         (SVE_NUM_ZREGS): Likewise.
8568         (SVE_NUM_PREGS): Likewise.
8569         (sve_vl_valid): Likewise.
8570         (struct user_sve_header): Likewise.
8572 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8573             Richard Bunt <Richard.Bunt@arm.com>
8575         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8576         was requested by GDB.
8578 2018-06-15  Tom de Vries  <tdevries@suse.de>
8580         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8582 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8584         * gnulib/update-gnulib.sh: Print expected versions of
8585         autoconf/aclocal.
8587 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8589         * arch-utils.c (default_type_align): Use type_length_units.
8590         * gdbtypes.c (type_align): Use type_length_units.
8592 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8594         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8595         of 'define' command.
8597 2018-06-14  Tom de Vries  <tdevries@suse.de>
8599         PR cli/22573
8600         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8601         get_no_prettyformat_print_options.
8603 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8605         * sparc-nat.h: Include target.h.
8606         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8607         <fetch_registers>: Remove this argument in function call.
8608         <store_registers>: Remove this argument in function call, remove
8609         extra semicolon.
8610         <low_forget_process>: Call sparc64_forget_process instead of
8611         sparc_forget_process.
8613 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8615         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8616         (procfs_target::make_corefile_notes): Adjust to new
8617         target_read_alloc return type.
8619 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8620             Stephen Roberts  <stephen.roberts@arm.com>
8622         PR gdb/22882
8623         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8624         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8625         Move should_notify_stop local into more inner scope.
8627 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8628             Stephen Roberts  <stephen.roberts@arm.com>
8630         PR gdb/22882
8631         * infrun.c (resume_1): Add call to mark_async_event_handler.
8633 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8635         * infrun.c (do_target_wait): Change old version of $pc printed.
8637 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8639         * dwarf2read.c (read_index_from_section): Rename to...
8640         (read_gdb_index_from_section): ... this, update all callers.
8641         (dwarf2_read_index): Rename to...
8642         (dwarf2_read_gdb_index): ... this, update all callers.
8644 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8646         * hppa-linux-nat.c
8647         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8648         hppa_linux_nat_target::fetch_registers.
8650 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8652         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8653         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8654         (AARCH64_DWARF_SVE_FFR): Likewise.
8655         (AARCH64_DWARF_SVE_P0): Likewise.
8656         (AARCH64_DWARF_SVE_Z0): Likewise.
8658 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8660         * common/common-regcache.h (raw_compare): New function.
8661         * regcache.c (regcache::raw_compare): Likewise.
8662         * regcache.h (regcache::raw_compare): New declaration.
8664 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8666         * common/common-regcache.h (reg_buffer_common): New structure.
8667         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8668         (reg_buffer::raw_supply): Likewise.
8669         (reg_buffer::raw_supply_integer): Likewise.
8670         (reg_buffer::raw_supply_zeroed): Likewise.
8671         (reg_buffer::raw_collect): Likewise.
8672         (reg_buffer::raw_collect_integer): Likewise.
8673         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8674         (reg_buffer::raw_supply): Likewise.
8675         (reg_buffer::raw_supply_integer): Likewise.
8676         (reg_buffer::raw_supply_zeroed): Likewise.
8677         (reg_buffer::raw_collect): Likewise.
8678         (reg_buffer::raw_collect_integer): Likewise.
8680 2018-06-10  Tom Tromey  <tom@tromey.com>
8682         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8683         (class remote_state) <stop_reply_queue>: Now std::vector.
8684         (remote_state::~remote_state)
8685         (remote_target::stop_reply_queue_length): Update.
8686         (struct queue_iter_param, remove_child_of_pending_fork)
8687         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8688         (check_pending_event_prevents_wildcard_vcont_callback)
8689         (remove_stop_reply_for_inferior)
8690         (remove_stop_reply_of_remote_state)
8691         (remote_notif_remove_once_on_match)
8692         (stop_reply_match_ptid_and_ws)
8693         (remote_kill_child_of_pending_fork): Remove.
8694         (remote_target::remove_new_fork_children)
8695         (remote_target::check_pending_events_prevent_wildcard_vcont)
8696         (remote_target::discard_pending_stop_replies)
8697         (remote_target::discard_pending_stop_replies_in_queue)
8698         (remote_target::remote_notif_remove_queued_reply)
8699         (remote_target::queued_stop_reply)
8700         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8701         (remote_target::wait, remote_target::kill_new_fork_children)
8702         (remote_target::async): Update.
8704 2018-06-10  Tom Tromey  <tom@tromey.com>
8706         * record-full.c (record_full_arch_list_cleanups): Remove.
8707         (record_full_message): Use try/catch.
8708         (record_full_wait_cleanups): Remove.
8709         (record_full_wait_1): Use try/catch.
8710         (record_full_restore): Likewise.
8712 2018-06-10  Tom Tromey  <tom@tromey.com>
8714         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8715         declare VEC.  Add constructor.
8716         <in_target_beneath>: Now bool.
8717         (record_full_breakpoints): Now a std::vector, static.
8718         (record_full_sync_record_breakpoints)
8719         (record_full_init_record_breakpoints)
8720         (record_full_target::insert_breakpoint)
8721         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8723 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8725         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8726         * serial.c (serial_interface_lookup): Remove struct keyword.
8728 2018-06-10  Tom Tromey  <tom@tromey.com>
8730         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8731         method.
8732         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8733         a method.
8734         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8735         method.
8736         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8737         "beneath" as a method.
8738         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8739         Use "beneath" as a method.
8741 2018-06-10  Tom Tromey  <tom@tromey.com>
8743         * tracefile.c (struct trace_file_writer_deleter): New.
8744         <operator()>: Rename from trace_file_writer_xfree.
8745         (trace_file_writer_up): New typedef.
8746         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8748 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8750         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8751         <m_registers, m_register_status>: Change type to
8752         std::unique_ptr.
8753         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8754         XCNEWVEC.
8756 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8758         * common/common-regcache.h (enum register_status): Add
8759         underlying type "signed char".
8760         * regcache.h (reg_buffer) <m_register_status>: Change type to
8761         register_status *.
8762         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8763         register_status instead of signed char.
8764         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8765         (reg_buffer::get_register_status): Remove cast.
8766         (readable_regcache::raw_read): Remove cast.
8767         (readable_regcache::cooked_read): Remove cast.
8769 2018-06-09  Tom Tromey  <tom@tromey.com>
8771         * source.c (reverse_search_command, forward_search_command): Use
8772         scoped_fd.
8774 2018-06-09  Tom Tromey  <tom@tromey.com>
8776         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8777         (serial_ops_list): Now static, std::vector.
8778         (serial_interface_lookup, serial_add_interface): Update.
8780 2018-06-09  Tom Tromey  <tom@tromey.com>
8782         * dwarf2read.c (process_cu_includes): Update.
8783         (process_full_comp_unit): Update.
8784         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8785         std::vector.
8787 2018-06-08  Paul Koning  <paul_koning@dell.com>
8789         PR gdb/23252
8791         * python/python.c (do_start_initialization):
8792         Avoid call to internal Python API.
8793         (init__gdb_module): New function.
8795 2018-06-08  Gary Benson <gbenson@redhat.com>
8797         * linux-thread-db.c (valprint.h): New include.
8798         (struct check_thread_db_info): New structure.
8799         (check_thread_db_on_load, tdb_testinfo): New static globals.
8800         (check_thread_db, check_thread_db_callback): New functions.
8801         (try_thread_db_load_1): Run integrity checks if requested.
8802         (maintenance_check_libthread_db): New function.
8803         (_initialize_thread_db): Register "maint check libthread-db"
8804         and "maint set/show check-libthread-db".
8805         * NEWS: Mention the above new commands.
8807 2018-06-08  Tom Tromey  <tom@tromey.com>
8809         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8810         now a method.
8812 2018-06-08  Tom Tromey  <tom@tromey.com>
8814         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8816 2018-06-08  Tom Tromey  <tom@tromey.com>
8818         * common/btrace-common.h (struct btrace_data): Add constructor,
8819         destructor, move assignment operator.
8820         <empty, clear, fini>: New methods.
8821         <format>: Initialize.
8822         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8823         (btrace_data_empty): Don't declare.
8824         * common/btrace-common.c (btrace_data_init): Remove.
8825         (btrace_data::fini): Rename from btrace_data_fini.
8826         (btrace_data::empty): Rename from btrace_data_empty.
8827         (btrace_data::clear): Rename from btrace_data_clear.  Return
8828         bool.
8829         * btrace.h (make_cleanup_btrace_data): Don't declare.
8830         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8831         (parse_xml_btrace): Update.
8832         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8833         (maint_btrace_clear_packet_history_cmd): Update.
8835 2018-06-07  Pedro Alves  <palves@redhat.com>
8837         * target.h (target_ops) <beneath>: Now a method.  All references
8838         updated.
8839         (class target_stack): New.
8840         * target.c (g_target_stack): New.
8841         (g_current_top_target): Delete.
8842         (current_top_target): Get the top target out of g_target_stack.
8843         (target_stack::push, target_stack::unpush): New.
8844         (push_target, unpush_target): Reimplement.
8845         (target_is_pushed): Reimplement in terms of g_target_stack.
8846         (target_ops::beneath, target_stack::find_beneath): New.
8848 2018-06-07  Pedro Alves  <palves@redhat.com>
8850         * target.h (find_target_beneath): Delete declaration.
8851         * target.c (find_target_beneath): Delete definition.
8852         * aix-thread.c: All callers of find_target_beneath adjusted to
8853         call target_ops::beneath instead.
8854         * bsd-uthread.c: Likewise.
8855         * linux-thread-db.c: Likewise.
8856         * ravenscar-thread.c: Likewise.
8857         * sol-thread.c: Likewise.
8858         * spu-multiarch.c: Likewise.
8860 2018-06-07  Pedro Alves  <palves@redhat.com>
8862         * target.h (target_ops) <beneath>: Now a method.  All references
8863         updated.
8864         (target_ops) <m_beneath>: New.
8865         * target.c (target_ops::beneath): New.
8866         * corelow.c: Adjust all references to target_ops::beneath.
8867         * linux-thread-db.c: Likewise.
8868         * make-target-delegates: Likewise.
8869         * record-btrace.c: Likewise.
8870         * record-full.c: Likewise.
8871         * remote.c: Likewise.
8872         * target.c: Likewise.
8873         * target-delegates.c: Regenerate.
8875 2018-06-07  Pedro Alves  <palves@redhat.com>
8877         * target.h (target_stack): Delete.
8878         (current_top_target): Declare function.
8879         * target.c (target_stack): Delete.
8880         (g_current_top_target): New.
8881         (current_top_target): New function.
8882         * auxv.c: Use current_top_target instead of target_stack
8883         throughout.
8884         * avr-tdep.c: Likewise.
8885         * breakpoint.c: Likewise.
8886         * corefile.c: Likewise.
8887         * elfread.c: Likewise.
8888         * eval.c: Likewise.
8889         * exceptions.c: Likewise.
8890         * frame.c: Likewise.
8891         * gdbarch-selftests.c: Likewise.
8892         * gnu-v3-abi.c: Likewise.
8893         * ia64-tdep.c: Likewise.
8894         * ia64-vms-tdep.c: Likewise.
8895         * infcall.c: Likewise.
8896         * infcmd.c: Likewise.
8897         * infrun.c: Likewise.
8898         * linespec.c: Likewise.
8899         * linux-tdep.c: Likewise.
8900         * minsyms.c: Likewise.
8901         * ppc-linux-nat.c: Likewise.
8902         * ppc-linux-tdep.c: Likewise.
8903         * procfs.c: Likewise.
8904         * regcache.c: Likewise.
8905         * remote.c: Likewise.
8906         * rs6000-tdep.c: Likewise.
8907         * s390-linux-nat.c: Likewise.
8908         * s390-tdep.c: Likewise.
8909         * solib-aix.c: Likewise.
8910         * solib-darwin.c: Likewise.
8911         * solib-dsbt.c: Likewise.
8912         * solib-spu.c: Likewise.
8913         * solib-svr4.c: Likewise.
8914         * solib-target.c: Likewise.
8915         * sparc-tdep.c: Likewise.
8916         * sparc64-tdep.c: Likewise.
8917         * spu-tdep.c: Likewise.
8918         * symfile.c: Likewise.
8919         * symtab.c: Likewise.
8920         * target-descriptions.c: Likewise.
8921         * target-memory.c: Likewise.
8922         * target.c: Likewise.
8923         * target.h: Likewise.
8924         * tracefile-tfile.c: Likewise.
8925         * tracepoint.c: Likewise.
8926         * valops.c: Likewise.
8927         * valprint.c: Likewise.
8928         * value.c: Likewise.
8929         * windows-tdep.c: Likewise.
8930         * mi/mi-main.c: Likewise.
8932 2018-06-07  Tom Tromey  <tom@tromey.com>
8934         * valprint.h (build_address_symbolic): Declare.
8935         * printcmd.c (print_address_symbolic): Update.
8936         (build_address_symbolic): Change "name" and "filename" to
8937         std::string.
8938         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8939         Update.
8940         * defs.h (build_address_symbolic): Remove declaration.
8942 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8944         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8945         (aarch64_vnv_type): Add function.
8946         (aarch64_pseudo_register_name): Add V regs for SVE.
8947         (aarch64_pseudo_register_type): Likewise.
8948         (aarch64_pseudo_register_reggroup_p): Likewise.
8949         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8950         (aarch64_pseudo_read_value): Add V regs for SVE.
8951         (aarch64_pseudo_write_2): Use V0 offset for SVE
8952         (aarch64_pseudo_write): Add V regs for SVE.
8953         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8955 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8957         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8958         (sve_vl_from_vq): Likewise.
8960 2018-06-05  Tom Tromey  <tom@tromey.com>
8962         * cli/cli-cmds.c (show_version): Update.
8963         * top.c (print_gdb_version): Add "interactive" parameter.
8964         Update.
8965         * main.c (captured_main_1): Update.
8966         * top.h (print_gdb_version): Add "interactive" parameter and a
8967         comment.
8969 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8971         * common/enum-flags.h: Add trailing semicolon to example in
8972         comment.
8974 2018-06-05  Tom Tromey  <tom@tromey.com>
8976         PR cli/12326:
8977         * NEWS: Add entry about pager.
8978         * utils.c (pagination_disabled_for_command): New global.
8979         (prompt_for_continue): Allow "c" response to prompt.
8980         (reinitialize_more_filter): Clear
8981         pagination_disabled_for_command.
8982         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8984 2018-06-04  Tom Tromey  <tom@tromey.com>
8986         * ada-lang.h (ada_lookup_symbol_list): Update.
8987         * ada-lang.c (resolve_subexp): Update.
8988         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8989         parameter.
8990         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8991         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8992         results parameter to std::vector.
8993         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8994         Update.
8995         * ada-exp.y (block_lookup): Update.
8996         (select_possible_type_sym): Change type of syms.  Remove nsyms
8997         parameter.
8998         (write_var_or_type, write_name_assoc): Update.
9000 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
9002         * windows-nat.c (windows_nat_target::xfer_partial): Return
9003         TARGET_XFER_E_IO if we need to delegate to the target beneath
9004         but BENEATH is NULL.
9006 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
9008         * Makefile.in (config.status): Add configure.nat as a
9009         dependency.
9011 2018-06-04  Tom Tromey  <tom@tromey.com>
9013         * cp-name-parser.y (cpname_state): Add method declarations.
9014         (HANDLE_QUAL): Update.
9015         (cpname_state::d_grab, cpname_state::fill_comp)
9016         (cpname_state::make_operator, cpname_state::make_dtor)
9017         (cpname_state::make_builtin_type, cpname_state::make_name)
9018         (cpname_state::d_qualify, cpname_state::d_int_type)
9019         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
9020         (%union): Move earlier.
9022 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9024         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
9026 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9028         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
9029         (aarch64_pseudo_write_1): Likewise.
9030         (aarch64_pseudo_read_value): Use helper.
9031         (aarch64_pseudo_write): Likewise.
9033 2018-06-04  Pedro Alves  <palves@redhat.com>
9035         * darwin-nat.c (darwin_ops): Delete.
9036         (darwin_attach_pid): Use get_native_target.
9038 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9040         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
9041         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
9043 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9045         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
9046         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
9047         (aarch64_gdbarch_init): Check for SVE.
9048         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
9050 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9052         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
9053         * aarch64-tdep.h (aarch64_read_description): Likewise.
9054         * arch/aarch64.c (aarch64_create_target_description): Likewise.
9055         * arch/aarch64.h (aarch64_create_target_description): Likewise.
9056         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
9057         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
9058         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
9060 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9062         * value.c (value_fetch_lazy_bitfield): New.
9063         (value_fetch_lazy_memory): New.
9064         (value_fetch_lazy_register): New.
9065         (value_fetch_lazy): Factor out to smaller functions.
9067 2018-06-01  Tom Tromey  <tom@tromey.com>
9069         * cp-name-parser.y (backslashable, represented): Now const.
9071 2018-06-01  Tom Tromey  <tom@tromey.com>
9073         * cp-name-parser.y: Include parser-defs.h.
9074         (parser_fprintf): Remove declaration.
9076 2018-06-01  Tom Tromey  <tom@tromey.com>
9078         * cp-name-parser.y: Use %pure-parser, %lex-param, and
9079         %parse-param.
9080         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
9081         (global_result): Remove globals.
9082         (struct cpname_state): New.
9083         (yyparse): Don't declare.
9084         (yylex, yyerror): Move declarations after %union.
9085         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
9086         (make_name): Add state parameter.
9087         Update all callers.
9088         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
9089         parameter.
9090         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
9091         Update.
9092         (yylex): Add lvalp, state parameters.
9093         (yyerror): Add state parameter.
9094         (cp_demangled_name_to_comp): Update.
9096 2018-06-01  Tom Tromey  <tom@tromey.com>
9098         * cp-name-parser.y (parser_fprintf): Declare.
9099         (GDB_YY_REMAP_PREFIX): Define.
9100         Include yy-remap.h.  Don't redefine yy* identifiers.
9102 2018-06-01  Tom Tromey  <tom@tromey.com>
9104         * python/py-type.c (typy_legacy_template_argument): Update.
9105         * cp-support.h (cp_demangled_name_to_comp): Update.
9106         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
9107         parameter to be a "std::string *".
9108         (main): Update.
9110 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
9112         * ada-lex.l: Include "diagnostics.h" instead of
9113         "common/diagnostics.h".
9114         * unittests/environ-selftests.c: Likewise.
9115         * common/diagnostics.h: Moved to ../include.
9117 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
9119         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
9120         to language_mode_manual while calling breakpoint_re_set_one.
9122 2018-06-01  Tom Tromey  <tom@tromey.com>
9124         * valops.c (value_cast_structs, destructor_name_p): Update.
9125         * symtab.c (gdb_mangle_name): Update.
9126         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
9127         Update.
9128         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
9129         (pascal_object_print_value_fields, pascal_object_print_value):
9130         Update.
9131         * p-typeprint.c (pascal_type_print_derivation_info): Update.
9132         * linespec.c (find_methods): Update.
9133         * gdbtypes.h (type_name_no_tag): Remove.
9134         (type_name_or_error): Rename from type_name_no_tag_or_error.
9135         * gdbtypes.c (type_name_no_tag): Remove.
9136         (type_name_or_error): Rename from type_name_no_tag_or_error.
9137         (lookup_struct_elt_type, check_typedef): Update.
9138         * expprint.c (print_subexp_standard): Update.
9139         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
9140         * d-namespace.c (d_lookup_nested_symbol): Update.
9141         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
9142         (cp_print_class_member): Update.
9143         * cp-namespace.c (cp_lookup_nested_symbol): Update.
9144         * completer.c (add_struct_fields): Update.
9145         * c-typeprint.c (cp_type_print_derivation_info)
9146         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
9147         Update.
9148         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
9149         (ada_prefer_type, ada_is_exception_sym): Update.
9151 2018-06-01  Tom Tromey  <tom@tromey.com>
9153         * valops.c (enum_constant_from_type, value_namespace_elt)
9154         (value_maybe_namespace_elt): Update.
9155         * valarith.c (find_size_for_pointer_math): Update.
9156         * target-descriptions.c (make_gdb_type): Update.
9157         * symmisc.c (print_symbol): Update.
9158         * stabsread.c (define_symbol, read_type)
9159         (complain_about_struct_wipeout, add_undefined_type)
9160         (cleanup_undefined_types_1): Update.
9161         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
9162         (rust_range_type_p, val_print_struct, rust_print_struct_def)
9163         (rust_internal_print_type, rust_composite_type)
9164         (rust_evaluate_funcall, rust_evaluate_subexp)
9165         (rust_inclusive_range_type_p): Update.
9166         * python/py-type.c (typy_get_tag): Update.
9167         * p-typeprint.c (pascal_type_print_base): Update.
9168         * mdebugread.c (parse_symbol, parse_type): Update.
9169         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
9170         Update.
9171         * guile/scm-type.c (gdbscm_type_tag): Update.
9172         * go-lang.c (sixg_string_p): Update.
9173         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
9174         Update.
9175         * gdbtypes.h (struct main_type) <tag_name>: Remove.
9176         (TYPE_TAG_NAME): Remove.
9177         * gdbtypes.c (type_name_no_tag): Simplify.
9178         (check_typedef, check_types_equal, recursive_dump_type)
9179         (copy_type_recursive, arch_composite_type): Update.
9180         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
9181         in summary mode when needed.
9182         * eval.c (evaluate_funcall): Update.
9183         * dwarf2read.c (fixup_go_packaging, read_structure_type)
9184         (process_structure_scope, read_enumeration_type)
9185         (read_namespace_type, read_module_type, determine_prefix): Update.
9186         * cp-support.c (inspect_type): Update.
9187         * coffread.c (process_coff_symbol, decode_base_type): Update.
9188         * c-varobj.c (c_is_path_expr_parent): Update.
9189         * c-typeprint.c (c_type_print_base_struct_union): Update.
9190         (c_type_print_base_1): Update.  Print struct/class/union/enum in
9191         summary when using C language.
9192         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
9193         (gen_maybe_namespace_elt): Update.
9194         * ada-lang.c (ada_type_name): Simplify.
9195         (empty_record, ada_template_to_fixed_record_type_1)
9196         (template_to_static_fixed_type)
9197         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
9199 2018-06-01  Tom Tromey  <tom@tromey.com>
9201         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
9202         c_print_type.
9203         * c-typeprint.c (c_print_type_1): Add "language" parameter.
9204         (c_print_type): Update.
9205         (c_print_type): New overload.
9206         (c_type_print_varspec_prefix, c_type_print_args)
9207         (c_type_print_varspec_suffix, c_print_type_no_offsets)
9208         (c_type_print_base_struct_union, c_type_print_base_1)
9209         (cp_type_print_method_args): Add "language" parameter.
9210         (c_type_print_base): Update.
9211         * c-lang.h (c_print_type): Add new overload.
9213 2018-06-01  Tom Tromey  <tom@tromey.com>
9215         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
9216         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
9218 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
9220         * aarch64-tdep.c (aarch64_sve_register_names): New const
9221         var.
9222         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
9223         (AARCH64_SVE_Z_REGS_NUM): New define.
9224         (AARCH64_SVE_P_REGS_NUM): Likewise.
9225         (AARCH64_SVE_NUM_REGS): Likewise.
9227 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
9229         * nat/linux-ptrace.h [__alpha__]
9230         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
9231         definitions.
9233 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
9235         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
9236         the endianness selected.
9237         * NEWS: Document `set endian auto' mode operation update.
9239 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
9241         * Makefile.in: Add new header.
9242         * arch/aarch64.h (sve_vg_from_vl): New macro.
9243         (sve_vl_from_vg): Likewise.
9244         (sve_vq_from_vl): Likewise.
9245         (sve_vl_from_vq): Likewise.
9246         (sve_vq_from_vg): Likewise.
9247         (sve_vg_from_vq): Likewise.
9248         * configure.nat: Add new c file.
9249         * nat/aarch64-sve-linux-ptrace.c: New file.
9250         * nat/aarch64-sve-linux-ptrace.h: New file.
9252 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
9254         * aarch64-linux-nat.c (aarch64_linux_read_description):
9255         Add parmeter zero.
9256         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
9257         Likewise.
9258         * aarch64-tdep.c (tdesc_aarch64_list): Add.
9259         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9260         (aarch64_gdbarch_init): Add parmeter zero.
9261         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
9262         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9263         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9264         parmeter.
9265         * features/aarch64-sve.c: New file.
9267 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
9269         PR gdb/23210
9270         * gdbarch.sh (significant_addr_bit): Default to zero when
9271         not set by target architecture.
9272         * gdbarch.c: Re-generated.
9273         * utils.c (address_significant): Update.
9275 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
9277         * stack.c (func_command): Remove trailing newline in call to error.
9279 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9281         * regcache.h (regcache_raw_collect): Remove, update callers to
9282         use regcache::raw_collect.
9283         * regcache.c (regcache_raw_collect): Remove.
9285 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9287         * regcache.h (regcache_raw_supply): Remove, update callers to
9288         use detached_regcache::raw_supply.
9289         * regcache.c (regcache_raw_supply): Remove.
9291 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9293         * regcache.h (regcache_cooked_write_part): Remove, update
9294         callers to use regcache::cooked_write_part.
9295         * regcache.c (regcache_cooked_write_part): Remove.
9297 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9299         * regcache.h (regcache_cooked_read_part): Remove, update callers
9300         to use readable_regcache::cooked_read_part.
9301         * regcache.c (regcache_cooked_read_part): Remove.
9303 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9305         * regcache.h (regcache_cooked_read_value): Remove, update
9306         callers to use readable_regcache::cooked_read_value.
9307         * regcache.c (regcache_cooked_read_value): Remove.
9309 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9311         * regcache.h (regcache_cooked_write): Remove, update callers to
9312         use regcache::cooked_write.
9313         * regcache.c (regcache_cooked_write): Remove.
9315 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9317         * regcache.h (regcache_invalidate): Remove, update callers to
9318         use detached_regcache::invalidate instead.
9319         * regcache.c (regcache_invalidate): Remove.
9321 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9323         * regcache.h (regcache_raw_write_part): Remove, update callers
9324         to use regcache::raw_write_part instead.
9325         * regcache.c (regcache_raw_write_part): Remove.
9327 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9329         * regcache.h (regcache_raw_read_part): Remove, update callers to
9330         use readable_regcache::raw_read_part instead.
9331         * regcache.c (regcache_raw_read_part): Remove.
9333 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9335         * regcache.h (regcache_cooked_read): Remove, update callers to
9336         use readable_regcache::cooked_read instead.
9337         * regcache.c (regcache_cooked_read): Remove.
9339 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9341         * regcache.h (regcache_raw_write): Remove, update callers to use
9342         regcache::raw_write instead.
9343         * regcache.c (regcache_raw_write): Remove.
9345 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9347         * regcache.h (regcache_raw_read): Remove, update callers to use
9348         readable_regcache::raw_read instead.
9349         * regcache.c (regcache_raw_read): Remove.
9351 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9353         * regcache.h (regcache_raw_update): Remove, update callers to
9354         use readable_regcache::raw_update instead.
9355         * regcache.c (regcache_raw_update): Remove.
9357 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9359         * regcache.h (regcache_register_status): Remove, update callers
9360         to use reg_buffer::get_register_status directly instead.
9361         * regcache.c (regcache_register_status): Remove.
9363 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9365         * regcache.h (regcache_get_ptid): Remove, update all callers to
9366         call regcache::ptid instead.
9367         * regcache.c (regcache_get_ptid): Remove.
9369 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9371         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9373 2018-05-30  Pedro Alves  <palves@redhat.com>
9375         * common/common-exceptions.h (exception_rethrow): Use
9376         ATTRIBUTE_NORETURN.
9378 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9380         * breakpoint.c (print_solib_event, check_status_catch_solib):
9381         Remove struct keyword in range-based for loops.
9382         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9383         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9384         Likewise.
9385         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9386         Likewise.
9387         * symfile.c (addr_info_make_relative): Likewise.
9388         * thread.c (value_in_thread_stack_temporaries): Likewise.
9390 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9392         PR gdb/16841
9393         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9394         aggregate type to get its real type before accessing it.
9396 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9398         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9399         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9400         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9401         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9402         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9403         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9404         * printcmd.c (info_address_command): Likewise.
9406 2018-05-29  Tom Tromey  <tom@tromey.com>
9408         * windows-nat.c (handle_exception): Update fall-through comment.
9410 2018-05-29  Tom Tromey  <tom@tromey.com>
9412         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9413         (struct program_space) <added_solibs>: Now a std::vector.
9414         * breakpoint.c (print_solib_event): Update.
9415         (check_status_catch_solib): Update.
9416         * progspace.c (clear_program_space_solib_cache): Update.
9417         * solib.c (update_solib_list): Update.
9419 2018-05-29  Tom Tromey  <tom@tromey.com>
9421         * python/py-type.c (typy_richcompare): Update.
9422         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9423         * gdbtypes.h (types_deeply_equal): Return bool.
9424         (types_equal): Likewise.
9425         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9426         declare VEC.
9427         (check_types_equal): Change worklist to std::vector.  Return
9428         bool.
9429         (struct type_equality_entry): Add constructor.
9430         (compare_maybe_null_strings): Return bool.
9431         (check_types_worklist): Return bool.  Change worklist to
9432         std::vector.
9433         (types_deeply_equal): Use std::vector.
9434         (types_equal): Return bool.
9435         (compare_maybe_null_strings): Simplify.
9437 2018-05-29  Tom Tromey  <tom@tromey.com>
9439         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9441 2018-05-29  Tom Tromey  <tom@tromey.com>
9443         * objc-lang.h: Don't include cp-support.h.
9444         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9445         declare VEC.
9447 2018-05-27  Tom Tromey  <tom@tromey.com>
9449         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9451 2018-05-25  Tom Tromey  <tom@tromey.com>
9453         * value.c (value::location): Initialize.
9455 2018-05-25  Tom Tromey  <tom@tromey.com>
9457         * dbxread.c (init_bincl_list): Remove.
9458         (bincl_list): Now a std::vector.
9459         (bincls_allocated, next_bincl): Remove.
9460         (free_bincl_list, do_free_bincl_list_cleanup)
9461         (make_cleanup_free_bincl_list): Remove.
9462         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9463         unique_xmalloc_ptr.
9464         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9465         (struct header_file_location): Add constructor.
9466         (add_bincl_to_list): Remove.
9468 2018-05-25  Tom Tromey  <tom@tromey.com>
9470         * tui/tui.c (tui_enable): Update.
9471         * mi/mi-interp.c (mi_interp::init): Update.
9472         * interps.h (class interp) <name>: New method.
9473         <m_name>: Rename from name.
9474         (~scoped_restore_interp): Update.
9475         * interps.c (interp::interp): Update.
9476         (interp_add, interp_set, interp_lookup_existing)
9477         (current_interp_named_p): Update.
9479 2018-05-25  Tom Tromey  <tom@tromey.com>
9481         * interps.c (interp_name): Remove.
9482         * mi/mi-interp.c (mi_interp::init): Update.
9483         * interps.h (interp_name): Remove.
9484         (~scoped_restore_interp): Update.
9485         * tui/tui.c (tui_enable): Update.
9487 2018-05-25  Tom Tromey  <tom@tromey.com>
9489         * utils.c (fputs_maybe_filtered): Update.
9490         * linespec.c (decode_line_full): Update.
9491         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9492         (mi_print_breakpoint_for_event, mi_solib_loaded)
9493         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9494         (mi_user_selected_context_changed): Update.
9495         * mi/mi-main.c (mi_execute_command): Update.
9496         * cli/cli-script.c (execute_control_command): Update.
9497         * python/python.c (execute_gdb_command): Update.
9498         * solib.c (info_sharedlibrary_command): Update.
9499         * interps.c (interp_ui_out): Remove.
9500         * interps.h (interp_ui_out): Remove.
9502 2018-05-25  Tom Tromey  <tom@tromey.com>
9504         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9505         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9506         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9508 2018-05-25  Tom Tromey  <tom@tromey.com>
9510         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9511         * interps.c (interp_exec): Use scoped_restore.
9513 2018-05-25  Tom Tromey  <tom@tromey.com>
9515         * remote.c (remote_target::remote_file_get): Use
9516         gdb::byte_vector.
9517         (remote_target::remote_file_put): Likewise.
9519 2018-05-25  Tom Tromey  <tom@tromey.com>
9521         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9522         a std::string.
9523         (get_pe_section_index, add_pe_exported_sym): Update.
9524         (read_pe_exported_syms): Use gdb::def_vector.
9526 2018-05-25  Tom Tromey  <tom@tromey.com>
9528         * frame.c (remove_prev_frame): Remove.
9529         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9531 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9533         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9534         Remove prototypes.
9535         * mips-linux-nat.c (supply_fpregset): Always call
9536         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9537         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9538         `mips_fill_fpregset'.
9539         * mips-linux-tdep.c (mips_supply_fpregset)
9540         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9541         (mips_fill_fpregset_wrapper): Remove functions.
9542         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9543         (mips_linux_fpregset): Remove variable.
9544         (mips_linux_iterate_over_regset_sections): Use
9545         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9546         (mips_linux_o32_sigframe_init): Remove comment.
9548 2018-05-25  Pedro Alves  <palves@redhat.com>
9550         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9551         (struct readahead_cache, struct packet_reg, struct
9552         remote_arch_state, class remote_state): Move higher up in the
9553         file.
9554         (remote_target::m_remote_state): Now an object instead of a pointer.
9555         (remote_target::get_remote_state): Adjust.
9557 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9559         * stack.c (select_and_print_frame): Delete.
9560         (struct function_bounds): Move struct within function.
9561         (func_command): Most content moved into new function
9562         find_frame_for_function, use new function, print result, add
9563         function comment.
9564         (find_frame_for_function): New function, now returns a result.
9566 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9568         * stack.c (iterate_over_block_arg_vars): Fix comment.
9569         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9571 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9573         PR gdb/23203
9574         * frame.c
9575         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9576         Define.
9577         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9578         Define.
9579         * frame.h (class scoped_restore_selected_frame): New class.
9580         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9581         of any exception, use scoped_restore_selected_frame to restore the
9582         frame instead.
9584 2018-05-24  Pedro Alves  <palves@redhat.com>
9586         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9587         override.
9589 2018-05-23  Tom Tromey  <tom@tromey.com>
9591         * complaints.c (struct complaints): Remove.
9592         (symfile_complaint_book): Remove.
9593         (series): New global.
9594         (complaint_internal): Update.
9595         (clear_complaints): Update.
9597 2018-05-23  Tom Tromey  <tom@tromey.com>
9599         * complaints.c (counters): New global.
9600         (struct complain): Remove.
9601         (struct complaints) <root>: Remove.
9602         (complaint_sentinel): Remove.
9603         (symfile_complaint_book): Update.
9604         (find_complaint) Remove.
9605         (complaint_internal, clear_complaints): Update.
9607 2018-05-23  Tom Tromey  <tom@tromey.com>
9609         * complaints.c (struct complain) <file, line>: Remove.
9610         (find_complaint): Remove file, line parameters.
9611         (complaint_internal): Update.
9613 2018-05-23  Tom Tromey  <tom@tromey.com>
9615         * complaints.c (vcomplaint): Remove.
9616         (complaint_internal) Merge in contents of vcomplaint.
9618 2018-05-23  Tom Tromey  <tom@tromey.com>
9620         * complaints.c (struct complaints) <explanation>: Remove.
9621         (symfile_explanations): Remove.
9622         (symfile_complaint_book): Update.
9623         (vcomplaint): Update.
9624         (struct explanation): Remove.
9626 2018-05-23  Tom Tromey  <tom@tromey.com>
9628         * complaints.c (symfile_complaints): Remove.
9629         (complaint_internal): Remove "complaints" parameter.
9630         (clear_complaints, vcomplaint): Remove "c" parameter.
9631         (get_complaints): Remove.
9632         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9633         (dwarf2_debug_line_missing_file_complaint)
9634         (dwarf2_debug_line_missing_end_sequence_complaint)
9635         (dwarf2_complex_location_expr_complaint)
9636         (dwarf2_const_value_length_mismatch_complaint)
9637         (dwarf2_section_buffer_overflow_complaint)
9638         (dwarf2_macro_malformed_definition_complaint)
9639         (dwarf2_invalid_attrib_class_complaint)
9640         (create_addrmap_from_index, dw2_symtab_iter_next)
9641         (dw2_expand_marked_cus)
9642         (dw2_debug_names_iterator::find_vec_in_debug_names)
9643         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9644         (create_debug_type_hash_table, init_cutu_and_read_dies)
9645         (partial_die_parent_scope, add_partial_enumeration)
9646         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9647         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9648         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9649         (create_cus_hash_table, create_dwp_hash_table)
9650         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9651         (dwarf2_rnglists_process, dwarf2_ranges_process)
9652         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9653         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9654         (handle_struct_member_die, process_structure_scope)
9655         (read_array_type, read_common_block, read_module_type)
9656         (read_tag_pointer_type, read_typedef, read_base_type)
9657         (read_subrange_type, load_partial_dies, partial_die_info::read)
9658         (partial_die_info::read, partial_die_info::read)
9659         (partial_die_info::read, read_checked_initial_length_and_offset)
9660         (dwarf2_string_attr, read_formatted_entries)
9661         (dwarf_decode_line_header)
9662         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9663         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9664         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9665         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9666         (get_signatured_type, get_DW_AT_signature_type)
9667         (decode_locdesc, file_file_name, consume_improper_spaces)
9668         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9669         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9670         (dwarf2_symbol_mark_computed, set_die_type)
9671         (read_attribute_value): Update.
9672         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9673         Update.
9674         * dbxread.c (unknown_symtype_complaint)
9675         (lbrac_mismatch_complaint, repeated_header_complaint)
9676         (set_namestring, function_outside_compilation_unit_complaint)
9677         (read_dbx_symtab, process_one_symbol): Update.
9678         * gdbtypes.c (stub_noname_complaint): Update.
9679         * windows-nat.c (handle_unload_dll): Update.
9680         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9681         (decode_base_type): Update.
9682         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9683         (eb_complaint, record_include_begin, record_include_end)
9684         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9685         (process_xcoff_symbol, read_symbol)
9686         (function_outside_compilation_unit_complaint)
9687         (scan_xcoff_symtab): Update.
9688         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9689         * buildsym.c (finish_block_internal, make_blockvector)
9690         (end_symtab_get_static_block, augment_type_symtab): Update.
9691         * dtrace-probe.c (dtrace_process_dof)
9692         (dtrace_static_probe_ops::get_probes): Update.
9693         * complaints.h (struct complaint): Don't declare.
9694         (symfile_complaints): Remove.
9695         (complaint_internal): Remove "complaints" parameter.
9696         (complaint): Likewise.
9697         (clear_complaints): Likewise.
9698         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9699         (reread_symbols): Update.
9700         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9701         (dwarf2_frame_cache, decode_frame_entry): Update.
9702         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9703         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9704         (info_selectors_command): Update.
9705         * macrotab.c (macro_include, check_for_redefinition)
9706         (macro_undef): Update.
9707         * objfiles.c (filter_overlapping_sections): Update.
9708         * stabsread.c (invalid_cpp_abbrev_complaint)
9709         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9710         (define_symbol, error_type, read_type, rs6000_builtin_type)
9711         (stabs_method_name_from_physname, read_member_functions)
9712         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9713         (attach_fields_to_type, complain_about_struct_wipeout)
9714         (read_range_type, read_args, common_block_start)
9715         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9716         Update.
9717         * mdebugread.c (index_complaint, unknown_ext_complaint)
9718         (basic_type_complaint, bad_tag_guess_complaint)
9719         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9720         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9721         (parse_procedure, parse_lines)
9722         (function_outside_compilation_unit_complaint)
9723         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9724         (bad_tag_guess_complaint, reg_value_complaint): Update.
9725         * cp-support.c (demangled_name_complaint): Update.
9726         * macroscope.c (sal_macro_scope): Update.
9727         * dwarf-index-write.c (class debug_names): Update.
9729 2018-05-23  Tom Tromey  <tom@tromey.com>
9731         * complaints.c (clear_complaints): Remove "noisy" parameter.
9732         * complaints.h (clear_complaints): Update.
9733         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9734         (reread_symbols): Update.
9736 2018-05-23  Tom Tromey  <tom@tromey.com>
9738         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9739         SUBSEQUENT_MESSAGE.
9740         (vcomplaint, clear_complaints): Update.
9741         (symfile_explanations): Remove some messages.
9743 2018-05-23  Tom Tromey  <tom@tromey.com>
9745         * complaints.c (internal_complaint): Remove.
9746         * complaints.h (internal_complaint): Remove.
9748 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9750         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9752 2018-05-22  Pedro Alves  <palves@redhat.com>
9754         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9755         (remote_fileio_badfd, remote_fileio_return_errno)
9756         (remote_fileio_return_success, remote_fileio_func_open)
9757         (remote_fileio_func_open, remote_fileio_func_close)
9758         (remote_fileio_func_read, remote_fileio_func_write)
9759         (remote_fileio_func_lseek, remote_fileio_func_rename)
9760         (remote_fileio_func_unlink, remote_fileio_func_stat)
9761         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9762         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9763         remote_target parameter.
9764         (remote_fio_func_map) <func>: Add remote_target parameter.
9765         (do_remote_fileio_request, remote_fileio_request):
9766         * remote-fileio.h (remote_fileio_request):
9767         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9768         remote_target parameter.
9769         (remote_notif_process, handle_notification): Adjust to pass down
9770         the remote.
9771         (remote_notif_state_allocate): Add remote_target parameter.  Save
9772         it.
9773         * remote-notif.h (struct remote_target): Forward declare.
9774         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9775         remote_target parameter.
9776         (struct remote_notif_state) <remote>: New field.
9777         (remote_notif_ack, remote_notif_parse): Add remote_target
9778         parameter.
9779         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9780         remote_target parameter.
9781         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9782         (threads_listing_context, rmt_thread_action, protocol_feature)
9783         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9784         (packet_result, struct threads_listing_context, remote_state):
9785         Move definitions and declarations higher up.
9786         (remote_target) <~remote_target>: Declare.
9787         (remote_download_command_source, remote_file_put, remote_file_get)
9788         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9789         (remote_hostio_pread_vFile, remote_hostio_send_command)
9790         (remote_hostio_set_filesystem, remote_hostio_open)
9791         (remote_hostio_close, remote_hostio_unlink, remote_state)
9792         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9793         (get_memory_write_packet_size, get_memory_read_packet_size)
9794         (append_pending_thread_resumptions, remote_detach_1)
9795         (append_resumption, remote_resume_with_vcont)
9796         (add_current_inferior_and_thread, wait_ns, wait_as)
9797         (process_stop_reply, remote_notice_new_inferior)
9798         (process_initial_stop_replies, remote_add_thread)
9799         (btrace_sync_conf, remote_btrace_maybe_reopen)
9800         (remove_new_fork_children, kill_new_fork_children)
9801         (discard_pending_stop_replies, stop_reply_queue_length)
9802         (check_pending_events_prevent_wildcard_vcont)
9803         (discard_pending_stop_replies_in_queue, stop_reply)
9804         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9805         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9806         (remote_interrupt_as, remote_interrupt_ns)
9807         (remote_get_noisy_reply, remote_query_attached)
9808         (remote_add_inferior, remote_current_thread, get_current_thread)
9809         (set_thread, set_general_thread, set_continue_thread)
9810         (set_general_process, write_ptid)
9811         (remote_unpack_thread_info_response, remote_get_threadinfo)
9812         (parse_threadlist_response, remote_get_threadlist)
9813         (remote_threadlist_iterator, remote_get_threads_with_ql)
9814         (remote_get_threads_with_qxfer)
9815         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9816         (get_offsets, remote_check_symbols, remote_supported_packet)
9817         (remote_query_supported, remote_packet_size)
9818         (remote_serial_quit_handler, remote_detach_pid)
9819         (remote_vcont_probe, remote_resume_with_hc)
9820         (send_interrupt_sequence, interrupt_query)
9821         (remote_notif_get_pending_events, fetch_register_using_p)
9822         (send_g_packet, process_g_packet, fetch_registers_using_g)
9823         (store_register_using_P, store_registers_using_G)
9824         (set_remote_traceframe, check_binary_download)
9825         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9826         (remote_xfer_live_readonly_partial, remote_read_bytes)
9827         (remote_send_printf, remote_flash_write, readchar)
9828         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9829         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9830         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9831         (extended_remote_disable_randomization, extended_remote_run)
9832         (send_environment_packet, extended_remote_environment_support)
9833         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9834         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9835         (packet_command): Now methods of ...
9836         (remote_target): ... this class.
9837         (m_remote_state) <remote_target>: New field.
9838         (struct remote_state) <stop_reply_queue,
9839         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9840         fields.
9841         (remote_state::remote_state): Allocate stop_reply_queue.
9842         (remote_state): Delete global.
9843         (get_remote_state_raw): Delete.
9844         (remote_target::get_remote_state): Allocate m_remote_state on
9845         demand.
9846         (get_current_remote_target): New.
9847         (remote_ops, extended_remote_ops): Delete.
9848         (wait_forever_enabled_p, remote_async_inferior_event_token):
9849         Delete, moved to struct remote_state.
9850         (remote_target::close): Delete self.  Destruction bits split to
9851         ...
9852         (remote_target::~remote_target): ... this.
9853         (show_memory_packet_size): Adjust to use
9854         get_current_remote_target.
9855         (struct protocol_feature) <func>: Add remote_target parameter.
9856         All callers adjusted.
9857         (curr_quit_handler_target): New.
9858         (remote_serial_quit_handler): Reimplement.
9859         (remote_target::open_1): Adjust to use get_current_remote_target.
9860         Heap-allocate remote_target/extended_remote_target instances.
9861         (vcont_builder::vcont_builder): Add remote_target parameter, and
9862         save it in m_remote.  All callers adjusted.
9863         (vcont_builder::m_remote): New field.
9864         (vcont_builder::restart, vcont_builder::flush)
9865         (vcont_builder::push_action): Use it.
9866         (remote_target::commit_resume): Use it.
9867         (struct queue_iter_param) <remote>: New field.
9868         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9869         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9870         (check_pending_event_prevents_wildcard_vcont_callback)
9871         (remote_target::check_pending_events_prevent_wildcard_vcont)
9872         (remote_target::discard_pending_stop_replies)
9873         (remote_target::discard_pending_stop_replies_in_queue)
9874         (remote_target::remote_notif_remove_queued_reply): Fill in
9875         'remote' field.
9876         (remote_notif_get_pending_events): New.
9877         (remote_target::readchar, remote_target::remote_serial_write):
9878         Save/restore curr_quit_handler_target.
9879         (putpkt): New.
9880         (kill_new_fork_children): Fill in 'remote' field.
9881         (packet_command): Use get_current_remote_target, defer to
9882         remote_target method of same name.
9883         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9884         parameter, and save it in m_remote.  All callers adjusted.
9885         (scoped_remote_fd::release): Use m_remote.
9886         (scoped_remote_fd::m_remote): New field.
9887         (remote_file_put, remote_file_get, remote_file_delete): Use
9888         get_current_remote_target, defer to remote_target method of same
9889         name.
9890         (remote_btrace_reset): Add remote_state paremeter.  Update all
9891         callers.
9892         (remote_async_inferior_event_handler). Pass down 'data'.
9893         (remote_new_objfile): Use get_current_remote_target.
9894         (remote_target::vcont_r_supported): New.
9895         (set_range_stepping): Use get_current_remote_target and
9896         remote_target::vcont_r_supported.
9897         (_initialize_remote): Don't allocate 'remote_state' and
9898         'stop_reply_queue' globals.
9899         * remote.h (struct remote_target): Forward declare.
9900         (getpkt, putpkt, remote_notif_get_pending_events): Add
9901         'remote_target' parameter.
9903 2018-05-22  Pedro Alves  <palves@redhat.com>
9905         * remote.c (vcont_builder): Now a class.  Make all data members
9906         private.
9907         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9908         Declare methods.
9909         (vcont_builder_restart): Rename to ...
9910         (vcont_builder::restart): ... this.
9911         (vcont_builder_flush): Rename to ...
9912         (vcont_builder::flush): ... this.
9913         (vcont_builder_push_action): Rename to ...
9914         (vcont_builder::push_action): ... this.
9915         (remote_target::commit_resume): Adjust.
9917 2018-05-22  Pedro Alves  <palves@redhat.com>
9919         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9920         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9921         (get_fixed_memory_packet_size): New.
9922         (get_memory_packet_size): Use it.
9923         (set_memory_packet_size): Don't override the config size with
9924         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9925         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9926         Don't refer to get_memory_packet_size if not connected to a remote
9927         target.  Show "(default)" if configured size is 0.
9929 2018-05-22  Pedro Alves  <palves@redhat.com>
9931         * remote.c (remote_target::mourn_inferior): Move
9932         discard_pending_stop_replies call here from ...
9933         (_initialize_remote): ... here.
9935 2018-05-22  Pedro Alves  <palves@redhat.com>
9937         * remote.c (compare_section_command): Remove set_general_process
9938         call.
9940 2018-05-22  Pedro Alves  <palves@redhat.com>
9942         * remote.c (struct packet_reg, struct remote_arch_state):
9943         Move higher up in the file.
9944         (remote_state) <m_arch_states>: Store remote_arch_state values
9945         instead of remote_arch_state pointers.
9946         (remote_state::get_remote_arch_state): Adjust.
9948 2018-05-22  Pedro Alves  <palves@redhat.com>
9950         * remote.c: Include <unordered_map>.
9951         (remote_state): Now a class.
9952         (remote_state) <get_remote_arch_state>: Declare method.
9953         <get_remote_arch_state>: New field.
9954         (remote_arch_state) <remote_arch_state>: Declare ctor.
9955         <regs>: Now a unique_ptr.
9956         (remote_gdbarch_data_handle): Delete.
9957         (get_remote_arch_state): Delete.
9958         (remote_state::get_remote_arch_state): New.
9959         (get_remote_state): Adjust to call remote_state's
9960         get_remote_arch_state method.
9961         (init_remote_state): Delete, bits factored out to ...
9962         (remote_arch_state::remote_arch_state): ... this new method.
9963         (get_remote_packet_size, get_memory_packet_size)
9964         (process_g_packet, remote_target::fetch_registers)
9965         (remote_target::prepare_to_store, store_registers_using_G)
9966         (remote_target::store_registers, remote_target::get_trace_status):
9967         Adjust to call remote_state's method.
9968         (_initialize_remote): Remove reference to
9969         remote_gdbarch_data_handle.
9971 2018-05-22  Pedro Alves  <palves@redhat.com>
9973         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9974         pread>: New method declarations.
9975         (remote_target::open_1): Adjust.
9976         (readahead_cache_invalidate): Rename to ...
9977         (readahead_cache::invalidate): ... this, and adjust to be a class
9978         method.
9979         (readahead_cache_invalidate_fd): Rename to ...
9980         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9981         class method.
9982         (remote_hostio_pwrite): Adjust.
9983         (remote_hostio_pread_from_cache): Rename to ...
9984         (readahead_cache::pread): ... this, and adjust to be a class
9985         method.
9986         (remote_hostio_close): Adjust.
9988 2018-05-22  Pedro Alves  <palves@redhat.com>
9990         * remote.c (remote_hostio_close_cleanup): Delete.
9991         (class scoped_remote_fd): New.
9992         (remote_file_put, remote_file_get): Use it.
9994 2018-05-22  Pedro Alves  <palves@redhat.com>
9996         (struct vCont_action_support): Use bool and initialize all fields.
9997         (struct readahead_cache): Initialize all fields.
9998         (remote_state): Use bool and initialize all fields.
9999         (remote_state::remote_state, remote_state::~remote_state): New.
10000         (new_remote_state): Delete.
10001         (_initialize_remote): Use new to allocate remote_state.
10003 2018-05-22  Pedro Alves  <palves@redhat.com>
10004             張俊芝  <zjz@zjz.name>
10006         PR gdb/22973
10007         * c-exp.y: Include "c-support.h".
10008         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
10009         of tolower.  Use c_ident_is_alpha to scan names.
10010         * c-lang.c: Include "c-support.h".
10011         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
10012         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
10013         * c-support.h: New file, with bits factored out from ...
10014         * cp-name-parser.y: ... this file.
10015         Include "c-support.h".
10016         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
10017         c-support.h and renamed.
10018         (symbol_end, yylex): Adjust.
10020 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10022         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
10023         parameter type to CORE_ADDR.
10024         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
10025         parameter type in declaration to CORE_ADDR.
10026         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
10027         target_auxv_search to get AT_HWCAP and use the result to get the
10028         target description.
10029         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
10030         to CORE_ADDR. Remove the cast of the return value to unsigned
10031         long. Fix error predicate of target_auxv_search.
10032         (ppc_linux_nat_target::read_description): Change the type of the
10033         hwcap variable to CORE_ADDR.
10035 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10037         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
10038         if the size of fpscr is larger than 32 bits.
10040 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10042         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
10043         (ppc32_linux_vsxregmap): New global.
10044         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
10045         regcache_supply_regset, and regcache_collect_regset.
10046         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
10047         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
10048         (fetch_vsx_register, store_vsx_register): Remove.
10049         (fetch_vsx_registers): Add regno parameter. Get regset using
10050         ppc_linux_vsxregset. Use regset to supply registers.
10051         (store_vsx_registers): Add regno parameter. Get regset using
10052         ppc_linux_vsxregset. Use regset to collect registers.
10053         (fetch_register): Call fetch_vsx_registers instead of
10054         fetch_vsx_register.
10055         (store_register): Call store_vsx_registers instead of
10056         store_vsx_register.
10057         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
10058         new regno parameter.
10059         (store_ppc_registers): Call store_vsx_registers with -1 for the
10060         new regno parameter.
10061         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
10062         (ppc_collect_vsxregset): Remove.
10064 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10066         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
10067         offset fields.
10068         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
10069         for vector register offset fields.
10070         (ppc64_fbsd_reg_offsets): Likewise.
10071         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
10072         to vector register offset fields.
10073         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
10074         to vector register offset fields.
10075         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
10076         vector register offset fields.
10077         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
10078         initializers for vector register offset fields.
10079         (rs6000_aix64_reg_offsets): Likewise.
10080         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
10081         (ppc_supply_vrregset): Remove.
10082         (ppc_collect_vrregset): Remove.
10083         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
10084         (ppc_linux_vrregset) : New function.
10085         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
10086         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
10087         (ppc32_linux_vrregset): Remove.
10088         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
10089         and use result instead of ppc32_linux_vrregset.
10090         (ppc32_linux_reg_offsets): Remove initializers for vector register
10091         offset fields.
10092         (ppc64_linux_reg_offsets): Likewise.
10093         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
10094         * ppc-linux-nat.c: Include regset.h.
10095         (gdb_vrregset_t): Adjust comment to account for little-endian
10096         mode.
10097         (supply_vrregset, fill_vrregset): Remove.
10098         (fetch_altivec_register, store_altivec_register): Remove.
10099         (fetch_altivec_registers): Add regno parameter. Get regset using
10100         ppc_linux_vrregset. Use regset to supply registers.
10101         (store_altivec_registers): Add regno parameter. Get regset using
10102         ppc_linux_vrregset. Use regset to collect registers.
10103         (fetch_register): Call fetch_altivec_registers instead of
10104         fetch_altivec_register.
10105         (store_register): Call store_altivec_registers instead of
10106         store_altivec_register.
10107         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
10108         the new regno parameter.
10109         (store_ppc_registers): Call store_altivec_registers with -1 for
10110         the new regno parameter.
10112 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10114         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
10115         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
10116         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
10117         (gdb_vrregset_t): Change array type size to
10118         PPC_LINUX_SIZEOF_VRREGSET.
10119         (gdb_vsxregset_t): Change array type size to
10120         PPC_LINUX_SIZEOF_VSXREGSET.
10121         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
10122         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
10123         PPC_LINUX_SIZEOF_VSXREGSET.
10125 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10127         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
10128         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
10129         nat/ppc-linux.c.
10130         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
10131         ppc_linux_target_wordsize with tid.
10132         (ppc_linux_nat_target::read_description): Call ppc_linux_target
10133         wordsize with tid.
10134         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
10135         (ppc64_64bit_inferior_p): Add static and inline specifiers.
10136         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
10137         tid parameter. Remove static specifier.
10138         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
10139         (ppc_linux_target_wordsize): New declaration.
10141 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10143         * arch/ppc-linux-common.c: New file.
10144         * arch/ppc-linux-common.h: New file.
10145         * arch/ppc-linux-tdesc.h: New file.
10146         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
10147         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
10148         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
10149         arch/ppc-linux-tdesc.h.
10150         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
10151         arch/ppc-linux-tdesc.h.
10152         (ppc_linux_nat_target::read_description): Remove target
10153         description matching code. Fill a ppc_linux_features struct and
10154         call ppc_linux_match_description with it. Move comment about ISA
10155         2.05 to ppc-linux-common.c.
10156         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
10157         arch/ppc-linux-tdesc.h.
10158         (ppc_linux_core_read_description): Remove target description
10159         matching code. Fill a ppc_linux_features struct and call
10160         ppc_linux_match_description with it.
10161         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
10162         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
10163         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
10164         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
10165         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
10166         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
10167         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
10168         (tdesc_powerpc_e500l): Remove.
10170 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
10172         * ada-lang.c (catch_assert_command): Pass empty string instead
10173         of NULL for excep_string argument.
10175 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
10177         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
10178         the width of the requested register exceeds the width of the
10179         `ptrace' data type.
10181 2018-05-21  Tom Tromey  <tom@tromey.com>
10183         * printcmd.c (output_command): Remove.
10184         (output_command_const): Rename to output_command.
10185         * valprint.h (output_command): Rename from output_command_const.
10186         * tracepoint.c (trace_dump_actions): Call output_command.
10188 2018-05-21  Tom Tromey  <tom@tromey.com>
10190         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
10191         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
10192         * ada-lang.h (create_ada_exception_catchpoint): Update.
10193         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
10194         std::string.
10195         (create_excep_cond_exprs, ~ada_catchpoint)
10196         (should_stop_exception, print_one_exception)
10197         (print_mention_exception, print_recreate_exception): Update.
10198         (ada_get_next_arg): Remove.
10199         (catch_ada_exception_command_split): Use std::string.  Change type
10200         of "excep_string", "cond_string".
10201         (catch_ada_exception_command): Update.
10202         (create_ada_exception_catchpoint): Change type of excep_string.
10203         (ada_exception_sal): Remove excep_string parameter.
10204         (~ada_catchpoint): Remove.
10206 2018-05-21  Tom Tromey  <tom@tromey.com>
10208         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
10209         cleanup.
10211 2018-05-21  Tom Tromey  <tom@tromey.com>
10213         * ada-lang.c (ada_exception_message_1, ada_exception_message):
10214         Return unique_xmalloc_ptr.
10215         (print_it_exception): Update.
10217 2018-05-21  Tom Tromey  <tom@tromey.com>
10219         * tracepoint.c (trace_dump_actions): Use std::string.
10221 2018-05-21  Tom Tromey  <tom@tromey.com>
10223         * symfile.c (reread_symbols): Use std::string for original_name.
10225 2018-05-21  Tom Tromey  <tom@tromey.com>
10227         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
10228         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
10229         constructor.
10231 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
10233         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
10234         instance to...
10235         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
10236         * objfiles.c (get_objfile_bfd_data): Allocate
10237         objfile_per_bfd_storage with obstack_new when allocating on
10238         obstack.
10240 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10242         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
10243         OBSTACK_ZALLOC.
10244         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
10245         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
10246         * mdebugread.c (mdebug_build_psymtabs): Likewise.
10247         (add_pending): Likewise.
10248         (parse_symbol): Likewise.
10249         (parse_partial_symbols): Likewise.
10250         (psymtab_to_symtab_1): Likewise.
10251         (new_psymtab): Likewise.
10252         (elfmdebug_build_psymtabs): Likewise.
10253         * minsyms.c (terminate_minimal_symbol_table): Likewise.
10254         * objfiles.c (get_objfile_bfd_data): Likewise.
10255         (objfile_register_static_link): Likewise.
10256         * psymtab.c (allocate_psymtab): Likewise.
10257         * stabsread.c (read_member_functions): Likewise.
10258         * xcoffread.c (xcoff_end_psymtab): Likewise.
10260 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10262         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10263         compiler supports std::is_trivially_constructible.
10264         * common/poison.h: Include obstack.h.
10265         (IsMallocable): Define to is_trivially_constructible if the
10266         compiler supports it, define to true_type otherwise.
10267         (xobnew): New.
10268         (XOBNEW): Redefine.
10269         (xobnewvec): New.
10270         (XOBNEWVEC): Redefine.
10271         * gdb_obstack.h (obstack_zalloc): New.
10272         (OBSTACK_ZALLOC): Redefine.
10273         (obstack_calloc): New.
10274         (OBSTACK_CALLOC): Redefine.
10275         (obstack_new): New.
10276         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10277         (gdbarch_obstack): New declaration in gdbarch.h, definition in
10278         gdbarch.c.
10279         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10280         obstack_calloc/obstack_zalloc.
10281         (gdbarch_obstack_zalloc): Remove.
10282         * target-descriptions.c (tdesc_data_init): Use obstack_new.
10284 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10286         * stack.c (backtrace_command_1): Remove useless variable int i.
10288 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10290         * stack.c (print_frame_info): Fix comment.
10292 2018-05-18  Tom Tromey  <tom@tromey.com>
10294         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10295         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10296         (~dwarf2_per_objfile): Update
10297         (dwarf2_get_dwz_file): Use new.
10298         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10299         unique_ptr.
10301 2018-05-18  Tom Tromey  <tom@tromey.com>
10303         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10304         unique_ptr.
10305         * dwarf2read.c (struct dwp_file): Add constructor and
10306         initializers.
10307         (open_and_init_dwp_file): Return a unique_ptr.
10308         (dwarf2_per_objfile, create_dwp_hash_table)
10309         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10310         (lookup_dwo_unit_in_dwp): Update.
10311         (open_and_init_dwp_file, get_dwp_file): Update.
10313 2018-05-18  Tom Tromey  <tom@tromey.com>
10315         * dwarf2read.c (dwarf2_per_objfile): Update.
10316         (struct mapped_index): Add initializers.
10317         (dwarf2_read_index): Use new.
10318         (dw2_symtab_iter_init): Update.
10319         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10320         unique_ptr.
10322 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10324         * dwarf2read.c (mapped_index) <total_size>: Remove.
10326 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10328         * unittests/format_pieces-selftests.c (test_format_specifier):
10329         Add ARI comments.
10331 2018-05-18  Tom Tromey  <tom@tromey.com>
10333         * c-typeprint.c (maybe_print_hole): New function.
10334         (c_print_type_struct_field_offset): Update.
10335         (c_type_print_base_struct_union): Call maybe_print_hole.
10337 2018-05-17  Keith Seitz  <keiths@redhat.com>
10339         * breakpoint.c (build_bpstat_chain): New function, moved from
10340         bpstat_stop_status.
10341         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10342         If no stop chain is passed, call build_bpstat_chain to build it.
10343         * breakpoint.h (build_bpstat_chain): Declare.
10344         (bpstat_stop_status): Move documentation here from breakpoint.c.
10345         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10346         build the stop chain and pass it to skip_inline_frames.
10347         Pass this stop chain to bpstat_stop_status.
10348         * inline-frame.c: Include breakpoint.h.
10349         (stopped_by_user_bp_inline_frame): New function.
10350         (skip_inline_frames): Add parameter `stop_chain'.
10351         Move documention to inline-frame.h.
10352         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10353         whether the frame should be elided.
10354         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10355         Add moved documentation and update for new parameter.
10357 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10359         PR cli/14975
10360         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10361         unittests/format_pieces-selftests.c.
10362         * common/format.h (format_piece) <operator==>: New.
10363         (format_pieces) <operator[]>: Remove.
10364         * common/format.c (format_pieces::format_pieces): Handle \e.
10365         * unittests/format_pieces-selftests.c: New.
10367 2018-05-17  Tom Tromey  <tom@tromey.com>
10369         PR symtab/23010:
10370         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10371         (dw2_instantiate_symtab): Add skip_partial parameter.
10372         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10373         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10374         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10375         (dw2_expand_symtabs_matching_one)
10376         (dw2_find_pc_sect_compunit_symtab)
10377         (dw2_debug_names_lookup_symbol)
10378         (dw2_debug_names_expand_symtabs_for_function): Update.
10379         (init_cutu_and_read_dies): Add skip_partial parameter.
10380         (process_psymtab_comp_unit, build_type_psymtabs_1)
10381         (process_skeletonless_type_unit, load_partial_comp_unit)
10382         (psymtab_to_symtab_1): Update.
10383         (load_full_comp_unit): Add skip_partial parameter.
10384         (process_imported_unit_die, dwarf2_read_addr_index)
10385         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10386         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10387         (read_signatured_type): Update.
10389 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10391         * value.c (release_value): Remove unused variable.
10392         (record_latest_value): Likewise.
10393         (access_value_history): Likewise.
10394         (preserve_values): Likewise.
10396 2018-05-17  Tom Tromey  <tom@tromey.com>
10398         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10399         Initialize.
10401 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10403         PR gdb/22286
10404         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10405         Also handle registers whose width is not a multiple of
10406         PTRACE_TYPE_RET.
10407         (linux_nat_trad_target::store_register): Likewise.
10409 2018-05-16  Tom Tromey  <tom@tromey.com>
10411         * gdbcore.h (core_bfd): Redefine.
10412         * corelow.c (core_target::close): Update.
10413         (core_target_open): Update.
10414         * progspace.h (struct program_space) <cbfd>: Now a
10415         gdb_bfd_ref_ptr.
10417 2018-05-16  Tom Tromey  <tom@tromey.com>
10419         PR cli/19551:
10420         * symfile-add-flags.h (enum symfile_add_flags)
10421         <SYMFILE_NOT_FILENAME>: New constant.
10422         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10423         objfile name from BFD.
10424         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10425         * minidebug.c (find_separate_debug_file_in_section): Put
10426         ".gnu_debugdata" into BFD's file name.
10428 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10430         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10431         Remove.
10433 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10435         PR binutils/21446
10436         * aarch64-tdep.c (aarch64_analyze_prologue,
10437         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10438         Indicate not interested in errors.
10440 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10442         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10443         Supply the MIPS_ZERO_REGNUM register.
10445 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10447         * mips-tdep.c (mask_address_var): Make variable static.
10449 2018-05-14  Tom Tromey  <tom@tromey.com>
10451         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10453 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10455         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10456         FXSAVE_ADDR for the mxcsr register.
10458 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10460         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10462 2018-05-11  Pedro Alves  <palves@redhat.com>
10464         * corelow.c (core_target) <core_target>: No longer inline.
10465         Initialize m_core_gdbarch, m_core_vec and build the section table
10466         here.
10467         <~core_target>: New.
10468         <core_gdbarch, get_core_register_section>: New methods.
10469         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10470         factored out from ...
10471         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10472         (core_ops): Delete.
10473         (sniff_core_bfd): Add gdbarch parameter.
10474         (core_close): Delete, merged into ...
10475         (core_target::close): ... here.  Delete self.
10476         (core_close_cleanup): Delete.
10477         (core_target_open): Allocate a core_target on the heap.  Use a
10478         unique_ptr instead of a cleanup.  Bits moved into the core_target
10479         ctor.  Adjust to use core_target methods instead of globals.
10480         (get_core_register_section): Rename to ...
10481         (core_target::get_core_register_section): ... this and adjust.
10482         (struct get_core_registers_cb_data): New.
10483         (get_core_registers_cb): Use it.  Use bool.
10484         (core_target::fetch_registers, core_target::files_info)
10485         (core_target::xfer_partial, core_target::read_description)
10486         (core_target::pid_to, core_target::thread_name): Adjust to
10487         reference class fields instead of globals.
10488         * target.h (struct target_ops_deleter, target_ops_up): New.
10490 2018-05-11  Pedro Alves  <palves@redhat.com>
10492         * corefile.c (core_file_command): Move to corelow.c.
10493         * corelow.c (the_core_target): Delete.
10494         (core_file_command): Moved from corefile.c.  Check exec_bfd
10495         instead of the_core_target.  Use target_detach instead of calling
10496         into the_core_target directly.
10497         (maybe_say_no_core_file_now): New.
10498         (core_target::detach): Use it.
10499         (_initialize_corelow): Remove references to the_core_target.
10500         * gdbcore.h (the_core_target): Delete.
10502 2018-05-11  Tom Tromey  <tromey@redhat.com>
10503             Pedro Alves  <palves@redhat.com>
10505         * corefile.c (core_bfd): Remove.
10506         * gdbcore.h (core_bfd): Now a macro.
10507         * progspace.h (struct program_space) <cbfd>: New field.
10509 2018-05-11  Tom Tromey  <tom@tromey.com>
10511         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10512         gdb::def_vector.
10514 2018-05-10  Tom Tromey  <tom@tromey.com>
10516         * configure: Rebuild.
10517         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10519 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10521         PR server/23158:
10522         * regformats/regdat.sh: Adjust script, following the addition
10523         of the new expedite_regs parameter to init_target_desc.
10525 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10526     
10527         PR gdb/23127
10528         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10529         set_gdbarch_significant_addr_bit.
10530         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10531         set_gdbarch_significant_addr_bit.
10532         * utils.c (address_significant): Update to sign extend addr.
10534 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10536         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10537         (xtensa_linux_init_abi): Limit tdep->num_regs by
10538         tdep->num_nopriv_regs.
10539         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10540         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10541         not initialized.
10543 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10545         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10547 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10549         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10550         (I387_MXCSR_INIT_VAL): New constant.
10551         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10552         buffer if it was supplied by the inferior.
10553         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10554         (i387_xsave_get_clear_bv): New function.
10555         (i387_supply_xsave): Only read x87 control registers from the
10556         xsave buffer if the feature is enabled, and the state will have
10557         been written, otherwise, provide a suitable default.
10558         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10559         including x87 control registers.  Update control registers if they
10560         have changed from the default value, and mark features as enabled
10561         as required.
10562         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10564 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10566         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10568 2018-05-07  Tom Tromey  <tom@tromey.com>
10570         * configure: Rebuild.
10571         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10573 2018-05-07  Tom Tromey  <tom@tromey.com>
10575         PR tdep/20362:
10576         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10577         bit.  Use correct value for VDIV.
10579 2018-05-04  Tom Tromey  <tom@tromey.com>
10581         * configure: Rebuild.
10582         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10584 2018-05-04  Tom Tromey  <tom@tromey.com>
10586         * linux-record.c (record_linux_system_call) <case
10587         RECORD_SYS_RECVFROM>: Add "break".
10589 2018-05-04  Tom Tromey  <tom@tromey.com>
10591         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10592         Add missing "break".
10593         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10594         Add missing "break".
10596 2018-05-04  Tom Tromey  <tom@tromey.com>
10598         * rs6000-tdep.c (ppc_process_record_op4)
10599         (ppc_process_record_op63): Add fall-through comment.
10601 2018-05-04  Tom Tromey  <tom@tromey.com>
10603         * i386-tdep.c (i386_process_record): Add fall-through comment.
10605 2018-05-04  Tom Tromey  <tom@tromey.com>
10607         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10608         comment.
10610 2018-05-04  Tom Tromey  <tom@tromey.com>
10612         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10613         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10614         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10615         comment.
10616         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10617         comment.
10618         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10619         comment.
10621 2018-05-04  Tom Tromey  <tom@tromey.com>
10623         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10625 2018-05-04  Tom Tromey  <tom@tromey.com>
10627         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10628         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10629         * symfile.c (section_is_mapped): Fix fall-through comment.
10630         * stabsread.c (define_symbol, read_member_functions): Fix
10631         fall-through comment.
10632         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10633         comment.
10634         * remote.c (remote_wait_as): Fix fall-through comment.
10635         * p-exp.y (yylex): Fix fall-through comment.
10636         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10637         comment.
10638         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10639         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10640         * jv-exp.y (yylex): Fix fall-through comment.
10641         * go-exp.y (lex_one_token): Fix fall-through comment.
10642         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10643         fall-through comment.
10644         * f-exp.y (yylex): Fix fall-through comment.
10645         * dwarf2read.c (process_die): Fix fall-through comments.
10646         * dbxread.c (process_one_symbol): Fix fall-through comment.
10647         * d-exp.y (lex_one_token): Fix fall-through comment.
10648         * cp-name-parser.y (yylex): Fix fall-through comment.
10649         * coffread.c (coff_symtab_read): Fix fall-through comment.
10650         * c-exp.y (lex_one_token): Fix fall-through comment.
10651         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10652         comment.
10653         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10654         comment.
10656 2018-05-04  Tom Tromey  <tom@tromey.com>
10658         PR python/22730:
10659         * NEWS: Mention gdb.execute change.
10660         * gdbcmd.h (execute_control_command): Don't declare.
10661         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10662         execute_control_commands, execute_control_commands_to_string.
10663         * cli/cli-script.h (execute_control_commands)
10664         (execute_control_commands_to_string): Declare.
10665         (execute_control_command): Add from_tty parameter.
10666         * cli/cli-script.c (execute_control_commands)
10667         (execute_control_commands_to_string): New functions.
10668         (execute_user_command): Use execute_control_commands.
10669         (execute_control_command_1): Add "from_tty" parameter.  Update.
10670         (execute_control_command): Likewise.
10672 2018-05-04  Tom Tromey  <tom@tromey.com>
10674         PR python/22731:
10675         * NEWS: Mention that breakpoint commands are writable.
10676         * python/py-breakpoint.c (bppy_set_commands): New function.
10677         (breakpoint_object_getset) <"commands">: Use it.
10679 2018-05-04  Tom Tromey  <tom@tromey.com>
10681         * tracepoint.c (actions_command): Update.
10682         * mi/mi-cmd-break.c (mi_command_line_array)
10683         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10684         (mi_read_next_line): Remove.
10685         (mi_cmd_break_commands): Update.
10686         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10687         function_view.
10688         * cli/cli-script.c (get_command_line): Update.
10689         (process_next_line): Use function_view.  Constify.
10690         (recurse_read_control_structure, read_command_lines)
10691         (read_command_lines_1): Change argument types to function_view.
10692         (do_define_command, document_command): Update.
10693         * breakpoint.h (check_tracepoint_command): Don't declare.
10694         * breakpoint.c (check_tracepoint_command): Remove.
10695         (commands_command_1, create_tracepoint_from_upload): Update.
10697 2018-05-04  Tom Tromey  <tom@tromey.com>
10699         PR gdb/11750:
10700         * cli/cli-script.h (enum command_control_type) <define_control>:
10701         New constant.
10702         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10703         (build_command_line, execute_control_command_1)
10704         (process_next_line): Likewise.
10705         (do_define_command): New function, extracted from define_command.
10706         (define_command): Use it.
10708 2018-05-04  Tom Tromey  <tom@tromey.com>
10710         * tracepoint.c (actions_command): Update.
10711         * cli/cli-script.h (read_command_lines): Update.
10712         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10713         (MAX_TMPBUF): Remove define.
10714         (define_command): Use string_printf.
10715         (document_command): Likewise.
10716         * breakpoint.c (commands_command_1): Update.
10718 2018-05-04  Tom Tromey  <tom@tromey.com>
10720         * top.c (execute_command): Update.
10721         * cli/cli-script.h (print_command_lines): Now varargs.
10722         * cli/cli-script.c (print_command_lines): Now varargs.
10723         (execute_control_command_1) <case while_control, case if_control>:
10724         Update.
10726 2018-05-04  Tom Tromey  <tom@tromey.com>
10728         * tracepoint.c (all_tracepoint_actions): Rename from
10729         all_tracepoint_actions_and_cleanup.  Change return type.
10730         (actions_command, encode_actions_1, encode_actions)
10731         (trace_dump_actions, tdump_command): Update.
10732         * remote.c (remote_download_command_source): Update.
10733         * python/python.c (gdbpy_eval_from_control_command)
10734         (python_command, python_interactive_command): Update.
10735         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10736         * guile/guile.c (guile_command)
10737         (gdbscm_eval_from_control_command, guile_command): Update.
10738         * compile/compile.c (compile_code_command)
10739         (compile_print_command, compile_to_object): Update.
10740         * cli/cli-script.h (struct command_lines_deleter): New.
10741         (counted_command_line): New typedef.
10742         (struct command_line): Add constructor, destructor.
10743         <body_list>: Remove.
10744         <body_list_0, body_list_1>: New members.
10745         (command_line_up): Remove typedef.
10746         (read_command_lines, read_command_lines_1, get_command_line):
10747         Update.
10748         (copy_command_lines): Don't declare.
10749         * cli/cli-script.c (build_command_line): Use "new".
10750         (get_command_line): Return counted_command_line.
10751         (print_command_lines, execute_user_command)
10752         (execute_control_command_1, while_command, if_command): Update.
10753         (realloc_body_list): Remove.
10754         (process_next_line, recurse_read_control_structure): Update.
10755         (read_command_lines, read_command_lines_1): Return counted_command_line.
10756         (free_command_lines): Use "delete".
10757         (copy_command_lines): Remove.
10758         (define_command, document_command, show_user_1): Update.
10759         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10760         a counted_command_line.
10761         * breakpoint.h (counted_command_line): Remove typedef.
10762         (breakpoint_set_commands): Update.
10763         * breakpoint.c (check_no_tracepoint_commands)
10764         (validate_commands_for_breakpoint): Update.
10765         (breakpoint_set_commands): Change commands to be a
10766         counted_command_line.
10767         (commands_command_1, update_dprintf_command_list)
10768         (create_tracepoint_from_upload): Update.
10770 2018-05-04  Tom Tromey  <tom@tromey.com>
10772         * cli/cli-decode.h (cmd_list_element): New constructor.
10773         (~cmd_list_element): New destructor.
10774         (struct cmd_list_element): Add initializers.
10775         * cli/cli-decode.c (do_add_cmd): Use "new".
10776         (delete_cmd): Use "delete".
10778 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10779             Pedro Alves <palves@redhat.com>
10781         PR breakpoints/19806 and support for PR external/20207.
10782         * NEWS: Mention Aarch64 watchpoint improvements.
10783         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10784         watchpoints and PR external/20207 watchpoints.
10785         * nat/aarch64-linux-hw-point.c
10786         (kernel_supports_any_contiguous_range): New.
10787         (aarch64_watchpoint_offset): New.
10788         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10789         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10790         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10791         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10792         next_addr_orig_p.  Support PR external/20207 watchpoints.
10793         (aarch64_downgrade_regs): New.
10794         (aarch64_dr_state_insert_one_point): New parameters offset and
10795         addr_orig.
10796         (aarch64_dr_state_remove_one_point): Likewise.
10797         (aarch64_handle_breakpoint): Update caller.
10798         (aarch64_handle_aligned_watchpoint): Likewise.
10799         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10800         aligned_offset.
10801         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10802         aarch64_downgrade_regs.
10803         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10804         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10805         (DR_CONTROL_MASK): ... this.
10806         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10807         (unsigned int aarch64_watchpoint_offset): New prototype.
10808         (aarch64_linux_set_debug_regs): Remove const from state.
10809         * utils.c (align_up, align_down): Move to ...
10810         * common/common-utils.c (align_up, align_down): ... here.
10811         * utils.h (align_up, align_down): Move to ...
10812         * common/common-utils.h (align_up, align_down): ... here.
10814 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10816         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10817         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10818         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10819         Re-implement to match the ABI as summarized in GCC's
10820         gcc/config/sparc/sparc.c.  All callers updated.
10821         (sparc32_store_arguments): Remove assertion.
10823 2018-05-04  Tom Tromey  <tom@tromey.com>
10825         * printcmd.c: Don't include tui.h.
10826         (decode_format): Use skip_spaces.
10828 2018-05-04  Tom Tromey  <tom@tromey.com>
10830         PR gdb/22619:
10831         * printcmd.c (last_count): New global.
10832         (x_command): Use saved count when repeating.
10834 2018-05-04  Tom Tromey  <tom@tromey.com>
10836         * nto-procfs.c (do_closedir_cleanup): Remove.
10837         (procfs_pidlist): Use gdb_dir_up.
10838         * procfs.c (do_closedir_cleanup): Remove.
10839         (proc_update_threads): Use gdb_dir_up.
10840         * common/filestuff.h (struct gdb_dir_deleter): New.
10841         (gdb_dir_up): New typedef.
10843 2018-05-04  Tom Tromey  <tom@tromey.com>
10845         * ada-lang.c (print_mention_exception): Use std::string.
10847 2018-05-04  Tom Tromey  <tom@tromey.com>
10849         * ada-lang.c (create_excep_cond_exprs): Update.
10850         (ada_exception_catchpoint_cond_string): Use std::string.
10852 2018-05-04  Tom Tromey  <tom@tromey.com>
10854         * ada-lang.c (xget_renaming_scope): Return std::string.
10855         (old_renaming_is_invisible): Update.
10857 2018-05-04  Tom Tromey  <tom@tromey.com>
10859         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10860         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10862 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10864         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10866 2018-05-04  Tom Tromey  <tom@tromey.com>
10868         * remote.c (remote_query_supported_append): Change type.
10869         (remote_check_symbols): Update.
10871 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10873         PR gdb/11420
10874         * configure.ac: Prepend libpython.
10875         * python/python-config.py: Likewise.
10876         * configure: Regenerate.
10878 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10880         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10882 2018-05-03  Pedro Alves  <palves@redhat.com>
10884         * s390-linux-nat.c
10885         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10886         override.  Write 'true' instead of '1'.
10887         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10888         declaration.
10890 2018-05-02  Pedro Alves  <palves@redhat.com>
10892         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10893         add_inf_child_target.
10894         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10895         add_inf_child_target.
10896         * aix-thread.c (aix_thread_target_info): New.
10897         (aix_thread_target) <shortname, longname, doc>: Delete.
10898         <info>: New.
10899         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10900         add_inf_child_target.
10901         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10902         add_inf_child_target.
10903         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10904         add_inf_child_target.
10905         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10906         add_inf_child_target.
10907         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10908         add_inf_child_target.
10909         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10910         add_inf_child_target.
10911         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10912         add_inf_child_target.
10913         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10914         add_inf_child_target.
10915         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10916         add_inf_child_target.
10917         * bfd-target.c (target_bfd_target_info): New.
10918         (target_bfd) <shortname, longname, doc>: Delete.
10919         <info>: New.
10920         * bsd-kvm.c (bsd_kvm_target_info): New.
10921         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10922         <info>: New.
10923         (bsd_kvm_target::open): Rename to ...
10924         (bsd_kvm_target_open): ... this.  Adjust.
10925         * bsd-uthread.c (bsd_uthread_target_info): New.
10926         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10927         <info>: New.
10928         * corefile.c (core_file_command): Adjust.
10929         * corelow.c (core_target_info): New.
10930         (core_target) <shortname, longname, doc>: Delete.
10931         <info>: New.
10932         (core_target::open): Rename to ...
10933         (core_target_open): ... this.  Adjust.
10934         * ctf.c (ctf_target_info): New.
10935         (ctf_target) <shortname, longname, doc>: Delete.
10936         <info>: New.
10937         (ctf_target::open): Rename to ...
10938         (ctf_target_open): ... this.
10939         (_initialize_ctf): Adjust.
10940         * exec.c (exec_target_info): New.
10941         (exec_target) <shortname, longname, doc>: Delete.
10942         <info>: New.
10943         (exec_target::open): Rename to ...
10944         (exec_target_open): ... this.
10945         * gdbcore.h (core_target_open): Declare.
10946         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10947         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10948         add_inf_child_target.
10949         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10950         add_inf_child_target.
10951         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10952         add_inf_child_target.
10953         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10954         add_inf_child_target.
10955         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10956         add_inf_child_target.
10957         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10958         add_inf_child_target.
10959         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10960         add_inf_child_target.
10961         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10962         add_inf_child_target.
10963         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10964         add_inf_child_target.
10965         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10966         add_inf_child_target.
10967         * inf-child.c (inf_child_target_info): New.
10968         (inf_child_target::info): New.
10969         (inf_child_open_target): Remove 'target' parameter.  Use
10970         get_native_target instead.
10971         (inf_child_target::open): Delete.
10972         (add_inf_child_target): New.
10973         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10974         Delete.
10975         <info>: New.
10976         (add_inf_child_target): Declare.
10977         (inf_child_open_target): Declare.
10978         * linux-thread-db.c (thread_db_target_info): New.
10979         (thread_db_target) <shortname, longname, doc>: Delete.
10980         <info>: New.
10981         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10982         add_inf_child_target.
10983         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10984         add_inf_child_target.
10985         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10986         add_inf_child_target.
10987         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10988         add_inf_child_target.
10989         * make-target-delegates (print_class): Adjust.
10990         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10991         add_inf_child_target.
10992         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10993         add_inf_child_target.
10994         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10995         add_inf_child_target.
10996         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10997         add_inf_child_target.
10998         * nto-procfs.c (nto_native_target_info): New.
10999         (nto_procfs_target_native) <shortname, longname, doc>:
11000         Delete.
11001         <info>: New.
11002         (nto_procfs_target_info): New.
11003         (nto_procfs_target_procfs) <shortname, longname, doc>:
11004         Delete.
11005         <info>: New.
11006         (init_procfs_targets): Adjust.
11007         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
11008         add_inf_child_target.
11009         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
11010         add_inf_child_target.
11011         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
11012         add_inf_child_target.
11013         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
11014         add_inf_child_target.
11015         * ravenscar-thread.c (ravenscar_target_info): New.
11016         (ravenscar_thread_target) <shortname, longname, doc>:
11017         Delete.
11018         <info>: New.
11019         * record-btrace.c (record_btrace_target_info):
11020         (record_btrace_target) <shortname, longname, doc>: Delete.
11021         <info>: New.
11022         (record_btrace_target::open): Rename to ...
11023         (record_btrace_target_open): ... this.  Adjust.
11024         * record-full.c (record_longname, record_doc): New.
11025         (record_full_base_target) <shortname, longname, doc>: Delete.
11026         <info>: New.
11027         (record_full_target_info): New.
11028         (record_full_target): <shortname>: Delete.
11029         <info>: New.
11030         (record_full_core_open_1, record_full_open_1): Update comments.
11031         (record_full_base_target::open): Rename to ...
11032         (record_full_open): ... this.
11033         (cmd_record_full_restore): Update.
11034         (_initialize_record_full): Update.
11035         * remote-sim.c (remote_sim_target_info): New.
11036         (gdbsim_target) <shortname, longname, doc>: Delete.
11037         <info>: New.
11038         (gdbsim_target::open): Rename to ...
11039         (gdbsim_target_open): ... this.
11040         (_initialize_remote_sim): Adjust.
11041         * remote.c (remote_doc): New.
11042         (remote_target_info): New.
11043         (remote_target) <shortname, longname, doc>: Delete.
11044         <info>: New.
11045         (extended_remote_target_info): New.
11046         (extended_remote_target) <shortname, longname, doc>: Delete.
11047         <info>: New.
11048         (remote_target::open_1): Make static.  Adjust.
11049         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
11050         * s390-linux-nat.c (_initialize_s390_nat): Use
11051         add_inf_child_target.
11052         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
11053         add_inf_child_target.
11054         * sol-thread.c (thread_db_target_info): New.
11055         (sol_thread_target) <shortname, longname, doc>: Delete.
11056         <info>: New.
11057         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
11058         add_inf_child_target.
11059         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
11060         add_inf_child_target.
11061         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
11062         add_inf_child_target.
11063         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
11064         add_inf_child_target.
11065         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
11066         add_inf_child_target.
11067         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
11068         add_inf_child_target.
11069         * spu-linux-nat.c (_initialize_spu_nat): Use
11070         add_inf_child_target.
11071         * spu-multiarch.c (spu_multiarch_target_info): New.
11072         (spu_multiarch_target) <shortname, longname, doc>: Delete.
11073         <info>: New.
11074         * target-delegates.c: Regenerate.
11075         * target.c: Include <unordered_map>.
11076         (target_ops_p): Delete.
11077         (DEF_VEC_P(target_ops_p)): Delete.
11078         (target_factories): New.
11079         (test_target_info): New.
11080         (test_target_ops::info): New.
11081         (open_target): Adjust to use target_factories.
11082         (add_target_with_completer): Rename to ...
11083         (add_target): ... this.  Change prototype.  Register target_info
11084         and open callback in target_factories.  Register target_info in
11085         command context instead of target_ops.
11086         (add_target): Delete old implementation.
11087         (add_deprecated_target_alias): Change prototype.  Adjust.
11088         (the_native_target): New.
11089         (set_native_target, get_native_target): New.
11090         (find_default_run_target): Use the_native_target.
11091         (find_attach_target, find_run_target): Simplify.
11092         (target_ops::open): Delete.
11093         (dummy_target_info): New.
11094         (dummy_target::shortname, dummy_target::longname)
11095         (dummy_target::doc): Delete.
11096         (dummy_target::info): New.
11097         (debug_target::shortname, debug_target::longname)
11098         (debug_target::doc): Delete.
11099         (debug_target::info): New.
11100         * target.h (struct target_info): New.
11101         (target_ops::~target_ops): Add comment.
11102         (target_ops::info): New.
11103         (target_ops::shortname, target_ops::longname, target_ops::doc): No
11104         longer virtual.  Implement in terms of target_info.
11105         (set_native_target, get_native_target): Declare.
11106         (target_open_ftype): New.
11107         (add_target, add_target_with_completer)
11108         (add_deprecated_target_alias): Change prototype.
11109         (test_target) <shortname, longname, doc>: Delete.
11110         <info>: New.
11111         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
11112         add_inf_child_target.
11113         * tracefile-tfile.c (tfile_target_info): New.
11114         (tfile_target) <shortname, longname, doc>: Delete.
11115         <info>: New.
11116         (tfile_target::open): Rename to ...
11117         (tfile_target_open): ... this.
11118         (_initialize_tracefile_tfile): Adjust.
11119         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
11120         add_inf_child_target.
11121         * windows-nat.c (_initialize_windows_nat): Use
11122         add_inf_child_target.
11123         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
11124         add_inf_child_target.
11126 2018-05-02  Pedro Alves  <palves@redhat.com>
11128         * linux-nat.h (linux_nat_target) <low_new_thread,
11129         low_delete_thread, low_new_fork, low_forget_process,
11130         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
11131         New virtual methods.
11132         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
11133         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
11134         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
11135         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
11136         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
11137         Delete.
11138         * linux-fork.c (delete_fork): Adjust to call low method.
11139         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
11140         (linux_nat_new_fork, linux_nat_forget_process_hook)
11141         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
11142         (linux_nat_status_is_event):
11143         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
11144         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
11145         to call low method.
11146         (sigtrap_is_event): Rename to ...
11147         (linux_nat_target::low_status_is_event): ... this.
11148         (linux_nat_set_status_is_event): Delete.
11149         (save_stop_reason, linux_nat_wait_1)
11150         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
11151         low methods.
11152         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
11153         (linux_nat_set_new_fork, linux_nat_set_forget_process)
11154         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
11155         (linux_nat_set_prepare_to_resume): Delete.
11156         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
11157         low virtual methods.
11158         * amd64-linux-nat.c: Likewise.
11159         * arm-linux-nat.c: Likewise.
11160         * i386-linux-nat.c: Likewise.
11161         * ia64-linux-nat.c: Likewise.
11162         * mips-linux-nat.c: Likewise.
11163         * ppc-linux-nat.c: Likewise.
11164         * s390-linux-nat.c: Likewise.
11165         * sparc64-linux-nat.c: Likewise.
11166         * x86-linux-nat.c: Likewise.
11167         * x86-linux-nat.h: Include "nat/x86-linux.h".
11168         (x86_linux_nat_target) <low_new_fork, low_forget_process,
11169         low_prepare_to_resume, low_new_thread, low_delete_thread>:
11170         Override methods.
11172 2018-05-02  Pedro Alves  <palves@redhat.com>
11174         * target.h (target_ops)
11175         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11176         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
11177         stopped_by_watchpoint, have_continuable_watchpoint,
11178         stopped_data_address, watchpoint_addr_within_range,
11179         can_accel_watchpoint_condition, can_run, thread_alive,
11180         has_all_memory, has_memory, has_stack, has_registers,
11181         has_execution, can_async_p, is_async_p, supports_non_stop,
11182         always_non_stop_p, can_execute_reverse, supports_multi_process,
11183         supports_enable_disable_tracepoint,
11184         supports_disable_randomization, supports_string_tracing,
11185         supports_evaluation_of_breakpoint_conditions,
11186         can_run_breakpoint_commands, filesystem_is_local,
11187         can_download_tracepoint, get_trace_state_variable_value,
11188         set_trace_notes, get_tib_address, use_agent, can_use_agent,
11189         record_is_replaying, record_will_replay,
11190         augmented_libraries_svr4_read>: Adjust to return bool.
11191         * aarch64-linux-nat.c: All implementations adjusted.
11192         * aix-thread.c: All implementations adjusted.
11193         * arm-linux-nat.c: All implementations adjusted.
11194         * breakpoint.c: All implementations adjusted.
11195         * bsd-kvm.c: All implementations adjusted.
11196         * bsd-uthread.c: All implementations adjusted.
11197         * corelow.c: All implementations adjusted.
11198         * ctf.c: All implementations adjusted.
11199         * darwin-nat.c: All implementations adjusted.
11200         * darwin-nat.h: All implementations adjusted.
11201         * exec.c: All implementations adjusted.
11202         * fbsd-nat.c: All implementations adjusted.
11203         * fbsd-nat.h: All implementations adjusted.
11204         * gnu-nat.c: All implementations adjusted.
11205         * gnu-nat.h: All implementations adjusted.
11206         * go32-nat.c: All implementations adjusted.
11207         * ia64-linux-nat.c: All implementations adjusted.
11208         * inf-child.c: All implementations adjusted.
11209         * inf-child.h: All implementations adjusted.
11210         * inf-ptrace.c: All implementations adjusted.
11211         * inf-ptrace.h: All implementations adjusted.
11212         * linux-nat.c: All implementations adjusted.
11213         * linux-nat.h: All implementations adjusted.
11214         * mips-linux-nat.c: All implementations adjusted.
11215         * nto-procfs.c: All implementations adjusted.
11216         * ppc-linux-nat.c: All implementations adjusted.
11217         * procfs.c: All implementations adjusted.
11218         * ravenscar-thread.c: All implementations adjusted.
11219         * record-btrace.c: All implementations adjusted.
11220         * record-full.c: All implementations adjusted.
11221         * remote-sim.c: All implementations adjusted.
11222         * remote.c: All implementations adjusted.
11223         * s390-linux-nat.c: All implementations adjusted.
11224         * sol-thread.c: All implementations adjusted.
11225         * spu-multiarch.c: All implementations adjusted.
11226         * target-delegates.c: All implementations adjusted.
11227         * target.c: All implementations adjusted.
11228         * target.h: All implementations adjusted.
11229         * tracefile-tfile.c: All implementations adjusted.
11230         * tracefile.c: All implementations adjusted.
11231         * tracefile.h: All implementations adjusted.
11232         * windows-nat.c: All implementations adjusted.
11233         * x86-linux-nat.h: All implementations adjusted.
11234         * x86-nat.h: All implementations adjusted.
11236 2018-05-02  Pedro Alves  <palves@redhat.com>
11238         * make-target-delegates (scan_target_h): Don't trim lines here.
11239         Replace sequences of tabs and/or whitespace with a single
11240         whitespace.
11241         (top level, parsing methods): Trim each line before processing it
11242         here.
11244 2018-05-02  Pedro Alves  <palves@redhat.com>
11245             John Baldwin  <jhb@freebsd.org>
11247         * target.h (enum strata) <debug_stratum>: New.
11248         (struct target_ops) <all delegation methods>: Replace by C++
11249         virtual methods, and drop "to_" prefix.  All references updated
11250         throughout.
11251         <to_shortname, to_longname, to_doc, to_data,
11252         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
11253         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
11254         virtual methods.  All references updated throughout.
11255         <can_attach, supports_terminal_ours, can_create_inferior,
11256         get_thread_control_capabilities, attach_no_wait>: New
11257         virtual methods.
11258         <insert_breakpoint, remove_breakpoint>: Now
11259         TARGET_DEFAULT_NORETURN methods.
11260         <info_proc>: Now returns bool.
11261         <to_magic>: Delete.
11262         (OPS_MAGIC): Delete.
11263         (current_target): Delete.  All references replaced by references
11264         to ...
11265         (target_stack): ... this.  New.
11266         (target_shortname, target_longname): Adjust.
11267         (target_can_run): Now a function declaration.
11268         (default_child_has_all_memory, default_child_has_memory)
11269         (default_child_has_stack, default_child_has_registers)
11270         (default_child_has_execution): Remove target_ops parameter.
11271         (complete_target_initialization): Delete.
11272         (memory_breakpoint_target): New template class.
11273         (test_target_ops): Refactor as a C++ class with virtual methods.
11274         * make-target-delegates (NAME_PART): Tighten.
11275         (POINTER_PART, CP_SYMBOL): New.
11276         (SIMPLE_RETURN_PART): Reimplement.
11277         (VEC_RETURN_PART): Expect less.
11278         (RETURN_PART, VIRTUAL_PART): New.
11279         (METHOD): Adjust to C++ virtual methods.
11280         (scan_target_h): Remove reference to C99.
11281         (dname): Output "target_ops::" prefix.
11282         (write_function_header): Adjust to output a C++ class method.
11283         (write_declaration): New.
11284         (write_delegator): Adjust to output a C++ class method.
11285         (tdname): Output "dummy_target::" prefix.
11286         (write_tdefault, write_debugmethod): Adjust to output a C++ class
11287         method.
11288         (tdefault_names, debug_names): Delete.
11289         (return_types, tdefaults, styles, argtypes_array): New.
11290         (top level): All methods are delegators.
11291         (print_class): New.
11292         (top level): Print dummy_target and debug_target classes.
11293         * target-delegates.c: Regenerate.
11294         * target-debug.h (target_debug_print_enum_info_proc_what)
11295         (target_debug_print_thread_control_capabilities)
11296         (target_debug_print_thread_info_p): New.
11297         * target.c (dummy_target): Delete.
11298         (the_dummy_target, the_debug_target): New.
11299         (target_stack): Now extern.
11300         (set_targetdebug): Push/unpush debug target.
11301         (default_child_has_all_memory, default_child_has_memory)
11302         (default_child_has_stack, default_child_has_registers)
11303         (default_child_has_execution): Remove target_ops parameter.
11304         (complete_target_initialization): Delete.
11305         (add_target_with_completer): No longer call
11306         complete_target_initialization.
11307         (target_supports_terminal_ours): Use regular delegation.
11308         (update_current_target): Delete.
11309         (push_target): No longer check magic number.  Don't call
11310         update_current_target.
11311         (unpush_target): Don't call update_current_target.
11312         (target_is_pushed): No longer check magic number.
11313         (target_require_runnable): Skip for all stratums over
11314         process_stratum.
11315         (target_ops::info_proc): New.
11316         (target_info_proc): Use find_target_at and
11317         find_default_run_target.
11318         (target_supports_disable_randomization): Use regular delegation.
11319         (target_get_osdata): Use find_target_at.
11320         (target_ops::open, target_ops::close, target_ops::can_attach)
11321         (target_ops::attach, target_ops::can_create_inferior)
11322         (target_ops::create_inferior, target_ops::can_run)
11323         (target_can_run): New.
11324         (default_fileio_target): Use regular delegation.
11325         (target_ops::fileio_open, target_ops::fileio_pwrite)
11326         (target_ops::fileio_pread, target_ops::fileio_fstat)
11327         (target_ops::fileio_close, target_ops::fileio_unlink)
11328         (target_ops::fileio_readlink): New.
11329         (target_fileio_open_1, target_fileio_unlink)
11330         (target_fileio_readlink): Always call the target method.  Handle
11331         FILEIO_ENOSYS.
11332         (return_zero, return_zero_has_execution): Delete.
11333         (init_dummy_target): Delete.
11334         (dummy_target::dummy_target, dummy_target::shortname)
11335         (dummy_target::longname, dummy_target::doc)
11336         (debug_target::debug_target, debug_target::shortname)
11337         (debug_target::longname, debug_target::doc): New.
11338         (target_supports_delete_record): Use regular delegation.
11339         (setup_target_debug): Delete.
11340         (maintenance_print_target_stack): Skip debug_stratum.
11341         (initialize_targets): Instantiate the_dummy_target and
11342         the_debug_target.
11343         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11344         use target_stack.
11345         (target_auxv_search, fprint_target_auxv): Adjust.
11346         (info_auxv_command): Adjust to use target_stack.
11347         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11348         * exceptions.c (print_flush): Handle a NULL target_stack.
11349         * regcache.c (target_ops_no_register): Refactor as class with
11350         virtual methods.
11352         * exec.c (exec_target): New class.
11353         (exec_ops): Now an exec_target.
11354         (exec_open, exec_close_1, exec_get_section_table)
11355         (exec_xfer_partial, exec_files_info, exec_has_memory)
11356         (exec_make_note_section): Refactor as exec_target methods.
11357         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11358         Delete.
11359         (exec_target::find_memory_regions): New.
11360         (_initialize_exec): Don't call init_exec_ops.
11361         * gdbcore.h (exec_file_clear): Delete.
11363         * corefile.c (core_target): Delete.
11364         (core_file_command): Adjust.
11365         * corelow.c (core_target): New class.
11366         (the_core_target): New.
11367         (core_close): Remove target_ops parameter.
11368         (core_close_cleanup): Adjust.
11369         (core_target::close): New.
11370         (core_open, core_detach, get_core_registers, core_files_info)
11371         (core_xfer_partial, core_thread_alive, core_read_description)
11372         (core_pid_to_str, core_thread_name, core_has_memory)
11373         (core_has_stack, core_has_registers, core_info_proc): Rework as
11374         core_target methods.
11375         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11376         (_initialize_corelow): Initialize the_core_target.
11377         * gdbcore.h (core_target): Delete.
11378         (the_core_target): New.
11380         * ctf.c: (ctf_target): New class.
11381         (ctf_ops): Now a ctf_target.
11382         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11383         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11384         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11385         methods.
11386         (init_ctf_ops): Delete.
11387         (_initialize_ctf): Don't call it.
11388         * tracefile-tfile.c (tfile_target): New class.
11389         (tfile_ops): Now a tfile_target.
11390         (tfile_open, tfile_close, tfile_files_info)
11391         (tfile_get_tracepoint_status, tfile_trace_find)
11392         (tfile_fetch_registers, tfile_xfer_partial)
11393         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11394         Refactor as tfile_target methods.
11395         (tfile_xfer_partial_features): Remove target_ops parameter.
11396         (init_tfile_ops): Delete.
11397         (_initialize_tracefile_tfile): Don't call it.
11398         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11399         (tracefile_has_stack, tracefile_has_registers)
11400         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11401         tracefile_target methods.
11402         (init_tracefile_ops): Delete.
11403         (tracefile_target::tracefile_target): New.
11404         * tracefile.h: Include "target.h".
11405         (tracefile_target): New class.
11406         (init_tracefile_ops): Delete.
11408         * spu-multiarch.c (spu_multiarch_target): New class.
11409         (spu_ops): Now a spu_multiarch_target.
11410         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11411         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11412         (spu_search_memory, spu_mourn_inferior): Refactor as
11413         spu_multiarch_target methods.
11414         (init_spu_ops): Delete.
11415         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11416         complete_target_initialization.
11418         * ravenscar-thread.c (ravenscar_thread_target): New class.
11419         (ravenscar_ops): Now a ravenscar_thread_target.
11420         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11421         (ravenscar_thread_alive, ravenscar_pid_to_str)
11422         (ravenscar_fetch_registers, ravenscar_store_registers)
11423         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11424         (ravenscar_stopped_by_hw_breakpoint)
11425         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11426         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11427         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11428         methods.
11429         (init_ravenscar_thread_ops): Delete.
11430         (_initialize_ravenscar): Remove references to
11431         init_ravenscar_thread_ops and complete_target_initialization.
11433         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11434         (bsd_uthread_target): New class.
11435         (bsd_uthread_ops): Now a bsd_uthread_target.
11436         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11437         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11438         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11439         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11440         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11441         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11442         (bsd_uthread_target): Delete function.
11443         (_initialize_bsd_uthread): Remove reference to
11444         complete_target_initialization.
11446         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11447         (target_bfd): ... this new class.
11448         (target_bfd_xfer_partial, target_bfd_get_section_table)
11449         (target_bfd_close): Refactor as target_bfd methods.
11450         (target_bfd::~target_bfd): New.
11451         (target_bfd_reopen): Adjust.
11452         (target_bfd::close): New.
11454         * record-btrace.c (record_btrace_target): New class.
11455         (record_btrace_ops): Now a record_btrace_target.
11456         (record_btrace_open, record_btrace_stop_recording)
11457         (record_btrace_disconnect, record_btrace_close)
11458         (record_btrace_async, record_btrace_info)
11459         (record_btrace_insn_history, record_btrace_insn_history_range)
11460         (record_btrace_insn_history_from, record_btrace_call_history)
11461         (record_btrace_call_history_range)
11462         (record_btrace_call_history_from, record_btrace_record_method)
11463         (record_btrace_is_replaying, record_btrace_will_replay)
11464         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11465         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11466         (record_btrace_store_registers, record_btrace_prepare_to_store)
11467         (record_btrace_to_get_unwinder)
11468         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11469         (record_btrace_commit_resume, record_btrace_wait)
11470         (record_btrace_stop, record_btrace_can_execute_reverse)
11471         (record_btrace_stopped_by_sw_breakpoint)
11472         (record_btrace_supports_stopped_by_sw_breakpoint)
11473         (record_btrace_stopped_by_hw_breakpoint)
11474         (record_btrace_supports_stopped_by_hw_breakpoint)
11475         (record_btrace_update_thread_list, record_btrace_thread_alive)
11476         (record_btrace_goto_begin, record_btrace_goto_end)
11477         (record_btrace_goto, record_btrace_stop_replaying_all)
11478         (record_btrace_execution_direction)
11479         (record_btrace_prepare_to_generate_core)
11480         (record_btrace_done_generating_core): Refactor as
11481         record_btrace_target methods.
11482         (init_record_btrace_ops): Delete.
11483         (_initialize_record_btrace): Remove reference to
11484         init_record_btrace_ops.
11485         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11486         the execution_direction global.
11487         (record_full_base_target, record_full_target)
11488         (record_full_core_target): New classes.
11489         (record_full_ops): Now a record_full_target.
11490         (record_full_core_ops): Now a record_full_core_target.
11491         (record_full_target::detach, record_full_target::disconnect)
11492         (record_full_core_target::disconnect)
11493         (record_full_target::mourn_inferior, record_full_target::kill):
11494         New.
11495         (record_full_open, record_full_close, record_full_async): Refactor
11496         as methods of the record_full_base_target class.
11497         (record_full_resume, record_full_commit_resume): Refactor
11498         as methods of the record_full_target class.
11499         (record_full_wait, record_full_stopped_by_watchpoint)
11500         (record_full_stopped_data_address)
11501         (record_full_stopped_by_sw_breakpoint)
11502         (record_full_supports_stopped_by_sw_breakpoint)
11503         (record_full_stopped_by_hw_breakpoint)
11504         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11505         methods of the record_full_base_target class.
11506         (record_full_store_registers, record_full_xfer_partial)
11507         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11508         Refactor as methods of the record_full_target class.
11509         (record_full_can_execute_reverse, record_full_get_bookmark)
11510         (record_full_goto_bookmark, record_full_execution_direction)
11511         (record_full_record_method, record_full_info, record_full_delete)
11512         (record_full_is_replaying, record_full_will_replay)
11513         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11514         (record_full_stop_replaying): Refactor as methods of the
11515         record_full_base_target class.
11516         (record_full_core_resume, record_full_core_kill)
11517         (record_full_core_fetch_registers)
11518         (record_full_core_prepare_to_store)
11519         (record_full_core_store_registers, record_full_core_xfer_partial)
11520         (record_full_core_insert_breakpoint)
11521         (record_full_core_remove_breakpoint)
11522         (record_full_core_has_execution): Refactor
11523         as methods of the record_full_core_target class.
11524         (record_full_base_target::supports_delete_record): New.
11525         (init_record_full_ops): Delete.
11526         (init_record_full_core_ops): Delete.
11527         (record_full_save): Refactor as method of the
11528         record_full_base_target class.
11529         (_initialize_record_full): Remove references to
11530         init_record_full_ops and init_record_full_core_ops.
11532         * remote.c (remote_target, extended_remote_target): New classes.
11533         (remote_ops): Now a remote_target.
11534         (extended_remote_ops): Now an extended_remote_target.
11535         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11536         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11537         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11538         (remote_pass_signals, remote_set_syscall_catchpoint)
11539         (remote_program_signals, )
11540         (remote_thread_always_alive): Remove target_ops parameter.
11541         (remote_thread_alive, remote_thread_name)
11542         (remote_update_thread_list, remote_threads_extra_info)
11543         (remote_static_tracepoint_marker_at)
11544         (remote_static_tracepoint_markers_by_strid)
11545         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11546         (remote_open): Refactor as methods of remote_target.
11547         (extended_remote_open, extended_remote_detach)
11548         (extended_remote_attach, extended_remote_post_attach):
11549         (extended_remote_supports_disable_randomization)
11550         (extended_remote_create_inferior): : Refactor as method of
11551         extended_remote_target.
11552         (remote_set_permissions, remote_open_1, remote_detach)
11553         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11554         (remote_resume, remote_commit_resume, remote_stop)
11555         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11556         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11557         (remote_prepare_to_store, remote_store_registers)
11558         (remote_flash_erase, remote_flash_done, remote_files_info)
11559         (remote_kill, remote_mourn, remote_insert_breakpoint)
11560         (remote_remove_breakpoint, remote_insert_watchpoint)
11561         (remote_watchpoint_addr_within_range)
11562         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11563         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11564         (remote_supports_stopped_by_sw_breakpoint)
11565         (remote_stopped_by_hw_breakpoint)
11566         (remote_supports_stopped_by_hw_breakpoint)
11567         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11568         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11569         (remote_verify_memory): Refactor as methods of remote_target.
11570         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11571         parameter.
11572         (remote_xfer_partial, remote_get_memory_xfer_limit)
11573         (remote_search_memory, remote_rcmd, remote_memory_map)
11574         (remote_pid_to_str, remote_get_thread_local_address)
11575         (remote_get_tib_address, remote_read_description): Refactor as
11576         methods of remote_target.
11577         (remote_target::fileio_open, remote_target::fileio_pwrite)
11578         (remote_target::fileio_pread, remote_target::fileio_close): New.
11579         (remote_hostio_readlink, remote_hostio_fstat)
11580         (remote_filesystem_is_local, remote_can_execute_reverse)
11581         (remote_supports_non_stop, remote_supports_disable_randomization)
11582         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11583         (remote_supports_enable_disable_tracepoint)
11584         (remote_supports_string_tracing)
11585         (remote_can_run_breakpoint_commands, remote_trace_init)
11586         (remote_download_tracepoint, remote_can_download_tracepoint)
11587         (remote_download_trace_state_variable, remote_enable_tracepoint)
11588         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11589         (remote_trace_start, remote_get_trace_status)
11590         (remote_get_tracepoint_status, remote_trace_stop)
11591         (remote_trace_find, remote_get_trace_state_variable_value)
11592         (remote_save_trace_data, remote_get_raw_trace_data)
11593         (remote_set_disconnected_tracing, remote_core_of_thread)
11594         (remote_set_circular_trace_buffer, remote_traceframe_info)
11595         (remote_get_min_fast_tracepoint_insn_len)
11596         (remote_set_trace_buffer_size, remote_set_trace_notes)
11597         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11598         (remote_disable_btrace, remote_teardown_btrace)
11599         (remote_read_btrace, remote_btrace_conf)
11600         (remote_augmented_libraries_svr4_read, remote_load)
11601         (remote_pid_to_exec_file, remote_can_do_single_step)
11602         (remote_execution_direction, remote_thread_handle_to_thread_info):
11603         Refactor as methods of remote_target.
11604         (init_remote_ops, init_extended_remote_ops): Delete.
11605         (remote_can_async_p, remote_is_async_p, remote_async)
11606         (remote_thread_events, remote_upload_tracepoints)
11607         (remote_upload_trace_state_variables): Refactor as methods of
11608         remote_target.
11609         (_initialize_remote): Remove references to init_remote_ops and
11610         init_extended_remote_ops.
11612         * remote-sim.c (gdbsim_target): New class.
11613         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11614         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11615         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11616         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11617         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11618         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11619         Refactor as methods of gdbsim_target.
11620         (gdbsim_ops): Now a gdbsim_target.
11621         (init_gdbsim_ops): Delete.
11622         (gdbsim_cntrl_c): Adjust.
11623         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11625         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11626         (the_amd64_linux_nat_target): New.
11627         (amd64_linux_fetch_inferior_registers)
11628         (amd64_linux_store_inferior_registers): Refactor as methods of
11629         amd64_linux_nat_target.
11630         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11631         * i386-linux-nat.c: Don't include "linux-nat.h".
11632         (i386_linux_nat_target): New class.
11633         (the_i386_linux_nat_target): New.
11634         (i386_linux_fetch_inferior_registers)
11635         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11636         as methods of i386_linux_nat_target.
11637         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11638         * inf-child.c (inf_child_ops): Delete.
11639         (inf_child_fetch_inferior_registers)
11640         (inf_child_store_inferior_registers): Delete.
11641         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11642         methods of inf_child_target.
11643         (inf_child_target::supports_terminal_ours)
11644         (inf_child_target::terminal_init)
11645         (inf_child_target::terminal_inferior)
11646         (inf_child_target::terminal_ours_for_output)
11647         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11648         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11649         New.
11650         (inf_child_open, inf_child_disconnect, inf_child_close)
11651         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11652         (inf_child_post_startup_inferior, inf_child_can_run)
11653         (inf_child_pid_to_exec_file): Refactor as methods of
11654         inf_child_target.
11655         (inf_child_follow_fork): Delete.
11656         (inf_child_target::can_create_inferior)
11657         (inf_child_target::can_attach): New.
11658         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11659         (inf_child_target::has_stack, inf_child_target::has_registers)
11660         (inf_child_target::has_execution): New.
11661         (inf_child_fileio_open, inf_child_fileio_pwrite)
11662         (inf_child_fileio_pread, inf_child_fileio_fstat)
11663         (inf_child_fileio_close, inf_child_fileio_unlink)
11664         (inf_child_fileio_readlink, inf_child_use_agent)
11665         (inf_child_can_use_agent): Refactor as methods of
11666         inf_child_target.
11667         (return_zero, inf_child_target): Delete.
11668         (inf_child_target::inf_child_target): New.
11669         * inf-child.h: Include "target.h".
11670         (inf_child_target): Delete function prototype.
11671         (inf_child_target): New class.
11672         (inf_child_open_target, inf_child_mourn_inferior)
11673         (inf_child_maybe_unpush_target): Delete.
11674         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11675         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11676         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11677         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11678         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11679         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11680         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11681         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11682         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11683         methods of inf_ptrace_target.
11684         (inf_ptrace_target): Delete function.
11685         * inf-ptrace.h: Include "inf-child.h".
11686         (inf_ptrace_target): Delete function declaration.
11687         (inf_ptrace_target): New class.
11688         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11689         * linux-nat.c (linux_target): New.
11690         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11691         (linux_nat_target::~linux_nat_target): New.
11692         (linux_child_post_attach, linux_child_post_startup_inferior)
11693         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11694         (linux_child_remove_fork_catchpoint)
11695         (linux_child_insert_vfork_catchpoint)
11696         (linux_child_remove_vfork_catchpoint)
11697         (linux_child_insert_exec_catchpoint)
11698         (linux_child_remove_exec_catchpoint)
11699         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11700         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11701         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11702         (linux_nat_stopped_data_address)
11703         (linux_nat_stopped_by_sw_breakpoint)
11704         (linux_nat_supports_stopped_by_sw_breakpoint)
11705         (linux_nat_stopped_by_hw_breakpoint)
11706         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11707         (linux_nat_kill, linux_nat_mourn_inferior)
11708         (linux_nat_xfer_partial, linux_nat_thread_alive)
11709         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11710         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11711         (linux_child_static_tracepoint_markers_by_strid)
11712         (linux_nat_is_async_p, linux_nat_can_async_p)
11713         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11714         (linux_nat_supports_multi_process)
11715         (linux_nat_supports_disable_randomization, linux_nat_async)
11716         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11717         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11718         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11719         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11720         methods of linux_nat_target.
11721         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11722         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11723         parameter.
11724         (check_stopped_by_watchpoint): Adjust.
11725         (linux_xfer_partial): Delete.
11726         (linux_target_install_ops, linux_target, linux_nat_add_target):
11727         Delete.
11728         (linux_nat_target::linux_nat_target): New.
11729         * linux-nat.h: Include "inf-ptrace.h".
11730         (linux_nat_target): New.
11731         (linux_target, linux_target_install_ops, linux_nat_add_target):
11732         Delete function declarations.
11733         (linux_target): Declare global.
11734         * linux-thread-db.c (thread_db_target): New.
11735         (thread_db_target::thread_db_target): New.
11736         (thread_db_ops): Delete.
11737         (the_thread_db_target): New.
11738         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11739         (thread_db_update_thread_list, thread_db_pid_to_str)
11740         (thread_db_extra_thread_info)
11741         (thread_db_thread_handle_to_thread_info)
11742         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11743         (thread_db_resume): Refactor as methods of thread_db_target.
11744         (init_thread_db_ops): Delete.
11745         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11746         * x86-linux-nat.c: Don't include "linux-nat.h".
11747         (super_post_startup_inferior): Delete.
11748         (x86_linux_nat_target::~x86_linux_nat_target): New.
11749         (x86_linux_child_post_startup_inferior)
11750         (x86_linux_read_description, x86_linux_enable_btrace)
11751         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11752         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11753         methods of x86_linux_nat_target.
11754         (x86_linux_create_target): Delete.  Bits folded ...
11755         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11756         pointer.
11757         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11758         (x86_linux_nat_target): New class.
11759         (x86_linux_create_target): Delete.
11760         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11761         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11762         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11763         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11764         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11765         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11766         make extern.
11767         (x86_use_watchpoints): Delete.
11768         * x86-nat.h: Include "breakpoint.h" and "target.h".
11769         (x86_use_watchpoints): Delete.
11770         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11771         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11772         (x86_insert_watchpoint, x86_remove_watchpoint)
11773         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11774         (x86_stopped_by_hw_breakpoint): New declarations.
11775         (x86_nat_target): New template class.
11777         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11778         (the_ppc_linux_nat_target): New.
11779         (ppc_linux_fetch_inferior_registers)
11780         (ppc_linux_can_use_hw_breakpoint)
11781         (ppc_linux_region_ok_for_hw_watchpoint)
11782         (ppc_linux_ranged_break_num_registers)
11783         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11784         (ppc_linux_insert_mask_watchpoint)
11785         (ppc_linux_remove_mask_watchpoint)
11786         (ppc_linux_can_accel_watchpoint_condition)
11787         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11788         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11789         (ppc_linux_watchpoint_addr_within_range)
11790         (ppc_linux_masked_watch_num_registers)
11791         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11792         (ppc_linux_read_description): Refactor as methods of
11793         ppc_linux_nat_target.
11794         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11796         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11797         (procfs_target): New class.
11798         (the_procfs_target): New.
11799         (procfs_target): Delete function.
11800         (procfs_auxv_parse, procfs_attach, procfs_detach)
11801         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11802         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11803         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11804         (procfs_create_inferior, procfs_update_thread_list)
11805         (procfs_thread_alive, procfs_pid_to_str)
11806         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11807         (procfs_stopped_data_address, procfs_insert_watchpoint)
11808         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11809         (proc_find_memory_regions, procfs_info_proc)
11810         (procfs_make_note_section): Refactor as methods of procfs_target.
11811         (_initialize_procfs): Adjust.
11812         * sol-thread.c (sol_thread_target): New class.
11813         (sol_thread_ops): Now a sol_thread_target.
11814         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11815         (sol_thread_fetch_registers, sol_thread_store_registers)
11816         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11817         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11818         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11819         (init_sol_thread_ops): Delete.
11820         (_initialize_sol_thread): Adjust.  Remove references to
11821         init_sol_thread_ops and complete_target_initialization.
11823         * windows-nat.c (windows_nat_target): New class.
11824         (windows_fetch_inferior_registers)
11825         (windows_store_inferior_registers, windows_resume, windows_wait)
11826         (windows_attach, windows_detach, windows_pid_to_exec_file)
11827         (windows_files_info, windows_create_inferior)
11828         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11829         (windows_close, windows_pid_to_str, windows_xfer_partial)
11830         (windows_get_tib_address, windows_get_ada_task_ptid)
11831         (windows_thread_name, windows_thread_alive): Refactor as
11832         windows_nat_target methods.
11833         (do_initial_windows_stuff): Adjust.
11834         (windows_target): Delete function.
11835         (_initialize_windows_nat): Adjust.
11837         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11838         (darwin_mourn_inferior, darwin_kill_inferior)
11839         (darwin_create_inferior, darwin_attach, darwin_detach)
11840         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11841         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11842         (darwin_supports_multi_process): Refactor as darwin_nat_target
11843         methods.
11844         (darwin_resume_to, darwin_files_info): Delete.
11845         (_initialize_darwin_inferior): Rename to ...
11846         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11847         * darwin-nat.h: Include "inf-child.h".
11848         (darwin_nat_target): New class.
11849         (darwin_complete_target): Delete.
11850         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11851         (darwin_target): New.
11852         (i386_darwin_fetch_inferior_registers)
11853         (i386_darwin_store_inferior_registers): Refactor as methods of
11854         darwin_nat_target.
11855         (darwin_complete_target): Delete, with ...
11856         (_initialize_i386_darwin_nat): ... bits factored out here.
11858         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11859         (the_alpha_linux_nat_target): New.
11860         (alpha_linux_register_u_offset): Refactor as
11861         alpha_linux_nat_target method.
11862         (_initialize_alpha_linux_nat): Adjust.
11863         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11864         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11865         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11866         methods of linux_nat_trad_target.
11867         (linux_trad_target): Delete.
11868         * linux-nat-trad.h (linux_trad_target): Delete function.
11869         (linux_nat_trad_target): New class.
11870         * mips-linux-nat.c (mips_linux_nat_target): New class.
11871         (super_fetch_registers, super_store_registers, super_close):
11872         Delete.
11873         (the_mips_linux_nat_target): New.
11874         (mips64_linux_regsets_fetch_registers)
11875         (mips64_linux_regsets_store_registers)
11876         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11877         (mips_linux_register_u_offset, mips_linux_read_description)
11878         (mips_linux_can_use_hw_breakpoint)
11879         (mips_linux_stopped_by_watchpoint)
11880         (mips_linux_stopped_data_address)
11881         (mips_linux_region_ok_for_hw_watchpoint)
11882         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11883         (mips_linux_close): Refactor as methods of mips_linux_nat.
11884         (_initialize_mips_linux_nat): Adjust to C++ification.
11886         * aix-thread.c (aix_thread_target): New class.
11887         (aix_thread_ops): Now an aix_thread_target.
11888         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11889         (aix_thread_fetch_registers, aix_thread_store_registers)
11890         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11891         (aix_thread_thread_alive, aix_thread_pid_to_str)
11892         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11893         Refactor as methods of aix_thread_target.
11894         (init_aix_thread_ops): Delete.
11895         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11896         and complete_target_initialization.
11897         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11898         (rs6000_nat_target): New class.
11899         (the_rs6000_nat_target): New.
11900         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11901         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11902         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11903         (super_create_inferior): Delete.
11904         (_initialize_rs6000_nat): Adjust to C++ification.
11906         * arm-linux-nat.c (arm_linux_nat_target): New class.
11907         (the_arm_linux_nat_target): New.
11908         (arm_linux_fetch_inferior_registers)
11909         (arm_linux_store_inferior_registers, arm_linux_read_description)
11910         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11911         (arm_linux_remove_hw_breakpoint)
11912         (arm_linux_region_ok_for_hw_watchpoint)
11913         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11914         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11915         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11916         arm_linux_nat_target.
11917         (_initialize_arm_linux_nat): Adjust to C++ification.
11919         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11920         (the_aarch64_linux_nat_target): New.
11921         (aarch64_linux_fetch_inferior_registers)
11922         (aarch64_linux_store_inferior_registers)
11923         (aarch64_linux_child_post_startup_inferior)
11924         (aarch64_linux_read_description)
11925         (aarch64_linux_can_use_hw_breakpoint)
11926         (aarch64_linux_insert_hw_breakpoint)
11927         (aarch64_linux_remove_hw_breakpoint)
11928         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11929         (aarch64_linux_region_ok_for_hw_watchpoint)
11930         (aarch64_linux_stopped_data_address)
11931         (aarch64_linux_stopped_by_watchpoint)
11932         (aarch64_linux_watchpoint_addr_within_range)
11933         (aarch64_linux_can_do_single_step): Refactor as methods of
11934         aarch64_linux_nat_target.
11935         (super_post_startup_inferior): Delete.
11936         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11938         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11939         (the_hppa_linux_nat_target): New.
11940         (hppa_linux_fetch_inferior_registers)
11941         (hppa_linux_store_inferior_registers): Refactor as methods of
11942         hppa_linux_nat_target.
11943         (_initialize_hppa_linux_nat): Adjust to C++ification.
11945         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11946         (the_ia64_linux_nat_target): New.
11947         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11948         (ia64_linux_stopped_data_address)
11949         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11950         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11951         ia64_linux_nat_target methods.
11952         (super_xfer_partial): Delete.
11953         (_initialize_ia64_linux_nat): Adjust to C++ification.
11955         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11956         (the_m32r_linux_nat_target): New.
11957         (m32r_linux_fetch_inferior_registers)
11958         (m32r_linux_store_inferior_registers): Refactor as
11959         m32r_linux_nat_target methods.
11960         (_initialize_m32r_linux_nat): Adjust to C++ification.
11962         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11963         (the_m68k_linux_nat_target): New.
11964         (m68k_linux_fetch_inferior_registers)
11965         (m68k_linux_store_inferior_registers): Refactor as
11966         m68k_linux_nat_target methods.
11967         (_initialize_m68k_linux_nat): Adjust to C++ification.
11969         * s390-linux-nat.c (s390_linux_nat_target): New class.
11970         (the_s390_linux_nat_target): New.
11971         (s390_linux_fetch_inferior_registers)
11972         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11973         (s390_insert_watchpoint, s390_remove_watchpoint)
11974         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11975         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11976         (s390_auxv_parse, s390_read_description): Refactor as methods of
11977         s390_linux_nat_target.
11978         (_initialize_s390_nat): Adjust to C++ification.
11980         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11981         (the_sparc_linux_nat_target): New.
11982         (_initialize_sparc_linux_nat): Adjust to C++ification.
11983         * sparc-nat.c (sparc_fetch_inferior_registers)
11984         (sparc_store_inferior_registers): Remove target_ops parameter.
11985         * sparc-nat.h (sparc_fetch_inferior_registers)
11986         (sparc_store_inferior_registers): Remove target_ops parameter.
11987         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11988         (the_sparc64_linux_nat_target): New.
11989         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11991         * spu-linux-nat.c (spu_linux_nat_target): New class.
11992         (the_spu_linux_nat_target): New.
11993         (spu_child_post_startup_inferior, spu_child_post_attach)
11994         (spu_child_wait, spu_fetch_inferior_registers)
11995         (spu_store_inferior_registers, spu_xfer_partial)
11996         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11997         methods.
11998         (_initialize_spu_nat): Adjust to C++ification.
12000         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
12001         (the_tilegx_linux_nat_target): New.
12002         (fetch_inferior_registers, store_inferior_registers):
12003         Refactor as methods.
12004         (_initialize_tile_linux_nat): Adjust to C++ification.
12006         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
12007         (the_xtensa_linux_nat_target): New.
12008         (xtensa_linux_fetch_inferior_registers)
12009         (xtensa_linux_store_inferior_registers): Refactor as
12010         xtensa_linux_nat_target methods.
12011         (_initialize_xtensa_linux_nat): Adjust to C++ification.
12013         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
12014         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
12015         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
12016         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
12017         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
12018         (fbsd_stopped_by_sw_breakpoint)
12019         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
12020         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
12021         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
12022         (fbsd_post_startup_inferior, fbsd_post_attach)
12023         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
12024         (fbsd_set_syscall_catchpoint)
12025         (super_xfer_partial, super_resume, super_wait)
12026         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
12027         (fbsd_handle_debug_trap): Remove target_ops parameter.
12028         (fbsd_nat_add_target): Delete.
12029         * fbsd-nat.h: Include "inf-ptrace.h".
12030         (fbsd_nat_add_target): Delete.
12031         (USE_SIGTRAP_SIGINFO): Define.
12032         (fbsd_nat_target): New class.
12034         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
12035         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
12036         (amd64bsd_target): Delete.
12037         * amd64-bsd-nat.h: New file.
12038         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
12039         "x86-bsd-nat.h".
12040         (amd64_fbsd_nat_target): New class.
12041         (the_amd64_fbsd_nat_target): New.
12042         (amd64fbsd_read_description): Refactor as method of
12043         amd64_fbsd_nat_target.
12044         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
12045         (_initialize_amd64fbsd_nat): Adjust to C++ification.
12046         * amd64-nat.h (amd64bsd_target): Delete function declaration.
12047         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
12048         (i386bsd_store_inferior_registers): Remove target_ops parameter.
12049         (i386bsd_target): Delete.
12050         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
12051         (i386bsd_fetch_inferior_registers)
12052         (i386bsd_store_inferior_registers): Declare.
12053         (i386_bsd_nat_target): New class.
12054         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
12055         (the_i386_fbsd_nat_target): New.
12056         (i386fbsd_resume, i386fbsd_read_description): Refactor as
12057         i386_fbsd_nat_target methods.
12058         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
12059         (_initialize_i386fbsd_nat): Adjust to C++ification.
12060         * x86-bsd-nat.c (super_mourn_inferior): Delete.
12061         (x86bsd_mourn_inferior, x86bsd_target): Delete.
12062         (_initialize_x86_bsd_nat): Adjust to C++ification.
12063         * x86-bsd-nat.h: Include "x86-nat.h".
12064         (x86bsd_target): Delete declaration.
12065         (x86bsd_nat_target): New class.
12067         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
12068         (the_aarch64_fbsd_nat_target): New.
12069         (aarch64_fbsd_fetch_inferior_registers)
12070         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
12071         aarch64_fbsd_nat_target.
12072         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
12073         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
12074         (the_alpha_bsd_nat_target): New.
12075         (alphabsd_fetch_inferior_registers)
12076         (alphabsd_store_inferior_registers): Refactor as
12077         alpha_bsd_nat_target methods.
12078         (_initialize_alphabsd_nat): Refactor as methods of
12079         alpha_bsd_nat_target.
12080         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
12081         (the_amd64_nbsd_nat_target): New.
12082         (_initialize_amd64nbsd_nat): Adjust to C++ification.
12083         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
12084         (the_amd64_obsd_nat_target): New.
12085         (_initialize_amd64obsd_nat): Adjust to C++ification.
12086         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
12087         (the_arm_fbsd_nat_target): New.
12088         (arm_fbsd_fetch_inferior_registers)
12089         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
12090         (_initialize_arm_fbsd_nat): Refactor as methods of
12091         arm_fbsd_nat_target.
12092         (_initialize_arm_fbsd_nat): Adjust to C++ification.
12093         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
12094         (the_arm_netbsd_nat_target): New.
12095         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
12096         arm_netbsd_nat_target.
12097         (_initialize_arm_netbsd_nat): Adjust to C++ification.
12098         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
12099         (the_hppa_nbsd_nat_target): New.
12100         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
12101         hppa_nbsd_nat_target methods.
12102         (_initialize_hppanbsd_nat): Adjust to C++ification.
12103         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
12104         (the_hppa_obsd_nat_target): New.
12105         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
12106         methods of hppa_obsd_nat_target.
12107         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
12108         add_target.
12109         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
12110         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
12111         add_target.
12112         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
12113         (_initialize_i386obsd_nat): Use add_target.
12114         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
12115         (the_m68k_bsd_nat_target): New.
12116         (m68kbsd_fetch_inferior_registers)
12117         (m68kbsd_store_inferior_registers): Refactor as methods of
12118         m68k_bsd_nat_target.
12119         (_initialize_m68kbsd_nat): Adjust to C++ification.
12120         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
12121         (the_mips_fbsd_nat_target): New.
12122         (mips_fbsd_fetch_inferior_registers)
12123         (mips_fbsd_store_inferior_registers): Refactor as methods of
12124         mips_fbsd_nat_target.
12125         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
12126         add_target.
12127         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
12128         (the_mips_nbsd_nat_target): New.
12129         (mipsnbsd_fetch_inferior_registers)
12130         (mipsnbsd_store_inferior_registers): Refactor as methods of
12131         mips_nbsd_nat_target.
12132         (_initialize_mipsnbsd_nat): Adjust to C++ification.
12133         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
12134         (the_mips64_obsd_nat_target): New.
12135         (mips64obsd_fetch_inferior_registers)
12136         (mips64obsd_store_inferior_registers): Refactor as methods of
12137         mips64_obsd_nat_target.
12138         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
12139         add_target.
12140         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
12141         nbsd_nat_target.
12142         * nbsd-nat.h: Include "inf-ptrace.h".
12143         (nbsd_nat_target): New class.
12144         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
12145         (obsd_wait): Refactor as methods of obsd_nat_target.
12146         (obsd_add_target): Delete.
12147         * obsd-nat.h: Include "inf-ptrace.h".
12148         (obsd_nat_target): New class.
12149         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
12150         (the_ppc_fbsd_nat_target): New.
12151         (ppcfbsd_fetch_inferior_registers)
12152         (ppcfbsd_store_inferior_registers): Refactor as methods of
12153         ppc_fbsd_nat_target.
12154         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
12155         add_target.
12156         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
12157         (the_ppc_nbsd_nat_target): New.
12158         (ppcnbsd_fetch_inferior_registers)
12159         (ppcnbsd_store_inferior_registers): Refactor as methods of
12160         ppc_nbsd_nat_target.
12161         (_initialize_ppcnbsd_nat): Adjust to C++ification.
12162         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
12163         (the_ppc_obsd_nat_target): New.
12164         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
12165         methods of ppc_obsd_nat_target.
12166         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
12167         add_target.
12168         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
12169         (the_sh_nbsd_nat_target): New.
12170         (shnbsd_fetch_inferior_registers)
12171         (shnbsd_store_inferior_registers): Refactor as methods of
12172         sh_nbsd_nat_target.
12173         (_initialize_shnbsd_nat): Adjust to C++ification.
12174         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
12175         (inf_ptrace_xfer_partial): Delete.
12176         (sparc_xfer_partial, sparc_target): Delete.
12177         * sparc-nat.h (sparc_fetch_inferior_registers)
12178         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
12179         (sparc_target): Delete function declaration.
12180         (sparc_target): New template class.
12181         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
12182         (_initialize_sparcnbsd_nat): Adjust to C++ification.
12183         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
12184         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
12185         add_target.
12186         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
12187         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
12188         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
12189         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
12190         add_target.
12191         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
12192         (the_vax_bsd_nat_target): New.
12193         (vaxbsd_fetch_inferior_registers)
12194         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
12195         methods.
12196         (_initialize_vaxbsd_nat): Adjust to C++ification.
12198         * bsd-kvm.c (bsd_kvm_target): New class.
12199         (bsd_kvm_ops): Now a bsd_kvm_target.
12200         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
12201         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
12202         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
12203         bsd_kvm_target.
12204         (bsd_kvm_return_one): Delete.
12205         (bsd_kvm_add_target): Adjust to C++ification.
12207         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
12208         (nto_procfs_target_procfs): New classes.
12209         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
12210         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
12211         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
12212         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
12213         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
12214         (procfs_remove_hw_breakpoint, procfs_resume)
12215         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
12216         (procfs_kill_inferior, procfs_store_registers)
12217         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
12218         as methods of nto_procfs_target.
12219         (nto_procfs_ops): Now an nto_procfs_target_procfs.
12220         (nto_native_ops): Delete.
12221         (procfs_open, procfs_native_open): Delete.
12222         (nto_native_ops): Now an nto_procfs_target_native.
12223         (init_procfs_targets): Adjust to C++ification.
12224         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
12225         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
12226         Refactor as methods of nto_procfs_target.
12228         * go32-nat.c (go32_nat_target): New class.
12229         (the_go32_nat_target): New.
12230         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
12231         (go32_store_registers, go32_xfer_partial, go32_files_info)
12232         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
12233         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
12234         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
12235         (go32_pid_to_str): Refactor as methods of go32_nat_target.
12236         (go32_target): Delete.
12237         (_initialize_go32_nat): Adjust to C++ification.
12239         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
12240         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
12241         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
12242         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
12243         gnu_nat_target.
12244         (gnu_target): Delete.
12245         * gnu-nat.h (gnu_target): Delete.
12246         (gnu_nat_target): New class.
12247         * i386-gnu-nat.c (gnu_base_target): New.
12248         (i386_gnu_nat_target): New class.
12249         (the_i386_gnu_nat_target): New.
12250         (_initialize_i386gnu_nat): Adjust to C++ification.
12252 2018-05-02  Pedro Alves  <palves@redhat.com>
12254         * bfd-target.c (target_bfd_xclose): Rename to ...
12255         (target_bfd_close): ... this.
12256         (target_bfd_reopen): Adjust.
12257         * target.c (target_close): Remove references to to_xclose.
12258         * target.h (target_ops::to_xclose): Delete.
12259         (target_ops::to_close): Update comments.
12261 2018-05-02  Pedro Alves  <palves@redhat.com>
12263         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12264         "linux-nat.h".
12265         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12266         * inf-ptrace.c (inf_ptrace_register_u_offset)
12267         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12268         (inf_ptrace_store_register, inf_ptrace_store_registers)
12269         (inf_ptrace_trad_target): Move to ...
12270         * linux-nat-trad.c: ... this new file.
12271         * linux-nat-trad.h: New file.
12272         * linux-nat.c (linux_target_install_ops): Make extern.
12273         (linux_trad_target): Delete.
12274         * linux-nat.h (linux_trad_target): Delete declaration.
12275         (linux_target_install_ops): Declare.
12276         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12277         "linux-nat.h".
12279 2018-05-02  Pedro Alves  <palves@redhat.com>
12281         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12282         procfs_target/add_target here.
12283         * procfs.c (procfs_target): Make static.
12284         (_initialize_procfs): Call add_target here.
12285         * procfs.h (struct target_ops): Remove forward declaration.
12286         (procfs_target): Remove declaration.
12287         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12289 2018-05-02  Pedro Alves  <palves@redhat.com>
12291         * procfs.c (procfs_stopped_by_watchpoint)
12292         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12293         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12294         Forward declare.
12295         (procfs_use_watchpoints): Delete, move contents...
12296         (procfs_target): ... here.
12297         * procfs.h (procfs_use_watchpoints): Delete declaration.
12298         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12299         procfs_use_watchpoints.
12300         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12301         procfs_use_watchpoints.
12303 2018-05-02  Tom Tromey  <tom@tromey.com>
12305         PR python/20084:
12306         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12307         and var_zuinteger_unlimited.
12308         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12309         and PARAM_ZUINTEGER_UNLIMITED.
12310         (set_parameter_value): Handle var_zuinteger and
12311         var_zuinteger_unlimited.
12312         (add_setshow_generic): Likewise.
12313         (parmpy_init): Likewise.
12315 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12317         PR rust/23124
12318         * rust-exp.y (convert_params_to_types): Ensure that the params
12319         pointer is not null before dereferencing it.
12321 2018-04-30  Tom Tromey  <tom@tromey.com>
12323         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12324         is_mi_like_p.
12326 2018-04-30  Tom Tromey  <tom@tromey.com>
12328         * breakpoint.c (mention): Remove use of is_mi_like_p.
12329         (print_mention_ranged_breakpoint): Likewise.
12330         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12331         of is_mi_like_p.
12333 2018-04-30  Tom Tromey  <tom@tromey.com>
12335         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12337 2018-04-30  Tom Tromey  <tom@tromey.com>
12339         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12340         (info_spu_event_command): Remove some uses of is_mi_like_p.
12342 2018-04-30  Tom Tromey  <tom@tromey.com>
12344         * python/py-framefilter.c (py_print_single_arg)
12345         (enumerate_locals, py_print_args, py_print_frame): Remove some
12346         uses of is_mi_like_p.
12348 2018-04-30  Tom Tromey  <tom@tromey.com>
12350         * ui-out.c: Update.
12351         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12352         * ui-out.h (ui_out::is_mi_like_p): Now const.
12353         (ui_out::do_is_mi_like_p): Now const.
12354         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12356 2018-04-30  Tom Tromey  <tom@tromey.com>
12358         * varobj.c (varobj_set_visualizer): Use new_reference.
12359         * python/python.c (gdbpy_decode_line): Use new_reference.
12360         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12361         new_reference.
12363 2018-04-30  Tom Tromey  <tom@tromey.com>
12365         * varobj.c (install_new_value): Use new_reference.
12366         * value.h (value_incref): Return void.  Swap intro comment with
12367         value_decref.
12368         * value.c (set_value_parent): Use new_reference.
12369         (value_incref): Return void.  Update intro comment.
12370         (release_value): Use new_reference.
12371         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12373 2018-04-30  Tom Tromey  <tom@tromey.com>
12375         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12376         * gdb_bfd.h (new_bfd_ref): Remove.
12377         (gdb_bfd_open): Update comment.
12378         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12379         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12380         (gdb_bfd_fdopenr): Use new_reference.
12381         * exec.c (exec_file_attach): Use new_reference.
12383 2018-04-30  Tom Tromey  <tom@tromey.com>
12385         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12386         method.
12388 2018-04-30  Tom Tromey  <tom@tromey.com>
12390         * jit.c (jit_read_code_entry): Use type_align.
12391         * i386-tdep.c (i386_gdbarch_init): Don't call
12392         set_gdbarch_long_long_align_bit.
12393         * gdbarch.sh: Remove long_long_align_bit.
12394         * gdbarch.c, gdbarch.h: Rebuild.
12395         * arc-tdep.c (arc_type_align): New function.
12396         (arc_gdbarch_init): Use arc_type_align.  Don't call
12397         set_gdbarch_long_long_align_bit.
12399 2018-04-30  Tom Tromey  <tom@tromey.com>
12401         * rust-lang.c (rust_type_alignment): Remove.
12402         (rust_composite_type): Use type_align.
12404 2018-04-30  Tom Tromey  <tom@tromey.com>
12406         * NEWS: Mention Type.align.
12407         * python/py-type.c (typy_get_alignof): New function.
12408         (type_object_getset): Add "alignof".
12410 2018-04-30  Tom Tromey  <tom@tromey.com>
12412         PR exp/17095:
12413         * NEWS: Update.
12414         * std-operator.def (UNOP_ALIGNOF): New operator.
12415         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12416         New.
12417         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12418         * c-lang.c (c_op_print_tab): Add alignof.
12419         * c-exp.y (ALIGNOF): New token.
12420         (exp): Add "ALIGNOF" production.
12421         (ident_tokens): Add _Alignof and alignof.
12423 2018-04-30  Tom Tromey  <tom@tromey.com>
12425         * i386-tdep.c (i386_type_align): New function.
12426         (i386_gdbarch_init): Update.
12427         * gdbarch.sh (type_align): New method.
12428         * gdbarch.c, gdbarch.h: Rebuild.
12429         * arch-utils.h (default_type_align): Declare.
12430         * arch-utils.c (default_type_align): New function.
12431         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12432         (struct type) <align_log2>: New field.
12433         <instance_flags>: Now a bitfield.
12434         (TYPE_RAW_ALIGN): New macro.
12435         (type_align, type_raw_align, set_type_align): Declare.
12436         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12437         functions.
12438         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12439         (get_alignment, maybe_set_alignment): New functions.
12440         (read_structure_type, read_enumeration_type, read_array_type)
12441         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12442         (read_subrange_type, read_base_type): Set type alignment.
12444 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12446         * dwarf2read.c (read_index_from_section): Use bool.
12448 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12450         PR gdb/22950
12451         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12452         with #ifdef.
12454 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12456         PR build/22873
12457         * Makefile.in: (.c:.l, .c:.y): Write the target only in the
12458         last step, and do it atomically.
12460 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12462         * compile/compile-c-types.c (convert_int, convert_float):
12463         Update for C FE v1.
12465 2018-04-27  Tom Tromey  <tom@tromey.com>
12467         PR rust/22545:
12468         * rust-lang.c (rust_inclusive_range_type_p): New function.
12469         (rust_range): Handle inclusive ranges.
12470         (rust_compute_range): Likewise.
12471         * rust-exp.y (struct rust_op) <inclusive>: New field.
12472         (DOTDOTEQ): New constant.
12473         (range_expr): Add "..=" productions.
12474         (operator_tokens): Add "..=" token.
12475         (ast_range): Add "inclusive" parameter.
12476         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12477         ranges.
12478         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12479         bounds values.
12480         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12481         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12482         Update comments.
12483         * expprint.c (print_subexp_standard): Handle new bounds values.
12484         (dump_subexp_body_standard): Likewise.
12486 2018-04-27  Tom Tromey  <tom@tromey.com>
12488         * configure: Rebuild.
12489         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12490         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12491         "OVERRIDE".
12492         (class symbol_needs_eval_context): Likewise.
12493         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12494         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12495         "virtual".
12496         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12497         "override".
12498         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12499         * aarch64-tdep.c (instruction_reader::read): Use "override".
12500         (instruction_reader_test::read): Likewise.
12501         * arm-tdep.c (instruction_reader::read): Use "override".
12502         (instruction_reader_thumb::read): Likewise.
12504 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12506         PR remote/9665
12507         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12508         instead of remote_send.
12509         (remote_send): Remove.
12511 2018-04-26  Pedro Alves  <palves@redhat.com>
12513         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12514         find_function_start_sal instead of find_pc_line.
12516 2018-04-26  Pedro Alves  <palves@redhat.com>
12518         * breakpoint.c (set_breakpoint_location_function): Handle
12519         mst_data_gnu_ifunc.
12520         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12521         * elfread.c (elf_symtab_read): Give data symbols with
12522         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12523         (elf_rel_plt_read): Update comment.
12524         * linespec.c (convert_linespec_to_sals): Handle
12525         mst_data_gnu_ifunc.
12526         (minsym_found): Handle mst_data_gnu_ifunc.
12527         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12528         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12529         * parse.c (find_minsym_type_and_address): Handle
12530         mst_data_gnu_ifunc.
12531         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12532         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12533         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12534         comment.
12535         <mst_data_gnu_ifunc>: New enumerator.
12537 2018-04-26  Pedro Alves  <palves@redhat.com>
12539         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12540         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12541         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12542         Handle it.
12543         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12544         (lookup_minimal_symbol_by_pc): Adjust.
12545         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12546         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12547         * minsyms.h (lookup_msym_prefer): New enum.
12548         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12549         parameter by a lookup_msym_prefer parameter.
12551 2018-04-26  Pedro Alves  <palves@redhat.com>
12553         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12554         ends in "@plt" instead of looking at the symbol's section.
12556 2018-04-26  Pedro Alves  <palves@redhat.com>
12558         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12559         all references.
12560         (find_pc_partial_function_gnu_ifunc): Rename to ...
12561         (find_pc_partial_function): ... this, and remove references to
12562         'is_gnu_ifunc_p'.
12563         (find_pc_partial_function): Delete old implementation.
12564         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12566 2018-04-26  Pedro Alves  <palves@redhat.com>
12568         * linespec.c (struct bound_minimal_symbol_search_key): New.
12569         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12570         skip first line if we found a GNU ifunc minimal symbol by name.
12571         (compare_msymbols): Change parameters to work with a destructured
12572         lhs minsym.
12573         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12574         functions.
12576 2018-04-26  Pedro Alves  <palves@redhat.com>
12578         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12579         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12580         address/name.
12581         (add_location_to_breakpoint): Store the minsym and the objfile in
12582         the breakpoint location.
12583         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12584         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12585         Record the minsym in the sal.
12586         * symtab.h (symtab_and_line) <msymbol>: New field.
12588 2018-04-26  Pedro Alves  <palves@redhat.com>
12590         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12591         unless we actually resolved the ifunc.
12593 2018-04-26  Pedro Alves  <palves@redhat.com>
12595         * c-exp.y (variable production): Prefer ifunc minsyms over
12596         regular function symbols.
12597         * symtab.c (find_gnu_ifunc): New function.
12598         * minsyms.h (lookup_msym_prefer): New enum.
12599         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12600         parameter by a lookup_msym_prefer parameter.
12601         * symtab.h (find_gnu_ifunc): New declaration.
12603 2018-04-26  Pedro Alves  <palves@redhat.com>
12605         * blockframe.c (find_gnu_ifunc_target_type): New function.
12606         (find_function_type): New.
12607         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12608         return a value with a memory address.
12609         (eval_call): For calls to GNU ifunc functions, try to find the
12610         type of the target function from the type that the resolver
12611         returns.
12612         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12613         symbols.
12614         * infcall.c (find_function_return_type): Delete.
12615         (find_function_addr): Add 'function_type' parameter.  For calls to
12616         GNU ifunc functions, try to find the type of the target function
12617         from the type that the resolver returns, and return it via
12618         FUNCTION_TYPE.
12619         (call_function_by_hand_dummy): Adjust to use the function type
12620         returned by find_function_addr.
12621         (find_function_addr): Add 'function_type' parameter and move
12622         description here.
12623         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12624         declarations.
12626 2018-04-26  Pedro Alves  <palves@redhat.com>
12628         * c-exp.y (variable production): Skip finding an alias for ifunc
12629         symbols.
12631 2018-04-26  Pedro Alves  <palves@redhat.com>
12633         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12635 2018-04-25  Pedro Alves  <palves@redhat.com>
12637         * infcmd.c (kill_command): Print the pid as string, not the whole
12638         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12639         message.
12640         * remote.c (remote_detach_1): Print the pid as string, not the
12641         whole thread's ptid.
12643 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12644             Sergio Durigan Junior  <sergiodj@redhat.com>
12645             Pedro Alves  <palves@redhat.com>
12647         * infcmd.c (kill_command): Print message when inferior has
12648         been killed.
12649         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12650         '1'.
12651         (add_inferior): Improve message printed when
12652         'print_inferior_events' is on.
12653         (exit_inferior): Remove message printed when
12654         'print_inferior_events' is on.
12655         (detach_inferior): Improve message printed when
12656         'print_inferior_events' is on.
12657         (initialize_inferiors): Use 'add_inferior_silent' to set
12658         'current_inferior_'.
12659         * inferior.h (print_inferior_events): Declare here as
12660         'extern'.
12661         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12662         '[Detaching...]' messages when 'print_inferior_events' is on.
12663         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12664         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12665         'Detaching after fork from child...', replace it by '... from
12666         parent...'.
12667         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12668         prefix/suffix when printing 'Detaching...' messages.  Print
12669         them when 'print_inferior_events' is on.
12670         * remote.c (remote_detach_1): Print message when detaching
12671         from inferior and '!is_fork_parent'.
12673 2018-04-24  Tom Tromey  <tom@tromey.com>
12675         * cli-out.h: Reindent.
12677 2018-04-24  Tom Tromey  <tom@tromey.com>
12679         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12680         (cli_ui_out::do_field_string): Use fputs_filtered.
12681         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12683 2018-04-23  Tom Tromey  <tom@tromey.com>
12685         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12686         gdb::unique_xmalloc_ptr.
12688 2018-04-23  Tom Tromey  <tom@tromey.com>
12690         * configure: Rebuild.
12692 2018-04-21  Pedro Alves  <palves@redhat.com>
12693             Rajendra SY  <rajendra.sy@gmail.com>
12695         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12696         * remote.c (extended_remote_attach): In all-stop mode, mark the
12697         thread as executing.
12699 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12701         * thread.c (thread_apply_all_command): Fix comment.
12702         (thread_command): Fix comment.
12704 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12706         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12707         parameter.
12708         * features/aarch64-core.c (create_feature_aarch64_core):
12709         Regenerate.
12710         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12711         Likewise.
12712         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12713         Likewise.
12714         * features/i386/32bit-avx512.c
12715         (create_feature_i386_32bit_avx512): Likewise.
12716         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12717         Likewise.
12718         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12719         Likewise.
12720         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12721         Likewise.
12722         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12723         Likewise.
12724         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12725         Likewise.
12726         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12727         Likewise.
12728         * features/i386/64bit-avx512.c
12729         (create_feature_i386_64bit_avx512): Likewise.
12730         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12731         Likewise.
12732         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12733         Likewise.
12734         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12735         Likewise.
12736         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12737         Likewise.
12738         * features/i386/64bit-segments.c
12739         (create_feature_i386_64bit_segments): Likewise.
12740         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12741         Likewise.
12742         * features/i386/x32-core.c
12743         (create_feature_i386_x32_core): Likewise.
12744         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12745         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12746         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12747         * target-descriptions.c: In generated code, don't pass xml
12748         filename.
12750 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12752         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12753         (print_xml_feature::visit_post): Likewise.
12754         (print_xml_feature::visit): Likewise.
12755         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12756         (print_xml_feature): Add new class.
12757         * regformats/regdat.sh: Null xmltarget on feature targets.
12758         * target-descriptions.c (struct target_desc): Add xmltarget.
12759         (maintenance_check_tdesc_xml_convert): Add unittest function.
12760         (tdesc_get_features_xml): Add function to get xml.
12761         (maintenance_check_xml_descriptions): Test xml generation.
12762         * xml-tdesc.c (string_read_description_xml): Add function.
12763         * xml-tdesc.h (string_read_description_xml): Add declaration.
12765 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12767         * features/Makefile: Add feature marker to targets with new style
12768         target descriptions.
12769         * regformats/aarch64.dat: Regenerate.
12770         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12771         * regformats/i386/amd64-avx-linux.dat: Likewise.
12772         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12773         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12774         * regformats/i386/amd64-linux.dat: Likewise.
12775         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12776         * regformats/i386/amd64.dat: Likewise.
12777         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12778         * regformats/i386/i386-avx-linux.dat: Likewise.
12779         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12780         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12781         * regformats/i386/i386-linux.dat: Likewise.
12782         * regformats/i386/i386-mmx-linux.dat: Likewise.
12783         * regformats/i386/i386-mpx-linux.dat: Likewise.
12784         * regformats/i386/i386.dat: Likewise.
12785         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12786         * regformats/i386/x32-avx-linux.dat: Likewise.
12787         * regformats/i386/x32-linux.dat: Likewise.
12788         * regformats/tic6x-c62x-linux.dat: Likewise.
12789         * regformats/tic6x-c64x-linux.dat: Likewise.
12790         * regformats/tic6x-c64xp-linux.dat: Likewise.
12791         * regformats/regdat.sh: Parse feature marker.
12793 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12795         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12796         (tdesc_osabi_name): Likewise.
12797         * target-descriptions.c (tdesc_architecture_name): Add new
12798         function.
12799         (tdesc_osabi_name): Likewise.
12801 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12803         * common/tdesc.c (tdesc_predefined_type): Move to here.
12804         (tdesc_named_type): Likewise.
12805         (tdesc_create_vector): Likewise.
12806         (tdesc_create_struct): Likewise.
12807         (tdesc_set_struct_size): Likewise.
12808         (tdesc_create_union): Likewise.
12809         (tdesc_create_flags): Likewise.
12810         (tdesc_create_enum): Likewise.
12811         (tdesc_add_field): Likewise.
12812         (tdesc_add_typed_bitfield): Likewise.
12813         (tdesc_add_bitfield): Likewise.
12814         (tdesc_add_flag): Likewise.
12815         (tdesc_add_enum_value): Likewise.
12816         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12817         (struct tdesc_type_vector): Likewise.
12818         (struct tdesc_type_field): Likewise.
12819         (struct tdesc_type_with_fields): Likewise.
12820         (tdesc_create_enum): Add declaration.
12821         (tdesc_add_typed_bitfield): Likewise.
12822         (tdesc_add_enum_value): Likewise.
12823         * target-descriptions.c (tdesc_type_field): Move from here.
12824         (tdesc_type_builtin): Likewise.
12825         (tdesc_type_vector): Likewise.
12826         (tdesc_type_with_fields): Likewise.
12827         (tdesc_predefined_types): Likewise.
12828         (tdesc_named_type): Likewise.
12829         (tdesc_create_vector): Likewise.
12830         (tdesc_create_struct): Likewise.
12831         (tdesc_set_struct_size): Likewise.
12832         (tdesc_create_union): Likewise.
12833         (tdesc_create_flags): Likewise.
12834         (tdesc_create_enum): Likewise.
12835         (tdesc_add_field): Likewise.
12836         (tdesc_add_typed_bitfield): Likewise.
12837         (tdesc_add_bitfield): Likewise.
12838         (tdesc_add_flag): Likewise.
12839         (tdesc_add_enum_value): Likewise.
12840         * target-descriptions.h (tdesc_create_enum): Likewise.
12841         (tdesc_add_typed_bitfield): Likewise.
12842         (tdesc_add_enum_value): Likewise.
12844 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12846         * common/tdesc.c (tdesc_feature::accept): Move to here.
12847         (tdesc_feature::operator==): Likewise.
12848         (tdesc_create_reg): Likewise.
12849         * common/tdesc.h (tdesc_type_kind): Likewise.
12850         (struct tdesc_type): Likewise.
12851         (struct tdesc_feature): Likewise.
12852         * regformats/regdat.sh: Create a feature.
12853         * target-descriptions.c (tdesc_type_kind): Move from here.
12854         (tdesc_type): Likewise.
12855         (tdesc_type_up): Likewise.
12856         (tdesc_feature): Likewise.
12857         (tdesc_create_reg): Likewise.
12859 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12861         * Makefile.in: Add arch/tdesc.c
12862         * common/tdesc.c: New file.
12863         * common/tdesc.h (tdesc_element_visitor): Move to here.
12864         (tdesc_element): Likewise.
12865         (tdesc_reg): Likewise.
12866         (tdesc_reg_up): Likewise.
12867         * regformats/regdef.h (reg): Add offset to constructors.
12868         * target-descriptions.c (tdesc_element_visitor): Move from here.
12869         (tdesc_element): Likewise.
12870         (tdesc_reg): Likewise.
12871         (tdesc_reg_up): Likewise.
12873 2018-04-17  Tom Tromey  <tom@tromey.com>
12875         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12876         discriminant field.
12878 2018-04-17  Tom Tromey  <tom@tromey.com>
12880         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12882 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12884         * symtab.c (print_symbol_info): Skip printing filename and line
12885         number when `last' is NULL.
12886         (symtab_symbol_info): Use empty string instead of NULL for first
12887         invocation of print_symbol_info.
12888         (rbreak_command): Pass NULL to `last' parameter of
12889         print_symbol_info.
12891 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12893         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12894         instead of nullptr.
12896 2018-04-16  Pedro Alves  <palves@redhat.com>
12898         * MAINTAINERS (sh): Remove.
12899         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12900         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12901         (ALLDEPFILES): Remove sh64-tdep.c.
12902         * NEWS: Mentions that support for SH-5/SH64 is removed.
12903         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12904         (sh*-*-openbsd*): Ditto.
12905         (sh64-*-elf*): Remove.
12906         (sh*): Remove.
12907         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12908         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12909         * sh-tdep.c: No longer include "sh64-tdep.h".
12910         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12911         * sh64-tdep.c, sh64-tdep.h: Remove files.
12913 2018-04-16  Pedro Alves  <palves@redhat.com>
12915         * MAINTAINERS: Remove m88k.
12916         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12917         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12918         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12919         * NEWS: Mention that support for m88k was removed.
12920         * configure.host (m88*-*-*): Remove support.
12921         * configure.nat (m88k-*-*): Remove support.
12922         * configure.tgt (m88*-*-openbsd*): Remove.
12923         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12925 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12927         * configure.tgt (x86_tobjs): New variable.
12928         (amd64_tobjs, i386_tobjs): Use it.
12930 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12932         * symtab.c (print_symbol_info): Precede the symbol definition by
12933         the line number when available.
12934         * NEWS: Advertise this enhancement.
12936 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12938         * NEWS (New options): announce set/show record btrace cpu.
12939         * btrace.c: Include record-btrace.h.
12940         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12941         the vendor is unknown.
12942         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12943         Maybe overwrite the btrace configuration's cpu.
12944         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12945         (btrace_fetch): Add cpu parameter.  Update callers.
12946         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12947         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12948         errata workarounds if the vendor is unknown.
12949         * python/py-record-btrace.c: Include record-btrace.h.
12950         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12951         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12952         * record-btrace.c (record_btrace_cpu_state_kind): New.
12953         (record_btrace_cpu): New.
12954         (set_record_btrace_cpu_cmdlist): New.
12955         (record_btrace_get_cpu): New.
12956         (require_btrace_thread, record_btrace_info)
12957         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12958         (cmd_set_record_btrace_cpu_none): New.
12959         (cmd_set_record_btrace_cpu_auto): New.
12960         (cmd_set_record_btrace_cpu): New.
12961         (cmd_show_record_btrace_cpu): New.
12962         (_initialize_record_btrace): Initialize set/show record btrace cpu
12963         commands.
12964         * record-btrace.h (record_btrace_get_cpu): New.
12966 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12968         * record.c (set_record_command): Fix typo in message.
12970 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12972         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12974 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12976         * infrun.c (process_event_stop_test): Call
12977         gdbarch_in_indirect_branch_thunk.
12978         * gdbarch.sh (in_indirect_branch_thunk): New.
12979         * gdbarch.c: Regenerated.
12980         * gdbarch.h: Regenerated.
12981         * x86-tdep.h: New.
12982         * x86-tdep.c: New.
12983         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12984         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12985         (ALLDEPFILES): Add x86-tdep.c.
12986         * arch-utils.h (default_in_indirect_branch_thunk): New.
12987         * arch-utils.c (default_in_indirect_branch_thunk): New.
12988         * i386-tdep: Include x86-tdep.h.
12989         (i386_in_indirect_branch_thunk): New.
12990         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12991         function.
12992         * amd64-tdep: Include x86-tdep.h.
12993         (amd64_in_indirect_branch_thunk): New.
12994         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12996 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12998         PR gdb/23053
12999         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
13000         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
13001         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
13002         regression.
13004 2018-04-12  Tom Tromey  <tom@tromey.com>
13006         * rust-lang.c (rust_print_struct_def): Remove univariant code.
13007         (rust_evaluate_subexp): Likewise.
13009 2018-04-12  Pedro Alves  <palves@redhat.com>
13011         * procfs.c (procfs_detach): Make forward declaration's prototype
13012         match definition's protototype.
13013         (proc_get_LDT_entry): Remove stale do_cleanups call.
13015 2018-04-12  Pedro Alves  <palves@redhat.com>
13017         * target.h (target_ops::to_has_exited): Delete.
13018         (target_has_exited): Delete.
13019         * target-delegates.c: Regenerate.
13021 2018-04-11  Pedro Alves  <palves@redhat.com>
13023         * target.c (fileio_fh_t::t): Add comment.
13024         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
13025         (target_fileio_close): Handle a NULL target.
13026         (invalidate_fileio_fh): New.
13027         (target_close): Call it.
13028         * remote.c (remote_hostio_send_command): No longer check whether
13029         remote_desc is open.
13031 2018-04-11  Pedro Alves  <palves@redhat.com>
13033         * target.c (fileio_fh_t): Make it a named struct instead of a
13034         typedef.
13035         (fileio_fh_t::is_closed): New method.
13036         (DEF_VEC_O (fileio_fh_t)): Remove.
13037         (fileio_fhandles): Now a std::vector.
13038         (is_closed_fileio_fh): Delete.
13039         (acquire_fileio_fd): Adjust.  Rename parameters.
13040         (release_fileio_fd): Adjust.
13041         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
13042         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
13043         (target_fileio_close): Adjust.
13045 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
13047         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
13048         index.
13050 2018-04-10  Pedro Alves  <palves@redhat.com>
13052         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
13053         (scoped_finish_thread_state): New class.
13054         * infcmd.c (run_command_1): Use it instead of finish_thread_state
13055         cleanup.
13056         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
13057         (fetch_inferior_event, normal_stop): Likewise.
13058         * thread.c (finish_thread_state_cleanup): Delete.
13060 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13061             Pedro Alves  <palves@redhat.com>
13063         * value.c: Include "selftest.h" and "common/array-view.h".
13064         (struct range) <operator ==>: New.
13065         (test_ranges_contain): New.
13066         (check_ranges_vector): New.
13067         (test_insert_into_bit_range_vector): New.
13068         (_initialize_values): Register selftests.
13069         * common/array-view.h (operator==, operator!=): New.
13071 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13073         * common/gdb_vecs.h (unordered_remove): Add overload that takes
13074         an iterator.
13075         * inline-frame.c: Include <algorithm>.
13076         (struct inline_state): Add constructor.
13077         (inline_state_s): Remove.
13078         (DEF_VEC_O(inline_state_s)): Remove.
13079         (inline_states): Change type to std::vector.
13080         (find_inline_frame_state): Adjust to std::vector.
13081         (allocate_inline_frame_state): Remove.
13082         (clear_inline_frame_state): Adjust to std::vector.
13083         (skip_inline_frames): Adjust to std::vector.
13085 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13087         * tracepoint.h (struct trace_state_variable): Add constructor.
13088         <name>: Change type to std::string.
13089         * tracepoint.c (tsv_s): Remove.
13090         (DEF_VEC_O(tsv_s)): Remove.
13091         (tvariables): Change to std::vector.
13092         (create_trace_state_variable): Adjust to std::vector.
13093         (find_trace_state_variable): Likewise.
13094         (find_trace_state_variable_by_number): Likewise.
13095         (delete_trace_state_variable): Likewise.
13096         (trace_variable_command): Adjust to std::string.
13097         (delete_trace_variable_command): Likewise.
13098         (tvariables_info_1): Adjust to std::vector.
13099         (save_trace_state_variables): Likewise.
13100         (start_tracing): Likewise.
13101         (merge_uploaded_trace_state_variables): Adjust to std::vector
13102         and std::string.
13103         * target.h (struct target_ops)
13104         <to_download_trace_state_variable>: Pass reference to
13105         trace_state_variable.
13106         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
13107         * target-delegates.c: Re-generate.
13108         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
13109         (mi_tsv_deleted): Likewise.
13110         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
13111         * remote.c (remote_download_trace_state_variable): Change
13112         pointer to reference and adjust.
13113         * make-target-delegates (parse_argtypes): Handle references.
13114         (write_function_header): Likewise.
13115         (munge_type): Likewise.
13117 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13119         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13120         string_view-selftests.c.
13121         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
13122         testsuite.
13123         * unittests/basic_string_view/cons/char/1.cc: Likewise.
13124         * unittests/basic_string_view/cons/char/2.cc: Likewise.
13125         * unittests/basic_string_view/cons/char/3.cc: Likewise.
13126         * unittests/basic_string_view/element_access/char/1.cc:
13127         Likewise.
13128         * unittests/basic_string_view/element_access/char/empty.cc:
13129         Likewise.
13130         * unittests/basic_string_view/element_access/char/front_back.cc:
13131         Likewise.
13132         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
13133         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
13134         Likewise.
13135         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
13136         Likewise.
13137         * unittests/basic_string_view/modifiers/swap/char/1.cc:
13138         Likewise.
13139         * unittests/basic_string_view/operations/compare/char/1.cc:
13140         Likewise.
13141         * unittests/basic_string_view/operations/compare/char/13650.cc:
13142         Likewise.
13143         * unittests/basic_string_view/operations/copy/char/1.cc:
13144         Likewise.
13145         * unittests/basic_string_view/operations/data/char/1.cc:
13146         Likewise.
13147         * unittests/basic_string_view/operations/find/char/1.cc:
13148         Likewise.
13149         * unittests/basic_string_view/operations/find/char/2.cc:
13150         Likewise.
13151         * unittests/basic_string_view/operations/find/char/3.cc:
13152         Likewise.
13153         * unittests/basic_string_view/operations/find/char/4.cc:
13154         Likewise.
13155         * unittests/basic_string_view/operations/rfind/char/1.cc:
13156         Likewise.
13157         * unittests/basic_string_view/operations/rfind/char/2.cc:
13158         Likewise.
13159         * unittests/basic_string_view/operations/rfind/char/3.cc:
13160         Likewise.
13161         * unittests/basic_string_view/operations/substr/char/1.cc:
13162         Likewise.
13163         * unittests/basic_string_view/operators/char/2.cc: Likewise.
13164         * unittests/string_view-selftests.c: New file.
13166 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13168         * unittests/basic_string_view/capacity/1.cc: New file.
13169         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
13170         * unittests/basic_string_view/cons/char/1.cc: New file.
13171         * unittests/basic_string_view/cons/char/2.cc: New file.
13172         * unittests/basic_string_view/cons/char/3.cc: New file.
13173         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
13174         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
13175         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
13176         * unittests/basic_string_view/element_access/char/1.cc: New file.
13177         * unittests/basic_string_view/element_access/char/2.cc: New file.
13178         * unittests/basic_string_view/element_access/char/empty.cc: New file.
13179         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
13180         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
13181         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
13182         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
13183         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
13184         * unittests/basic_string_view/include.cc: New file.
13185         * unittests/basic_string_view/inserters/char/1.cc: New file.
13186         * unittests/basic_string_view/inserters/char/2.cc: New file.
13187         * unittests/basic_string_view/inserters/char/3.cc: New file.
13188         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
13189         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
13190         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
13191         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
13192         * unittests/basic_string_view/literals/types.cc: New file.
13193         * unittests/basic_string_view/literals/values.cc: New file.
13194         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
13195         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
13196         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
13197         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
13198         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
13199         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
13200         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
13201         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
13202         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
13203         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
13204         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
13205         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
13206         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
13207         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
13208         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
13209         * unittests/basic_string_view/operations/data/char/1.cc: New file.
13210         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
13211         * unittests/basic_string_view/operations/find/char/1.cc: New file.
13212         * unittests/basic_string_view/operations/find/char/2.cc: New file.
13213         * unittests/basic_string_view/operations/find/char/3.cc: New file.
13214         * unittests/basic_string_view/operations/find/char/4.cc: New file.
13215         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
13216         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
13217         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
13218         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
13219         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
13220         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
13221         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
13222         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
13223         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
13224         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
13225         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
13226         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
13227         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
13228         * unittests/basic_string_view/operators/char/2.cc: New file.
13229         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
13230         * unittests/basic_string_view/range_access/char/1.cc: New file.
13231         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
13232         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
13233         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
13234         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
13235         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
13236         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
13237         * unittests/basic_string_view/requirements/typedefs.cc: New file.
13238         * unittests/basic_string_view/typedefs.cc: New file.
13239         * unittests/basic_string_view/types/1.cc: New file.
13241 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13243         * common/gdb_string_view.h: Remove libstdc++ implementation
13244         details, adjust to gdb reality.
13245         * common/gdb_string_view.tcc: Likewise.
13246         * cli/cli-script.c (struct string_view): Remove.
13247         (user_args) <m_args>: Change element type to gdb::string_view.
13248         (user_args::insert_args): Adjust.
13250 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13252         * common/gdb_string_view.h: New file.
13253         * common/gdb_string_view.tcc: New file.
13255 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13257         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13258         * configure: Re-generate.
13260 2018-04-09  Pedro Alves  <palves@redhat.com>
13262         * gdbarch.sh: Include "observable.h" instead of "observer.h".
13263         (set_target_gdbarch): Call
13264         gdb::observers::architecture_changed.notify instead of
13265         observer_notify_architecture_changed.
13267 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13269         * tracepoint.c (struct current_traceframe_cleanup): Remove.
13270         (do_restore_current_traceframe_cleanup): Remove.
13271         (restore_current_traceframe_cleanup_dtor): Remove.
13272         (make_cleanup_restore_current_traceframe): Remove.
13273         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13274         New.
13275         * tracepoint.h (struct scoped_restore_current_traceframe): New.
13276         * infrun.c (fetch_inferior_event): Use
13277         scoped_restore_current_traceframe.
13279 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13281         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13282         Remove.
13283         <n_allocated_type_units>: Remove.
13284         <all_type_units>: Change to std::vector.
13285         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13286         to std::vector change.
13287         (dwarf2_per_objfile::get_cutu): Likewise.
13288         (dwarf2_per_objfile::get_tu): Likewise.
13289         (create_signatured_type_table_from_index): Likewise.
13290         (create_signatured_type_table_from_debug_names): Likewise.
13291         (dw2_symtab_iter_next): Likewise.
13292         (dw2_print_stats): Likewise.
13293         (dw2_expand_all_symtabs): Likewise.
13294         (dw2_expand_marked_cus): Likewise.
13295         (dw2_debug_names_iterator::next): Likewise.
13296         (dwarf2_initialize_objfile): Likewise.
13297         (add_signatured_type_cu_to_table): Likewise.
13298         (create_all_type_units): Likewise.
13299         (add_type_unit): Likewise.
13300         (struct tu_abbrev_offset): Add constructor.
13301         (build_type_psymtabs_1): Adjust to std::vector change.
13302         (print_tu_stats): Likewise.
13303         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13304         (write_debug_names): Likewise.
13306 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13308         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13309         Make an std::vector.
13310         <n_comp_units>: Remove.
13311         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13312         to std::vector change.
13313         (dwarf2_per_objfile::get_cutu): Likewise.
13314         (dwarf2_per_objfile::get_cu): Likewise.
13315         (create_cus_from_index): Likewise.
13316         (create_addrmap_from_index): Likewise.
13317         (create_addrmap_from_aranges): Likewise.
13318         (dwarf2_read_index): Likewise.
13319         (dw2_find_last_source_symtab): Likewise.
13320         (dw2_map_symtabs_matching_filename): Likewise.
13321         (dw2_symtab_iter_next): Likewise.
13322         (dw2_print_stats): Likewise.
13323         (dw2_expand_all_symtabs): Likewise.
13324         (dw2_expand_symtabs_with_fullname): Likewise.
13325         (dw2_expand_marked_cus): Likewise.
13326         (dw2_map_symbol_filenames): Likewise.
13327         (create_cus_from_debug_names): Likewise.
13328         (dwarf2_read_debug_names): Likewise.
13329         (dw2_debug_names_iterator::next): Likewise.
13330         (dwarf2_initialize_objfile): Likewise.
13331         (set_partial_user): Likewise.
13332         (dwarf2_build_psymtabs_hard): Likewise.
13333         (read_comp_units_from_section): Remove arguments, adjust to
13334         std::vector change.
13335         (create_all_comp_units): Adjust to std::vector and
13336         read_comp_units_from_section changes.
13337         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13338         change.
13339         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13340         (psyms_seen_size): Likewise.
13341         (write_gdbindex): Likewise.
13342         (write_debug_names): Likewise.
13344 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13346         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13347         with dwarf2_per_objfile.
13348         (create_cus_from_index): Likewise.
13349         (create_signatured_type_table_from_index): Likewise.
13350         (dwarf2_read_index): Likewise.
13351         (dwarf2_initialize_objfile): Likewise.
13352         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13353         per_cu rather than get_dwarf2_per_objfile.
13355 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13357         * dwarf2read.h (struct signatured_type): Forward declare.
13358         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13359         New methods.
13360         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13361         (dw2_get_cutu): ...this.
13362         (dwarf2_per_objfile::get_cu): Rename from...
13363         (dw2_get_cu): ...this.
13364         (dwarf2_per_objfile::get_tu): New.
13365         (create_addrmap_from_index): Adjust.
13366         (create_addrmap_from_aranges): Adjust.
13367         (dw2_find_last_source_symtab): Adjust.
13368         (dw2_map_symtabs_matching_filename): Adjust.
13369         (dw2_symtab_iter_next): Adjust.
13370         (dw2_print_stats): Adjust.
13371         (dw2_expand_all_symtabs): Adjust.
13372         (dw2_expand_symtabs_with_fullname): Adjust.
13373         (dw2_expand_marked_cus): Adjust.
13374         (dw_expand_symtabs_matching_file_matcher): Adjust.
13375         (dw2_map_symbol_filenames): Adjust.
13376         (dw2_debug_names_iterator::next): Adjust.
13377         (dwarf2_initialize_objfile): Adjust.
13378         (set_partial_user): Adjust.
13379         (dwarf2_build_psymtabs_hard): Adjust.
13381 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13383         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13384         Remove unused variables.
13385         (dw2_map_symtabs_matching_filename): Likewise.
13386         (dwarf2_record_block_ranges): Likewise.
13387         (dwarf2_read_addr_index): Likewise.
13388         (follow_die_offset): Likewise.
13390 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13392         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13393         to symbol_file_add_main.
13395 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13397         PR mi/22299
13398         * mi/mi-console.c (do_fputc_async_safe): New.
13399         (mi_console_file::write_async_safe): New.
13400         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13401         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13402         New.
13403         * ui-file.c (ui_file::putstrn): Adjust call to
13404         fputstrn_unfiltered.
13405         * utils.c (printchar): Replace do_fputs and do_fprintf
13406         parameters by do_fputc.
13407         (fputstr_filtered): Adjust call to printchar.
13408         (fputstr_unfiltered): Likewise.
13409         (fputstrn_filtered): Likewise.
13410         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13411         printchar.
13412         * utils.h (do_fputc_ftype): New typedef.
13413         (fputstrn_unfiltered): Add do_fputc parameter.
13415 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13417         * regformats/i386/i386-avx.dat: Remove.
13419 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13421         PR gdb/22979
13422         * amd64-tdep.c (amd64_none_init_abi): New function.
13423         (amd64_x32_none_init_abi): New function.
13424         (_initialize_amd64_tdep): Register handlers for x86-64 and
13425         x64_32 with GDB_OSABI_NONE.
13426         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13427         GDB_OSABI_NONE osabi.
13429 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13431         PR gdb/22980
13432         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13433         GDB_OSABI_NONE.
13434         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13435         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13437 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13439         * common/byte-vector.h (char_vector): New type.
13440         * target.h (target_read_alloc): Return
13441         gdb::optional<byte_vector>.
13442         (target_read_stralloc): Return gdb::optional<char_vector>.
13443         (target_get_osdata): Return gdb::optional<char_vector>.
13444         * target.c (target_read_alloc_1): Templatize.  Replacement
13445         manual memory management with vector.
13446         (target_read_alloc): Change return type, adjust.
13447         (target_read_stralloc): Change return type, adjust.
13448         (target_get_osdata): Change return type, adjust.
13449         * auxv.c (struct auxv_info) <length>: Remove.
13450         <data>: Change type to gdb::optional<byte_vector>.
13451         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13452         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13453         (target_auxv_search): Adjust.
13454         (fprint_target_auxv): Adjust.
13455         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13456         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13457         (linux_make_corefile_notes): Adjust.
13458         * osdata.c (get_osdata): Adjust.
13459         * remote.c (remote_get_threads_with_qxfer): Adjust.
13460         (remote_memory_map): Adjust.
13461         (remote_traceframe_info): Adjust.
13462         (btrace_read_config): Adjust.
13463         (remote_read_btrace): Adjust.
13464         (remote_pid_to_exec_file): Adjust.
13465         * solib-aix.c (solib_aix_get_library_list): Adjust.
13466         * solib-dsbt.c (decode_loadmap): Don't free buf.
13467         (dsbt_get_initial_loadmaps): Adjust.
13468         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13469         * solib-target.c (solib_target_current_sos): Adjust.
13470         * tracepoint.c (sdata_make_value): Adjust.
13471         * xml-support.c (xinclude_start_include): Adjust.
13472         (xml_fetch_content_from_file): Adjust.
13473         * xml-support.h (xml_fetch_another): Change return type.
13474         (xml_fetch_content_from_file): Change return type.
13475         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13476         * xml-tdesc.c (file_read_description_xml): Adjust.
13477         (fetch_available_features_from_target): Change return type.
13478         (target_fetch_description_xml): Adjust.
13479         (target_read_description_xml): Adjust.
13481 2018-04-06  Tom Tromey  <tom@tromey.com>
13483         * value.c (~value): Update.
13484         (struct value) <contents>: Now unique_xmalloc_ptr.
13485         (value_contents_bits_eq, allocate_value_contents)
13486         (value_contents_raw, value_contents_all_raw)
13487         (value_contents_for_printing, value_contents_for_printing_const)
13488         (set_value_enclosing_type): Update.
13490 2018-04-06  Tom Tromey  <tom@tromey.com>
13492         * value.c (range_s): Remove typedef, VEC.
13493         (struct range): Add operator<.
13494         (range_lessthan): Remove.
13495         (ranges_contain): Change type.
13496         (~value): Update.
13497         (struct value) <unavailable, optimized_out>: Now std::vector.
13498         (value_entirely_available)
13499         (value_entirely_covered_by_range_vector)
13500         (value_entirely_unavailable, value_entirely_optimized_out):
13501         Update.
13502         (insert_into_bit_range_vector): Change argument type.
13503         (find_first_range_overlap): Likewise.
13504         (struct ranges_and_idx, value_contents_bits_eq)
13505         (require_not_optimized_out, require_available): Update.
13506         (ranges_copy_adjusted): Change argument types.
13507         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13509 2018-04-06  Tom Tromey  <tom@tromey.com>
13511         * value.c (~value): Update.
13512         (struct value) <parent>: Now a value_ref_ptr.
13513         (value_parent, set_value_parent, value_address, value_copy):
13514         Update.
13516 2018-04-06  Tom Tromey  <tom@tromey.com>
13518         * value.c (struct value): Add constructor, destructor, and member
13519         initializers.
13520         (allocate_value_lazy, value_decref): Update.
13522 2018-04-06  Tom Tromey  <tom@tromey.com>
13524         * value.c (struct value) <released, next>: Remove.
13525         (all_values): Now a std::vector.
13526         (allocate_value_lazy): Update.
13527         (value_next): Remove.
13528         (value_mark, value_free_to_mark, release_value)
13529         (value_release_to_mark): Update.
13531 2018-04-06  Tom Tromey  <tom@tromey.com>
13533         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13534         (free_value_chain): Remove.
13535         * value.c (free_value_chain): Remove.
13536         (value_release_to_mark): Return a std::vector.
13537         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13538         std::vector.
13539         (check_condition): Update.
13540         * eval.c (fetch_subexp_value): Change "val_chain" to a
13541         std::vector.
13542         * breakpoint.c (update_watchpoint): Update.
13543         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13545 2018-04-06  Tom Tromey  <tom@tromey.com>
13547         * value.h (free_all_values): Remove.
13548         * value.c (free_all_values): Remove.
13550 2018-04-06  Tom Tromey  <tom@tromey.com>
13552         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13553         (value_history_chain, value_history_count): Remove.
13554         (value_history): New global.
13555         (record_latest_value, access_value_history, show_values)
13556         (preserve_values): Update.
13558 2018-04-06  Tom Tromey  <tom@tromey.com>
13560         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13561         * varobj.c (varobj_set_display_format, varobj_set_value)
13562         (install_default_visualizer, construct_visualizer)
13563         (install_new_value, ~varobj, varobj_get_value_type)
13564         (my_value_of_variable, varobj_editable_p): Update.
13565         * c-varobj.c (c_describe_child, c_value_of_variable)
13566         (cplus_number_of_children, cplus_describe_child): Update.
13567         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13568         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13569         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13571 2018-04-06  Tom Tromey  <tom@tromey.com>
13573         * printcmd.c (last_examine_address): Change type to
13574         value_ref_ptr.
13575         (do_examine, x_command): Update.
13577 2018-04-06  Tom Tromey  <tom@tromey.com>
13579         * value.c (release_value): Update.
13580         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13581         (struct bpstats) <val>: Now a value_ref_ptr.
13582         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13583         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13584         (~watchpoint, print_it_watchpoint, watch_command_1)
13585         (invalidate_bp_value_on_memory_change): Update.
13587 2018-04-06  Tom Tromey  <tom@tromey.com>
13589         * varobj.c (varobj_clear_saved_item)
13590         (update_dynamic_varobj_children, install_new_value, ~varobj):
13591         Update.
13592         * value.h (value_incref): Move declaration earlier.
13593         (value_decref): Rename from value_free.
13594         (struct value_ref_policy): New.
13595         (value_ref_ptr): New typedef.
13596         (struct value_deleter): Remove.
13597         (gdb_value_up): Remove typedef.
13598         (release_value): Change return type.
13599         (release_value_or_incref): Remove.
13600         * value.c (set_value_parent): Update.
13601         (value_incref): Change return type.
13602         (value_decref): Rename from value_free.
13603         (value_free_to_mark, free_all_values, free_value_chain): Update.
13604         (release_value): Return value_ref_ptr.
13605         (release_value_or_incref): Remove.
13606         (record_latest_value, set_internalvar, clear_internalvar):
13607         Update.
13608         * stack.c (info_frame_command): Don't call value_free.
13609         * python/py-value.c (valpy_dealloc, valpy_new)
13610         (value_to_value_object): Update.
13611         * printcmd.c (do_examine): Update.
13612         * opencl-lang.c (lval_func_free_closure): Update.
13613         * mi/mi-main.c (register_changed_p): Don't call value_free.
13614         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13615         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13616         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13617         value_free.
13618         * guile/scm-value.c (vlscm_free_value_smob)
13619         (vlscm_scm_from_value): Update.
13620         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13621         (frame_unwind_register_unsigned, get_frame_register_bytes)
13622         (put_frame_register_bytes): Don't call value_free.
13623         * findvar.c (address_from_register): Don't call value_free.
13624         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13625         * dwarf2loc.c (entry_data_value_free_closure)
13626         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13627         (dwarf2_evaluate_loc_desc_full): Update.
13628         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13629         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13630         (~watchpoint, watch_command_1)
13631         (invalidate_bp_value_on_memory_change): Update.
13632         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13634 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13636         PR gdb/23022
13637         * warning.m4: Add -Wno-error=deprecated-register.
13638         * configure: Re-generate.
13640 2018-04-05  Tom Tromey  <tom@tromey.com>
13642         * linespec.h: Remove include of "vec.h".
13644 2018-04-05  Tom Tromey  <tom@tromey.com>
13646         * linespec.c (typep): Remove typedef.
13647         (find_methods, find_superclass_methods): Take a std::vector.
13648         (find_method): Use std::vector.
13650 2018-04-05  Tom Tromey  <tom@tromey.com>
13652         * utils.c (compare_strings): Remove.
13653         * utils.h (compare_strings): Remove.
13654         * objc-lang.h (find_imps): Update.
13655         * objc-lang.c (find_methods): Take a std::vector.
13656         (uniquify_strings, find_imps): Likewise.
13657         * linespec.c (find_methods): Take a std::vector.
13658         (decode_objc): Use std::vector.
13659         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13660         a std::vector.
13661         (find_method, find_function_symbols): Use std::vector.
13663 2018-04-05  Tom Tromey  <tom@tromey.com>
13665         * completer.c (completion_tracker::completion_tracker): Remove
13666         cast.
13667         (completion_tracker::discard_completions): Likewise.
13668         * breakpoint.c (ambiguous_names_p): Remove cast.
13669         * ada-lang.c (_initialize_ada_language): Remove cast.
13670         * utils.h (streq): Update.
13671         (streq_hash): Add new declaration.
13672         * utils.c (streq): Return bool.
13673         (streq_hash): New function.
13675 2018-04-05  Tom Tromey  <tom@tromey.com>
13677         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13678         Remove a string copy.
13680 2018-04-05  Tom Tromey  <tom@tromey.com>
13682         * linespec.c (filter_results): Use std::vector.
13683         (decode_line_2, decode_line_full): Update.
13685 2018-04-05  Tom Tromey  <tom@tromey.com>
13687         * linespec.c (canonical_to_fullform): Return std::string.
13688         (filter_results): Update.
13689         (struct decode_line_2_item): Add constructor.
13690         <fullform, displayform>: Now std::string.
13691         (decode_line_2_compare_items): Now a std::sort comparator.
13692         (decode_line_2): Update.
13694 2018-04-05  Tom Tromey  <tom@tromey.com>
13696         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13697         (unexpected_linespec_error): Update.
13698         (linespec_parse_basic, parse_linespec): Update.
13700 2018-04-05  Tom Tromey  <tom@tromey.com>
13702         * linespec.c (linespec_parse_basic): Reindent.
13704 2018-04-05  Tom Tromey  <tom@tromey.com>
13706         * minsyms.h (iterate_over_minimal_symbols): Update.
13707         * minsyms.c (iterate_over_minimal_symbols): Take a
13708         gdb::function_view.
13709         * linespec.c (struct collect_minsyms): Remove.
13710         (compare_msyms): Now a std::sort comparator.
13711         (add_minsym): Add parameters.
13712         (search_minsyms_for_name): Update.  Use std::vector.
13714 2018-04-03  Tom Tromey  <tom@tromey.com>
13716         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13717         gdb::byte_vector.
13719 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13721         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13723 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13725         PR gdb/16959
13726         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13727         printing static type.
13729 2018-04-01  Tom Tromey  <tom@tromey.com>
13731         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13732         (rs6000_xfer_shared_libraries): Update.
13734 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13736         * common/gdb_vecs.h (char_ptr): Remove.
13737         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13739 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13741         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13742         with std::vector.
13743         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13745 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13747         * tracepoint.h (struct uploaded_tp): Initialize fields.
13748         <actions, step_actions, cmd_strings>: Change type to
13749         std::vector<char *>.
13750         * tracepoint.c (get_uploaded_tp): Allocate with new.
13751         (free_uploaded_tps): Free with delete.
13752         (parse_tracepoint_definition): Adjust to std::vector change.
13753         * breakpoint.c (read_uploaded_action): Likewise.
13754         (create_tracepoint_from_upload): Likewise.
13755         * ctf.c (ctf_write_uploaded_tp): Likewise.
13756         (SET_ARRAY_FIELD): Likewise.
13757         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13759 2018-03-30  Tom Tromey  <tom@tromey.com>
13761         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13762         std::unique_ptr.
13763         (svr4_keep_data_in_core): Update.
13764         (svr4_read_so_list): Update.
13766 2018-03-30  Tom Tromey  <tom@tromey.com>
13768         * windows-nat.c (handle_output_debug_string, handle_exception):
13769         Update.
13770         * target.h (target_read_string): Update.
13771         * target.c (target_read_string): Change "string" to
13772         unique_xmalloc_ptr.
13773         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13774         Update.
13775         * solib-frv.c (frv_current_sos): Update.
13776         * solib-dsbt.c (dsbt_current_sos): Update.
13777         * solib-darwin.c (darwin_current_sos): Update.
13778         * linux-thread-db.c (inferior_has_bug): Update.
13779         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13780         Update.  Remove alloca.
13781         * ada-lang.c (ada_main_name): Update.
13783 2018-03-30  Tom Tromey  <tom@tromey.com>
13785         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13786         (struct dwo_file_deleter): New.
13787         (dwo_file_up): New typedef.
13788         (open_and_init_dwo_file): Use dwo_file_up.
13789         (free_dwo_file_cleanup): Remove.
13791 2018-03-30  Tom Tromey  <tom@tromey.com>
13793         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13794         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13796 2018-03-30  Tom Tromey  <tom@tromey.com>
13798         * dwarf2read.c (class free_cached_comp_units): New class.
13799         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13800         (free_cached_comp_units): Remove function.
13802 2018-03-30  Tom Tromey  <tom@tromey.com>
13804         * utils.h (make_cleanup_unpush_target): Remove.
13805         * inf-ptrace.c (struct target_unpusher): New.
13806         (target_unpush_up) New typedef.
13807         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13808         target_unpush_up.
13809         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13811 2018-03-27  Tom Tromey  <tom@tromey.com>
13813         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13815 2018-03-27  Pedro Alves  <palves@redhat.com>
13816             Tom Tromey  <tom@tromey.com>
13818         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13819         destructor.  Now a class.
13820         (gdb_readline_wrapper_cleanup): Remove function.
13821         (gdb_readline_wrapper): Remove cleanups.
13823 2018-03-27  Tom Tromey  <tom@tromey.com>
13825         * typeprint.h (struct type_print_options) <local_typedefs,
13826         global_typedefs>: Remove "struct" keyword.
13827         (class typedef_hash_table): New class.
13828         (recursively_update_typedef_hash, add_template_parameters)
13829         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13830         (find_typedef_in_hash): Don't declare.
13831         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13832         (typedef_hash_table::recursively_update): Rename from
13833         recursively_update_typedef_hash.  Now a member.
13834         (typedef_hash_table::add_template_parameters): Rename from
13835         add_template_parameters.  Now a member.
13836         (typedef_hash_table::typedef_hash_table): Now a constructor;
13837         rename from create_typedef_hash.
13838         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13839         rename from free_typedef_hash.
13840         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13841         (do_free_global_table): Remove.
13842         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13843         from copy_type_recursive.
13844         (create_global_typedef_table): Remove.
13845         (typedef_hash_table::find_global_typedef): Now a member of
13846         typedef_hash_table.
13847         (typedef_hash_table::find_typedef): Rename from
13848         find_typedef_in_hash; now a member.
13849         (whatis_exp): Update.
13850         * extension.h (struct ext_lang_type_printers): Add constructor and
13851         destructor.
13852         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13853         declare.
13854         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13855         Now a constructor; rename from start_ext_lang_type_printers.
13856         (ext_lang_type_printers): Now a destructor; rename from
13857         free_ext_lang_type_printers.
13858         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13859         Update.
13860         (c_type_print_base_struct_union): Update.  Remove cleanups.
13862 2018-03-27  Tom Tromey  <tom@tromey.com>
13864         * dwarf-index-write.c: Include <cmath>.
13866 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13868         * NEWS: Add entry describing new "set|show varsize-limit" command.
13869         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13870         command.
13871         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13872         "set variable".
13874 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13876         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13877         dwarf-index-write.c
13878         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13879         * dwarf-index-common.c: New file.
13880         * dwarf-index-common.h: New file.
13881         * dwarf-index-write.c: New file.
13882         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13883         (struct dwarf2_section_info): Move from here.
13884         (dwarf2_section_info_def): Likewise.
13885         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13886         (offset_type): Likewise.
13887         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13888         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13889         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13890         (byte_swap): Likewise.
13891         (MAYBE_SWAP): Likewise.
13892         (dwarf2_per_cu_ptr): Likewise.
13893         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13894         (struct tu_stats): Likewise.
13895         (struct dwarf2_per_objfile): Likewise.
13896         (struct dwarf2_per_cu_data): Likewise.
13897         (struct signatured_type): Likewise.
13898         (sig_type_ptr): Likewise.
13899         (DEF_VEC_P (sig_type_ptr)): Likewise.
13900         (INDEX4_SUFFIX): Likewise.
13901         (INDEX5_SUFFIX): Likewise.
13902         (DEBUG_STR_SUFFIX): Likewise.
13903         (dwarf2_read_section): Make non-static.
13904         (mapped_index_string_hash): Move from here.
13905         (dwarf5_djb_hash): Likewise.
13906         (file_write): Likewise.
13907         (class data_buf): Likewise.
13908         (struct symtab_index_entry): Likewise.
13909         (struct mapped_symtab): Likewise.
13910         (find_slot): Likewise.
13911         (hash_expand): Likewise.
13912         (add_index_entry): Likewise.
13913         (uniquify_cu_indices): Likewise.
13914         (class c_str_view): Likewise.
13915         (class c_str_view_hasher): Likewise.
13916         (class vector_hasher): Likewise.
13917         (write_hash_table): Likewise.
13918         (psym_index_map): Likewise.
13919         (struct addrmap_index_data): Likewise.
13920         (add_address_entry): Likewise.
13921         (add_address_entry_worker): Likewise.
13922         (write_address_map): Likewise.
13923         (symbol_kind): Likewise.
13924         (write_psymbols): Likewise.
13925         (struct signatured_type_index_data): Likewise.
13926         (write_one_signatured_type): Likewise.
13927         (recursively_count_psymbols): Likewise.
13928         (recursively_write_psymbols): Likewise.
13929         (class debug_names): Likewise.
13930         (check_dwarf64_offsets): Likewise.
13931         (psyms_seen_size): Likewise.
13932         (write_gdbindex): Likewise.
13933         (write_debug_names): Likewise.
13934         (assert_file_size): Likewise.
13935         (write_psymtabs_to_index): Likewise.
13936         (save_gdb_index_command): Likewise.
13937         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13938         command.
13939         * dwarf2read.h: New file.
13941 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13943         PR gdb/22670
13944         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13945         symbol name if the CU's language stores symbol names in linkage
13946         format.
13947         * language.h (struct language_defn)
13948         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13949         all instances of this struct.
13951 2018-03-26  Tom Tromey  <tom@tromey.com>
13953         * stack.c (backtrace_command_1): Remove verbose code.
13955 2018-03-26  Tom Tromey  <tom@tromey.com>
13957         * python/py-framefilter.c (py_print_type): Don't catch
13958         exceptions.  Return void.
13959         (py_print_value): Likewise.
13960         (py_print_single_arg): Likewise.
13961         (enumerate_args): Don't catch exceptions.
13962         (py_print_args): Likewise.
13963         (py_print_frame): Likewise.
13964         (gdbpy_apply_frame_filter): Catch exceptions here.
13966 2018-03-26  Tom Tromey  <tom@tromey.com>
13968         * stack.c (_initialize_stack): Remove trailing newlines from help
13969         text.  Add "Usage" line to "backtrace" help.
13971 2018-03-26  Tom Tromey  <tom@tromey.com>
13973         PR python/16486:
13974         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13976 2018-03-26  Tom Tromey  <tom@tromey.com>
13978         * python/py-framefilter.c (py_print_single_arg): Return
13979         EXT_LANG_BT_ERROR from catch.
13981 2018-03-26  Tom Tromey  <tom@tromey.com>
13983         PR backtrace/15584:
13984         * stack.c (backtrace_command_1): Move some code into no-filters
13985         "if".
13987 2018-03-26  Tom Tromey  <tom@tromey.com>
13989         * python/py-framefilter.c (throw_quit_or_print_exception): New
13990         function.
13991         (gdbpy_apply_frame_filter): Use it.
13993 2018-03-26  Tom Tromey  <tom@tromey.com>
13995         PR cli/17716:
13996         * python/py-framefilter.c (py_print_type, py_print_value)
13997         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
13998         RETURN_MASK_ERROR.
14000 2018-03-26  Tom Tromey  <tom@tromey.com>
14002         * python/py-framefilter.c (enumerate_args): Use
14003         gdb::unique_xmalloc_ptr.
14005 2018-03-26  Tom Tromey  <tom@tromey.com>
14007         * python/py-framefilter.c (py_print_frame): Return
14008         EXT_LANG_BT_OK.
14009         (gdbpy_apply_frame_filter): Update comment.
14010         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
14011         Remove.
14012         <EXT_LANG_BT_NO_FILTERS>: Change value.
14014 2018-03-26  Tom Tromey  <tom@tromey.com>
14016         PR backtrace/15582:
14017         * stack.c (backtrace_command): Parse "hide" argument.
14018         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
14019         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
14020         constant.
14022 2018-03-26  Tom Tromey  <tom@tromey.com>
14024         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
14025         add "flags".
14026         (backtrace_command): Remove "fulltrace", add "flags".
14028 2018-03-26  Tom Tromey  <tom@tromey.com>
14030         * stack.c (backtrace_command): Rewrite command line parsing.
14032 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
14034         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
14036 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
14038         * filename-seen-cache.h: Add include guard.
14040 2018-03-26  Keith Seitz  <keiths@redhat.com>
14042         * symfile.c (place_section): Remove "struct" from section_addr_info
14043         in comment.
14044         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
14045         "struct" keyword from section_addr_info.
14047 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
14049         * regformats/regdef.h (reg): Add constructors.
14051 2018-03-25  Pedro Alves  <palves@redhat.com>
14053         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
14054         if then/else bodies in var_func_name extraction.
14056 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
14058         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
14059         lookup_minimal_symbol() to find symbol entry.
14060         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
14062 2018-03-23  Keith Seitz  <keiths@redhat.com>
14064         PR c++/22968
14065         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
14066         nested type definitions for C++, too.
14068 2018-03-23  Tom Tromey  <tom@tromey.com>
14070         * machoread.c (struct oso_el): Add a constructor.  Don't define as
14071         a typedef.
14072         (macho_register_oso): Remove.
14073         (macho_symtab_read): Take a std::vector.
14074         (oso_el_compare_name): Now a std::sort comparator.
14075         (macho_symfile_read_all_oso): Take a std::vector.
14076         (macho_symfile_read): Use std::vector.  Remove cleanups.
14078 2018-03-22  Tom Tromey  <tom@tromey.com>
14080         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
14081         (record_full_goto_bookmark): Use std::string.
14083 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
14085         PR tdep/18295
14086         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
14087         a single mask.
14089 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
14091         * rs6000-tdep.c (store_insn_p): New function.
14092         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
14093         and cr_reg to their unshifted values. Use store_insn_p to
14094         match LR saves using either R1 or fdata->alloca_reg. Use
14095         store_insn_p to match CR saves. Set alloca_reg_offset
14096         when alloca_reg and framep are set. Remove lr_reg shift
14097         when assigning to fdata->lr_register.
14099 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14101         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
14102         command line args instead of emitting a warning.
14104 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14106         * tracepoint.h (struct static_tracepoint_marker): Initialize
14107         fields, define default constructor, move constructor and move
14108         assignment, disable the rest.
14109         <str_id, extra>: Make std::string.
14110         (release_static_tracepoint_marker): Remove.
14111         (free_current_marker): Remove.
14112         * tracepoint.c (free_current_marker): Remove.
14113         (parse_static_tracepoint_marker_definition): Adjust to
14114         std::string, use new hex2str overload.
14115         (release_static_tracepoint_marker): Remove.
14116         (print_one_static_tracepoint_marker): Get marker by reference
14117         and adjust to std::string.
14118         (info_static_tracepoint_markers_command): Adjust to std::vector
14119         changes
14120         * target.h (static_tracepoint_marker_p): Remove typedef.
14121         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
14122         (struct target_ops) <to_static_tracepoint_marker_at>: Return
14123         bool.
14124         <to_static_tracepoint_markers_by_strid>: Return std::vector.
14125         * target-debug.h
14126         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
14127         (target_debug_print_std_vector_static_tracepoint_marker): New.
14128         (target_debug_print_struct_static_tracepoint_marker_p): Rename
14129         to...
14130         (target_debug_print_static_tracepoint_marker_p): ... this.
14131         * target-delegates.c: Re-generate.
14132         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
14133         Make std::string.
14134         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
14135         (decode_static_tracepoint_spec): Adjust to std::vector.
14136         (tracepoint_print_one_detail): Adjust to std::string.
14137         (strace_marker_decode_location): Adjust to std::string.
14138         (update_static_tracepoint): Adjust to std::string, remove call
14139         to release_static_tracepoint_marker.
14140         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
14141         Adjust to std::vector.
14142         * remote.c (remote_static_tracepoint_marker_at): Return bool.
14143         (remote_static_tracepoint_markers_by_strid): Adjust to
14144         std::vector.
14145         * common/rsp-low.h (hex2str): New overload with explicit count
14146         of bytes.
14147         * common/rsp-low.c (hex2str): New overload with explicit count
14148         of bytes.
14149         * unittests/rsp-low-selftests.c (test_hex2str): New function.
14150         (_initialize_rsp_low_selftests): Add test_hex2str test.
14151         * unittests/tracepoint-selftests.c
14152         (test_parse_static_tracepoint_marker_definition): Adjust to
14153         std::string.
14155 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14157         * tracepoint.c (parse_static_tracepoint_marker_definition):
14158         Consider case where the definition is followed by more
14159         definitions.
14160         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14161         tracepoint-selftests.c.
14162         * unittests/tracepoint-selftests.c: New.
14164 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
14166         * MAINTAINERS (Write After Approval): Add Pedro Franco de
14167         Carvalho.
14169 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
14171         * symtab.c (find_pc_sect_line): fixed indentation.
14173 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
14175         * symtab.c (find_pc_sect_line): now uses binary search.
14177 2018-03-19  Tom Tromey  <tom@tromey.com>
14179         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
14180         "IDENT" production.
14182 2018-03-19  Pedro Alves  <palves@redhat.com>
14183             Tom Tromey  <tom@tromey.com>
14185         * unittests/observable-selftests.c: New file.
14186         * common/observable.h: New file.
14187         * observable.h: New file.
14188         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
14189         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
14190         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
14191         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
14192         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
14193         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
14194         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
14195         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
14196         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
14197         python/py-breakpoint.c, python/py-finishbreakpoint.c,
14198         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
14199         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
14200         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
14201         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
14202         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
14203         tui/tui-interp.c, valops.c: Update all users.
14204         * tui/tui-hooks.c (tui_bp_created_observer)
14205         (tui_bp_deleted_observer, tui_bp_modified_observer)
14206         (tui_inferior_exit_observer, tui_before_prompt_observer)
14207         (tui_normal_stop_observer, tui_register_changed_observer):
14208         Remove.
14209         (tui_observers_token): New global.
14210         (attach_or_detach, tui_attach_detach_observers): New functions.
14211         (tui_install_hooks, tui_remove_hooks): Use
14212         tui_attach_detach_observers.
14213         * record-btrace.c (record_btrace_thread_observer): Remove.
14214         (record_btrace_thread_observer_token): New global.
14215         * observer.sh: Remove.
14216         * observer.c: Rename to observable.c.
14217         * observable.c (namespace gdb_observers): Define new objects.
14218         (observer_debug): Move into gdb_observers namespace.
14219         (struct observer, struct observer_list, xalloc_observer_list_node)
14220         (xfree_observer_list_node, generic_observer_attach)
14221         (generic_observer_detach, generic_observer_notify): Remove.
14222         (_initialize_observer): Update.
14223         Don't include observer.inc.
14224         * Makefile.in (generated_files): Remove observer.h, observer.inc.
14225         (clean mostlyclean): Likewise.
14226         (observer.h, observer.inc): Remove targets.
14227         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
14228         (COMMON_SFILES): Use observable.c, not observer.c.
14229         * .gitignore: Remove observer.h.
14231 2018-03-18  Tom Tromey  <tom@tromey.com>
14233         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
14234         gdb::def_vector.
14235         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
14237 2018-03-17  Tom Tromey  <tom@tromey.com>
14239         * auto-load.c (auto_load_objfile_script_1): Use std::string.
14241 2018-03-17  Tom Tromey  <tom@tromey.com>
14243         * target.c (class scoped_target_fd): New.
14244         (target_fileio_close_cleanup): Remove.
14245         (target_fileio_read_alloc_1): Use scoped_target_fd.
14247 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
14249         * silent-rules.mk: New.
14250         * Makefile.in: Include silent-rules.mk
14251         (srcdir, VPATH, top_srcdir): Move up.
14252         (COMPILE): Add ECHO_CXX.
14253         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
14254         (init.c): Add ECHO_INIT_C.
14255         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14256         (version.c): Add ECHO_GEN.
14257         (printcmd.o): Add ECHO_CXX.
14258         (target-float.o): Add ECHO_CXX.
14259         (ada-exp.o): Add ECHO_CXX.
14260         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14261         (insight$(EXEEXT)): Add ECHO_CXXLD.
14262         * gnulib/configure.ac: Add AM_SILENT_RULES.
14263         * gnulib/aclocal.m4: Re-generate.
14264         * gnulib/configure: Re-generate.
14265         * gnulib/import/Makefile.in: Re-generate.
14267 2018-03-16  Tom Tromey  <tom@tromey.com>
14269         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14270         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14271         * utils.c (do_free_section_addr_info)
14272         (make_cleanup_free_section_addr_info): Remove.
14273         * symfile.h (struct other_sections): Add constructor.
14274         (struct section_addr_info): Remove.
14275         (section_addr_info): New typedef.
14276         (struct sym_fns) <sym_offsets>: Change type of parameter.
14277         (build_section_addr_info_from_objfile)
14278         (relative_addr_info_to_section_offsets, addr_info_make_relative)
14279         (default_symfile_offsets, symbol_file_add)
14280         (symbol_file_add_from_bfd)
14281         (build_section_addr_info_from_section_table): Update.
14282         (alloc_section_addr_info, free_section_addr_info): Don't declare.
14283         * symfile.c (alloc_section_addr_info): Remove.
14284         (build_section_addr_info_from_section_table): Change return type.
14285         Update.
14286         (build_section_addr_info_from_bfd)
14287         (build_section_addr_info_from_objfile): Likewise.
14288         (free_section_addr_info): Remove.
14289         (relative_addr_info_to_section_offsets): Change type of "addrs".
14290         (addrs_section_compar): Now a std::sort comparator.
14291         (addrs_section_sort): Change return type.
14292         (addr_info_make_relative): Change type of "addrs".  Update.
14293         (default_symfile_offsets, syms_from_objfile_1)
14294         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14295         (symbol_file_add_separate): Update.
14296         (symbol_file_add): Change type of "addrs".  Update.
14297         (add_symbol_file_command): Update.  Remove cleanups.
14298         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14299         cleanups.
14300         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14301         * solib.c (solib_read_symbols): Update.
14302         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14303         * machoread.c (macho_symfile_offsets): Update.
14304         * jit.c (jit_bfd_try_read_symtab): Update.
14306 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14308         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14309         unittests/utils-selftests.c.
14310         * unittests/utils-selftests.c: New file.
14312 2018-03-14  Tom Tromey  <tom@tromey.com>
14314         PR cli/14977:
14315         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14316         for NULL.
14318 2018-03-14  Tom Tromey  <tom@tromey.com>
14320         PR cli/19918:
14321         * printcmd.c (printf_pointer): Allow "-" in format.
14323 2018-03-14  Tom Tromey  <tom@tromey.com>
14325         * printcmd.c (_initialize_printcmd): Add usage to printf.
14327 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14329         * MAINTAINERS: Update my email address.
14331 2018-03-13  Tom Tromey  <tom@tromey.com>
14333         * machoread.c (macho_check_dsym): Change filenamep to a
14334         std::string*.
14335         (macho_symfile_read): Update.
14336         * symfile.c (load_command): Use std::string.
14338 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14340         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14341         to error message string.
14342         (riscv_register_name): Use xsnprintf instead of sprintf.
14343         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14344         internal_error.
14345         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14346         error.
14347         (riscv_push_dummy_call): Likewise.
14349 2018-03-12  Tom Tromey  <tom@tromey.com>
14351         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14352         Use gdb::byte_vector.
14353         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14355 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14357         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14358         parameter type to readable_regcache.
14359         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14360         the declaration.
14362 2018-03-11  Tom Tromey  <tom@tromey.com>
14364         * dwarf2read.c (struct nextfield): Add initializers.
14365         (struct nextfnfield): Remove.
14366         (struct fnfieldlist): Add initializers.  Remove "length" and
14367         "head", use std::vector.
14368         (struct decl_field_list): Remove.
14369         (struct field_info): Add initializers.
14370         <fields, baseclasses>: Now std::vector.
14371         <nbaseclasses, nfnfields, typedef_field_list_count,
14372         nested_types_list_count>: Remove.
14373         (dwarf2_add_field, dwarf2_add_type_defn)
14374         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14375         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14376         (process_structure_scope): Update.
14378 2018-03-11  Tom Tromey  <tom@tromey.com>
14380         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14381         for use by std::sort.
14382         (build_type_psymtabs_1): Use std::vector.
14384 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14386         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14387         and LIBMPFR in the printed configuration.
14389 2018-03-08  Tom Tromey  <tom@tromey.com>
14391         * source.c (get_filename_and_charpos): Use scoped_fd.
14392         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14393         (procfs_pidlist): Likewise.
14394         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14395         (iterate_over_mappings): Likewise.
14397 2018-03-08  Tom Tromey  <tom@tromey.com>
14399         * infcall.c (struct call_return_meta_info)
14400         <stack_temporaries_enabled>: Remove.
14401         (get_call_return_value, call_function_by_hand_dummy): Update.
14402         * thread.c (disable_thread_stack_temporaries): Remove.
14403         (enable_thread_stack_temporaries): Remove.
14404         (thread_stack_temporaries_enabled_p): Return bool.
14405         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14406         (get_last_thread_stack_temporary): Update.
14407         * eval.c (evaluate_subexp): Update.
14408         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14409         class, not a function.
14410         (value_ptr, value_vec): Remove typedefs.
14411         (class thread_info) <stack_temporaries_enabled>: Now bool.
14412         <stack_temporaries>: Now a std::vector.
14413         (thread_stack_temporaries_enabled_p)
14414         (value_in_thread_stack_temporaries): Return bool.
14416 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14418         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14419         (getpkt_or_notif_sane_1): Likewise.
14421 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14423         * build-id.c (build_id_to_debug_bfd): Use std::string.
14425 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14427         * build-id.c (find_separate_debug_file_by_buildid): Return
14428         std::string.
14429         * build-id.h (find_separate_debug_file_by_buildid): Return
14430         std::string.
14431         * coffread.c (coff_symfile_read): Adjust to std::string.
14432         * elfread.c (elf_symfile_read): Adjust to std::string.
14433         * symfile.c (separate_debug_file_exists): Change parameter to
14434         std::string.
14435         (find_separate_debug_file): Return std::string.
14436         (find_separate_debug_file_by_debuglink): Return std::string.
14437         * symfile.h (find_separate_debug_file_by_debuglink): Return
14438         std::string.
14440 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14442         * common/xml-utils.c (xml_escape_text): Move code to...
14443         (xml_escape_text_append): ... this new function.
14444         * common/xml-utils.h (xml_escape_text_append): New declaration.
14445         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14446         New function.
14447         (_initialize_xml_utils): register test_xml_escape_text_append as
14448         a selftest.
14450 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14452         * defs.h: Remove MAX_REGISTER_SIZE.
14453         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14454         asserts.
14455         * python/py-unwind.c (pyuw_sniffer): Likewise.
14457 2018-03-07  Tom Tromey  <tom@tromey.com>
14459         * linux-tdep.c (linux_info_proc): Update.
14460         * target.h (struct target_ops) <to_fileio_readlink>: Return
14461         optional<string>.
14462         (target_fileio_readlink): Return optional<string>.
14463         * remote.c (remote_hostio_readlink): Return optional<string>.
14464         * inf-child.c (inf_child_fileio_readlink): Return
14465         optional<string>.
14466         * target.c (target_fileio_readlink): Return optional<string>.
14468 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14470         * regcache.c (cooked_read_test): Add riscv to the list of
14471         architectures that have a save_reggroup.
14473 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14475         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14476         value is not a dynamic class object.
14478 2018-03-06  Tom Tromey  <tom@tromey.com>
14480         * rust-exp.y: Formatting fixes.
14482 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14484         * riscv-tdep.c (riscv_register_name): Remove target description
14485         support.
14486         (riscv_gdbarch_init): Remove target description check.
14488 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14490         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14491         comment.
14492         * riscv-tdep.h: Likewise.
14494 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14496         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14497         (riscv_pseudo_register_write): Delete.
14498         (riscv_gdbarch_init): Remove all use of pseudo registers.
14500 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14502         * record-btrace.c (btrace_print_lines): Replace cleanup
14503         parameter with RAII equivalents.
14504         (btrace_insn_history): Replace cleanup with RAII equivalents.
14505         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14506         make_cleanup_ui_out_tuple_begin_end): Remove.
14507         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14508         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14509         make_cleanup_ui_out_list_begin_end): Remove.
14511 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14513         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14514         parameter types to std::vector.  Use bool.
14515         (record_btrace_wait): Replace VEC(tp_t) with
14516         std::vector<thread_info *>.
14517         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14519 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14521         * record-btrace.c (record_btrace_disable_callback): Remove.
14522         (struct scoped_btrace_disable): New.
14523         (record_btrace_open): Use scoped_btrace_disable.
14525 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14527         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14528         reading values from registers.
14530 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14532         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14533         where appropriate.
14535 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14537         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14538         change parameter type.  Use GDB's print functions, and use
14539         core_addr_to_string where appropriate.
14540         (riscv_push_dummy_call): Use core_addr_to_string where
14541         appropriate, update call to riscv_print_arg_location, and reindent
14542         a few lines.
14543         (riscv_return_value): Update call to riscv_print_arg_location.
14545 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14546             Tim Newsome <tim@sifive.com>
14547             Albert Ou <a0u@eecs.berkeley.edu>
14548             Darius Rad <darius@bluespec.com>
14550         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14551         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14552         (ALLDEPFILES): Add riscv-tdep.c
14553         * configure.tgt: Add riscv support.
14554         * riscv-tdep.c: New file.
14555         * riscv-tdep.h: New file.
14556         * NEWS: Mention new target.
14557         * MAINTAINERS: Add entry for riscv.
14559 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14561         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14562         fields within aggregates.
14564 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14566         * record-btrace.c (btrace_print_lines): Change type of flags to
14567         gdb_disassembly_flags.
14569 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14571         * fbsd-nat.c: Include "inf-ptrace.h".
14572         (USE_SIGTRAP_SIGINFO): Conditionally define.
14573         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14574         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14575         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14576         function.
14577         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14578         Likewise.
14579         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14580         Likewise.
14581         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14582         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14583         "supports_stopped_by_hw_breakpoint" target methods.
14585 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14587         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14588         * fbsd-nat.c (debug_fbsd_nat): New variable.
14589         (show_fbsd_nat_debug): New function.
14590         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14591         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14593 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14595         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14596         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14597         prototype.
14598         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14599         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14600         method.
14602 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14604         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14605         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14607 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14609         * charset.c (struct charset_vector): New.
14610         (charsets): Change type to charset_vector.
14611         (find_charset_names): Adjust.
14612         (add_one): Adjust.
14613         (_initialize_charset): Adjust.
14615 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14617         * progspace.h (struct program_space) <deleted_solibs>: Change
14618         type to std::vector<std::string>.
14619         * progspace.c (clear_program_space_solib_cache): Adjust.
14620         * breakpoint.c (print_solib_event): Adjust.
14621         (check_status_catch_solib): Adjust.
14622         * solib.c (update_solib_list): Adjust.
14623         * ui-out.h (class ui_out) <field_string>: New overload.
14624         * ui-out.c (ui_out::field_string): New overload.
14626 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14628         * progspace.h (struct program_space): Add constructor and
14629         destructor, initialize fields.
14630         (add_program_space): Remove.
14631         * progspace.c (add_program_space): Rename to...
14632         (program_space::program_space): ... this.
14633         (release_program_space): Rename to...
14634         (program_space::~program_space): ... this.
14635         (delete_program_space): Use delete to delete program_space.
14636         (initialize_progspace): Use new to allocate program_space.
14637         * inferior.c (add_inferior_with_spaces): Likewise.
14638         (clone_inferior_command): Likewise.
14639         * infrun.c (follow_fork_inferior): Likewise.
14640         (handle_vfork_child_exec_or_exit): Likewise.
14642 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14644         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14645         (delim_string_to_char_ptr_vec): Return std::vector of
14646         gdb::unique_xmalloc_ptr.
14647         (dirnames_to_char_ptr_vec_append): Take std::vector of
14648         gdb::unique_xmalloc_ptr.
14649         (dirnames_to_char_ptr_vec): Return std::vector of
14650         gdb::unique_xmalloc_ptr.
14651         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14652         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14653         (delim_string_to_char_ptr_vec): Return an std::vector of
14654         gdb::unique_xmalloc_ptr, adjust the code.
14655         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14656         gdb::unique_xmalloc_ptr, adjust the code.
14657         (dirnames_to_char_ptr_vec): Return an std::vector of
14658         gdb::unique_xmalloc_ptr, adjust the code.
14659         * auto-load.c (auto_load_safe_path_vec): Change type to
14660         std::vector of gdb::unique_xmalloc_ptr.
14661         (auto_load_expand_dir_vars): Return an std::vector of
14662         gdb::unique_xmalloc_ptr, adjust the code.
14663         (auto_load_safe_path_vec_update): Adjust.
14664         (filename_is_in_auto_load_safe_path_vec): Adjust.
14665         (auto_load_objfile_script_1): Adjust.
14666         * build-id.c (build_id_to_debug_bfd): Adjust.
14667         * linux-thread-db.c (thread_db_load_search): Adjust.
14668         * source.c (add_path): Adjust.
14669         (openp): Adjust.
14670         * symfile.c (find_separate_debug_file): Adjust.
14671         * utils.c (do_free_char_ptr_vec): Remove.
14672         (make_cleanup_free_char_ptr_vec): Remove.
14674 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14676         PR gdb/22907
14677         * common/pathstuff.c: Conditionally include "<windows.h>".
14679 2018-03-01  Georg Sauthoff  <mail@georg.so>
14681         PR gdb/22888
14682         * gcore.in: Quote variables and switch interpreter to bash.
14684 2018-03-01  Tom Tromey  <tom@tromey.com>
14686         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14687         assertion.  Add assertion for discriminant_index.
14688         (quirk_rust_enum): Use correct base type name in univariant case.
14690 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14692         * record.c (get_call_history_modifiers): Return a
14693         record_print_flags.
14694         (cmd_record_call_history): Adjust.
14695         * record-btrace.c (record_btrace_call_history): Adjust.
14696         (record_btrace_call_history_range): Adjust.
14697         (record_btrace_call_history_from): Adjust.
14698         * target-debug.h (target_debug_print_record_print_flags): New.
14699         * target-delegates.c: Re-generate.
14700         * target.c (target_call_history): Change flags type.
14701         (target_call_history_from): Likewise.
14702         (target_call_history_range): Likewise.
14703         * target.h (struct target_ops) <target_call_history>: Likewise.
14704         (target_call_history_from): Likewise.
14705         (target_call_history_range): Likewise.
14707 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14708             Simon Marchi  <simon.marchi@polymtl.ca>
14710         * common/common-utils.c: Include "sys/stat.h".
14711         (is_regular_file): Move here from "source.c"; change return
14712         type to "bool".
14713         * common/common-utils.h (is_regular_file): New prototype.
14714         * common/pathstuff.c (contains_dir_separator): New function.
14715         * common/pathstuff.h (contains_dir_separator): New prototype.
14716         * source.c: Don't include "sys/stat.h".
14717         (is_regular_file): Move to "common/common-utils.c".
14719 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14721         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14722         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14723         * auto-load.c: Include "common/pathstuff.h".
14724         * common/common-def.h (current_directory): Move here.
14725         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14726         function.
14727         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14728         prototype.
14729         * common/pathstuff.c: New file.
14730         * common/pathstuff.h: New file.
14731         * compile/compile.c: Include "common/pathstuff.h".
14732         * defs.h (current_directory): Move to "common/common-defs.h".
14733         * dwarf2read.c: Include "common/pathstuff.h".
14734         * exec.c: Likewise.
14735         * guile/scm-safe-call.c: Likewise.
14736         * linux-thread-db.c: Likewise.
14737         * main.c: Likewise.
14738         * nto-tdep.c: Likewise.
14739         * objfiles.c: Likewise.
14740         * source.c: Likewise.
14741         * symtab.c: Likewise.
14742         * utils.c: Include "common/pathstuff.h".
14743         (gdb_realpath): Move to "common/pathstuff.c".
14744         (gdb_realpath_keepfile): Likewise.
14745         (gdb_abspath): Likewise.
14746         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14747         (gdb_realpath_keepfile): Likewise.
14748         (gdb_abspath): Likewise.
14750 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14752         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14753         wildcard process pid for super_resume for kernels with a
14754         specific bug.
14756 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14758         * compile/compile.c (get_args): Add additional comments
14759         explaining function.
14761 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14762             Tom Tromey  <tom@tromey.com>
14764         * target.h (memory_write_request_s): Remove typedef.  Don't define
14765         VEC.
14766         (target_write_memory_blocks): Change argument to std::vector.
14767         (struct memory_write_request): Add constructor.
14768         * target-memory.c (compare_block_starting_address): Return bool.
14769         Change argument types.
14770         (claim_memory): Change arguments to use std::vector.
14771         (split_regular_and_flash_blocks, blocks_to_erase)
14772         (compute_garbled_blocks): Likewise.
14773         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14774         (target_write_memory_blocks): Change argument to std::vector.
14775         * symfile.c (struct load_section_data): Add constructor and
14776         destructor.  Use std::vector for "requests".
14777         (struct load_progress_data): Add initializers.
14778         (load_section_callback): Update.  Use "new".
14779         (clear_memory_write_data): Remove.
14780         (generic_load): Update.
14782 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14784         * arch/aarch64.h: Use common/tdesc.h.
14786 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14788         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14789         architecture with a 64-bit ABI.
14791 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14793         * mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14794         ahead of target description loading.
14796 2018-02-26  Tom Tromey  <tom@tromey.com>
14798         * stack.c (backtrace_command_1): Update.
14799         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14800         of "flags".
14801         * python/py-framefilter.c (py_print_frame)
14802         (gdbpy_apply_frame_filter): Change type of "flags".
14803         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14804         of "flags".
14805         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14806         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14807         * extension.h (enum frame_filter_flag): Rename from
14808         frame_filter_flags.
14809         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14810         (apply_ext_lang_frame_filter): Change type of "flags".
14811         * extension.c (apply_ext_lang_frame_filter): Change type of
14812         "flags".
14813         * extension-priv.h (struct extension_language_ops)
14814         <apply_frame_filter>: Change type of "flags".
14816 2018-02-26  Tom Tromey  <tom@tromey.com>
14818         PR python/16497:
14819         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14820         off-by-one in py_end computation.
14821         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14822         PRINT_MORE_FRAMES.
14823         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14824         constant.
14826 2018-02-26  Tom Tromey  <tom@tromey.com>
14828         * dwarf2read.c (struct variant_field): New.
14829         (struct nextfield) <variant>: New field.
14830         (dwarf2_add_field): Handle DW_TAG_variant_part.
14831         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14832         discriminated union.
14833         (read_structure_type): Handle DW_TAG_variant_part.
14834         (handle_struct_member_die): New function, extracted from
14835         process_structure_scope.  Handle DW_TAG_variant.
14836         (process_structure_scope): Handle discriminated unions.  Call
14837         handle_struct_member_die.
14839 2018-02-26  Tom Tromey  <tom@tromey.com>
14841         * rust-lang.h (rust_last_path_segment): Declare.
14842         * rust-lang.c (rust_last_path_segment): Now public.  Change
14843         contract.
14844         (struct disr_info): Remove.
14845         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14846         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14847         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14848         (rust_enum_p, rust_enum_variant): New function.
14849         (rust_underscore_fields): Remove "offset" parameter.
14850         (rust_print_enum): New function.
14851         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14852         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14853         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14854         enums.
14855         (rust_internal_print_type): New function, from rust_print_type.
14856         Remove enum code.
14857         (rust_print_type): Call rust_internal_print_type.
14858         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14859         Update enum handling.
14860         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14861         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14862         (rust_union_quirks): New functions.
14863         (process_full_comp_unit, process_full_type_unit): Call
14864         rust_union_quirks.
14865         (process_structure_scope): Update rust_unions if necessary.
14867 2018-02-26  Tom Tromey  <tom@tromey.com>
14869         * value.h (value_union_variant): Declare.
14870         * valops.c (value_union_variant): New function.
14871         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14872         (struct discriminant_info): New.
14873         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14874         enumerator.
14875         (struct main_type) <flag_discriminated_union>: New field.
14877 2018-02-26  Tom Tromey  <tom@tromey.com>
14879         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14880         unittests/unpack-selftests.c.
14881         * unittests/unpack-selftests.c: New file.
14882         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14884 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14886         * dwarf2read.c (struct partial_die_info) <read>: New method.
14887         (read_partial_die): Remove the declaration.
14888         (load_partial_dies): Update.
14889         (partial_die_info::partial_die_info):
14890         (read_partial_die): Change it to partial_die_info::read.
14892 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14894         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14895         (fixup_partial_die): Remove declaration.
14896         (scan_partial_symbols): Update.
14897         (partial_die_parent_scope): Likewise.
14898         (partial_die_full_name): Likewise.
14899         (fixup_partial_die): Change it to partial_die_info::fixup.
14901 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14903         * dwarf2read.c (read_partial_die): Update the declaration.
14904         (load_partial_dies): Caller update.
14905         (read_partial_die): Remove one argument abbrev_len.
14907 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14909         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14910         assignment operator.
14911         (load_partial_dies): Use ctor and copy ctor.
14912         (read_partial_die): Update.
14913         (dwarf2_cu::find_partial_die): Use ctor.
14915 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14917         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14918         (find_partial_die_in_comp_unit): Change it to
14919         dwarf2_cu::find_partial_die.
14920         (find_partial_die): Update.
14922 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14924         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14925         is NULL.
14927 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14929         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14931 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14933         * arch/amd64.h: Use common/tdesc.h.
14934         * arch/i386.c: Likewise.
14935         * arch/i386.h: Likewise.
14936         * arch/tic6x.c: Likewise.
14937         * arch/tdesc.h: Move file from here...
14938         * common/tdesc.h: ...to here.
14939         * features/aarch64-core.c: Regenerate.
14940         * features/aarch64-fpu.c: Regenerate.
14941         * features/i386/32bit-avx.c: Regenerate.
14942         * features/i386/32bit-avx512.c: Regenerate.
14943         * features/i386/32bit-core.c: Regenerate.
14944         * features/i386/32bit-linux.c: Regenerate.
14945         * features/i386/32bit-mpx.c: Regenerate.
14946         * features/i386/32bit-pkeys.c: Regenerate.
14947         * features/i386/32bit-sse.c: Regenerate.
14948         * features/i386/64bit-avx.c: Regenerate.
14949         * features/i386/64bit-avx512.c: Regenerate.
14950         * features/i386/64bit-core.c: Regenerate.
14951         * features/i386/64bit-linux.c: Regenerate.
14952         * features/i386/64bit-mpx.c: Regenerate.
14953         * features/i386/64bit-pkeys.c: Regenerate.
14954         * features/i386/64bit-segments.c: Regenerate.
14955         * features/i386/64bit-sse.c: Regenerate.
14956         * features/i386/x32-core.c: Regenerate.
14957         * features/tic6x-c6xp.c: Regenerate.
14958         * features/tic6x-core.c: Regenerate.
14959         * features/tic6x-gp.c: Regenerate.
14960         * target-descriptions.c: Use common/tdesc.h.
14961         * target-descriptions.h: Likewise.
14963 2018-02-24  Tom Tromey  <tom@tromey.com>
14965         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14966         (try_thread_db_load_from_dir, thread_db_load_search): Use
14967         std::string.
14968         (info_auto_load_libthread_db_compare): Return bool.  Change
14969         argument types.
14970         (info_auto_load_libthread_db): Use std::vector, std::string.
14971         Remove cleanups.
14973 2018-02-24  Tom Tromey  <tom@tromey.com>
14975         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14976         std::string.
14977         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14978         std::string*.
14979         * gdbarch.c: Rebuild.
14980         * gdbarch.h: Rebuild.
14981         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14982         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14983         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14984         std::string*.
14986 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14988         * gdbtypes.h (sect_offset): Change type to uint64_t.
14989         (sect_offset_str): New function.
14990         * dwarf2read.c (create_addrmap_from_aranges): Use
14991         sect_offset_str.
14992         (error_check_comp_unit_head): Likewise.
14993         (create_debug_type_hash_table): Likewise.
14994         (read_cutu_die_from_dwo): Likewise.
14995         (init_cutu_and_read_dies): Likewise.
14996         (init_cutu_and_read_dies_no_follow): Likewise.
14997         (process_psymtab_comp_unit_reader): Likewise.
14998         (partial_die_parent_scope): Likewise.
14999         (peek_die_abbrev): Likewise.
15000         (process_queue): Likewise.
15001         (dwarf2_physname): Likewise.
15002         (read_namespace_alias): Likewise.
15003         (read_import_statement): Likewise.
15004         (create_dwo_cu_reader): Likewise.
15005         (create_cus_hash_table): Likewise.
15006         (lookup_dwo_cutu): Likewise.
15007         (inherit_abstract_dies): Likewise.
15008         (read_func_scope): Likewise.
15009         (read_call_site_scope): Likewise.
15010         (dwarf2_add_member_fn): Likewise.
15011         (read_common_block): Likewise.
15012         (read_module_type): Likewise.
15013         (read_typedef): Likewise.
15014         (read_subrange_type): Likewise.
15015         (load_partial_dies): Likewise.
15016         (read_partial_die): Likewise.
15017         (find_partial_die): Likewise.
15018         (read_str_index): Likewise.
15019         (dwarf2_string_attr): Likewise.
15020         (build_error_marker_type): Likewise.
15021         (lookup_die_type): Likewise.
15022         (dump_die_shallow): Likewise.
15023         (follow_die_ref): Likewise.
15024         (dwarf2_fetch_die_loc_sect_off): Likewise.
15025         (dwarf2_fetch_constant_bytes): Likewise.
15026         (follow_die_sig): Likewise.
15027         (get_signatured_type): Likewise.
15028         (get_DW_AT_signature_type): Likewise.
15029         (dwarf2_find_containing_comp_unit): Likewise.
15030         (set_die_type): Likewise.
15032 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
15034         * arch/aarch64.c: Include "common-defs.h".
15035         * arch/amd64.c: Likewise.
15036         * arch/i386.c: Likewise.
15038 2018-02-21  Tom Tromey  <tom@tromey.com>
15040         * value.h: (extract_field_op): Update.
15041         * eval.c (extract_field_op): Return a const char *.
15042         * expression.h (parse_expression_for_completion): Update.
15043         * completer.c (complete_expression): Update.
15044         (add_struct_fields): Make fieldname const.
15045         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
15046         (mark_completion_tag, parse_exp_in_context_1): Update.
15047         (parse_expression_for_completion): Change "name" to
15048         unique_xmalloc_ptr*.
15050 2018-02-21  Tom Tromey  <tom@tromey.com>
15052         * infcall.c (call_function_by_hand_dummy): Use std::vector.
15054 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15056         * avr-tdep.c (avr_read_pc): Change parameter type to
15057         readable_regcache.
15058         * gdbarch.sh (read_pc): Likewise.
15059         * gdbarch.c: Re-generated.
15060         * gdbarch.h: Re-generated.
15061         * hppa-tdep.c (hppa_read_pc): Change parameter type to
15062         readable_regcache.
15063         * ia64-tdep.c (ia64_read_pc): Likewise.
15064         * mips-tdep.c (mips_read_pc): Likewise.
15065         * spu-tdep.c (spu_read_pc): Likewise.
15067 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15069         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
15070         * regcache-dump.c: New file.
15071         * regcache.c: Move register_dump to regcache-dump.c.
15072         (maintenance_print_registers): Likewise.
15073         (maintenance_print_raw_registers): Likewise.
15074         (maintenance_print_cooked_registers): Likewise.
15075         (maintenance_print_register_groups): Likewise.
15076         (maintenance_print_remote_registers): Likewise.
15077         (_initialize_regcache): Likewise.
15078         * regcache.h (register_dump): Moved from regcache.c.
15080 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15082         * regcache.c (regcache::regcache): Update.
15083         (regcache::invalidate): Move it to detached_regcache::invalidate.
15084         (get_thread_arch_aspace_regcache): Update.
15085         (regcache::raw_update): Update.
15086         (regcache::cooked_read): Remove some code.
15087         (regcache::cooked_read_value): Likewise.
15088         (regcache::raw_write): Remove assert on m_readonly_p.
15089         (regcache::raw_supply_integer): Move it to
15090         detached_regcache::raw_supply_integer.
15091         (regcache::raw_supply_zeroed): Likewise.
15092         * regcache.h (detached_regcache) <raw_supply_integer>: New
15093         declaration.
15094         <raw_supply_zeroed, invalidate>: Likewise.
15095         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
15096         <invalidate>: Likewise.
15097         <m_readonly_p>: Removed.
15099 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15101         * infcmd.c (get_return_value): Let stop_regs point to
15102         get_current_regcache.
15103         * regcache.c (regcache::regcache): Remove.
15104         (register_dump_reg_buffer): New class.
15105         (regcache_print): Adjust.
15106         * regcache.h (regcache): Remove constructors.
15108 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15110         * regcache.c (class register_dump): New class.
15111         (register_dump_regcache, register_dump_none): New class.
15112         (register_dump_remote, register_dump_groups): New class.
15113         (regcache_print): Update.
15114         * regcache.h (regcache_dump_what): Move it to regcache.c.
15115         (regcache) <dump>: Remove.
15117 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15119         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
15120          reg_buffer_rw *.
15121         (jit_unwind_reg_set_impl): Call raw_supply.
15122         (jit_frame_sniffer): Use reg_buffer_rw.
15123         * record-full.c (record_full_core_regbuf): Change its type.
15124         (record_full_core_open_1): Use reg_buffer_rw.
15125         (record_full_close): Likewise.
15126         (record_full_core_fetch_registers): Use regcache->raw_supply.
15127         (record_full_core_store_registers): Likewise.
15128         * regcache.c (regcache::get_register_status): Move it to
15129         reg_buffer.
15130         (regcache_raw_set_cached_value): Remove.
15131         (regcache::raw_set_cached_value): Remove.
15132         (regcache::raw_write): Call raw_supply.
15133         (regcache::raw_supply): Move it to reg_buffer_rw.
15134         * regcache.h (regcache_raw_set_cached_value): Remove.
15135         (reg_buffer_rw): New class.
15137 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15139         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
15140         readonly_detached_regcache.
15141         (dummy_frame_prev_register): Use regcache->cooked_read.
15142         * frame.c (frame_save_as_regcache): Change return type.
15143         (frame_pop): Update.
15144         * frame.h (frame_save_as_regcache): Update declaration.
15145         * inferior.h (get_infcall_suspend_state_regcache): Update
15146         declaration.
15147         * infrun.c (infcall_suspend_state) <registers>: use
15148         readonly_detached_regcache.
15149         (save_infcall_suspend_state): Don't use regcache_dup.
15150         (get_infcall_suspend_state_regcache): Change return type.
15151         * linux-fork.c (struct fork_info) <savedregs>: Change to
15152         readonly_detached_regcache.
15153         <pc>: New field.
15154         (fork_save_infrun_state): Don't use regcache_dup.
15155         (info_checkpoints_command): Adjust.
15156         * mi/mi-main.c (register_changed_p): Update declaration.
15157         (mi_cmd_data_list_changed_registers): Use
15158         readonly_detached_regcache.
15159         (register_changed_p): Change parameter type to
15160         readonly_detached_regcache.
15161         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
15162         readonly_detached_regcache.
15163         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
15164         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
15165         New.
15166         (regcache::save): Move it to reg_buffer.
15167         (regcache::restore): Change parameter type.
15168         (regcache_dup): Remove.
15169         * regcache.h (reg_buffer) <save>: New method.
15170         (readonly_detached_regcache): New class.
15171         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
15172         readonly_detached_regcache.
15173         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
15175 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15177         * frame.c (frame_save_as_regcache): Use regcache method save.
15178         (frame_pop): Use regcache method restore.
15179         * infrun.c (restore_infcall_suspend_state): Likewise.
15180         * linux-fork.c (fork_load_infrun_state): Likewise.
15181         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
15182         save.
15183         * regcache.c (regcache_save): Remove.
15184         (regcache::restore): More asserts.
15185         (regcache_cpy): Remove.
15186         * regcache.h (regcache_save): Remove the declaration.
15187         (regcache::restore): Move from private to public.
15188         Remove the friend declaration of regcache_cpy.
15189         (regcache_cpy): Remove declaration.
15191 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15193         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
15194         parameter type to 'readable_regcache *'.
15195         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15196         * arm-tdep.c (arm_neon_quad_read): Likewise.
15197         (arm_pseudo_read): Likewise.
15198         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15199         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15200         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15201         * gdbarch.c: Re-generated.
15202         * gdbarch.h: Re-generated.
15203         * gdbarch.sh (pseudo_register_read): Change parameter type to
15204         'readable_regcache *'.
15205         (pseudo_register_read_value): Likewise.
15206         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
15207         (h8300_pseudo_register_read): Likewise.
15208         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
15209         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15210         (i386_pseudo_register_read_into_value): Likewise.
15211         (i386_pseudo_register_read_value): Likewise.
15212         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
15213         declaration.
15214         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
15215         * m32c-tdep.c (m32c_raw_read): Likewise.
15216         (m32c_read_flg): Likewise.
15217         (m32c_banked_register): Likewise.
15218         (m32c_banked_read): Likewise.
15219         (m32c_sb_read): Likewise.
15220         (m32c_part_read): Likewise.
15221         (m32c_cat_read): Likewise.
15222         (m32c_r3r2r1r0_read): Likewise.
15223         (m32c_pseudo_register_read): Likewise.
15224         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15225         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15226         (mep_pseudo_cr64_read): Likewise.
15227         (mep_pseudo_register_read): Likewise.
15228         * mips-tdep.c (mips_pseudo_register_read): Likewise.
15229         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15230         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15231         * regcache.c (regcache::raw_read): Move it to readable_regcache.
15232         (regcache::cooked_read): Likewise.
15233         (regcache::cooked_read_value): Likewise.
15234         (regcache_cooked_read_signed):
15235         (regcache::cooked_read): Likewise.
15236         * regcache.h (readable_regcache): New class.
15237         (regcache): Inherit readable_regcache.  Move some methods to
15238         readable_regcache.
15239         * rl78-tdep.c (rl78_pseudo_register_read): Change
15240         parameter type to 'readable_regcache *'.
15241         * rs6000-tdep.c (do_regcache_raw_read): Remove.
15242         (e500_pseudo_register_read): Change parameter type to
15243         'readable_regcache *'.
15244         (dfp_pseudo_register_read): Likewise.
15245         (vsx_pseudo_register_read): Likewise.
15246         (efpr_pseudo_register_read): Likewise.
15247         * s390-tdep.c (s390_pseudo_register_read): Likewise.
15248         * sh-tdep.c (sh_pseudo_register_read): Likewise.
15249         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
15250         (sh64_pseudo_register_read): Likewise.
15251         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15252         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15253         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15254         (spu_pseudo_register_read): Likewise.
15255         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15256         (xtensa_pseudo_register_read): Likewise.
15258 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15260         * regcache.c (regcache::regcache): Call reg_buffer ctor.
15261         (regcache::arch): Move it to reg_buffer::arch.
15262         (regcache::register_buffer): Likewise.
15263         (regcache::assert_regnum): Likewise.
15264         (regcache::num_raw_registers): Likewise.
15265         * regcache.h (reg_buffer): New class.
15266         (regcache): Inherit reg_buffer.
15268 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
15270         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15271         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15273 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
15275         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15277 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
15279         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15280         (SFILES): Remove common/*.c files.
15281         (COMMON_OBS): Remove some *.o files built from common/*.c files.
15282         * common/common.host: Add common reference.
15283         * configure.ac: Likewise.
15284         * configure: Regenerate.
15286 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15288         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15289         (block_initialize_namespace): Use new.
15290         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15291         (dwarf2_free_objfile): Use delete.
15292         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15293         (copy_type_recursive): Use new.
15294         * gdb_obstack.h (allocate_on_obstack): New.
15296 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15298         PR gdb/22849
15299         * inferior.c (exit_inferior_1): Reset inf->control.
15301 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15303         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15304         declaration.
15306 2018-02-14  Pedro Alves  <palves@redhat.com>
15308         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15309         frame_cleanup_after_sniffer on exception.
15311 2018-02-14  Tom Tromey  <tom@tromey.com>
15313         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15314         const.
15315         (solib_bfd_open): Make pathname const.
15316         * solib.c (solib_bfd_open): Make pathname const.
15317         * solib-spu.c (spu_bfd_fopen): Make name const.
15318         (spu_bfd_open): Make pathname const.
15319         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15320         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15322 2018-02-14  Tom Tromey  <tom@tromey.com>
15324         * symfile.c (symfile_bfd_open): Update.
15325         * source.h (openp, source_full_path_of, find_and_open_source):
15326         Change argument type to unique_xmalloc_ptr.
15327         * source.c (openp): Take a unique_xmalloc_ptr.
15328         (source_full_path_of, find_and_open_source): Likewise.
15329         (open_source_file, symtab_to_fullname): Update.
15330         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15331         unique_xmalloc_ptr.
15332         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15333         (exec_file_find): Update.
15334         * psymtab.c (psymtab_to_fullname): Update.
15335         * nto-tdep.h (nto_find_and_open_solib): Update.
15336         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15337         unique_xmalloc_ptr.
15338         * exec.c (exec_file_attach): Update.
15339         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15340         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15342 2018-02-14  Tom Tromey  <tom@tromey.com>
15344         * solib.c: Include source.h.
15345         * nto-tdep.c: Include source.h.
15346         * mi/mi-cmd-env.c: Include source.h.
15347         * infcmd.c: Include source.h.
15348         * exec.c: Include source.h.
15349         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15350         (add_path, directory_switch, source_path, init_source_path): Move
15351         declarations...
15352         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15353         (add_path, directory_switch, source_path, init_source_path):
15354         ...here.
15356 2018-02-14  Tom Tromey  <tom@tromey.com>
15358         * solist.h (exec_file_find, solib_find): Return
15359         unique_xmalloc_ptr.
15360         (solib_bfd_fopen): Take a const char *.
15361         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15362         (exec_file_find, solib_find): Likewise.
15363         (solib_bfd_fopen): Do not take ownership of "pathname".
15364         (solib_bfd_open): Use unique_xmalloc_ptr.
15365         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15366         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15367         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15368         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15370 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15372         * ada-lang.c (name_match_type_from_name): Remove reference to
15373         ada_name_for_lookup in function's documentation.
15374         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15376 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15378         * defs.h (enum openp_flags): New enum.
15379         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15380         Move to enum openp_flags.
15381         (openp_flags): New enum flags.
15382         (openp): Change parameter type to openp_flags.
15383         * source.c (openp): Change parameter type to openp_flags.
15384         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15385         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15387 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15389         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15390         per-command.
15392 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15394         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15395         into...
15396         (class dwarf2_queue_guard): ...the destructor of this new class.
15397         (dw2_do_instantiate_symtab): Create instance of the new class
15398         dwarf2_queue_guard, remove cleanup.
15400 2018-02-09  Tom Tromey  <tom@tromey.com>
15402         * source.c (find_source_lines): Don't reference past the end of
15403         the vector.
15405 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15407         * remote.c (remote_btrace_maybe_reopen): Change error message.
15408         * btrace.c (btrace_enable): Likewise.
15409         (parse_xml_btrace): Likewise.
15410         (parse_xml_btrace_conf): Likewise.
15412 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15414         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15415         (linux_enable_pt, linux_enable_bts): Call
15416         diagnose_perf_event_open_fail.
15418 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15420         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15421         Remove parameter and change return type.  Update callers.  Move it.
15422         (linux_enable_bts, linux_enable_pt): Improve error message.
15423         (linux_enable_pt): Remove zero buffer size check.
15424         (linux_enable_btrace): Improve error messages.  Remove NULL return
15425         check.
15427 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15429         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15430         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15431         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15432         (linux_supports_pt, linux_supports_btrace): Remove.
15433         (linux_enable_bts): Call cpu_supports_bts.
15434         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15435         * remote.c (remote_supports_btrace): Remove.
15436         (init_remote_ops): Remove remote_supports_btrace.
15437         * target-delegates.c: Regenerated.
15438         * target.c (target_supports_btrace): Remove.
15439         * target.h (target_ops) <to_supports_btrace>: Remove
15440         (target_supports_btrace): Remove.
15441         * x86-linux-nat.c (x86_linux_create_target): Remove
15442         linux_supports_btrace.
15444 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15446         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15447         btrace failed.
15448         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15449         exception and use message in own exception.
15451 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15453         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15454         (perf_event_pt_event_type): Use gdb_file_up.
15455         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15456         scoped_fd, and scoped_mmap.
15458 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15460         * common/scoped_mmap.h: New.
15461         * unittests/scoped_mmap-selftest.c: New.
15462         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15463         unittests/scoped_mmap-selftest.c.
15465 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15467         * common/scoped_fd.h: New.
15468         * unittests/scoped_fd-selftest.c: New.
15469         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15470         unittests/scoped_fd-selftest.c.
15472 2018-02-09  Tom Tromey  <tom@tromey.com>
15474         * auto-load.c (auto_load_section_scripts): Use
15475         gdb::unique_xmalloc_ptr.
15477 2018-02-09  Tom Tromey  <tom@tromey.com>
15479         * auto-load.c (execute_script_contents): Use std::string.
15481 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15483         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15484         Python function, rather than a new command.
15486 2018-02-08  Tom Tromey  <tom@tromey.com>
15488         * solib.c (solib_find_1): Use std::string.
15489         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15491 2018-02-08  Tom Tromey  <tom@tromey.com>
15493         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15495 2018-02-08  Tom Tromey  <tom@tromey.com>
15497         * source.c (find_source_lines): Use gdb::def_vector.
15499 2018-02-08  Tom Tromey  <tom@tromey.com>
15501         * macrocmd.c (struct temporary_macro_definition): New.
15502         (macro_define_command): Use temporary_macro_definition.  Remove
15503         cleanups.
15504         (free_macro_definition_ptr): Remove.
15506 2018-02-08  Tom Tromey  <tom@tromey.com>
15508         * macroexp.c (maybe_expand): Use std::string.
15510 2018-02-08  Tom Tromey  <tom@tromey.com>
15512         * macroexp.c (struct macro_buffer): Add initializers for some
15513         members.
15514         (init_buffer, init_shared_buffer, free_buffer)
15515         (free_buffer_return_text): Remove.
15516         (macro_buffer): New constructors.
15517         (~macro_buffer): New destructor.
15518         (macro_buffer::set_shared): New method.
15519         (macro_buffer::resize_buffer, macro_buffer::appendc)
15520         (macro_buffer::appendmem): Now methods, not free functions.
15521         (set_token, append_tokens_without_splicing, stringify)
15522         (macro_stringify): Update.
15523         (gather_arguments): Change return type.  Remove argc_p argument,
15524         add args_ptr argument.  Use std::vector.
15525         (substitute_args): Remove argc argument.  Accept std::vector.
15526         (expand): Update.  Use std::vector.
15527         (scan, macro_expand, macro_expand_next): Update.
15529 2018-02-08  Tom Tromey  <tom@tromey.com>
15531         * symtab.c (default_collect_symbol_completion_matches_break_on):
15532         Use unique_xmalloc_ptr.
15533         * macroscope.h: (sal_macro_scope, user_macro_scope)
15534         (default_macro_scope): Return unique_xmalloc_ptr.
15535         * macroscope.c (sal_macro_scope, user_macro_scope)
15536         (default_macro_scope): Return unique_xmalloc_ptr.
15537         * macroexp.h (macro_expand, macro_expand_once): Return
15538         unique_xmalloc_ptr.
15539         * macroexp.c (macro_expand, macro_expand_once): Return
15540         unique_xmalloc_ptr.
15541         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15542         (info_macro_command, info_macros_command): Use
15543         unique_xmalloc_ptr.
15544         * compile/compile-c-support.c (write_macro_definitions): Use
15545         unique_xmalloc_ptr.
15546         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15548 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15550         * value.c (value_static_field): Assign field type instead of
15551         containing type when returning an optimized out value.
15553 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15555         * ft32-tdep.c (ft32_read_pc): Remove.
15556         (ft32_write_pc): Remove.
15557         (ft32_gdbarch_init): Update.
15558         * m32r-tdep.c (m32r_read_pc): Remove.
15559         (m32r_gdbarch_init): Update.
15560         * mep-tdep.c (mep_read_pc): Remove.
15561         (mep_gdbarch_init): Update.
15562         * microblaze-tdep.c (microblaze_write_pc): Remove.
15563         (microblaze_gdbarch_init): Update.
15564         * mn10300-tdep.c (mn10300_read_pc): Remove.
15565         (mn10300_write_pc): Remove.
15566         (mn10300_gdbarch_init): Update.
15567         * moxie-tdep.c (moxie_read_pc): Remove.
15568         (moxie_write_pc): Remove.
15569         (moxie_gdbarch_init): Update.
15571 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15573         * expprint.c (print_subexp_standard): Handle
15574         OP_F77_UNDETERMINED_ARGLIST.
15575         (dump_subexp_body_standard): Likewise.
15577 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15579         * target-descriptions.c (tdesc_element_visitor) Add empty
15580         implementations.
15581         (tdesc_type): Move make_gdb_type from here.
15582         (tdesc_type_builtin): Likewise.
15583         (tdesc_type_vector): Likewise.
15584         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15585         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15586         (make_gdb_type_union): Likewise.
15587         (make_gdb_type_flags): Likewise.
15588         (make_gdb_type_enum): Likewise.
15589         (make_gdb_type): New function.
15590         (tdesc_register_type): Use static make_gdb_type.
15592 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15594         * infcmd.c (default_print_one_register_info): Align natural-format
15595         column values consistently one under another.
15596         (pad_to_column): New function.
15598 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15600         * dwarf2read.c (dwarf2_physname): Move commment.
15602 2018-02-01  Leszek Swirski  <leszeks@google.com>
15604         * varobj.c (varobj_formatted_print_options): Allow recursive
15605         pretty printing if pretty printing is enabled.
15607 2018-02-01  Leszek Swirski  <leszeks@google.com>
15609         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15610         names after a structop as a filename.
15612 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15614         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15615         (arm_record_coproc_data_proc): Likewise.
15617 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15619         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15621 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15623         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15624         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15626 2018-01-31  Pedro Alves  <palves@redhat.com>
15628         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15629         * inflow.c (child_terminal_save_inferior): Wrap reference to
15630         tcgetpgrp in HAVE_TERMIOS_H.
15631         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15632         _WIN32.
15633         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15634         always iterate over all inferiors.
15635         (gdbsim_cntrl_c): Adjust.
15636         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15638 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15640         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15641         index type is objfile-owned if the element type is as well.
15643 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15645         GDB 8.1 released.
15647 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15649         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15650         "features/s390x-linux64.c".
15651         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15652         s390_linux32 and s390x_linux64.
15653         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15654         default tdesc.
15655         * s390-tdep.c: Include "features/s390-linux32.c" and
15656         "features/s390x-linux64.c".
15657         (s390_tdesc_valid): Add check for tdesc_has_registers.
15658         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15659         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15660         tdesc_s390x_linux64.
15661         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15662         tdesc_s390x_linux64 to...
15663         * s390-tdep.h: ...here.
15665 2018-01-30  Pedro Alves  <palves@redhat.com>
15667         PR gdb/13211
15668         * config.in, configure: Regenerate.
15669         * configure.ac: Check for getpgid.
15670         * go32-nat.c (go32_pass_ctrlc): New.
15671         (go32_target): Install it.
15672         * inf-child.c (inf_child_target): Install
15673         child_terminal_save_inferior, child_pass_ctrlc and
15674         child_interrupt.
15675         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15676         (inf_ptrace_target): No longer install it.
15677         * infcmd.c (interrupt_target_1): Adjust.
15678         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15679         (child_interrupt): Declare.
15680         (inferior::terminal_state): New.
15681         * inflow.c (struct terminal_info): Update comments.
15682         (inferior_process_group): Delete.
15683         (terminal_is_ours): Delete.
15684         (gdb_tty_state): New.
15685         (child_terminal_init): Adjust.
15686         (is_gdb_terminal, sharing_input_terminal_1)
15687         (sharing_input_terminal): New functions.
15688         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15689         Set the process's actual process group in the foreground if
15690         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15691         mark terminal as the inferior's if not sharing GDB's terminal.
15692         Don't check attach_flag.
15693         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15694         pass down a target_terminal_state.
15695         (child_terminal_save_inferior): New, factored out from ...
15696         (child_terminal_ours_1): ... this.  Handle
15697         target_terminal_state::is_ours_for_output.
15698         (child_interrupt, child_pass_ctrlc): New.
15699         (inflow_inferior_exit): Clear the inferior's terminal_state.
15700         (copy_terminal_info): Copy the inferior's terminal state.
15701         (_initialize_inflow): Remove reference to terminal_is_ours.
15702         * inflow.h (inferior_process_group): Delete.
15703         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15704         * procfs.c (procfs_target): Don't install procfs_interrupt.
15705         (procfs_interrupt): Delete.
15706         * remote.c (remote_serial_quit_handler): Adjust.
15707         (remote_interrupt): Remove ptid parameter.  Adjust.
15708         * target-delegates.c: Regenerate.
15709         * target.c: Include "terminal.h".
15710         (target_terminal::terminal_state): Rename to ...
15711         (target_terminal::m_terminal_state): ... this.
15712         (target_terminal::init): Adjust.
15713         (target_terminal::inferior): Adjust to per-inferior
15714         terminal_state.
15715         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15716         (target_terminal::ours, target_terminal::ours_for_output): Use
15717         target_terminal_is_ours_kind.
15718         (target_interrupt): Remove ptid parameter.  Adjust.
15719         (default_target_pass_ctrlc): Adjust.
15720         * target.h (target_ops::to_terminal_save_inferior): New field.
15721         (target_ops::to_interrupt): Remove ptid_t parameter.
15722         (target_interrupt): Remove ptid_t parameter.  Update comment.
15723         (target_pass_ctrlc): Update comment.
15724         * target/target.h (target_terminal_state): New scoped enum,
15725         factored out of ...
15726         (target_terminal::terminal_state): ... here.
15727         (target_terminal::inferior): Update comments.
15728         (target_terminal::restore_inferior): New.
15729         (target_terminal::is_inferior, target_terminal::is_ours)
15730         (target_terminal::is_ours_for_output): Adjust.
15731         (target_terminal::scoped_restore_terminal_state): Adjust to
15732         rename, and call restore_inferior() instead of inferior().
15733         (target_terminal::scoped_restore_terminal_state::m_state): Change
15734         type.
15735         (target_terminal::terminal_state): Rename to ...
15736         (target_terminal::m_terminal_state): ... this and change type.
15738 2018-01-30  Pedro Alves  <palves@redhat.com>
15740         * linux-nat.c (wait_for_signal): New function.
15741         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15742         directly.
15743         (async_terminal_is_ours)
15744         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15745         (linux_nat_add_target): Don't override
15746         to_terminal_inferior/to_terminal_ours.
15748 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15750         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15752 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15754         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15755         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15756         dwarf2_per_objfile_free here.
15757         (dwarf2_per_objfile_free): Remove.
15758         (_initialize_dwarf2_read): Don't register
15759         dwarf2_per_objfile_free as a registry cleanup.
15761 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15763         Avoid compilation errors in MinGW native builds
15765         The error is triggered by including python-internal.h, and the
15766         error message is:
15768              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15769                       from build-gnulib/import/math.h:27,
15770                       from d:/usr/Python26/include/pyport.h:235,
15771                       from d:/usr/Python26/include/Python.h:58,
15772                       from python/python-internal.h:94,
15773                       from python/py-arch.c:24:
15774              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15775         using ::hypot;
15776                 ^~~~~
15778         This happens because Python headers define 'hypot' to expand t
15779         '_hypot' in the Windows builds.
15780         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15781         'hypoth'.  This avoids a compilation error.
15783 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15785         * MAINTAINERS (Write After Approval): Fix ordering.
15787 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15789         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15791 2018-01-26  Alan Modra  <amodra@gmail.com>
15793         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15794         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15795         Remove nop.  Make const.  Comment.
15796         (powerpc32_plt_stub_so_2): New.
15797         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15798         Correct count.  Update uses.
15799         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15800         Move common code reading PLT entry word.  Correct
15801         powerpc32_plt_stub PLT address calculation.
15802         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15803         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15804         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15805         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15806         (ppc64_standard_linkage8): Likewise.
15807         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15808         Correct insns description.
15809         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15811 2018-01-24  Pedro Alves  <palves@redhat.com>
15813         GCC PR libstdc++/83906
15814         * gdbtypes.c (operator==(const dynamic_prop &,
15815         const dynamic_prop &)): New.
15816         (operator==(const range_bounds &, const range_bounds &)): New.
15817         (check_types_equal): Use them instead of memcmp.
15818         * gdbtypes.h (operator==(const dynamic_prop &,
15819         const dynamic_prop &)): Declare.
15820         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15821         (operator==(const range_bounds &, const range_bounds &)): Declare.
15822         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15824 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15826         * s390-linux-tdep.c (s390_record_address_mask)
15827         (s390_record_calc_disp_common, s390_record_calc_disp)
15828         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15829         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15830         (s390_process_record): Move to s390-tdep.c.
15831         (s390_linux_init_abi_any): Adjust.
15832         * s390-tdep.c (s390_record_address_mask)
15833         (s390_record_calc_disp_common, s390_record_calc_disp)
15834         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15835         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15836         (s390_process_record): Moved from s390-linux-tdep.c
15837         (s390_gdbarch_init): Adjust.
15839 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15841         * s390-linux-nat.c (s390-tdep.h): New include.
15842         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15843         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15844         (ALLDEPFILES): Add s390-tdep.c.
15845         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15846         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15847         * s390-tdep.h: ...this.  New file.
15848         * s390-linux-tdep.c (s390-tdep.h): New include.
15849         (_initialize_s390_tdep): Rename to...
15850         (_initialize_s390_linux_tdep): ...this and adjust.
15851         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15852         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15853         s390-tdep.h.
15854         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15855         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15856         (s390_is_partial_instruction, s390_software_single_step)
15857         (is_non_branch_ril, s390_displaced_step_copy_insn)
15858         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15859         (s390_prologue_data, s390_addr, s390_store, s390_load)
15860         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15861         (s390_register_call_saved, s390_guess_tracepoint_registers)
15862         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15863         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15864         (s390_pseudo_register_name, s390_pseudo_register_type)
15865         (s390_pseudo_register_read, s390_pseudo_register_write)
15866         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15867         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15868         (s390_addr_bits_remove, s390_address_class_type_flags)
15869         (s390_address_class_type_flags_to_name)
15870         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15871         (s390_function_arg_float, s390_function_arg_vector)
15872         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15873         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15874         (s390_frame_align, s390_register_return_value, s390_return_value)
15875         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15876         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15877         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15878         (s390_trad_frame_prev_register, s390_unwind_cache)
15879         (s390_prologue_frame_unwind_cache)
15880         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15881         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15882         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15883         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15884         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15885         (s390_frame_base_address, s390_local_base_address)
15886         (s390_frame_base, s390_gcc_target_options)
15887         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15888         (s390_validate_reg_range, s390_tdesc_valid)
15889         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15890         * s390-tdep.c: ...this.  New file.
15892 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15894         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15895         (s390_process_record, s390_gdbarch_tdep_alloc)
15896         (s390_linux_init_abi_any): Use/set new hook.
15898 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15900         * s390-linux-tdep.c (osabi.h): New include.
15901         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15902         (s390_linux_init_abi_any): New functions.
15903         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15905 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15907         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15908         tdesc_has_registers check
15910 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15912         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15913         (s390_validate_reg_range): New macro.
15914         (s390_gdbarch_init): Adjust.
15916 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15918         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15919         (s390_gdbarch_tdep_alloc): Adjust.
15920         (s390_gdbarch_init): Adjust.
15922 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15924         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15925         <have_tdb>: Change type to bool.
15926         (s390_gdbarch_tdep_alloc): Adjust.
15927         (s390_gdbarch_init): Adjust.
15929 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15931         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15932         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15933         (s390_gdbarch_tdep_alloc): New function.
15934         (s390_gdbarch_init): Allocate tdep at start and use its fields
15935         instead of separate variables.
15937 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15939         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15940         when looking for cached gdbarch and add comment for remaining.
15942 2018-01-22  Pedro Alves  <palves@redhat.com>
15943             Sergio Durigan Junior  <sergiodj@redhat.com>
15945         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15946         case.
15948 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15950         * MAINTAINERS: Update my company e-mail address.
15952 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15954         * regcache.c (cooked_write_test): New function.
15955         (_initialize_regcache): Register the test.
15957 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15959         * ia64-tdep.c (ia64_pseudo_register_read): Call
15960         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15961         * m32c-tdep.c (m32c_cat_read): Likewise.
15962         (m32c_r3r2r1r0_read): Likewise.
15963         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15964         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15966 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15968         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15969         method raw_read instead of regcache_raw_read.
15970         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15971         * arm-tdep.c (arm_neon_quad_read): Likewise.
15972         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15973         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15974         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15975         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15976         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15977         (i386_pseudo_register_read_into_value): Likewise.
15978         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15979         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15980         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15981         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15982         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15983         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15984         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15985         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15986         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15988 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15990         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15991         * configure.tgt: Remove target mt.
15992         * mt-tdep.c: Remove.
15993         * regcache.c (cooked_read_test): Remove the check for mt.
15995 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15997         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
15998         instead of gdbarch_pseudo_register_read_value.
16000 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
16002         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
16003         language is Ada.
16005 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
16007         * linespec.c (create_sals_line_offset): Remove code that preserved
16008         the symtab_and_line's line number.
16010 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16012         * varobj.c (varobj_create): Don't set valid_block when creating a
16013         floating varobj.
16015 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16017         * varobj.c (varobj_create): Remove out of date comment.
16019 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16021         PR mi/20395
16022         * ada-exp.y (write_var_from_sym): Pass extra parameter when
16023         updating innermost block.
16024         * parse.c (innermost_block_tracker::update): Take extra type
16025         parameter, and check types match before updating innermost block.
16026         (write_dollar_variable): Update innermost block for registers.
16027         * parser-defs.h (enum innermost_block_tracker_type): New enum.
16028         (innermost_block_tracker::innermost_block_tracker): Initialise
16029         m_types member.
16030         (innermost_block_tracker::reset): Take type parameter.
16031         (innermost_block_tracker::update): Take type parameter, and pass
16032         type through as needed.
16033         (innermost_block_tracker::m_types): New member.
16034         * varobj.c (varobj_create): Pass type when reseting innermost
16035         block.
16037 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16039         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
16040         * ada-lang.c (resolve_subexp): Likewise.
16041         * breakpoint.c (set_breakpoint_condition) Likewise.
16042         (watch_command_1) Likewise.
16043         * c-exp.y (variable): Likewise.
16044         * d-exp.y (PrimaryExpression): Likewise.
16045         * f-exp.y (variable): Likewise.
16046         * go-exp.y (variable): Likewise.
16047         * m2-exp.y (variable): Likewise.
16048         * objfiles.c (objfile::~objfile): Likewise.
16049         * p-exp.y (variable): Likewise.
16050         * parse.c (innermost_block): Change type.
16051         * parser-defs.h (class innermost_block_tracker): New.
16052         (innermost_block): Change to innermost_block_tracker.
16053         * printcmd.c (display_command): Switch to innermost_block API.
16054         (do_one_display): Likewise.
16055         * rust-exp.y (do_one_display): Likewise.
16056         * symfile.c (clear_symtab_users): Likewise.
16057         * varobj.c (varobj_create): Switch to innermost_block API, replace
16058         use of innermost_block with block stored on varobj object.
16060 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16062         * expression.h (innermost_block): Remove declaration.
16063         * varobj.c: Add 'parser-defs.h' include.
16065 2018-01-19  Tom Tromey  <tom@tromey.com>
16067         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
16068         symbols in the static and global blocks.
16070 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
16072         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
16073         gdb_ptrace.h, and move including gdb_wait.h ...
16074         * nat/linux-ptrace.h: ... to here.
16076 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
16078         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
16079         inf_ptrace_detach_success.
16080         (inf_ptrace_detach_success): Add inferior parameter, use it
16081         instead of inferior_ptid, pass it to detach_inferior.
16082         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
16083         parameter.
16084         * inferior.c (detach_inferior): Add overload that takes an
16085         inferior object.
16086         * inferior.h (detach_inferior): Likewise.
16087         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
16088         use inferior_ptid, adjust call to inf_ptrace_detach_success.
16089         * linux-thread-db.c (thread_db_detach): Use inf parameter.
16091 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
16093         * target.h (struct target_ops) <to_detach>: Add inferior
16094         parameter.
16095         (target_detach): Likewise.
16096         * target.c (dispose_inferior): Pass inferior down.
16097         (target_detach): Pass inferior down.  Assert that it is equal to
16098         the current inferior.
16099         * aix-thread.c (aix_thread_detach): Pass inferior down.
16100         * corefile.c (core_file_command): Pass current_inferior() down.
16101         * corelow.c (core_detach): Add inferior parameter.
16102         * darwin-nat.c (darwin_detach): Likewise.
16103         * gnu-nat.c (gnu_detach): Likewise.
16104         * inf-ptrace.c (inf_ptrace_detach): Likewise.
16105         * infcmd.c (detach_command): Pass current_inferior() down to
16106         target_detach.
16107         * infrun.c (follow_fork_inferior): Pass parent_inf to
16108         target_detach.
16109         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
16110         target_detach.
16111         * linux-nat.c (linux_nat_detach): Add inferior parameter.
16112         * linux-thread-db.c (thread_db_detach): Likewise.
16113         * nto-procfs.c (procfs_detach): Likewise.
16114         * procfs.c (procfs_detach): Likewise.
16115         * record.c (record_detach): Likewise.
16116         * record.h (struct inferior): Forward-declare.
16117         (record_detach): Add inferior parameter.
16118         * remote-sim.c (gdbsim_detach): Likewise.
16119         * remote.c (remote_detach_1): Likewise.
16120         (remote_detach): Likewise.
16121         (extended_remote_detach): Likewise.
16122         * sol-thread.c (sol_thread_detach): Likewise.
16123         * target-debug.h (target_debug_print_inferior_p): New macro.
16124         * target-delegates.c: Re-generate.
16125         * top.c (kill_or_detach): Pass inferior down to target_detach.
16126         * windows-nat.c (windows_detach): Add inferior parameter.
16128 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
16130         * target.h (struct target_ops) <to_detach>: Remove args
16131         parameter.
16132         (target_detach): Likewise.
16133         * target.c (dispose_inferior): Adjust.
16134         (target_detach): Remove args parameter, adjust.
16135         * aix-thread.c (aix_thread_detach): Adjust.
16136         * corefile.c (core_file_command): Adjust.
16137         * corelow.c (core_detach): Adjust.
16138         * darwin-nat.c (darwin_detach): Adjust.
16139         * gnu-nat.c (gnu_detach): Adjust.
16140         * inf-ptrace.c (inf_ptrace_detach): Adjust.
16141         * infcmd.c (detach_command): Adjust
16142         * infrun.c (follow_fork_inferior): Adjust.
16143         (handle_vfork_child_exec_or_exit): Adjust.
16144         * linux-fork.c (linux_fork_detach): Remove args parameter.
16145         * linux-fork.h (linux_fork_detach): Likewise.
16146         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
16147         * linux-thread-db.c (thread_db_detach): Likewise.
16148         * nto-procfs.c (procfs_detach): Likewise.
16149         * procfs.c (procfs_detach): Likewise.
16150         (do_detach): Remove signo parameter.
16151         * record.c (record_detach): Remove args parameter.
16152         * record.h (record_detach): Likewise.
16153         * remote-sim.c (gdbsim_detach): Likewise.
16154         * remote.c (remote_detach_1): Likewise.
16155         (remote_detach): Likewise.
16156         (extended_remote_detach): Likewise.
16157         * sol-thread.c (sol_thread_detach): Likewise.
16158         * target-delegates.c: Re-generate.
16159         * top.c (struct qt_args) <args>: Remove field.
16160         (kill_or_detach): Don't pass args.
16161         (quit_force): Don't set args.
16162         * windows-nat.c (windows_detach): Remove args parameter.
16164 2018-01-19  Yao Qi  <yao.qi@linaro.org>
16166         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
16167         (arm_linux_init_abi): Install it.
16169 2018-01-19  Yao Qi  <yao.qi@linaro.org>
16171         * osabi.c (gdb_osabi_names): Extend the regexp for
16172         arm-linux-gnueabihf.
16174 2018-01-18  Yao Qi  <yao.qi@linaro.org>
16176         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
16177         m_abbrevs.
16178         (abbrev_table::add_abbrev): Update.
16179         (abbrev_table::lookup_abbrev): Update.
16181 2018-01-18  Yao Qi  <yao.qi@linaro.org>
16183         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
16185 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
16187         * compile/compile.c (compile_to_object): Convert "triplet_rx"
16188         to "std::string".
16190 2018-01-17  Tom Tromey  <tom@tromey.com>
16192         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
16194 2018-01-17  Tom Tromey  <tom@tromey.com>
16196         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
16197         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
16198         (create_array_type_with_stride): Update.
16199         * dwarf2read.c (set_die_type): Update.
16201 2018-01-17  Tom Tromey  <tom@tromey.com>
16203         * dwarf2read.c (delayed_method_info): Remove typedef.
16204         (dwarf2_cu::method_info): Now a std::vector.
16205         (add_to_method_list): Update.
16206         (free_delayed_list): Remove.
16207         (compute_delayed_physnames): Update.
16208         (process_full_comp_unit, process_full_type_unit): Clear the method
16209         list.  Remove cleanups.
16210         (psymtab_include_file_name): Add name_holder parameter.  Use
16211         unique_xmalloc_ptr.
16212         (dwarf_decode_lines): Update.
16214 2018-01-17  Tom Tromey  <tom@tromey.com>
16215             Simon Marchi  <simon.marchi@ericsson.com>
16217         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
16218         (dwarf2_per_objfile::free_cached_comp_units)
16219         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16220         (init_cutu_and_read_dies_no_follow): Update.
16221         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
16222         (dwarf2_cu::~dwarf2_cu): New.
16223         (free_heap_comp_unit, free_stack_comp_unit): Remove.
16224         (age_cached_comp_units, free_one_cached_comp_unit): Update.
16226 2018-01-17  Tom Tromey  <tom@tromey.com>
16227             Simon Marchi  <simon.marchi@ericsson.com>
16229         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
16230         (struct die_reader_specs) <abbrev_table>: New member.
16231         (struct abbrev_table): Add constructor.
16232         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
16233         <abbrev_obstack>: Now an auto_obstack.
16234         (abbrev_table_up): New typedef.
16235         (init_cu_die_reader): Add abbrev_table parameter.
16236         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
16237         Add result_dwo_abbrev_table.
16238         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16239         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
16240         Update.
16241         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
16242         parameter.
16243         (skip_children): Update.
16244         (abbrev_table::alloc_abbrev): Rename from
16245         abbrev_table_alloc_abbrev.
16246         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
16247         (abbrev_table::lookup_abbrev): Rename from
16248         abbrev_table_lookup_abbrev.
16249         (abbrev_table_read_table): Return abbrev_table_up.
16250         (abbrev_table_free, abbrev_table_free_cleanup)
16251         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
16252         (load_partial_dies): Update.
16254 2018-01-17  Tom Tromey  <tom@tromey.com>
16256         * dwarf2read.c (dwarf2_compute_name): Update comment.
16257         (read_func_scope, read_variable): Update.
16258         (new_symbol): Remove.
16259         (new_symbol_full): Rename to new_symbol.
16261 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
16263         PR gdb/16577
16264         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16265         a warning instead of throwing an error, set section size to 0 and return
16266         NULL.
16267         * gdb_bfd.h (gdb_bfd_map_section): Update description.
16269 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16271         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16272         std::string.
16273         (linux_ptrace_attach_fail_reason_string): Likewise.
16274         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16275         Likewise.
16276         (linux_ptrace_attach_fail_reason_string): Likewise.
16277         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16279 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16281         * linux-nat.c (linux_nat_attach): Remove xstrdup.
16283 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
16285         PR gdb/21559
16286         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16287         checking for fs_base/gs_base fields in struct user_regs_struct.
16288         * configure: Regenerate.
16290 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16292         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16293         function.
16294         (aarch64_linux_init_abi): Install it to gdbarch hook
16295         gcc_target_options.
16297 2018-01-15  Pedro Alves  <palves@redhat.com>
16299         * common/signals-state-save-restore.c
16300         (save_original_signals_state): Fix typos.
16302 2017-01-12  Tom Tromey  <tom@tromey.com>
16303             Sergio Durigan Junior  <sergiodj@redhat.com>
16305         * Makefile.in (install-only): Install gdb-add-index.
16307 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16309         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16311 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16313         * infrun.c (keep_going_pass_signal): Clear step-over info when
16314         insert_breakpoints fails.
16316 2018-01-11  Pedro Alves  <palves@redhat.com>
16318         PR gdb/22583
16319         * infrun.c (resume): Rename to ...
16320         (resume_1): ... this.
16321         (resume): Reimplement as wrapper around resume_1.
16323 2018-01-11  Pedro Alves  <palves@redhat.com>
16325         PR remote/22597
16326         * remote.c (remote_parse_stop_reply): Default to the last-set
16327         general thread instead of to 'magic_null_ptid'.
16329 2018-01-10  Pedro Alves  <palves@redhat.com>
16331         * language.h (language_get_symbol_name_matcher): Rename ...
16332         (get_symbol_name_matcher): ... this.
16333         * language.c (language_get_symbol_name_matcher): Ditto.
16334         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16335         callers adjusted.
16337 2018-01-10  Pedro Alves  <palves@redhat.com>
16339         PR gdb/22670
16340         * dwarf2read.c
16341         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16342         Adjust to use language_get_symbol_name_matcher instead of
16343         language_defn::la_get_symbol_name_matcher.
16344         * language.c (language_get_symbol_name_matcher): If in Ada mode
16345         and the lookup name is a verbatim match, return Ada's matcher.
16346         * language.h (language_get_symbol_name_matcher): Adjust comment.
16347         (ada_lookup_name_info::verbatim_p):: New method.
16349 2018-01-10  Pedro Alves  <palves@redhat.com>
16351         PR gdb/22670
16352         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16353         minsym's language is language_auto or language_cplus, pass down
16354         language_ada instead.
16355         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16357 2018-01-10  Pedro Alves  <palves@redhat.com>
16359         PR gdb/22670
16360         * minsyms.c (linkage_name_str): New function.
16361         (iterate_over_minimal_symbols): Use it.
16363 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16365         * NEWS: Document that 'info proc' now works on FreeBSD.
16367 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16369         * configure.ac: Check for kinfo_getfile in libutil.
16370         * configure: Regenerate.
16371         * config.in: Regenerate.
16372         * fbsd-nat.c: Include "fbsd-tdep.h".
16373         (fbsd_fetch_cmdline): New.
16374         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16375         rather than calling error.
16376         (fbsd_info_proc): New.
16377         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16378         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16379         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16381 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16383         * fbsd-nat.c (struct free_deleter): Remove.
16384         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16386 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16388         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16389         NULL for an empty pathname.
16391 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16393         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16394         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16395         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16396         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16397         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16398         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16399         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16400         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16401         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16402         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16403         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16404         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16405         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16406         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16407         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16409 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16411         * gnu-nat.c: Include <elf.h> and <link.h>.
16412         (gnu_xfer_auxv): New function.
16413         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16414         TARGET_OBJECT_AUXV.
16416 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16417             Simon Marchi  <simon.marchi@ericsson.com>
16419         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16420         common/selftest.c.
16421         (COMMON_OBS): Remove selftest.o.
16422         * configure.ac: Append selftest-arch.c and common/selftest.c to
16423         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16424         * configure: Re-generated.
16425         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16426         GDB_SELF_TEST.
16427         (maintenance_info_selftests): Likewise.
16429 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16431         * ada-valprint.c (val_print_packed_array_elements): Use
16432         proper number of elements when printing an array indexed
16433         by an enumeration type.
16435 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16437         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16438         (dw2_get_file_names_reader): Adjust.
16439         (lookup_dwo_signatured_type): Adjust.
16440         (lookup_dwp_signatured_type): Adjust.
16441         (lookup_signatured_type): Adjust.
16442         (create_type_unit_group): Adjust.
16443         (get_type_unit_group): Adjust.
16444         (process_psymtab_comp_unit_reader): Adjust.
16445         (build_type_psymtabs_reader): Adjust.
16446         (scan_partial_symbols): Adjust.
16447         (add_partial_symbol): Adjust.
16448         (add_partial_subprogram): Adjust.
16449         (peek_die_abbrev): Adjust.
16450         (fixup_go_packaging): Adjust.
16451         (process_imported_unit_die): Adjust.
16452         (dwarf2_compute_name): Adjust.
16453         (dwarf2_physname): Adjust.
16454         (read_import_statement): Adjust.
16455         (handle_DW_AT_stmt_list): Adjust.
16456         (read_file_scope): Adjust.
16457         (read_func_scope): Adjust.
16458         (read_lexical_block_scope): Adjust.
16459         (read_call_site_scope): Adjust.
16460         (read_variable): Adjust.
16461         (dwarf2_rnglists_process): Adjust.
16462         (dwarf2_ranges_process): Adjust.
16463         (dwarf2_ranges_read): Adjust.
16464         (dwarf2_get_pc_bounds): Adjust.
16465         (dwarf2_record_block_ranges): Adjust.
16466         (dwarf2_add_field): Adjust.
16467         (dwarf2_add_member_fn): Adjust.
16468         (read_structure_type): Adjust.
16469         (process_structure_scope): Adjust.
16470         (read_enumeration_type): Adjust.
16471         (read_array_type): Adjust.
16472         (mark_common_block_symbol_computed): Adjust.
16473         (read_common_block): Adjust.
16474         (read_namespace_type): Adjust.
16475         (read_namespace): Adjust.
16476         (read_module_type): Adjust.
16477         (read_tag_pointer_type): Adjust.
16478         (read_tag_ptr_to_member_type): Adjust.
16479         (read_tag_string_type): Adjust.
16480         (read_subroutine_type): Adjust.
16481         (read_typedef): Adjust.
16482         (read_base_type): Adjust.
16483         (attr_to_dynamic_prop): Adjust.
16484         (read_subrange_type): Adjust.
16485         (read_unspecified_type): Adjust.
16486         (dwarf2_read_abbrevs): Adjust.
16487         (load_partial_dies): Adjust.
16488         (read_partial_die): Adjust.
16489         (find_partial_die): Adjust.
16490         (guess_partial_die_structure_name): Adjust.
16491         (fixup_partial_die): Adjust.
16492         (read_attribute_value): Adjust.
16493         (read_addr_index): Adjust.
16494         (read_addr_index_from_leb128): Adjust.
16495         (read_str_index): Adjust.
16496         (dwarf2_string_attr): Adjust.
16497         (get_debug_line_section): Adjust.
16498         (dwarf_decode_line_header): Adjust.
16499         (lnp_state_machine::check_line_address): Adjust.
16500         (dwarf_decode_lines_1): Adjust.
16501         (dwarf_decode_lines): Adjust.
16502         (dwarf2_start_symtab): Adjust.
16503         (var_decode_location): Adjust.
16504         (new_symbol_full): Adjust.
16505         (dwarf2_const_value_data): Adjust.
16506         (dwarf2_const_value_attr): Adjust.
16507         (dwarf2_const_value): Adjust.
16508         (die_type): Adjust.
16509         (die_containing_type): Adjust.
16510         (build_error_marker_type): Adjust.
16511         (lookup_die_type): Adjust.
16512         (guess_full_die_structure_name): Adjust.
16513         (anonymous_struct_prefix): Adjust.
16514         (determine_prefix): Adjust.
16515         (dwarf2_name): Adjust.
16516         (follow_die_ref_or_sig): Adjust.
16517         (follow_die_offset): Adjust.
16518         (follow_die_ref): Adjust.
16519         (follow_die_sig_1): Adjust.
16520         (follow_die_sig): Adjust.
16521         (get_signatured_type): Adjust.
16522         (get_DW_AT_signature_type): Adjust.
16523         (decode_locdesc): Adjust.
16524         (dwarf_decode_macros): Adjust.
16525         (cu_debug_loc_section): Adjust.
16526         (fill_in_loclist_baton): Adjust.
16527         (dwarf2_symbol_mark_computed): Adjust.
16528         (init_one_comp_unit): Don't assign
16529         dwarf2_cu::dwarf2_per_objfile.
16530         (set_die_type): Adjust.
16532 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16534         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16535         <dwarf2_per_objfile>: New field.
16536         (dwarf2_per_objfile): Remove global.
16537         (get_dwarf2_per_objfile): New function.
16538         (set_dwarf2_per_objfile): New function.
16539         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16540         dwarf2_per_objfile.
16541         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16542         (read_abbrev_offset): Likewise.
16543         (read_indirect_string): Likewise.
16544         (read_indirect_line_string): Likewise.
16545         (read_indirect_string_at_offset): Likewise.
16546         (read_indirect_string_from_dwz): Likewise.
16547         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16548         dwarf2_per_objfile.
16549         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16550         (create_all_comp_units): Change objfile parameter to
16551         dwarf2_per_objfile.
16552         (create_all_type_units): Likewise.
16553         (process_queue): Add dwarf2_per_objfile parameter.
16554         (read_and_check_comp_unit_head): Likewise.
16555         (lookup_dwo_unit_in_dwp): Likewise.
16556         (get_dwp_file): Likewise.
16557         (process_cu_includes): Likewise.
16558         (struct free_dwo_file_cleanup_data): New struct.
16559         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16560         set_dwarf2_per_objfile.
16561         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16562         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16563         context, adjust calls.
16564         (dw2_instantiate_symtab): Likewise.
16565         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16566         (dw2_get_cu): Likewise.
16567         (create_cu_from_index_list): Change objfile parameter to
16568         dwarf2_per_objfile.
16569         (create_cus_from_index_list): Get dwarf2_per_objfile from
16570         context, adjust calls.
16571         (create_cus_from_index): Likewise.
16572         (create_signatured_type_table_from_index): Change objfile
16573         parameter to dwarf2_per_objfile.
16574         (create_signatured_type_table_from_debug_names): Change objfile
16575         parameter to dwarf2_per_objfile.
16576         (create_addrmap_from_index): Likewise.
16577         (create_addrmap_from_aranges): Likewise.
16578         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16579         (dw2_setup): Remove.
16580         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16581         context.
16582         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16583         get_dwarf2_per_objfile.
16584         (dw2_forget_cached_source_info): Likewise.
16585         (dw2_map_symtabs_matching_filename): Likewise.
16586         (struct dw2_symtab_iterator) <index>: Remove.
16587         <dwarf2_per_objfile>: New field.
16588         (dw2_symtab_iter_init): Replace index parameter with
16589         dwarf2_per_objfile.
16590         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16591         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16592         (dw2_print_stats): Likewise.
16593         (dw2_dump): Likewise.
16594         (dw2_expand_symtabs_for_function): Likewise.
16595         (dw2_expand_all_symtabs): Likewise.
16596         (dw2_expand_symtabs_with_fullname): Likewise.
16597         (dw2_expand_marked_cus): Replace index and objfile parameters
16598         with dwarf2_per_objfile.
16599         (dw_expand_symtabs_matching_file_matcher): Add
16600         dwarf2_per_objfile parameter and adjust calls.
16601         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16602         adjust calls.
16603         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16604         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16605         adjust calls.
16606         (create_cus_from_debug_names_list): Replace objfile parameter
16607         with dwarf2_per_objfile and adjust calls.
16608         (create_cus_from_debug_names): Likewise.
16609         (dwarf2_read_debug_names): Likewise.
16610         (mapped_debug_names::namei_to_name): Adjust call.
16611         (dw2_debug_names_iterator::next): Likewise.
16612         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16613         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16614         (dw2_debug_names_dump): Likewise.
16615         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16616         (dw2_debug_names_expand_symtabs_matching): Likewise.
16617         (dwarf2_initialize_objfile): Likewise.
16618         (dwarf2_build_psymtabs): Likewise.
16619         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16620         this_cu.
16621         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16622         (read_and_check_comp_unit_head): Likewise.
16623         (read_abbrev_offset): Likewise.
16624         (create_debug_type_hash_table): Likewise.
16625         (create_debug_types_hash_table): Likewise.
16626         (create_all_type_units): Replace objfile parameter with
16627         dwarf2_per_objfile.
16628         (add_type_unit): Add dwarf2_per_objfile parameter.
16629         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16630         with dwarf2_per_objfile.
16631         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16632         (lookup_dwp_signatured_type): Likewise.
16633         (lookup_signatured_type): Likewise.
16634         (read_cutu_die_from_dwo): Likewise.
16635         (init_tu_and_read_dwo_dies): Likewise.
16636         (init_cutu_and_read_dies): Likewise.
16637         (init_cutu_and_read_dies_no_follow): Likewise.
16638         (allocate_type_unit_groups_table): Add objfile parameter.
16639         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16640         (get_type_unit_group): Likewise.
16641         (process_psymtab_comp_unit): Update call.
16642         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16643         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16644         (print_tu_stats): Likewise.
16645         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16646         in void* parameter.
16647         (build_type_psymtabs): Change objfile parameter to
16648         dwarf2_per_objfile.
16649         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16650         passed in void* parameter.
16651         (process_skeletonless_type_units): Change objfile parameter to
16652         dwarf2_per_objfile.
16653         (set_partial_user): Likewise.
16654         (dwarf2_build_psymtabs_hard): Likewise.
16655         (read_comp_units_from_section): Likewise.
16656         (create_all_comp_units): Likewise.
16657         (scan_partial_symbols): Update calls.
16658         (add_partial_symbol): Likewise.
16659         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16660         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16661         (process_queue): Add dwarf2_per_objfile parameter.
16662         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16663         (compute_compunit_symtab_includes): Likewise.
16664         (process_cu_includes): Add dwarf2_per_objfile parameter.
16665         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16666         (process_full_type_unit): Likewise.
16667         (process_imported_unit_die): Update call.
16668         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16669         (read_file_scope): Likewise.
16670         (allocate_dwo_file_hash_table): Add objfile parameter.
16671         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16672         (create_cus_hash_table): Likewise.
16673         (create_dwp_hash_table): Likewise.
16674         (create_dwo_unit_in_dwp_v1): Likewise.
16675         (create_dwp_v2_section): Likewise.
16676         (create_dwo_unit_in_dwp_v2): Likewise.
16677         (lookup_dwo_unit_in_dwp): Likewise.
16678         (try_open_dwop_file): Likewise.
16679         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16680         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16681         cleanup to include a reference to dwarf2_per_objfile.
16682         (open_dwp_file): Add dwarf2_per_objfile parameter.
16683         (open_and_init_dwp_file): Likewise.
16684         (get_dwp_file): Likewise.
16685         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16686         (queue_and_load_all_dwo_tus): Update call.
16687         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16688         data.
16689         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16690         (dwarf2_ranges_process): Likewise.
16691         (dwarf2_get_pc_bounds): Likewise.
16692         (mark_common_block_symbol_computed): Likewise.
16693         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16694         (dwarf2_read_abbrevs): Update call.
16695         (read_partial_die): Use dwarf2_per_objfile from cu.
16696         (find_partial_die): Likewise.
16697         (fixup_partial_die): Likewise.
16698         (read_attribute_value): Likewise.
16699         (read_indirect_string_at_offset_from): Add objfile parameter.
16700         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16701         parameter.
16702         (read_indirect_string_from_dwz): Add objfile parameter.
16703         (read_indirect_string): Add objfile parameter.
16704         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16705         (read_addr_index): Use dwarf2_per_objfile from cu.
16706         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16707         call dw2_setup.
16708         (read_str_index): Use dwarf2_per_objfile from cu.
16709         (get_debug_line_section): Likewise.
16710         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16711         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16712         (new_symbol_full): Use dwarf2_per_objfile from cu.
16713         (build_error_marker_type): Likewise.
16714         (lookup_die_type): Likewise.
16715         (determine_prefix): Likewise.
16716         (follow_die_offset): Likewise.
16717         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16718         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16719         (dwarf2_fetch_die_type_sect_off): Likewise.
16720         (dwarf2_get_die_type): Likewise.
16721         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16722         (get_signatured_type): Likewise.
16723         (get_DW_AT_signature_type): Likewise.
16724         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16725         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16726         (cu_debug_loc_section): Likewise.
16727         (fill_in_loclist_baton): Likewise.
16728         (dwarf2_symbol_mark_computed): Likewise.
16729         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16730         dwarf2_per_objfile.
16731         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16732         parameter.
16733         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16734         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16735         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16736         (set_die_type): Use dwarf2_free_objfile from cu.
16737         (get_die_type_at_offset): Likewise.
16738         (dwarf2_per_objfile_free): Don't assign global variable.
16739         (debug_names) <constructor>: Add dwarf2_per_objfile
16740         parameter, update m_debugstrlookup construction.
16741         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16742         parameter.
16743         <m_dwarf2_per_objfile>: New field.
16744         <lookup>: Use m_dwarf2_per_objfile.
16745         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16746         (psyms_seen_size): Likewise.
16747         (write_gdbindex): Replace objfile parameter with
16748         dwarf2_per_objfile.
16749         (write_debug_names): Likewise.
16750         (write_psymtabs_to_index): Likewise.
16751         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16752         calls.
16754 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16756         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16757         <dwarf2_per_objfile>: New field.
16758         (struct dwarf2_per_cu_data) <objfile>: Remove.
16759         <dwarf2_per_objfile>: New field.
16760         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16761         of objfile.
16762         (create_signatured_type_table_from_index): Likewise.
16763         (create_debug_type_hash_table): Likewise.
16764         (fill_in_sig_entry_from_dwo_entry): Likewise.
16765         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16766         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16767         objfile.
16768         (create_partial_symtab): Access objfile through
16769         dwarf2_per_objfile.
16770         (process_psymtab_comp_unit_reader): Likewise.
16771         (read_comp_units_from_section): Likewise.
16772         (scan_partial_symbols): Likewise.
16773         (add_partial_symbol): Likewise.
16774         (add_partial_subprogram): Likewise.
16775         (peek_die_abbrev): Likewise.
16776         (fixup_go_packaging): Likewise.
16777         (process_full_comp_unit): Likewise.
16778         (process_full_type_unit): Likewise.
16779         (process_imported_unit_die): Likewise.
16780         (dwarf2_compute_name): Likewise.
16781         (dwarf2_physname): Likewise.
16782         (read_import_statement): Likewise.
16783         (create_cus_hash_table): Assign dwarf2_physname instead of
16784         objfile.
16785         (read_func_scope): Access objfile through dwarf2_per_objfile.
16786         (read_lexical_block_scope): Likewise.
16787         (read_call_site_scope): Likewise.
16788         (read_variable): Likewise.
16789         (dwarf2_rnglists_process): Likewise.
16790         (dwarf2_ranges_process): Likewise.
16791         (dwarf2_ranges_read): Likewise.
16792         (dwarf2_record_block_ranges): Likewise.
16793         (dwarf2_add_field): Likewise.
16794         (dwarf2_add_member_fn): Likewise.
16795         (read_structure_type): Likewise.
16796         (process_structure_scope): Likewise.
16797         (read_enumeration_type): Likewise.
16798         (read_array_type): Likewise.
16799         (read_common_block): Likewise.
16800         (read_namespace_type): Likewise.
16801         (read_namespace): Likewise.
16802         (read_module_type): Likewise.
16803         (read_tag_pointer_type): Likewise.
16804         (read_tag_ptr_to_member_type): Likewise.
16805         (read_tag_string_type): Likewise.
16806         (read_subroutine_type): Likewise.
16807         (read_typedef): Likewise.
16808         (read_base_type): Likewise.
16809         (attr_to_dynamic_prop): Likewise.
16810         (read_subrange_type): Likewise.
16811         (read_unspecified_type): Likewise.
16812         (load_partial_dies): Likewise.
16813         (read_partial_die): Likewise.
16814         (find_partial_die): Likewise.
16815         (guess_partial_die_structure_name): Likewise.
16816         (fixup_partial_die): Likewise.
16817         (read_attribute_value): Likewise.
16818         (read_addr_index_from_leb128): Likewise.
16819         (dwarf2_read_addr_index): Likewise.
16820         (dwarf2_string_attr): Likewise.
16821         (lnp_state_machine::check_line_address): Likewise.
16822         (dwarf_decode_lines_1): Likewise.
16823         (dwarf_decode_lines): Likewise.
16824         (dwarf2_start_symtab): Likewise.
16825         (var_decode_location): Likewise.
16826         (new_symbol_full): Likewise.
16827         (dwarf2_const_value_data): Likewise.
16828         (dwarf2_const_value_attr): Likewise.
16829         (dwarf2_const_value): Likewise.
16830         (die_type): Likewise.
16831         (die_containing_type): Likewise.
16832         (lookup_die_type): Likewise.
16833         (guess_full_die_structure_name): Likewise.
16834         (anonymous_struct_prefix): Likewise.
16835         (dwarf2_name): Likewise.
16836         (follow_die_ref_or_sig): Likewise.
16837         (follow_die_offset): Likewise.
16838         (follow_die_ref): Likewise.
16839         (dwarf2_fetch_die_loc_sect_off): Likewise.
16840         (dwarf2_fetch_constant_bytes): Likewise.
16841         (dwarf2_fetch_die_type_sect_off): Likewise.
16842         (dwarf2_get_die_type): Likewise.
16843         (follow_die_sig): Likewise.
16844         (decode_locdesc): Likewise.
16845         (dwarf2_per_cu_objfile): Likewise.
16846         (dwarf2_per_cu_text_offset): Likewise.
16847         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16848         objfile.
16849         (set_die_type): Access objfile through
16850         dwarf2_per_objfile.
16852 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16854         * valprint.c (converted_character_d): Remove typedef.
16855         (DEF_VEC_O (converted_character_d)): Remove.
16856         (count_next_character): Use std::vector.
16857         (print_converted_chars_to_obstack): Likewise.
16858         (generic_printstr): Likewise.
16860 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16862         * xml-support.h (struct gdb_xml_value): Add constructor.
16863         <value>: Change type to unique_xmalloc_ptr.
16864         (gdb_xml_value_s): Remove typedef.
16865         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16866         (gdb_xml_element_start_handler): Change parameter type to
16867         std::vector.
16868         (xml_find_attribute): Likewise.
16869         * xml-support.c (xml_find_attribute): Change parameter type to
16870         std::vector and adjust.
16871         (gdb_xml_values_cleanup): Remove.
16872         (gdb_xml_parser::start_element): Adjust to std::vector.
16873         (xinclude_start_include): Change paraeter type to std::vector
16874         and adjust.
16875         * btrace.c (check_xml_btrace_version): Likewise.
16876         (parse_xml_btrace_block): Likewise.
16877         (parse_xml_btrace_pt_config_cpu): Likewise.
16878         (parse_xml_btrace_pt): Likewise.
16879         (parse_xml_btrace_conf_bts): Likewise.
16880         (parse_xml_btrace_conf_pt): Likewise.
16881         * memory-map.c (memory_map_start_memory): Likewise.
16882         (memory_map_start_property): Likewise.
16883         * osdata.c (osdata_start_osdata): Likewise.
16884         (osdata_start_item): Likewise.
16885         (osdata_start_column): Likewise.
16886         * remote.c (start_thread): Likewise.
16887         * solib-aix.c (library_list_start_library): Likewise.
16888         (library_list_start_list): Likewise.
16889         * solib-svr4.c (library_list_start_library): Likewise.
16890         (svr4_library_list_start_list): Likewise.
16891         * solib-target.c (library_list_start_segment): Likewise.
16892         (library_list_start_section): Likewise.
16893         (library_list_start_library): Likewise.
16894         (library_list_start_list): Likewise.
16895         * tracepoint.c (traceframe_info_start_memory): Likewise.
16896         (traceframe_info_start_tvar): Likewise.
16897         * xml-syscall.c (syscall_start_syscall): Likewise.
16898         * xml-tdesc.c (tdesc_start_target): Likewise.
16899         (tdesc_start_feature): Likewise.
16900         (tdesc_start_reg): Likewise.
16901         (tdesc_start_union): Likewise.
16902         (tdesc_start_struct): Likewise.
16903         (tdesc_start_flags): Likewise.
16904         (tdesc_start_enum): Likewise.
16905         (tdesc_start_field): Likewise.
16906         (tdesc_start_enum_value): Likewise.
16907         (tdesc_start_vector): Likewise.
16909 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16911         * extension.h (struct xmethod_worker) <clone>: Remove.
16912         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16913         Remove.
16914         (python_xmethod_worker::clone): Remove.
16915         * valops.c (find_overload_match): Use std::move instead of
16916         clone.
16918 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16920         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16921         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16922         <free_xmethod_worker_data>: Remove.
16923         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16924         <get_xmethod_arg_types>: Remove.
16925         <get_xmethod_result_type>: Remove.
16926         <invoke_xmethod>: Remove.
16927         * extension.c (new_xmethod_worker): Remove.
16928         (clone_xmethod_worker): Remove.
16929         (get_matching_xmethod_workers): Return void, pass std::vector by
16930         pointer.
16931         (get_xmethod_arg_types): Rename to...
16932         (xmethod_worker::get_arg_types): ... this, and adjust.
16933         (get_xmethod_result_type): Rename to...
16934         (xmethod_worker::get_result_type): ... this, and adjust.
16935         (invoke_xmethod): Remove.
16936         (free_xmethod_worker): Remove.
16937         (free_xmethod_worker_vec): Remove.
16938         * extension.h (enum ext_lang_rc): Move here from
16939         extension-priv.h.
16940         (struct xmethod_worker): Add constructor and destructor.
16941         <data>: Remove.
16942         <value>: Remove.
16943         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16944         virtual pure methods.
16945         <get_arg_types, get_result_type>: New methods.
16946         (xmethod_worker_ptr): Remove typedef.
16947         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16948         (xmethod_worker_vec): Remove typedef.
16949         (xmethod_worker_up): New typedef.
16950         (invoke_xmethod): Remove.
16951         (clone_xmethod_worker): Remove.
16952         (free_xmethod_worker): Remove.
16953         (free_xmethod_worker_vec): Remove.
16954         (get_xmethod_arg_types): Remove.
16955         (get_xmethod_result_type): Remove.
16956         * valops.c (find_method_list): Use std::vector, don't use
16957         intermediate vector.
16958         (value_find_oload_method_list): Use std::vector.
16959         (find_overload_match): Use std::vector.
16960         (find_oload_champ): Use std::vector.
16961         * value.c (value_free): Use operator delete.
16962         (value_of_xmethod): Rename to...
16963         (value_from_xmethod): ... this.  Don't assign
16964         xmethod_worker::value, take rvalue-reference.
16965         (result_type_of_xmethod): Adjust.
16966         (call_xmethod): Adjust.
16967         * value.h: Include extension.h.
16968         (struct xmethod_worker): Don't forward-declare.
16969         (value_of_xmethod): Rename to...
16970         (value_from_xmethod): ... this, take rvalue-reference.
16971         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16972         (struct python_xmethod_worker): ... this, add constructor and
16973         destructor.
16974         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16975         (gdbpy_free_xmethod_worker_data): Rename to...
16976         (python_xmethod_worker::~python_xmethod_worker): ... this and
16977         adjust.
16978         (gdbpy_clone_xmethod_worker_data): Rename to...
16979         (python_xmethod_worker::clone): ... this and adjust.
16980         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16981         temporary vector.
16982         (gdbpy_get_xmethod_arg_types): Rename to...
16983         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16984         (gdbpy_get_xmethod_result_type): Rename to...
16985         (python_xmethod_worker::do_get_result_type): ... this and
16986         adjust.
16987         (gdbpy_invoke_xmethod): Rename to...
16988         (python_xmethod_worker::invoke): ... this and adjust.
16989         (new_python_xmethod_worker): Rename to...
16990         (python_xmethod_worker::python_xmethod_worker): ... this and
16991         adjust.
16992         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16993         Remove.
16994         (gdbpy_free_xmethod_worker_data): Remove.
16995         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16996         (gdbpy_get_xmethod_arg_types): Remove.
16997         (gdbpy_get_xmethod_result_type): Remove.
16998         (gdbpy_invoke_xmethod): Remove.
16999         * python/python.c (python_extension_ops): Remove obsolete
17000         callbacks.
17002 2018-01-05  Pedro Alves  <palves@redhat.com>
17004         PR gdb/18653
17005         * common/signals-state-save-restore.c
17006         (save_original_signals_state): New parameter 'quiet'.  Warn if we
17007         find a custom handler preinstalled, instead of internal erroring.
17008         But only warn if !quiet.
17009         * common/signals-state-save-restore.h
17010         (save_original_signals_state): New parameter 'quiet'.
17011         * main.c (captured_main_1): Move save_original_signals_state call
17012         after option handling, and pass QUIET.
17014 2018-01-05  Pedro Alves  <palves@redhat.com>
17016         * spu-tdep.c (spu_catch_start): Pass
17017         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
17019 2018-01-05  Pedro Alves  <palves@redhat.com>
17021         PR gdb/22670
17022         * ada-lang.c (literal_symbol_name_matcher): New function.
17023         (ada_get_symbol_name_matcher): Use it for
17024         symbol_name_match_type::SEARCH_NAME.
17025         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
17026         it down instead of assuming symbol_name_match_type::FULL.
17027         * block.h (block_lookup_symbol): New parameter 'match_type'.
17028         * c-valprint.c (print_unpacked_pointer): Use
17029         lookup_symbol_search_name instead of lookup_symbol.
17030         * compile/compile-object-load.c (get_out_value_type): Pass down
17031         symbol_name_match_type::SEARCH_NAME.
17032         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
17033         symbol_name_match_type::FULL.
17034         * cp-support.c (cp_get_symbol_name_matcher): Handle
17035         symbol_name_match_type::SEARCH_NAME.
17036         * infrun.c (insert_exception_resume_breakpoint): Use
17037         lookup_symbol_search_name.
17038         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
17039         * psymtab.c (maintenance_check_psymtabs): Use
17040         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
17041         * stack.c (print_frame_args): Use lookup_symbol_search_name and
17042         SYMBOL_SEARCH_NAME.
17043         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
17044         if symbol_name_match_type::SEARCH_NAME.
17045         (lookup_symbol_in_language): Pass down
17046         symbol_name_match_type::FULL.
17047         (lookup_symbol_search_name): New.
17048         (lookup_language_this): Pass down
17049         symbol_name_match_type::SEARCH_NAME.
17050         (lookup_symbol_aux, lookup_local_symbol): New parameter
17051         'match_type'.  Pass it down.
17052         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
17053         (lookup_symbol_search_name): New declaration.
17054         (lookup_symbol_in_block): New 'match_type' parameter.
17056 2018-01-05  Pedro Alves  <palves@redhat.com>
17058         PR gdb/22670
17059         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
17060         ada_lookup_symbol.
17061         (ada_lookup_symbol): Reimplement in terms of
17062         ada_lookup_symbol_list, bits factored out from
17063         ada_lookup_encoded_symbol.
17065 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17067         * ada-exp.y (write_object_renaming): When subscripting an array
17068         using a symbol as the index, pass the block in call to
17069         ada_lookup_encoded_symbol when looking that symbol up.
17071 2018-01-05  Jerome Guitton  <guitton@adacore.com>
17073         * ada-lang.c (ada_array_length): Use ada_index_type instead of
17074         TYPE_INDEX_TYPE.
17076 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17078         * ada-lang.c (ada_to_fixed_value_create): Add handling of
17079         the case where VALUE_LVAL (val0) is not lval_memory.
17081 2018-01-05  Xavier Roirand  <roirand@adacore.com>
17083         * ada-valprint.c (print_optional_low_bound): Handle
17084         character-indexed array printing like boolean-indexed array
17085         printing.
17087 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17089         * NEWS: Create a new section for the next release branch.
17090         Rename the section of the current branch, now that it has
17091         been cut.
17093 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17095         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
17096         * version.in: Bump version to 8.1.50.DATE-git.
17098 2018-01-03  Xavier Roirand  <roirand@adacore.com>
17100         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
17101         Add field.
17102         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
17103         Add field.
17104         (default_exception_support_info) <catch_handlers_sym>: Add field.
17105         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
17106         (ada_exception_name_addr_1): Add "catch handlers" handling.
17107         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
17108         Update all callers.
17109         (create_excep_cond_exprs) <ex>: Add parameter.
17110         (re_set_exception): Update create_excep_cond_exprs call.
17111         (print_it_exception, print_one_exception, print_mention_exception)
17112         (print_recreate_exception): Add "catch handler" handling.
17113         (allocate_location_catch_handlers, re_set_catch_handlers)
17114         (check_status_catch_handlers, print_it_catch_handlers)
17115         (print_one_catch_handlers, print_mention_catch_handlers)
17116         (print_recreate_catch_handlers): New function.
17117         (catch_handlers_breakpoint_ops): New variable.
17118         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
17119         Add parameter.  Add "catch handler" handling.
17120         (ada_exception_sym_name, ada_exception_breakpoint_ops):
17121         Add "catch handler" handling.
17122         (ada_exception_catchpoint_cond_string): Add "catch handler"
17123         handling.
17124         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
17125         call.
17126         (catch_ada_handlers_command): New function.
17127         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
17128         operations structure.
17129         (_initialize_ada_language): Add "catch handlers" command entry.
17130         * NEWS: Document "catch handlers" feature.
17132 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
17134         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
17135         account when creating the array type of the slice.
17136         (ada_value_slice): Likewise.
17138 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
17140         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
17141         New enum value.
17142         (create_array_type_with_stride): Add byte_stride_prop parameter.
17143         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
17144         New parameter.  Update all callers in this file.
17145         (array_type_has_dynamic_stride): New function.
17146         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
17147         of arrays with dynamic byte strides.
17148         * dwarf2read.c (read_array_type): Add support for dynamic
17149         DW_AT_byte_stride attributes.
17151 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
17153         * dwarf2read.c (read_unspecified_type): Treat
17154         DW_TAG_enumeration_type DIEs from Ada units as stubs.
17156 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17158         Update copyright year range in all GDB files.
17160 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
17162         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
17163         and gdb/testsuite/gdb.base/step-line.c.
17165 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17167         * copyright.py (main): Dump the contents of
17168         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
17169         even if BY_HAND is empty.
17171 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17173         * top.c (print_gdb_version): Update Copyright year in version
17174         message.
17176 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17178         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
17180 For older changes see ChangeLog-2017.
17182 Local Variables:
17183 mode: change-log
17184 left-margin: 8
17185 fill-column: 74
17186 version-control: never
17187 coding: utf-8
17188 End: