Change input_handler to take a unique_xmalloc_ptr
[external/binutils.git] / gdb / ChangeLog
1 2018-12-30  Tom Tromey  <tom@tromey.com>
2
3         * event-top.h (command_line_handler): Update.
4         * top.c (class gdb_readline_wrapper_cleanup) <m_handler_orig>:
5         Update.
6         (gdb_readline_wrapper_line): Update.
7         * top.h (struct ui) <input_handler>: Take a unique_xmalloc_ptr.
8         (handle_line_of_input): Update.
9         * event-top.c: Update.
10         (gdb_readline_no_editing_callback): Update.
11         (command_line_handler): Take a unique_xmalloc_ptr.
12         (handle_line_of_input): Take a const char *.
13         (command_line_append_input_line): Take a const char *.
14
15 2018-12-28  Tom Tromey  <tom@tromey.com>
16
17         * source-cache.c (get_language_name): Conditionally compile.
18
19 2018-12-28  Tom Tromey  <tom@tromey.com>
20
21         * jit.c (free_objfile_data): Only delete breakpoint if non-null.
22
23 2018-12-28  Tom Tromey  <tom@tromey.com>
24
25         * NEWS: Mention terminal styling.
26
27 2018-12-28  Tom Tromey  <tom@tromey.com>
28
29         * utils.h (can_emit_style_escape): Declare.
30         * utils.c (can_emit_style_escape): No longer static.
31         * cli/cli-style.c (set_style_enabled): New function.
32         (_initialize_cli_style): Use it.
33         * tui/tui-winsource.c (tui_show_source_line): Use tui_puts.
34         (tui_alloc_source_buffer): Change how source lines are allocated.
35         * tui/tui-source.c (copy_source_line): New function.
36         (tui_set_source_content): Use source cache.
37         * tui/tui-io.h (tui_puts): Update.
38         * tui/tui-io.c (tui_puts_internal): Add window parameter.
39         (tui_puts): Likewise.
40         (tui_redisplay_readline): Update.
41         * tui/tui-data.c (free_content_elements): Change how source window
42         contents are freed.
43         * source.c (forget_cached_source_info): Clear the source cache.
44         (print_source_lines_base): Use the source cache.
45         * source-cache.h: New file.
46         * source-cache.c: New file.
47         * configure.ac: Check for GNU Source Highlight library.
48         * configure: Update.
49         * config.in: Update.
50         * Makefile.in (SRCHIGH_LIBS, SRCHIGH_CFLAGS): New variables.
51         (INTERNAL_CFLAGS_BASE): Add SRCHIGH_CFLAGS.
52         (CLIBS): Add SRCHIGH_LIBS.
53         (COMMON_SFILES): Add source-cache.c.
54         (HFILES_NO_SRCDIR): Add source-cache.h.
55
56 2018-12-28  Tom Tromey  <tom@tromey.com>
57
58         * tui/tui-winsource.c (tui_show_source_line): Use wclrtoeol.
59
60 2018-12-28  Tom Tromey  <tom@tromey.com>
61
62         PR tui/14126:
63         * tui/tui.c (tui_enable): Call start_color and
64         use_default_colors.
65         * tui/tui-io.c (struct color_pair): New.
66         (color_pair_map, last_color_pair, last_style): New globals.
67         (tui_setup_io): Clean up color map when shutting down.
68         (curses_colors): New constant.
69         (get_color_pair, apply_ansi_escape): New functions.
70         (tui_write): Rewrite.
71         (tui_puts_internal): New function, from tui_puts.  Add "height"
72         parameter.
73         (tui_puts): Use tui_puts_internal.
74         (tui_redisplay_readline): Use tui_puts_internal.
75         (_initialize_tui_io): New function.
76         (color_map): New globals.
77         (get_color): New function.
78         * configure.ac: Check for use_default_colors.
79         * config.in, configure: Rebuild.
80
81 2018-12-28  Tom Tromey  <tom@tromey.com>
82
83         * ui-out.h (enum class ui_out_style_kind) <ADDRESS>: New
84         constant.
85         * ui-out.c (ui_out::field_core_addr): Add styling.
86         * stack.c (print_frame): Add styling.
87         * printcmd.c (print_address): Add styling.
88         (print_address_demangle, info_address_command): Likewise.
89         * cli/cli-style.h (address_style): Declare.
90         * cli/cli-style.c (address_style): New global.
91         (_initialize_cli_style): Register new commands.
92         * cli-out.c (cli_ui_out::do_field_string): Update.
93
94 2018-12-28  Tom Tromey  <tom@tromey.com>
95
96         * symfile.c (symbol_file_add_with_addrs): Style file name.
97
98 2018-12-28  Tom Tromey  <tom@tromey.com>
99
100         * top.c (print_gdb_version): Style gdb version number.
101
102 2018-12-28  Tom Tromey  <tom@tromey.com>
103
104         * printcmd.c (print_address_symbolic): Style function name.
105
106 2018-12-28  Tom Tromey  <tom@tromey.com>
107
108         * breakpoint.c (say_where): Style file name.
109
110 2018-12-28  Tom Tromey  <tom@tromey.com>
111
112         * ui-out.h (enum class ui_out_style_kind) <VARIABLE>: New global.
113         * stack.c (print_frame_arg): Style name.
114         * printcmd.c (print_variable_and_value): Style variable name.
115         * cli/cli-style.h (variable_name_style): Declare.
116         * cli/cli-style.c (variable_name_style): New global.
117         (_initialize_cli_style): Update.
118         * cli-out.c (cli_ui_out::do_field_string): Update.
119
120 2018-12-28  Tom Tromey  <tom@tromey.com>
121
122         * utils.h (reset_terminal_style): Declare.
123         * utils.c (can_emit_style_escape): New function.
124         (set_output_style): Use it.
125         (reset_terminal_style): New function.
126         * printcmd.c (printf_command): Call reset_terminal_style.
127         * cli/cli-cmds.c (echo_command): Call reset_terminal_style.
128
129 2018-12-28  Tom Tromey  <tom@tromey.com>
130
131         * utils.h (set_output_style, fprintf_styled)
132         (fputs_styled): Declare.
133         * utils.c (applied_style, desired_style): New globals.
134         (emit_style_escape, set_output_style): New function.
135         (prompt_for_continue): Emit style escapes.
136         (fputs_maybe_filtered): Likewise.
137         (fputs_styled, fprintf_styled): New functions.
138         * ui-out.h (enum class ui_out_style_kind): New.
139         (class ui_out) <field_string, field_stream, do_field_string>: Add
140         style parameter.
141         * ui-out.c (ui_out::field_stream, ui_out::field_string): Add style
142         parameter.
143         * tui/tui-out.h (class tui_ui_out) <do_field_string>: Add style
144         parameter.
145         * tui/tui-out.c (tui_ui_out::do_field_string): Add style
146         parameter.
147         (tui_ui_out::do_field_string): Update.
148         * tracepoint.c (print_one_static_tracepoint_marker): Style
149         output.
150         * stack.c (print_frame_info, print_frame): Style output.
151         * source.c (print_source_lines_base): Style output.
152         * skip.c (info_skip_command): Style output.
153         * record-btrace.c (btrace_call_history_src_line): Style output.
154         (btrace_call_history): Likewise.
155         * python/py-framefilter.c (py_print_frame): Style output.
156         * mi/mi-out.h (class mi_ui_out) <do_field_string>: Add style
157         parameter.
158         * mi/mi-out.c (mi_ui_out::do_table_header)
159         (mi_ui_out::do_field_int): Update.
160         (mi_ui_out::do_field_string): Update.
161         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
162         Style output.
163         * cli/cli-style.h: New file.
164         * cli/cli-style.c: New file.
165         * cli-out.h (class cli_ui_out) <do_field_string>: Add style
166         parameter.
167         * cli-out.c (cli_ui_out::do_table_header)
168         (cli_ui_out::do_field_int, cli_ui_out::do_field_skip): Update.
169         (cli_ui_out::do_field_string): Add style parameter.  Style the
170         output.
171         * breakpoint.c (print_breakpoint_location): Style output.
172         (update_static_tracepoint): Likewise.
173         * Makefile.in (SUBDIR_CLI_SRCS): Add cli-style.c.
174         (HFILES_NO_SRCDIR): Add cli-style.h.
175
176 2018-12-28  Tom Tromey  <tom@tromey.com>
177
178         * unittests/style-selftests.c: New file.
179         * ui-style.c: New file.
180         * ui-style.h: New file.
181         * ui-file.h: Include ui-style.h.
182         * Makefile.in (COMMON_SFILES): Add ui-style.c.
183         (HFILES_NO_SRCDIR): Add ui-style.h.
184         (SUBDIR_UNITTESTS_SRCS): Add style-selftests.c.
185
186 2018-12-28  Tom Tromey  <tom@tromey.com>
187
188         * command.h (add_setshow_enum_cmd): Add "context" argument.
189         * cli/cli-decode.c (add_setshow_enum_cmd): Add "context"
190         argument.  Call set_cmd_context.
191
192 2018-12-28  Tom Tromey  <tom@tromey.com>
193
194         * utils.c (filter_initialized): New global.
195         (wrap_buffer): Now a std::string.
196         (wrap_pointer): Remove.
197         (flush_wrap_buffer): New function.
198         (filtered_printing_initialized, set_width, wrap_here)
199         (fputs_maybe_filtered): Update.
200
201 2018-12-28  Eli Zaretskii  <eliz@gnu.org>
202
203         * coffread.c (coff_symtab_read): Don't record in minsyms symbols
204         that are unresolved.  This avoids triggering an internal error
205         when stepping outside of 'main' in MinGW programs.
206
207 2018-12-27  Tom Tromey  <tom@tromey.com>
208
209         * python/py-utils.c (gdbpy_handle_exception): Translate
210         PyExc_KeyboardInterrupt to quit.
211
212 2018-12-27  Tom Tromey  <tom@tromey.com>
213
214         * python/python-internal.h (gdbpy_print_stack_or_quit): Declare.
215         * python/py-unwind.c (pyuw_sniffer): Use
216         gdbpy_print_stack_or_quit.
217         * python/py-framefilter.c (throw_quit_or_print_exception):
218         Remove.
219         (gdbpy_apply_frame_filter): Use gdbpy_print_stack_or_quit.
220         * python/python.c (gdbpy_print_stack_or_quit): New function.
221
222 2018-12-27  Tom Tromey  <tom@tromey.com>
223
224         * python/py-value.c (convert_value_from_python): Use
225         gdbpy_convert_exception.
226         * python/py-param.c (parmpy_init): Use gdbpy_convert_exception.
227         * python/py-cmd.c (cmdpy_init): Use gdbpy_convert_exception.
228         * python/py-breakpoint.c (bppy_init): Use
229         gdbpy_convert_exception.
230
231 2018-12-27  Tom Tromey  <tom@tromey.com>
232
233         * configure.nat (NATDEPFILES): Use nat/ prefix.
234         * Makefile.in (CONFIG_SRC_SUBDIR): Add nat.
235         (%.o: ${srcdir}/nat/%.c): Remove rule.
236         (INIT_FILES): Do not filter out NATDEPFILES.
237
238 2018-12-27  Tom Tromey  <tom@tromey.com>
239
240         * Makefile.in (INIT_FILES): Redefine.
241         (stamp-init): Remove sed, tr invocations.  Use for loop.  Don't
242         set LANG or LC_ALL.
243
244 2018-12-27  Tom Tromey  <tom@tromey.com>
245
246         * Makefile.in (stamp-init): Remove gdbtypes special case.
247
248 2018-12-27  John Baldwin  <jhb@FreeBSD.org>
249
250         * config/i386/nm-fbsd.h: Remove file.
251         * Makefile.in (HFILES_NO_SRCDIR): Remove config/i386/nm-fbsd.h.
252         * configure.nat: Remove NAT_FILE for FreeBSD/i386.
253
254 2018-12-27  Tom Tromey  <tom@tromey.com>
255
256         * minsyms.h (class minimal_symbol_reader): Use
257         DISABLE_COPY_AND_ASSIGN.
258
259 2018-12-27  Tom Tromey  <tom@tromey.com>
260
261         * python/python.c (python_interactive_command): Use std::string.
262         (gdbpy_parameter): Likewise.
263         * python/py-utils.c (unicode_to_encoded_string): Update comment.
264         * python/py-symtab.c (salpy_str): Use PyString_FromFormat.
265         * python/py-record-btrace.c (recpy_bt_insn_data): Use
266         byte_vector.
267         * python/py-objfile.c (objfpy_get_build_id): Use
268         unique_xmalloc_ptr.
269         * python/py-inferior.c (infpy_read_memory): Use
270         unique_xmalloc_ptr.
271         * python/py-cmd.c (gdbpy_parse_command_name): Use std::string.
272
273 2018-12-26  Simon Marchi  <simon.marchi@polymtl.ca>
274
275         * target.c (target_terminal::restore_inferior): Remove struct keyword.
276
277 2018-12-26  Simon Marchi  <simon.marchi@ericsson.com>
278
279         * build-id.c (build_id_to_debug_bfd): Enhance debug output.
280         * symfile.c (separate_debug_file_exists): Likewise.
281
282 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
283
284         * c-exp.y (field_name): Allow DOUBLE_KEYWORD, INT_KEYWORD, LONG,
285         SHORT, SIGNED_KEYWORD, and UNSIGNED tokens to act as a field
286         names.
287         (typename_stoken): New function.
288
289 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
290
291         * c-exp.y (field_name): New %token, and new rule.
292         (exp): Replace uses of 'name' with 'field_name' where appropriate.
293
294 2018-12-24  Andrew Burgess  <andrew.burgess@embecosm.com>
295
296         PR gdb/13368
297         * c-exp.y (typebase): Extend the comment.
298         (ident_tokens): Likewise.
299
300 2018-12-18  Tom Tromey  <tom@tromey.com>
301
302         * dwarf2read.c (dwarf2_find_containing_comp_unit): Don't take
303         address of sect_off.
304
305 2018-12-23  Joel Brobecker  <brobecker@adacore.com>
306
307         GDB 8.2.1 released.
308
309 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
310
311         * riscv-tdep.c (riscv_call_arg_struct): Don't adjust size before
312         assigning locations.
313         (riscv_return_value): Take more care not to read/write outside of
314         argument buffer.  Cast return value between the declared type and
315         the abi type.
316
317 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
318
319         * riscv-tdep.c (riscv_register_reggroup_p): Save and restore fcsr,
320         fflags, and frm registers.
321
322 2018-12-22  Andrew Burgess  <andrew.burgess@embecosm.com>
323
324         * riscv-tdep.c (riscv_dwarf_reg_to_regnum): New function.
325         (riscv_gdbarch_init): Register new function with gdbarch.
326         * riscv-tdep.h: New enum to define RISC-V DWARF register numbers.
327
328 2018-12-21  Simon Marchi  <simon.marchi@ericsson.com>
329
330         * minsyms.c (mst_str): New.
331         (minimal_symbol_reader::record_full): Add debug output.
332
333 2018-12-21  John Baldwin  <jhb@FreeBSD.org>
334
335         * fbsd-nat.c (fbsd_handle_debug_trap): Require pl.pl_flags to
336         equal PL_FLAG_SI.
337         (fbsd_nat_target::stopped_by_sw_breakpoint): Likewise.
338
339 2018-12-21  Paul Marechal  <paul.marechal@ericsson.com>
340
341         PR gdb/23974
342         * target.c (target_read_stralloc): Check for empty vector.
343
344 2018-12-21  Дилян Палаузов  <dilyan.palauzov@aegee.org>
345
346         * top.c (print_gdb_configuration): Print "--without-python"
347         if GDB was configured without Python.
348
349 2018-12-21  Andrew Burgess  <andrew.burgess@embecosm.com>
350
351         * riscv-tdep.c (riscv_scan_prologue): Use plongest to format
352         a signed offset as a string.
353
354 2018-12-21  Dave Murphy  <davem@devkitpro.org>
355
356         * dtrace-probe.c (dtrace_static_probe_ops): Explicit zero
357         initialise.
358         * probe.c (any_static_probe_ops): Ditto.
359         * record-btrace.c (record_btrace_thread_observer_token): Ditto.
360         * stap-probe.c (stap_static_probe_ops): Ditto.
361         * tui/tui-hooks.c (tui_observers_token): Ditto.
362         * unittests/observable-selftests.c (token1, token2, token3): Ditto.
363
364 2018-12-19  Andrew Burgess  <andrew.burgess@embecosm.com>
365
366         * gdb/dummy-frame.c (default_dummy_id): Defined new function.
367         * gdb/dummy-frame.h (default_dummy_id): Declare new function.
368         * gdb/frame-unwind.c (default_unwind_pc): Define new function.
369         (default_unwind_sp): Define new function.
370         * gdb/frame-unwind.h (default_unwind_pc): Declare new function.
371         (default_unwind_sp): Declare new function.
372         * gdb/frame.c (frame_unwind_pc): Assume gdbarch_unwind_pc is
373         available.
374         (get_frame_sp): Assume that gdbarch_unwind_sp is available.
375         * gdb/gdbarch.c: Regenerate.
376         * gdb/gdbarch.h: Regenerate.
377         * gdb/gdbarch.sh: Update definition of dummy_id, unwind_pc, and
378         unwind_sp.  Add additional header files to be included in
379         generated file.
380
381 2018-12-19  Dimitar Dimitrov  <dimitar@dinux.eu>
382
383         * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove
384         sp clobbers.
385
386 2018-12-17  Andrew Burgess  <andrew.burgess@embecosm.com>
387
388         * dwarf2read.c (struct dwarf2_cu): Convert the fields 'mark',
389         'has_loclist', 'checked_producer', 'producer_is_gxx_lt_4_6',
390         'producer_is_gcc_lt_4_3', 'producer_is_icc_lt_14',
391         'processing_has_namespace_info' from unsigned int to bool.  Update
392         comments.
393         (producer_is_icc_lt_14): Update return type.
394         (producer_is_gcc_lt_4_3): Likewise.
395         (producer_is_gxx_lt_4_6): Likewise.
396         (process_die): Write true instead of 1 into predicate fields.
397         (dwarf2_start_symtab): Likewise.
398         (var_decode_location): Likewise.
399         (dwarf2_mark_helper): Likewise.
400         (dwarf2_mark): Likewise.
401         (dwarf2_clear_marks): Write false instead of 0 into predicate
402         field.
403         (dwarf2_cu::dwarf2_cu): Initialise predicate fields to false, not
404         0.
405
406 2018-12-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
407
408         * nat/aarch64-sve-linux-ptrace.h: Include signal.h instead of
409         asm/sigcontext.h.
410
411 2018-12-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
412
413         * nat/linux-ptrace.c (kill_child): Fix ARI warning by removing
414         warning trailing new line.
415
416 2018-12-16  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
417
418         * nat/linux-ptrace.c (kill_child): New function.
419         (linux_ptrace_test_ret_to_nx): Use kill_child instead of local code.
420         Add a call to kill_child in case of early return after fork.
421         (linux_check_ptrace_features): Use kill_child instead of local code.
422         (linux_test_for_tracefork): Likewise.
423
424 2018-12-14  Tom Tromey  <tom@tromey.com>
425
426         * Makefile.in: Remove "alloca" comment.
427         (INFOFILES): Remove.
428         (local-maintainer-clean): Don't use INFOFILES.
429
430 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
431
432         * syscalls/update-freebsd.sh: New file.
433         * syscalls/freebsd.xml: Regenerate.
434
435 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
436
437         * NEWS: Add entry documenting system call aliases.
438         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
439         to get_syscalls_by_name.
440         * gdbarch.sh (UNKNOWN_SYSCALL): Remove.
441         * gdbarch.h: Regenerate.
442         * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute.
443         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename
444         from get_syscall_by_name.  Now accepts a pointer to a vector of
445         integers and returns a bool.
446         [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member.
447         (syscall_create_syscall_desc): Add alias parameter and pass it to
448         syscall_desc constructor.
449         (syscall_start_syscall): Handle alias attribute.
450         (syscall_attr): Add alias attribute.
451         (xml_get_syscalls_by_name): Rename from xml_get_syscall_number.
452         Now accepts a pointer to a vector of integers and returns a
453         bool.  Add syscalls whose alias or name matches the requested
454         name.
455         (get_syscalls_by_name): Rename from get_syscall_by_name.  Now
456         accepts a pointer to a vector of integers and returns a bool.
457         * xml-syscall.h (get_syscalls_by_name): Likewise.
458
459 2018-12-13  John Baldwin  <jhb@FreeBSD.org>
460
461         * break-catch-syscall.c (catch_syscall_split_args): Pass 'result'
462         to get_syscalls_by_group.
463         * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_group): Return
464         false.
465         [HAVE_LIBEXPAT] (xml_list_syscalls_by_group): Append syscall
466         numbers to an existing vector of integers and return a bool.
467         (get_syscalls_by_group): Accept pointer to vector of integers
468         and change return type to bool.
469         * xml-syscall.h (get_syscalls_by_group): Likewise.
470
471 2018-12-13  Jim Wilson  <jimw@sifive.com>
472
473         * riscv-tdep.c (riscv_print_one_register_info): For MSTATUS, add
474         comment for SD field, and correct xlen calculation.  For MISA, add
475         comment for MXL field, add call to register_size, and correct base
476         calculation.
477
478 2018-12-13  Stafford Horne  <shorne@gmail.com>
479
480         * NEWS(New targets): Add or1k*-*-linux*.
481
482 2018-12-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
483
484         * nat/linux-osdata.c (linux_xfer_osdata_info_os_types): Forward
485         declare on one line to fix ARI warning.
486
487 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
488
489         * infrun.c (infcall_suspend_state::infcall_suspend_state): New.
490         (infcall_suspend_state::registers): New.
491         (infcall_suspend_state::restore): New.
492         (infcall_suspend_state::thread_suspend): Rename to...
493         (infcall_suspend_state::m_thread_suspend): ...this.
494         (infcall_suspend_state::registers): Rename to...
495         (infcall_suspend_state::m_registers): ...this.
496         (infcall_suspend_state::siginfo_gdbarch): Rename to...
497         (infcall_suspend_state::m_siginfo_gdbarch): ...this.
498         (infcall_suspend_state::siginfo_data): Rename to...
499         (infcall_suspend_state::m_siginfo_data): ...this.
500         (save_infcall_suspend_state): Rewrite to use infcall_suspend_state
501         constructor.
502         (restore_infcall_suspend_state): Rewrite to use
503         infcall_suspend_state::restore method.
504         (get_infcall_suspend_state_regcache): Use
505         infcall_suspend_state::registers method.
506
507 2018-12-12  Andrew Burgess  <andrew.burgess@embecosm.com>
508
509         * riscv-tdep.c (riscv_call_arg_scalar_float): Unnamed (variadic)
510         arguments are passed in integer registers.
511         (riscv_call_arg_complex_float): Likewise.
512
513 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
514
515         * nat/linux-osdata.c (common_getter): New function.
516         (struct osdata_type): Change getter to take_snapshot.
517         Add LONGEST len_avail and struct buffer buffer.
518         Change all elements in the initializer.
519         Add an element for the list of types.
520         (linux_xfer_osdata_info_os_types): New function.
521         (linux_common_xfer_osdata): Use common_getter for the list of types.
522         Replace getter call by common_getter.
523         (linux_xfer_osdata_cpus): Remove args READBUF, OFFSET, LEN.
524         Add arg BUFFER.  Only keep the code that adds data in BUFFER.
525         (linux_xfer_osdata_fds): Likewise.
526         (linux_xfer_osdata_modules): Likewise.
527         (linux_xfer_osdata_msg): Likewise.
528         (linux_xfer_osdata_processes): Likewise.
529         (linux_xfer_osdata_processgroups): Likewise.
530         (linux_xfer_osdata_sem): Likewise.
531         (linux_xfer_osdata_shm): Likewise.
532         (linux_xfer_osdata_isockets): Likewise.
533         (linux_xfer_osdata_threads): Likewise.
534
535 2018-12-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
536
537         * nat/linux-osdata.c: Removed various trailing spaces.
538
539 2018-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
540
541         * riscv-tdep.c (riscv_register_name): Fix ARI warning by removing
542         leading whitespace before #include line.
543
544 2018-12-08  Simon Marchi  <simon.marchi@ericsson.com>
545             Дилян Палаузов  <dilyan.palauzov@aegee.org>
546
547         PR gdb/23950
548         * configure.ac: Search for tgetent in libtinfow.
549         * configure: Re-generate.
550
551 2018-12-08  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
552
553         * linux-thread-db.c (struct thread_db_info): Add td_ta_delete_p.
554         (thread_db_err_str): Forward declare.
555         (delete_thread_db_info): Call td_ta_delete_p if available.
556         (try_thread_db_load_1): Acquire td_ta_delete address.
557         * nat/gdb_thread_db.h (td_ta_delete_ftype): Declare.
558
559 2018-12-08  Pedro Alves  <palves@redhat.com>
560
561         * source.c (forward_search_command): Rename to ...
562         (search_command_helper): ... this.  Add 'forward' parameter.
563         Tweak to use a gdb::def_vector<char> instead of a xrealloc'ed
564         buffer.  Handle backward searches too.
565         (forward_search_command, reverse_search_command): Reimplement by
566         calling search_command_helper.
567
568 2018-12-07  Andrew Burgess  <andrew.burgess@embecosm.com>
569
570         * .dir-locals.el: Copy most of the settings from c-mode over to
571         c++-mode.
572
573 2018-12-08  Stafford Horne  <shorne@gmail.com>
574
575         * Makefile.in (ALL_TARGET_OBS): Add or1k-linux-tdep.o.
576         * configure.tgt: Add or1k*-*-linux*.
577         * or1k-linux-tdep.c: New file.
578         * or1k-tdep.c (or1k_gdbarch_init): Call gdbarch_init_osabi.
579
580 2018-12-07  Pedro Alves  <palves@redhat.com>
581
582         * dwarf2read.c (get_gdb_index_contents_from_section): Use
583         gdb::make_array_view.
584
585 2018-12-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
586
587         * language.c (_initialize_language): Fix leak by assigning
588         a static string to language.  Same for range and case_sensitive,
589         even if no leak is detected for these variables.
590
591 2018-12-05  John Baldwin  <jhb@FreeBSD.org>
592
593         * configure: Re-generate.
594         * configure.ac: Use separate sed expressions to escape variables
595         in auto-load directories.
596
597 2018-12-05  Andrew Burgess  <andrew.burgess@embecosm.com>
598
599         * riscv-tdep.c (riscv_features_from_gdbarch_info): New function.
600         (riscv_find_default_target_description): Use new function to
601         extract feature from gdbarch_info.
602         (riscv_gdbarch_init): Add error checks for xlen and flen between
603         target description and bfd headers.  Be smarter about when we
604         think the hardware floating point abi should be used.
605
606 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
607
608         * nat/aarch64-linux-hw-point.c
609         (aarch64_linux_any_set_debug_regs_state): New function.
610         * nat/aarch64-linux-hw-point.h
611         (aarch64_linux_any_set_debug_regs_state): New declaration.
612         * nat/aarch64-linux.c (aarch64_linux_new_thread): Check if any
613         BPs or WPs are set.
614
615 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
616
617         * common/filestuff.c [HAVE_KINFO_GETFILE]: Include headers.
618         (fdwalk) [HAVE_KINFO_GETFILE]: Use kinfo_getfile.
619
620 2018-11-30  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
621             Simon Marchi  <simon.marchi@ericsson.com>
622
623         * linespec.c (symtab_vector_up): Remove.
624         (symtabs_from_filename): Change return type to std::vector.
625         (collect_symtabs_from_filename): Likewise.
626         (create_sals_line_offset): Assign return value of
627         collect_symtabs_from_filename to *ls->file_symtabs.
628         (convert_explicit_location_to_linespec): Remove call to release.
629         (parse_linespec): Likewise.
630         (symtab_collector) <symtab_collector>: Remove initialization of
631         m_symtabs.
632         <release_symtabs>: Change return type to std::vector<symtab *>.
633         <operator ()>: Adjust.
634
635 2018-11-30  John Baldwin  <jhb@FreeBSD.org>
636
637         * fbsd-nat.c [__FreeBSD_version >= 700009] (USE_SIGINFO): Macro
638         defined.
639         (union sigval32, struct siginfo32, fbsd_siginfo_size)
640         (fbsd_convert_siginfo): Make conditional on USE_SIGINFO instead
641         of KERN_PROC_AUXV and PT_LWPINFO.
642         (fbsd_nat_target::xfer_partial): Define method unconditionally.
643         Make TARGET_OBJECT_SIGNAL_INFO conditional on USE_SIGINFO.
644         Make TARGET_OBJECT_AUXV conditional on KERN_PROC_AUXV.
645         Make TARGET_OBJECT_FREEBSD_VMMAP and
646         TARGET_OBJECT_FREEBSD_PS_STRINGS conditional on KERN_PROC_VMMAP
647         and KERN_PROC_PS_STRINGS.
648         * fbsd-nat.h: Include <sys/proc.h>.
649         (fbsd_nat_target::xfer_partial): Declare method unconditionally.
650
651 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
652
653         * riscv-linux-nat.c: Add 'inferior.h' and 'target-descriptions.h'
654         header files.
655         (riscv_linux_nat_target::read_description): New method.
656
657 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
658
659         * arch/riscv.h (riscv_gdbarch_features::hash): New method.
660         * arch/riscv.c (struct riscv_gdbarch_features_hasher): New.
661         (riscv_tdesc_cache): New global.
662         (riscv_create_target_description): Look in the cache before
663         creating a new target description.
664
665 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
666
667         * arch/riscv.h (riscv_gdb_features::operator==): New.
668         (riscv_gdb_features::operator!=): New.
669         * riscv-tdep.c (riscv_gdbarch_init): Make use of the inequality
670         operator.
671
672 2018-11-30  Andrew Burgess  <andrew.burgess@embecosm.com>
673
674         * arch/riscv.h (riscv_create_target_description): Make return type
675         const.
676         * arch/riscv.c (riscv_create_target_description): Likewise.
677         * riscv-tdep.c (riscv_find_default_target_description): Likewise.
678
679 2018-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
680             Keith Seitz  <keiths@redhat.com>
681             Tom Tromey  <tom@tromey.com>
682             Sergio Durigan Junior  <sergiodj@redhat.com>
683
684         https://bugzilla.redhat.com/show_bug.cgi?id=1613614
685         * dwarf2read.c (dwarf2_find_containing_comp_unit): Add
686         'mid_cu->length' to '*cu_off' when checking if 'sect_off' is
687         inside the CU.
688
689 2018-11-30  Pedro Alves  <palves@redhat.com>
690
691         * aix-thread.c (aix_thread_target) <aix_thread_target>: Delete.
692         <stratum>: New override.
693         * bfd-target.c (aix_thread_target) <aix_thread_target>: Delete.
694         <stratum>: New override.
695         * bsd-uthread.c (bsd_uthread_target) <bsd_uthread_target>: Delete.
696         <stratum>: New override.
697         * exec.c (exec_target) <exec_target>: Delete.
698         <stratum>: New override.
699         * gdbarch-selftests.c (register_to_value_test): Adjust to use the
700         stratum method instead of the to_stratum field.
701         * linux-thread-db.c (thread_db_target) <thread_db_target>: Delete.
702         <stratum>: New override.
703         (thread_db_target::thread_db_target): Delete.
704         * make-target-delegates (print_class): Don't print a ctor
705         declaration.  Print a stratum method override declaration.
706         * process-stratum-target.h (process_stratum_target)
707         <process_stratum_target>: Delete.
708         <stratum>: New override.
709         * ravenscar-thread.c (ravenscar_thread_target)
710         <ravenscar_thread_target>: Delete.
711         <stratum>: New override.
712         * record-btrace.c (record_btrace_target)
713         <record_btrace_target>: Delete.
714         <stratum>: New override.
715         * record-full.c (record_full_base_target)
716         <record_full_base_target>: Delete.
717         <stratum>: New override.
718         * record.c (record_disconnect, record_detach)
719         (record_mourn_inferior, record_kill): Adjust to use the stratum
720         method instead of the to_stratum field.
721         * regcache.c (cooked_read_test, cooked_write_test): Likewise.
722         * sol-thread.c (sol_thread_target)
723         <sol_thread_target>: Delete.
724         <stratum>: New override.
725         * spu-multiarch.c (spu_multiarch_target)
726         <spu_multiarch_target>: Delete.
727         <stratum>: New override.
728         * target-delegates.c: Regenerate.
729         * target.c (target_stack::push, target_stack::unpush)
730         (pop_all_targets_above, pop_all_targets_at_and_above)
731         (info_target_command, target_require_runnable)
732         (target_stack::find_beneath): Adjust to use the stratum method
733         instead of the to_stratum field.
734         (dummy_target::dummy_target): Delete.
735         (dummy_target::stratum): New.
736         (debug_target::debug_target): Delete.
737         (debug_target::stratum): New.
738         (maintenance_print_target_stack): Adjust to use the stratum method
739         instead of the to_stratum field.
740         * target.h (struct target_ops) <stratum>: New method.
741         <to_stratum>: Delete.
742         <is_pushed>: Adjust to use the stratum method
743         instead of the to_stratum field.
744
745 2018-11-30  Pedro Alves  <palves@redhat.com>
746
747         * corelow.c (core_target) <has_all_memory, has_execution>: New
748         overrides.
749         * inf-child.c (inf_child_target::has_all_memory)
750         (inf_child_target::has_memory, inf_child_target::has_stack)
751         (inf_child_target::has_registers)
752         (inf_child_target::has_execution): Delete.
753         * inf-child.h (inf_child_target) <has_all_memory, has_memory,
754         has_stack, has_registers, has_execution>: Delete.
755         * process-stratum-target.c
756         (process_stratum_target::has_all_memory)
757         (process_stratum_target::has_memory)
758         (process_stratum_target::has_stack)
759         (process_stratum_target::has_registers)
760         (process_stratum_target::has_execution): New.
761         * process-stratum-target.h (process_stratum_target)
762         <has_all_memory, has_memory, has_stack, has_registers,
763         has_execution>: New method overrides.
764         * ravenscar-thread.c (ravenscar_thread_target) <has_all_memory,
765         has_memory, has_stack, has_registers, has_execution>: Delete.
766         * remote-sim.c (gdbsim_target) <has_stack, has_registers,
767         has_execution>: Delete.
768         * remote.c (remote_target) <has_all_memory, has_memory, has_stack,
769         has_registers, has_execution>: Delete.
770         * target.c (default_child_has_all_memory)
771         (default_child_has_memory, default_child_has_stack)
772         (default_child_has_registers, default_child_has_execution):
773         Delete.
774         * target.h (default_child_has_all_memory)
775         (default_child_has_memory, default_child_has_stack)
776         (default_child_has_registers, default_child_has_execution):
777         Delete.
778         * tracefile.h (tracefile_target) <has_execution>: New override.
779
780 2018-11-30  Pedro Alves  <palves@redhat.com>
781
782         * Makefile.in (COMMON_SFILES): Add process-stratum-target.c.
783         * bsd-kvm.c: Include "process-stratum-target.h".
784         (bsd_kvm_target): Now inherits from process_stratum_target.
785         (bsd_kvm_target::bsd_kvm_target): Default it.
786         * corelow.c: Include "process-stratum-target.h".
787         (core_target): Now inherits from process_stratum_target.
788         (core_target::core_target): Don't set to_stratum here.
789         * inf-child.c (inf_child_target::inf_child_target): Delete.
790         * inf-child.h: Include "process-stratum-target.h".
791         (inf_child_target): Inherit from process_stratum_target.
792         (inf_child_target) <inf_child_target>: Default it.
793         <can_async_p, supports_non_stop, supports_disable_randomization>:
794         Delete overrides.
795         * process-stratum-target.c: New file.
796         * process-stratum-target.h: New file.
797         * remote-sim.c: Include "process-stratum-target.h".
798         (gdbsim_target): Inherit from process_stratum_target.
799         <gdbsim_target>: Default it.
800         * remote.c: Include "process-stratum-target.h".
801         (remote_target): Inherit from process_stratum_target.
802         <remote_target>: Default it.
803         * target.c (default_thread_address_space)
804         (default_thread_architecture): Delete.
805         * target.h (target_ops) <thread_architecture>: Now returns NULL by
806         default.
807         <thread_address_space>: Ditto.
808         * test-target.h: Include "process-stratum-target.h" instead of
809         "target.h".
810         (test_target_ops): Inherit from process_stratum_target.
811         <test_target_ops>: Default it.
812         * tracefile.c (tracefile_target::tracefile_target): Delete.
813         * tracefile.h: Include "process-stratum-target.h".
814         (tracefile_target): Inherit from process_stratum_target.
815         <tracefile_target>: Default it.
816         * target-delegates.c: Regenerate.
817
818 2018-11-30  Pedro Alves  <palves@redhat.com>
819
820         * Makefile.in (COMMON_SFILES): Add test-target.c.
821         * gdbarch-selftests.c: Include "test-target.h".
822         * regcache.c: Include "test-target.h".
823         * target.c (test_target_info, test_target_ops::info): Move to ...
824         * test-target.c: ... this new file.
825         * target.h (test_target_ops): Move to ...
826         * test-target.h: ... this new file.
827
828 2018-11-29  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
829
830         * source.c (forward_search_command): Fix leak by using
831         xrealloc even for the first allocation in the loop, as buf
832         is static.
833
834 2018-11-29  Rajendra SY  <rajendra.sy@gmail.com>
835
836         PR gdb/23093
837         * gdb/fbsd-tdep.c (fbsd_gdb_signal_from_target)
838         (fbsd_gdb_signal_to_target): New.
839         (fbsd_init_abi): Install gdbarch "signal_from_target" and
840         "signal_to_target" methods.
841
842 2018-11-29  Tom Tromey  <tom@tromey.com>
843
844         * valarith.c (value_x_unop): Don't set argvec[3].
845
846 2018-11-26  Simon Marchi  <simon.marchi@ericsson.com>
847
848         PR gdb/23917
849         * sparc-linux-nat.c (sparc_linux_nat_target): Remove extraneous
850         semicolon.
851
852 2018-11-26  Pedro Alves  <palves@redhat.com>
853
854         * procfs.c (procfs_notice_thread): Replace uses of
855         in_thread_list/is_exited with find_thread_ptid/THREAD_EXITED.
856         * sol-thread.c (sol_thread_target::wait)
857         (sol_update_thread_list_callback): Likewise.
858
859 2018-11-25  Tom Tromey  <tom@tromey.com>
860
861         * ui-out.c (ui_out::field_fmt): Remove comment.
862         * tui/tui-out.c (tui_ui_out::do_field_fmt): Remove comment.
863         * mi/mi-out.c (mi_ui_out::do_field_fmt): Remove comment.
864
865 2018-11-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
866
867         * source.c (open_source_file): Leak fixed in '8e6a5953e1d Fix 4K
868         leak in open_source_file' has been partially undone by '2179fbc36d23
869         Return scoped_fd from open_source_file'. Re-add the transfer of
870         current s->fullname to the unique_xmalloc_ptr fullname given
871         to find_and_open_source.
872
873 2018-11-23  Pedro Alves  <palves@redhat.com>
874
875         * gdbthread.h (enum thread_state): Move comments here.
876         (is_running, is_stopped, is_exited): Remove declarations.
877
878 2018-11-22  Pedro Alves  <palves@redhat.com>
879
880         * Makefile.in (COMMON_SFILES): Add thread-iter.c.
881         * breakpoint.c (breakpoints_should_be_inserted_now): Replace
882         ALL_NON_EXITED_THREADS with all_non_exited_threads.
883         (print_one_breakpoint_location): Replace ALL_INFERIORS with
884         all_inferiors.
885         * bsd-kvm.c: Include inferior.h.
886         * btrace.c (btrace_free_objfile): Replace ALL_NON_EXITED_THREADS
887         with all_non_exited_threads.
888         * common/filtered-iterator.h: New.
889         * common/safe-iterator.h: New.
890         * corelow.c (core_target_open): Don't call init_thread_list here.
891         * darwin-nat.c (thread_info_from_private_thread_info): Replace
892         ALL_THREADS with all_threads.
893         * fbsd-nat.c (fbsd_nat_target::resume): Replace
894         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
895         * fbsd-tdep.c (fbsd_make_corefile_notes): Replace
896         ALL_NON_EXITED_THREADS with inf->non_exited_threads.
897         * fork-child.c (postfork_hook): Don't call init_thread_list here.
898         * gdbarch-selftests.c (register_to_value_test): Adjust.
899         * gdbthread.h: Don't include "inferior.h" here.
900         (struct inferior): Forward declare.
901         (enum step_over_calls_kind): Moved here from inferior.h.
902         (thread_info::deletable): Definition moved to thread.c.
903         (find_thread_ptid (inferior *, ptid_t)): Declare.
904         (ALL_THREADS, ALL_THREADS_BY_INFERIOR, ALL_THREADS_SAFE): Delete.
905         Include "thread-iter.h".
906         (all_threads, all_non_exited_threads, all_threads_safe): New.
907         (any_thread_p): Declare.
908         (thread_list): Delete.
909         * infcmd.c (signal_command): Replace ALL_NON_EXITED_THREADS with
910         all_non_exited_threads.
911         (proceed_after_attach_callback): Delete.
912         (proceed_after_attach): Take an inferior pointer instead of an
913         integer PID.  Adjust to use range-for.
914         (attach_post_wait): Pass down inferior pointer instead of pid.
915         Use range-for instead of ALL_NON_EXITED_THREADS.
916         (detach_command): Remove init_thread_list call.
917         * inferior-iter.h: New.
918         * inferior.c (struct delete_thread_of_inferior_arg): Delete.
919         (delete_thread_of_inferior): Delete.
920         (delete_inferior, exit_inferior_1): Use range-for with
921         inf->threads_safe() instead of iterate_over_threads.
922         (inferior_appeared): Call init_thread_list here.
923         (discard_all_inferiors): Use all_non_exited_inferiors.
924         (find_inferior_id, find_inferior_pid): Use all_inferiors.
925         (iterate_over_inferiors): Use all_inferiors_safe.
926         (have_inferiors, number_of_live_inferiors): Use
927         all_non_exited_inferiors.
928         (number_of_inferiors): Use all_inferiors and std::distance.
929         (print_inferior): Use all_inferiors.
930         * inferior.h: Include gdbthread.h.
931         (enum step_over_calls_kind): Moved to gdbthread.h.
932         (struct inferior) <thread_list>: New field.
933         <threads, non_exited_threads, threads_safe>: New methods.
934         (ALL_INFERIORS): Delete.
935         Include "inferior-iter.h".
936         (ALL_NON_EXITED_INFERIORS): Delete.
937         (all_inferiors_safe, all_inferiors, all_non_exited_inferiors): New
938         functions.
939         * inflow.c (child_interrupt, child_pass_ctrlc): Replace
940         ALL_NON_EXITED_THREADS with all_non_exited_threads.
941         * infrun.c (follow_exec): Use all_threads_safe.
942         (clear_proceed_status, proceed): Use all_non_exited_threads.
943         (init_wait_for_inferior): Don't clear inline frame state here.
944         (infrun_thread_stop_requested, for_each_just_stopped_thread): Use
945         all_threads instead of ALL_NON_EXITED_THREADS.
946         (random_pending_event_thread): Use all_non_exited_threads instead
947         of ALL_NON_EXITED_THREADS.  Use a lambda for repeated code.
948         (clean_up_just_stopped_threads_fsms): Use all_non_exited_threads
949         instead of ALL_NON_EXITED_THREADS.
950         (handle_no_resumed): Use all_non_exited_threads instead of
951         ALL_NON_EXITED_THREADS.  Use all_inferiors instead of
952         ALL_INFERIORS.
953         (restart_threads, switch_back_to_stepped_thread): Use
954         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
955         * linux-nat.c (check_zombie_leaders): Replace ALL_INFERIORS with
956         all_inferiors.
957         (kill_unfollowed_fork_children): Use inf->non_exited_threads
958         instead of ALL_NON_EXITED_THREADS.
959         * linux-tdep.c (linux_make_corefile_notes): Use
960         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
961         * linux-thread-db.c (thread_db_target::update_thread_list):
962         Replace ALL_INFERIORS with all_inferiors.
963         (thread_db_target::thread_handle_to_thread_info): Use
964         inf->non_exited_threads instead of ALL_NON_EXITED_THREADS.
965         * mi/mi-interp.c (multiple_inferiors_p): New.
966         (mi_on_resume_1): Simplify using all_non_exited_threads and
967         multiple_inferiors_p.
968         * mi/mi-main.c (mi_cmd_thread_list_ids): Use all_non_exited_threads
969         instead of ALL_NON_EXITED_THREADS.
970         * nto-procfs.c (nto_procfs_target::open): Don't call
971         init_thread_list here.
972         * record-btrace.c (record_btrace_target_open)
973         (record_btrace_target::stop_recording)
974         (record_btrace_target::close)
975         (record_btrace_target::record_is_replaying)
976         (record_btrace_target::resume, record_btrace_target::wait)
977         (record_btrace_target::record_stop_replaying): Use
978         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
979         * record-full.c (record_full_wait_1): Use all_non_exited_threads
980         instead of ALL_NON_EXITED_THREADS.
981         * regcache.c (cooked_read_test): Remove reference to global
982         thread_list.
983         * remote-sim.c (gdbsim_target::create_inferior): Don't call
984         init_thread_list here.
985         * remote.c (remote_target::update_thread_list): Use
986         all_threads_safe instead of ALL_NON_EXITED_THREADS.
987         (remote_target::process_initial_stop_replies): Replace
988         ALL_INFERIORS with all_non_exited_inferiors and use
989         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
990         (remote_target::open_1): Don't call init_thread_list here.
991         (remote_target::append_pending_thread_resumptions)
992         (remote_target::remote_resume_with_hc): Use all_non_exited_threads
993         instead of ALL_NON_EXITED_THREADS.
994         (remote_target::commit_resume)
995         (remote_target::remove_new_fork_children): Replace ALL_INFERIORS
996         with all_non_exited_inferiors and use all_non_exited_threads
997         instead of ALL_NON_EXITED_THREADS.
998         (remote_target::kill_new_fork_children): Use
999         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.  Remove
1000         init_thread_list and init_wait_for_inferior calls.
1001         (remote_target::remote_btrace_maybe_reopen)
1002         (remote_target::thread_handle_to_thread_info): Use
1003         all_non_exited_threads instead of ALL_NON_EXITED_THREADS.
1004         * target.c (target_terminal::restore_inferior)
1005         (target_terminal_is_ours_kind): Replace ALL_INFERIORS with
1006         all_non_exited_inferiors.
1007         * thread-iter.c: New file.
1008         * thread-iter.h: New file.
1009         * thread.c: Include "inline-frame.h".
1010         (thread_list): Delete.
1011         (clear_thread_inferior_resources): Call clear_inline_frame_state.
1012         (init_thread_list): Use all_threads_safe instead of
1013         ALL_THREADS_SAFE.  Adjust to per-inferior thread lists.
1014         (new_thread): Adjust to per-inferior thread lists.
1015         (add_thread_silent): Pass inferior to find_thread_ptid.
1016         (thread_info::deletable): New, moved from the header.
1017         (delete_thread_1): Adjust to per-inferior thread lists.
1018         (find_thread_global_id): Use inf->threads().
1019         (find_thread_ptid): Use find_inferior_ptid and pass inferior to
1020         find_thread_ptid.
1021         (find_thread_ptid(inferior*, ptid_t)): New overload.
1022         (iterate_over_threads): Use all_threads_safe.
1023         (any_thread_p): New.
1024         (thread_count): Use all_threads and std::distance.
1025         (live_threads_count): Use all_non_exited_threads and
1026         std::distance.
1027         (valid_global_thread_id): Use all_threads.
1028         (in_thread_list): Use find_thread_ptid.
1029         (first_thread_of_inferior): Adjust to per-inferior thread lists.
1030         (any_thread_of_inferior, any_live_thread_of_inferior): Use
1031         inf->non_exited_threads().
1032         (prune_threads, delete_exited_threads): Use all_threads_safe.
1033         (thread_change_ptid): Pass inferior pointer to find_thread_ptid.
1034         (set_resumed, set_running): Use all_non_exited_threads.
1035         (is_thread_state, is_stopped, is_exited, is_running)
1036         (is_executing): Delete.
1037         (set_executing, set_stop_requested, finish_thread_state): Use
1038         all_non_exited_threads.
1039         (print_thread_info_1): Use all_inferiors and all_threads.
1040         (thread_apply_all_command): Use all_non_exited_threads.
1041         (thread_find_command): Use all_threads.
1042         (update_threads_executing): Use all_non_exited_threads.
1043         * tid-parse.c (parse_thread_id): Use inf->threads.
1044         * x86-bsd-nat.c (x86bsd_dr_set): Use inf->non_exited_threads ().
1045
1046 2018-11-22  Pedro Alves  <palves@redhat.com>
1047
1048         * infrun.c (follow_exec) <set follow-exec new>: Add thread and
1049         switch to it before calling into try_open_exec_file.
1050
1051 2018-11-22  Pedro Alves  <palves@redhat.com>
1052
1053         * cli/cli-interp.c (cli_on_user_selected_context_changed): Use
1054         inferior_thread instead of find_thread_ptid, and only when
1055         inferior_ptid is not null_ptid.
1056         * inferior.c (add_inferior): Don't include target_pid_to_str
1057         output when the inferior is not started.
1058         * python/py-inferior.c (python_on_normal_stop): Don't use
1059         find_thread_ptid.
1060         (tui_on_user_selected_context_changed): Use inferior_thread
1061         instead of find_thread_ptid, and only when inferior_ptid is not
1062         null_ptid.
1063
1064 2018-11-21  Benno Fünfstück  <benno.fuenfstueck@gmail.com>
1065
1066         PR python/23714
1067         * gdb/python/python.c (execute_gdb_command): Call
1068         prevent_dont_repeat earlier to avoid affecting dont_repeat.
1069
1070 2018-11-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1071
1072         * Makefile.in (ALL_TARGET_OBS): Add arch/riscv.o.
1073         (HFILES_NO_SRCDIR): Add arch/riscv.h.
1074         * arch/riscv.c: New file.
1075         * arch/riscv.h: New file.
1076         * configure.tgt: Add cpu_obs list of riscv, move riscv-tdep.o into
1077         this list, and add arch/riscv.o.
1078         * features/Makefile: Add riscv features.
1079         * features/riscv/32bit-cpu.c: New file.
1080         * features/riscv/32bit-cpu.xml: New file.
1081         * features/riscv/32bit-csr.c: New file.
1082         * features/riscv/32bit-csr.xml: New file.
1083         * features/riscv/32bit-fpu.c: New file.
1084         * features/riscv/32bit-fpu.xml: New file.
1085         * features/riscv/64bit-cpu.c: New file.
1086         * features/riscv/64bit-cpu.xml: New file.
1087         * features/riscv/64bit-csr.c: New file.
1088         * features/riscv/64bit-csr.xml: New file.
1089         * features/riscv/64bit-fpu.c: New file.
1090         * features/riscv/64bit-fpu.xml: New file.
1091         * features/riscv/rebuild-csr-xml.sh: New file.
1092         * riscv-tdep.c: Add 'arch/riscv.h' include.
1093         (riscv_gdb_reg_names): Delete.
1094         (csr_reggroup): New global.
1095         (struct riscv_register_alias): Delete.
1096         (struct riscv_register_feature): New structure.
1097         (riscv_register_aliases): Delete.
1098         (riscv_xreg_feature): New global.
1099         (riscv_freg_feature): New global.
1100         (riscv_virtual_feature): New global.
1101         (riscv_csr_feature): New global.
1102         (riscv_create_csr_aliases): New function.
1103         (riscv_read_misa_reg): Delete.
1104         (riscv_has_feature): Delete.
1105         (riscv_isa_xlen): Simplify, just return cached xlen.
1106         (riscv_isa_flen): Simplify, just return cached flen.
1107         (riscv_has_fp_abi): Update for changes in struct gdbarch_tdep.
1108         (riscv_register_name): Update to make use of tdesc_register_name.
1109         Look up xreg and freg names in the new globals riscv_xreg_feature
1110         and riscv_freg_feature.  Don't supply csr aliases here.
1111         (riscv_fpreg_q_type): Delete.
1112         (riscv_register_type): Use tdesc_register_type in almost all
1113         cases, override the returned type in a few specific cases only.
1114         (riscv_print_one_register_info): Handle errors reading registers.
1115         (riscv_register_reggroup_p): Use tdesc_register_in_reggroup_p for
1116         registers that are otherwise unknown to GDB.  Also check the
1117         csr_reggroup.
1118         (riscv_print_registers_info): Remove assert about upper register
1119         number, and use gdbarch_register_reggroup_p instead of
1120         short-cutting.
1121         (riscv_find_default_target_description): New function.
1122         (riscv_check_tdesc_feature): New function.
1123         (riscv_add_reggroups): New function.
1124         (riscv_setup_register_aliases): New function.
1125         (riscv_init_reggroups): New function.
1126         (_initialize_riscv_tdep): Add calls to setup CSR aliases, and
1127         setup register groups.  Register new riscv debug variable.
1128         * riscv-tdep.h: Add 'arch/riscv.h' include.
1129         (struct gdbarch_tdep): Remove abi union, and add
1130         riscv_gdbarch_features field.  Remove cached quad floating point
1131         type, and provide initialisation for double type field.
1132         * target-descriptions.c (maint_print_c_tdesc_cmd): Add riscv to
1133         the list of targets using the feature based target descriptions.
1134         * NEWS: Mention target description support.
1135
1136 2018-11-21  Pedro Alves  <palves@redhat.com>
1137
1138         * valops.c (find_method_list, value_find_oload_method_list)
1139         (find_overload_match, find_oload_champ): Rename parameters and
1140         locals.
1141
1142 2018-11-21  Pedro Alves  <palves@redhat.com>
1143
1144         * valops.c (find_method_list): Replace pointer and length
1145         parameters with an gdb::array_view.  Adjust.
1146         (value_find_oload_method_list): Likewise.
1147         (find_overload_match): Use gdb::array_view for methods list.
1148         Adjust to find_oload_champ interface change.
1149         (find_oload_champ): 'xm_worker_vec' parameter now a pointer/array.
1150         'num_fns' parameter now a size_t.  Eliminate 'fn_count' local.
1151
1152 2018-11-21  Pedro Alves  <palves@redhat.com>
1153
1154         * gdbtypes.c (compare_badness): Change type of parameters to const
1155         reference.  Adjust to badness_vector being a std::vector now.
1156         (rank_function): Adjust to badness_vector being a std::vector now.
1157         * gdbtypes.h (badness_vector): Now a typedef to std::vector.
1158         (LENGTH_MATCH): Delete.
1159         (compare_badness): Change type of parameters to const reference.
1160         (rank_function): Return a badness_vector by value now.
1161         (find_overload_match): Adjust to badness_vector being a
1162         std::vector now.  Remove cleanups.
1163         (find_oload_champ_namespace): 'oload_champ_bv' parameter now a
1164         badness_vector pointer.
1165         (find_oload_champ_namespace_loop): 'oload_champ_bv' parameter now
1166         a badness_vector pointer.  Adjust to badness_vector being a
1167         std::vector now.  Remove cleanups.
1168         (find_oload_champ): 'oload_champ_bv' parameter now
1169         a badness_vector pointer.  Adjust to badness_vector being a
1170         std::vector now.  Remove cleanups.
1171
1172 2018-11-21  Pedro Alves  <palves@redhat.com>
1173
1174         * cp-support.c (sym_return_val_size, sym_return_val_index)
1175         (sym_return_val): Delete.
1176         (overload_list_add_symbol): Add std::vector parameter.  Adjust to
1177         add to the vector.
1178         (make_symbol_overload_list): Adjust to return a std::vector
1179         instead of maintaining a global open coded vector.
1180         (make_symbol_overload_list_block): Add std::vector parameter.
1181         (make_symbol_overload_list_block): Rename to ...
1182         (add_symbol_overload_list_block): ... this and add std::vector
1183         parameter.
1184         (make_symbol_overload_list_namespace): Rename to ...
1185         (add_symbol_overload_list_namespace): ... this and add std::vector
1186         parameter.
1187         (make_symbol_overload_list_adl_namespace): Rename to ...
1188         (add_symbol_overload_list_adl_namespace): ... this and add
1189         std::vector parameter.
1190         (make_symbol_overload_list_adl): Delete.
1191         (add_symbol_overload_list_adl): New.
1192         (make_symbol_overload_list_using): Rename to ...
1193         (add_symbol_overload_list_using): ... this and add std::vector
1194         parameter.
1195         (make_symbol_overload_list_qualified): Rename to ...
1196         (add_symbol_overload_list_qualified): ... this and add std::vector
1197         parameter.
1198         * cp-support.h: Include "common/array-view.h" and <vector>.
1199         (make_symbol_overload_list): Change return type to std::vector.
1200         (make_symbol_overload_list_adl): Delete declaration.
1201         (add_symbol_overload_list_adl): New declaration.
1202         * valops.c (find_overload_match): Local 'oload_syms' now a
1203         std::vector.
1204         (find_oload_champ_namespace): 'oload_syms' parameter now a
1205         std::vector pointer.
1206         (find_oload_champ_namespace_loop): 'oload_syms' parameter now a
1207         std::vector pointer.  Adjust to new make_symbol_overload_list
1208         interface.
1209
1210 2018-11-21  Pedro Alves  <palves@redhat.com>
1211
1212         * common/array-view.h (array_view::splice(size_type, size_t)): New.
1213         (array_view::splice(size_type)): New.
1214         * eval.c (eval_call, evaluate_funcall): Adjust to use array_view.
1215         * extension.c (xmethod_worker::get_arg_types): Adjust to return an
1216         std::vector.
1217         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1218         * extension.h: Include "common/array-view.h".
1219         (xmethod_worker::invoke): Adjust to use gdb::array_view.
1220         (xmethod_worker::get_arg_types): Adjust to return an std::vector.
1221         (xmethod_worker::get_result_type): Adjust to use gdb::array_view.
1222         (xmethod_worker::do_get_arg_types): Adjust to use std::vector.
1223         (xmethod_worker::do_get_result_type): Adjust to use
1224         gdb::array_view.
1225         * gdbtypes.c (rank_function): Adjust to use gdb::array_view.
1226         * gdbtypes.h: Include "common/array-view.h".
1227         (rank_function): Adjust to use gdb::array_view.
1228         * python/py-xmethods.c (python_xmethod_worker::invoke)
1229         (python_xmethod_worker::do_get_arg_types)
1230         (python_xmethod_worker::do_get_result_type)
1231         (python_xmethod_worker::invoke): Adjust to new interfaces.
1232         * valarith.c (value_user_defined_cpp_op, value_user_defined_op)
1233         (value_x_binop, value_x_unop): Adjust to use gdb::array_view.
1234         * valops.c (find_overload_match, find_oload_champ_namespace)
1235         (find_oload_champ_namespace_loop, find_oload_champ): Adjust to use
1236         gdb:array_view and the new xmethod_worker interfaces.
1237         * value.c (result_type_of_xmethod, call_xmethod): Adjust to use
1238         gdb::array_view.
1239         * value.h (find_overload_match, result_type_of_xmethod)
1240         (call_xmethod): Adjust to use gdb::array_view.
1241         * unittests/array-view-selftests.c: Add slicing tests.
1242
1243 2018-11-21  Pedro Alves  <palves@redhat.com>
1244
1245         * ada-lang.c (ada_evaluate_subexp): Adjust to pass an array_view.
1246         * common/array-view.h (make_array_view): New.
1247         * compile/compile-object-run.c (compile_object_run): Adjust to
1248         pass an array_view.
1249         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust.
1250         * eval.c (eval_call): Adjust to pass an array_view.
1251         (evaluate_subexp_standard): Adjust to pass an array_view.
1252         * gcore.c (call_target_sbrk): Adjust to pass an array_view.
1253         * guile/scm-value.c (gdbscm_value_call): Likewise.
1254         * infcall.c (push_dummy_code): Replace pointer + size parameters
1255         with an array_view parameter.
1256         (call_function_by_hand, call_function_by_hand_dummy): Likewise and
1257         adjust.
1258         * infcall.h: Include "common/array-view.h".
1259         (call_function_by_hand, call_function_by_hand_dummy): Replace
1260         pointer + size parameters with an array_view parameter.
1261         * linux-fork.c (inferior_call_waitpid): Adjust to use array_view.
1262         * linux-tdep.c (linux_infcall_mmap): Likewise.
1263         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1264         (value_nsstring, print_object_command): Likewise.
1265         * python/py-value.c (valpy_call): Likewise.
1266         * rust-lang.c (rust_evaluate_funcall): Likewise.
1267         * spu-tdep.c (flush_ea_cache): Likewise.
1268         * valarith.c (value_x_binop, value_x_unop): Likewise.
1269         * valops.c (value_allocate_space_in_inferior): Likewise.
1270         * unittests/array-view-selftests.c (run_tests): Add
1271         gdb::make_array_view test.
1272
1273 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1274
1275         * cli-out.c (cli_ui_out::do_field_int): Use string_printf rather
1276         than a fixed size buffer.
1277
1278 2018-11-20  Andrew Burgess  <andrew.burgess@embecosm.com>
1279
1280         * breakpoint.c (print_one_breakpoint_location): Reduce whitespace,
1281         and remove insertion of extra spaces in GDB's output.
1282         * cli-out.c (cli_ui_out::do_field_fmt): Update header comment.
1283         Layout field into a temporary buffer, and then output it as a
1284         string field.
1285
1286 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1287
1288         * NEWS: Document the language choice done by
1289         'info [types|functions|variables]|rbreak'.
1290
1291 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1292
1293         * symtab.c (treg_matches_sym_type_name): Use
1294         scoped_switch_to_sym_language_if_auto instead of local logic.
1295         (print_symbol_info): Use scoped_switch_to_sym_language_if_auto
1296         to switch to SYM language when language mode is auto.
1297
1298 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1299
1300         * language.h (scoped_switch_to_sym_language_if_auto): New class.
1301
1302 2018-11-20  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1303
1304         * symtab.c (search_symbols): Properly check absence of type regexp
1305         before entering the loop scanning the minimal symbols.
1306
1307 2018-11-20  John Darrington  <john@darrington.wattle.id.au>
1308
1309         * s12z-tdep.c (s12z_extract_return_value): New function.
1310         (inv_reg_perm) New array.
1311         (s12z_return_value): Populate readbuf if non-null.
1312
1313 2018-11-20  Eli Zaretskii  <eliz@gnu.org>
1314
1315         * common/filestuff.c (gdb_fopen_cloexec): Disable use of "e" mode
1316         with 'fopen' also if O_CLOEXEC is equal to O_NOINHERIT, to cater
1317         to MinGW fixed by Gnulib.
1318         (O_NOINHERIT): Define if not defined.
1319
1320 2018-11-19  John Darrington  <john@darrington.wattle.id.au>
1321
1322         * s12z-tdep.c (s12z_frame_cache): Add an assertion.
1323
1324 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1325
1326         * infrun.c (displaced_step_inferior_state) <next>: Remove.
1327
1328 2018-11-19  Tom Tromey  <tom@tromey.com>
1329
1330         * source.c (get_filename_and_charpos): Return void.
1331
1332 2018-11-19  Simon Marchi  <simon.marchi@polymtl.ca>
1333
1334         * skip.c (_initialize_step_skip): Fix "info skip" help.
1335
1336 2018-11-16  Tom Tromey  <tom@tromey.com>
1337
1338         PR rust/23625:
1339         * rust-lang.c (rust_internal_print_type): Handle TYPE_CODE_PTR.
1340
1341 2018-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1342
1343         * infrun.c (displaced_step_inferior_states): Change type to
1344         std::forward_list.
1345         (get_displaced_stepping_state): Adjust.
1346         (displaced_step_in_progress_any_inferior): Adjust.
1347         (add_displaced_stepping_state): Adjust.
1348         (remove_displaced_stepping_state): Adjust.
1349
1350 2018-11-18  Tom Tromey  <tom@tromey.com>
1351
1352         PR build/23814:
1353         * target-delegates.c: Rebuild.
1354         * ia64-linux-nat.c (class ia64_linux_nat_target)
1355         <have_steppable_watchpoint>: Use override.  Return true, not 1.
1356         (ia64_linux_nat_target::can_use_hw_breakpoint): Rename.  Remove
1357         "self" argument.
1358         (ia64_linux_nat_target::low_new_thread): Rename.
1359         (class ia64_linux_nat_target) <read_description>: Don't declare.
1360         * target.h (struct target_ops) <have_steppable_watchpoint>: Return
1361         bool.
1362
1363 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1364
1365         PR gdb/22736:
1366         * aarch64-tdep.c (aarch64_push_dummy_call): Remove
1367         lang_struct_return code.
1368
1369 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1370
1371         * aarch64-tdep.c (aarch64_push_dummy_call): Replace arg with
1372         return_method.
1373         * alpha-tdep.c (alpha_push_dummy_call): Likewise.
1374         * amd64-tdep.c (amd64_push_arguments): Likewise.
1375         (amd64_push_dummy_call): Likewise.
1376         * amd64-windows-tdep.c (amd64_windows_push_arguments): Likewise.
1377         * arc-tdep.c (arc_push_dummy_call): Likewise.
1378         * arm-tdep.c (arm_push_dummy_call): Likewise.
1379         * avr-tdep.c (avr_push_dummy_call): Likewise.
1380         * bfin-tdep.c (bfin_push_dummy_call): Likewise.
1381         * cris-tdep.c (cris_push_dummy_call): Likewise.
1382         * csky-tdep.c (csky_push_dummy_call): Likewise.
1383         * frv-tdep.c (frv_push_dummy_call): Likewise.
1384         * gdbarch.c: Regenerate.
1385         * gdbarch.h: Regenerate.
1386         * gdbarch.sh (gdbarch_push_dummy_call): Replace arg with
1387         return_method.
1388         * h8300-tdep.c (h8300_push_dummy_call): Likewise.
1389         * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
1390         (hppa64_push_dummy_call): Likewise.
1391         * i386-darwin-tdep.c (i386_darwin_push_dummy_call): Likewise.
1392         * i386-tdep.c (i386_push_dummy_call): Likewise.
1393         * ia64-tdep.c (ia64_push_dummy_call): Likewise.
1394         * infcall.c (call_function_by_hand_dummy): Likewise.
1395         * iq2000-tdep.c (iq2000_push_dummy_call): Likewise.
1396         * lm32-tdep.c (lm32_push_dummy_call): Likewise.
1397         * m32c-tdep.c (m32c_push_dummy_call): Likewise.
1398         * m32r-tdep.c (m32r_push_dummy_call): Likewise.
1399         * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise.
1400         * m68k-tdep.c (m68k_push_dummy_call): Likewise.
1401         * mep-tdep.c (mep_push_dummy_call): Likewise.
1402         * mips-tdep.c (mips_eabi_push_dummy_call): Likewise.
1403         (mips_n32n64_push_dummy_call): Likewise.
1404         (mips_o32_push_dummy_call): Likewise.
1405         (mips_o64_push_dummy_call): Likewise.
1406         * mn10300-tdep.c (mn10300_push_dummy_call): Likewise.
1407         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1408         * nds32-tdep.c (nds32_push_dummy_call): Likewise.
1409         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
1410         * or1k-tdep.c (or1k_push_dummy_call): Likewise.
1411         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1412         (ppc64_sysv_abi_push_dummy_call): Likewise.
1413         * ppc-tdep.h (ppc_sysv_abi_push_dummy_call): Likewise.
1414         (ppc64_sysv_abi_push_dummy_call): Likewise.
1415         * riscv-tdep.c (riscv_push_dummy_call): Likewise.
1416         * rl78-tdep.c (rl78_push_dummy_call): Likewise.
1417         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1418         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1419         * rx-tdep.c (rx_push_dummy_call): Likewise.
1420         * s390-tdep.c (s390_push_dummy_call): Likewise.
1421         * score-tdep.c (score_push_dummy_call): Likewise.
1422         * sh-tdep.c (sh_push_dummy_call_fpu): Likewise.
1423         (sh_push_dummy_call_nofpu): Likewise.
1424         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1425         (sparc32_push_dummy_call): Likewise.
1426         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1427         (sparc64_push_dummy_call): Likewise.
1428         * spu-tdep.c (spu_push_dummy_call): Likewise.
1429         * tic6x-tdep.c (tic6x_push_dummy_call): Likewise.
1430         * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
1431         * v850-tdep.c (v850_push_dummy_call): Likewise.
1432         * vax-tdep.c (vax_push_dummy_call): Likewise.
1433         * xstormy16-tdep.c (xstormy16_push_dummy_call): Likewise.
1434         * xtensa-tdep.c (xtensa_push_dummy_call): Likewise.
1435
1436 2018-11-16  Alan Hayward  <alan.hayward@arm.com>
1437
1438         * gdbarch.sh (enum function_call_return_method): Add enum.
1439         * gdbarch.h: Regenerate.
1440         * infcall.c (call_function_by_hand_dummy): Replace vars with enum.
1441
1442 2018-11-15  Joel Brobecker  <brobecker@adacore.com>
1443
1444         * unittests/copy_bitwise-selftests.c: New file.
1445         * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
1446         (selftests::copy_bitwise_tests): Delete, moving this code to
1447         unittests/copy_bitwise-selftests.c instead.
1448         (_initialize_utils): Do not register copy_bitwise tests.
1449         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1450         unittests/copy_bitwise-selftests.c.
1451
1452 2018-11-14  Joel Brobecker  <brobecker@adacore.com>
1453
1454         * ada-lang.c (move_bits): Delete. Update all callers to use
1455         copy_bitwise instead.
1456         * dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
1457         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1458         Move from here to utils.c.
1459         (_initialize_dwarf2loc): Remove call to register copy_bitwise
1460         selftests.
1461         * utils.h (copy_bitwise): Add declaration.
1462         * utils.c (copy_bitwise, bits_to_str::bits_to_str)
1463         (selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
1464         Moved here from dwarf2loc.c.
1465         (_initialize_utils): Register copy_bitwise selftests.
1466
1467 2018-11-14  Jim Wilson  <jimw@sifive.com>
1468
1469         * riscv-tdep.c (struct riscv_arg_info): New field is_unnamed.
1470         (riscv_call_arg_scalar_int): If unnamed arg with twice xlen alignment,
1471         then increment next_regnum if odd.
1472         (riscv_arg_location): New arg is_unnamed.  Set ainfo->is_unnamed.
1473         (riscv_push_dummy_call): New local ftype.  Call check_typedef to set
1474         function type.  Pass new arg to riscv_arg_location based on function
1475         type.
1476         (riscv_return_value): Pass new arg to riscv_arg_location.
1477
1478         * riscv-tdep.c (BIGGEST_ALIGNMENT): New.
1479         (riscv_type_alignment) <TYPE_CODE_ARRAY>: If TYPE_VECTOR, return min
1480         of TYPE_LENGTH and BIGGEST_ALIGNMENT.
1481
1482         * riscv-tdep.c (riscv_call_arg_scalar_int): Use std::min when
1483         setting len.  New local align, set to max of arg align and xlen,
1484         and pass to first riscv_assign_stack_location call.
1485
1486 2018-11-12  Simon Marchi  <simon.marchi@polymtl.ca>
1487
1488         * skip.c (complete_skip_number): New function.
1489         (_initialize_step_skip): Add completers to some skip commands.
1490
1491 2018-11-09  Tom Tromey  <tom@tromey.com>
1492
1493         * remote.c (remote_g_packet_guess_s): Remove typedef and DEF_VEC.
1494         (struct remote_g_packet_data): Derive from allocate_on_obstack.
1495         <guesses>: Now a std::vector.
1496         (remote_g_packet_data_init, register_remote_g_packet_guess):
1497         Update.
1498         (remote_read_description_p): Update.  Return bool.
1499         (remote_target::read_description): Update.
1500         (struct remote_g_packet_guess): Add constructor.
1501
1502 2018-11-09  Tom Tromey  <tom@tromey.com>
1503
1504         * common/scoped_fd.h (class scoped_fd): Add move constructor and
1505         move assignment operator.
1506         * psymtab.c (psymtab_to_fullname): Update.
1507         * source.h (open_source_file): Return scoped_fd.
1508         (find_and_open_source): Likewise.
1509         * source.c (open_source_file): Return scoped_fd.
1510         (get_filename_and_charpos): Update.
1511         (print_source_lines_base): Update.  Use scoped_fd::to_file.
1512         (forward_search_command): Likewise.
1513         (reverse_search_command): Likewise.
1514         (find_and_open_source): Return scoped_fd.
1515         * tui/tui-source.c (tui_set_source_content): Update.  Use
1516         gdb_file_up.
1517
1518 2018-11-09  John Baldwin  <jhb@FreeBSD.org>
1519
1520         * minsyms.c (minimal_symbol_reader::install): Fix unsigned
1521         overflow.
1522
1523 2018-11-09  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1524
1525         * configure: Regenerate.
1526
1527 2018-11-09  Tom de Vries  <tdevries@suse.de>
1528
1529         * symtab.c (symbol_set_names): Call symbol_find_demangled_name
1530         unconditionally, to set the language of the symbol.  Manage freeing
1531         returned pointer using gdb::unique_xmalloc_ptr.
1532
1533 2018-11-08  Tom Tromey  <tom@tromey.com>
1534
1535         * record.c (require_record_target): Upper-case "<TAB>".
1536
1537 2018-11-08  Tom Tromey  <tom@tromey.com>
1538
1539         * python/lib/gdb/command/pretty_printers.py
1540         (InfoPrettyPrinter.invoke): Don't indent "objfile" heading.
1541
1542 2018-11-08  Tom Tromey  <tom@tromey.com>
1543
1544         PR gdb/23555:
1545         PR gdb/23838:
1546         * target.h (target_supports_terminal_ours): Return bool.
1547         * target.c (target_supports_terminal_ours): Handle case where
1548         current_top_target returns nullptr.  Return bool.
1549
1550 2018-11-08  Joel Brobecker  <brobecker@adacore.com>
1551
1552         * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1):
1553         return the correct count for potential HFAs.
1554
1555 2018-11-08  Jan Beulich  <jbeulich@suse.com>
1556
1557         * i387-tdep.c (i387_supply_xsave): Split handling of
1558         X86_XSTATE_ZMM_H and X86_XSTATE_ZMM.
1559         (i387_collect_xsave): Likewise.
1560
1561 2018-11-08  Andrew Burgess  <andrew.burgess@embecosm.com>
1562
1563         * riscv-tdep.c (riscv_insn::decode): Update header comment.
1564         (riscv_frame_this_id): Catch errors thrown while building the
1565         frame cache, leave the frame id as the default, which is the outer
1566         frame id.
1567
1568 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1569
1570         * ada-lang.c (read_atcb): Only set task_info->called_task if
1571         task_info->state == Entry_Caller_Sleep.
1572         (print_ada_task_info): Do not check task_info->state before
1573         checking task_info->called_task.
1574         (info_task): Likewise.
1575
1576 2018-11-07  Joel Brobecker  <brobecker@adacore.com>
1577
1578         * ada-tasks.c (read_atcb): Clear task_info before computing
1579         the value of each of its fields.
1580
1581 2018-11-07  Andrew Burgess  <andrew.burgess@embecosm.com>
1582
1583         * dwarf2read.c (dwarf2_init_integer_type): Check for name being
1584         NULL before dereferencing it.
1585
1586 2018-11-06  Tom de Vries  <tdevries@suse.de>
1587
1588         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
1589         program headers.
1590
1591 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
1592
1593         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
1594         so that it applies to uclinux as well.
1595
1596 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
1597
1598         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
1599         when on AAPCS.
1600
1601 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
1602
1603         * riscv-fbsd-nat.c (getregs_supplies): Return true for
1604         RISCV_CSR_SSTATUS_REGNUM.
1605
1606 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1607
1608         * source.c (open_source_file): Fix leak by transferring the
1609         current s->fullname to the unique_xmalloc_ptr fullname given
1610         to find_and_open_source.
1611
1612 2018-11-04  Tom Tromey  <tom@tromey.com>
1613
1614         * varobj.c (install_default_visualizer): Update.
1615         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
1616         Return gdbpy_ref.
1617         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
1618         (find_pretty_printer_from_progspace)
1619         (find_pretty_printer_from_gdb, find_pretty_printer)
1620         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
1621         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
1622         Update.
1623
1624 2018-11-04  Tom Tromey  <tom@tromey.com>
1625
1626         * python/python.c (gdbpy_parameter_value): Update.
1627         * python/python-internal.h (python_string_to_unicode)
1628         (python_string_to_target_python_string)
1629         (host_string_to_python_string): Return gdbpy_ref.
1630         * python/py-utils.c (python_string_to_unicode)
1631         (unicode_to_encoded_python_string)
1632         (unicode_to_target_python_string)
1633         (python_string_to_target_string)
1634         (python_string_to_target_python_string): Return gdbpy_ref.
1635         (python_string_to_host_string): Update.
1636         (host_string_to_python_string): Return gdbpy_ref.
1637         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
1638         (stpy_fullname): Update.
1639         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
1640         Update.
1641         * python/py-prettyprint.c (print_string_repr): Update.
1642         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
1643         (objfpy_get_build_id): Update.
1644         * python/py-breakpoint.c (bppy_get_location)
1645         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
1646         Update.
1647
1648 2018-11-04  Tom Tromey  <tom@tromey.com>
1649
1650         * python/python-internal.h (gdb_py_object_from_longest)
1651         (gdb_py_object_from_ulongest): Return gdbpy_ref.
1652         * python/py-value.c (valpy_int): Update.
1653         * python/py-utils.c (gdb_py_object_from_longest): Return
1654         gdbpy_ref.
1655         (gdb_py_object_from_ulongest): Likewise.
1656         * python/py-type.c (typy_get_alignof): Update.
1657         * python/py-linetable.c (ltpy_get_all_source_lines)
1658         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
1659         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
1660
1661 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1662
1663         * ada-lang.c (_initialize_ada_language): Fix typo.
1664
1665 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1666
1667         * language.c (type): Remove.
1668         (_initialize_language): Remove assignment to type.
1669
1670 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
1671
1672         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
1673         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
1674         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
1675         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
1676         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
1677         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
1678         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
1679         and aarch64-ravenscar-thread.o.
1680         * NEWS: Add entry documenting Ravenscar tasking support
1681         on AArch64 ELF.
1682
1683 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
1684
1685         * symtab.c (info_functions_command): Initialize quiet flag.
1686         * stack.c (info_args_command): Likewise.
1687
1688 2018-11-01  Jim Wilson  <jimw@sifive.com>
1689
1690         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
1691         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
1692         debugging messages.
1693
1694 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1695
1696         * ada-lang.c (ada_watch_location_expression): New function.
1697         (ada_language_defn): Set la_watch_location_expression to
1698         ada_watch_location_expression.
1699
1700 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1701
1702         * print-utils.c (int_string): Remove unnecessary trailing spaces.
1703
1704 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
1705
1706         * rs6000-tdep.c (skip_prologue): Fix potential negative left
1707         shifting.
1708
1709 2018-11-01  Jerome Guitton  <guitton@adacore.com>
1710             Joel Brobecker  <brobecker@adacore.com>
1711
1712         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
1713         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
1714         * arm-pikeos-tdep.c: New file.
1715         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
1716         embedded system.
1717         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
1718
1719 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
1720
1721         * common/pathstuff.c (get_standard_temp_dir): New.
1722         * common/pathstuff.h (get_standard_temp_dir): New.
1723         * config.in: Re-generate.
1724         * configure: Re-generate.
1725         * configure.ac: Don't check for mkdtemp.
1726         * gnulib/aclocal-m4-deps.mk: Re-generate.
1727         * gnulib/aclocal.m4: Re-generate.
1728         * gnulib/config.in: Re-generate.
1729         * gnulib/configure: Re-generate.
1730         * gnulib/import/Makefile.am: Re-generate.
1731         * gnulib/import/Makefile.in: Re-generate.
1732         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1733         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1734         * gnulib/import/m4/mkdtemp.m4: New file.
1735         * gnulib/import/mkdtemp.c: New file.
1736         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
1737         Add mkdtemp module.
1738         * unittests/mkdir-recursive-selftests.c (test): Use
1739         get_standard_temp_dir.
1740         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
1741         ifdef.
1742         * compile/compile.c (get_compile_file_tempdir): Likewise.
1743
1744 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1745
1746         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
1747         (SIG_FRAME_LR_OFFSET64): New define.
1748         (SIG_FRAME_FP_OFFSET64): New define.
1749         (aix_sighandle_frame_cache): New Function.
1750         (aix_sighandle_frame_this_id): New Function.
1751         (aix_sighandle_frame_prev_register): New Function.
1752         (aix_sighandle_frame_sniffer): New Function.
1753         (aix_sighandle_frame_unwind): New global variable.
1754         (rs6000_aix_init_osabi): Install new frame unwinder.
1755
1756 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1757
1758         PR gdb/23835
1759         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
1760         already defined.
1761
1762 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1763
1764         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
1765
1766 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
1767
1768         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
1769         (producer_is_icc): New function.
1770         (check_producer): Set producer_is_icc field on dwarf2_cu.
1771         (dwarf2_init_integer_type): New function.
1772         (read_base_type): Call dwarf2_init_integer_type instead of
1773         init_integer_type in all cases.
1774         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
1775         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
1776         LEN is greater than 0.
1777
1778 2018-10-30  Tom Tromey  <tom@tromey.com>
1779
1780         * main.c (captured_main_1): Check return value of bfd_init.
1781
1782 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1783
1784         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
1785         Adjust comments.
1786
1787 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1788
1789         * procfs.c: Include common/pathstuff.h.
1790
1791 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1792
1793         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
1794         Add missing braces.  No functional change.
1795
1796 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1797
1798         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
1799         to report a bad option and fix indentation.
1800         * demangle.c (demangle_command): Use report_unrecognized_option_error
1801         to report a bad option and correctly report the bad option.
1802
1803 2018-10-27  Tom Tromey  <tom@tromey.com>
1804
1805         PR cli/23364:
1806         * darwin-nat.c (copied_shell): New global.
1807         (may_have_sip): Rename from should_disable_startup_with_shell.
1808         (copy_shell_to_cache, maybe_cache_shell): New functions.
1809         (darwin_nat_target::create_inferior): Update.  Use
1810         copied_shell.
1811
1812 2018-10-27  Tom Tromey  <tom@tromey.com>
1813
1814         * unittests/scoped_fd-selftests.c (test_to_file): New function.
1815         (run_tests): Call test_to_file.
1816         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
1817         temporary files.
1818         * common/scoped_fd.h (scoped_fd::to_file): New method.
1819
1820 2018-10-27  Tom Tromey  <tom@tromey.com>
1821
1822         * unittests/scoped_mmap-selftests.c (test_normal): Use
1823         gdb_mkostemp_cloexec.
1824         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
1825         Use gdb_mkostemp_cloexec.
1826         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
1827         gnulib/config.in, gnulib/configure,
1828         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
1829         gnulib/import/m4/gnulib-cache.m4,
1830         gnulib/import/m4/gnulib-comp.m4: Update.
1831         * gnulib/import/m4/mkostemp.m4: New file.
1832         * gnulib/import/m4/mkstemp.m4: Remove.
1833         * gnulib/import/mkostemp.c: New file.
1834         * gnulib/import/mkstemp.m4: Remove.
1835         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
1836         mkstemp, add mkostemp.  Apply new patch.
1837         * gnulib/import/stdlib.in.h: Apply patch.
1838         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
1839         New file.
1840         * dwarf-index-write.c (write_psymtabs_to_index): Use
1841         gdb_mkostemp_cloexec.
1842         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
1843
1844 2018-10-27  Tom Tromey  <tom@tromey.com>
1845
1846         * unittests/mkdir-recursive-selftests.c: New file.
1847         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1848         unittests/mkdir-recursive-selftests.c.
1849         * dwarf-index-cache.c (mkdir_recursive): Move to
1850         common/filestuff.c.
1851         (index_cache::store): Check return value of mkdir_recursive.
1852         (create_dir_and_check, test_mkdir_recursive): Move to new file.
1853         (_initialize_index_cache): Don't register test.
1854         * common/filestuff.h (mkdir_recursive): Declare.
1855         * common/filestuff.c (mkdir_recursive): Move from
1856         dwarf-index-cache.c.  Return bool.
1857
1858 2018-10-27  Tom Tromey  <tom@tromey.com>
1859
1860         * dwarf-index-write.c (write_psymtabs_to_index): Move
1861         make_temp_filename to common/pathstuff.c.
1862         * common/pathstuff.h (make_temp_filename): Declare.
1863         * common/pathstuff.c (make_temp_filename): New function, moved
1864         from dwarf-index-write.c.
1865
1866 2018-10-27  Tom Tromey  <tom@tromey.com>
1867
1868         * procfs.c (procfs_target::create_inferior): Use get_shell.
1869         * cli/cli-cmds.c (shell_escape): Use get_shell.
1870         * windows-nat.c (windows_nat_target::create_inferior): Use
1871         get_shell.
1872         * common/pathstuff.c (get_shell): New function.
1873         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
1874         (fork_inferior): Use get_shell.
1875         * common/pathstuff.h (get_shell): Declare.
1876
1877 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1878
1879         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
1880
1881 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1882
1883         * stack.c (print_variable_and_value_data): Add preg and treg.
1884         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
1885         and update callers.
1886         (print_frame_arg_vars): Likewise.
1887         (prepare_reg): New function.
1888         (info_locals_command): Extract info print args and use them.
1889         (info_args_command): Likewise.
1890         (_initialize_stack): Modify on-line help.
1891         * symtab.c (treg_matches_sym_type_name): New function.
1892         (search_symbols): New arg t_regexp.
1893         (symtab_symbol_info): New args quiet, regexp, t_regexp.
1894         (info_variables_command): Extract info print args and use them.
1895         (info_functions_command): Likewise.
1896         (info_types_command): Update call to symtab_symbol_info.
1897         (_initialize_symtab): Modify on-line help.
1898         * symtab.h (treg_matches_sym_type_name): New function.
1899         (search_symbols): New t_regexp arg.
1900
1901 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1902
1903         * cli-utils.c (extract_arg_maybe_quoted): New function.
1904         (extract_info_print_args): New function.
1905         (info_print_args_help): New function.
1906         (report_unrecognized_option_error): New function.
1907         * cli-utils.h (extract_arg_maybe_quoted): New function.
1908         (extract_info_print_args): New function.
1909         (info_print_args_help): New function.
1910         (report_unrecognized_option_error): New function.
1911
1912 2018-10-26  Tom Tromey  <tom@tromey.com>
1913
1914         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
1915         (compute_compunit_symtab_includes): Update.
1916         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
1917         (compunit_symtab_ptr): Likewise.
1918
1919 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1920
1921         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
1922         default_print_auxv_entry for specific tag values.
1923
1924 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
1925
1926         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
1927
1928 2018-10-26  Jim Wilson  <jimw@sifive.com>
1929
1930         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
1931         (riscv_linux_sigframe_init): Declare.
1932         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
1933         (riscv_linux_sigframe): New.
1934         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
1935         (riscv_linux_sigframe_init): Define.
1936         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
1937
1938         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
1939         (riscv_isa_flen): Likewise.  Drop static.
1940         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
1941         (riscv_isa_flen): Likewise.  Declare.
1942
1943 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1944             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
1945
1946         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
1947         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
1948         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
1949         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
1950         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
1951         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
1952         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
1953         Define.
1954         (struct ppc_linux_features) <htm>: New field.
1955         (ppc_linux_no_features): Add initializer for htm field.
1956         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
1957         new tdescs.
1958         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
1959         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
1960         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
1961         Define if not already defined.
1962         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
1963         and rs6000/powerpc-isa207-htm-vsx64l.
1964         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
1965         rs6000/powerpc-isa207-htm-vsx64l.xml.
1966         * features/rs6000/power-htm-spr.xml: New file.
1967         * features/rs6000/power-htm-core.xml: New file.
1968         * features/rs6000/power64-htm-core.xml: New file.
1969         * features/rs6000/power-htm-fpu.xml: New file.
1970         * features/rs6000/power-htm-altivec.xml: New file.
1971         * features/rs6000/power-htm-vsx.xml: New file.
1972         * features/rs6000/power-htm-ppr.xml: New file.
1973         * features/rs6000/power-htm-dscr.xml: New file.
1974         * features/rs6000/power-htm-tar.xml: New file.
1975         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
1976         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
1977         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
1978         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
1979         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
1980         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
1981         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
1982         fetch_regset with HTM regsets.
1983         (store_register, store_ppc_registers): Call store_regset with HTM
1984         regsets.
1985         (ppc_linux_nat_target::read_description): Set htm field in the
1986         features struct if needed.
1987         * ppc-linux-tdep.c: Include
1988         features/rs6000/powerpc-isa207-htm-vsx32l.c and
1989         features/rs6000/powerpc-isa207-htm-vsx64l.c.
1990         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
1991         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
1992         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
1993         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
1994         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
1995         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
1996         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
1997         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
1998         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
1999         (ppc32_linux_ctarregset): New globals.
2000         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
2001         (ppc_linux_collect_core_cpgrregset): New function.
2002         (ppc_linux_iterate_over_regset_sections): Call back with the htm
2003         regsets.
2004         (ppc_linux_core_read_description): Check if the tm spr section is
2005         present and set htm in the features struct.
2006         (_initialize_ppc_linux_tdep): Call
2007         initialize_tdesc_powerpc_isa207_htm_vsx32l and
2008         initialize_tdesc_powerpc_isa207_htm_vsx64l.
2009         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
2010         Declare.
2011         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
2012         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
2013         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
2014         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
2015         New fields.
2016         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
2017         Likewise.
2018         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
2019         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
2020         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
2021         New enum fields.
2022         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
2023         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
2024         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
2025         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
2026         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
2027         <PPC_CTAR_REGNUM>: Likewise.
2028         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
2029         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
2030         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
2031         (IS_CEFP_PSEUDOREG): Define.
2032         (rs6000_register_name): Hide the upper halves of checkpointed VSX
2033         registers.  Return names for the checkpointed DFP, VSX, and EFP
2034         pseudo registers.
2035         (rs6000_pseudo_register_type): Remove initial assert and raise an
2036         internal error in the else clause instead.  Return types for the
2037         checkpointed DFP, VSX, and EFP pseudo registers.
2038         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
2039         checkpointed DFP pseudo registers.
2040         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
2041         checkpointed VSX pseudo registers.
2042         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
2043         from efpr_pseudo_register_read and
2044         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
2045         registers.
2046         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
2047         Handle checkpointed DFP, VSX, and EFP registers.
2048         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
2049         (efp_ax_pseudo_register_collect): New functions.
2050         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
2051         register logic to new functions.  Handle checkpointed DFP, VSX,
2052         and EFP pseudo registers.
2053         (rs6000_gdbarch_init): Look for and validate the htm features.
2054         Include checkpointed DFP, VSX and EFP pseudo-registers.
2055         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
2056         HTM registers.
2057
2058 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2059
2060         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
2061         without altivec or fpu.
2062
2063 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2064             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2065
2066         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
2067         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
2068         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
2069         Define if not already defined.
2070         * features/rs6000/power-ebb.xml: New file.
2071         * features/rs6000/power-linux-pmu.xml: New file.
2072         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
2073         features.
2074         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
2075         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
2076         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
2077         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
2078         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
2079         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
2080         fetch_regset with ebb and pmu regsets.
2081         (store_register, store_ppc_registers): Call store_regset with ebb
2082         and pmu regsets.
2083         (ppc_linux_nat_target::read_description): Set isa207 field in the
2084         features struct if ebb and pmu are avaiable.
2085         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
2086         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
2087         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
2088         and pmu regsets.
2089         (ppc_linux_core_read_description): Check if the pmu section is
2090         present and set isa207 in the features struct.
2091         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
2092         (ppc32_linux_pmuregset): Declare.
2093         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
2094         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
2095         <ppc_sier_regnum>: New field.
2096         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
2097         New enum values.
2098         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
2099         values.
2100         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
2101         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
2102         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
2103         ebb and pmu features.
2104
2105 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2106             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2107
2108         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
2109         (tdesc_powerpc_isa207_vsx64l): Declare.
2110         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
2111         (struct ppc_linux_features) <isa207>: New field.
2112         (ppc_linux_no_features): Add initializer for isa207 field.
2113         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
2114         new tdescs.
2115         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
2116         (NT_PPC_TAR): Define if not already defined.
2117         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
2118         rs6000/powerpc-isa207-vsx64l.
2119         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
2120         rs6000/powerpc-isa207-vsx64l.xml.
2121         * features/rs6000/power-tar.xml: New file.
2122         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
2123         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
2124         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
2125         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
2126         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
2127         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
2128         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
2129         fetch_regset with the TAR regset.
2130         (store_register, store_ppc_registers): Call store_regset with the
2131         TAR regset.
2132         (ppc_linux_nat_target::read_description): Set isa207 field in the
2133         features struct if needed.
2134         * ppc-linux-tdep.c: Include
2135         features/rs6000/powerpc-isa207-vsx32l.c and
2136         features/rs6000/powerpc-isa207-vsx64l.c.
2137         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
2138         (ppc_linux_iterate_over_regset_sections): Call back with the tar
2139         regset.
2140         (ppc_linux_core_read_description): Check if the tar section is
2141         present and set isa207 in the features struct.
2142         (_initialize_ppc_linux_tdep): Call
2143         initialize_tdesc_powerpc_isa207_vsx32l and
2144         initialize_tdesc_powerpc_isa207_vsx64l.
2145         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
2146         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
2147         (enum) <PPC_TAR_REGNUM>: New enum value.
2148         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
2149         feature.
2150         (ppc_process_record_op31): Record changes to TAR.
2151
2152 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2153             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2154
2155         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
2156         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2157         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
2158         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
2159         (struct ppc_linux_features) <ppr_dscr>: New field.
2160         (ppc_linux_no_features): Add initializer for ppr_dscr field.
2161         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
2162         new tdescs.
2163         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
2164         Define if not already defined.
2165         * features/Makefile (WHICH): Add
2166         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
2167         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
2168         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2169         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
2170         * features/rs6000/power-dscr.xml: New file.
2171         * features/rs6000/power-ppr.xml: New file.
2172         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
2173         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
2174         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
2175         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
2176         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
2177         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
2178         * ppc-linux-nat.c: Include <sys/uio.h>.
2179         (fetch_regset, store_regset, check_regset): New functions.
2180         (fetch_register, fetch_ppc_registers): Call fetch_regset with
2181         DSCR and PPR regsets.
2182         (store_register, store_ppc_registers): Call store_regset with
2183         DSCR and PPR regsets.
2184         (ppc_linux_get_hwcap2): New function.
2185         (ppc_linux_nat_target::read_description): Call
2186         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
2187         features struct if needed.
2188         * ppc-linux-tdep.c: Include
2189         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
2190         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
2191         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
2192         (ppc32_linux_dscrregset): New globals.
2193         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
2194         and dscr regsets.
2195         (ppc_linux_core_read_description): Check if the ppr and dscr
2196         sections are present and set ppr_dscr in the features struct.
2197         (_initialize_ppc_linux_tdep): Call
2198         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
2199         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
2200         * ppc-linux-tdep.h (ppc32_linux_pprregset)
2201         (ppc32_linux_dscrregset): Declare.
2202         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
2203         <ppc_dscr_regnum>: New field.
2204         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
2205         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
2206         and dscr features.
2207         (ppc_process_record_op31): Record changes to PPR and DSCR.
2208
2209 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2210
2211         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
2212         second initializer line for the have_* variables.  Initialize
2213         have_fpu to 0 instead of 1.
2214
2215 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2216
2217         * arch/ppc-linux-common.c (ppc_linux_match_description):
2218         Parenthesize tdesc assignements and indent them properly.
2219
2220 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2221
2222         * ppc-linux-nat.c (fetch_register): Change if statement to else
2223         if.
2224         (store_register): Likewise.
2225
2226 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2227
2228         * rs6000-tdep.c: Remove reggroups.h include.
2229         (rs6000_pseudo_register_reggroup_p): Remove.
2230         (rs6000_gdbarch_init): Remove call to
2231         set_tdesc_pseudo_register_reggroup_p.
2232
2233 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2234
2235         * reggroups.c (default_register_reggroup_p): Return true for
2236         decfloat registers and float_reggroup.
2237
2238 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2239
2240         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
2241         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
2242         ppc_linux_collect_vrregset by regcache_collect_regset.
2243
2244 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2245
2246         * linux-tdep.c (linux_collect_regset_section_cb): Use
2247         std::vector<gdb_byte> instead of char * and malloc for buf.
2248         Remove xfree.
2249
2250 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
2251
2252         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
2253         symtab_start instead of always using language_unknown.
2254
2255 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2256
2257         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
2258         READ_P parameter, catch and ignore register access errors from
2259         either the old or new MISA location.
2260         (riscv_has_feature): Update call to riscv_read_misa_reg.
2261
2262 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2263
2264         * python/py-function.c (convert_values_to_python): Return
2265         gdbpy_ref<>.  Add header comment.
2266         (fnpy_call): Adjust.
2267
2268 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2269
2270         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
2271         (cmdpy_completer_handle_brkchars): Adjust.
2272         (cmdpy_completer): Adjust.
2273
2274 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
2275
2276         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
2277         Pass correct regnum to raw_supply_zeroed.
2278
2279 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2280
2281         * regcache.c (cooked_read_test): Add CSKY to the list of
2282         architectures with a save_reggroup
2283
2284 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
2285
2286         PR gdb/23368
2287         * infrun.c (follow_exec): In the follow_exec_mode_new case,
2288         transfer terminal state from old new new inferior.
2289         * terminal.h (swap_terminal_info): New function.
2290         * inflow.c (swap_terminal_info): New function.
2291
2292 2018-10-23  Tom Tromey  <tom@tromey.com>
2293
2294         * record-btrace.c (get_thread_current_frame_id): Rename from
2295         get_thread_current_frame.  Return a frame_id.
2296         (record_btrace_start_replaying): Update.
2297
2298 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2299
2300         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
2301         for CSRs.
2302
2303 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
2304
2305         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
2306         have_nonsteppable_watchpoint attribute to 1.
2307
2308 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2309
2310         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
2311         register names.
2312         (struct register_alias): Rename to...
2313         (struct riscv_register_alias): ...this, and update comment.
2314         (riscv_register_aliases): Update type, and alias names.  Remove
2315         CSR names from this list.
2316         (riscv_register_name): Use riscv_gdb_reg_names for int and float
2317         register names.  Add an extra assertion.
2318         (riscv_is_regnum_a_named_csr): New function.
2319         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
2320
2321 2018-10-23  John Darrington  <john@darrington.wattle.id.au>
2322
2323         * configure.tgt: Add configuration for s12z.
2324         * s12z-tdep.c:  New file.
2325         * NEWS: Mention new target.
2326
2327 2018-10-22  Jim Wilson  <jimw@sifive.com>
2328
2329         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
2330         FP reg smaller than FP reg size, and fill with -1 instead of 0.
2331
2332         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
2333         (riscv_register_type): Use them.
2334         (riscv_print_one_register_info): Handle union of floats same as float.
2335         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
2336         riscv_fpreg_q_type fields.
2337
2338 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2339
2340         * gdbarch.sh (gdbarch_num_cooked_regs): New.
2341         * gdbarch.h: Re-generate.
2342         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
2343         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
2344         * eval.c (evaluate_subexp_standard): Likewise.
2345         * findvar.c (value_of_register): Likewise.
2346         (value_of_register_lazy): Likewise.
2347         (address_from_register): Likewise.
2348         * frame.c (get_frame_register_bytes): Likewise.
2349         * gdbarch-selftests.c (register_to_value_test): Likewise.
2350         * h8300-tdep.c (h8300_register_type): Likewise.
2351         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
2352         (i386_svr4_reg_to_regnum): Likewise.
2353         * infcmd.c (default_print_registers_info): Likewise.
2354         (registers_info): Likewise.
2355         (print_vector_info): Likewise.
2356         (default_print_float_info): Likewise.
2357         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
2358         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
2359         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
2360         (mi_cmd_data_list_changed_registers): Likewise.
2361         (mi_cmd_data_list_register_values): Likewise.
2362         (mi_cmd_data_write_register_values): Likewise.
2363         (mi_cmd_trace_frame_collected): Likewise.
2364         * mips-tdep.c (print_gp_register_row): Likewise.
2365         (mips_print_registers_info): Likewise.
2366         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2367         * regcache.c (init_regcache_descr): Likewise.
2368         (register_size): Likewise.
2369         (register_dump::dump): Likewise.
2370         (cooked_read_test): Likewise.
2371         (cooked_write_test): Likewise.
2372         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
2373         (rs6000_gdbarch_init): Likewise.
2374         * stabsread.c (stab_reg_to_regnum): Likewise.
2375         * stack.c (info_frame_command): Likewise.
2376         * target-descriptions.c (tdesc_register_name): Likewise.
2377         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
2378         * tui/tui-regs.c (tui_show_register_group): Likewise.
2379         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
2380         (user_reg_map_regnum_to_name): Likewise.
2381         (value_of_user_reg): Likewise.
2382         (maintenance_print_user_registers): Likewise.
2383         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
2384         (xtensa_register_name): Likewise.
2385         (xtensa_register_type): Likewise.
2386         (xtensa_reg_to_regnum): Likewise.
2387         (xtensa_pseudo_register_read): Likewise.
2388         (xtensa_pseudo_register_write): Likewise.
2389
2390 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2391
2392         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
2393         correctly-sized buffer with raw_read.
2394         (amd64_pseudo_register_write): Use correctly-sized buffer for
2395         raw_read/raw_write.
2396
2397 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2398
2399         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
2400         in add_prefix_cmd of set print type.
2401
2402 2018-10-19  Tom Tromey  <tom@tromey.com>
2403
2404         PR tui/18388:
2405         * NEWS: Mention tabset deprecation.
2406         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
2407         (update_tab_width): New function.
2408         (tui_set_tab_width, tui_show_tab_width): New functions.
2409         (tui_set_tab_width_command): Use update_tab_width.
2410         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
2411         Add new "set tui tab-width" command.
2412         * tui/tui-source.c (tui_set_source_content): Update.
2413         * tui/tui-disasm.c (tui_set_disassem_content): Update.
2414         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
2415         Don't declare.
2416         (tui_tab_width): Declare.
2417         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
2418         (tui_set_default_tab_len): Remove.
2419
2420 2018-10-19  Tom Tromey  <tom@tromey.com>
2421
2422         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
2423         (key_is_backspace, tui_getc): Don't declare.
2424         * tui/tui-io.c (key_is_start_sequence): Now static.
2425         (key_is_end_sequence, key_is_backspace): Remove.
2426         (tui_getc): Now static.
2427
2428 2018-10-19  Tom Tromey  <tom@tromey.com>
2429
2430         * symfile.c (reread_symbols): Clear "static_links".
2431
2432 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
2433
2434         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
2435         define.
2436         (aarch64_linux_sigframe_init): Extra boundary checks.
2437
2438 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
2439
2440         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
2441         the possibly non-existent tdesc type 'vec128', but the type of raw
2442         register v16 instead.
2443
2444 2018-10-19  Gary Benson <gbenson@redhat.com>
2445
2446         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
2447
2448 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
2449
2450         PR cli/23785
2451         * cli/cli-dump.c (restore_binary_file): Check if "file" is
2452         NULL.
2453
2454 2018-10-17  Paul Koning  <paul_koning@dell.com>
2455
2456         * charset.c (convert_between_encodings): Fix unsigned overflow.
2457
2458 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
2459
2460         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
2461         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
2462         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
2463         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2464         New functions.
2465         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
2466         and fbsd_info_proc_mappings_header.
2467         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
2468         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
2469         New.
2470
2471 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
2472
2473         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
2474         Solaris Maintainer.
2475
2476 2018-10-15  Tom Tromey  <tom@tromey.com>
2477
2478         * tui/tui.c (strcat_to_buf): Remove casts.
2479         * tui/tui-winsource.c (tui_show_source_line)
2480         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
2481         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
2482         * tui/tui-windata.c (tui_first_data_item_displayed)
2483         (tui_delete_data_content_windows, tui_erase_data_content)
2484         (tui_display_all_data, tui_display_data_from)
2485         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
2486         * tui/tui-win.c (tui_set_win_height)
2487         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
2488         casts.
2489         * tui/tui-win.c (tui_resize_all): Remove casts.
2490         (tui_scroll_backward_command, tui_set_focus)
2491         (tui_set_tab_width_command): Likewise.
2492         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
2493         * tui/tui-regs.c (tui_show_register_group): Remove cast.
2494         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
2495         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
2496         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
2497         Remove casts.
2498
2499 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2500
2501         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
2502         AArch64/ARM maintainer.
2503
2504 2018-10-11  Gary Benson <gbenson@redhat.com>
2505
2506         * interps.h (interp::m_name): Make private and mutable.
2507         * interps.c (interp::~interp): Free m_name.
2508
2509 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2510             Simon Marchi <simark@simark.ca>
2511
2512         * README (`configure' options): Add documentation for new
2513         "--enable-unit-tests" option.
2514         * acinclude.m4: Include "selftest.m4".
2515         * configure: Regenerate.
2516         * configure.ac: Use "GDB_AC_SELFTEST".
2517         * maint.c (maintenance_selftest): Update message informing
2518         that selftests have been disabled.
2519         (maintenance_info_selftests): Likewise.
2520         * selftest.m4: New file.
2521
2522 2018-10-10  Gary Benson <gbenson@redhat.com>
2523
2524         * remote.c (remote_target::remote_send_printf): Add
2525         missing va_end found by Coverity.
2526
2527 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
2528
2529         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
2530
2531 2018-10-09  Tom Tromey  <tom@tromey.com>
2532
2533         * configure: Rebuild.
2534         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
2535         * NEWS: Update --enable-ubsan documentation.
2536
2537 2018-10-09  Gary Benson <gbenson@redhat.com>
2538
2539         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
2540         found by Coverity.
2541
2542 2018-10-08  Tom Tromey  <tom@tromey.com>
2543
2544         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
2545         variable.
2546         (riscv_fbsd_init_abi): Likewise.
2547
2548 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2549         * valops.c (value_struct_elt_for_reference): Rename local variable
2550         to work around the shadowing a previous local warning.
2551
2552 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2553
2554         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
2555         * NEWS: Mention new FreeBSD/riscv native configuration.
2556         * configure.host: Add riscv*-*-freebsd*.
2557         * configure.nat: Likewise.
2558         * riscv-fbsd-nat.c: New file.
2559
2560 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2561
2562         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
2563         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
2564         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
2565         * NEWS: Mention new FreeBSD/riscv target.
2566         * configure.tgt: Add riscv*-*-freebsd*.
2567         * riscv-fbsd-tdep.c: New file.
2568         * riscv-fbsd-tdep.h: New file.
2569
2570 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
2571
2572         * regcache.h (struct regcache_map_entry): Note that this type can
2573         be used with traditional frame caches.
2574         * trad-frame.c (trad_frame_set_reg_regmap): New.
2575         * trad-frame.h (trad_frame_set_reg_regmap): New.
2576
2577 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2578
2579         PR c++/16841
2580         * valops.c (get_virtual_base_offset): New function.
2581         (value_struct_elt_for_reference): Use it to get virtual base offset
2582         and add it in calculating class member address.
2583
2584 2018-10-08  John Darrington  <john@darrington.wattle.id.au>
2585
2586         * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
2587         (check_producer): Check if the producer is codewarrior.
2588         (producer_is_codewarrior): New function.
2589         (lnp_state_machine::record_line): Ignore is_stmt flag for records
2590         produced by codewarrior.
2591         (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
2592
2593 2018-10-06  Tom Tromey  <tom@tromey.com>
2594
2595         PR python/19399:
2596         * python/py-inferior.c: Add "architecture" entry.
2597         (infpy_architecture): New function.
2598
2599 2018-10-06  Tom Tromey  <tom@tromey.com>
2600
2601         PR python/21765:
2602         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
2603         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
2604         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
2605         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
2606
2607 2018-10-06  Tom Tromey  <tom@tromey.com>
2608
2609         PR build/17077:
2610         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
2611         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
2612         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
2613         #include.
2614
2615 2018-10-06  Tom Tromey  <tom@tromey.com>
2616
2617         * python/py-breakpoint.c (bppy_get_location): Handle a
2618         bp_breakpoint without a location.
2619
2620 2018-10-06  Tom Tromey  <tom@tromey.com>
2621
2622         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
2623         (_RegEx): Reformat help text.
2624         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
2625         (AnyCallerIs, AnyCallerMatches): Reformat help text.
2626         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
2627         text.
2628         * python/lib/gdb/command/xmethods.py (InfoXMethod)
2629         (EnableXMethod, DisableXMethod): Remove help indentation.
2630         Capitalize meta-syntactic variables.
2631         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
2632         (EnableUnwinder, DisableUnwinder): Remove help indentation.
2633         Capitalize meta-syntactic variables.
2634         * python/lib/gdb/command/explore.py (ExploreCommand)
2635         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
2636         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
2637         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
2638         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
2639         Remove help indentation.
2640         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
2641         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
2642         (DisableFrameFilter, SetFrameFilterPriority)
2643         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
2644
2645 2018-10-06  Tom Tromey  <tom@tromey.com>
2646
2647         PR tui/28819:
2648         * tui/tui-io.c (gdb_wgetch): New function.
2649         (tui_mld_getc, tui_getc): Use it.
2650
2651 2018-10-05  Tom Tromey  <tom@tromey.com>
2652
2653         * sol-thread.c (sol_thread_target::wait): Rename inner
2654         "save_ptid".
2655
2656 2018-10-04  Tom Tromey  <tom@tromey.com>
2657
2658         * configure: Rebuild.
2659         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
2660
2661 2018-10-04  Tom Tromey  <tom@tromey.com>
2662
2663         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
2664         declaration of "block".
2665
2666 2018-10-04  Tom Tromey  <tom@tromey.com>
2667
2668         * common/filestuff.c (fdwalk): Remove inner declaration of
2669         "result".
2670
2671 2018-10-04  Tom Tromey  <tom@tromey.com>
2672
2673         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
2674         "structs_addr" and hoist declaration.
2675
2676 2018-10-04  Tom Tromey  <tom@tromey.com>
2677
2678         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
2679         variable "size".
2680
2681 2018-10-04  Tom Tromey  <tom@tromey.com>
2682
2683         * mdebugread.c (parse_partial_symbols): Use std::string.
2684
2685 2018-10-04  Tom Tromey  <tom@tromey.com>
2686
2687         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
2688         * p-valprint.c (pascal_val_print): Split inner "i" variable.
2689         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
2690         header.
2691         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
2692         more inner scope.
2693         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
2694         * varobj.c (varobj_update): Rename inner "newobj",
2695         "type_changed".
2696         * valprint.c (generic_emit_char): Rename inner "buf".
2697         * valops.c (find_overload_match): Rename inner "temp".
2698         (value_struct_elt_for_reference): Declare "v" in more inner
2699         scope.
2700         * v850-tdep.c (v850_push_dummy_call): Rename "len".
2701         * unittests/array-view-selftests.c (run_tests): Rename inner
2702         "vec".
2703         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
2704         header.
2705         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
2706         "tsv" in more inner scope.
2707         (print_one_static_tracepoint_marker): Rename inner
2708         "tuple_emitter".
2709         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
2710         (tic6x_push_dummy_call): Don't redeclare "addr".
2711         * target-float.c: Declare "dto" lower.
2712         * symtab.c (lookup_local_symbol): Rename inner "sym".
2713         (find_pc_sect_line): Rename inner "pc".
2714         * stack.c (print_frame): Don't redeclare "gdbarch".
2715         (return_command): Rename inner "gdbarch".
2716         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
2717         "sp".
2718         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
2719         header.
2720         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
2721         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
2722         scope.
2723         * remote.c (remote_target::update_thread_list): Don't redeclare
2724         "tp".
2725         (remote_target::process_initial_stop_replies): Rename inner
2726         "thread".
2727         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
2728         (remote_target::wait_as): Don't redeclare "stop_reply".
2729         (remote_target::get_thread_local_address): Rename inner
2730         "result".
2731         (remote_target::get_tib_address): Likewise.
2732
2733         * regcache.c (cooked_read_test): Rename "regnum".
2734         * record-btrace.c (cmd_record_btrace_start): Rename inner
2735         "exception".
2736         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
2737         loop header.
2738         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
2739         header.
2740         (ppu2spu_sniffer): Rename inner "buf".
2741         * parse.c (operator_check_standard): Rename inner "type",
2742         "objfile".
2743         * p-valprint.c (pascal_val_print): Introduce new scope for
2744         "low_bound", "high_bound".
2745         * p-exp.y (yylex): Declare "i" in loop header.
2746         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
2747         Lower declaration of "s".
2748         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
2749         header.
2750         (nios2_push_dummy_call): Rename "len".
2751         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
2752         "buf".
2753         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
2754         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
2755         (linux_xfer_osdata_modules): Likewise.
2756         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
2757         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
2758         (mips_o64_push_dummy_call): Likewise.
2759         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
2760         "op".
2761         * mi/mi-main.c (list_available_thread_groups): Rename inner
2762         "tuple_emitter".
2763         (mi_cmd_data_read_memory): Rename inner "opts".
2764         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
2765         "tuple_emitter".
2766         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
2767         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
2768         more inner scope.
2769         (parse_partial_symbols): Rename inner "pst", "p", "name"
2770         * main.c (captured_main_1): Rename inner "i"s.
2771         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
2772         "oso2".
2773         * linux-tdep.c (linux_info_proc): Rename inner "filename".
2774         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
2775         * infrun.c (handle_no_resumed): Don't redeclare "thread".
2776         (handle_signal_stop): Rename inner "gdbarch".
2777         (handle_command): Declare "signum" in loop header.
2778         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
2779         "status".
2780         (examine_prologue): Rename inner "sol" and "sof".
2781         (ia64_extract_return_value): Rename inner "val".  Declare another
2782         "val" in a more inner scope.
2783         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
2784         inner scope.
2785         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
2786         "except".
2787         * findvar.c (default_read_var_value): Don't redeclare "addr".
2788         * f-exp.y (yylex): Declare "i" in loop header.
2789         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
2790         Rename inner "type", "expect_type".
2791         (evaluate_subexp_for_sizeof): Rename inner "pc".
2792         * elfread.c (elf_symfile_read): Rename inner "abfd".
2793         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
2794         "bytes_read".
2795         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
2796         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
2797         (dwarf_decode_line_header): Rename inner "lh".
2798         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
2799         "offset".  Declare "i" in loop header.
2800         (disassemble_dwarf_expression): Rename inner "addr_size".
2801         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
2802         inner "result".
2803         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
2804         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
2805         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
2806         "inner_list_emitter".
2807         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
2808         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
2809         declaration in a block.
2810         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
2811         * cp-valprint.c (cp_print_value_fields): Don't redeclare
2812         "obstack_final_size".
2813         * cp-support.c (inspect_type): Declare "i" in loop header.
2814         * compile/compile.c (compile_instance::insert_symbol_error):
2815         Rename inner "e".
2816         * common/agent.c (agent_run_command): Remove inner "ret"
2817         declaration.
2818         * coffread.c (coff_symfile_read): Rename inner "name".
2819         (coff_symfile_read): Rename inner "abfd".
2820         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
2821         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
2822         "high".
2823         * c-exp.y (lex_one_token): Move "len" declaration lower.
2824         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
2825         "gdbarch".
2826         (create_exception_master_breakpoint): Likewise.  Don't redeclare
2827         "b".
2828         (watch_command_1): Declare "mark" later.
2829         (clear_command): Don't shadow "a" or "b".
2830         (delete_command): Rename inner "b".
2831         (delete_trace_command): Likewise.
2832         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
2833         "op".
2834         (arm_gdbarch_init): Remove inner "e_flags".
2835         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
2836         "offset" in inner blocks.
2837
2838 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2839
2840         * dwarf-index-write.c (file_write): Don't write if the vector is
2841         empty.
2842
2843 2018-10-05  Tom de Vries  <tdevries@suse.de>
2844
2845         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
2846         PyArg_ParseTuple call.
2847
2848 2018-10-05  Tom de Vries  <tdevries@suse.de>
2849
2850         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
2851         PyArg_ParseTuple call.
2852
2853 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
2854
2855         * psymtab.c (recursively_search_psymtabs): Reformat parameters
2856         to avoid exceeding 80 characters per line limit.
2857
2858 2018-10-04  Tom Tromey  <tom@tromey.com>
2859
2860         * symfile.c (syms_from_objfile_1, finish_new_objfile)
2861         (reread_symbols): Update.
2862         * complaints.h (clear_complaints): Remove argument.
2863         * complaints.c (enum complaint_series): Remove.
2864         (series): Remove global.
2865         (complaint_internal): Update.
2866         (clear_complaints): Remove argument.
2867
2868 2018-10-04  Tom Tromey  <tom@tromey.com>
2869
2870         * symfile.c (symbol_file_add_with_addrs): Do not print "no
2871         debugging symbols" message if there is a separate debug objfile.
2872
2873 2018-10-04  Tom Tromey  <tom@tromey.com>
2874
2875         PR cli/19551:
2876         * symfile.c (symbol_file_add_with_addrs): Update output.
2877         * psymtab.c (require_partial_symbols): Update output.
2878
2879 2018-10-04  Tom Tromey  <tom@tromey.com>
2880
2881         PR cli/22234:
2882         * complaints.c: Emit \n.
2883
2884 2018-10-04  Tom Tromey  <tom@tromey.com>
2885
2886         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
2887         (separate_debug_file_exists, find_separate_debug_file)
2888         (add_symbol_file_command, reread_symbols, allocate_symtab)
2889         (allocate_compunit_symtab): Use filtered printing, not
2890         unfiltered.
2891         * psymtab.c (require_partial_symbols, dump_psymtab)
2892         (allocate_psymtab): Use filtered printing, not unfiltered.
2893
2894 2018-10-04  Tom Tromey  <tom@tromey.com>
2895
2896         * complaints.c (complaint_internal): Correctly check complaint
2897         count.
2898
2899 2018-10-04  Tom Tromey  <tom@tromey.com>
2900
2901         * complaints.h (struct complaints): Remove declaration.
2902         * complaints.c (clear_complaints): Remove an unused variable.
2903
2904 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2905
2906         * MAINTAINERS (Write After Approval): Add self.
2907
2908 2018-10-03  Tom Tromey  <tom@tromey.com>
2909
2910         * guile/scm-value.c (gdbscm_value_to_string): Initialize
2911         "buffer_contents".
2912         * coffread.c (coff_symtab_read): Initialize "newobj".
2913
2914 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
2915
2916         * dwarf2read.c (read_func_scope): Remove struct keyword in
2917         range-based for.
2918
2919 2018-10-03  Tom Tromey  <tom@tromey.com>
2920
2921         * README: Mention --enable-ubsan.
2922         * NEWS: Mention --enable-ubsan.
2923         * acinclude.m4: Include sanitize.m4.
2924         * configure: Rebuild.
2925         * configure.ac: Call AM_GDB_UBSAN.
2926         * sanitize.m4: New file.
2927
2928 2018-10-03  Tom Tromey  <tom@tromey.com>
2929
2930         * expression.h (enum exp_opcode): Use uint8_t as base type.
2931         * expprint.c (op_name): Handle invalid opcodes.
2932
2933 2018-10-03  Tom Tromey  <tom@tromey.com>
2934
2935         * parse.c (prefixify_expression): Add assert.
2936         (parse_exp_in_context_1): Throw exception if the expression is
2937         empty.
2938
2939 2018-10-03  Tom Tromey  <tom@tromey.com>
2940
2941         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
2942
2943 2018-10-03  Tom Tromey  <tom@tromey.com>
2944
2945         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
2946
2947 2018-10-03  Tom Tromey  <tom@tromey.com>
2948
2949         * dwarf2read.c (read_subrange_type): Make "negative_mask"
2950         unsigned.
2951
2952 2018-10-03  Tom Tromey  <tom@tromey.com>
2953
2954         * findvar.c (extract_integer): Do work in an unsigned type.
2955
2956 2018-10-03  Tom Tromey  <tom@tromey.com>
2957
2958         * common/enum-flags.h (enum_flags::operator~): Add static assert.
2959         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
2960         base type.
2961         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
2962         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
2963         type.
2964         * c-lang.h (enum c_string_type_values): Use unsigned as base
2965         type.
2966         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
2967
2968 2018-10-03  Tom Tromey  <tom@tromey.com>
2969
2970         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
2971         <~dwarf2_frame_state_reg_info>: Update.
2972         <dwarf2_frame_state_reg_info>: Update.
2973         <alloc_regs>: Add assertion.  Update.
2974         <reg>: Now a std::vector.
2975         <num_regs>: Remove.
2976         <swap>: Update.
2977         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2978         (execute_cfa_program_test, dwarf2_frame_cache): Update.
2979
2980 2018-10-03  Tom Tromey  <tom@tromey.com>
2981
2982         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
2983
2984 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2985
2986         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
2987
2988 2018-10-02  Tom Tromey  <tom@tromey.com>
2989
2990         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
2991
2992 2018-10-02  John Darrington  <john@darrington.wattle.id.au>
2993
2994         * NEWS: Mention changed commands.
2995         * ser-uds.c: New file.
2996         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
2997         * configure: Regenerate.
2998         * Makefile.in: Add new file.
2999         * serial.c (serial_open): Check if filename is a socket
3000         and lookup the appropriate interface accordingly.
3001
3002 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
3003
3004         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
3005         define.
3006         (AARCH64_EXTRA_MAGIC): Likewise.
3007         (AARCH64_FPSIMD_MAGIC): Likewise.
3008         (AARCH64_SVE_MAGIC): Likewise.
3009         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
3010         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
3011         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
3012         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
3013         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
3014         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
3015         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
3016         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
3017         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
3018         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
3019         (read_aarch64_ctx): Add function.
3020         (aarch64_linux_sigframe_init): Detect FP registers.
3021
3022 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
3023
3024         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
3025         (AARCH64_D0_REGNUM): Likewise.
3026         (AARCH64_S0_REGNUM): Likewise.
3027         (AARCH64_H0_REGNUM): Likewise.
3028         (AARCH64_B0_REGNUM): Likewise.
3029         (AARCH64_SVE_V0_REGNUM): Likewise.
3030         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
3031         (AARCH64_D0_REGNUM): Likewise.
3032         (AARCH64_S0_REGNUM): Likewise.
3033         (AARCH64_H0_REGNUM): Likewise.
3034         (AARCH64_B0_REGNUM): Likewise.
3035         (AARCH64_SVE_V0_REGNUM): Likewise.
3036
3037 2018-10-01  Gary Benson <gbenson@redhat.com>
3038
3039         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
3040         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
3041         prfpregset_t instead of gdb_prfpregset_t.
3042         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
3043         * configure, config.in: Rebuild.
3044
3045 2018-10-01  Gary Benson <gbenson@redhat.com>
3046
3047         * common/gdb_proc_service.h: New file, factored out from...
3048         * gdb_proc_service.h: Moved common code to the above file.
3049         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
3050
3051 2018-10-01  Gary Benson <gbenson@redhat.com>
3052
3053         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
3054         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
3055
3056 2018-10-01  Gary Benson <gbenson@redhat.com>
3057
3058         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
3059         (AC_CHECK_HEADERS): Check for linux/elf.h.
3060         * configure, config.in: Rebuild.
3061         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
3062         doesn't define elf_fpregset_t.
3063
3064 2018-10-01  Gary Benson <gbenson@redhat.com>
3065
3066         * gdb_proc_service.h: Whitespace change.
3067
3068 2018-10-01  Tom Tromey  <tom@tromey.com>
3069
3070         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
3071         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
3072         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
3073
3074 2018-10-01  Tom Tromey  <tom@tromey.com>
3075
3076         * README: Minor change.
3077
3078 2018-09-30  Pedro Alves  <palves@redhat.com>
3079
3080         * darwin-nat-info.c (darwin_debug_regions_recurse)
3081         (info_mach_exceptions_command): Remove unused local variables.
3082         * darwin-nat.c (darwin_decode_notify_message)
3083         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
3084         (darwin_stop_inferior, darwin_setup_exceptions)
3085         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
3086         (darwin_nat_target::attach, darwin_nat_target::detach)
3087         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
3088         local variables.
3089         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
3090         variables.
3091
3092 2018-09-29  Tom Tromey  <tom@tromey.com>
3093
3094         * README: Remove some leftover text.
3095
3096 2018-09-29  Tom Tromey  <tom@tromey.com>
3097
3098         * PROBLEMS: Rewrite.
3099         * README: Update.
3100
3101 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
3102
3103         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
3104         case with explicit breakpoint kind.
3105         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
3106         'additional_info' and related logic.
3107         (riscv_debug_breakpoints): New variable.
3108         (riscv_breakpoint_kind_from_pc): Use the length of the existing
3109         instruction to determine the breakpoint kind.
3110         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
3111         flag.  Update description of 'set/show riscv
3112         use-compressed-breakpoints' flag.
3113
3114 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
3115
3116         (NEWS): Mention changes to frame related commands.
3117         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
3118         (add_prefix_cmd_suppress_notification): New function.
3119         (add_com_suppress_notification): Call
3120         add_cmd_suppress_notification.
3121         * command.h (add_cmd_suppress_notification): Declare.
3122         (add_prefix_cmd_suppress_notification): Declare.
3123         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
3124         (parse_frame_specification): Moved from stack.c, with
3125         simplification to handle a single argument.
3126         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
3127         switch to the selected frame.  Add a header comment.
3128         * stack.c: Remove 'safe-ctype.h' include.
3129         (find_frame_for_function): Add declaration.
3130         (find_frame_for_address): New function.
3131         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
3132         (frame_selection_by_function_completer): New function.
3133         (info_frame_command): Rename to...
3134         (info_frame_command_core): ...this, and update parameter types.
3135         (select_frame_command): Rename to...
3136         (select_frame_command_core): ...this, and update parameter types.
3137         (frame_command): Rename to...
3138         (frame_command_core): ...this, and update parameter types.
3139         (class frame_command_helper): New class to wrap implementations of
3140         frame related sub-commands.
3141         (frame_apply_cmd_list): New static global.
3142         (frame_cmd_list): Make static.
3143         (select_frame_cmd_list): New global for sub-commands.
3144         (info_frame_cmd_list): New global for sub-commands.
3145         (_initialize_stack): Register sub-commands for 'frame',
3146         'select-frame', and 'info frame'.  Update 'frame apply' commands
3147         to use frame_apply_cmd_list.  Move function local static
3148         frame_apply_list to file static frame_apply_cmd_list for
3149         consistency.
3150         * stack.h (select_frame_command): Delete declarationn.
3151         (select_frame_for_mi): Declare new function.
3152
3153 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3154
3155         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
3156         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
3157         and NOP.
3158
3159 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
3160
3161         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
3162
3163 2018-09-26  Tom Tromey  <tom@tromey.com>
3164
3165         * valops.c (auto_abandon): Remove dead code.
3166
3167 2018-09-26  Tom Tromey  <tom@tromey.com>
3168
3169         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
3170
3171 2018-09-24  Tom Tromey  <tom@tromey.com>
3172
3173         * common/pathstuff.c (get_standard_cache_dir): Make
3174         "xdg_cache_home" and "home" const.
3175         * top.c (init_history): Make "tmpenv" const.
3176         * main.c (get_init_files): Make "homedir" const.
3177
3178 2018-09-23  Tom Tromey  <tom@tromey.com>
3179
3180         PR python/18852:
3181         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
3182
3183 2018-09-23  Tom Tromey  <tom@tromey.com>
3184
3185         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
3186         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
3187         * python/python-internal.h (gdbpy_handle_exception): Declare.
3188         * python/py-utils.c (gdbpy_handle_exception): New function.
3189
3190 2018-09-23  Tom Tromey  <tom@tromey.com>
3191
3192         PR python/17284:
3193         * python/py-type.c (typy_template_argument): Check for negative
3194         argument number.
3195
3196 2018-09-23  Tom Tromey  <tom@tromey.com>
3197
3198         PR python/14062:
3199         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
3200
3201 2018-09-23  Tom Tromey  <tom@tromey.com>
3202
3203         PR python/18170:
3204         * python/py-value.c (valpy_int): Allow conversion from pointer
3205         type.
3206
3207 2018-09-23  Tom Tromey  <tom@tromey.com>
3208
3209         PR python/20126:
3210         * python/py-value.c (valpy_int): Respect type sign.
3211
3212 2018-09-23  Tom Tromey  <tom@tromey.com>
3213
3214         PR python/18352;
3215         * python/py-value.c (valpy_float): Allow conversions from int or
3216         char.
3217         (valpy_int, valpy_long): Allow conversions from float.
3218
3219 2018-09-23  Tom Tromey  <tom@tromey.com>
3220
3221         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
3222         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
3223
3224 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3225
3226         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
3227         __sighndlr.
3228         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
3229
3230 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
3231
3232         * windows-nat.c (windows_nat_target::wait): Remove a spurious
3233         target_terminal::ours().
3234
3235 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
3236
3237         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
3238         of vl to ULONGEST.
3239
3240 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
3241
3242         * breakpoint.c (update_inserted_breakpoint_locations): Remove
3243         redundant condition.
3244
3245 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3246
3247         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
3248
3249         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
3250         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
3251         * sol-thread.c (ps_pdmodel): Don't guard definition.
3252
3253         * procfs.c: Fix formatting.
3254
3255         * procfs.c (sysset_t_alloc): Remove.
3256         (create_procinfo): Use XNEW instead of sysset_t_alloc.
3257         (procfs_debug_inferior): Likewise.
3258         (procfs_set_exec_trap): Likewise.
3259         (proc_set_traced_sysentry): Don't allocate argp dynamically.
3260         (proc_set_traced_sysexit): Likewise.
3261
3262         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
3263         (dead_procinfo): Likewise.
3264         (proc_warn): Likewise.
3265         (proc_error): Likewise.
3266         (proc_get_LDT_entry): Likewise.
3267         (do_attach): Likewise.
3268         (procfs_target::pid_to_str): Likewise.
3269         (iterate_over_mappings): Likewise.
3270
3271         * procfs.c (create_procinfo): Fix ARI warning.
3272         (proc_get_status): Likewise.
3273         (proc_stop_process): Likewise.
3274         (proc_run_process): Likewise.
3275         (proc_kill): Likewise.
3276         (proc_get_LDT_entry): Likewise.
3277         (procfs_find_LDT_entry): Likewise.
3278         (proc_update_threads): Likewise.
3279         (proc_iterate_over_threads): Likewise.
3280         (do_attach): Likewise.
3281         (procfs_xfer_memory): Likewise.
3282         (invalidate_cache): Likewise.
3283         (procfs_target::resume): Likewise.
3284         (procfs_init_inferior): Likewise.
3285         (procfs_set_exec_trap): Likewise.
3286         (procfs_target::thread_alive): Likewise.
3287         (procfs_target::pid_to_exec_file): Likewise.
3288         (iterate_over_mappings): Likewise.
3289         (procfs_target::make_corefile_notes): Likewise.
3290         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
3291
3292         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
3293         (procfs_find_LDT_entry): Likewise.
3294         * sol-thread.c (ps_lgetLDT): Likewise.
3295
3296 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3297
3298         PR tdep/17903
3299         * procfs.c (procfs_target): Declare pid_to_exec_file.
3300         (procfs_target::pid_to_exec_file): New.
3301
3302 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3303
3304         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
3305         renaming.
3306         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
3307         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
3308
3309 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3310
3311         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
3312         (supply_fpregset, fill_fpregset): Move ...
3313         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
3314         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
3315         Remove references to ioctl-based procfs.
3316         Include <sys/reg.h>.
3317         Remove PR_MODEL_NATIVE guards.
3318         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
3319         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
3320
3321 2018-09-19  Xavier Roirand  <roirand@adacore.com>
3322
3323         PR gdb/20981:
3324         * solib-darwin.c (darwin_get_dyld_bfd): New function.
3325         (darwin_solib_get_all_image_info_addr_at_init): Update call.
3326         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
3327
3328 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
3329
3330         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
3331         (fbsd_print_sockaddr_in6): Likewise.
3332
3333 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
3334             Chris January  <chris.january@arm.com>
3335
3336         * eval.c (skip_undetermined_arglist): Skip argument list helper.
3337         (evaluate_subexp_standard): Return a dummy type when
3338         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
3339         OP_F77_UNDETERMINED_ARGLIST case.
3340         * expression.h (enum noside): Update comment.
3341
3342 2018-09-19  George Vasick <george.vasick@oracle.com>
3343
3344         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
3345
3346 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
3347             April Chin <april.chin@oracle.com>
3348             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3349
3350         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
3351         uint_t lwpid_t.
3352         (create_procinfo): Print pids in /proc without leading zeros.
3353
3354 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
3355
3356         * nios2-tdep.c (nios2_gcc_target_options): New.
3357         (nios2_gdb_arch_init): Install new hook.
3358
3359 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3360
3361         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
3362         New file.
3363         * update-gnulib.sh: Apply patch.
3364         * configure: Re-generate.
3365
3366 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3367
3368         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
3369         description.  Make "info proc" command descriptions more
3370         consistent.
3371
3372 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3373
3374         * NEWS: Mention 'info proc files' command.
3375
3376 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3377
3378         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
3379         descriptors for IP_FILES and IP_ALL.
3380
3381 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3382
3383         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
3384         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
3385         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
3386         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
3387         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
3388         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
3389         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
3390         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
3391         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
3392         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
3393         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
3394         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
3395         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
3396         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
3397         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
3398         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
3399         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
3400         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
3401         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
3402         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
3403         (struct fbsd_sockaddr_un): New types.
3404         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
3405         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
3406         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
3407         (fbsd_core_info_proc_files): New functions.
3408         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
3409         IP_ALL.
3410         * fbsd-tdep.h (fbsd_info_proc_files_header)
3411         (fbsd_info_proc_files_entry): New.
3412
3413 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3414
3415         * defs.h (enum info_proc_what) [IP_FILES]: New value.
3416         * infcmd.c (info_proc_cmd_files): New function.
3417         (_initialize_infcmd): Register 'info proc files' command.
3418
3419 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3420
3421         * gnulib/aclocal-m4-deps.mk: Re-generate.
3422         * gnulib/aclocal.m4: Re-generate.
3423         * gnulib/config.in: Re-generate.
3424         * gnulib/configure: Re-generate.
3425         * gnulib/import/Makefile.am: Re-generate.
3426         * gnulib/import/Makefile.in: Re-generate.
3427         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3428         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3429         * gnulib/import/arpa_inet.in.h: New file.
3430         * gnulib/import/inet_ntop.c: New file.
3431         * gnulib/import/m4/arpa_inet_h.m4: New file.
3432         * gnulib/import/m4/inet_ntop.m4: New file.
3433         * gnulib/import/m4/netinet_in_h.m4: New file.
3434         * gnulib/import/m4/socklen.m4: New file.
3435         * gnulib/import/m4/sockpfaf.m4: New file.
3436         * gnulib/import/m4/stdalign.m4: New file.
3437         * gnulib/import/m4/sys_uio_h.m4: New file.
3438         * gnulib/import/netinet_in.in.h: New file.
3439         * gnulib/import/stdalign.in.h: New file.
3440         * gnulib/import/sys_socket.c: New file.
3441         * gnulib/import/sys_socket.in.h: New file.
3442         * gnulib/import/sys_uio.in.h: New file.
3443         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
3444         module.
3445
3446 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3447
3448         * gnulib/aclocal-m4-deps.mk: New file.
3449         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
3450         deterministically.
3451
3452 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
3453
3454         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
3455         KVE_PATH.
3456
3457 2018-09-18  Tom Tromey  <tom@tromey.com>
3458
3459         * compile/compile-object-load.c (struct
3460         link_hash_table_cleanup_data): Add constructor and destructor.
3461         Use DISABLE_COPY_AND_ASSIGN.
3462         (~link_hash_table_cleanup_data): Rename from
3463         link_hash_table_free.  Now a destructor.
3464         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
3465
3466 2018-09-18  Tom Tromey  <tom@tromey.com>
3467
3468         * compile/compile-object-run.c (do_module_cleanup): Use delete.
3469         * compile/compile-object-load.c (struct munmap_list): Move to
3470         header file.
3471         (munmap_list::add): Rename from munmap_list_add; rewrite.
3472         (munmap_list::~munmap_list): Rename from munmap_list_free.
3473         (munmap_listp_free_cleanup): Remove.
3474         (compile_object_load): Update.
3475         * compile/compile-object-load.h (struct munmap_list): Move from
3476         compile-object-load.c.  Rewrite.
3477
3478 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
3479
3480         * aarch64-tdep.c (pass_in_v): Use register size.
3481         (aarch64_extract_return_value): Likewise.
3482         (aarch64_store_return_value): Likewise.
3483
3484 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3485
3486         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
3487         rlim_t.
3488
3489 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3490
3491         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
3492         Fix short help line.
3493
3494 2018-09-17  Tom Tromey  <tom@tromey.com>
3495
3496         PR python/20445:
3497         * configure: Rebuild.
3498         * configure.ac: Conditionally use -DNDEBUG for Python.
3499
3500 2018-09-17  Tom Tromey  <tom@tromey.com>
3501
3502         * configure: Rebuild.
3503         * configure.ac: Use gmp as a library dependency when checking for
3504         mpfr.
3505
3506 2018-09-17  Pedro Alves  <palves@redhat.com>
3507
3508         * python/py-inferior.c (find_inferior_object): Delete.
3509
3510 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
3511
3512         * compile/compile-cplus-types.c
3513         (compile_cplus_instance::enter_scope): Don't use new_scope after
3514         std::move.
3515
3516 2018-09-17  Tom Tromey  <tom@tromey.com>
3517
3518         * common/pathstuff.c (get_standard_cache_dir): Use
3519         ~/Library/Caches on macOS.
3520         * common/pathstuff.h (get_standard_cache_dir): Update comment.
3521
3522 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
3523
3524         PR python/23669
3525         * breakpoint.c (commands_cmd_element): New.
3526         (_initialize_breakpoint): Assign commands_cmd_element.
3527         * breakpoint.h (commands_cmd_element): New.
3528         * cli/cli-script.c (while_cmd_element, if_command,
3529         define_cmd_element): New.
3530         (command_name_equals): Remove.
3531         (process_next_line): Compare commands by pointer, not by name.
3532         (_initialize_cli_script): Assign the various cmd_list_element
3533         variables.
3534         * compile/compile.c (compile_cmd_element): New.
3535         (_initialize_compile): Assign compile_cmd_element.
3536         * compile/compile.h (compile_cmd_element): New.
3537         * guile/guile.c (guile_cmd_element): New.
3538         (install_gdb_commands): Assign guile_cmd_element.
3539         * guile/guile.h (guile_cmd_element): New.
3540         * python/python.c (python_cmd_element): New.
3541         (_initialize_python): Assign python_cmd_element.
3542         * python/python.h (python_cmd_element): New.
3543         * tracepoint.c (while_stepping_cmd_element): New.
3544         (_initialize_tracepoint): Assign while_stepping_cmd_element.
3545         * tracepoint.h (while_stepping_cmd_element): New.
3546
3547 2018-09-17  Tom Tromey  <tom@tromey.com>
3548
3549         * infrun.c (save_infcall_suspend_state): Return
3550         infcall_suspend_state_up.
3551         (save_infcall_control_state): Return infcall_control_state_up.
3552         * inferior.h (save_infcall_suspend_state)
3553         (save_infcall_control_state): Declare later.  Return unique
3554         pointers.
3555
3556 2018-09-17  Tom Tromey  <tom@tromey.com>
3557
3558         * infrun.c (struct stop_context): Declare constructor,
3559         destructor, "changed" method.
3560         (stop_context::stop_context): Rename from save_stop_context.
3561         (stop_context::~stop_context): Rename from
3562         release_stop_context_cleanup.
3563         (normal_stop): Update.
3564         (stop_context::changed): Rename from stop_context_changed.  Return
3565         bool.
3566
3567 2018-09-17  Tom Tromey  <tom@tromey.com>
3568
3569         * inferior.h (struct infcall_suspend_state_deleter): New.
3570         (infcall_suspend_state_up): New typedef.
3571         (struct infcall_control_state_deleter): New.
3572         (infcall_control_state_up): New typedef.
3573         (make_cleanup_restore_infcall_suspend_state)
3574         (make_cleanup_restore_infcall_control_state): Don't declare.
3575         * infcall.c (call_function_by_hand_dummy): Update.
3576         * infrun.c (do_restore_infcall_suspend_state_cleanup)
3577         (make_cleanup_restore_infcall_suspend_state): Remove.
3578         (do_restore_infcall_control_state_cleanup)
3579         (make_cleanup_restore_infcall_control_state): Remove.
3580
3581 2018-09-17  Tom Tromey  <tom@tromey.com>
3582
3583         * gdbthread.h (struct thread_control_state): Add initializer.
3584         (class thread_info) <control>: Remove initializer.
3585         * inferior.h (struct inferior_control_state): Add initializer.
3586         (class inferior) <control>: Remove initializer.
3587         (exit_inferior_1): Update.
3588         * infrun.c (struct infcall_control_state): Add constructors.
3589         (save_infcall_control_state): Use new.
3590         (restore_infcall_control_state, discard_infcall_control_state):
3591         Use delete.
3592
3593 2018-09-17  Tom Tromey  <tom@tromey.com>
3594
3595         * infrun.c (struct infcall_suspend_state) <registers>: Now a
3596         unique_ptr.
3597         <siginfo_data>: Now a unique_xmalloc_ptr.
3598         (save_infcall_suspend_state, restore_infcall_suspend_state)
3599         (discard_infcall_suspend_state)
3600         (get_infcall_suspend_state_regcache): Update.
3601
3602 2018-09-17  Tom Tromey  <tom@tromey.com>
3603
3604         * gdbthread.h (struct thread_suspend_state): Add initializers.
3605         (class thread_info) <suspend>: Remove initializer.
3606         * infrun.c (struct infcall_suspend_state): Add initializers.
3607         (save_infcall_suspend_state): Use new.
3608         (discard_infcall_suspend_state): Use delete.
3609
3610 2018-09-16  Tom Tromey  <tom@tromey.com>
3611
3612         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
3613         Remove.
3614         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
3615         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
3616         (py_varobj_iter_new): Likewise.
3617         (py_varobj_get_iterator): Use gdbpy_ref.
3618
3619 2018-09-16  Tom Tromey  <tom@tromey.com>
3620
3621         * python/py-threadevent.c (py_get_event_thread): Simplify.
3622         * python/py-inferior.c (infpy_thread_from_thread_handle):
3623         Return immediately after calling thread_to_thread_object.  Use
3624         Py_RETURN_NONE.
3625         (thread_to_thread_object): Set the exception on a NULL return.
3626
3627 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
3628
3629         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
3630
3631 2018-09-16  Tom Tromey  <tom@tromey.com>
3632
3633         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
3634         Remove.
3635
3636 2018-09-16  Tom Tromey  <tom@tromey.com>
3637
3638         * python/python-internal.h (thread_to_thread_object): Change
3639         return type.
3640         * python/py-inferior.c (thread_to_thread_object): Return a new
3641         reference.
3642         (infpy_thread_from_thread_handle): Update.
3643         * python/py-infthread.c (gdbpy_selected_thread): Update.
3644         * python/py-stopevent.c (create_stop_event_object): Update.
3645         * python/py-threadevent.c (py_get_event_thread): Return a new
3646         reference.
3647         (py_get_event_thread): Update.
3648         * python/py-event.h (py_get_event_thread): Change return type.
3649         * python/py-continueevent.c (create_continue_event_object):
3650         Update.
3651
3652 2018-09-16  Tom Tromey  <tom@tromey.com>
3653
3654         * python/py-progspace.c (pspy_get_objfiles): Update.
3655         * python/python-internal.h (objfile_to_objfile_object): Change
3656         return type.
3657         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3658         Update.
3659         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3660         Update.
3661         * python/python.c (gdbpy_get_current_objfile): Update.
3662         (gdbpy_objfiles): Update.
3663         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
3664         Update.
3665         (objfile_to_objfile_object): Return a new reference.
3666         * python/py-symtab.c (stpy_get_objfile): Update.
3667         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
3668         Update.
3669
3670 2018-09-16  Tom Tromey  <tom@tromey.com>
3671
3672         * python/py-inferior.c (infpy_get_progspace): Update.
3673         * python/python-internal.h (pspace_to_pspace_object): Change
3674         return type.
3675         * python/py-newobjfileevent.c
3676         (create_clear_objfiles_event_object): Update.
3677         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
3678         Update.
3679         * python/python.c (gdbpy_get_current_progspace): Update.
3680         (gdbpy_progspaces): Update.
3681         * python/py-progspace.c (pspace_to_pspace_object): Return a new
3682         reference.
3683         * python/py-objfile.c (objfpy_get_progspace): Update.
3684         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
3685         Update.
3686
3687 2018-09-16  Tom Tromey  <tom@tromey.com>
3688
3689         * python/lib/gdb/__init__.py (current_progspace, objfiles)
3690         (solib_name, block_for_pc, find_pc_line): New functions.
3691         (execute_unwinders): Update.
3692         * python/py-block.c (gdbpy_block_for_pc): Remove.
3693         * python/py-inferior.c (infpy_get_progspace): New function.
3694         (inferior_object_getset) <progspace>: Add.
3695         * python/py-progspace.c (pspy_objfiles): Rewrite.
3696         (pspy_solib_name, pspy_block_for_pc)
3697         (pspy_find_pc_line, pspy_is_valid): New functions.
3698         (progspace_object_methods): Add entries for solib_name,
3699         block_for_pc, find_pc_line, is_valid.
3700         * python/python-internal.h (gdbpy_block_for_pc)
3701         (build_objfiles_list): Don't declare.
3702         * python/python.c: Don't include solib.h.
3703         (gdbpy_solib_name, gdbpy_find_pc_line)
3704         (gdbpy_get_current_progspace, build_objfiles_list)
3705         (gdbpy_objfiles): Remove.
3706         (GdbMethods) <current_progspace, objfiles, block_for_pc,
3707         solib_name, find_pc_line>: Remove entries.
3708
3709 2018-09-16  Tom Tromey  <tom@tromey.com>
3710
3711         * top.c (new_ui_command): Use GNU style for metasyntactic
3712         variables.
3713         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
3714         variables.
3715         * maint.c (maintenance_translate_address): Remove "<>" around
3716         text.
3717         * interps.c (interpreter_exec_cmd): Use GNU style for
3718         metasyntactic variables.
3719         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
3720         metasyntactic variables.
3721         * tracepoint.c (tfind_range_command): Use GNU style for
3722         metasyntactic variables.
3723         (tfind_outside_command): Likewise.
3724         (_initialize_tracepoint): Likewise.
3725         * remote.c (extended_remote_target::create_inferior): Use GNU
3726         style for metasyntactic variables.
3727         * sparc64-tdep.c (adi_examine_command): Use GNU style for
3728         metasyntactic variables.
3729         (adi_assign_command): Likewise.
3730
3731 2018-09-16  Tom Tromey  <tom@tromey.com>
3732
3733         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
3734         metasyntactic variables.  Print message if no disassembler options
3735         are available.
3736
3737 2018-09-15  Tom Tromey  <tom@tromey.com>
3738
3739         * infcmd.c (get_inferior_args): Return const char *.
3740         * inferior.h (get_inferior_args): Return type now const.
3741         * linux-tdep.c (linux_fill_prpsinfo): Update.
3742         * procfs.c (procfs_target::make_corefile_notes): Update.
3743
3744 2018-09-07  Tom Tromey  <tom@tromey.com>
3745
3746         * python/python.c (execute_gdb_command): Call bpstat_do_actions
3747         inside the TRY.
3748
3749 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
3750
3751         * nios2-tdep.c (nios2_type_align): New.
3752         (nios2_gdb_arch_init): Install type_align hook.
3753
3754 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3755
3756         * eval.c (fake_method::fake_method): Call xzalloc directly for a
3757         type that is neither object file owned, nor gdbarch owned.
3758         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
3759         gdbarch is non-NULL.
3760         (alloc_type_instance): Allocate non-objfile owned types on the
3761         gdbarch obstack.
3762         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
3763         using TYPE_ALLOC to ensure memory is allocated on the correct
3764         obstack.
3765         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
3766         obstack, or the gdbarch obstack.
3767         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
3768
3769 2018-09-14  Tom Tromey  <tom@tromey.com>
3770
3771         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
3772         block.
3773
3774 2018-09-14  Tom Tromey  <tom@tromey.com>
3775
3776         * nat/fork-inferior.c (get_startup_shell): Remove "static".
3777
3778 2018-09-13  Tom Tromey  <tom@tromey.com>
3779
3780         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
3781         static.
3782
3783 2018-09-13  Tom Tromey  <tom@tromey.com>
3784
3785         * exec.c (try_open_exec_file): Use std::string.
3786
3787 2018-09-13  Tom Tromey  <tom@tromey.com>
3788
3789         * utils.h (gdb_bfd_errmsg): Return std::string.
3790         * exec.c (exec_file_attach): Update.
3791         * compile/compile-object-load.c (compile_object_load): Update.
3792         * utils.c (gdb_bfd_errmsg): Return std::string.
3793
3794 2018-09-13  Tom Tromey  <tom@tromey.com>
3795
3796         * procfs.c (struct procinfo_deleter): New.
3797         (procinfo_up): New typedef.
3798         (do_destroy_procinfo_cleanup): Remove.
3799         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
3800
3801 2018-09-13  Tom Tromey  <tom@tromey.com>
3802
3803         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
3804
3805 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3806 2018-09-13  Tom Tromey  <tom@tromey.com>
3807
3808         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
3809         (pspy_get_objfiles): New function.
3810         (progspace_object_methods): New.
3811         (pspace_object_type): Add tp_methods callback.
3812         * python/python-internal.h (build_objfiles_list): New
3813         declaration.
3814         * python/python.c (build_objfiles_list): New function.
3815         (gdbpy_objfiles): Implement using build_objfiles_list.
3816         * NEWS: Mention the Progspace.objfiles method.
3817
3818 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3819
3820         * python/py-inferior.c (infpy_get_progspace): New function.
3821         (inferior_object_getset): Add progspace property.
3822         * NEWS: Mention the new property.
3823
3824 2018-09-13  Tom Tromey  <tom@tromey.com>
3825
3826         PR rust/23650:
3827         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
3828
3829 2018-09-13  Tom Tromey  <tom@tromey.com>
3830
3831         PR rust/23626:
3832         * rust-lang.c (rust_enum_variant): Now static.
3833         (rust_empty_enum_p): New function.
3834         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
3835         Handle empty enum.
3836
3837 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
3838
3839         * python/py-inferior.c (infpy_repr): New.
3840         (inferior_object_type): Register infpy_repr.
3841         * python/py-objfile.c (objfpy_repr): New.
3842         (objfile_object_type): Register objfpy_repr.
3843
3844 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3845
3846         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
3847
3848 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
3849
3850         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
3851         typo.
3852
3853 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3854
3855         * common/common-utils.c: Don't include '<sys/stat.h>'.
3856         (is_regular_file): Move to...
3857         * common/filestuff.c (is_regular_file): ... here.
3858         * common/common-utils.h (is_regular_file): Move to...
3859         * common/filestuff.h (is_regular_file): ... here.
3860
3861 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3862
3863         * skip.c (debug_skip): New variable.
3864         (skiplist_entry::do_skip_file_p): Add debug output.
3865         (skiplist_entry::do_skip_gfile_p): Likewise.
3866         (skiplist_entry::skip_function_p): Likewise.
3867         (_initialize_step_skip): Create debug command.
3868         * NEWS: Mention set/show debug skip.
3869
3870 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3871
3872         * darwin-nat.c (should_disable_startup_with_shell):
3873         New function.
3874         (darwin_nat_target::create_inferior): Add call.
3875
3876 2018-09-11  Xavier Roirand  <roirand@adacore.com>
3877
3878         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
3879         inf_port, msg_state>: Initialize.
3880         (struct darwin_thread_info) <signaled, single_step>: Change
3881         type and initialize.
3882         (struct darwin_thread_info) <event>: Initialize.
3883
3884 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3885
3886         PR gdb/23555
3887         PR gdb/23558
3888         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
3889         guesses.
3890
3891 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
3892
3893         Revert:
3894         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3895
3896         PR gdb/23555
3897         PR gdb/23558
3898         * gnulib/aclocal.m4: Regenerate.
3899         * gnulib/config.in: Regenerate.
3900         * gnulib/configure: Regenerate.
3901         * gnulib/import/Makefile.am: Update.
3902         * gnulib/import/Makefile.in: Update.
3903         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3904         * gnulib/import/_Noreturn.h: ... this.
3905         * gnulib/import/alloca.in.h: Update.
3906         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3907         * gnulib/import/arg-nonnull.h: ... this.
3908         * gnulib/import/assure.h: Update.
3909         * gnulib/import/at-func.c: Update.
3910         * gnulib/import/basename-lgpl.c: Update.
3911         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3912         * gnulib/import/c++defs.h: ... this.
3913         * gnulib/import/canonicalize-lgpl.c: Update.
3914         * gnulib/import/cdefs.h: Update.
3915         * gnulib/import/chdir-long.c: Update.
3916         * gnulib/import/chdir-long.h: Update.
3917         * gnulib/import/cloexec.c: Update.
3918         * gnulib/import/cloexec.h: Update.
3919         * gnulib/import/close.c: Update.
3920         * gnulib/import/closedir.c: Update.
3921         * gnulib/import/config.charset: Update.
3922         * gnulib/import/dirent-private.h: Update.
3923         * gnulib/import/dirent.in.h: Update.
3924         * gnulib/import/dirfd.c: Update.
3925         * gnulib/import/dirname-lgpl.c: Update.
3926         * gnulib/import/dirname.h: Update.
3927         * gnulib/import/dosname.h: Update.
3928         * gnulib/import/dup-safer-flag.c: Update.
3929         * gnulib/import/dup-safer.c: Update.
3930         * gnulib/import/dup.c: Update.
3931         * gnulib/import/dup2.c: Update.
3932         * gnulib/import/errno.in.h: Update.
3933         * gnulib/import/error.c: Update.
3934         * gnulib/import/error.h: Update.
3935         * gnulib/import/exitfail.c: Update.
3936         * gnulib/import/exitfail.h: Update.
3937         * gnulib/import/extra/update-copyright: Update.
3938         * gnulib/import/fchdir.c: Update.
3939         * gnulib/import/fcntl.c: Update.
3940         * gnulib/import/fcntl.in.h: Update.
3941         * gnulib/import/fd-hook.c: Update.
3942         * gnulib/import/fd-hook.h: Update.
3943         * gnulib/import/fd-safer-flag.c: Update.
3944         * gnulib/import/fd-safer.c: Update.
3945         * gnulib/import/fdopendir.c: Update.
3946         * gnulib/import/filename.h: Update.
3947         * gnulib/import/filenamecat-lgpl.c: Update.
3948         * gnulib/import/filenamecat.h: Update.
3949         * gnulib/import/flexmember.h: Update.
3950         * gnulib/import/float+.h: Update.
3951         * gnulib/import/float.c: Update.
3952         * gnulib/import/float.in.h: Update.
3953         * gnulib/import/fnmatch.c: Update.
3954         * gnulib/import/fnmatch.in.h: Update.
3955         * gnulib/import/fnmatch_loop.c: Update.
3956         * gnulib/import/fpucw.h: Update.
3957         * gnulib/import/frexp.c: Update.
3958         * gnulib/import/frexpl.c: Update.
3959         * gnulib/import/fstat.c: Update.
3960         * gnulib/import/fstatat.c: Update.
3961         * gnulib/import/getcwd-lgpl.c: Update.
3962         * gnulib/import/getcwd.c: Update.
3963         * gnulib/import/getdtablesize.c: Update.
3964         * gnulib/import/getlogin_r.c: Update.
3965         * gnulib/import/getprogname.c: Update.
3966         * gnulib/import/getprogname.h: Update.
3967         * gnulib/import/gettext.h: Update.
3968         * gnulib/import/gettimeofday.c: Update.
3969         * gnulib/import/glob-libc.h: Update.
3970         * gnulib/import/glob.c: Update.
3971         * gnulib/import/glob.in.h: Update.
3972         * gnulib/import/glob_internal.h: Update.
3973         * gnulib/import/glob_pattern_p.c: Update.
3974         * gnulib/import/globfree.c: Update.
3975         * gnulib/import/hard-locale.c: Update.
3976         * gnulib/import/hard-locale.h: Update.
3977         * gnulib/import/intprops.h: Update.
3978         * gnulib/import/inttypes.in.h: Update.
3979         * gnulib/import/isnan.c: Update.
3980         * gnulib/import/isnand-nolibm.h: Update.
3981         * gnulib/import/isnand.c: Update.
3982         * gnulib/import/isnanl-nolibm.h: Update.
3983         * gnulib/import/isnanl.c: Update.
3984         * gnulib/import/itold.c: Update.
3985         * gnulib/import/libc-config.h: Update.
3986         * gnulib/import/limits.in.h: Update.
3987         * gnulib/import/localcharset.c: Update.
3988         * gnulib/import/localcharset.h: Update.
3989         * gnulib/import/localtime-buffer.c: Update.
3990         * gnulib/import/localtime-buffer.h: Update.
3991         * gnulib/import/lstat.c: Update.
3992         * gnulib/import/m4/00gnulib.m4: Update.
3993         * gnulib/import/m4/__inline.m4: Update.
3994         * gnulib/import/m4/absolute-header.m4: Update.
3995         * gnulib/import/m4/alloca.m4: Update.
3996         * gnulib/import/m4/builtin-expect.m4: Update.
3997         * gnulib/import/m4/canonicalize.m4: Update.
3998         * gnulib/import/m4/chdir-long.m4: Update.
3999         * gnulib/import/m4/close.m4: Update.
4000         * gnulib/import/m4/closedir.m4: Update.
4001         * gnulib/import/m4/configmake.m4: Update.
4002         * gnulib/import/m4/d-ino.m4: Update.
4003         * gnulib/import/m4/d-type.m4: Update.
4004         * gnulib/import/m4/dirent_h.m4: Update.
4005         * gnulib/import/m4/dirfd.m4: Update.
4006         * gnulib/import/m4/dirname.m4: Update.
4007         * gnulib/import/m4/double-slash-root.m4: Update.
4008         * gnulib/import/m4/dup.m4: Update.
4009         * gnulib/import/m4/dup2.m4: Update.
4010         * gnulib/import/m4/eealloc.m4: Update.
4011         * gnulib/import/m4/environ.m4: Update.
4012         * gnulib/import/m4/errno_h.m4: Update.
4013         * gnulib/import/m4/error.m4: Update.
4014         * gnulib/import/m4/exponentd.m4: Update.
4015         * gnulib/import/m4/exponentl.m4: Update.
4016         * gnulib/import/m4/extensions.m4: Update.
4017         * gnulib/import/m4/extern-inline.m4: Update.
4018         * gnulib/import/m4/fchdir.m4: Update.
4019         * gnulib/import/m4/fcntl-o.m4: Update.
4020         * gnulib/import/m4/fcntl.m4: Update.
4021         * gnulib/import/m4/fcntl_h.m4: Update.
4022         * gnulib/import/m4/fdopendir.m4: Update.
4023         * gnulib/import/m4/filenamecat.m4: Update.
4024         * gnulib/import/m4/flexmember.m4: Update.
4025         * gnulib/import/m4/float_h.m4: Update.
4026         * gnulib/import/m4/fnmatch.m4: Update.
4027         * gnulib/import/m4/fnmatch_h.m4: Update.
4028         * gnulib/import/m4/fpieee.m4: Update.
4029         * gnulib/import/m4/frexp.m4: Update.
4030         * gnulib/import/m4/frexpl.m4: Update.
4031         * gnulib/import/m4/fstat.m4: Update.
4032         * gnulib/import/m4/fstatat.m4: Update.
4033         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4034         * gnulib/import/m4/getcwd-path-max.m4: Update.
4035         * gnulib/import/m4/getcwd.m4: Update.
4036         * gnulib/import/m4/getdtablesize.m4: Update.
4037         * gnulib/import/m4/getlogin.m4: Update.
4038         * gnulib/import/m4/getlogin_r.m4: Update.
4039         * gnulib/import/m4/getpagesize.m4: Update.
4040         * gnulib/import/m4/getprogname.m4: Update.
4041         * gnulib/import/m4/gettimeofday.m4: Update.
4042         * gnulib/import/m4/glibc21.m4: Update.
4043         * gnulib/import/m4/glob.m4: Update.
4044         * gnulib/import/m4/glob_h.m4: Update.
4045         * gnulib/import/m4/gnulib-cache.m4: Update.
4046         * gnulib/import/m4/gnulib-common.m4: Update.
4047         * gnulib/import/m4/gnulib-comp.m4: Update.
4048         * gnulib/import/m4/gnulib-tool.m4: Update.
4049         * gnulib/import/m4/hard-locale.m4: Update.
4050         * gnulib/import/m4/include_next.m4: Update.
4051         * gnulib/import/m4/inttypes-pri.m4: Update.
4052         * gnulib/import/m4/inttypes.m4: Update.
4053         * gnulib/import/m4/isnand.m4: Update.
4054         * gnulib/import/m4/isnanl.m4: Update.
4055         * gnulib/import/m4/largefile.m4: Update.
4056         * gnulib/import/m4/limits-h.m4: Update.
4057         * gnulib/import/m4/localcharset.m4: Update.
4058         * gnulib/import/m4/locale-fr.m4: Update.
4059         * gnulib/import/m4/locale-ja.m4: Update.
4060         * gnulib/import/m4/locale-zh.m4: Update.
4061         * gnulib/import/m4/localtime-buffer.m4: Update.
4062         * gnulib/import/m4/longlong.m4: Update.
4063         * gnulib/import/m4/lstat.m4: Update.
4064         * gnulib/import/m4/malloc.m4: Update.
4065         * gnulib/import/m4/malloca.m4: Update.
4066         * gnulib/import/m4/math_h.m4: Update.
4067         * gnulib/import/m4/mbrtowc.m4: Update.
4068         * gnulib/import/m4/mbsinit.m4: Update.
4069         * gnulib/import/m4/mbsrtowcs.m4: Update.
4070         * gnulib/import/m4/mbstate_t.m4: Update.
4071         * gnulib/import/m4/memchr.m4: Update.
4072         * gnulib/import/m4/memmem.m4: Update.
4073         * gnulib/import/m4/mempcpy.m4: Update.
4074         * gnulib/import/m4/memrchr.m4: Update.
4075         * gnulib/import/m4/mkdir.m4: Update.
4076         * gnulib/import/m4/mkstemp.m4: Update.
4077         * gnulib/import/m4/mmap-anon.m4: Update.
4078         * gnulib/import/m4/mode_t.m4: Update.
4079         * gnulib/import/m4/msvc-inval.m4: Update.
4080         * gnulib/import/m4/msvc-nothrow.m4: Update.
4081         * gnulib/import/m4/multiarch.m4: Update.
4082         * gnulib/import/m4/nocrash.m4: Update.
4083         * gnulib/import/m4/off_t.m4: Update.
4084         * gnulib/import/m4/onceonly.m4: Update.
4085         * gnulib/import/m4/open-cloexec.m4: Update.
4086         * gnulib/import/m4/open.m4: Update.
4087         * gnulib/import/m4/openat.m4: Update.
4088         * gnulib/import/m4/opendir.m4: Update.
4089         * gnulib/import/m4/pathmax.m4: Update.
4090         * gnulib/import/m4/rawmemchr.m4: Update.
4091         * gnulib/import/m4/readdir.m4: Update.
4092         * gnulib/import/m4/readlink.m4: Update.
4093         * gnulib/import/m4/realloc.m4: Update.
4094         * gnulib/import/m4/rename.m4: Update.
4095         * gnulib/import/m4/rewinddir.m4: Update.
4096         * gnulib/import/m4/rmdir.m4: Update.
4097         * gnulib/import/m4/save-cwd.m4: Update.
4098         * gnulib/import/m4/secure_getenv.m4: Update.
4099         * gnulib/import/m4/setenv.m4: Update.
4100         * gnulib/import/m4/signal_h.m4: Update.
4101         * gnulib/import/m4/ssize_t.m4: Update.
4102         * gnulib/import/m4/stat-time.m4: Update.
4103         * gnulib/import/m4/stat.m4: Update.
4104         * gnulib/import/m4/std-gnu11.m4: Update.
4105         * gnulib/import/m4/stdbool.m4: Update.
4106         * gnulib/import/m4/stddef_h.m4: Update.
4107         * gnulib/import/m4/stdint.m4: Update.
4108         * gnulib/import/m4/stdio_h.m4: Update.
4109         * gnulib/import/m4/stdlib_h.m4: Update.
4110         * gnulib/import/m4/strchrnul.m4: Update.
4111         * gnulib/import/m4/strdup.m4: Update.
4112         * gnulib/import/m4/strerror.m4: Update.
4113         * gnulib/import/m4/string_h.m4: Update.
4114         * gnulib/import/m4/strstr.m4: Update.
4115         * gnulib/import/m4/strtok_r.m4: Update.
4116         * gnulib/import/m4/sys_socket_h.m4: Update.
4117         * gnulib/import/m4/sys_stat_h.m4: Update.
4118         * gnulib/import/m4/sys_time_h.m4: Update.
4119         * gnulib/import/m4/sys_types_h.m4: Update.
4120         * gnulib/import/m4/tempname.m4: Update.
4121         * gnulib/import/m4/time_h.m4: Update.
4122         * gnulib/import/m4/unistd-safer.m4: Update.
4123         * gnulib/import/m4/unistd_h.m4: Update.
4124         * gnulib/import/m4/warn-on-use.m4: Update.
4125         * gnulib/import/m4/wchar_h.m4: Update.
4126         * gnulib/import/m4/wchar_t.m4: Update.
4127         * gnulib/import/m4/wctype_h.m4: Update.
4128         * gnulib/import/m4/wint_t.m4: Update.
4129         * gnulib/import/malloc.c: Update.
4130         * gnulib/import/malloc/scratch_buffer.h: Update.
4131         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4132         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4133         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4134         * gnulib/import/malloca.c: Update.
4135         * gnulib/import/malloca.h: Update.
4136         * gnulib/import/malloca.valgrind: Update.
4137         * gnulib/import/math.in.h: Update.
4138         * gnulib/import/mbrtowc.c: Update.
4139         * gnulib/import/mbsinit.c: Update.
4140         * gnulib/import/mbsrtowcs-impl.h: Update.
4141         * gnulib/import/mbsrtowcs-state.c: Update.
4142         * gnulib/import/mbsrtowcs.c: Update.
4143         * gnulib/import/memchr.c: Update.
4144         * gnulib/import/memmem.c: Update.
4145         * gnulib/import/mempcpy.c: Update.
4146         * gnulib/import/memrchr.c: Update.
4147         * gnulib/import/mkdir.c: Update.
4148         * gnulib/import/mkstemp.c: Update.
4149         * gnulib/import/msvc-inval.c: Update.
4150         * gnulib/import/msvc-inval.h: Update.
4151         * gnulib/import/msvc-nothrow.c: Update.
4152         * gnulib/import/msvc-nothrow.h: Update.
4153         * gnulib/import/open.c: Update.
4154         * gnulib/import/openat-die.c: Update.
4155         * gnulib/import/openat-priv.h: Update.
4156         * gnulib/import/openat-proc.c: Update.
4157         * gnulib/import/openat.c: Update.
4158         * gnulib/import/openat.h: Update.
4159         * gnulib/import/opendir.c: Update.
4160         * gnulib/import/pathmax.h: Update.
4161         * gnulib/import/pipe-safer.c: Update.
4162         * gnulib/import/rawmemchr.c: Update.
4163         * gnulib/import/readdir.c: Update.
4164         * gnulib/import/readlink.c: Update.
4165         * gnulib/import/realloc.c: Update.
4166         * gnulib/import/ref-add.sin: Update.
4167         * gnulib/import/ref-del.sin: Update.
4168         * gnulib/import/rename.c: Update.
4169         * gnulib/import/rewinddir.c: Update.
4170         * gnulib/import/rmdir.c: Update.
4171         * gnulib/import/same-inode.h: Update.
4172         * gnulib/import/save-cwd.c: Update.
4173         * gnulib/import/save-cwd.h: Update.
4174         * gnulib/import/scratch_buffer.h: Update.
4175         * gnulib/import/secure_getenv.c: Update.
4176         * gnulib/import/setenv.c: Update.
4177         * gnulib/import/signal.in.h: Update.
4178         * gnulib/import/stat-time.c: Update.
4179         * gnulib/import/stat-time.h: Update.
4180         * gnulib/import/stat-w32.c: Update.
4181         * gnulib/import/stat-w32.h: Update.
4182         * gnulib/import/stat.c: Update.
4183         * gnulib/import/stdbool.in.h: Update.
4184         * gnulib/import/stddef.in.h: Update.
4185         * gnulib/import/stdint.in.h: Update.
4186         * gnulib/import/stdio.in.h: Update.
4187         * gnulib/import/stdlib.in.h: Update.
4188         * gnulib/import/str-two-way.h: Update.
4189         * gnulib/import/strchrnul.c: Update.
4190         * gnulib/import/strdup.c: Update.
4191         * gnulib/import/streq.h: Update.
4192         * gnulib/import/strerror-override.c: Update.
4193         * gnulib/import/strerror-override.h: Update.
4194         * gnulib/import/strerror.c: Update.
4195         * gnulib/import/string.in.h: Update.
4196         * gnulib/import/stripslash.c: Update.
4197         * gnulib/import/strnlen1.c: Update.
4198         * gnulib/import/strnlen1.h: Update.
4199         * gnulib/import/strstr.c: Update.
4200         * gnulib/import/strtok_r.c: Update.
4201         * gnulib/import/sys_stat.in.h: Update.
4202         * gnulib/import/sys_time.in.h: Update.
4203         * gnulib/import/sys_types.in.h: Update.
4204         * gnulib/import/tempname.c: Update.
4205         * gnulib/import/tempname.h: Update.
4206         * gnulib/import/time.in.h: Update.
4207         * gnulib/import/unistd--.h: Update.
4208         * gnulib/import/unistd-safer.h: Update.
4209         * gnulib/import/unistd.in.h: Update.
4210         * gnulib/import/unsetenv.c: Update.
4211         * gnulib/import/verify.h: Update.
4212         * gnulib/import/extra/snippet/warn-on-use.h: Update.
4213         * gnulib/import/wchar.in.h: Update.
4214         * gnulib/import/wctype.in.h: Update.
4215         * gnulib/import/xalloc-oversized.h: Update.
4216         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
4217         "53e2c179f26a890fa6685af4b6c1397ee370433b".
4218
4219 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
4220
4221         * record-btrace.c (get_thread_current_frame): Remove
4222         old_inferior_ptid.
4223
4224 2018-09-10  Jerome Guitton  <guitton@adacore.com>
4225
4226         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
4227         with check_tag to 1 if and only if the type is tagged and the
4228         component being searched cannot been found in the current
4229         view. Otherwise, always call ada_to_fixed_type with
4230         check_tag to 0.
4231
4232 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4233
4234         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
4235         declaration.
4236         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
4237         * ada-varobj.c (ada_varobj_get_number_of_children,
4238         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
4239
4240 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4241
4242         * ada-valprint.c (ada_value_print): Use type instead of
4243         enclosing type.
4244
4245 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4246
4247         * ada-lang.c (ada_value_subscript): Handle case when parameter is
4248         an array of access to unconstrained array.
4249
4250 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4251
4252         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
4253         (ada_check_typedef): Use it.
4254
4255 2018-09-10  Xavier Roirand  <roirand@adacore.com>
4256
4257         * ada-varobj.c (ada_varobj_describe_struct_child)
4258         (ada_varobj_describe_child): Handle union case like struct one.
4259
4260 2018-09-10  Tom Tromey  <tom@tromey.com>
4261
4262         PR python/18380:
4263         * python/python.c (_initialize_python): Make example in "python"
4264         help work in Python 3.
4265
4266 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
4267
4268         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
4269         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
4270         $(EXEEXT) to the script, as it is not a program.
4271
4272 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4273
4274         * python/py-prettyprint.c (pretty_print_one_value): Return
4275         gdbpy_ref<>.
4276         (print_string_repr): Adjust.
4277         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
4278         * python/python-internal.h (apply_varobj_pretty_printer): Return
4279         gdbpy_ref<>.
4280         * varobj.c (varobj_value_get_print_value): Adjust.
4281
4282 2018-09-08  Tom Tromey  <tom@tromey.com>
4283
4284         PR python/16047:
4285         * python/py-prettyprint.c (pretty_print_one_value): Check for
4286         to_string method.
4287
4288 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4289
4290         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
4291         replace_operator_with_call.
4292
4293 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4294
4295         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
4296
4297 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4298
4299         * ada-typeprint.c (print_range): Print the bounds using TYPE
4300         rather than its TYPE_TARGET_TYPE.
4301
4302 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4303
4304         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
4305         call to ada_to_fixed_value_create.
4306
4307 2018-09-08  Jerome Guitton  <guitton@adacore.com>
4308
4309         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
4310
4311 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4312
4313         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
4314         by calls to error.
4315
4316 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4317
4318         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
4319         Move update of loop variable "fi".
4320
4321 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
4322
4323         * ada-lang.c (value_assign_to_component): In the case of
4324         big-endian targets, extract the bits of the given VAL
4325         using an src_offset of zero if container is not a scalar.
4326
4327 2018-09-06  Simon Ser  <contact@emersion.fr>
4328
4329         PR gdb/23105
4330         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
4331         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4332         * fbsd-tdep.c (fbsd_make_note_desc): New.
4333         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
4334         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
4335         * target.h (enum target_object) Add FreeBSD-specific
4336         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
4337
4338 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4339
4340         * compile/compile-c.h (generate_c_for_variable_locations):
4341         Change reference to pointer.
4342         * compile/compile-c-support.c (compile_program) <compute>:
4343         Likewise.
4344         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4345         (generate_c_for_for_one_variable): Likewise
4346         (generate_c_for_variable_locations): Likewise
4347         * compile/compile-c-types.c (compile_c_instance::convert_type):
4348         Likewise
4349         * compile/compile-cplus-symbols.c (convert_one_symbol):
4350         std::move the scope passed to enter_scope.
4351         * compile/compile-cplus-types.c
4352         (compile_cplus_instance::enter_scope): Make parameter
4353         rvalue-reference.
4354         (compile_cplus_instance::new_scope): Change reference to
4355         pointer.
4356         (compile_cplus_instance::convert_type): Likewise
4357         (compile_cplus_convert_typedef): std::move the scope passed to
4358         enter_scope.
4359         (compile_cplus_convert_struct_or_union): Likewise.
4360         (compile_cplus_convert_enum): Likewise.
4361         (compile_cplus_convert_namespace): Likewise.
4362         * compile/compile-cplus.h (compile_cplus_instance)
4363         <enter_scope>: Make parameter rvalue-reference.
4364         * compile/compile-internal.h (compile_instance)
4365         <get_cached_type>: Likewise
4366         * compile/compile-loc2c.c (push): Likewise
4367         (pushf): Likewise
4368         (unary): Likewise
4369         (binary): Likewise
4370         (print_label): Likewise
4371         (pushf_register_address): Likewise
4372         (pushf_register): Likewise
4373         (do_compile_dwarf_expr_to_c): Likewise
4374         (compile_dwarf_expr_to_c): Likewise
4375         (compile_dwarf_bounds_to_c): Likewise
4376         * compile/compile.c (compile_instance::get_cached_type):
4377         Likewise
4378         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
4379         (compile_dwarf_bounds_to_c): Likewise
4380         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
4381         (dwarf2_compile_property_to_c): Likewise
4382         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
4383         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4384         Likewise
4385
4386 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4387
4388         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
4389         * tui/tui-data.c (init_content_element): Don't initialize it.
4390
4391 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
4392
4393         * tui/tui-data.h (struct tui_win_info)
4394         <detail::opaque>: Remove.
4395         * tui/tui-data.c (init_win_info): Remove assignment.
4396
4397 2018-09-05  Tom Tromey  <tom@tromey.com>
4398
4399         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
4400         -Wformat-nonliteral.
4401         * target-float.c (host_float_ops<T>::to_string)
4402         (host_float_ops<T>::from_string): Use
4403         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4404         * configure: Rebuild.
4405
4406 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4407
4408         * printcmd.c (printf_c_string): Use
4409         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
4410         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
4411
4412 2018-09-05  Tom Tromey  <tom@tromey.com>
4413
4414         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
4415
4416 2018-09-05  Tom de Vries  <tdevries@suse.de>
4417
4418         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
4419         with resolve_abstract_p == true.
4420         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
4421         defaulting to false. Propagate resolve_abstract_p to
4422         dwarf2_fetch_die_loc_sect_off.
4423         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
4424         parameter, defaulting to false.
4425         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
4426         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
4427         parameter.
4428         * dwarf2read.h (struct die_info): Forward-declare.
4429         (die_info_ptr): New typedef.
4430         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
4431
4432 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
4433
4434         GDB 8.2 released.
4435
4436 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
4437             Pedro Alves  <palves@redhat.com>
4438
4439         * gnulib/Makefile.in (aclocal_m4_deps): Move to
4440         "aclocal-m4-deps.mk".  Include file here.
4441         $(srcdir)/aclocal.m4: Add "configure.ac".
4442         * gnulib/aclocal-m4-deps.mk: New file.
4443         * gnulib/update-gnulib.sh: Automatically update
4444         "aclocal-m4-deps.mk".
4445
4446 2018-09-04  Tom Tromey  <tom@tromey.com>
4447
4448         * configure: Rebuild.
4449         * configure.ac: Remove multi-ice code.
4450
4451 2018-09-04  Tom Tromey  <tom@tromey.com>
4452
4453         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
4454         (ada-exp.o): Update.
4455
4456 2018-09-04  Tom Tromey  <tom@tromey.com>
4457
4458         * Makefile.in (printcmd.o, target-float.o): Remove.
4459         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
4460
4461 2018-09-04  Tom Tromey  <tom@tromey.com>
4462
4463         * gnulib/Makefile.in: Remove obsolete comment.
4464         * Makefile.in: Remove obsolete comment.
4465
4466 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
4467
4468         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
4469         line with '+'.
4470
4471 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4472
4473         * riscv-tdep.c: Add 'prologue-value.h' include.
4474         (struct riscv_unwind_cache): New struct.
4475         (riscv_debug_unwinder): New global.
4476         (riscv_scan_prologue): Update arguments, capture register details
4477         from prologue scan.
4478         (riscv_skip_prologue): Reformat arguments line, move end of
4479         prologue calculation into riscv_scan_prologue.
4480         (riscv_frame_cache): Update return type, create
4481         riscv_unwind_cache, scan the prologue, and fill in remaining cache
4482         details.
4483         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
4484         (riscv_frame_prev_register): Use the trad_frame within the
4485         riscv_unwind_cache.
4486         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
4487         flag.
4488
4489 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
4490
4491         * trad-frame.h (trad_frame_set_realreg): Declare.
4492         (trad_frame_set_addr): Declare.
4493         * trad-frame.c (trad_frame_set_realreg): Define new function.
4494         (trad_frame_set_addr): Define new function.
4495         (trad_frame_set_reg_realreg): Use new function.
4496         (trad_frame_set_reg_addr): Use new function.
4497
4498 2018-09-01  Keith Seitz  <keiths@redhat.com>
4499
4500         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
4501         pulongest instead of "%lld".
4502         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
4503         ATTRIBUTE_UNUSED.
4504
4505 2018-08-31  Tom Tromey  <tom@tromey.com>
4506
4507         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
4508         variant part type.
4509
4510 2018-08-31  Pedro Alves  <palves@redhat.com>
4511
4512         * gdbarch.h: Regenerate.
4513
4514 2018-08-31  Pedro Alves  <palves@redhat.com>
4515
4516         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
4517         * target.h (Hardware watchpoint interfaces): Describe
4518         continuable/steppable/non-steppable watchpoints.
4519         * gdbarch.h, gdbarch.c: Regenerate.
4520
4521 2018-08-31  Pedro Alves  <palves@redhat.com>
4522
4523         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
4524         Delete.
4525         * s390-linux-nat.c
4526         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
4527         * target.h (target_ops::have_continuable_watchpoint): Delete.
4528         (target_have_continuable_watchpoint): Delete.
4529         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
4530         * target-delegates.c: Regenerate.
4531
4532 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4533
4534         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
4535         the files present in "gnulib/import/m4/".
4536
4537 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4538
4539         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
4540         c.sw, c.swsp, and c.sdsp.
4541
4542 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4543
4544         * riscv-tdep.c (struct riscv_inferior_data): Delete.
4545         (riscv_read_misa_reg): Don't cache value read into inferior data.
4546         (riscv_new_inferior_data): Delete.
4547         (riscv_inferior_data_cleanup): Delete.
4548         (riscv_inferior_data): Delete.
4549         (riscv_invalidate_inferior_data): Delete.
4550         (_initialize_riscv_tdep): Remove initialisation of inferior data.
4551
4552 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
4553
4554         * compile/compile-cplus-types.c
4555         (compile_cplus_instance::leave_scope): Take the address of scope
4556         object.
4557         (compile_cplus_instance::convert_qualified_base): Compare quals
4558         to 0.
4559
4560 2018-08-30  Keith Seitz  <keiths@redhat.com>
4561
4562         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
4563         Use "%s" and host_address_to_string instead of "%p" in printf.
4564
4565 2018-08-29  Keith Seitz  <keiths@redhat.com>
4566
4567         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
4568         and compile-cplus-types.c.
4569         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
4570         * c-lang.c (cplus_language_defn): Set C++ compile functions.
4571         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
4572         Declare.
4573         * compile/compile-c-support.c: Include compile-cplus.h.
4574         (load_libcompile): Templatize.
4575         (get_compile_context): "New" function.
4576         (c_get_compile_context): Use get_compile_context.
4577         (cplus_get_compile_context): New function.
4578         (cplus_push_user_expression, cplus_pop_user_expression)
4579         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
4580         (cplus_compute_program): Define new structs/functions.
4581         * compile/compile-cplus-symmbols.c: New file.
4582         * compile/compile-cplus-types.c: New file.
4583         * compile/compile-cplus.h: New file.
4584         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
4585         Declare.
4586         * compile/compile-object-load.c (get_out_value_type): Use
4587         strncmp_iw when comparing symbol names.
4588         (compile_object_load): Add mst_bss and mst_data.
4589         * compile/compile.c (_initialize_compile): Remove
4590         -Wno-implicit-function-declaration from `compile_args'.
4591         * compile/gcc-cp-plugin.h: New file.
4592         * NEWS: Mention C++ compile support and new debug options.
4593
4594 2018-08-29  Keith Seitz  <keiths@redhat.com>
4595
4596         * linespec.c (collect_info::add_symbol): Make virtual.
4597         (struct symbol_searcher_collect_info): New struct.
4598         (symbol_searcher::find_all_symbols): New method.
4599         * symtab.h (class symbol_searcher): New class.
4600
4601 2018-08-29  Keith Seitz  <keiths@redhat.com>
4602
4603         * linespec.c (struct linespec) <function_symbols, label_symbols>:
4604         Change to vector of block_symbol.  Update all users.
4605         (struct collect_info) <symbols>: Likewise.
4606         (collect_info::add_symbol): Take block_symbol as argument.
4607         Update all callers.
4608         (decode_compound_collector) <m_symbols>: Change type to vector
4609         of block_symbol.  Update all users.
4610         (decode_compound_collector::operator ()): Change parameter type
4611         to block_symbol.
4612         (find_method, find_function_symbols, find_linespec_symbols)
4613         (find_label_symbols_in_block, find_label_symbols): Change symbol
4614         vectors to block_symbol vectors.
4615         * symtab.h (symbol_found_callback_ftype): Change parameter type to
4616         block_symbol.
4617
4618 2018-08-29  Keith Seitz  <keiths@redhat.com>
4619
4620         * linespec.c (symbolp): Remove typedef and VEC definitions.
4621         (bound_minimal_symbol_d): Likewise.
4622
4623 2018-08-29  Keith Seitz  <keiths@redhat.com>
4624
4625         * linespec.c (decode_compound_collector::decode_compound_collector):
4626         Remove initialization for `m_symtabs'.
4627         (decode_compound_collector::release_symbols): Change return type
4628         to std::vector.  Update all callers.
4629         (class decode_compound_collector) <m_symbols>: Change type to
4630         std::vector.
4631         (lookup_prefix_sym): Change return type to std::vector.  Update all
4632         callers.
4633         (compare_symbols): Remove.
4634         (std_compare_symbols): Rename to `compare_symbols'.
4635         (find_method): Change `sym_classes' parameter to std::vector.
4636         Update all callers.  Use std::sort to sort sym_classes.
4637         (find_linespec_symbols): Remove cleanup.
4638
4639 2018-08-29  Keith Seitz  <keiths@redhat.com>
4640
4641         * linespec.c (struct linespec) <minimal_symbols>: Change type to
4642         std::vector.  Update all users.
4643         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
4644         (struct collect_info) <minimal_symbols>: Likewise.
4645         (compare_msymbols): Return bool.  Change parameters to const
4646         bound_minimal_symbol references.
4647         (find_method, find_function_symbols, find_linespec_symbols): Change
4648         `minsyms' parameter to std::vector.  Update all callers.
4649
4650 2018-08-29  Keith Seitz  <keiths@redhat.com>
4651
4652         * linespec.c (struct linespec) <label_symbols>: Change type to
4653         std::vector.  Update all users.
4654         (find_label_symbols_in_block): Change `result' parameter to
4655         std::vector.  Update all callers.
4656         (find_label_symbols): Return std::vector.  Update all callers.
4657
4658 2018-08-29  Keith Seitz  <keiths@redhat.com>
4659
4660         * linespec.c (struct linespec) <function_symbols>: Change type to
4661         std::vector.  Update all users.
4662         (struct collect_info) <function_symbols>: Likewise.
4663         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
4664         (std_compare_symbols): New function.
4665         (find_method, find_function_symbols, find_linespec_symbols)
4666         (find_label_symbols_in_block): Change `symbols' parameter to
4667         std::vector.  Update all callers.
4668         (find_label_symbols): Likewise for `function_symbols' and
4669         `label_funcs_ret'.
4670
4671 2018-08-29  Keith Seitz  <keiths@redhat.com>
4672
4673         * linespec.c (symtab_vector_up): Define.
4674         (struct linespec) <file_symtabs>: Change type to std::vector *.
4675         Update all uses.
4676         (struct collect_info) <file_symtabs>: Likewise.
4677         (collect_symtabs_from_filename): Return symtab_vector_up.
4678         Update all callers.
4679         (decode_objc): Remove cleanup.
4680         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
4681         (symtab_collector::release_symtabs): Return symtab_vector_up.
4682         Update all callers.
4683         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
4684         Update all users.
4685         (collect_symtabs_from_filename, symtabs_from_filename): Return
4686         symtab_vector_up.  Update all callers.
4687
4688 2018-08-29  Tom Tromey  <tom@tromey.com>
4689
4690         * csky-tdep.c (csky_analyze_prologue): Use
4691         core_addr_to_string_nz.
4692
4693 2018-08-29  Tom Tromey  <tom@tromey.com>
4694
4695         * windows-nat.c (struct xlate_exception) <them>: Change type to
4696         DWORD.
4697         (xlate): Fix formatting.  Remove last entry.
4698         (struct xlate_exception, xlate): Comment out.
4699         (windows_nat_target::resume): Use ranged for.
4700
4701 2018-08-29  Jim Wilson  <jimw@sifive.com>
4702
4703         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
4704         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
4705         of NT_PRFPREG.
4706         (riscv_linux_nat_target::store_registers): Likewise.
4707
4708 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4709
4710         PR gdb/23555
4711         PR gdb/23558
4712         * gnulib/aclocal.m4: Regenerate.
4713         * gnulib/config.in: Regenerate.
4714         * gnulib/configure: Regenerate.
4715         * gnulib/import/Makefile.am: Update.
4716         * gnulib/import/Makefile.in: Update.
4717         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
4718         * gnulib/import/_Noreturn.h: ... this.
4719         * gnulib/import/alloca.in.h: Update.
4720         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
4721         * gnulib/import/arg-nonnull.h: ... this.
4722         * gnulib/import/assure.h: Update.
4723         * gnulib/import/at-func.c: Update.
4724         * gnulib/import/basename-lgpl.c: Update.
4725         * gnulib/import/extra/snippet/c++defs.h: Rename to...
4726         * gnulib/import/c++defs.h: ... this.
4727         * gnulib/import/canonicalize-lgpl.c: Update.
4728         * gnulib/import/cdefs.h: Update.
4729         * gnulib/import/chdir-long.c: Update.
4730         * gnulib/import/chdir-long.h: Update.
4731         * gnulib/import/cloexec.c: Update.
4732         * gnulib/import/cloexec.h: Update.
4733         * gnulib/import/close.c: Update.
4734         * gnulib/import/closedir.c: Update.
4735         * gnulib/import/config.charset: Update.
4736         * gnulib/import/dirent-private.h: Update.
4737         * gnulib/import/dirent.in.h: Update.
4738         * gnulib/import/dirfd.c: Update.
4739         * gnulib/import/dirname-lgpl.c: Update.
4740         * gnulib/import/dirname.h: Update.
4741         * gnulib/import/dosname.h: Update.
4742         * gnulib/import/dup-safer-flag.c: Update.
4743         * gnulib/import/dup-safer.c: Update.
4744         * gnulib/import/dup.c: Update.
4745         * gnulib/import/dup2.c: Update.
4746         * gnulib/import/errno.in.h: Update.
4747         * gnulib/import/error.c: Update.
4748         * gnulib/import/error.h: Update.
4749         * gnulib/import/exitfail.c: Update.
4750         * gnulib/import/exitfail.h: Update.
4751         * gnulib/import/extra/update-copyright: Update.
4752         * gnulib/import/fchdir.c: Update.
4753         * gnulib/import/fcntl.c: Update.
4754         * gnulib/import/fcntl.in.h: Update.
4755         * gnulib/import/fd-hook.c: Update.
4756         * gnulib/import/fd-hook.h: Update.
4757         * gnulib/import/fd-safer-flag.c: Update.
4758         * gnulib/import/fd-safer.c: Update.
4759         * gnulib/import/fdopendir.c: Update.
4760         * gnulib/import/filename.h: Update.
4761         * gnulib/import/filenamecat-lgpl.c: Update.
4762         * gnulib/import/filenamecat.h: Update.
4763         * gnulib/import/flexmember.h: Update.
4764         * gnulib/import/float+.h: Update.
4765         * gnulib/import/float.c: Update.
4766         * gnulib/import/float.in.h: Update.
4767         * gnulib/import/fnmatch.c: Update.
4768         * gnulib/import/fnmatch.in.h: Update.
4769         * gnulib/import/fnmatch_loop.c: Update.
4770         * gnulib/import/fpucw.h: Update.
4771         * gnulib/import/frexp.c: Update.
4772         * gnulib/import/frexpl.c: Update.
4773         * gnulib/import/fstat.c: Update.
4774         * gnulib/import/fstatat.c: Update.
4775         * gnulib/import/getcwd-lgpl.c: Update.
4776         * gnulib/import/getcwd.c: Update.
4777         * gnulib/import/getdtablesize.c: Update.
4778         * gnulib/import/getlogin_r.c: Update.
4779         * gnulib/import/getprogname.c: Update.
4780         * gnulib/import/getprogname.h: Update.
4781         * gnulib/import/gettext.h: Update.
4782         * gnulib/import/gettimeofday.c: Update.
4783         * gnulib/import/glob-libc.h: Update.
4784         * gnulib/import/glob.c: Update.
4785         * gnulib/import/glob.in.h: Update.
4786         * gnulib/import/glob_internal.h: Update.
4787         * gnulib/import/glob_pattern_p.c: Update.
4788         * gnulib/import/globfree.c: Update.
4789         * gnulib/import/hard-locale.c: Update.
4790         * gnulib/import/hard-locale.h: Update.
4791         * gnulib/import/intprops.h: Update.
4792         * gnulib/import/inttypes.in.h: Update.
4793         * gnulib/import/isnan.c: Update.
4794         * gnulib/import/isnand-nolibm.h: Update.
4795         * gnulib/import/isnand.c: Update.
4796         * gnulib/import/isnanl-nolibm.h: Update.
4797         * gnulib/import/isnanl.c: Update.
4798         * gnulib/import/itold.c: Update.
4799         * gnulib/import/libc-config.h: Update.
4800         * gnulib/import/limits.in.h: Update.
4801         * gnulib/import/localcharset.c: Update.
4802         * gnulib/import/localcharset.h: Update.
4803         * gnulib/import/localtime-buffer.c: Update.
4804         * gnulib/import/localtime-buffer.h: Update.
4805         * gnulib/import/lstat.c: Update.
4806         * gnulib/import/m4/00gnulib.m4: Update.
4807         * gnulib/import/m4/__inline.m4: Update.
4808         * gnulib/import/m4/absolute-header.m4: Update.
4809         * gnulib/import/m4/alloca.m4: Update.
4810         * gnulib/import/m4/builtin-expect.m4: Update.
4811         * gnulib/import/m4/canonicalize.m4: Update.
4812         * gnulib/import/m4/chdir-long.m4: Update.
4813         * gnulib/import/m4/close.m4: Update.
4814         * gnulib/import/m4/closedir.m4: Update.
4815         * gnulib/import/m4/configmake.m4: Update.
4816         * gnulib/import/m4/d-ino.m4: Update.
4817         * gnulib/import/m4/d-type.m4: Update.
4818         * gnulib/import/m4/dirent_h.m4: Update.
4819         * gnulib/import/m4/dirfd.m4: Update.
4820         * gnulib/import/m4/dirname.m4: Update.
4821         * gnulib/import/m4/double-slash-root.m4: Update.
4822         * gnulib/import/m4/dup.m4: Update.
4823         * gnulib/import/m4/dup2.m4: Update.
4824         * gnulib/import/m4/eealloc.m4: Update.
4825         * gnulib/import/m4/environ.m4: Update.
4826         * gnulib/import/m4/errno_h.m4: Update.
4827         * gnulib/import/m4/error.m4: Update.
4828         * gnulib/import/m4/exponentd.m4: Update.
4829         * gnulib/import/m4/exponentl.m4: Update.
4830         * gnulib/import/m4/extensions.m4: Update.
4831         * gnulib/import/m4/extern-inline.m4: Update.
4832         * gnulib/import/m4/fchdir.m4: Update.
4833         * gnulib/import/m4/fcntl-o.m4: Update.
4834         * gnulib/import/m4/fcntl.m4: Update.
4835         * gnulib/import/m4/fcntl_h.m4: Update.
4836         * gnulib/import/m4/fdopendir.m4: Update.
4837         * gnulib/import/m4/filenamecat.m4: Update.
4838         * gnulib/import/m4/flexmember.m4: Update.
4839         * gnulib/import/m4/float_h.m4: Update.
4840         * gnulib/import/m4/fnmatch.m4: Update.
4841         * gnulib/import/m4/fnmatch_h.m4: Update.
4842         * gnulib/import/m4/fpieee.m4: Update.
4843         * gnulib/import/m4/frexp.m4: Update.
4844         * gnulib/import/m4/frexpl.m4: Update.
4845         * gnulib/import/m4/fstat.m4: Update.
4846         * gnulib/import/m4/fstatat.m4: Update.
4847         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
4848         * gnulib/import/m4/getcwd-path-max.m4: Update.
4849         * gnulib/import/m4/getcwd.m4: Update.
4850         * gnulib/import/m4/getdtablesize.m4: Update.
4851         * gnulib/import/m4/getlogin.m4: Update.
4852         * gnulib/import/m4/getlogin_r.m4: Update.
4853         * gnulib/import/m4/getpagesize.m4: Update.
4854         * gnulib/import/m4/getprogname.m4: Update.
4855         * gnulib/import/m4/gettimeofday.m4: Update.
4856         * gnulib/import/m4/glibc21.m4: Update.
4857         * gnulib/import/m4/glob.m4: Update.
4858         * gnulib/import/m4/glob_h.m4: Update.
4859         * gnulib/import/m4/gnulib-cache.m4: Update.
4860         * gnulib/import/m4/gnulib-common.m4: Update.
4861         * gnulib/import/m4/gnulib-comp.m4: Update.
4862         * gnulib/import/m4/gnulib-tool.m4: Update.
4863         * gnulib/import/m4/hard-locale.m4: Update.
4864         * gnulib/import/m4/include_next.m4: Update.
4865         * gnulib/import/m4/inttypes-pri.m4: Update.
4866         * gnulib/import/m4/inttypes.m4: Update.
4867         * gnulib/import/m4/isnand.m4: Update.
4868         * gnulib/import/m4/isnanl.m4: Update.
4869         * gnulib/import/m4/largefile.m4: Update.
4870         * gnulib/import/m4/limits-h.m4: Update.
4871         * gnulib/import/m4/localcharset.m4: Update.
4872         * gnulib/import/m4/locale-fr.m4: Update.
4873         * gnulib/import/m4/locale-ja.m4: Update.
4874         * gnulib/import/m4/locale-zh.m4: Update.
4875         * gnulib/import/m4/localtime-buffer.m4: Update.
4876         * gnulib/import/m4/longlong.m4: Update.
4877         * gnulib/import/m4/lstat.m4: Update.
4878         * gnulib/import/m4/malloc.m4: Update.
4879         * gnulib/import/m4/malloca.m4: Update.
4880         * gnulib/import/m4/math_h.m4: Update.
4881         * gnulib/import/m4/mbrtowc.m4: Update.
4882         * gnulib/import/m4/mbsinit.m4: Update.
4883         * gnulib/import/m4/mbsrtowcs.m4: Update.
4884         * gnulib/import/m4/mbstate_t.m4: Update.
4885         * gnulib/import/m4/memchr.m4: Update.
4886         * gnulib/import/m4/memmem.m4: Update.
4887         * gnulib/import/m4/mempcpy.m4: Update.
4888         * gnulib/import/m4/memrchr.m4: Update.
4889         * gnulib/import/m4/mkdir.m4: Update.
4890         * gnulib/import/m4/mkstemp.m4: Update.
4891         * gnulib/import/m4/mmap-anon.m4: Update.
4892         * gnulib/import/m4/mode_t.m4: Update.
4893         * gnulib/import/m4/msvc-inval.m4: Update.
4894         * gnulib/import/m4/msvc-nothrow.m4: Update.
4895         * gnulib/import/m4/multiarch.m4: Update.
4896         * gnulib/import/m4/nocrash.m4: Update.
4897         * gnulib/import/m4/off_t.m4: Update.
4898         * gnulib/import/m4/onceonly.m4: Update.
4899         * gnulib/import/m4/open-cloexec.m4: Update.
4900         * gnulib/import/m4/open.m4: Update.
4901         * gnulib/import/m4/openat.m4: Update.
4902         * gnulib/import/m4/opendir.m4: Update.
4903         * gnulib/import/m4/pathmax.m4: Update.
4904         * gnulib/import/m4/rawmemchr.m4: Update.
4905         * gnulib/import/m4/readdir.m4: Update.
4906         * gnulib/import/m4/readlink.m4: Update.
4907         * gnulib/import/m4/realloc.m4: Update.
4908         * gnulib/import/m4/rename.m4: Update.
4909         * gnulib/import/m4/rewinddir.m4: Update.
4910         * gnulib/import/m4/rmdir.m4: Update.
4911         * gnulib/import/m4/save-cwd.m4: Update.
4912         * gnulib/import/m4/secure_getenv.m4: Update.
4913         * gnulib/import/m4/setenv.m4: Update.
4914         * gnulib/import/m4/signal_h.m4: Update.
4915         * gnulib/import/m4/ssize_t.m4: Update.
4916         * gnulib/import/m4/stat-time.m4: Update.
4917         * gnulib/import/m4/stat.m4: Update.
4918         * gnulib/import/m4/std-gnu11.m4: Update.
4919         * gnulib/import/m4/stdbool.m4: Update.
4920         * gnulib/import/m4/stddef_h.m4: Update.
4921         * gnulib/import/m4/stdint.m4: Update.
4922         * gnulib/import/m4/stdio_h.m4: Update.
4923         * gnulib/import/m4/stdlib_h.m4: Update.
4924         * gnulib/import/m4/strchrnul.m4: Update.
4925         * gnulib/import/m4/strdup.m4: Update.
4926         * gnulib/import/m4/strerror.m4: Update.
4927         * gnulib/import/m4/string_h.m4: Update.
4928         * gnulib/import/m4/strstr.m4: Update.
4929         * gnulib/import/m4/strtok_r.m4: Update.
4930         * gnulib/import/m4/sys_socket_h.m4: Update.
4931         * gnulib/import/m4/sys_stat_h.m4: Update.
4932         * gnulib/import/m4/sys_time_h.m4: Update.
4933         * gnulib/import/m4/sys_types_h.m4: Update.
4934         * gnulib/import/m4/tempname.m4: Update.
4935         * gnulib/import/m4/time_h.m4: Update.
4936         * gnulib/import/m4/unistd-safer.m4: Update.
4937         * gnulib/import/m4/unistd_h.m4: Update.
4938         * gnulib/import/m4/warn-on-use.m4: Update.
4939         * gnulib/import/m4/wchar_h.m4: Update.
4940         * gnulib/import/m4/wchar_t.m4: Update.
4941         * gnulib/import/m4/wctype_h.m4: Update.
4942         * gnulib/import/m4/wint_t.m4: Update.
4943         * gnulib/import/malloc.c: Update.
4944         * gnulib/import/malloc/scratch_buffer.h: Update.
4945         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
4946         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
4947         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
4948         * gnulib/import/malloca.c: Update.
4949         * gnulib/import/malloca.h: Update.
4950         * gnulib/import/malloca.valgrind: Update.
4951         * gnulib/import/math.in.h: Update.
4952         * gnulib/import/mbrtowc.c: Update.
4953         * gnulib/import/mbsinit.c: Update.
4954         * gnulib/import/mbsrtowcs-impl.h: Update.
4955         * gnulib/import/mbsrtowcs-state.c: Update.
4956         * gnulib/import/mbsrtowcs.c: Update.
4957         * gnulib/import/memchr.c: Update.
4958         * gnulib/import/memmem.c: Update.
4959         * gnulib/import/mempcpy.c: Update.
4960         * gnulib/import/memrchr.c: Update.
4961         * gnulib/import/mkdir.c: Update.
4962         * gnulib/import/mkstemp.c: Update.
4963         * gnulib/import/msvc-inval.c: Update.
4964         * gnulib/import/msvc-inval.h: Update.
4965         * gnulib/import/msvc-nothrow.c: Update.
4966         * gnulib/import/msvc-nothrow.h: Update.
4967         * gnulib/import/open.c: Update.
4968         * gnulib/import/openat-die.c: Update.
4969         * gnulib/import/openat-priv.h: Update.
4970         * gnulib/import/openat-proc.c: Update.
4971         * gnulib/import/openat.c: Update.
4972         * gnulib/import/openat.h: Update.
4973         * gnulib/import/opendir.c: Update.
4974         * gnulib/import/pathmax.h: Update.
4975         * gnulib/import/pipe-safer.c: Update.
4976         * gnulib/import/rawmemchr.c: Update.
4977         * gnulib/import/readdir.c: Update.
4978         * gnulib/import/readlink.c: Update.
4979         * gnulib/import/realloc.c: Update.
4980         * gnulib/import/ref-add.sin: Update.
4981         * gnulib/import/ref-del.sin: Update.
4982         * gnulib/import/rename.c: Update.
4983         * gnulib/import/rewinddir.c: Update.
4984         * gnulib/import/rmdir.c: Update.
4985         * gnulib/import/same-inode.h: Update.
4986         * gnulib/import/save-cwd.c: Update.
4987         * gnulib/import/save-cwd.h: Update.
4988         * gnulib/import/scratch_buffer.h: Update.
4989         * gnulib/import/secure_getenv.c: Update.
4990         * gnulib/import/setenv.c: Update.
4991         * gnulib/import/signal.in.h: Update.
4992         * gnulib/import/stat-time.c: Update.
4993         * gnulib/import/stat-time.h: Update.
4994         * gnulib/import/stat-w32.c: Update.
4995         * gnulib/import/stat-w32.h: Update.
4996         * gnulib/import/stat.c: Update.
4997         * gnulib/import/stdbool.in.h: Update.
4998         * gnulib/import/stddef.in.h: Update.
4999         * gnulib/import/stdint.in.h: Update.
5000         * gnulib/import/stdio.in.h: Update.
5001         * gnulib/import/stdlib.in.h: Update.
5002         * gnulib/import/str-two-way.h: Update.
5003         * gnulib/import/strchrnul.c: Update.
5004         * gnulib/import/strdup.c: Update.
5005         * gnulib/import/streq.h: Update.
5006         * gnulib/import/strerror-override.c: Update.
5007         * gnulib/import/strerror-override.h: Update.
5008         * gnulib/import/strerror.c: Update.
5009         * gnulib/import/string.in.h: Update.
5010         * gnulib/import/stripslash.c: Update.
5011         * gnulib/import/strnlen1.c: Update.
5012         * gnulib/import/strnlen1.h: Update.
5013         * gnulib/import/strstr.c: Update.
5014         * gnulib/import/strtok_r.c: Update.
5015         * gnulib/import/sys_stat.in.h: Update.
5016         * gnulib/import/sys_time.in.h: Update.
5017         * gnulib/import/sys_types.in.h: Update.
5018         * gnulib/import/tempname.c: Update.
5019         * gnulib/import/tempname.h: Update.
5020         * gnulib/import/time.in.h: Update.
5021         * gnulib/import/unistd--.h: Update.
5022         * gnulib/import/unistd-safer.h: Update.
5023         * gnulib/import/unistd.in.h: Update.
5024         * gnulib/import/unsetenv.c: Update.
5025         * gnulib/import/verify.h: Update.
5026         * gnulib/import/extra/snippet/warn-on-use.h: Update.
5027         * gnulib/import/wchar.in.h: Update.
5028         * gnulib/import/wctype.in.h: Update.
5029         * gnulib/import/xalloc-oversized.h: Update.
5030         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
5031         "53e2c179f26a890fa6685af4b6c1397ee370433b".
5032
5033 2018-08-16  Gary Benson <gbenson@redhat.com>
5034
5035         PR gdb/13000:
5036         * gdb/main.c (captured_main_1): Exit with nonzero status
5037         in batch mode if the last command to be executed failed.
5038         * NEWS: Mention the above.
5039
5040 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
5041
5042         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
5043         end of warning message.
5044
5045 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
5046
5047         PR gdb/22943:
5048         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
5049         (aarch64_extract_return_value): Use
5050         aapcs_is_vfp_call_or_return_candidate.
5051         (aarch64_return_in_memory): Likewise.
5052         (aarch64_store_return_value): Likewise.
5053
5054 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
5055
5056         * aarch64-tdep.c
5057         (aapcs_is_vfp_call_or_return_candidate): Make static
5058         (pass_in_v_or_stack): Remove function.
5059         (pass_in_v_vfp_candidate): New function.
5060         (aarch64_push_dummy_call): Check for float register candidates.
5061
5062 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
5063
5064         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
5065         (aapcs_is_vfp_call_or_return_candidate_1): New function.
5066         (aapcs_is_vfp_call_or_return_candidate): Likewise.
5067
5068 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
5069
5070         PR build/23399
5071         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
5072         (struct ipa_sym_addresses): Rename to...
5073         (struct ipa_sym_addresses_common): ... this.
5074         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
5075
5076 2018-08-28  Tom Tromey  <tom@tromey.com>
5077
5078         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
5079         (token_fifo): Now a std::vector.
5080         (yylex, c_parse): Update.
5081         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
5082         (token_fifo): Now a std::vector.
5083         (yylex, d_parse): Update.
5084         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
5085         (token_fifo): Now a std::vector.
5086         (yylex, go_parse): Update.
5087
5088 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5089
5090         * parser-defs.h (struct type_stack) <elements>: Change type to
5091         std::vector<union type_stack_elt>.
5092         <depth, size>: Remove.
5093         * parse.c (parse_exp_in_context_1): Adjust.
5094         (type_stack_reserve): Remove.
5095         (check_type_stack_depth): Remove.
5096         (insert_into_type_stack): Adjust to std::vector.
5097         (insert_type): Likewise.
5098         (push_type): Likewise.
5099         (push_type_int): Likewise.
5100         (insert_type_address_space): Likewise.
5101         (pop_type): Likewise.
5102         (pop_type_int): Likewise.
5103         (pop_typelist): Likewise.
5104         (pop_type_stack): Likewise.
5105         (append_type_stack): Likewise.
5106         (push_type_stack): Likewise.
5107         (get_type_stack): Likewise.
5108         (type_stack_cleanup): Likewise.
5109         (push_typelist): Likewise.
5110         (follow_types): Likewise.
5111         (_initialize_parse): Likewise.
5112
5113 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5114
5115         * NEWS: Mention csky target.
5116
5117 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
5118             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5119             Don Breazeal  <donb@codesourcery.com>
5120
5121         * csky-linux-tdep.c: New file.
5122         * csky-tdep.c: Likewise.
5123         * csky-tdep.h: Likewise.
5124         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
5125         csky-tdep.o.
5126         (HFILES_NO_SRCDIR): Add csky-tdep.h.
5127         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
5128         * configure.tgt: Add csky support.
5129
5130 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
5131
5132         * python/py-framefilter.c (py_print_frame): Print frame architecture
5133         when printing on an MI output.
5134
5135 2018-08-27  Tom Tromey  <tom@tromey.com>
5136
5137         PR build/23087:
5138         * configure: Rebuild.
5139         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
5140
5141 2018-08-27  Tom Tromey  <tom@tromey.com>
5142
5143         * aarch64-linux-tdep.c
5144         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
5145         casts to int.
5146
5147 2018-08-27  Tom Tromey  <tom@tromey.com>
5148
5149         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
5150         unsigned.
5151         (ppc64_standard_linkage1, ppc64_standard_linkage2)
5152         (ppc64_standard_linkage3, ppc64_standard_linkage4)
5153         (ppc64_standard_linkage5, ppc64_standard_linkage6)
5154         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
5155         unsigned.
5156
5157 2018-08-27  Tom Tromey  <tom@tromey.com>
5158
5159         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
5160         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
5161
5162 2018-08-27  Tom Tromey  <tom@tromey.com>
5163
5164         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
5165         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
5166         ULONGEST_MAX.
5167         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
5168         ULONGEST_MAX.
5169         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
5170         ULONGEST_MAX.
5171         * sparc-linux-tdep.c (sparc32_linux_sigframe)
5172         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
5173         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
5174         ULONGEST_MAX.
5175         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
5176         (ppc64_linux_sigaction_tramp_frame)
5177         (ppc32_linux_sighandler_tramp_frame)
5178         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
5179         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
5180         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
5181         * mn10300-linux-tdep.c (am33_linux_sigframe)
5182         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
5183         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
5184         * mips-linux-tdep.c (mips_linux_o32_sigframe)
5185         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
5186         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
5187         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
5188         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
5189         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
5190         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
5191         * microblaze-linux-tdep.c
5192         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
5193         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
5194         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
5195         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
5196         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
5197         * common/common-types.h (ULONGEST_MAX): New define.
5198         (CORE_ADDR_MAX): Fix formatting.
5199         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
5200         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
5201         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
5202         (arm_linux_rt_sigreturn_tramp_frame)
5203         (arm_eabi_linux_sigreturn_tramp_frame)
5204         (arm_eabi_linux_rt_sigreturn_tramp_frame)
5205         (thumb2_eabi_linux_sigreturn_tramp_frame)
5206         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
5207         (arm_linux_restart_syscall_tramp_frame)
5208         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
5209         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
5210         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
5211         ULONGEST_MAX.
5212         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
5213
5214 2018-08-27  Tom Tromey  <tom@tromey.com>
5215
5216         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
5217         CORE_ADDR_MAX.
5218         * mips-tdep.c (mips_deal_with_atomic_sequence)
5219         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
5220         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
5221         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
5222         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
5223         CORE_ADDR_MAX.
5224         * aarch64-tdep.c (aarch64_software_single_step): Use
5225         CORE_ADDR_MAX.
5226
5227 2018-08-27  Tom Tromey  <tom@tromey.com>
5228
5229         * linespec.c (complete_linespec_component): Add cast to "char".
5230         * completer.c (completion_tracker::build_completion_result): Add
5231         cast to "char".
5232
5233 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5234
5235         * solist.h (struct solist, struct target_so_ops): Fix
5236         indentation.
5237
5238 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5239
5240         * ada-tasks.c (ada_task_info_s): Remove typedef.
5241         (DEF_VEC_O(ada_task_info_s)): Remove.
5242         (struct ada_tasks_inferior_data): Initialize fields.
5243         <task_list>: Make an std::vector.
5244         (get_ada_tasks_inferior_data): Allocate with new.
5245         (ada_get_task_number): Adjust.
5246         (get_task_number_from_id): Likewise.
5247         (valid_task_id): Likewise.
5248         (ada_get_task_info_from_ptid): Likewise.
5249         (iterate_over_live_ada_tasks): Likewise.
5250         (add_ada_task): Likewise.
5251         (read_known_tasks): Likewise.
5252         (ada_build_task_list): Likewise.
5253         (print_ada_task_info): Likewise.
5254         (info_task): Likewise.
5255         (task_command_1): Likewise.
5256
5257 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
5258
5259         * ada-lang.c (add_angle_brackets): Return std::string.
5260
5261 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
5262
5263         * python/py-threadevent.c (py_get_event_thread): Initialize
5264         pythread.
5265
5266 2018-08-24  Pedro Alves  <palves@redhat.com>
5267
5268         * python/py-bpevent.c (create_breakpoint_event_object): Use
5269         copy-initialization.
5270         * python/py-continueevent.c (emit_continue_event): Use
5271         copy-initialization.
5272         * python/py-exitedevent.c (create_exited_event_object): Return a
5273         gdbpy_ref<>.
5274         (emit_exited_event): Use copy-initialization.
5275         * python/py-inferior.c (python_new_inferior)
5276         (python_inferior_deleted, add_thread_object): Use
5277         copy-initialization.
5278         * python/py-infevents.c (create_inferior_call_event_object)
5279         (create_register_changed_event_object)
5280         (create_memory_changed_event_object): Return a gdbpy_ref<>.
5281         (emit_inferior_call_event, emit_memory_changed_event)
5282         (emit_register_changed_event): Use copy-initialization.
5283         * python/py-newobjfileevent.c (create_new_objfile_event_object):
5284         Return a gdbpy_ref<>.
5285         (emit_new_objfile_event): Use copy-initialization.
5286         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
5287         (emit_clear_objfiles_event): Use copy-initialization.
5288         * python/py-signalevent.c (create_signal_event_object): Use
5289         copy-initialization.
5290         * python/py-threadevent.c (create_thread_event_object): Use
5291         copy-initialization.
5292
5293 2018-08-24  Pedro Alves  <palves@redhat.com>
5294             Simon Marchi  <simon.marchi@ericsson.com>
5295
5296         PR gdb/23379
5297         * python/py-continueevent.c: Include "gdbthread.h".
5298         (create_continue_event_object): Add intro comment.  Add 'ptid'
5299         parameter.  Use it to find thread to pass to
5300         create_thread_event_object.
5301         (emit_continue_event): Pass PTID down to
5302         create_continue_event_object.
5303         * python/py-event.h (py_get_event_thread): Declare.
5304         (create_thread_event_object): Remove default from 'thread'
5305         parameter.
5306         * python/py-stopevent.c (create_stop_event_object): Use
5307         py_get_event_thread.
5308         * python/py-threadevent.c (get_event_thread): Rename to ...
5309         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
5310         and use it to find the thread.
5311         (create_thread_event_object): Assert that THREAD isn't null.
5312         Don't find the event thread here.
5313
5314 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
5315
5316         * block.h (blockrange, blockranges): New struct declarations.
5317         (struct block): Add new field named `ranges'.
5318         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
5319         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
5320         macros for accessing ranges in struct block.
5321         (make_blockranges): New declaration.
5322         block.c (make_blockranges): New function.
5323         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
5324         for block.
5325         * symtab.h (find_pc_partial_function): Add new parameter `block'.
5326         * blockframe.c (cache_pc_function_block): New static global.
5327         (clear_pc_function_cache): Clear cache_pc_function_block.
5328         (find_pc_partial_function): Move comment to symtab.h.  Add
5329         support for non-contiguous blocks.
5330         * cli/cli-cmds.c (block.h): Include.
5331         (print_disassembly): Handle printing of non-contiguous blocks.
5332         (disassemble_current_function): Likewise.
5333         (disassemble_command): Likewise.
5334
5335         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
5336         BLOCK_START.
5337         * blockframe.c (get_pc_function_start): Likewise.
5338         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
5339         (gcc_symbol_address): Likewise.
5340         * compile/compile-object-run.c (compile_object_run): Likewise.
5341         * compile/compile.c (get_expr_block_and_pc): Likewise.
5342         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
5343         (func_addr_to_tail_call_list): Likewise.
5344         * findvar.c (default_read_var_value): Likewise.
5345         * inline-frame.c (inline_frame_this_id): Likewise.
5346         (skip-inline_frames): Likewise.
5347         * infcmd.c (until_next_command): Likewise.
5348         * linespec.c (convert_linespec_to_sals): Likewise.
5349         * parse.c (parse_exp_in_context_1): Likewise.
5350         * printcmd.c (build_address_symbolic): likewise.
5351         (info_address_command): Likewise.
5352         symtab.c (find_function_start_sal): Likewise.
5353         (skip_prologue_sal): Likewise.
5354         (find_function_alias_target): Likewise.
5355         (find_gnu_ifunc): Likewise.
5356         * stack.c (find_frame_funname): Likewise.
5357         * symtab.c (fixup_symbol_section): Likewise.
5358         (find_function_start_sal): Likewise.
5359         (skip_prologue_sal): Likewsie.
5360         (find_function_alias_target): Likewise.
5361         (find_gnu_ifunc): Likewise.
5362         * tracepoint.c (info_scope_command): Likewise.
5363         * value.c (value_fn_field): Likewise.
5364
5365         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
5366         in place of find_pc_partial_function.
5367         * blockframe.c (find_function_entry_range_from_pc): New function.
5368         * symtab.h (find_function_entry_range_from_pc): Declare and document.
5369         * objfiles.c (objfile_relocate1): Relocate start and end addresses
5370         for each range in a block.
5371
5372
5373 2018-08-23  Xavier Roirand  <roirand@adacore.com>
5374
5375         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
5376         incrementation.
5377
5378 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5379
5380         * solib-svr4.c (read_program_headers_from_bfd): Return
5381         gdb::optional<gdb::byte_vector>.
5382         (svr4_exec_displacement): Adjust.
5383
5384 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5385
5386         * solib-svr4.c (read_program_header): Return
5387         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
5388         (find_program_interpreter): Return
5389         gdb::optional<gdb::byte_vector>.
5390         (scan_dyntag_auxv): Adjust.
5391         (enable_break): Adjust.
5392         (svr4_exec_displacement): Adjust.
5393
5394 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5395
5396         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
5397         * inf-child.c (inf_child_target::terminal_save_inferior): New.
5398
5399 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
5400
5401         * guile/scm-string.c (gdbscm_scm_from_printf): Use
5402         string_vprintf.
5403         * guile/scm-utils.c (gdbscm_printf): Likewise.
5404         * serial.c (serial_printf): Likewise.
5405         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
5406
5407 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
5408
5409         * stack.c (print_frame): Print frame architecture when printing on
5410         an MI output.
5411         * NEWS: Mention new "arch" attribute in frame output.
5412
5413 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5414
5415         * arch/aarch64.h (aarch64_regnum): Update comment.
5416
5417 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
5418
5419         * NEWS: Add SVE to 8.2 section.
5420
5421 2018-08-21  Pedro Alves  <palves@redhat.com>
5422
5423         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
5424         out from gdbscm_parse_function_args.
5425         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
5426         gdbscm_parse_function_args_1.
5427
5428 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
5429
5430         PR gdb/17816
5431         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
5432         operator.
5433
5434 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
5435
5436         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
5437
5438 2018-08-19  Michael Spang  <spang@google.com>
5439
5440         PR gdb/11786
5441         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
5442         for PT_TLS segments.
5443
5444 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
5445
5446         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
5447         dwarf_variable_value.
5448         * dwarf2-frame.c (class dwarf_expr_executor):
5449         Add override for dwarf_variable_value.
5450         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
5451         (class symbol_needs_eval_context): Likewise.
5452         (indirect_synthetic_pointer): Add forward declaration.
5453         (sect_variable_value): New function.
5454         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
5455         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
5456         for DW_OP_GNU_variable_value.
5457
5458 2018-08-16  Tom Tromey  <tom@tromey.com>
5459
5460         * top.c (read_command_file): Update.
5461         (command_line_input): Remove "repeat" argument.
5462         * ada-lang.c (get_selections): Update.
5463         * linespec.c (decode_line_2): Update.
5464         * defs.h (command_line_input): Remove argument.
5465         * cli/cli-script.c (read_next_line): Update.
5466         * python/py-gdb-readline.c: Update.
5467
5468 2018-08-17  Tom Tromey  <tom@tromey.com>
5469
5470         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
5471         command_line_input.
5472
5473 2018-08-15  Tom Tromey  <tom@tromey.com>
5474
5475         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
5476
5477 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
5478
5479         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
5480         If used, use find_pc_partial_function to find address range
5481         to disassemble.
5482         * mi/mi-main.c (mi_cmd_list_features): Report
5483         "data-disassemble-a-option" feature.
5484         * NEWS: Mention new -data-disassemble option -a.
5485
5486 2018-08-13  Tom Tromey  <tom@tromey.com>
5487
5488         * common/common-defs.h (_FORTIFY_SOURCE): Define.
5489
5490 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5491
5492         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
5493         (aarch64_linux_collect_sve_regset): Likewise.
5494         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
5495         * regcache.h (regcache_map_entry_size): New function.
5496
5497 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5498
5499         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
5500         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
5501         (SVE_HEADER_VL_LENGTH): Likewise.
5502         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
5503         (SVE_HEADER_FLAGS_LENGTH): Likewise.
5504         (SVE_HEADER_RESERVED_LENGTH): Likewise.
5505         (SVE_HEADER_SIZE_OFFSET): Likewise.
5506         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
5507         (SVE_HEADER_VL_OFFSET): Likewise.
5508         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
5509         (SVE_HEADER_FLAGS_OFFSET): Likewise.
5510         (SVE_HEADER_RESERVED_OFFSET): Likewise.
5511         (SVE_HEADER_SIZE): Likewise.
5512         (aarch64_linux_core_read_vq): Add function.
5513         (aarch64_linux_core_read_description): Check for SVE section.
5514
5515 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
5516
5517         * aarch64-fbsd-tdep.c
5518         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
5519         collect_size.
5520         * aarch64-linux-tdep.c
5521         (aarch64_linux_iterate_over_regset_sections): Likewise.
5522         * alpha-linux-tdep.c
5523         (alpha_linux_iterate_over_regset_sections):
5524         * alpha-nbsd-tdep.c
5525         (alphanbsd_iterate_over_regset_sections): Likewise.
5526         * amd64-fbsd-tdep.c
5527         (amd64fbsd_iterate_over_regset_sections): Likewise.
5528         * amd64-linux-tdep.c
5529         (amd64_linux_iterate_over_regset_sections): Likewise.
5530         * arm-bsd-tdep.c
5531         (armbsd_iterate_over_regset_sections): Likewise.
5532         * arm-fbsd-tdep.c
5533         (arm_fbsd_iterate_over_regset_sections): Likewise.
5534         * arm-linux-tdep.c
5535         (arm_linux_iterate_over_regset_sections): Likewise.
5536         * corelow.c (get_core_registers_cb): Likewise.
5537         (core_target::fetch_registers): Likewise.
5538         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
5539         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
5540         * gdbarch.h (void): Regenerate.
5541         * gdbarch.sh: Add supply_size and collect_size.
5542         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
5543         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
5544         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
5545         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
5546         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
5547         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
5548         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
5549         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
5550         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
5551         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
5552         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
5553         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
5554         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
5555         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
5556         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections):
5557         Likewise.
5558         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
5559         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
5560         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
5561         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
5562         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
5563         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
5564         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections):
5565         Likewise.
5566         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
5567         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
5568         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
5569         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
5570         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
5571         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
5572         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
5573         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
5574
5575 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
5576
5577         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
5578         with string_printf.
5579
5580 2018-08-10  Keith Seitz  <keiths@redhat.com>
5581
5582         * compile/compile-c-support.c (add_code_header, add_code_footer):
5583         Move into policy class.
5584         (c_push_user_expression, pop_user_expression_nop)
5585         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
5586         (compile_program): New host class.
5587         (c_compile_program): New typedef.
5588         (c_compute_porgram): Use c_compile_program.
5589
5590 2018-08-10  Keith Seitz  <keiths@redhat.com>
5591
5592         * compile/compile-internal.h (compile_instance::~compile_instance):
5593         Remove calls to htab_delete.
5594         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
5595         * compile.c (compile_instance::compile_instance): Initialize
5596         htab unique pointers.
5597         (compile_instance::get_cached_type, compile_instance::insert_type)
5598         (compile_instance::error_symbol_once): Update for unique_ptr.
5599
5600 2018-08-10  Keith Seitz  <keiths@redhat.com>
5601
5602         * compile/compile-c-symbols.c (struct symbol_error)
5603         (hash_symbol_error, eq_symbol_error, del_symbol_error)
5604         (compile_instance::insert_symbol_error)
5605         (compile_instance::error_symbol_once): Move to ...
5606         * compile/compile.c: ... here.
5607
5608 2018-08-10  Keith Seitz  <keiths@redhat.com>
5609
5610         * compile/compile-c-support.c (c_get_compile_context): Use `new'
5611         instead of `new_compile_instance'.
5612         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
5613         Update description.
5614         If the symbol error map is not initialized, create it.
5615         (generate_c_for_for_one_symbol): Do not check/initialize
5616         the symbol error map.
5617         * compile/compile-c-types.c (compile_c_instance): Make a class.
5618         Update all callers.
5619         (compile_instance::compile_instance): Initialize the type cache.
5620         (get_cached_type): New function.
5621         (insert_type): Update description.
5622         (compile_c_instance::m_default_cflags): Define.
5623         (convert_type): Update description.  Use get_cached_type.
5624         (delete_instance): Moved to destructor.
5625         (new_compile_instance): Moved to constructor.
5626         * compile/compile-c.h (compile_c_instance): Make class inheriting
5627         from compile_instance.
5628         <base>: Remove field.
5629         <type_map, symbol_err_map>: Move to base class.
5630         <c_plugin>: Rename to `m_plugin' and remove pointer type.
5631         * compile/compile-internal.h (compile_instance): Make class.
5632         <type_map_t, symbol_err_map_t>: Define.
5633         <fe>: Rename to `m_gcc_fe'.
5634         <scope, block, gcc_target_options>: Add `m_' prefix.
5635         <m_type_map, m_symbol_err_map>: New fields, moved from
5636         compile_c_instance.
5637         <destroy>: Remove.
5638         (convert_type, new_compile_instance): Remove.
5639         * compile/compile.c (cleanup_compile_instance): Remove.
5640         (compile_to_object): Use unique_ptr to eliminate cleanups.
5641         (compile_instance::set_print_callback, compile_instance::version)
5642         (compile_instance::set_verbose)
5643         (compile_instance::set_driver_filename)
5644         (compile_instance::set_triplet_regexp)
5645         (compile_instance::set_arguments)
5646         (compile_instance::set_source_file)
5647         (compile_instance::compile): Define.
5648
5649 2018-08-10  Keith Seitz  <keiths@redhat.com>
5650
5651         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
5652         * compile/compile-c-types.c: Define GCC_METHODN macros and include
5653         gcc-c-fe.def to define C plugin.
5654         (delete_instance): Delete `c_plugin'.
5655         (new_compile_instance): Initialize `c_plugin'.
5656         * compile/compile-c.h: Include gcc_c_plugin.h.
5657         (struct compile_c_instance) <c_plugin>: New member.
5658         * gcc-c-plugin.h: New file.
5659         Update all callers with API change.
5660
5661 2018-08-10  Keith Seitz  <keiths@redhat.com>
5662
5663         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
5664         (HFILES_NO_SRCDIR): ... to here.
5665         Add compile-internal.h and compile-c.h.
5666         * compile/compile-c-support.c: Include compile-c.h.
5667         * compile/compile-c-symbols.c: Include compile-c.h.
5668         (generate_c_for_variable_locations): Update comment.
5669         * compile/compile-c-types.c: Include compile-c.h.
5670         * compile/compile-c.h: New file -- moved C language declarations
5671         from other files here.
5672         * compile/compile-internal.h: Do not include hashtab.h or
5673         common/enum-flags.h.
5674         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
5675         (gcc_convert_symbol, gcc_symbol_address)
5676         (generate_c_for_variable_locations, c_get_mode_for_size)
5677         (c_get_range_decl_name): Definitions moved to compile-c.h.
5678         * compile/compile-loc2c.c: Include compile-c.h.
5679
5680 2018-08-10  Keith Seitz  <keiths@redhat.com>
5681
5682         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
5683         (c_symbol_substitution_name): ... this.
5684         Update all callers.
5685
5686 2018-08-10  Keith Seitz  <keiths@redhat.com>
5687
5688         * compile/compile-c-support.c (c_compute_program): Use
5689         unique_xmalloc_ptr to eliminate cleanup.
5690         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5691         Return a unique_xmalloc_ptr and eliminate cleanup.
5692         * compile/compile-internal.h (generate_c_for_variable_locations):
5693         Return unique_xmalloc_ptr and update description.
5694
5695 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
5696
5697         * corelow.c (core_target::get_core_register_section): Rename
5698         min_size to section_min_size.
5699
5700 2018-08-09  Jim Wilson  <jimw@sifive.com>
5701
5702         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
5703         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
5704         * NEWS: Mention new GNU/Linux RISC-V target.
5705         * configure.host: Add riscv*-*-linux*.
5706         * configure.nat: Add riscv*.
5707         * configure.tgt: Add riscv*-*-linux*.
5708         * riscv-linux-nat.c: New file.
5709         * riscv-linux-tdep.c: New file.
5710
5711 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5712
5713         * infrun.c (resume): Make static, add forward declaration.
5714         (proceed): Update header comment.
5715         * infrun.h (resume): Delete declaration.
5716
5717 2018-08-09  Tom Tromey  <tom@tromey.com>
5718
5719         * riscv-tdep.h: Minor formatting fixes.
5720
5721 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
5722
5723         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
5724         * dwarf-index-cache.c (create_dir_and_check): Likewise.
5725         (test_mkdir_recursive): Likewise.
5726         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
5727
5728 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5729
5730         * valarith.c (value_subscripted_rvalue): If an array is not in
5731         memory, and we don't know the upper bound, then we can't know that
5732         the requested element exists or not.
5733
5734 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
5735
5736         * target.c (str_comma_list_concat_elem): Fix typo in comment.
5737         (target_options_to_string): Add comment.
5738
5739 2018-08-08  Tom Tromey  <tom@tromey.com>
5740
5741         * unittests/scoped_mmap-selftests.c: Check result of "write".
5742
5743 2018-08-08  Jim Wilson  <jimw@sifive.com>
5744
5745         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
5746         (decode_register_index_short): New.
5747         (decode_j_type_insn, decode_cj_type_insn): New.
5748         (decode_b_type_insn, decode_cb_type_insn): New.
5749         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
5750         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
5751         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
5752         is_c_sw_insn instead of is_sw_insn.
5753         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
5754         (riscv_software_single_step): New.
5755         * riscv-tdep.h (riscv_software_single_step): Declare.
5756
5757         * riscv-tdep.c (riscv_isa_xlen): Drop static.
5758         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
5759
5760 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
5761
5762         PR gdb/18050:
5763         * target.c (dispose_inferior): Don't dispose of inferiors that are
5764         already killed.
5765
5766 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5767
5768         * remote.c (remote_target::download_tracepoint): Change char* to
5769         const char*.
5770
5771 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
5772
5773         * target.h (target_options_to_string): Return an std::string.
5774         * target.c (str_comma_list_concat_elem): Return void, use
5775         std::string.
5776         (do_option): Likewise.
5777         (target_options_to_string): Return an std::string.
5778         * linux-nat.c (linux_nat_target::wait): Adjust.
5779         * target-debug.h (target_debug_print_options): Adjust.
5780
5781 2018-08-07  Tom Tromey  <tom@tromey.com>
5782
5783         * Makefile.in (CPPFLAGS): New variable.
5784         (INTERNAL_CPPFLAGS): Use it.
5785
5786 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5787
5788         * NEWS: Mention the index cache.
5789
5790 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5791
5792         * common/pathstuff.h (get_standard_cache_dir): New.
5793         * common/pathstuff.c (get_standard_cache_dir): New.
5794         * build-id.h (build_id_to_string): New.
5795         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
5796         DEBUG_STR_SUFFIX): Move to here.
5797         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
5798         DEBUG_STR_SUFFIX): Move from there.
5799         (write_psymtabs_to_index): Make non-static, add basename
5800         parameter.  Write to temporary files, rename when done.
5801         (save_gdb_index_command): Adjust call to
5802         write_psymtabs_to_index.
5803         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
5804         field.
5805         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
5806         (get_gdb_index_contents_from_cache): New.
5807         (get_gdb_index_contents_from_cache_dwz): New.
5808         (dwarf2_initialize_objfile): Read index from cache.
5809         (dwarf2_build_psymtabs): Save to index.
5810         * dwarf-index-cache.h: New file.
5811         * dwarf-index-cache.c: New file.
5812         * dwarf-index-write.h: New file.
5813
5814 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5815
5816         * gnulib/aclocal.m4: Re-generate.
5817         * gnulib/config.in: Re-generate.
5818         * gnulib/configure: Re-generate.
5819         * gnulib/import/Makefile.am: Re-generate.
5820         * gnulib/import/Makefile.in: Re-generate.
5821         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
5822         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5823         * gnulib/import/m4/mkdir.m4: New file.
5824         * gnulib/import/mkdir.c: New file.
5825         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
5826         module.
5827
5828 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5829
5830         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
5831         * common/scoped_mmap.c: New file.
5832         * common/scoped_mmap.h (destroy): New method.
5833         (~scoped_mmap, reset): Use destroy.
5834         (scoped_mmap): New move constructor.
5835         (mmap_file): New declaration.
5836         * unittests/scoped_mmap-selftests.c (test_normal,
5837         test_invalid_filename, run_tests): New functions.
5838         (_initialize_scoped_mmap_selftests): Register selftest.
5839
5840 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5841
5842         * dwarf2read.c (read_gdb_index_from_section): Rename to...
5843         (read_gdb_index_from_buffer): ... this.  Remove section
5844         parameter, add buffer parameter.
5845         (get_gdb_index_contents_ftype,
5846         get_gdb_index_contents_dwz_ftype): New typedefs.
5847         (dwarf2_read_gdb_index): Add callback parameters to get the
5848         index contents.
5849         (get_gdb_index_contents_from_section): New.
5850         (dwarf2_initialize_objfile): Update call to
5851         dwarf2_read_gdb_index.
5852
5853 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
5854
5855         * common/filestuff.h (gdb_fopen_cloexec): New overload.
5856         (gdb_open_cloexec): Likewise.
5857         * nat/linux-osdata.c (command_from_pid): Use string_printf.
5858         (commandline_from_pid): Likewise.
5859         (linux_xfer_osdata_threads): Likewise.
5860         (linux_xfer_osdata_fds): Likewise.
5861         * ada-lang.c (is_package_name): Likewise.
5862         * auxv.c (procfs_xfer_auxv): Likewise.
5863         * breakpoint.c (print_one_breakpoint_location): Use
5864         uiout::field_fmt.
5865         (print_one_catch_solib): Use string_printf.
5866         * coff-pe-read.c (add_pe_exported_sym): Likewise.
5867         (add_pe_forwarded_sym): Likewise.
5868         * dwarf2read.c (create_type_unit_group): Likewise.
5869         (build_error_marker_type): Likewise.
5870         * infcall.c (get_function_name): Likewise.
5871         * valprint.c (print_converted_chars_to_obstack): Likewise.
5872         * xtensa-tdep.c (xtensa_register_type): Likewise.
5873
5874 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
5875
5876         * remote.c (remote_target::download_tracepoint): Fix format
5877         string errors.
5878
5879 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5880
5881         * tracefile.c: Include common/byte-vector.h.
5882         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
5883         with trace_regblock_size if needed.  Update uses of buf.
5884
5885 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5886
5887         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
5888         std::vector<unsigned char>.
5889         * tracepoint.c (collection_list::collection_list): Remove
5890         m_regs_mask initializer from initializer list.  Resize
5891         m_regs_mask using the largest remote register number.
5892         (collection_list::add_remote_register): Remove size check on
5893         m_regs_mask.  Use at to access element.
5894         (collection_list::stringify): Change type of temp_buf to
5895         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
5896         stringify the register mask.  Use pack_hex_byte for the register
5897         mask.
5898
5899 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5900
5901         * tracepoint.h (class collection_list) <add_register>: Remove.
5902         <add_remote_register, add_ax_registers, add_local_register>:
5903         Declare.
5904         <add_memrange>: Add scope parameter.
5905         * tracepoint.c (encode_actions_1): Likewise.
5906         (collection_list::add_register): Rename to ...
5907         (collection_list::add_remote_register): ... this.  Update
5908         comment.
5909         (collection_list::add_ax_registers, add_local_register): New
5910         methods.
5911         (collection_list::add_memrange): Add scope parameter.  Call
5912         add_local_register instead of add_register.
5913         (finalize_tracepoint_aexpr): New function.
5914         (collection_list::collect_symbol): Update calls to add_memrange.
5915         Call add_local_register instead of add_register.  Call
5916         add_ax_registers.  Call finalize_tracepoint_aexpr.
5917         (encode_actions_1): Get remote regnos for $reg action.  Call
5918         add_remote_register, add_ax_registers, and add_local_register.
5919         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
5920         (validate_actionline): Call finalize_tracepoint_aexpr.
5921
5922 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5923
5924         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
5925         Replace array buf with gdb::char_vector buf, of size
5926         get_remote_packet_size ().  Replace references to buf and
5927         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
5928         and xsnprintf with snprintf.  Raise errors if the buffer is too
5929         small.
5930
5931 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5932
5933         * remote.c (remote_target::download_tracepoint): Fix the has_more
5934         predicate in the QTDP action list iteration.
5935
5936 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
5937
5938         * remote.c (remote_target::download_tracepoint): Fix indentation
5939         in for block.
5940
5941 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5942
5943         * proc-api.c (_initialize_proc_api): Remove c, unused.
5944         * procfs.c (procfs_init_inferior): Remove signals, unused.
5945         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
5946         unused.
5947
5948 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
5949             Andrew Burgess  <andrew.burgess@embecosm.com>
5950
5951         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
5952         'W_STOPCODE (0)' as this could be ambiguous.
5953
5954 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5955
5956         * ser-tcp.c (net_open): Fix thinko when deciding whether to
5957         disable TCP's Nagle algorithm (use "ai_protocol" instead of
5958         "ai_socktype").
5959
5960 2018-08-02  Tom Tromey  <tom@tromey.com>
5961
5962         PR symtab/16842.
5963         * dwarf2read.c (read_func_scope): Set symtab on template parameter
5964         symbols.
5965         (process_structure_scope): Likewise.
5966
5967 2018-08-02  Xavier Roirand  <roirand@adacore.com>
5968
5969         PR gdb/22629:
5970         * darwin-nat.c (darwin_kill_inferior): Fix handling of
5971         kill inferior.
5972
5973 2018-08-02  Tom Tromey  <tom@tromey.com>
5974
5975         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
5976         (darwin_suspend_inferior, darwin_resume_inferior)
5977         (darwin_decode_notify_message, darwin_resume_inferior_threads)
5978         (darwin_check_new_threads): Check result of get_darwin_inferior.
5979
5980 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
5981
5982         GDB 8.1.1 released.
5983
5984 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
5985
5986         * varobj.c (varobj_get_path_expr_parent): Report an error if
5987         parent is a dynamic varobj.
5988
5989 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5990
5991         * gnulib/aclocal.m4: Re-generate.
5992         * gnulib/config.in: Re-generate.
5993         * gnulib/configure: Re-generate.
5994         * gnulib/import/Makefile.in: Re-generate.
5995         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
5996         * gnulib/import/m4/onceonly.m4: Re-generate.
5997
5998 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
5999
6000         * target-descriptions.c (struct xml_test_tdesc): New.
6001         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
6002         (record_xml_tdesc): Update.
6003         (maintenance_check_xml_descriptions): Update.
6004         * target-descriptions.h (record_xml_tdesc): Update comment.
6005
6006 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
6007
6008         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
6009         checking array bounds are defined.
6010
6011 2018-07-30  Tom Tromey  <tom@tromey.com>
6012
6013         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
6014         irreflexivity violation.
6015
6016 2018-07-30  Tom Tromey  <tom@tromey.com>
6017
6018         * cli/cli-decode.c (lookup_cmd): Remove lint code.
6019         * value.c (unpack_long): Remove lint code.
6020         * valops.c (value_ind): Remove lint code.
6021         * valarith.c (value_x_binop, value_x_unop, value_equal)
6022         (value_pos): Remove lint code.
6023
6024 2018-07-28  Tom de Vries  <tdevries@suse.de>
6025
6026         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
6027         with undefined upper bound as <optimized out>.
6028
6029 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
6030
6031         * gcore.in: Rename variable "name" to "prefix".  Expand
6032         "usage" text.
6033
6034 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
6035
6036         * windows-nat.c (windows_nat_target::create_inferior): Update to
6037         call close() in global namespace.
6038
6039 2018-07-26  Tom Tromey  <tom@tromey.com>
6040
6041         * dwarf-index-write.c (add_address_entry): Don't add objfile
6042         offsets.
6043         * dbxread.c (find_stab_function): Rename from
6044         find_stab_function_addr.  Return a bound_minimal_symbol.
6045         (read_dbx_symtab): Use raw_text_low, raw_text_high.
6046         Don't add objfile offsets.
6047         (end_psymtab): Use raw_text_low, raw_text_high,
6048         MSYMBOL_VALUE_RAW_ADDRESS.
6049         (read_ofile_symtab): Update.
6050         (process_one_symbol): Update.
6051         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
6052         offsets.
6053         (dw2_relocate): Remove.
6054         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
6055         searching addrmap.
6056         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
6057         Update.
6058         (process_psymtab_comp_unit_reader, add_partial_symbol)
6059         (add_partial_subprogram, dwarf2_ranges_read): Update.
6060         (load_partial_dies): Update.
6061         (add_address_entry): Don't add objfile offsets.
6062         (dwarf2_build_include_psymtabs): Update.
6063         (create_addrmap_from_aranges): Don't add objfile offsets.
6064         (dw2_find_pc_sect_compunit_symtab): Update.
6065         * mdebugread.c (parse_symbol): Don't add objfile offsets.
6066         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
6067         Update.
6068         (parse_partial_symbols): Don't add objfile offsets.  Use
6069         raw_text_low, raw_text_high.  Update.
6070         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
6071         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
6072         or call 'relocate' quick function.  Clear psymbol_map.
6073         * psympriv.h (struct partial_symbol) <address>: Add section
6074         offset.
6075         <set_unrelocated_address>: Rename from set_address.
6076         <raw_text_low, raw_text_high>: New methods.
6077         <text_low, text_high>: Add objfile parameter.
6078         (add_psymbol_to_bcache): Add 'section' parameter.  Call
6079         set_unrelocated_address.
6080         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
6081         (find_pc_psymbol): Update.
6082         (fixup_psymbol_section, relocate_psymtabs): Remove.
6083         (dump_psymtab, psym_functions): Update.
6084         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
6085         parameter.
6086         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
6087         (start_psymtab_common): Update.
6088         * symfile-debug.c (debug_qf_relocate): Remove.
6089         (debug_sym_quick_functions): Update.
6090         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
6091         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
6092         Update.
6093
6094 2018-07-26  Tom Tromey  <tromey@redhat.com>
6095
6096         * dbxread.c (end_psymtab): Use text_high_valid and
6097         text_low_valid.
6098         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
6099         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
6100         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
6101         Update comment.
6102         <text_low_valid, text_high_valid>: New fields.
6103         <set_text_low, set_text_high>: Update.
6104         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
6105
6106 2018-07-26  Tom Tromey  <tom@tromey.com>
6107
6108         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
6109         Update.
6110         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
6111         textlow and texthigh fields.
6112         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
6113         Update.
6114         * mdebugread.c (parse_lines, parse_partial_symbols)
6115         (psymtab_to_symtab_1): Update.
6116         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
6117         Rename fields.  Update comment.  Now private.
6118         <text_low, text_high, set_text_low, set_text_high>: New methods.
6119         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
6120         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
6121         (start_psymtab_common, maintenance_info_psymtabs)
6122         (maintenance_check_psymtabs): Update.
6123         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
6124         texthigh fields.
6125         (scan_xcoff_symtab): Update.
6126
6127 2018-07-26  Tom Tromey  <tromey@redhat.com>
6128
6129         * psympriv.h (struct partial_symbol) <unrelocated_address,
6130         address, set_address>: New methods.
6131         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
6132         (fixup_psymbol_section, relocate_psymtabs): Update.
6133         (print_partial_symbols): Add 'objfile' parameter.  Update.
6134         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
6135         Update.
6136
6137 2018-07-26  Tom Tromey  <tom@tromey.com>
6138
6139         * dwarf-index-write.c (write_psymbols, debug_names::insert)
6140         (debug_names::write_psymbols): Update.
6141         * psympriv.h (struct partial_symbol): Derive from
6142         general_symbol_info.
6143         <obj_section>: New method.
6144         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
6145         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
6146         (find_pc_sect_psymbol, fixup_psymbol_section)
6147         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
6148         (print_partial_symbols, recursively_search_psymtabs)
6149         (compare_psymbols, psymbol_hash, psymbol_compare)
6150         (add_psymbol_to_bcache, maintenance_check_psymtabs)
6151         (psymbol_name_matches, psym_fill_psymbol_map): Update.
6152
6153 2018-07-26  Tom Tromey  <tromey@redhat.com>
6154
6155         * dbxread.c (end_psymtab): Remove dead code.
6156
6157 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
6158
6159         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
6160         DWARF unwinders are disabled.
6161         * dwarf2-frame.c: Add dwarf2read.h include.
6162         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
6163         disabled.
6164         (dwarf2_frame_unwinders_enabled_p): Define.
6165         (show_dwarf_unwinders_enabled_p): New function.
6166         (_initialize_dwarf2_frame): Register switch to control DWARF
6167         unwinder use.
6168         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
6169         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
6170         (show_dwarf_cmdlist): Remove static keyword.
6171         * dwarf2read.h (set_dwarf_cmdlist): Declare.
6172         (show_dwarf_cmdlist): Declare.
6173         * NEWS: Document new feature.
6174
6175 2018-07-26  Tom de Vries  <tdevries@suse.de>
6176
6177         PR breakpoints/23366
6178         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
6179
6180 2018-07-26  Tom de Vries  <tdevries@suse.de>
6181
6182         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
6183         DW_AT_count can't be translated to a dynamic prop.
6184
6185 2018-07-25  Tom de Vries  <tdevries@suse.de>
6186
6187         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
6188         try/catch.
6189
6190 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
6191
6192         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
6193
6194 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
6195
6196         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
6197
6198 2018-07-24  Keith Seitz  <keiths@redhat.comt
6199
6200         PR symtab/23010
6201         * dwarf2read.c (dw2_add_symbol_to_list): New function.
6202         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
6203         instead of add_symbol_to_list.
6204         (read_file_scope): Call prepare_one_comp_unit before reading
6205         any other DIEs.
6206
6207 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
6208
6209         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
6210
6211 2018-07-24  Tom Tromey  <tom@tromey.com>
6212
6213         * utils.c (malloc, realloc, free): Don't declare.
6214         * configure, config.in: Rebuild.
6215         * configure.ac: Don't check for declarations of free, malloc, or
6216         realloc.
6217
6218 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
6219
6220         * aarch64-linux-nat.c
6221         (aarch64_linux_nat_target::stopped_data_address): Remove unused
6222         variable.
6223         * arm-linux-nat.c (fetch_regs): Likewise.
6224         (store_regs): Likewise.
6225         (fetch_vfp_regs): Likewise.
6226         (store_vfp_regs): Likewise.
6227         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
6228         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
6229         (arm_linux_nat_target::insert_watchpoint): Likewise.
6230         (arm_linux_nat_target::remove_watchpoint): Likewise.
6231         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
6232         Likewise.
6233         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
6234         Likewise.
6235         * ppc-linux-nat.c (fetch_register): Likewise.
6236         (fetch_all_gp_regs): Likewise.
6237         (fetch_ppc_registers): Likewise.
6238         (store_all_gp_regs): Likewise.
6239         (store_ppc_registers): Likewise.
6240         (hwdebug_insert_point): Likewise.
6241         (can_use_watchpoint_cond_accel): Likewise.
6242         * remote-sim.c (gdb_os_write_stdout): Likewise.
6243
6244 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
6245             Tom Tromey  <tom@tromey.com>
6246
6247         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
6248         test for it.
6249         * configure: Rebuild.
6250
6251 2018-07-22  Tom Tromey  <tom@tromey.com>
6252
6253         * regformats/regdat.sh: Define xmltarget_${name} inside
6254         #ifndef IN_PROCESS_AGENT.
6255
6256 2018-07-22  Tom Tromey  <tom@tromey.com>
6257
6258         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
6259
6260 2018-07-22  Tom Tromey  <tom@tromey.com>
6261
6262         * symfile.c (reread_symbols): Notify iter, not objfile.
6263
6264 2018-07-22  Tom Tromey  <tom@tromey.com>
6265
6266         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
6267         Use arch_ops.
6268         (ravenscar_thread_target::prepare_to_store): Likewise.
6269
6270 2018-07-22  Tom Tromey  <tom@tromey.com>
6271
6272         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
6273         unused variable.  Call value_fetch_lazy when needed.
6274         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
6275         Remove unused variable.  Call value_fetch_lazy when needed.
6276
6277 2018-07-22  Tom Tromey  <tom@tromey.com>
6278
6279         * m32c-tdep.c (mark_dma): Return void.
6280         (make_regs): Remove unused declarations.
6281
6282 2018-07-22  Tom Tromey  <tom@tromey.com>
6283
6284         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
6285         cmdscm_get_valid_command_smob_arg_unsafe for effect.
6286         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
6287         bkscm_get_valid_block_smob_arg_unsafe for effect.
6288
6289 2018-07-22  Tom Tromey  <tom@tromey.com>
6290
6291         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
6292         value_type.
6293
6294 2018-07-22  Tom Tromey  <tom@tromey.com>
6295
6296         * windows-nat.c (saved_context): Conditionally define.
6297         * remote.c (remote_target::remote_btrace_maybe_reopen):
6298         Conditionally declare "warned".
6299         * inflow.c (sigquit_ours): Conditionally define.
6300         (new_tty): Move "tty" declaration inside #if.
6301         * guile/guile.c (guile_datadir): Conditionally define.
6302         * charset.c (set_be_le_names): Move some declarations inside #if.
6303         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
6304         #if.
6305         (parse_xml_btrace_conf): Likewise.
6306
6307 2018-07-22  Tom Tromey  <tom@tromey.com>
6308
6309         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
6310
6311 2018-07-22  Tom Tromey  <tom@tromey.com>
6312
6313         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
6314         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
6315         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
6316         * buildsym-legacy.c (get_macro_table): Remove unused variable.
6317         * stack.c (frame_apply_level_command): Remove unused variable.
6318         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
6319         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
6320         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
6321         unused variable.
6322         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
6323         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
6324         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
6325         variable.
6326         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
6327         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
6328         variable.
6329         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
6330         Remove unused variable.
6331         * cli/cli-script.c (recurse_read_control_structure): Remove unused
6332         variable.
6333         * common/tdesc.c (print_xml_feature::visit): Remove unused
6334         variable.
6335         * compile/compile-object-load.c (store_regs): Remove unused
6336         variables.
6337         * complaints.c (clear_complaints): Remove unused variable.
6338         * corelow.c (core_target_open): Remove unused variable.
6339         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
6340         variable.
6341         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
6342         variable.
6343         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
6344         variable.
6345         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
6346         variable.
6347         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
6348         variable.
6349         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
6350         variable.
6351         * ia64-tdep.c (examine_prologue): Remove unused variable.
6352         * infcall.c (run_inferior_call): Remove unused variable.
6353         * inferior.c (exit_inferior): Remove unused variable.
6354         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
6355         * linespec.c (decode_line_2): Remove unused variable.
6356         * linux-nat.c (super_close): Remove.
6357         * linux-tdep.c (linux_info_proc): Remove unused variable.
6358         * mi/mi-main.c (mi_execute_command): Remove unused variable.
6359         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
6360         Remove unused variable.
6361         * parse.c (find_minsym_type_and_address): Remove unused variable.
6362         * printcmd.c (info_symbol_command, printf_floating): Remove unused
6363         variable.
6364         * python/py-breakpoint.c (bppy_set_commands): Remove unused
6365         variable.
6366         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
6367         variables.
6368         * record-btrace.c (record_btrace_target::store_registers): Remove
6369         unused variable.
6370         (cmd_show_record_btrace_cpu): Remove unused variable.
6371         * riscv-tdep.c (riscv_register_reggroup_p)
6372         (riscv_push_dummy_call, riscv_return_value): Remove unused
6373         variable.
6374         * rust-exp.y (literal): Remove unused variable.
6375         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
6376         unused variable.
6377         <STRUCTOP_ANONYMOUS>: Likewise.
6378         * s390-linux-tdep.c (s390_linux_init_abi_31)
6379         (s390_linux_init_abi_64): Remove unused variable.
6380         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
6381         (file_select_thread, net_windows_open, _initialize_ser_windows):
6382         Remove unused variables.
6383         * symtab.c (find_pc_sect_line): Remove unused variable.
6384         * target-memory.c (compute_garbled_blocks): Remove unused
6385         variable.
6386         (target_write_memory_blocks): Remove unused variable.
6387         * target.c (target_stack::unpush): Remove unused variables.
6388         * tracepoint.c (start_tracing, all_tracepoint_actions)
6389         (merge_uploaded_trace_state_variables)
6390         (print_one_static_tracepoint_marker): Remove unused variable.
6391         * unittests/basic_string_view/element_access/char/1.cc (test01):
6392         Remove unused variable.
6393         * windows-nat.c (windows_continue, windows_add_all_dlls)
6394         (do_initial_windows_stuff, windows_nat_target::create_inferior):
6395         Remove unused variables.
6396
6397 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
6398
6399         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
6400         attr_profile in HAVE_ELF.
6401         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
6402         HAVE_ELF.
6403
6404 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
6405
6406         * frame.c (frame_register_unwind): Change parameter name.
6407         (frame_unwind_register): Likewise.
6408         (frame_unwind_register_value): Likewise.
6409         (frame_unwind_register_signed): Likewise.
6410         (frame_unwind_register_unsigned): Likewise.
6411         * frame.h (frame_register_unwind): Likewise.
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_unwind_arch): Likewise.
6417
6418 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6419
6420         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
6421         ISA maintenance.
6422
6423 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
6424
6425         * mips-linux-nat.c (mips_linux_nat_target::read_description):
6426         Call `get_ptrace_pid' rather than extracting the ptrace PID by
6427         hand.
6428
6429 2018-07-20  Keith Seitz  <keiths@redhat.com>
6430
6431         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
6432         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
6433         m_compunit_symtab, m_language>: Add "m_" prefix.
6434         Update all uses.
6435         * buildsym.c: Update all uses.
6436
6437 2018-07-20  Tom Tromey  <tom@tromey.com>
6438
6439         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
6440         * buildsym.h (record_line_ftype): Remove typedef.
6441
6442 2018-07-20  Tom Tromey  <tom@tromey.com>
6443
6444         * buildsym-legacy.h (augment_type_symtab): Don't declare.
6445         (end_expandable_symtab): Likewise.
6446         (end_symtab_get_static_block): Likewise.
6447         (end_symtab_from_static_block): Likewise.
6448         * buildsym-legacy.c (augment_type_symtab): Remove.
6449         (end_expandable_symtab): Remove.
6450         (end_symtab_get_static_block): Remove.
6451         (end_symtab_from_static_block): Remove.
6452
6453 2018-07-20  Tom Tromey  <tom@tromey.com>
6454
6455         * dwarf2read.c: Include buildsym.h.
6456         (struct dwarf2_cu) <builder>: New method.
6457         (fixup_go_packaging): Update.
6458         (process_full_comp_unit, process_full_type_unit): Update.  Don't
6459         use scoped_free_pendings.
6460         (using_directives): Add "cu" parameter, remove "language".
6461         (read_import_statement, setup_type_unit_groups, )
6462         (read_func_scope, read_lexical_block_scope)
6463         (dwarf2_record_block_ranges, read_namespace): Update.
6464         (lnp_state_machine::lnp_state_machine): Add cu parameter.
6465         (lnp_state_machine::handle_end_sequence): Update.
6466         (class lnp_state_machine) <m_cu>: New member.
6467         <m_record_line_callback>: Remove.
6468         <m_currently_recording_lines>: New member.
6469         (lnp_state_machine::handle_set_file): Update.
6470         (noop_record_line): Remove.
6471         (dwarf_record_line_p): Add cu parameter.
6472         (dwarf_record_line_1, dwarf_finish_line): Likewise.
6473         (lnp_state_machine::record_line)
6474         (lnp_state_machine::lnp_state_machine)
6475         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6476         (dwarf_decode_lines): Update.
6477         (dwarf2_start_subfile): Add cu parameter.
6478         (dwarf2_start_symtab, new_symbol): Update.
6479         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
6480         Remove dwarf2_per_objfile parameter.
6481         (dwarf_decode_macros): Update.
6482
6483 2018-07-20  Tom Tromey  <tom@tromey.com>
6484
6485         * stabsread.c (define_symbol): Update.
6486         * buildsym-legacy.h (get_buildsym_compunit): Declare.
6487         * dwarf2read.c (new_symbol): Update.
6488         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
6489         * cp-namespace.c: Include buildsym.h.
6490         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
6491         * buildsym-legacy.c (get_buildsym_compunit): New function.
6492
6493 2018-07-20  Tom Tromey  <tom@tromey.com>
6494
6495         * xcoffread.c: Include buildsym-legacy.h.
6496         * windows-nat.c: Include buildsym-legacy.h.
6497         * stabsread.c: Include buildsym-legacy.h.
6498         * mdebugread.c: Include buildsym-legacy.h.
6499         * buildsym-legacy.h: New file.
6500         * buildsym-legacy.c: New file, from buildsym.c.
6501         * go32-nat.c: Include buildsym-legacy.h.
6502         * dwarf2read.c: Include buildsym-legacy.h.
6503         * dbxread.c: Include buildsym-legacy.h.
6504         * cp-namespace.c: Include buildsym-legacy.h.
6505         * coffread.c: Include buildsym-legacy.h.
6506         * buildsym.h: Move some contents to buildsym-legacy.h.
6507         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
6508         buildsym-legacy.c.
6509         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
6510
6511 2018-07-20  Tom Tromey  <tom@tromey.com>
6512
6513         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
6514         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
6515         (buildsym_compunit::buildsym_compunit)
6516         (buildsym_compunit::~buildsym_compunit)
6517         (buildsym_compunit::get_macro_table): Define.
6518
6519 2018-07-20  Tom Tromey  <tom@tromey.com>
6520
6521         * buildsym.c (reset_symtab_globals): Remove.
6522         (buildsym_compunit::end_symtab_from_static_block): Update.
6523         (buildsym_compunit::augment_type_symtab): Update.
6524         (end_symtab_from_static_block): Call free_buildsym_compunit.
6525         (augment_type_symtab, end_symtab, end_expandable_symtab):
6526         Likewise.
6527
6528 2018-07-20  Tom Tromey  <tom@tromey.com>
6529
6530         * arch-utils.c: Do not include buildsym.h.
6531         * mipsread.c: Do not include buildsym.h.
6532         * machoread.c: Do not include buildsym.h.
6533         * elfread.c: Do not include buildsym.h.
6534
6535 2018-07-20  Tom Tromey  <tom@tromey.com>
6536
6537         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
6538         initialization.
6539         (buildsym_compunit): Add new constructor.
6540         (struct buildsym_compunit) <get_last_source_file, finish_block,
6541         record_block_range, start_subfile, patch_subfile_names,
6542         push_subfile, pop_subfile, record_line, get_compunit_symtab,
6543         set_last_source_start_addr, get_last_source_start_addr,
6544         get_local_using_directives, set_local_using_directives,
6545         get_global_using_directives, outermost_context_p,
6546         get_current_context_stack, get_context_stack_depth,
6547         get_current_subfile, get_local_symbols, get_file_symbols,
6548         get_global_symbols, record_debugformat, record_producer,
6549         push_context, pop_context, end_symtab_get_static_block,
6550         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
6551         New public methods.
6552         <record_pending_block, finish_block_internal, make_blockvector,
6553         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
6554         private methods.
6555         Update all users.
6556
6557 2018-05-22  Tom Tromey  <tom@tromey.com>
6558
6559         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6560         parameter.
6561         (finish_block_internal): Update.
6562
6563 2018-07-20  Tom Tromey  <tom@tromey.com>
6564
6565         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
6566         parameter.
6567         (finish_block_internal): Update.
6568
6569 2018-07-20  Tom Tromey  <tom@tromey.com>
6570
6571         * buildsym.h (EXTERN): Don't define or undef.
6572         * buildsym.c (EXTERN): Don't define.
6573
6574 2018-07-20  Tom Tromey  <tom@tromey.com>
6575
6576         * buildsym.c: Remove TODO comment.
6577
6578 2018-07-20  Tom Tromey  <tom@tromey.com>
6579
6580         * coffread.c (coff_symtab_read): Update.
6581         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
6582         (xcoff_new_init): Update.
6583         * mipsread.c (mipscoff_new_init): Update.
6584         * mdebugread.c (mdebug_build_psymtabs): Update.
6585         * elfread.c (elf_new_init): Update.
6586         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
6587         Update.
6588         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
6589         (coffstab_build_psymtabs, elfstab_build_psymtabs)
6590         (stabsect_build_psymtabs): Update.
6591         * buildsym.h (buildsym_init): Don't declare.
6592         * buildsym.c: Update comment.
6593         (prepare_for_building): Remove.
6594         (start_symtab, restart_symtab): Update.
6595         (reset_symtab_globals): Update comment.
6596         (buildsym_init): Remove.
6597
6598 2018-07-20  Tom Tromey  <tom@tromey.com>
6599
6600         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
6601         * stabsread.c (patch_block_stabs, define_symbol, read_type)
6602         (read_enum_type, common_block_start, common_block_end)
6603         (cleanup_undefined_types_1, finish_global_stabs): Update.
6604         * mdebugread.c (psymtab_to_symtab_1): Update.
6605         * dwarf2read.c (fixup_go_packaging, read_func_scope)
6606         (read_lexical_block_scope, new_symbol): Update.
6607         * dbxread.c (process_one_symbol): Update.
6608         * coffread.c (coff_symtab_read, process_coff_symbol)
6609         (coff_read_enum_type): Update.
6610         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
6611         declare.
6612         (get_local_symbols, get_file_symbols, get_global_symbols): New
6613         functions.
6614         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
6615         m_global_symbols.
6616         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
6617         (~scoped_free_pendings): Update.
6618         (finish_block, prepare_for_building, reset_symtab_globals)
6619         (end_symtab_get_static_block, end_symtab_with_blockvector)
6620         (augment_type_symtab, push_context): Update.
6621         (get_local_symbols, get_file_symbols, get_global_symbols): New
6622         functions.
6623         (buildsym_init): Update.
6624
6625 2018-07-20  Tom Tromey  <tom@tromey.com>
6626
6627         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
6628         (process_full_type_unit): Likewise.
6629         (dwarf2_start_symtab): Set list_in_scope.
6630
6631 2018-07-20  Tom Tromey  <tom@tromey.com>
6632
6633         * dwarf2read.c (process_psymtab_comp_unit_reader)
6634         (build_type_psymtabs_reader): Do not set list_in_scope.
6635
6636 2018-07-20  Tom Tromey  <tom@tromey.com>
6637
6638         * buildsym.c (free_pendings): Remove.
6639         (add_symbol_to_list, scoped_free_pendings)
6640         (finish_block_internal, buildsym_init): Update.
6641
6642 2018-07-20  Tom Tromey  <tom@tromey.com>
6643
6644         * xcoffread.c (read_xcoff_symtab): Update.
6645         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
6646         Update.
6647         * dbxread.c (process_one_symbol): Update.
6648         * coffread.c (coff_symtab_read): Update.
6649         * buildsym.h (finish_block): Update.
6650         * buildsym.c (finish_block): Remove "listhead" argument.
6651         (end_symtab_get_static_block): Update.
6652
6653 2018-07-20  Tom Tromey  <tom@tromey.com>
6654
6655         * buildsym.h (class scoped_free_pendings): Remove constructor.
6656         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
6657         method.
6658         <m_pending_block_obstack, m_pending_blocks>: New members.
6659         (pending_block_obstack, pending_blocks): Remove.
6660         (scoped_free_pendings::scoped_free_pendings): Default.
6661         (~scoped_free_pendings): Update.
6662         (free_pending_blocks): Remove.
6663         (finish_block_internal, record_pending_block, make_blockvector)
6664         (end_symtab_get_static_block, augment_type_symtab, push_context)
6665         (buildsym_init): Update.
6666
6667 2018-07-20  Tom Tromey  <tom@tromey.com>
6668
6669         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
6670         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
6671         members.
6672         (pending_addrmap, pending_addrmap_obstack)
6673         (pending_addrmap_interesting): Remove.
6674         (scoped_free_pendings, record_block_range, make_blockvector)
6675         (prepare_for_building, reset_symtab_globals, buildsym_init):
6676         Update.
6677
6678 2018-07-20  Tom Tromey  <tom@tromey.com>
6679
6680         * xcoffread.c (process_linenos): Update.
6681         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
6682         * mdebugread.c (psymtab_to_symtab_1): Update.
6683         * dwarf2read.c (setup_type_unit_groups)
6684         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
6685         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
6686         * dbxread.c (process_one_symbol): Update.
6687         * coffread.c (coff_symtab_read, enter_linenos)
6688         (process_coff_symbol): Update.
6689         * buildsym.h (current_subfile): Don't declare.
6690         (get_current_subfile): Declare.
6691         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
6692         member.
6693         (start_subfile, free_buildsym_compunit, push_subfile)
6694         (prepare_for_building, start_symtab): Update.
6695         (get_current_subfile): New function.
6696
6697 2018-07-20  Tom Tromey  <tom@tromey.com>
6698
6699         * coffread.c (coff_symtab_read): Update.
6700         * xcoffread.c (read_xcoff_symtab): Update.
6701         * dwarf2read.c (new_symbol): Update.
6702         (read_func_scope, read_lexical_block_scope): Update.
6703         * dbxread.c (process_one_symbol): Update.
6704         * buildsym.h (context_stack, context_stack_depth): Don't declare.
6705         (outermost_context_p): Remove macro.
6706         (outermost_context_p, get_current_context_stack)
6707         (get_context_stack_depth): Declare.
6708         (pop_context): Return struct context_stack.
6709         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
6710         member.
6711         (context_stack_size): Remove.
6712         (INITIAL_CONTEXT_STACK_SIZE): Remove.
6713         (prepare_for_building, end_symtab_get_static_block)
6714         (augment_type_symtab, push_context): Update.
6715         (pop_context): Return struct context_stack.
6716         (outermost_context_p, get_current_context_stack)
6717         (get_context_stack_depth): New functions.
6718         (buildsym_init): Update.
6719
6720 2018-07-20  Tom Tromey  <tom@tromey.com>
6721
6722         * rust-exp.y: Now a pure parser.  Update all rules.
6723         (%union): Move earlier.
6724         (current_parser, work_obstack): Remove globals.
6725         (rust_parser, ~rust_parser): Update.
6726         (class rust_parser) <copy_name, concat3, crate_name, super_name,
6727         lex_character, lex_number, lex_string, lex_identifier,
6728         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
6729         convert_name, convert_params_to_expression,
6730         convert_ast_to_expression, ast_basic_type, ast_operation,
6731         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
6732         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
6733         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
6734         ast_array_type, ast_slice_type, ast_reference_type,
6735         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
6736         (rust_parse): Update.
6737         (rustyyerror, rustyylex): Add parser parameter.
6738         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
6739         (rust_lex_stringish_test, rust_lex_test_sequence)
6740         (rust_lex_test_trailing_dot, rust_lex_test_completion)
6741         (rust_lex_test_push_back, rust_lex_tests): Update.
6742
6743 2018-07-19  Pedro Alves  <palves@redhat.com>
6744
6745         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
6746         gdb::unique_xmalloc_ptr.
6747         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
6748         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
6749         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
6750         copy-initialization.
6751         * guile/scm-pretty-print.c (ppscm_print_children): Use
6752         gdb::unique_xmalloc_ptr instead of cleanups.
6753         (gdbscm_apply_val_pretty_printer): Remove cleanups.
6754         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
6755         gdb::unique_xmalloc_ptr.
6756         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6757         Adjust to use gdb::unique_xmalloc_ptr.
6758         * guile/scm-utils.c (extract_arg): Adjust.
6759         * guile/scm-value.c (gdbscm_value_field): Adjust to use
6760         gdb::unique_xmalloc_ptr instead of a cleanup.
6761
6762 2018-07-19  Tom Tromey  <tom@tromey.com>
6763
6764         * utils.c (do_value_free_to_mark)
6765         (make_cleanup_value_free_to_mark): Remove.
6766         * utils.h (make_cleanup_value_free_to_mark): Remove.
6767
6768 2018-07-19  Pedro Alves  <palves@redhat.com>
6769
6770         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
6771         forwarding reference.
6772
6773 2018-07-18  Pedro Alves  <palves@redhat.com>
6774
6775         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
6776         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
6777         cleanup.
6778
6779 2018-07-18  Pedro Alves  <palves@redhat.com>
6780
6781         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
6782         exceptions.
6783         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
6784         (gdbscm_wrap): New.
6785         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
6786         directly instead of a cleanup.
6787         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
6788         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
6789         (vlscm_binop_gdbthrow): New, factored out from ...
6790         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
6791         (vlscm_rich_compare): Use gdbscm_wrap.
6792         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
6793         instead of a cleanup.
6794         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
6795         cleanup.
6796         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
6797         Use xfree directly instead of a cleanup.
6798         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
6799         Adjust to use gdbscm_wrap and scoped_value_mark.
6800         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
6801         (gdbscm_value_address, gdbscm_value_dereference)
6802         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
6803         scoped_value_mark.
6804         (gdbscm_value_dynamic_type): Use scoped_value_mark.
6805         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
6806         scoped_value_mark.
6807         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
6808         gdbscm_wrap and scoped_value_mark.
6809         (gdbscm_value_to_string): Use xfree directly instead of a
6810         cleanup.  Move 'buffer' unique_ptr to TRY scope.
6811         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
6812         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
6813         scoped_value_mark.
6814         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
6815         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
6816         scoped_value_mark.
6817         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
6818         gdbscm_wrap.
6819
6820 2018-07-18  Tom de Vries  <tdevries@suse.de>
6821
6822         * findvar.c (default_read_var_value): Also resolve dynamic type for
6823         LOC_OPTIMIZED_OUT vars.
6824
6825 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
6826
6827         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
6828         decoding.
6829
6830 2018-07-17  Tom Tromey  <tom@tromey.com>
6831
6832         * guile/scm-param.c (pascm_set_func, pascm_show_func)
6833         (compute_enum_list, pascm_set_param_value_x)
6834         (gdbscm_parameter_value): Update.
6835         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
6836         (gdbscm_scm_to_host_string): Update.
6837         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
6838         Update.
6839         * guile/scm-cmd.c (cmdscm_add_completion): Update.
6840         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
6841         * guile/scm-string.c (gdbscm_scm_to_string): Return
6842         unique_xmalloc_ptr.
6843         (gdbscm_scm_to_host_string): Likewise.
6844
6845 2018-07-17  Tom Tromey  <tom@tromey.com>
6846
6847         * guile/guile.c (gdbscm_eval_from_control_command): Update.
6848         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
6849         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
6850         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
6851         unique_xmalloc_ptr.
6852
6853 2018-07-17  Tom Tromey  <tom@tromey.com>
6854
6855         * guile/scm-param.c (pascm_signal_setshow_error): Update.
6856         * guile/guile-internal.h (gdbscm_exception_message_to_string):
6857         Update.
6858         * guile/scm-cmd.c (cmdscm_function): Update.
6859         * guile/scm-pretty-print.c
6860         (ppscm_print_exception_unless_memory_error): Update.
6861         * guile/scm-exception.c (gdbscm_exception_message_to_string):
6862         Return unique_xmalloc_ptr.
6863
6864 2018-07-17  Tom Tromey  <tom@tromey.com>
6865
6866         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
6867         Use string_printf.
6868
6869 2018-07-17  Jim Wilson  <jimw@sifive.com>
6870
6871         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
6872         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
6873         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
6874         unecessary braces after EF_RISCV_RVC test.  Delete call to
6875         set_gdbarch_decr_pc_after_break.
6876
6877         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
6878         RISCV_LAST_FP_REGNUM + 1.
6879         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
6880
6881 2018-07-17  Tom Tromey  <tom@tromey.com>
6882
6883         * configure.ac: Remove --disable-gdbcli.
6884         * configure: Rebuild.
6885         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
6886         (SUBDIR_CLI_CFLAGS): Remove.
6887         (SFILES): Use SUBDIR_CLI_SRCS.
6888         (COMMON_OBS): Use SUBDIR_CLI_OBS.
6889
6890 2018-07-17  Tom Tromey  <tom@tromey.com>
6891
6892         PR gdb/18624:
6893         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
6894
6895 2018-07-16  Jim Wilson  <jimw@sifive.com>
6896
6897         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
6898
6899 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6900
6901         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
6902         variable.
6903         (libunwind_frame_sniffer): Likewise.
6904         (libunwind_frame_prev_register): Likewise.
6905         (libunwind_sigtramp_frame_sniffer): Likewise.
6906         * ia64-tdep.c (ia64_access_reg): Likewise.
6907         (ia64_access_rse_reg): Likewise.
6908         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
6909         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
6910
6911 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6912
6913         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
6914
6915 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
6916
6917         * remote-sim.c (gdbsim_target::close,
6918         gdbsim_target::mourn_inferior): Remove unused variables.
6919
6920 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
6921
6922         * ia64-tdep.c (ktab_buf): New global.
6923         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
6924         (get_kernel_table): Adjust.
6925
6926 2018-07-16  Tom Tromey  <tom@tromey.com>
6927
6928         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
6929         * dwarf2read.c (using_directives, new_symbol): Use
6930         outermost_context_p.
6931         * dbxread.c (process_one_symbol): Use outermost_context_p.
6932         * coffread.c (coff_symtab_read): Use outermost_context_p.
6933
6934 2018-07-16  Tom Tromey  <tom@tromey.com>
6935
6936         * dwarf2read.c (using_directives, read_func_scope)
6937         (read_lexical_block_scope): Update.
6938         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6939         * buildsym.h (local_using_directives, global_using_directives):
6940         Don't declare.
6941         (get_local_using_directives, set_local_using_directives)
6942         (get_global_using_directives): Declare.
6943         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
6944         m_global_using_directives>: New members.
6945         (finish_block_internal, prepare_for_building)
6946         (reset_symtab_globals, end_symtab_get_static_block)
6947         (push_context): Update.
6948         (get_local_using_directives, set_local_using_directives)
6949         (get_global_using_directives): New functions.
6950         (buildsym_init): Update.
6951
6952 2018-07-16  Tom Tromey  <tom@tromey.com>
6953
6954         * xcoffread.c (xcoff_initial_scan): Don't call
6955         free_pending_blocks.
6956         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
6957         * buildsym.h (class scoped_free_pendings): Add constructor.
6958         (free_pending_blocks): Don't declare.
6959         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
6960         (free_pending_blocks): Now static.
6961
6962 2018-07-16  Tom Tromey  <tom@tromey.com>
6963
6964         * buildsym.h (push_subfile, pop_subfile): Update declarations.
6965         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
6966         member.
6967         (struct subfile_stack): Remove.
6968         (subfile_stack): Remove.
6969         (push_subfile, pop_subfile, buildsym_init): Update.
6970
6971 2018-07-16  Tom Tromey  <tom@tromey.com>
6972
6973         * buildsym.c (push_subfile): Use gdb_assert.
6974         (pop_subfile): Use gdb_assert.
6975
6976 2018-07-16  Tom Tromey  <tom@tromey.com>
6977
6978         * buildsym.h (merge_symbol_lists): Remove.
6979         * buildsym.c (merge_symbol_lists): Remove.
6980
6981 2018-07-16  Tom Tromey  <tom@tromey.com>
6982
6983         * stabsread.c (scan_file_globals): Update comment.
6984         * stabsread.h (scan_file_globals): Move from buildsym.h.
6985         * buildsym.h (scan_file_globals): Move to stabsread.h.
6986
6987 2018-07-16  Tom Tromey  <tom@tromey.com>
6988
6989         * xcoffread.c (xcoff_new_init): Update.
6990         * mipsread.c (mipscoff_new_init): Update.
6991         * mdebugread.c (mdebug_build_psymtabs): Update.
6992         * elfread.c (elf_new_init): Update.
6993         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
6994         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
6995         * buildsym.h (buildsym_new_init): Don't declare.
6996         * buildsym.c (buildsym_new_init): Remove.
6997
6998 2018-07-16  Tom Tromey  <tom@tromey.com>
6999
7000         * stabsread.h (within_function): Move from buildsym.h.
7001         * stabsread.c (start_stabs): Clear within_function.
7002         * coffread.c (coff_start_symtab): Clear within_function.
7003         * buildsym.h (within_function): Move to stabsread.h.
7004         * buildsym.c (prepare_for_building): Update.
7005
7006 2018-07-16  Tom Tromey  <tom@tromey.com>
7007
7008         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
7009         * dwarf2read.c (dwarf2_start_symtab): Don't set
7010         processing_gcc_compilation.
7011         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
7012
7013 2018-07-16  Tom Tromey  <tom@tromey.com>
7014
7015         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
7016         (next_symbol_text_func): Move from buildsym.h.
7017         * stabsread.c (hashname): Move from buildsym.c.
7018         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
7019         (next_symbol_text_func, hashname): Move to stabsread.h.
7020         * buildsym.c: Don't include bcache.h
7021         (hashname): Move to stasbread.c.
7022
7023 2018-07-16  Tom Tromey  <tom@tromey.com>
7024
7025         * buildsym.h (context_stack_size): Don't declare.
7026         * buildsym.c (context_stack_size): New global.
7027
7028 2018-07-16  Tom Tromey  <tom@tromey.com>
7029
7030         * dbxread.c (processing_acc_compilation): New global.
7031         * buildsym.h (processing_acc_compilation): Don't declare.
7032
7033 2018-07-16  Tom Tromey  <tom@tromey.com>
7034
7035         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
7036         * dbxread.c (read_ofile_symtab): Update.
7037         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
7038         * buildsym.h (last_source_start_addr): Remove.
7039         (set_last_source_start_addr, get_last_source_start_addr):
7040         Declare.
7041         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
7042         parameter.
7043         (struct buildsym_compunit) <m_last_source_start_addr>: New
7044         member.
7045         (prepare_for_building): Remove start_addr parameter.
7046         (start_symtab, restart_symtab, end_symtab_get_static_block)
7047         (end_symtab_with_blockvector): Update.
7048         (set_last_source_start_addr, get_last_source_start_addr): New
7049         functions.
7050
7051 2018-07-16  Tom Tromey  <tom@tromey.com>
7052
7053         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
7054         member.
7055         (have_line_numbers): Remove.
7056         (record_line, prepare_for_building, end_symtab_get_static_block)
7057         (augment_type_symtab): Update.
7058
7059 2018-07-16  Tom Tromey  <tom@tromey.com>
7060
7061         * buildsym.c (~buildsym_compunit): Free the macro table.
7062         (struct buildsym_compunit) <get_macro_table, release_macros>: New
7063         methods.
7064         <m_pending_macros>: New member.
7065         (pending_macros): Remove.
7066         (~scoped_free_pendings, get_macro_table, prepare_for_building)
7067         (reset_symtab_globals, end_symtab_get_static_block)
7068         (end_symtab_with_blockvector, augment_type_symtab)
7069         (buildsym_init): Update.
7070
7071 2018-07-16  Tom Tromey  <tom@tromey.com>
7072
7073         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
7074         parameter.
7075         (buildsym_compunit::set_last_source_file): New method.
7076         <m_last_source_file>: New member.
7077         (prepare_for_building): Remove "name" parameter.
7078         (start_symtab, restart_symtab, reset_symtab_globals): Update.
7079         (last_source_file): Remove.
7080         (set_last_source_file, get_last_source_file): Update.
7081
7082 2018-07-16  Tom Tromey  <tom@tromey.com>
7083
7084         * buildsym.c (prepare_for_building): Add assert.
7085
7086 2018-07-16  Tom Tromey  <tom@tromey.com>
7087
7088         * buildsym.c (~buildsym_compunit): Update.
7089         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
7090         (start_subfile, patch_subfile_names)
7091         (end_symtab_with_blockvector): Update.
7092
7093 2018-07-16  Tom Tromey  <tom@tromey.com>
7094
7095         * buildsym.c (struct buildsym_compunit): Add constructor,
7096         destructor, initializers.
7097         (start_buildsym_compunit): Remove.
7098         (free_buildsym_compunit): Use "delete".
7099         (start_symtab, restart_symtab): Use "new".
7100
7101 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
7102
7103         * symfile.c (set_objfile_default_section_offset): Remove struct
7104         keyword.
7105
7106 2018-07-14  Stafford Horne  <shorne@gmail.com>
7107
7108         * (Responsible Maintainers): Add myself as or1k maintainer.
7109
7110 2018-07-13  Tom Tromey  <tom@tromey.com>
7111
7112         * symfile.c (set_objfile_default_section_offset): Use extra braces
7113         around initializer.
7114
7115 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7116
7117         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
7118         non-branching basr.
7119
7120 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7121
7122         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7123         unittests/cli-utils-selftests.c
7124         * unittests/cli-utils-selftests.c: New file.
7125
7126 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7127
7128         * NEWS: Mention new commands. Mention change to 'thread apply'.
7129
7130 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7131
7132         * thread.c (thr_try_catch_cmd): New function.
7133         (thread_apply_all_command): Handle qcs flags.
7134         (thread_apply_command): Handle qcs flags.
7135         (taas_command): New function.
7136         (tfaas_command): New function.
7137         (_initialize_thread): Update to setup the new commands 'taas
7138         and 'tfaas'. Change doc string for 'thread apply'.
7139
7140 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7141
7142         * stack.c: (trailing_outermost_frame): New function, mostly
7143         extracted from backtrace_command_1.
7144         (leading_innermost_frame): New function.
7145         (backtrace_command_1): Update to call trailing_outermost_frame.
7146         (frame_apply_command_count): New function.
7147         (frame_apply_level_command): New function.
7148         (frame_apply_all_command): New function.
7149         (frame_apply_command): New function.
7150         (faas_command): New function.
7151         (frame_cmd_list): New variable.
7152         (_initialize_stack): Update to setup the new commands 'frame apply'
7153         and 'faas'.
7154
7155 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7156
7157         * cli-utils.c (number_or_range_parser::get_number): Only handle
7158         numbers or convenience var as numbers.
7159         (parse_flags): New function.
7160         (parse_flags_qcs): New function.
7161         (number_or_range_parser::finished): Ensure parsing end is detected
7162         before end of string.
7163         * cli-utils.h (parse_flags): New function.
7164         (parse_flags_qcs): New function.
7165         (number_or_range_parser): Remove m_finished bool.
7166         (number_or_range_parser::skip_range): Set m_in_range to false.
7167
7168 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7169
7170         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
7171         on Windows.
7172
7173 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
7174             Jan Kratochvil  <jan.kratochvil@redhat.com>
7175             Paul Fertser  <fercerpav@gmail.com>
7176             Tsutomu Seki  <sekiriki@gmail.com>
7177             Pedro Alves  <palves@redhat.com>
7178
7179         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7180         'unittests/parse-connection-spec-selftests.c'.
7181         (COMMON_SFILES): Add 'common/netstuff.c'.
7182         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
7183         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
7184         * common/netstuff.c: New file.
7185         * common/netstuff.h: New file.
7186         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
7187         (wait_for_connect): Update comment.  New parameter
7188         'gdb::optional<int> sock' instead of 'struct serial *scb'.
7189         Use 'sock' directly instead of 'scb->fd'.
7190         (try_connect): New function, with code from 'net_open'.
7191         (net_open): Rewrite main loop to deal with multiple
7192         sockets/addresses.  Handle IPv6-style hostnames; implement
7193         support for IPv6 connections.
7194         * unittests/parse-connection-spec-selftests.c: New file.
7195
7196 2018-07-11  Pedro Alves  <palves@redhat.com>
7197
7198         PR gdb/23377
7199         * remote.c (remote_target::remote_detach_pid): Call
7200         set_current_process.
7201
7202 2018-07-11  Pedro Alves  <palves@redhat.com>
7203
7204         * h8300-tdep.c (h8300_gdbarch_init): Remove
7205         set_gdbarch_ecoff_reg_to_regnum calls.
7206
7207 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
7208
7209         PR c++/23373
7210         * c-typeprint.c (c_type_print_base_struct_union): Don't print
7211         offsets/sizes for static members of a class/struct.
7212
7213 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
7214
7215         * target-descriptions.c (tdesc_register_bitsize): Rename.
7216         * target-descriptions.h (tdesc_register_bitsize): Likewise.
7217         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
7218         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
7219
7220 2018-07-10  Tom Tromey  <tom@tromey.com>
7221
7222         * breakpoint.c (moribund_locations): Now static and a
7223         std::vector.
7224         (breakpoint_init_inferior, moribund_breakpoint_here_p)
7225         (build_bpstat_chain, update_global_location_list)
7226         (breakpoint_retire_moribund): Update.
7227         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
7228         VEC.
7229
7230 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7231
7232         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
7233         (riscv_register_reggroup_p): Use new function, remove unneeded
7234         parenthesis.
7235         (riscv_push_dummy_call): Extend assert to compare against xlen or
7236         flen based on register type.
7237
7238 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7239
7240         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
7241
7242 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
7243
7244         * remote.c (show_hardware_watchpoint_limit): New function.
7245         (show_hardware_watchpoint_length_limit): New function.
7246         (show_hardware_breakpoint_limit): New function.
7247         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
7248         where appropriate, update help text.
7249
7250 2018-07-09  Tom Tromey  <tom@tromey.com>
7251
7252         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
7253         (CLIBS): Don't mention NAT_CLIBS.
7254
7255 2018-07-09  Tom Tromey  <tom@tromey.com>
7256
7257         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
7258         (LIBGDB_OBS, clean mostlyclean): Update.
7259         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
7260
7261 2018-07-09  Tom Tromey  <tom@tromey.com>
7262
7263         * Makefile.in (%.c: %.y): Use ECHO_YACC.
7264         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
7265         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
7266
7267 2018-07-09  Tom Tromey  <tom@tromey.com>
7268
7269         * Makefile.in (ALLDEPFILES): Remove exec.c.
7270         (COMMON_OBS): Remove exec.o.
7271         (COMMON_SFILES): Add exec.c.
7272
7273 2018-07-09  Tom Tromey  <tom@tromey.com>
7274
7275         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
7276
7277 2018-07-09  Tom Tromey  <tom@tromey.com>
7278
7279         * Makefile.in (clean mostlyclean): Remove stamp-version.
7280         (version.c): Depend on stamp-version.
7281         (stamp-version): New rule, from version.c rule.
7282
7283 2018-07-09  Tom Tromey  <tom@tromey.com>
7284
7285         * Makefile.in (init.c): Depend on stamp-init.
7286         (stamp-init): New rule, from init.c rule.
7287         (clean mostlyclean): Remove stamp-init.
7288
7289 2018-07-09  Tom Tromey  <tom@tromey.com>
7290
7291         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
7292         SUBDIR_GCC_COMPILE_SRCS.
7293
7294 2018-07-09  Tom Tromey  <tom@tromey.com>
7295
7296         * Makefile.in (init.c): Remove some unused sed rules.
7297
7298 2018-07-09  Tom Tromey  <tom@tromey.com>
7299
7300         * Makefile.in (TSOBS): Remove.
7301         (INIT_FILES): Update.
7302         (LIBGDB_OBS): Update.
7303         (COMMON_SFILES): Add inflow.c.
7304         (SFILES): Remove inflow.c.
7305
7306 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7307
7308         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
7309
7310 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
7311
7312         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
7313         get_saveloc_name, is_signal_frame_name, step_name,
7314         init_remote_name, create_addr_space_name,
7315         destroy_addr_space_name, search_unwind_table_name,
7316         find_dyn_list_name): Constify.
7317
7318 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
7319
7320         * darwin-nat.c (darwin_pthread_kill): New function.
7321         (darwin_resume_thread): Use darwin_pthread_kill.
7322
7323 2018-07-05  Tom de Vries  <tdevries@suse.de>
7324
7325         * macroexp.c (macro_buffer) <operator=>: New member function.
7326
7327 2018-07-04  Tom Tromey  <tom@tromey.com>
7328
7329         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
7330
7331 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
7332
7333         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
7334         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
7335         * maint.c: Likewise.
7336         * top.c: Likewise.
7337
7338 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7339
7340         * NEWS: Create a new section for the next release branch.
7341         Rename the section of the current branch, now that it has
7342         been cut.
7343
7344 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
7345
7346         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
7347         * version.in: Bump version to 8.2.50.DATE-git.
7348
7349 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
7350             Pedro Alves  <palves@redhat.com>
7351
7352         * linux-nat.c (linux_init_ptrace): Rename to ...
7353         (linux_init_ptrace_procfs): ... this.  Call
7354         linux_proc_init_warnings.
7355         (linux_nat_target::post_attach)
7356         (linux_nat_target::post_startup_inferior): Adjust.
7357         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
7358         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
7359
7360 2018-07-04  Tom de Vries  <tdevries@suse.de>
7361
7362         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
7363         check ...
7364         (read_comp_unit_head): ... here.
7365
7366 2018-07-03  Tom Tromey  <tom@tromey.com>
7367
7368         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
7369         (stop_tracing, tstatus_command)
7370         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
7371         (print_one_static_tracepoint_marker): Update.
7372         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
7373         std::vector.
7374         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
7375         VEC.
7376         (all_tracepoints, static_tracepoints_here): Return std::vector.
7377
7378 2018-07-03  Tom Tromey  <tom@tromey.com>
7379
7380         * common/ptid.c (ptid_equal): Remove.
7381         * common/ptid.h (ptid_equal): Don't declare.
7382         * ada-tasks.c: Update.
7383         * breakpoint.c: Update.
7384         * common/agent.c: Update.
7385         * corelow.c: Update.
7386         * darwin-nat-info.c: Update.
7387         * darwin-nat.c: Update.
7388         * dcache.c: Update.
7389         * dtrace-probe.c: Update.
7390         * dummy-frame.c: Update.
7391         * fbsd-nat.c: Update.
7392         * frame.c: Update.
7393         * gdbthread.h: Update.
7394         * gnu-nat.c: Update.
7395         * go32-nat.c: Update.
7396         * inf-loop.c: Update.
7397         * inf-ptrace.c: Update.
7398         * infcall.c: Update.
7399         * infcmd.c: Update.
7400         * inflow.c: Update.
7401         * infrun.c: Update.
7402         * linux-fork.c: Update.
7403         * linux-nat.c: Update.
7404         * linux-thread-db.c: Update.
7405         * mi/mi-cmd-var.c: Update.
7406         * mi/mi-interp.c: Update.
7407         * mi/mi-main.c: Update.
7408         * nto-procfs.c: Update.
7409         * ppc-linux-tdep.c: Update.
7410         * procfs.c: Update.
7411         * python/py-inferior.c: Update.
7412         * python/py-record-btrace.c: Update.
7413         * python/py-record.c: Update.
7414         * ravenscar-thread.c: Update.
7415         * regcache.c: Update.
7416         * remote-sim.c: Update.
7417         * remote.c: Update.
7418         * sol-thread.c: Update.
7419         * solib.c: Update.
7420         * target.c: Update.
7421         * tui/tui-stack.c: Update.
7422         * varobj.c: Update.
7423         * windows-nat.c: Update.
7424         * windows-tdep.c: Update.
7425
7426 2018-07-03  Tom Tromey  <tom@tromey.com>
7427
7428         * common/ptid.c (ptid_match): Remove.
7429         * common/ptid.h (ptid_match): Don't declare.
7430         * fbsd-nat.c: Update.
7431         * infcmd.c: Update.
7432         * infrun.c: Update.
7433         * linux-nat.c: Update.
7434         * record-btrace.c: Update.
7435         * regcache.c: Update.
7436         * remote.c: Update.
7437
7438 2018-07-03  Tom Tromey  <tom@tromey.com>
7439
7440         * common/ptid.c (ptid_tid_p): Remove.
7441         * common/ptid.h (ptid_tid_p): Don't declare.
7442         * sol-thread.c: Update.
7443
7444 2018-07-03  Tom Tromey  <tom@tromey.com>
7445
7446         * common/ptid.c (ptid_lwp_p): Remove.
7447         * common/ptid.h (ptid_lwp_p): Don't declare.
7448         * fbsd-nat.c: Update.
7449         * linux-nat.c: Update.
7450         * nat/linux-procfs.c: Update.
7451         * nat/x86-linux-dregs.c: Update.
7452         * sol-thread.c: Update.
7453
7454 2018-07-03  Tom Tromey  <tom@tromey.com>
7455
7456         * common/ptid.c (ptid_is_pid): Remove.
7457         * common/ptid.h (ptid_is_pid): Don't declare.
7458         * infrun.c: Update.
7459         * linux-nat.c: Update.
7460         * mi/mi-interp.c: Update.
7461         * remote.c: Update.
7462         * thread.c: Update.
7463
7464 2018-07-03  Tom Tromey  <tom@tromey.com>
7465
7466         * common/ptid.c (ptid_get_tid): Remove.
7467         * common/ptid.h (ptid_get_tid): Don't declare.
7468         * ada-tasks.c: Update.
7469         * aix-thread.c: Update.
7470         * bsd-uthread.c: Update.
7471         * darwin-nat.c: Update.
7472         * fbsd-nat.c: Update.
7473         * i386-darwin-nat.c: Update.
7474         * infrun.c: Update.
7475         * linux-tdep.c: Update.
7476         * nto-procfs.c: Update.
7477         * ppc-ravenscar-thread.c: Update.
7478         * python/py-infthread.c: Update.
7479         * ravenscar-thread.c: Update.
7480         * sol-thread.c: Update.
7481         * sparc-ravenscar-thread.c: Update.
7482         * windows-nat.c: Update.
7483
7484 2018-07-03  Tom Tromey  <tom@tromey.com>
7485
7486         * common/ptid.c (ptid_get_lwp): Remove.
7487         * common/ptid.h (ptid_get_lwp): Don't declare.
7488         * aarch64-linux-nat.c: Update.
7489         * ada-tasks.c: Update.
7490         * aix-thread.c: Update.
7491         * amd64-linux-nat.c: Update.
7492         * arm-linux-nat.c: Update.
7493         * corelow.c: Update.
7494         * fbsd-nat.c: Update.
7495         * fbsd-tdep.c: Update.
7496         * gnu-nat.c: Update.
7497         * i386-cygwin-tdep.c: Update.
7498         * i386-gnu-nat.c: Update.
7499         * i386-linux-nat.c: Update.
7500         * ia64-linux-nat.c: Update.
7501         * inf-ptrace.c: Update.
7502         * infrun.c: Update.
7503         * linux-fork.c: Update.
7504         * linux-nat.c: Update.
7505         * linux-tdep.c: Update.
7506         * linux-thread-db.c: Update.
7507         * mips-linux-nat.c: Update.
7508         * nat/aarch64-linux-hw-point.c: Update.
7509         * nat/aarch64-linux.c: Update.
7510         * nat/linux-btrace.c: Update.
7511         * nat/linux-osdata.c: Update.
7512         * nat/linux-procfs.c: Update.
7513         * nat/x86-linux-dregs.c: Update.
7514         * obsd-nat.c: Update.
7515         * ppc-fbsd-nat.c: Update.
7516         * ppc-linux-nat.c: Update.
7517         * procfs.c: Update.
7518         * python/py-infthread.c: Update.
7519         * ravenscar-thread.c: Update.
7520         * remote.c: Update.
7521         * s390-linux-nat.c: Update.
7522         * sol-thread.c: Update.
7523         * sol2-tdep.c: Update.
7524         * spu-linux-nat.c: Update.
7525         * x86-linux-nat.c: Update.
7526         * xtensa-linux-nat.c: Update.
7527
7528 2018-07-03  Tom Tromey  <tom@tromey.com>
7529
7530         * common/ptid.c (ptid_get_pid): Remove.
7531         * common/ptid.h (ptid_get_pid): Don't declare.
7532         * aarch64-linux-nat.c: Update.
7533         * ada-lang.c: Update.
7534         * aix-thread.c: Update.
7535         * alpha-bsd-nat.c: Update.
7536         * amd64-fbsd-nat.c: Update.
7537         * amd64-linux-nat.c: Update.
7538         * arm-linux-nat.c: Update.
7539         * arm-nbsd-nat.c: Update.
7540         * auxv.c: Update.
7541         * break-catch-syscall.c: Update.
7542         * breakpoint.c: Update.
7543         * bsd-uthread.c: Update.
7544         * corelow.c: Update.
7545         * ctf.c: Update.
7546         * darwin-nat.c: Update.
7547         * fbsd-nat.c: Update.
7548         * fbsd-tdep.c: Update.
7549         * gcore.c: Update.
7550         * gnu-nat.c: Update.
7551         * hppa-nbsd-nat.c: Update.
7552         * hppa-obsd-nat.c: Update.
7553         * i386-fbsd-nat.c: Update.
7554         * ia64-linux-nat.c: Update.
7555         * inf-ptrace.c: Update.
7556         * infcmd.c: Update.
7557         * inferior.c: Update.
7558         * inferior.h: Update.
7559         * inflow.c: Update.
7560         * infrun.c: Update.
7561         * linux-fork.c: Update.
7562         * linux-nat.c: Update.
7563         * linux-tdep.c: Update.
7564         * linux-thread-db.c: Update.
7565         * m68k-bsd-nat.c: Update.
7566         * mi/mi-interp.c: Update.
7567         * mi/mi-main.c: Update.
7568         * mips-linux-nat.c: Update.
7569         * mips-nbsd-nat.c: Update.
7570         * mips64-obsd-nat.c: Update.
7571         * nat/aarch64-linux-hw-point.c: Update.
7572         * nat/aarch64-linux.c: Update.
7573         * nat/linux-btrace.c: Update.
7574         * nat/linux-osdata.c: Update.
7575         * nat/linux-procfs.c: Update.
7576         * nat/x86-linux-dregs.c: Update.
7577         * nto-procfs.c: Update.
7578         * obsd-nat.c: Update.
7579         * ppc-linux-nat.c: Update.
7580         * ppc-nbsd-nat.c: Update.
7581         * ppc-obsd-nat.c: Update.
7582         * proc-service.c: Update.
7583         * procfs.c: Update.
7584         * python/py-inferior.c: Update.
7585         * python/py-infthread.c: Update.
7586         * ravenscar-thread.c: Update.
7587         * record.c: Update.
7588         * remote-sim.c: Update.
7589         * remote.c: Update.
7590         * rs6000-nat.c: Update.
7591         * s390-linux-nat.c: Update.
7592         * sh-nbsd-nat.c: Update.
7593         * sol-thread.c: Update.
7594         * sparc-nat.c: Update.
7595         * sparc64-tdep.c: Update.
7596         * spu-linux-nat.c: Update.
7597         * spu-tdep.c: Update.
7598         * target-debug.h: Update.
7599         * target.c: Update.
7600         * thread.c: Update.
7601         * tid-parse.c: Update.
7602         * tracefile-tfile.c: Update.
7603         * vax-bsd-nat.c: Update.
7604         * windows-nat.c: Update.
7605         * x86-linux-nat.c: Update.
7606         * x86-nat.c: Update.
7607
7608 2018-07-03  Tom Tromey  <tom@tromey.com>
7609
7610         * common/ptid.c (pid_to_ptid): Remove.
7611         * common/ptid.h (pid_to_ptid): Don't declare.
7612         * aix-thread.c: Update.
7613         * arm-linux-nat.c: Update.
7614         * common/ptid.c: Update.
7615         * common/ptid.h: Update.
7616         * corelow.c: Update.
7617         * ctf.c: Update.
7618         * darwin-nat.c: Update.
7619         * fbsd-nat.c: Update.
7620         * fork-child.c: Update.
7621         * gnu-nat.c: Update.
7622         * go32-nat.c: Update.
7623         * inf-ptrace.c: Update.
7624         * infcmd.c: Update.
7625         * inferior.c: Update.
7626         * infrun.c: Update.
7627         * linux-fork.c: Update.
7628         * linux-nat.c: Update.
7629         * nat/aarch64-linux-hw-point.c: Update.
7630         * nat/fork-inferior.c: Update.
7631         * nat/x86-linux-dregs.c: Update.
7632         * nto-procfs.c: Update.
7633         * obsd-nat.c: Update.
7634         * procfs.c: Update.
7635         * progspace.c: Update.
7636         * remote.c: Update.
7637         * rs6000-nat.c: Update.
7638         * s390-linux-nat.c: Update.
7639         * sol-thread.c: Update.
7640         * spu-linux-nat.c: Update.
7641         * target.c: Update.
7642         * top.c: Update.
7643         * tracefile-tfile.c: Update.
7644         * windows-nat.c: Update.
7645
7646 2018-07-03  Tom Tromey  <tom@tromey.com>
7647
7648         * common/ptid.h (ptid_build): Don't declare.
7649         * common/ptid.c (ptid_build): Remove.
7650         * aix-thread.c: Update.
7651         * bsd-kvm.c: Update.
7652         * bsd-uthread.c: Update.
7653         * common/agent.c: Update.
7654         * common/ptid.c: Update.
7655         * common/ptid.h: Update.
7656         * corelow.c: Update.
7657         * darwin-nat.c: Update.
7658         * fbsd-nat.c: Update.
7659         * gnu-nat.c: Update.
7660         * linux-fork.c: Update.
7661         * linux-nat.c: Update.
7662         * linux-thread-db.c: Update.
7663         * nat/linux-osdata.c: Update.
7664         * nat/linux-procfs.c: Update.
7665         * nto-procfs.c: Update.
7666         * obsd-nat.c: Update.
7667         * proc-service.c: Update.
7668         * procfs.c: Update.
7669         * ravenscar-thread.c: Update.
7670         * remote-sim.c: Update.
7671         * remote.c: Update.
7672         * sol-thread.c: Update.
7673         * target.c: Update.
7674         * windows-nat.c: Update.
7675
7676 2018-07-03  Tom Tromey  <tom@tromey.com>
7677
7678         * infrun.c (follow_exec): Use exit_inferior_silent.
7679         * inferior.c (exit_inferior_num_silent): Remove.
7680         * inferior.h (exit_inferior_num_silent): Don't declare.
7681
7682 2018-07-03  Tom Tromey  <tom@tromey.com>
7683
7684         PR cli/23340:
7685         * darwin-nat.c (darwin_attach_pid): Reset inferior and
7686         inferior_ptid on error.
7687
7688 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
7689             Simon Marchi  <simon.marchi@polymtl.ca>
7690
7691         PR tdep/8282
7692         * disasm.h (gdb_disassembler): Add
7693         `m_disassembler_options_holder'. member
7694         * disasm.c (get_all_disassembler_options): New function.
7695         (gdb_disassembler::gdb_disassembler): Use it.
7696         (gdb_buffered_insn_length_init_dis): Likewise.
7697         (gdb_buffered_insn_length): Adjust accordingly.
7698         (set_disassembler_options): Handle options with arguments.
7699         (show_disassembler_options_sfunc): Likewise.  Add a leading new
7700         line if showing options with descriptions.
7701         (disassembler_options_completer): Adapt to using the
7702         `disasm_options_and_args_t' structure.
7703         * mips-tdep.c (mips_disassembler_options): New variable.
7704         (mips_disassembler_options_o32): Likewise.
7705         (mips_disassembler_options_n32): Likewise.
7706         (mips_disassembler_options_n64): Likewise.
7707         (gdb_print_insn_mips): Don't set `disassembler_options'.
7708         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
7709         functions.
7710         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
7711         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
7712         `gdbarch_disassembler_options_implicit' and
7713         `gdbarch_valid_disassembler_options'.
7714         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
7715         `disasm_options_and_args_t' structure.
7716         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
7717         method.
7718         (valid_disassembler_options): Switch from `disasm_options_t' to
7719         the `disasm_options_and_args_t' structure.
7720         * NEWS: Document `set disassembler-options' support for the MIPS
7721         target.
7722         * gdbarch.h: Regenerate.
7723         * gdbarch.c: Regenerate.
7724
7725 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7726
7727         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
7728
7729 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
7730
7731         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
7732         parameter in call to amd64_target_description.
7733         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
7734         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
7735         (amd64fbsd_init_abi): Likewise.
7736         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
7737         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7738         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7739         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
7740
7741 2018-06-29  Pedro Alves  <palves@redhat.com>
7742
7743         * gdb/amd64-tdep.h (amd64_create_target_description): Add
7744         "segments" parameter.
7745         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
7746         (_initialize_amd64_tdep): Update call to
7747         amd64_create_target_description.
7748         (amd64_target_description): Add "segments" parameter.  Adjust
7749         the implementation to use it.
7750         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
7751         call to amd64_create_target_description.
7752         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
7753         * gdb/arch/amd64.h (amd64_create_target_description): Add
7754         "segments" register.
7755         * gdb/arch/amd64.c (amd64_create_target_description): Add
7756         "segments" parameter.  Call create_feature_i386_64bit_segments
7757         only if SEGMENTS is true.
7758         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
7759         call to amd64_create_target_description.
7760
7761 2018-06-29  Pedro Alves  <palves@redhat.com>
7762
7763         * thread.c (thread_target_id_str): New, factored out from ...
7764         (print_thread_info_1): ... here.  Use it to compute the max
7765         "Target Id" column width.
7766
7767 2018-06-29  Pedro Alves  <palves@redhat.com>
7768
7769         * remote.c (remote_target::extra_thread_info): Delete
7770         'display_buf' and 'n' locals.  from the cache, regardless of
7771         packet mechanims is in use.  Use cache for qThreadExtra and qP
7772         methods too.
7773
7774 2018-06-29  Pedro Alves  <palves@redhat.com>
7775
7776         * blockframe.c (find_pc_sect_containing_function): New function.
7777         * breakpoint.c (print_breakpoint_location): Don't call
7778         find_pc_sect_function.
7779         * linespec.c (create_sals_line_offset): Record the location's
7780         symbol in the sal.
7781         * linespec.c (convert_address_location_to_sals): Fill in sal's
7782         symbol with find_pc_sect_containing_function.
7783         * symtab.c (find_function_start_sal): Rename to ...
7784         (find_function_start_sal_1): ... this.
7785         (find_function_start_sal): Reimplement as wrapper around
7786         find_function_start_sal_1, and use
7787         find_pc_sect_containing_function to fill in the sal's symbol.
7788         (find_function_start_sal(symbol*, bool)): Adjust.
7789         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
7790         comments.
7791         (find_pc_sect_containing_function): Declare.
7792
7793 2018-06-29  Pedro Alves  <palves@redhat.com>
7794
7795         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
7796         true if the the location has no symbol.
7797
7798 2018-06-28  Tom Tromey  <tom@tromey.com>
7799
7800         * NEWS: Mention --enable-codesign.
7801         * silent-rules.mk (ECHO_SIGN): New variable.
7802         * configure.ac: Add --enable-codesign.
7803         * configure: Rebuild.
7804         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
7805         (gdb$(EXEEXT)): Optionally invoke codesign.
7806
7807 2018-06-28  Pedro Alves  <palves@redhat.com>
7808
7809         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
7810         comments.
7811         (switch_to_thread_no_regs): Adjust comment.
7812         * infcmd.c (stop_pc): Delete.
7813         (post_create_inferior, info_program_command): Replace references
7814         to stop_pc with references to thread_info->suspend.stop_pc.
7815         * inferior.h (stop_pc): Delete declaration.
7816         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
7817         (handle_inferior_event_1, handle_signal_stop)
7818         (process_event_stop_test, keep_going_stepped_thread)
7819         (handle_step_into_function, handle_step_into_function_backward)
7820         (print_stop_location): Replace references to stop_pc with
7821         references to thread_info->suspend.stop_pc.
7822         (struct infcall_suspend_state) <stop_pc>: Delete field.
7823         (save_infcall_suspend_state, restore_infcall_suspend_state):
7824         Remove references to inf_stat->stop_pc.
7825         * linux-fork.c (fork_load_infrun_state): Likewise.
7826         * record-btrace.c (record_btrace_set_replay): Likewise.
7827         * record-full.c (record_full_goto_entry): Likewise.
7828         * remote.c (print_one_stopped_thread): Likewise.
7829         * target.c (target_resume): Extend comment.
7830         * thread.c (set_executing_thread): New.
7831         (set_executing): Use it.
7832         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
7833         Remove references to stop_pc.
7834
7835 2018-06-28  Pedro Alves  <palves@redhat.com>
7836
7837         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
7838         Moving fetching stop_pc until after ecs->event_thread is refreshed.
7839
7840 2018-06-28  Tom Tromey  <tom@tromey.com>
7841
7842         * coffread.c (coff_symfile_finish): Update.
7843         * xcoffread.c (xcoff_symfile_finish): Update.
7844         * elfread.c (elf_symfile_finish): Update.
7845         * symfile.h (dwarf2_free_objfile): Don't declare.
7846         * dwarf2read.c (_initialize_dwarf2_read): Use
7847         register_objfile_data_with_cleanup.
7848         (dwarf2_free_objfile): Now static.  Change signature.
7849
7850 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7851
7852         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
7853         option "-o" to add-symbol-file-load to add an offset to each
7854         section's load address.
7855         * symfile.c (set_objfile_default_section_offset): New function.
7856
7857 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7858
7859         * symfile.c (add_symbol_file_command): Make sure that sections
7860         with the same name are sorted in the same order.
7861
7862 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7863
7864         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
7865         require the second argument.  If omitted, load sections at the
7866         addresses specified in the file.
7867
7868 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7869
7870         * symfile.c (symbol_file_command, symbol_file_add_main_1)
7871         (_initialize_symfile): Add option "-o" to symbol-file to add an
7872         offset to each section of the symbol file.
7873
7874 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
7875
7876         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
7877
7878 2018-06-27  Tom Tromey  <tom@tromey.com>
7879
7880         * stack.c (_initialize_stack): Update "func" help text.
7881
7882 2018-06-27  Tom Tromey  <tom@tromey.com>
7883
7884         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
7885         std::vector.
7886         (unwind_infopy_str, pyuw_create_unwind_info)
7887         (unwind_infopy_add_saved_register, pyuw_sniffer)
7888         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
7889         Update.
7890         (struct saved_reg): Add constructor.
7891         <value>: Now a gdbpy_ref<>.
7892
7893 2018-06-27  Tom Tromey  <tom@tromey.com>
7894
7895         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
7896
7897 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7898
7899         * gdb-gdb.py.in: Format using autopep8.
7900
7901 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7902
7903         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
7904         (type_lookup_function): Recognize CORE_ADDR values.
7905
7906 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7907
7908         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
7909         print tag_name.
7910
7911 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7912
7913         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
7914         <__lt__>: Add.
7915
7916 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7917
7918         * gdb-gdb.py: Move to...
7919         * gdb-gdb.py.in: ... here.
7920         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
7921         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
7922         dependencies.
7923         (distclean): Remove gdb-gdb.py when cleaning.
7924         (gdb-gdb.py, gdb-gdb.gdb): New rules.
7925         * configure: Re-generate.
7926
7927 2018-06-27  Pedro Alves  <palves@redhat.com>
7928
7929         * proc-service.c (get_ps_regcache): New.
7930         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7931         (ps_lsetfpregs): Use it.
7932
7933 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
7934
7935         PR gdb/21695
7936         * dwarf2read.c (lnp_state_machine::check_line_address): Update
7937         declaration.
7938         (dwarf_decode_lines_1): Adjust.
7939
7940 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7941
7942         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
7943         override.
7944         <info_proc>: Likewise.
7945
7946 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
7947
7948         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
7949         to windows_fetch_one_register, and only handle the case of
7950         fetching one register.  Move the code that reloads the context
7951         and iterates over all registers if R is negative to...
7952         (windows_nat_target::fetch_registers): ... here.
7953         (do_windows_store_inferior_registers): Rename to
7954         windows_store_one_register, and only handle the case of storing
7955         one register.  Move the code that handles the case where r is
7956         negative to...
7957         (windows_nat_target::store_registers) ... here.
7958
7959 2018-06-26  Tom Tromey  <tom@tromey.com>
7960
7961         PR rust/22574:
7962         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
7963         * rust-lang.c (rust_print_struct_def): Add podata parameter.
7964         Update.
7965         (rust_internal_print_type): Add podata parameter.
7966         (rust_print_type): Update.
7967
7968 2018-06-26  Tom Tromey  <tom@tromey.com>
7969
7970         * typeprint.h (struct print_offset_data) <update, finish,
7971         maybe_print_hole>: New methods.
7972         <indentation>: New constant.
7973         * typeprint.c (print_offset_data::indentation): Define.
7974         (print_offset_data::maybe_print_hole, print_offset_data::update)
7975         (print_offset_data::finish): Move from c-typeprint.c and rename.
7976         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
7977         (print_spaces_filtered_with_print_options): Update.
7978         (c_print_type_union_field_offset, maybe_print_hole)
7979         (c_print_type_struct_field_offset): Move to typeprint.c and
7980         rename.
7981         (c_type_print_base_struct_union): Update.
7982
7983 2018-06-25  Pedro Alves  <palves@redhat.com>
7984
7985         * gdbthread.h (thread_info_ref, delete_thread)
7986         (delete_thread_silent, first_thread_of_inferior)
7987         (any_thread_of_inferior, switch_to_thread)
7988         (enable_thread_stack_temporaries)
7989         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
7990         (get_last_thread_stack_temporary)
7991         (value_in_thread_stack_temporaries, can_access_registers_thread):
7992         Spell out "struct thread_info" instead of just "thread_info".
7993         * inferior.h (notice_new_inferior): Likewise.
7994
7995 2018-06-25  Pedro Alves  <palves@redhat.com>
7996
7997         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
7998         pass thread_info pointer to delete_thread.
7999         (windows_nat_target::detach): Pass inferior pointer to
8000         detach_inferior.
8001         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
8002         delete_thread.
8003         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
8004         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
8005         and pass a thread_info pointer to delete_thread.
8006         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
8007         pass thread_info pointer to delete_thread.
8008         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
8009         delete_thread_silent call.
8010         * procfs.c (procfs_target::detach): Pass inferior pointer to
8011         detach_inferior.
8012         (procfs_target::wait): Pass thread_info pointer to delete_thread.
8013         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
8014         delete_thread_silent call.
8015         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
8016         pass thread_info pointer to delete_thread.
8017         (windows_nat_target::detach): Pass inferior pointer to
8018         delete_inferior.
8019
8020 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
8021
8022         * regcache.c (readable_regcache::read_part): Fix asserts.
8023         (reg_buffer::raw_collect_part): New function.
8024         (regcache::write_part): Fix asserts.
8025         (reg_buffer::raw_supply_part): New function.
8026         (regcache::transfer_regset_register): New helper function.
8027         (regcache::transfer_regset): Call new functions.
8028         (regcache_supply_regset): Use gdb_byte*.
8029         (regcache::supply_regset): Likewise.
8030         (regcache_collect_regset): Likewise.
8031         (regcache::collect_regset): Likewise.
8032         * regcache.h (reg_buffer::raw_collect_part): New declaration.
8033         (reg_buffer::raw_supply_part): Likewise.
8034         (regcache::transfer_regset_register): Likewise.
8035         (regcache::transfer_regset): Use gdb_byte*.
8036
8037 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
8038
8039         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
8040
8041 2018-06-21  Pedro Alves  <palves@redhat.com>
8042
8043         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
8044         instead of a ptid_t.  All callers adjusted.
8045         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
8046         adjusted.
8047         (print_ada_task_info, display_current_task_id, task_command_1):
8048         Adjust.
8049         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
8050         inferior_thread.
8051         (breakpoint_kind): Adjust.
8052         (remove_breakpoints_pid): Rename to ...
8053         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
8054         pointer.  All callers adjusted.
8055         (bpstat_clear_actions): Use inferior_thread.
8056         (get_bpstat_thread): New.
8057         (bpstat_do_actions): Use it.
8058         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
8059         to take a thread_info pointer.  All callers adjusted.
8060         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
8061         (breakpoint_re_set_thread): Use inferior_thread.
8062         * breakpoint.h (struct inferior): Forward declare.
8063         (bpstat_stop_status): Update.
8064         (remove_breakpoints_pid): Delete.
8065         (remove_breakpoints_inf): New.
8066         * bsd-uthread.c (bsd_uthread_target::wait)
8067         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
8068         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
8069         (maint_btrace_packet_history_cmd)
8070         (maint_btrace_clear_packet_history_cmd): Adjust.
8071         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
8072         inferior_thread.
8073         * cli/cli-interp.c: Include "inferior.h".
8074         * common/refcounted-object.h (struct
8075         refcounted_object_ref_policy): New.
8076         * compile/compile-object-load.c: Include gdbthread.h.
8077         (store_regs): Use inferior_thread.
8078         * corelow.c (core_target::close): Use current_inferior.
8079         (core_target_open): Adjust to use first_thread_of_inferior and use
8080         the current inferior.
8081         * ctf.c (ctf_target::close): Adjust to use current_inferior.
8082         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
8083         <thread>: ... this new field.  All references adjusted.
8084         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
8085         Take a thread_info pointer instead of a ptid_t.
8086         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
8087         (dummy_frame_discard, register_dummy_frame_dtor): Take a
8088         thread_info pointer instead of a ptid_t.
8089         * elfread.c: Include "inferior.h".
8090         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
8091         Use inferior_thread.
8092         * eval.c (evaluate_subexp): Likewise.
8093         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
8094         inferior_thread.
8095         * gdb_proc_service.h (struct thread_info): Forward declare.
8096         (struct ps_prochandle) <ptid>: Delete, replaced by ...
8097         <thread>: ... this new field.  All references adjusted.
8098         * gdbarch.h, gdbarch.c: Regenerate.
8099         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
8100         'thread' parameter.  All implementations and callers adjusted.
8101         * gdbthread.h (thread_info) <set_running>: New method.
8102         (delete_thread, delete_thread_silent): Take a thread_info pointer
8103         instead of a ptid.
8104         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
8105         (first_thread_of_process): Delete, replaced by ...
8106         (first_thread_of_inferior): ... this new function.  All callers
8107         adjusted.
8108         (any_live_thread_of_process): Delete, replaced by ...
8109         (any_live_thread_of_inferior): ... this new function.  All callers
8110         adjusted.
8111         (switch_to_thread, switch_to_no_thread): Declare.
8112         (is_executing): Delete.
8113         (enable_thread_stack_temporaries): Update comment.
8114         <enable_thread_stack_temporaries>: Take a thread_info pointer
8115         instead of a ptid_t.  Incref the thread.
8116         <~enable_thread_stack_temporaries>: Decref the thread.
8117         <m_ptid>: Delete
8118         <m_thr>: New.
8119         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8120         (get_last_thread_stack_temporary)
8121         (value_in_thread_stack_temporaries, can_access_registers_thread):
8122         Take a thread_info pointer instead of a ptid_t.  All callers
8123         adjusted.
8124         * infcall.c (get_call_return_value): Use inferior_thread.
8125         (run_inferior_call): Work with thread pointers instead of ptid_t.
8126         (call_function_by_hand_dummy): Work with thread pointers instead
8127         of ptid_t.  Use thread_info_ref.
8128         * infcmd.c (proceed_thread_callback): Access thread's state
8129         directly.
8130         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
8131         access thread's state directly.
8132         (continue_command): Use inferior_thread.
8133         (info_program_command): Use find_thread_ptid and access thread
8134         state directly.
8135         (proceed_after_attach_callback): Use thread state directly.
8136         (notice_new_inferior): Take a thread_info pointer instead of a
8137         ptid_t.  All callers adjusted.
8138         (exit_inferior): Take an inferior pointer instead of a pid.  All
8139         callers adjusted.
8140         (exit_inferior_silent): New.
8141         (detach_inferior): Delete.
8142         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
8143         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
8144         (detach_inferior_command, kill_inferior_command): Use
8145         find_inferior_id instead of valid_gdb_inferior_id and
8146         gdb_inferior_id_to_pid.
8147         (inferior_command): Use inferior and thread pointers.
8148         * inferior.h (struct thread_info): Forward declare.
8149         (notice_new_inferior): Take a thread_info pointer instead of a
8150         ptid_t.  All callers adjusted.
8151         (detach_inferior): Delete declaration.
8152         (exit_inferior, exit_inferior_silent): Take an inferior pointer
8153         instead of a pid.  All callers adjusted.
8154         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
8155         (valid_gdb_inferior_id): Delete.
8156         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
8157         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
8158         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
8159         ...
8160         <inf>: ... this new field.
8161         <step_ptid>: Delete, replaced by ...
8162         <step_thread>: ... this new field.
8163         (get_displaced_stepping_state): Take an inferior pointer instead
8164         of a pid.  All callers adjusted.
8165         (displaced_step_in_progress_any_inferior): Adjust.
8166         (displaced_step_in_progress_thread): Take a thread pointer instead
8167         of a ptid_t.  All callers adjusted.
8168         (displaced_step_in_progress, add_displaced_stepping_state): Take
8169         an inferior pointer instead of a pid.  All callers adjusted.
8170         (get_displaced_step_closure_by_addr): Adjust.
8171         (remove_displaced_stepping_state): Take an inferior pointer
8172         instead of a pid.  All callers adjusted.
8173         (displaced_step_prepare_throw, displaced_step_prepare)
8174         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
8175         All callers adjusted.
8176         (start_step_over): Adjust.
8177         (infrun_thread_ptid_changed): Remove bit updating ptids in the
8178         displaced step queue.
8179         (do_target_resume): Adjust.
8180         (fetch_inferior_event): Use inferior_thread.
8181         (context_switch, get_inferior_stop_soon): Take an
8182         execution_control_state pointer instead of a ptid_t.  All callers
8183         adjusted.
8184         (switch_to_thread_cleanup): Delete.
8185         (stop_all_threads): Use scoped_restore_current_thread.
8186         * inline-frame.c: Include "gdbthread.h".
8187         (inline_state) <inline_state>: Take a thread pointer instead of a
8188         ptid_t.  All callers adjusted.
8189         <ptid>: Delete, replaced by ...
8190         <thread>: ... this new field.
8191         (find_inline_frame_state): Take a thread pointer instead of a
8192         ptid_t.  All callers adjusted.
8193         (skip_inline_frames, step_into_inline_frame)
8194         (inline_skipped_frames, inline_skipped_symbol): Take a thread
8195         pointer instead of a ptid_t.  All callers adjusted.
8196         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
8197         (inline_skipped_frames, inline_skipped_symbol): Likewise.
8198         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
8199         pointers directly.
8200         * linux-nat.c (get_detach_signal): Likewise.
8201         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
8202         (thread_db_notice_clone): Adjust.
8203         (thread_db_find_new_threads_silently)
8204         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
8205         a thread pointer instead of a ptid_t.  All callers adjusted.
8206         * mi/mi-cmd-var.c: Include "inferior.h".
8207         (mi_cmd_var_update_iter): Update to use thread pointers.
8208         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
8209         inferior directly.
8210         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
8211         out to ...
8212         (mi_output_running): ... this new function.
8213         (mi_on_resume_1): Adjust to use it.
8214         (mi_user_selected_context_changed): Adjust to use inferior_thread.
8215         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
8216         directly.
8217         (interrupt_thread_callback): : Adjust to use thread and inferior
8218         pointers.
8219         * proc-service.c: Include "gdbthread.h".
8220         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
8221         * progspace-and-thread.c: Include "inferior.h".
8222         * progspace.c: Include "inferior.h".
8223         * python/py-exitedevent.c (create_exited_event_object): Adjust to
8224         hold a reference to an inferior_object.
8225         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
8226         inferior_thread.
8227         * python/py-inferior.c (struct inferior_object): Give the type a
8228         tag name instead of a typedef.
8229         (python_on_normal_stop): No need to check if the current thread is
8230         listed.
8231         (inferior_to_inferior_object): Change return type to
8232         inferior_object.  All callers adjusted.
8233         (find_thread_object): Delete, bits factored out to ...
8234         (thread_to_thread_object): ... this new function.
8235         * python/py-infthread.c (create_thread_object): Use
8236         inferior_to_inferior_object.
8237         (thpy_is_stopped): Use thread pointer directly.
8238         (gdbpy_selected_thread): Use inferior_thread.
8239         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
8240         field, replaced with ...
8241         <thread>: ... this new field.  All users adjusted.
8242         (btpy_insn_or_gap_new): Drop const.
8243         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
8244         callers adjusted.
8245         * python/py-record.c: Include "gdbthread.h".
8246         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8247         a ptid_t.  All callers adjusted.
8248         (gdbpy_current_recording): Use inferior_thread.
8249         * python/py-record.h (recpy_record_object) <ptid>: Delete
8250         field, replaced with ...
8251         <thread>: ... this new field.  All users adjusted.
8252         (recpy_element_object) <ptid>: Delete
8253         field, replaced with ...
8254         <thread>: ... this new field.  All users adjusted.
8255         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
8256         a ptid_t.  All callers adjusted.
8257         * python/py-threadevent.c: Include "gdbthread.h".
8258         (get_event_thread): Use thread_to_thread_object.
8259         * python/python-internal.h (struct inferior_object): Forward
8260         declare.
8261         (find_thread_object, find_inferior_object): Delete declarations.
8262         (thread_to_thread_object, inferior_to_inferior_object): New
8263         declarations.
8264         * record-btrace.c: Include "inferior.h".
8265         (require_btrace_thread): Use inferior_thread.
8266         (record_btrace_frame_sniffer)
8267         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
8268         (get_thread_current_frame): Use scoped_restore_current_thread and
8269         switch_to_thread.
8270         (get_thread_current_frame): Use thread pointer directly.
8271         (record_btrace_replay_at_breakpoint): Use thread's inferior
8272         pointer directly.
8273         * record-full.c: Include "inferior.h".
8274         * regcache.c: Include "gdbthread.h".
8275         (get_thread_arch_regcache): Use the inferior's address space
8276         directly.
8277         (get_thread_regcache, registers_changed_thread): New.
8278         * regcache.h (get_thread_regcache(thread_info *thread)): New
8279         overload.
8280         (registers_changed_thread): New.
8281         (remote_target) <remote_detach_1>: Swap order of parameters.
8282         (remote_add_thread): <remote_add_thread>: Return the new thread.
8283         (get_remote_thread_info(ptid_t)): New overload.
8284         (remote_target::remote_notice_new_inferior): Use thread pointers
8285         directly.
8286         (remote_target::process_initial_stop_replies): Use
8287         thread_info::set_running.
8288         (remote_target::remote_detach_1, remote_target::detach)
8289         (extended_remote_target::detach): Adjust.
8290         * stack.c (frame_show_address): Use inferior_thread.
8291         * target-debug.h (target_debug_print_thread_info_pp): New.
8292         * target-delegates.c: Regenerate.
8293         * target.c (default_thread_address_space): Delete.
8294         (memory_xfer_partial_1): Use current_inferior.
8295         (target_detach): Use current_inferior.
8296         (target_thread_address_space): Delete.
8297         (generic_mourn_inferior): Use current_inferior.
8298         * target.h (struct target_ops) <thread_address_space>: Delete.
8299         (target_thread_address_space): Delete.
8300         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
8301         pointers directly.
8302         (delete_thread_1, delete_thread, delete_thread_silent): Take a
8303         thread pointer instead of a ptid_t.  Adjust all callers.
8304         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
8305         (first_thread_of_process): Delete, replaced by ...
8306         (first_thread_of_inferior): ... this new function.  All callers
8307         adjusted.
8308         (any_thread_of_process): Rename to ...
8309         (any_thread_of_inferior): ... this, and take an inferior pointer.
8310         (any_live_thread_of_process): Rename to ...
8311         (any_live_thread_of_inferior): ... this, and take an inferior
8312         pointer.
8313         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
8314         (value_in_thread_stack_temporaries)
8315         (get_last_thread_stack_temporary): Take a thread pointer instead
8316         of a ptid_t.  Adjust all callers.
8317         (thread_info::set_running): New.
8318         (validate_registers_access): Use inferior_thread.
8319         (can_access_registers_ptid): Rename to ...
8320         (can_access_registers_thread): ... this, and take a thread
8321         pointer.
8322         (print_thread_info_1): Adjust to compare thread pointers instead
8323         of ptids.
8324         (switch_to_no_thread, switch_to_thread): Make extern.
8325         (scoped_restore_current_thread::~scoped_restore_current_thread):
8326         Use m_thread pointer directly.
8327         (scoped_restore_current_thread::scoped_restore_current_thread):
8328         Use inferior_thread.
8329         (thread_command): Use thread pointer directly.
8330         (thread_num_make_value_helper): Use inferior_thread.
8331         * top.c (execute_command): Use inferior_thread.
8332         * tui/tui-interp.c: Include "inferior.h".
8333         * varobj.c (varobj_create): Use inferior_thread.
8334         (value_of_root_1): Use find_thread_global_id instead of
8335         global_thread_id_to_ptid.
8336
8337 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
8338
8339         * regcache.c (readable_regcache::read_part): Avoid memcpy when
8340         possible.
8341         (regcache::write_part): Likewise.
8342         (readable_regcache::cooked_read_part): Update comment.
8343         (readable_regcache::cooked_write_part): Likewise.
8344         * regcache.h: (readable_regcache::read_part): Likewise.
8345         (regcache::write_part): Likewise.
8346
8347 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
8348             Dirk Schubert  <dirk.schubert@arm.com>
8349
8350         * aarch64-linux-nat.c (post_attach): New.
8351         (aarch64_linux_nat_target::post_attach): Override post_attach to
8352         record the number of hardware debug registers.
8353
8354 2018-06-20  Tom Tromey  <tom@tromey.com>
8355
8356         * python/py-param.c (add_setshow_generic): Make parameters const.
8357         (parmpy_init): Update.
8358
8359 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8360
8361         * regcache.h (regcache_cooked_read_ftype): Rename to...
8362         (register_read_ftype): ...this, change type to function_view.
8363         (class reg_buffer) <save>: Remove src parameter.
8364         (readonly_detached_regcache) <readonly_detached_regcache>: Make
8365         parameter non-const in first overload.  Remove src parameter in
8366         second overload.
8367         * regcache.c (do_cooked_read): Remove.
8368         (readonly_detached_regcache::readonly_detached_regcache): Make
8369         parameter non-const, adjust call to other constructor.
8370         (reg_buffer::save): Remove src parameter.
8371         * frame.c (do_frame_register_read): Remove.
8372         (frame_save_as_regcache): Use lambda function.
8373         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
8374         parameter to ppu2spu_data *.
8375         (ppu2spu_sniffer): Use lambda function.
8376
8377 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
8378
8379         * record-full.c (record_full_target::insert_breakpoint): Remove
8380         "struct" keyword, add const.
8381
8382 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
8383
8384         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
8385         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
8386         * configure.ac: Remove AC_PREREQ, add missing quoting.
8387         * gnulib/configure.ac: Modernize usage of
8388         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
8389         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
8390         (AUTOMAKE_VERSION): Bump to 1.15.1.
8391         * configure: Re-generate.
8392         * config.in: Re-generate.
8393         * aclocal.m4: Re-generate.
8394         * gnulib/aclocal.m4: Re-generate.
8395         * gnulib/config.in: Re-generate.
8396         * gnulib/configure: Re-generate.
8397         * gnulib/import/Makefile.in: Re-generate.
8398
8399 2018-06-19  Pedro Alves  <palves@redhat.com>
8400
8401         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
8402         (lookup_minimal_symbol_by_pc_section): ... here with
8403         gdb_assert_not_reached added.
8404
8405 2018-06-19  Pedro Alves  <palves@redhat.com>
8406
8407         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
8408         parameter with a block parameter.  Compare location's block symbol
8409         with the frame's block instead of addresses.
8410         (skip_inline_frames): Pass the current block instead of the
8411         frame's address.  Break out as soon as we determine the frame
8412         should not be skipped.
8413
8414 2018-06-18  Tom Tromey  <tom@tromey.com>
8415
8416         * solib-aix.c (solib_aix_get_section_offsets): Return
8417         unique_xmalloc_ptr.
8418         (solib_aix_solib_create_inferior_hook): Update.
8419
8420 2018-06-18  Tom Tromey  <tom@tromey.com>
8421
8422         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
8423
8424 2018-06-18  Tom Tromey  <tom@tromey.com>
8425
8426         * solib-frv.c (frv_relocate_main_executable): Use
8427         unique_xmalloc_ptr.
8428         * solib-dsbt.c (dsbt_relocate_main_executable): Use
8429         unique_xmalloc_ptr.
8430
8431 2018-06-18  Tom Tromey  <tom@tromey.com>
8432
8433         * objfiles.h (inhibit_section_map_updates): Update.
8434         (resume_section_map_updates, resume_section_map_updates_cleanup):
8435         Remove.
8436         * solib-svr4.c (svr4_handle_solib_event): Update.
8437         * objfiles.c (inhibit_section_map_updates): Return
8438         scoped_restore_tmpl<int>.
8439         (resume_section_map_updates, resume_section_map_updates_cleanup):
8440         Remove.
8441
8442 2018-06-18  Tom Tromey  <tom@tromey.com>
8443
8444         * valprint.h (read_string): Update.
8445         * valprint.c (read_string): Change type of "buffer".
8446         (val_print_string): Update.
8447         * python/py-value.c (valpy_string): Update.
8448         * language.h (struct language_defn) <la_get_string>: Change
8449         type of "buffer".
8450         (default_get_string, c_get_string): Update.
8451         * language.c (default_get_string): Change type of "buffer".
8452         * guile/scm-value.c (gdbscm_value_to_string): Update.
8453         * c-lang.c (c_get_string): Change type of "buffer".
8454
8455 2018-06-18  Tom Tromey  <tom@tromey.com>
8456
8457         * ser-mingw.c (struct pipe_state_destroyer): New.
8458         (pipe_state_up): New typedef.
8459         (cleanup_pipe_state): Remove.
8460         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
8461
8462 2018-06-18  Tom Tromey  <tom@tromey.com>
8463
8464         * rust-lang.h (rust_yyerror): Don't declare.
8465         * rust-lang.c (rust_language_defn): Update.
8466         * rust-exp.y (yyerror): Now static.
8467         * parse.c (parse_exp_in_context_1): Update.
8468         * p-lang.h (p_yyerror): Don't declare.
8469         * p-lang.c (p_language_defn): Update.
8470         * p-exp.y (yyerror): Now static.
8471         * opencl-lang.c (opencl_language_defn): Update.
8472         * objc-lang.c (objc_language_defn): Update.
8473         * m2-lang.h (m2_yyerror): Don't declare.
8474         * m2-lang.c (m2_language_defn): Update.
8475         * m2-exp.y (yyerror): Now static.
8476         * language.h (struct language_defn) <la_error>: Remove.
8477         * language.c (unk_lang_error): Remove.
8478         (unknown_language_defn, auto_language_defn): Remove.
8479         * go-lang.h (go_yyerror): Don't declare.
8480         * go-lang.c (go_language_defn): Update.
8481         * go-exp.y (yyerror): Now static.
8482         * f-lang.h (f_yyerror): Don't declare.
8483         * f-lang.c (f_language_defn): Update.
8484         * f-exp.y (yyerror): Now static.
8485         * d-lang.h (d_yyerror): Don't declare.
8486         * d-lang.c (d_language_defn): Update.
8487         * d-exp.y (yyerror): Now static.
8488         * c-lang.h (c_yyerror): Don't declare.
8489         * c-lang.c (c_language_defn, cplus_language_defn)
8490         (asm_language_defn, minimal_language_defn): Update.
8491         * c-exp.y (yyerror): Now static.
8492         * ada-lang.h (ada_yyerror): Don't declare.
8493         * ada-lang.c (ada_language_defn): Update.
8494         * ada-exp.y (yyerror): Now static.
8495
8496 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8497
8498         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
8499         (store_sveregs_to_thread): Likewise.
8500         (aarch64_linux_fetch_inferior_registers): Check for SVE.
8501         (aarch64_linux_store_inferior_registers): Likewise.
8502         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
8503         function.
8504         (aarch64_sve_regs_copy_to_regcache): Likewise.
8505         (aarch64_sve_regs_copy_from_regcache): Likewise.
8506         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
8507         declaration.
8508         (aarch64_sve_regs_copy_to_regcache): Likewise.
8509         (aarch64_sve_regs_copy_from_regcache): Likewise.
8510         (sve_context): Structure from Linux headers.
8511         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
8512         (SVE_SIG_ZREG_SIZE): Likewise.
8513         (SVE_SIG_PREG_SIZE): Likewise.
8514         (SVE_SIG_FFR_SIZE): Likewise.
8515         (SVE_SIG_REGS_OFFSET): Likewise.
8516         (SVE_SIG_ZREGS_OFFSET): Likewise.
8517         (SVE_SIG_ZREG_OFFSET): Likewise.
8518         (SVE_SIG_ZREGS_SIZE): Likewise.
8519         (SVE_SIG_PREGS_OFFSET): Likewise.
8520         (SVE_SIG_PREG_OFFSET): Likewise.
8521         (SVE_SIG_PREGS_SIZE): Likewise.
8522         (SVE_SIG_FFR_OFFSET): Likewise.
8523         (SVE_SIG_REGS_SIZE): Likewise.
8524         (SVE_SIG_CONTEXT_SIZE): Likewise.
8525         (SVE_PT_REGS_MASK): Likewise.
8526         (SVE_PT_REGS_FPSIMD): Likewise.
8527         (SVE_PT_REGS_SVE): Likewise.
8528         (SVE_PT_VL_INHERIT): Likewise.
8529         (SVE_PT_VL_ONEXEC): Likewise.
8530         (SVE_PT_REGS_OFFSET): Likewise.
8531         (SVE_PT_FPSIMD_OFFSET): Likewise.
8532         (SVE_PT_FPSIMD_SIZE): Likewise.
8533         (SVE_PT_SVE_ZREG_SIZE): Likewise.
8534         (SVE_PT_SVE_PREG_SIZE): Likewise.
8535         (SVE_PT_SVE_FFR_SIZE): Likewise.
8536         (SVE_PT_SVE_FPSR_SIZE): Likewise.
8537         (SVE_PT_SVE_FPCR_SIZE): Likewise.
8538         (__SVE_SIG_TO_PT): Likewise.
8539         (SVE_PT_SVE_OFFSET): Likewise.
8540         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
8541         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
8542         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
8543         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
8544         (SVE_PT_SVE_PREG_OFFSET): Likewise.
8545         (SVE_PT_SVE_PREGS_SIZE): Likewise.
8546         (SVE_PT_SVE_FFR_OFFSET): Likewise.
8547         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
8548         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
8549         (SVE_PT_SVE_SIZE): Likewise.
8550         (SVE_PT_SIZE): Likewise.
8551         (HAS_SVE_STATE): New define.
8552
8553 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
8554
8555         * nat/aarch64-sve-linux-sigcontext.h: New file.
8556         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
8557         new files.
8558         (SVE_VQ_MIN): Likewise.
8559         (SVE_VQ_MAX): Likewise.
8560         (SVE_VL_MIN): Likewise.
8561         (SVE_VL_MAX): Likewise.
8562         (SVE_NUM_ZREGS): Likewise.
8563         (SVE_NUM_PREGS): Likewise.
8564         (sve_vl_valid): Likewise.
8565         (struct user_sve_header): Likewise.
8566
8567 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
8568             Richard Bunt <Richard.Bunt@arm.com>
8569
8570         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
8571         was requested by GDB.
8572
8573 2018-06-15  Tom de Vries  <tdevries@suse.de>
8574
8575         * MAINTAINERS (Write After Approval): Add Tom de Vries.
8576
8577 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
8578
8579         * gnulib/update-gnulib.sh: Print expected versions of
8580         autoconf/aclocal.
8581
8582 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
8583
8584         * arch-utils.c (default_type_align): Use type_length_units.
8585         * gdbtypes.c (type_align): Use type_length_units.
8586
8587 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8588
8589         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
8590         of 'define' command.
8591
8592 2018-06-14  Tom de Vries  <tdevries@suse.de>
8593
8594         PR cli/22573
8595         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
8596         get_no_prettyformat_print_options.
8597
8598 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8599
8600         * sparc-nat.h: Include target.h.
8601         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
8602         <fetch_registers>: Remove this argument in function call.
8603         <store_registers>: Remove this argument in function call, remove
8604         extra semicolon.
8605         <low_forget_process>: Call sparc64_forget_process instead of
8606         sparc_forget_process.
8607
8608 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8609
8610         * procfs.c (_initialize_procfs): Use add_inf_child_target.
8611         (procfs_target::make_corefile_notes): Adjust to new
8612         target_read_alloc return type.
8613
8614 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8615             Stephen Roberts  <stephen.roberts@arm.com>
8616
8617         PR gdb/22882
8618         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
8619         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
8620         Move should_notify_stop local into more inner scope.
8621
8622 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8623             Stephen Roberts  <stephen.roberts@arm.com>
8624
8625         PR gdb/22882
8626         * infrun.c (resume_1): Add call to mark_async_event_handler.
8627
8628 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
8629
8630         * infrun.c (do_target_wait): Change old version of $pc printed.
8631
8632 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8633
8634         * dwarf2read.c (read_index_from_section): Rename to...
8635         (read_gdb_index_from_section): ... this, update all callers.
8636         (dwarf2_read_index): Rename to...
8637         (dwarf2_read_gdb_index): ... this, update all callers.
8638
8639 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
8640
8641         * hppa-linux-nat.c
8642         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
8643         hppa_linux_nat_target::fetch_registers.
8644
8645 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8646
8647         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
8648         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
8649         (AARCH64_DWARF_SVE_FFR): Likewise.
8650         (AARCH64_DWARF_SVE_P0): Likewise.
8651         (AARCH64_DWARF_SVE_Z0): Likewise.
8652
8653 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8654
8655         * common/common-regcache.h (raw_compare): New function.
8656         * regcache.c (regcache::raw_compare): Likewise.
8657         * regcache.h (regcache::raw_compare): New declaration.
8658
8659 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
8660
8661         * common/common-regcache.h (reg_buffer_common): New structure.
8662         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
8663         (reg_buffer::raw_supply): Likewise.
8664         (reg_buffer::raw_supply_integer): Likewise.
8665         (reg_buffer::raw_supply_zeroed): Likewise.
8666         (reg_buffer::raw_collect): Likewise.
8667         (reg_buffer::raw_collect_integer): Likewise.
8668         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
8669         (reg_buffer::raw_supply): Likewise.
8670         (reg_buffer::raw_supply_integer): Likewise.
8671         (reg_buffer::raw_supply_zeroed): Likewise.
8672         (reg_buffer::raw_collect): Likewise.
8673         (reg_buffer::raw_collect_integer): Likewise.
8674
8675 2018-06-10  Tom Tromey  <tom@tromey.com>
8676
8677         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
8678         (class remote_state) <stop_reply_queue>: Now std::vector.
8679         (remote_state::~remote_state)
8680         (remote_target::stop_reply_queue_length): Update.
8681         (struct queue_iter_param, remove_child_of_pending_fork)
8682         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
8683         (check_pending_event_prevents_wildcard_vcont_callback)
8684         (remove_stop_reply_for_inferior)
8685         (remove_stop_reply_of_remote_state)
8686         (remote_notif_remove_once_on_match)
8687         (stop_reply_match_ptid_and_ws)
8688         (remote_kill_child_of_pending_fork): Remove.
8689         (remote_target::remove_new_fork_children)
8690         (remote_target::check_pending_events_prevent_wildcard_vcont)
8691         (remote_target::discard_pending_stop_replies)
8692         (remote_target::discard_pending_stop_replies_in_queue)
8693         (remote_target::remote_notif_remove_queued_reply)
8694         (remote_target::queued_stop_reply)
8695         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
8696         (remote_target::wait, remote_target::kill_new_fork_children)
8697         (remote_target::async): Update.
8698
8699 2018-06-10  Tom Tromey  <tom@tromey.com>
8700
8701         * record-full.c (record_full_arch_list_cleanups): Remove.
8702         (record_full_message): Use try/catch.
8703         (record_full_wait_cleanups): Remove.
8704         (record_full_wait_1): Use try/catch.
8705         (record_full_restore): Likewise.
8706
8707 2018-06-10  Tom Tromey  <tom@tromey.com>
8708
8709         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
8710         declare VEC.  Add constructor.
8711         <in_target_beneath>: Now bool.
8712         (record_full_breakpoints): Now a std::vector, static.
8713         (record_full_sync_record_breakpoints)
8714         (record_full_init_record_breakpoints)
8715         (record_full_target::insert_breakpoint)
8716         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
8717
8718 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8719
8720         * dwarf2read.c (process_cu_includes): Remove struct keyword.
8721         * serial.c (serial_interface_lookup): Remove struct keyword.
8722
8723 2018-06-10  Tom Tromey  <tom@tromey.com>
8724
8725         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
8726         method.
8727         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
8728         a method.
8729         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
8730         method.
8731         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
8732         "beneath" as a method.
8733         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
8734         Use "beneath" as a method.
8735
8736 2018-06-10  Tom Tromey  <tom@tromey.com>
8737
8738         * tracefile.c (struct trace_file_writer_deleter): New.
8739         <operator()>: Rename from trace_file_writer_xfree.
8740         (trace_file_writer_up): New typedef.
8741         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
8742
8743 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8744
8745         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
8746         <m_registers, m_register_status>: Change type to
8747         std::unique_ptr.
8748         * regcache.c (reg_buffer::reg_buffer): Use new instead of
8749         XCNEWVEC.
8750
8751 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
8752
8753         * common/common-regcache.h (enum register_status): Add
8754         underlying type "signed char".
8755         * regcache.h (reg_buffer) <m_register_status>: Change type to
8756         register_status *.
8757         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
8758         register_status instead of signed char.
8759         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
8760         (reg_buffer::get_register_status): Remove cast.
8761         (readable_regcache::raw_read): Remove cast.
8762         (readable_regcache::cooked_read): Remove cast.
8763
8764 2018-06-09  Tom Tromey  <tom@tromey.com>
8765
8766         * source.c (reverse_search_command, forward_search_command): Use
8767         scoped_fd.
8768
8769 2018-06-09  Tom Tromey  <tom@tromey.com>
8770
8771         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
8772         (serial_ops_list): Now static, std::vector.
8773         (serial_interface_lookup, serial_add_interface): Update.
8774
8775 2018-06-09  Tom Tromey  <tom@tromey.com>
8776
8777         * dwarf2read.c (process_cu_includes): Update.
8778         (process_full_comp_unit): Update.
8779         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
8780         std::vector.
8781
8782 2018-06-08  Paul Koning  <paul_koning@dell.com>
8783
8784         PR gdb/23252
8785
8786         * python/python.c (do_start_initialization):
8787         Avoid call to internal Python API.
8788         (init__gdb_module): New function.
8789
8790 2018-06-08  Gary Benson <gbenson@redhat.com>
8791
8792         * linux-thread-db.c (valprint.h): New include.
8793         (struct check_thread_db_info): New structure.
8794         (check_thread_db_on_load, tdb_testinfo): New static globals.
8795         (check_thread_db, check_thread_db_callback): New functions.
8796         (try_thread_db_load_1): Run integrity checks if requested.
8797         (maintenance_check_libthread_db): New function.
8798         (_initialize_thread_db): Register "maint check libthread-db"
8799         and "maint set/show check-libthread-db".
8800         * NEWS: Mention the above new commands.
8801
8802 2018-06-08  Tom Tromey  <tom@tromey.com>
8803
8804         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
8805         now a method.
8806
8807 2018-06-08  Tom Tromey  <tom@tromey.com>
8808
8809         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
8810
8811 2018-06-08  Tom Tromey  <tom@tromey.com>
8812
8813         * common/btrace-common.h (struct btrace_data): Add constructor,
8814         destructor, move assignment operator.
8815         <empty, clear, fini>: New methods.
8816         <format>: Initialize.
8817         (btrace_data_init, btrace_data_fini, btrace_data_clear)
8818         (btrace_data_empty): Don't declare.
8819         * common/btrace-common.c (btrace_data_init): Remove.
8820         (btrace_data::fini): Rename from btrace_data_fini.
8821         (btrace_data::empty): Rename from btrace_data_empty.
8822         (btrace_data::clear): Rename from btrace_data_clear.  Return
8823         bool.
8824         * btrace.h (make_cleanup_btrace_data): Don't declare.
8825         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
8826         (parse_xml_btrace): Update.
8827         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
8828         (maint_btrace_clear_packet_history_cmd): Update.
8829
8830 2018-06-07  Pedro Alves  <palves@redhat.com>
8831
8832         * target.h (target_ops) <beneath>: Now a method.  All references
8833         updated.
8834         (class target_stack): New.
8835         * target.c (g_target_stack): New.
8836         (g_current_top_target): Delete.
8837         (current_top_target): Get the top target out of g_target_stack.
8838         (target_stack::push, target_stack::unpush): New.
8839         (push_target, unpush_target): Reimplement.
8840         (target_is_pushed): Reimplement in terms of g_target_stack.
8841         (target_ops::beneath, target_stack::find_beneath): New.
8842
8843 2018-06-07  Pedro Alves  <palves@redhat.com>
8844
8845         * target.h (find_target_beneath): Delete declaration.
8846         * target.c (find_target_beneath): Delete definition.
8847         * aix-thread.c: All callers of find_target_beneath adjusted to
8848         call target_ops::beneath instead.
8849         * bsd-uthread.c: Likewise.
8850         * linux-thread-db.c: Likewise.
8851         * ravenscar-thread.c: Likewise.
8852         * sol-thread.c: Likewise.
8853         * spu-multiarch.c: Likewise.
8854
8855 2018-06-07  Pedro Alves  <palves@redhat.com>
8856
8857         * target.h (target_ops) <beneath>: Now a method.  All references
8858         updated.
8859         (target_ops) <m_beneath>: New.
8860         * target.c (target_ops::beneath): New.
8861         * corelow.c: Adjust all references to target_ops::beneath.
8862         * linux-thread-db.c: Likewise.
8863         * make-target-delegates: Likewise.
8864         * record-btrace.c: Likewise.
8865         * record-full.c: Likewise.
8866         * remote.c: Likewise.
8867         * target.c: Likewise.
8868         * target-delegates.c: Regenerate.
8869
8870 2018-06-07  Pedro Alves  <palves@redhat.com>
8871
8872         * target.h (target_stack): Delete.
8873         (current_top_target): Declare function.
8874         * target.c (target_stack): Delete.
8875         (g_current_top_target): New.
8876         (current_top_target): New function.
8877         * auxv.c: Use current_top_target instead of target_stack
8878         throughout.
8879         * avr-tdep.c: Likewise.
8880         * breakpoint.c: Likewise.
8881         * corefile.c: Likewise.
8882         * elfread.c: Likewise.
8883         * eval.c: Likewise.
8884         * exceptions.c: Likewise.
8885         * frame.c: Likewise.
8886         * gdbarch-selftests.c: Likewise.
8887         * gnu-v3-abi.c: Likewise.
8888         * ia64-tdep.c: Likewise.
8889         * ia64-vms-tdep.c: Likewise.
8890         * infcall.c: Likewise.
8891         * infcmd.c: Likewise.
8892         * infrun.c: Likewise.
8893         * linespec.c: Likewise.
8894         * linux-tdep.c: Likewise.
8895         * minsyms.c: Likewise.
8896         * ppc-linux-nat.c: Likewise.
8897         * ppc-linux-tdep.c: Likewise.
8898         * procfs.c: Likewise.
8899         * regcache.c: Likewise.
8900         * remote.c: Likewise.
8901         * rs6000-tdep.c: Likewise.
8902         * s390-linux-nat.c: Likewise.
8903         * s390-tdep.c: Likewise.
8904         * solib-aix.c: Likewise.
8905         * solib-darwin.c: Likewise.
8906         * solib-dsbt.c: Likewise.
8907         * solib-spu.c: Likewise.
8908         * solib-svr4.c: Likewise.
8909         * solib-target.c: Likewise.
8910         * sparc-tdep.c: Likewise.
8911         * sparc64-tdep.c: Likewise.
8912         * spu-tdep.c: Likewise.
8913         * symfile.c: Likewise.
8914         * symtab.c: Likewise.
8915         * target-descriptions.c: Likewise.
8916         * target-memory.c: Likewise.
8917         * target.c: Likewise.
8918         * target.h: Likewise.
8919         * tracefile-tfile.c: Likewise.
8920         * tracepoint.c: Likewise.
8921         * valops.c: Likewise.
8922         * valprint.c: Likewise.
8923         * value.c: Likewise.
8924         * windows-tdep.c: Likewise.
8925         * mi/mi-main.c: Likewise.
8926
8927 2018-06-07  Tom Tromey  <tom@tromey.com>
8928
8929         * valprint.h (build_address_symbolic): Declare.
8930         * printcmd.c (print_address_symbolic): Update.
8931         (build_address_symbolic): Change "name" and "filename" to
8932         std::string.
8933         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
8934         Update.
8935         * defs.h (build_address_symbolic): Remove declaration.
8936
8937 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
8938
8939         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
8940         (aarch64_vnv_type): Add function.
8941         (aarch64_pseudo_register_name): Add V regs for SVE.
8942         (aarch64_pseudo_register_type): Likewise.
8943         (aarch64_pseudo_register_reggroup_p): Likewise.
8944         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
8945         (aarch64_pseudo_read_value): Add V regs for SVE.
8946         (aarch64_pseudo_write_2): Use V0 offset for SVE
8947         (aarch64_pseudo_write): Add V regs for SVE.
8948         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
8949
8950 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
8951
8952         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
8953         (sve_vl_from_vq): Likewise.
8954
8955 2018-06-05  Tom Tromey  <tom@tromey.com>
8956
8957         * cli/cli-cmds.c (show_version): Update.
8958         * top.c (print_gdb_version): Add "interactive" parameter.
8959         Update.
8960         * main.c (captured_main_1): Update.
8961         * top.h (print_gdb_version): Add "interactive" parameter and a
8962         comment.
8963
8964 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
8965
8966         * common/enum-flags.h: Add trailing semicolon to example in
8967         comment.
8968
8969 2018-06-05  Tom Tromey  <tom@tromey.com>
8970
8971         PR cli/12326:
8972         * NEWS: Add entry about pager.
8973         * utils.c (pagination_disabled_for_command): New global.
8974         (prompt_for_continue): Allow "c" response to prompt.
8975         (reinitialize_more_filter): Clear
8976         pagination_disabled_for_command.
8977         (fputs_maybe_filtered): Check pagination_disabled_for_command.
8978
8979 2018-06-04  Tom Tromey  <tom@tromey.com>
8980
8981         * ada-lang.h (ada_lookup_symbol_list): Update.
8982         * ada-lang.c (resolve_subexp): Update.
8983         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
8984         parameter.
8985         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
8986         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
8987         results parameter to std::vector.
8988         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
8989         Update.
8990         * ada-exp.y (block_lookup): Update.
8991         (select_possible_type_sym): Change type of syms.  Remove nsyms
8992         parameter.
8993         (write_var_or_type, write_name_assoc): Update.
8994
8995 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
8996
8997         * windows-nat.c (windows_nat_target::xfer_partial): Return
8998         TARGET_XFER_E_IO if we need to delegate to the target beneath
8999         but BENEATH is NULL.
9000
9001 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
9002
9003         * Makefile.in (config.status): Add configure.nat as a
9004         dependency.
9005
9006 2018-06-04  Tom Tromey  <tom@tromey.com>
9007
9008         * cp-name-parser.y (cpname_state): Add method declarations.
9009         (HANDLE_QUAL): Update.
9010         (cpname_state::d_grab, cpname_state::fill_comp)
9011         (cpname_state::make_operator, cpname_state::make_dtor)
9012         (cpname_state::make_builtin_type, cpname_state::make_name)
9013         (cpname_state::d_qualify, cpname_state::d_int_type)
9014         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
9015         (%union): Move earlier.
9016
9017 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9018
9019         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
9020
9021 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9022
9023         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
9024         (aarch64_pseudo_write_1): Likewise.
9025         (aarch64_pseudo_read_value): Use helper.
9026         (aarch64_pseudo_write): Likewise.
9027
9028 2018-06-04  Pedro Alves  <palves@redhat.com>
9029
9030         * darwin-nat.c (darwin_ops): Delete.
9031         (darwin_attach_pid): Use get_native_target.
9032
9033 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9034
9035         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
9036         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
9037
9038 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9039
9040         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
9041         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
9042         (aarch64_gdbarch_init): Check for SVE.
9043         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
9044
9045 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
9046
9047         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
9048         * aarch64-tdep.h (aarch64_read_description): Likewise.
9049         * arch/aarch64.c (aarch64_create_target_description): Likewise.
9050         * arch/aarch64.h (aarch64_create_target_description): Likewise.
9051         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
9052         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
9053         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
9054
9055 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9056
9057         * value.c (value_fetch_lazy_bitfield): New.
9058         (value_fetch_lazy_memory): New.
9059         (value_fetch_lazy_register): New.
9060         (value_fetch_lazy): Factor out to smaller functions.
9061
9062 2018-06-01  Tom Tromey  <tom@tromey.com>
9063
9064         * cp-name-parser.y (backslashable, represented): Now const.
9065
9066 2018-06-01  Tom Tromey  <tom@tromey.com>
9067
9068         * cp-name-parser.y: Include parser-defs.h.
9069         (parser_fprintf): Remove declaration.
9070
9071 2018-06-01  Tom Tromey  <tom@tromey.com>
9072
9073         * cp-name-parser.y: Use %pure-parser, %lex-param, and
9074         %parse-param.
9075         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
9076         (global_result): Remove globals.
9077         (struct cpname_state): New.
9078         (yyparse): Don't declare.
9079         (yylex, yyerror): Move declarations after %union.
9080         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
9081         (make_name): Add state parameter.
9082         Update all callers.
9083         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
9084         parameter.
9085         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
9086         Update.
9087         (yylex): Add lvalp, state parameters.
9088         (yyerror): Add state parameter.
9089         (cp_demangled_name_to_comp): Update.
9090
9091 2018-06-01  Tom Tromey  <tom@tromey.com>
9092
9093         * cp-name-parser.y (parser_fprintf): Declare.
9094         (GDB_YY_REMAP_PREFIX): Define.
9095         Include yy-remap.h.  Don't redefine yy* identifiers.
9096
9097 2018-06-01  Tom Tromey  <tom@tromey.com>
9098
9099         * python/py-type.c (typy_legacy_template_argument): Update.
9100         * cp-support.h (cp_demangled_name_to_comp): Update.
9101         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
9102         parameter to be a "std::string *".
9103         (main): Update.
9104
9105 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
9106
9107         * ada-lex.l: Include "diagnostics.h" instead of
9108         "common/diagnostics.h".
9109         * unittests/environ-selftests.c: Likewise.
9110         * common/diagnostics.h: Moved to ../include.
9111
9112 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
9113
9114         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
9115         to language_mode_manual while calling breakpoint_re_set_one.
9116
9117 2018-06-01  Tom Tromey  <tom@tromey.com>
9118
9119         * valops.c (value_cast_structs, destructor_name_p): Update.
9120         * symtab.c (gdb_mangle_name): Update.
9121         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
9122         Update.
9123         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
9124         (pascal_object_print_value_fields, pascal_object_print_value):
9125         Update.
9126         * p-typeprint.c (pascal_type_print_derivation_info): Update.
9127         * linespec.c (find_methods): Update.
9128         * gdbtypes.h (type_name_no_tag): Remove.
9129         (type_name_or_error): Rename from type_name_no_tag_or_error.
9130         * gdbtypes.c (type_name_no_tag): Remove.
9131         (type_name_or_error): Rename from type_name_no_tag_or_error.
9132         (lookup_struct_elt_type, check_typedef): Update.
9133         * expprint.c (print_subexp_standard): Update.
9134         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
9135         * d-namespace.c (d_lookup_nested_symbol): Update.
9136         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
9137         (cp_print_class_member): Update.
9138         * cp-namespace.c (cp_lookup_nested_symbol): Update.
9139         * completer.c (add_struct_fields): Update.
9140         * c-typeprint.c (cp_type_print_derivation_info)
9141         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
9142         Update.
9143         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
9144         (ada_prefer_type, ada_is_exception_sym): Update.
9145
9146 2018-06-01  Tom Tromey  <tom@tromey.com>
9147
9148         * valops.c (enum_constant_from_type, value_namespace_elt)
9149         (value_maybe_namespace_elt): Update.
9150         * valarith.c (find_size_for_pointer_math): Update.
9151         * target-descriptions.c (make_gdb_type): Update.
9152         * symmisc.c (print_symbol): Update.
9153         * stabsread.c (define_symbol, read_type)
9154         (complain_about_struct_wipeout, add_undefined_type)
9155         (cleanup_undefined_types_1): Update.
9156         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
9157         (rust_range_type_p, val_print_struct, rust_print_struct_def)
9158         (rust_internal_print_type, rust_composite_type)
9159         (rust_evaluate_funcall, rust_evaluate_subexp)
9160         (rust_inclusive_range_type_p): Update.
9161         * python/py-type.c (typy_get_tag): Update.
9162         * p-typeprint.c (pascal_type_print_base): Update.
9163         * mdebugread.c (parse_symbol, parse_type): Update.
9164         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
9165         Update.
9166         * guile/scm-type.c (gdbscm_type_tag): Update.
9167         * go-lang.c (sixg_string_p): Update.
9168         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
9169         Update.
9170         * gdbtypes.h (struct main_type) <tag_name>: Remove.
9171         (TYPE_TAG_NAME): Remove.
9172         * gdbtypes.c (type_name_no_tag): Simplify.
9173         (check_typedef, check_types_equal, recursive_dump_type)
9174         (copy_type_recursive, arch_composite_type): Update.
9175         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
9176         in summary mode when needed.
9177         * eval.c (evaluate_funcall): Update.
9178         * dwarf2read.c (fixup_go_packaging, read_structure_type)
9179         (process_structure_scope, read_enumeration_type)
9180         (read_namespace_type, read_module_type, determine_prefix): Update.
9181         * cp-support.c (inspect_type): Update.
9182         * coffread.c (process_coff_symbol, decode_base_type): Update.
9183         * c-varobj.c (c_is_path_expr_parent): Update.
9184         * c-typeprint.c (c_type_print_base_struct_union): Update.
9185         (c_type_print_base_1): Update.  Print struct/class/union/enum in
9186         summary when using C language.
9187         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
9188         (gen_maybe_namespace_elt): Update.
9189         * ada-lang.c (ada_type_name): Simplify.
9190         (empty_record, ada_template_to_fixed_record_type_1)
9191         (template_to_static_fixed_type)
9192         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
9193
9194 2018-06-01  Tom Tromey  <tom@tromey.com>
9195
9196         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
9197         c_print_type.
9198         * c-typeprint.c (c_print_type_1): Add "language" parameter.
9199         (c_print_type): Update.
9200         (c_print_type): New overload.
9201         (c_type_print_varspec_prefix, c_type_print_args)
9202         (c_type_print_varspec_suffix, c_print_type_no_offsets)
9203         (c_type_print_base_struct_union, c_type_print_base_1)
9204         (cp_type_print_method_args): Add "language" parameter.
9205         (c_type_print_base): Update.
9206         * c-lang.h (c_print_type): Add new overload.
9207
9208 2018-06-01  Tom Tromey  <tom@tromey.com>
9209
9210         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
9211         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
9212
9213 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
9214
9215         * aarch64-tdep.c (aarch64_sve_register_names): New const
9216         var.
9217         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
9218         (AARCH64_SVE_Z_REGS_NUM): New define.
9219         (AARCH64_SVE_P_REGS_NUM): Likewise.
9220         (AARCH64_SVE_NUM_REGS): Likewise.
9221
9222 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
9223
9224         * nat/linux-ptrace.h [__alpha__]
9225         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
9226         definitions.
9227
9228 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
9229
9230         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
9231         the endianness selected.
9232         * NEWS: Document `set endian auto' mode operation update.
9233
9234 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
9235
9236         * Makefile.in: Add new header.
9237         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
9238         (sve_vl_from_vg): Likewise.
9239         (sve_vq_from_vl): Likewise.
9240         (sve_vl_from_vq): Likewise.
9241         (sve_vq_from_vg): Likewise.
9242         (sve_vg_from_vq): Likewise.
9243         * configure.nat: Add new c file.
9244         * nat/aarch64-sve-linux-ptrace.c: New file.
9245         * nat/aarch64-sve-linux-ptrace.h: New file.
9246
9247 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
9248
9249         * aarch64-linux-nat.c (aarch64_linux_read_description):
9250         Add parmeter zero.
9251         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
9252         Likewise.
9253         * aarch64-tdep.c (tdesc_aarch64_list): Add.
9254         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
9255         (aarch64_gdbarch_init): Add parmeter zero.
9256         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
9257         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
9258         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
9259         parmeter.
9260         * doc/gdb.texinfo: Describe SVE feature
9261         * features/aarch64-sve.c: New file.
9262
9263 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
9264
9265         PR gdb/23210
9266         * gdbarch.sh (significant_addr_bit): Default to zero when
9267         not set by target architecture.
9268         * gdbarch.c: Re-generated.
9269         * utils.c (address_significant): Update.
9270
9271 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
9272
9273         * stack.c (func_command): Remove trailing newline in call to error.
9274
9275 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9276
9277         * regcache.h (regcache_raw_collect): Remove, update callers to
9278         use regcache::raw_collect.
9279         * regcache.c (regcache_raw_collect): Remove.
9280
9281 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9282
9283         * regcache.h (regcache_raw_supply): Remove, update callers to
9284         use detached_regcache::raw_supply.
9285         * regcache.c (regcache_raw_supply): Remove.
9286
9287 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9288
9289         * regcache.h (regcache_cooked_write_part): Remove, update
9290         callers to use regcache::cooked_write_part.
9291         * regcache.c (regcache_cooked_write_part): Remove.
9292
9293 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9294
9295         * regcache.h (regcache_cooked_read_part): Remove, update callers
9296         to use readable_regcache::cooked_read_part.
9297         * regcache.c (regcache_cooked_read_part): Remove.
9298
9299 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9300
9301         * regcache.h (regcache_cooked_read_value): Remove, update
9302         callers to use readable_regcache::cooked_read_value.
9303         * regcache.c (regcache_cooked_read_value): Remove.
9304
9305 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9306
9307         * regcache.h (regcache_cooked_write): Remove, update callers to
9308         use regcache::cooked_write.
9309         * regcache.c (regcache_cooked_write): Remove.
9310
9311 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9312
9313         * regcache.h (regcache_invalidate): Remove, update callers to
9314         use detached_regcache::invalidate instead.
9315         * regcache.c (regcache_invalidate): Remove.
9316
9317 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9318
9319         * regcache.h (regcache_raw_write_part): Remove, update callers
9320         to use regcache::raw_write_part instead.
9321         * regcache.c (regcache_raw_write_part): Remove.
9322
9323 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9324
9325         * regcache.h (regcache_raw_read_part): Remove, update callers to
9326         use readable_regcache::raw_read_part instead.
9327         * regcache.c (regcache_raw_read_part): Remove.
9328
9329 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9330
9331         * regcache.h (regcache_cooked_read): Remove, update callers to
9332         use readable_regcache::cooked_read instead.
9333         * regcache.c (regcache_cooked_read): Remove.
9334
9335 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9336
9337         * regcache.h (regcache_raw_write): Remove, update callers to use
9338         regcache::raw_write instead.
9339         * regcache.c (regcache_raw_write): Remove.
9340
9341 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9342
9343         * regcache.h (regcache_raw_read): Remove, update callers to use
9344         readable_regcache::raw_read instead.
9345         * regcache.c (regcache_raw_read): Remove.
9346
9347 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9348
9349         * regcache.h (regcache_raw_update): Remove, update callers to
9350         use readable_regcache::raw_update instead.
9351         * regcache.c (regcache_raw_update): Remove.
9352
9353 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9354
9355         * regcache.h (regcache_register_status): Remove, update callers
9356         to use reg_buffer::get_register_status directly instead.
9357         * regcache.c (regcache_register_status): Remove.
9358
9359 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9360
9361         * regcache.h (regcache_get_ptid): Remove, update all callers to
9362         call regcache::ptid instead.
9363         * regcache.c (regcache_get_ptid): Remove.
9364
9365 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9366
9367         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
9368
9369 2018-05-30  Pedro Alves  <palves@redhat.com>
9370
9371         * common/common-exceptions.h (exception_rethrow): Use
9372         ATTRIBUTE_NORETURN.
9373
9374 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
9375
9376         * breakpoint.c (print_solib_event, check_status_catch_solib):
9377         Remove struct keyword in range-based for loops.
9378         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
9379         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
9380         Likewise.
9381         * linespec.c (find_superclass_methods, search_minsyms_for_name):
9382         Likewise.
9383         * symfile.c (addr_info_make_relative): Likewise.
9384         * thread.c (value_in_thread_stack_temporaries): Likewise.
9385
9386 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
9387
9388         PR gdb/16841
9389         * valops.c (value_struct_elt_for_reference): Call check_typedef on
9390         aggregate type to get its real type before accessing it.
9391
9392 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
9393
9394         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
9395         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
9396         * coff-pe-read.c (add_pe_forwarded_sym): Replace
9397         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
9398         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
9399         * jit.c (jit_breakpoint_re_set_internal): Likewise.
9400         * printcmd.c (info_address_command): Likewise.
9401
9402 2018-05-29  Tom Tromey  <tom@tromey.com>
9403
9404         * windows-nat.c (handle_exception): Update fall-through comment.
9405
9406 2018-05-29  Tom Tromey  <tom@tromey.com>
9407
9408         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
9409         (struct program_space) <added_solibs>: Now a std::vector.
9410         * breakpoint.c (print_solib_event): Update.
9411         (check_status_catch_solib): Update.
9412         * progspace.c (clear_program_space_solib_cache): Update.
9413         * solib.c (update_solib_list): Update.
9414
9415 2018-05-29  Tom Tromey  <tom@tromey.com>
9416
9417         * python/py-type.c (typy_richcompare): Update.
9418         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
9419         * gdbtypes.h (types_deeply_equal): Return bool.
9420         (types_equal): Likewise.
9421         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
9422         declare VEC.
9423         (check_types_equal): Change worklist to std::vector.  Return
9424         bool.
9425         (struct type_equality_entry): Add constructor.
9426         (compare_maybe_null_strings): Return bool.
9427         (check_types_worklist): Return bool.  Change worklist to
9428         std::vector.
9429         (types_deeply_equal): Use std::vector.
9430         (types_equal): Return bool.
9431         (compare_maybe_null_strings): Simplify.
9432
9433 2018-05-29  Tom Tromey  <tom@tromey.com>
9434
9435         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
9436
9437 2018-05-29  Tom Tromey  <tom@tromey.com>
9438
9439         * objc-lang.h: Don't include cp-support.h.
9440         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
9441         declare VEC.
9442
9443 2018-05-27  Tom Tromey  <tom@tromey.com>
9444
9445         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
9446
9447 2018-05-25  Tom Tromey  <tom@tromey.com>
9448
9449         * value.c (value::location): Initialize.
9450
9451 2018-05-25  Tom Tromey  <tom@tromey.com>
9452
9453         * dbxread.c (init_bincl_list): Remove.
9454         (bincl_list): Now a std::vector.
9455         (bincls_allocated, next_bincl): Remove.
9456         (free_bincl_list, do_free_bincl_list_cleanup)
9457         (make_cleanup_free_bincl_list): Remove.
9458         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
9459         unique_xmalloc_ptr.
9460         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
9461         (struct header_file_location): Add constructor.
9462         (add_bincl_to_list): Remove.
9463
9464 2018-05-25  Tom Tromey  <tom@tromey.com>
9465
9466         * tui/tui.c (tui_enable): Update.
9467         * mi/mi-interp.c (mi_interp::init): Update.
9468         * interps.h (class interp) <name>: New method.
9469         <m_name>: Rename from name.
9470         (~scoped_restore_interp): Update.
9471         * interps.c (interp::interp): Update.
9472         (interp_add, interp_set, interp_lookup_existing)
9473         (current_interp_named_p): Update.
9474
9475 2018-05-25  Tom Tromey  <tom@tromey.com>
9476
9477         * interps.c (interp_name): Remove.
9478         * mi/mi-interp.c (mi_interp::init): Update.
9479         * interps.h (interp_name): Remove.
9480         (~scoped_restore_interp): Update.
9481         * tui/tui.c (tui_enable): Update.
9482
9483 2018-05-25  Tom Tromey  <tom@tromey.com>
9484
9485         * utils.c (fputs_maybe_filtered): Update.
9486         * linespec.c (decode_line_full): Update.
9487         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
9488         (mi_print_breakpoint_for_event, mi_solib_loaded)
9489         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
9490         (mi_user_selected_context_changed): Update.
9491         * mi/mi-main.c (mi_execute_command): Update.
9492         * cli/cli-script.c (execute_control_command): Update.
9493         * python/python.c (execute_gdb_command): Update.
9494         * solib.c (info_sharedlibrary_command): Update.
9495         * interps.c (interp_ui_out): Remove.
9496         * interps.h (interp_ui_out): Remove.
9497
9498 2018-05-25  Tom Tromey  <tom@tromey.com>
9499
9500         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
9501         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
9502         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
9503
9504 2018-05-25  Tom Tromey  <tom@tromey.com>
9505
9506         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
9507         * interps.c (interp_exec): Use scoped_restore.
9508
9509 2018-05-25  Tom Tromey  <tom@tromey.com>
9510
9511         * remote.c (remote_target::remote_file_get): Use
9512         gdb::byte_vector.
9513         (remote_target::remote_file_put): Likewise.
9514
9515 2018-05-25  Tom Tromey  <tom@tromey.com>
9516
9517         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
9518         a std::string.
9519         (get_pe_section_index, add_pe_exported_sym): Update.
9520         (read_pe_exported_syms): Use gdb::def_vector.
9521
9522 2018-05-25  Tom Tromey  <tom@tromey.com>
9523
9524         * frame.c (remove_prev_frame): Remove.
9525         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
9526
9527 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
9528
9529         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
9530         Remove prototypes.
9531         * mips-linux-nat.c (supply_fpregset): Always call
9532         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
9533         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
9534         `mips_fill_fpregset'.
9535         * mips-linux-tdep.c (mips_supply_fpregset)
9536         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
9537         (mips_fill_fpregset_wrapper): Remove functions.
9538         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
9539         (mips_linux_fpregset): Remove variable.
9540         (mips_linux_iterate_over_regset_sections): Use
9541         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
9542         (mips_linux_o32_sigframe_init): Remove comment.
9543
9544 2018-05-25  Pedro Alves  <palves@redhat.com>
9545
9546         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
9547         (struct readahead_cache, struct packet_reg, struct
9548         remote_arch_state, class remote_state): Move higher up in the
9549         file.
9550         (remote_target::m_remote_state): Now an object instead of a pointer.
9551         (remote_target::get_remote_state): Adjust.
9552
9553 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9554
9555         * stack.c (select_and_print_frame): Delete.
9556         (struct function_bounds): Move struct within function.
9557         (func_command): Most content moved into new function
9558         find_frame_for_function, use new function, print result, add
9559         function comment.
9560         (find_frame_for_function): New function, now returns a result.
9561
9562 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9563
9564         * stack.c (iterate_over_block_arg_vars): Fix comment.
9565         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
9566
9567 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
9568
9569         PR gdb/23203
9570         * frame.c
9571         (scoped_restore_selected_frame::scoped_restore_selected_frame):
9572         Define.
9573         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
9574         Define.
9575         * frame.h (class scoped_restore_selected_frame): New class.
9576         * stack.c (print_frame_local_vars): Remove catching and rethrowing
9577         of any exception, use scoped_restore_selected_frame to restore the
9578         frame instead.
9579
9580 2018-05-24  Pedro Alves  <palves@redhat.com>
9581
9582         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
9583         override.
9584
9585 2018-05-23  Tom Tromey  <tom@tromey.com>
9586
9587         * complaints.c (struct complaints): Remove.
9588         (symfile_complaint_book): Remove.
9589         (series): New global.
9590         (complaint_internal): Update.
9591         (clear_complaints): Update.
9592
9593 2018-05-23  Tom Tromey  <tom@tromey.com>
9594
9595         * complaints.c (counters): New global.
9596         (struct complain): Remove.
9597         (struct complaints) <root>: Remove.
9598         (complaint_sentinel): Remove.
9599         (symfile_complaint_book): Update.
9600         (find_complaint) Remove.
9601         (complaint_internal, clear_complaints): Update.
9602
9603 2018-05-23  Tom Tromey  <tom@tromey.com>
9604
9605         * complaints.c (struct complain) <file, line>: Remove.
9606         (find_complaint): Remove file, line parameters.
9607         (complaint_internal): Update.
9608
9609 2018-05-23  Tom Tromey  <tom@tromey.com>
9610
9611         * complaints.c (vcomplaint): Remove.
9612         (complaint_internal) Merge in contents of vcomplaint.
9613
9614 2018-05-23  Tom Tromey  <tom@tromey.com>
9615
9616         * complaints.c (struct complaints) <explanation>: Remove.
9617         (symfile_explanations): Remove.
9618         (symfile_complaint_book): Update.
9619         (vcomplaint): Update.
9620         (struct explanation): Remove.
9621
9622 2018-05-23  Tom Tromey  <tom@tromey.com>
9623
9624         * complaints.c (symfile_complaints): Remove.
9625         (complaint_internal): Remove "complaints" parameter.
9626         (clear_complaints, vcomplaint): Remove "c" parameter.
9627         (get_complaints): Remove.
9628         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
9629         (dwarf2_debug_line_missing_file_complaint)
9630         (dwarf2_debug_line_missing_end_sequence_complaint)
9631         (dwarf2_complex_location_expr_complaint)
9632         (dwarf2_const_value_length_mismatch_complaint)
9633         (dwarf2_section_buffer_overflow_complaint)
9634         (dwarf2_macro_malformed_definition_complaint)
9635         (dwarf2_invalid_attrib_class_complaint)
9636         (create_addrmap_from_index, dw2_symtab_iter_next)
9637         (dw2_expand_marked_cus)
9638         (dw2_debug_names_iterator::find_vec_in_debug_names)
9639         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
9640         (create_debug_type_hash_table, init_cutu_and_read_dies)
9641         (partial_die_parent_scope, add_partial_enumeration)
9642         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
9643         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
9644         (read_import_statement, read_file_scope, create_dwo_cu_reader)
9645         (create_cus_hash_table, create_dwp_hash_table)
9646         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
9647         (dwarf2_rnglists_process, dwarf2_ranges_process)
9648         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
9649         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
9650         (handle_struct_member_die, process_structure_scope)
9651         (read_array_type, read_common_block, read_module_type)
9652         (read_tag_pointer_type, read_typedef, read_base_type)
9653         (read_subrange_type, load_partial_dies, partial_die_info::read)
9654         (partial_die_info::read, partial_die_info::read)
9655         (partial_die_info::read, read_checked_initial_length_and_offset)
9656         (dwarf2_string_attr, read_formatted_entries)
9657         (dwarf_decode_line_header)
9658         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
9659         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
9660         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
9661         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9662         (get_signatured_type, get_DW_AT_signature_type)
9663         (decode_locdesc, file_file_name, consume_improper_spaces)
9664         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
9665         (dwarf_decode_macro_bytes, dwarf_decode_macros)
9666         (dwarf2_symbol_mark_computed, set_die_type)
9667         (read_attribute_value): Update.
9668         * stap-probe.c (handle_stap_probe, get_stap_base_address):
9669         Update.
9670         * dbxread.c (unknown_symtype_complaint)
9671         (lbrac_mismatch_complaint, repeated_header_complaint)
9672         (set_namestring, function_outside_compilation_unit_complaint)
9673         (read_dbx_symtab, process_one_symbol): Update.
9674         * gdbtypes.c (stub_noname_complaint): Update.
9675         * windows-nat.c (handle_unload_dll): Update.
9676         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
9677         (decode_base_type): Update.
9678         * xcoffread.c (bf_notfound_complaint, ef_complaint)
9679         (eb_complaint, record_include_begin, record_include_end)
9680         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
9681         (process_xcoff_symbol, read_symbol)
9682         (function_outside_compilation_unit_complaint)
9683         (scan_xcoff_symtab): Update.
9684         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
9685         * buildsym.c (finish_block_internal, make_blockvector)
9686         (end_symtab_get_static_block, augment_type_symtab): Update.
9687         * dtrace-probe.c (dtrace_process_dof)
9688         (dtrace_static_probe_ops::get_probes): Update.
9689         * complaints.h (struct complaint): Don't declare.
9690         (symfile_complaints): Remove.
9691         (complaint_internal): Remove "complaints" parameter.
9692         (complaint): Likewise.
9693         (clear_complaints): Likewise.
9694         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9695         (reread_symbols): Update.
9696         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
9697         (dwarf2_frame_cache, decode_frame_entry): Update.
9698         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
9699         * objc-lang.c (lookup_objc_class, lookup_child_selector)
9700         (info_selectors_command): Update.
9701         * macrotab.c (macro_include, check_for_redefinition)
9702         (macro_undef): Update.
9703         * objfiles.c (filter_overlapping_sections): Update.
9704         * stabsread.c (invalid_cpp_abbrev_complaint)
9705         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
9706         (define_symbol, error_type, read_type, rs6000_builtin_type)
9707         (stabs_method_name_from_physname, read_member_functions)
9708         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
9709         (attach_fields_to_type, complain_about_struct_wipeout)
9710         (read_range_type, read_args, common_block_start)
9711         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
9712         Update.
9713         * mdebugread.c (index_complaint, unknown_ext_complaint)
9714         (basic_type_complaint, bad_tag_guess_complaint)
9715         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
9716         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
9717         (parse_procedure, parse_lines)
9718         (function_outside_compilation_unit_complaint)
9719         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
9720         (bad_tag_guess_complaint, reg_value_complaint): Update.
9721         * cp-support.c (demangled_name_complaint): Update.
9722         * macroscope.c (sal_macro_scope): Update.
9723         * dwarf-index-write.c (class debug_names): Update.
9724
9725 2018-05-23  Tom Tromey  <tom@tromey.com>
9726
9727         * complaints.c (clear_complaints): Remove "noisy" parameter.
9728         * complaints.h (clear_complaints): Update.
9729         * symfile.c (syms_from_objfile_1, finish_new_objfile)
9730         (reread_symbols): Update.
9731
9732 2018-05-23  Tom Tromey  <tom@tromey.com>
9733
9734         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
9735         SUBSEQUENT_MESSAGE.
9736         (vcomplaint, clear_complaints): Update.
9737         (symfile_explanations): Remove some messages.
9738
9739 2018-05-23  Tom Tromey  <tom@tromey.com>
9740
9741         * complaints.c (internal_complaint): Remove.
9742         * complaints.h (internal_complaint): Remove.
9743
9744 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
9745
9746         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
9747
9748 2018-05-22  Pedro Alves  <palves@redhat.com>
9749
9750         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
9751         (remote_fileio_badfd, remote_fileio_return_errno)
9752         (remote_fileio_return_success, remote_fileio_func_open)
9753         (remote_fileio_func_open, remote_fileio_func_close)
9754         (remote_fileio_func_read, remote_fileio_func_write)
9755         (remote_fileio_func_lseek, remote_fileio_func_rename)
9756         (remote_fileio_func_unlink, remote_fileio_func_stat)
9757         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
9758         (remote_fileio_func_isatty, remote_fileio_func_system): Add
9759         remote_target parameter.
9760         (remote_fio_func_map) <func>: Add remote_target parameter.
9761         (do_remote_fileio_request, remote_fileio_request):
9762         * remote-fileio.h (remote_fileio_request):
9763         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
9764         remote_target parameter.
9765         (remote_notif_process, handle_notification): Adjust to pass down
9766         the remote.
9767         (remote_notif_state_allocate): Add remote_target parameter.  Save
9768         it.
9769         * remote-notif.h (struct remote_target): Forward declare.
9770         (struct notif_client) <parse, ack, can_get_pending_events>: Add
9771         remote_target parameter.
9772         (struct remote_notif_state) <remote>: New field.
9773         (remote_notif_ack, remote_notif_parse): Add remote_target
9774         parameter.
9775         (remote_notif_state_allocate, remote_notif_state_allocate): Add
9776         remote_target parameter.
9777         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
9778         (threads_listing_context, rmt_thread_action, protocol_feature)
9779         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
9780         (packet_result, struct threads_listing_context, remote_state):
9781         Move definitions and declarations higher up.
9782         (remote_target) <~remote_target>: Declare.
9783         (remote_download_command_source, remote_file_put, remote_file_get)
9784         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
9785         (remote_hostio_pread_vFile, remote_hostio_send_command)
9786         (remote_hostio_set_filesystem, remote_hostio_open)
9787         (remote_hostio_close, remote_hostio_unlink, remote_state)
9788         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
9789         (get_memory_write_packet_size, get_memory_read_packet_size)
9790         (append_pending_thread_resumptions, remote_detach_1)
9791         (append_resumption, remote_resume_with_vcont)
9792         (add_current_inferior_and_thread, wait_ns, wait_as)
9793         (process_stop_reply, remote_notice_new_inferior)
9794         (process_initial_stop_replies, remote_add_thread)
9795         (btrace_sync_conf, remote_btrace_maybe_reopen)
9796         (remove_new_fork_children, kill_new_fork_children)
9797         (discard_pending_stop_replies, stop_reply_queue_length)
9798         (check_pending_events_prevent_wildcard_vcont)
9799         (discard_pending_stop_replies_in_queue, stop_reply)
9800         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
9801         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
9802         (remote_interrupt_as, remote_interrupt_ns)
9803         (remote_get_noisy_reply, remote_query_attached)
9804         (remote_add_inferior, remote_current_thread, get_current_thread)
9805         (set_thread, set_general_thread, set_continue_thread)
9806         (set_general_process, write_ptid)
9807         (remote_unpack_thread_info_response, remote_get_threadinfo)
9808         (parse_threadlist_response, remote_get_threadlist)
9809         (remote_threadlist_iterator, remote_get_threads_with_ql)
9810         (remote_get_threads_with_qxfer)
9811         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
9812         (get_offsets, remote_check_symbols, remote_supported_packet)
9813         (remote_query_supported, remote_packet_size)
9814         (remote_serial_quit_handler, remote_detach_pid)
9815         (remote_vcont_probe, remote_resume_with_hc)
9816         (send_interrupt_sequence, interrupt_query)
9817         (remote_notif_get_pending_events, fetch_register_using_p)
9818         (send_g_packet, process_g_packet, fetch_registers_using_g)
9819         (store_register_using_P, store_registers_using_G)
9820         (set_remote_traceframe, check_binary_download)
9821         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
9822         (remote_xfer_live_readonly_partial, remote_read_bytes)
9823         (remote_send_printf, remote_flash_write, readchar)
9824         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
9825         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
9826         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
9827         (extended_remote_disable_randomization, extended_remote_run)
9828         (send_environment_packet, extended_remote_environment_support)
9829         (extended_remote_set_inferior_cwd, remote_write_qxfer)
9830         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
9831         (packet_command): Now methods of ...
9832         (remote_target): ... this class.
9833         (m_remote_state) <remote_target>: New field.
9834         (struct remote_state) <stop_reply_queue,
9835         remote_async_inferior_event_token, wait_forever_enabled_p>: New
9836         fields.
9837         (remote_state::remote_state): Allocate stop_reply_queue.
9838         (remote_state): Delete global.
9839         (get_remote_state_raw): Delete.
9840         (remote_target::get_remote_state): Allocate m_remote_state on
9841         demand.
9842         (get_current_remote_target): New.
9843         (remote_ops, extended_remote_ops): Delete.
9844         (wait_forever_enabled_p, remote_async_inferior_event_token):
9845         Delete, moved to struct remote_state.
9846         (remote_target::close): Delete self.  Destruction bits split to
9847         ...
9848         (remote_target::~remote_target): ... this.
9849         (show_memory_packet_size): Adjust to use
9850         get_current_remote_target.
9851         (struct protocol_feature) <func>: Add remote_target parameter.
9852         All callers adjusted.
9853         (curr_quit_handler_target): New.
9854         (remote_serial_quit_handler): Reimplement.
9855         (remote_target::open_1): Adjust to use get_current_remote_target.
9856         Heap-allocate remote_target/extended_remote_target instances.
9857         (vcont_builder::vcont_builder): Add remote_target parameter, and
9858         save it in m_remote.  All callers adjusted.
9859         (vcont_builder::m_remote): New field.
9860         (vcont_builder::restart, vcont_builder::flush)
9861         (vcont_builder::push_action): Use it.
9862         (remote_target::commit_resume): Use it.
9863         (struct queue_iter_param) <remote>: New field.
9864         (remote_target::remove_new_fork_children): Fill in 'remote' field.
9865         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
9866         (check_pending_event_prevents_wildcard_vcont_callback)
9867         (remote_target::check_pending_events_prevent_wildcard_vcont)
9868         (remote_target::discard_pending_stop_replies)
9869         (remote_target::discard_pending_stop_replies_in_queue)
9870         (remote_target::remote_notif_remove_queued_reply): Fill in
9871         'remote' field.
9872         (remote_notif_get_pending_events): New.
9873         (remote_target::readchar, remote_target::remote_serial_write):
9874         Save/restore curr_quit_handler_target.
9875         (putpkt): New.
9876         (kill_new_fork_children): Fill in 'remote' field.
9877         (packet_command): Use get_current_remote_target, defer to
9878         remote_target method of same name.
9879         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
9880         parameter, and save it in m_remote.  All callers adjusted.
9881         (scoped_remote_fd::release): Use m_remote.
9882         (scoped_remote_fd::m_remote): New field.
9883         (remote_file_put, remote_file_get, remote_file_delete): Use
9884         get_current_remote_target, defer to remote_target method of same
9885         name.
9886         (remote_btrace_reset): Add remote_state paremeter.  Update all
9887         callers.
9888         (remote_async_inferior_event_handler). Pass down 'data'.
9889         (remote_new_objfile): Use get_current_remote_target.
9890         (remote_target::vcont_r_supported): New.
9891         (set_range_stepping): Use get_current_remote_target and
9892         remote_target::vcont_r_supported.
9893         (_initialize_remote): Don't allocate 'remote_state' and
9894         'stop_reply_queue' globals.
9895         * remote.h (struct remote_target): Forward declare.
9896         (getpkt, putpkt, remote_notif_get_pending_events): Add
9897         'remote_target' parameter.
9898
9899 2018-05-22  Pedro Alves  <palves@redhat.com>
9900
9901         * remote.c (vcont_builder): Now a class.  Make all data members
9902         private.
9903         (vcont_builder) <vcont_builder, restart, flush, push_action>:
9904         Declare methods.
9905         (vcont_builder_restart): Rename to ...
9906         (vcont_builder::restart): ... this.
9907         (vcont_builder_flush): Rename to ...
9908         (vcont_builder::flush): ... this.
9909         (vcont_builder_push_action): Rename to ...
9910         (vcont_builder::push_action): ... this.
9911         (remote_target::commit_resume): Adjust.
9912
9913 2018-05-22  Pedro Alves  <palves@redhat.com>
9914
9915         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
9916         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
9917         (get_fixed_memory_packet_size): New.
9918         (get_memory_packet_size): Use it.
9919         (set_memory_packet_size): Don't override the config size with
9920         DEFAULT_MAX_MEMORY_PACKET_SIZE.
9921         (show_memory_packet_size): Use get_fixed_memory_packet_size.
9922         Don't refer to get_memory_packet_size if not connected to a remote
9923         target.  Show "(default)" if configured size is 0.
9924
9925 2018-05-22  Pedro Alves  <palves@redhat.com>
9926
9927         * remote.c (remote_target::mourn_inferior): Move
9928         discard_pending_stop_replies call here from ...
9929         (_initialize_remote): ... here.
9930
9931 2018-05-22  Pedro Alves  <palves@redhat.com>
9932
9933         * remote.c (compare_section_command): Remove set_general_process
9934         call.
9935
9936 2018-05-22  Pedro Alves  <palves@redhat.com>
9937
9938         * remote.c (struct packet_reg, struct remote_arch_state):
9939         Move higher up in the file.
9940         (remote_state) <m_arch_states>: Store remote_arch_state values
9941         instead of remote_arch_state pointers.
9942         (remote_state::get_remote_arch_state): Adjust.
9943
9944 2018-05-22  Pedro Alves  <palves@redhat.com>
9945
9946         * remote.c: Include <unordered_map>.
9947         (remote_state): Now a class.
9948         (remote_state) <get_remote_arch_state>: Declare method.
9949         <get_remote_arch_state>: New field.
9950         (remote_arch_state) <remote_arch_state>: Declare ctor.
9951         <regs>: Now a unique_ptr.
9952         (remote_gdbarch_data_handle): Delete.
9953         (get_remote_arch_state): Delete.
9954         (remote_state::get_remote_arch_state): New.
9955         (get_remote_state): Adjust to call remote_state's
9956         get_remote_arch_state method.
9957         (init_remote_state): Delete, bits factored out to ...
9958         (remote_arch_state::remote_arch_state): ... this new method.
9959         (get_remote_packet_size, get_memory_packet_size)
9960         (process_g_packet, remote_target::fetch_registers)
9961         (remote_target::prepare_to_store, store_registers_using_G)
9962         (remote_target::store_registers, remote_target::get_trace_status):
9963         Adjust to call remote_state's method.
9964         (_initialize_remote): Remove reference to
9965         remote_gdbarch_data_handle.
9966
9967 2018-05-22  Pedro Alves  <palves@redhat.com>
9968
9969         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
9970         pread>: New method declarations.
9971         (remote_target::open_1): Adjust.
9972         (readahead_cache_invalidate): Rename to ...
9973         (readahead_cache::invalidate): ... this, and adjust to be a class
9974         method.
9975         (readahead_cache_invalidate_fd): Rename to ...
9976         (readahead_cache::invalidate_fd): ... this, and adjust to be a
9977         class method.
9978         (remote_hostio_pwrite): Adjust.
9979         (remote_hostio_pread_from_cache): Rename to ...
9980         (readahead_cache::pread): ... this, and adjust to be a class
9981         method.
9982         (remote_hostio_close): Adjust.
9983
9984 2018-05-22  Pedro Alves  <palves@redhat.com>
9985
9986         * remote.c (remote_hostio_close_cleanup): Delete.
9987         (class scoped_remote_fd): New.
9988         (remote_file_put, remote_file_get): Use it.
9989
9990 2018-05-22  Pedro Alves  <palves@redhat.com>
9991
9992         (struct vCont_action_support): Use bool and initialize all fields.
9993         (struct readahead_cache): Initialize all fields.
9994         (remote_state): Use bool and initialize all fields.
9995         (remote_state::remote_state, remote_state::~remote_state): New.
9996         (new_remote_state): Delete.
9997         (_initialize_remote): Use new to allocate remote_state.
9998
9999 2018-05-22  Pedro Alves  <palves@redhat.com>
10000             張俊芝  <zjz@zjz.name>
10001
10002         PR gdb/22973
10003         * c-exp.y: Include "c-support.h".
10004         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
10005         of tolower.  Use c_ident_is_alpha to scan names.
10006         * c-lang.c: Include "c-support.h".
10007         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
10008         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
10009         * c-support.h: New file, with bits factored out from ...
10010         * cp-name-parser.y: ... this file.
10011         Include "c-support.h".
10012         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
10013         c-support.h and renamed.
10014         (symbol_end, yylex): Adjust.
10015
10016 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10017
10018         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
10019         parameter type to CORE_ADDR.
10020         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
10021         parameter type in declaration to CORE_ADDR.
10022         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
10023         target_auxv_search to get AT_HWCAP and use the result to get the
10024         target description.
10025         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
10026         to CORE_ADDR. Remove the cast of the return value to unsigned
10027         long. Fix error predicate of target_auxv_search.
10028         (ppc_linux_nat_target::read_description): Change the type of the
10029         hwcap variable to CORE_ADDR.
10030
10031 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10032
10033         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
10034         if the size of fpscr is larger than 32 bits.
10035
10036 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10037
10038         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
10039         (ppc32_linux_vsxregmap): New global.
10040         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
10041         regcache_supply_regset, and regcache_collect_regset.
10042         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
10043         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
10044         (fetch_vsx_register, store_vsx_register): Remove.
10045         (fetch_vsx_registers): Add regno parameter. Get regset using
10046         ppc_linux_vsxregset. Use regset to supply registers.
10047         (store_vsx_registers): Add regno parameter. Get regset using
10048         ppc_linux_vsxregset. Use regset to collect registers.
10049         (fetch_register): Call fetch_vsx_registers instead of
10050         fetch_vsx_register.
10051         (store_register): Call store_vsx_registers instead of
10052         store_vsx_register.
10053         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
10054         new regno parameter.
10055         (store_ppc_registers): Call store_vsx_registers with -1 for the
10056         new regno parameter.
10057         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
10058         (ppc_collect_vsxregset): Remove.
10059
10060 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10061
10062         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
10063         offset fields.
10064         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
10065         for vector register offset fields.
10066         (ppc64_fbsd_reg_offsets): Likewise.
10067         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
10068         to vector register offset fields.
10069         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
10070         to vector register offset fields.
10071         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
10072         vector register offset fields.
10073         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
10074         initializers for vector register offset fields.
10075         (rs6000_aix64_reg_offsets): Likewise.
10076         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
10077         (ppc_supply_vrregset): Remove.
10078         (ppc_collect_vrregset): Remove.
10079         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
10080         (ppc_linux_vrregset) : New function.
10081         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
10082         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
10083         (ppc32_linux_vrregset): Remove.
10084         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
10085         and use result instead of ppc32_linux_vrregset.
10086         (ppc32_linux_reg_offsets): Remove initializers for vector register
10087         offset fields.
10088         (ppc64_linux_reg_offsets): Likewise.
10089         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
10090         * ppc-linux-nat.c: Include regset.h.
10091         (gdb_vrregset_t): Adjust comment to account for little-endian
10092         mode.
10093         (supply_vrregset, fill_vrregset): Remove.
10094         (fetch_altivec_register, store_altivec_register): Remove.
10095         (fetch_altivec_registers): Add regno parameter. Get regset using
10096         ppc_linux_vrregset. Use regset to supply registers.
10097         (store_altivec_registers): Add regno parameter. Get regset using
10098         ppc_linux_vrregset. Use regset to collect registers.
10099         (fetch_register): Call fetch_altivec_registers instead of
10100         fetch_altivec_register.
10101         (store_register): Call store_altivec_registers instead of
10102         store_altivec_register.
10103         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
10104         the new regno parameter.
10105         (store_ppc_registers): Call store_altivec_registers with -1 for
10106         the new regno parameter.
10107
10108 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10109
10110         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
10111         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
10112         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
10113         (gdb_vrregset_t): Change array type size to
10114         PPC_LINUX_SIZEOF_VRREGSET.
10115         (gdb_vsxregset_t): Change array type size to
10116         PPC_LINUX_SIZEOF_VSXREGSET.
10117         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
10118         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
10119         PPC_LINUX_SIZEOF_VSXREGSET.
10120
10121 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10122
10123         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
10124         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
10125         nat/ppc-linux.c.
10126         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
10127         ppc_linux_target_wordsize with tid.
10128         (ppc_linux_nat_target::read_description): Call ppc_linux_target
10129         wordsize with tid.
10130         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
10131         (ppc64_64bit_inferior_p): Add static and inline specifiers.
10132         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
10133         tid parameter. Remove static specifier.
10134         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
10135         (ppc_linux_target_wordsize): New declaration.
10136
10137 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10138
10139         * arch/ppc-linux-common.c: New file.
10140         * arch/ppc-linux-common.h: New file.
10141         * arch/ppc-linux-tdesc.h: New file.
10142         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
10143         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
10144         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
10145         arch/ppc-linux-tdesc.h.
10146         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
10147         arch/ppc-linux-tdesc.h.
10148         (ppc_linux_nat_target::read_description): Remove target
10149         description matching code. Fill a ppc_linux_features struct and
10150         call ppc_linux_match_description with it. Move comment about ISA
10151         2.05 to ppc-linux-common.c.
10152         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
10153         arch/ppc-linux-tdesc.h.
10154         (ppc_linux_core_read_description): Remove target description
10155         matching code. Fill a ppc_linux_features struct and call
10156         ppc_linux_match_description with it.
10157         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
10158         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
10159         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
10160         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
10161         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
10162         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
10163         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
10164         (tdesc_powerpc_e500l): Remove.
10165
10166 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
10167
10168         * ada-lang.c (catch_assert_command): Pass empty string instead
10169         of NULL for excep_string argument.
10170
10171 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
10172
10173         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
10174         the width of the requested register exceeds the width of the
10175         `ptrace' data type.
10176
10177 2018-05-21  Tom Tromey  <tom@tromey.com>
10178
10179         * printcmd.c (output_command): Remove.
10180         (output_command_const): Rename to output_command.
10181         * valprint.h (output_command): Rename from output_command_const.
10182         * tracepoint.c (trace_dump_actions): Call output_command.
10183
10184 2018-05-21  Tom Tromey  <tom@tromey.com>
10185
10186         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
10187         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
10188         * ada-lang.h (create_ada_exception_catchpoint): Update.
10189         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
10190         std::string.
10191         (create_excep_cond_exprs, ~ada_catchpoint)
10192         (should_stop_exception, print_one_exception)
10193         (print_mention_exception, print_recreate_exception): Update.
10194         (ada_get_next_arg): Remove.
10195         (catch_ada_exception_command_split): Use std::string.  Change type
10196         of "excep_string", "cond_string".
10197         (catch_ada_exception_command): Update.
10198         (create_ada_exception_catchpoint): Change type of excep_string.
10199         (ada_exception_sal): Remove excep_string parameter.
10200         (~ada_catchpoint): Remove.
10201
10202 2018-05-21  Tom Tromey  <tom@tromey.com>
10203
10204         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
10205         cleanup.
10206
10207 2018-05-21  Tom Tromey  <tom@tromey.com>
10208
10209         * ada-lang.c (ada_exception_message_1, ada_exception_message):
10210         Return unique_xmalloc_ptr.
10211         (print_it_exception): Update.
10212
10213 2018-05-21  Tom Tromey  <tom@tromey.com>
10214
10215         * tracepoint.c (trace_dump_actions): Use std::string.
10216
10217 2018-05-21  Tom Tromey  <tom@tromey.com>
10218
10219         * symfile.c (reread_symbols): Use std::string for original_name.
10220
10221 2018-05-21  Tom Tromey  <tom@tromey.com>
10222
10223         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
10224         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
10225         constructor.
10226
10227 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
10228
10229         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
10230         instance to...
10231         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
10232         * objfiles.c (get_objfile_bfd_data): Allocate
10233         objfile_per_bfd_storage with obstack_new when allocating on
10234         obstack.
10235
10236 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10237
10238         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
10239         OBSTACK_ZALLOC.
10240         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
10241         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
10242         * mdebugread.c (mdebug_build_psymtabs): Likewise.
10243         (add_pending): Likewise.
10244         (parse_symbol): Likewise.
10245         (parse_partial_symbols): Likewise.
10246         (psymtab_to_symtab_1): Likewise.
10247         (new_psymtab): Likewise.
10248         (elfmdebug_build_psymtabs): Likewise.
10249         * minsyms.c (terminate_minimal_symbol_table): Likewise.
10250         * objfiles.c (get_objfile_bfd_data): Likewise.
10251         (objfile_register_static_link): Likewise.
10252         * psymtab.c (allocate_psymtab): Likewise.
10253         * stabsread.c (read_member_functions): Likewise.
10254         * xcoffread.c (xcoff_end_psymtab): Likewise.
10255
10256 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
10257
10258         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
10259         compiler supports std::is_trivially_constructible.
10260         * common/poison.h: Include obstack.h.
10261         (IsMallocable): Define to is_trivially_constructible if the
10262         compiler supports it, define to true_type otherwise.
10263         (xobnew): New.
10264         (XOBNEW): Redefine.
10265         (xobnewvec): New.
10266         (XOBNEWVEC): Redefine.
10267         * gdb_obstack.h (obstack_zalloc): New.
10268         (OBSTACK_ZALLOC): Redefine.
10269         (obstack_calloc): New.
10270         (OBSTACK_CALLOC): Redefine.
10271         (obstack_new): New.
10272         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
10273         (gdbarch_obstack): New declaration in gdbarch.h, definition in
10274         gdbarch.c.
10275         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
10276         obstack_calloc/obstack_zalloc.
10277         (gdbarch_obstack_zalloc): Remove.
10278         * target-descriptions.c (tdesc_data_init): Use obstack_new.
10279
10280 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10281
10282         * stack.c (backtrace_command_1): Remove useless variable int i.
10283
10284 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10285
10286         * stack.c (print_frame_info): Fix comment.
10287
10288 2018-05-18  Tom Tromey  <tom@tromey.com>
10289
10290         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
10291         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
10292         (~dwarf2_per_objfile): Update
10293         (dwarf2_get_dwz_file): Use new.
10294         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
10295         unique_ptr.
10296
10297 2018-05-18  Tom Tromey  <tom@tromey.com>
10298
10299         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
10300         unique_ptr.
10301         * dwarf2read.c (struct dwp_file): Add constructor and
10302         initializers.
10303         (open_and_init_dwp_file): Return a unique_ptr.
10304         (dwarf2_per_objfile, create_dwp_hash_table)
10305         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
10306         (lookup_dwo_unit_in_dwp): Update.
10307         (open_and_init_dwp_file, get_dwp_file): Update.
10308
10309 2018-05-18  Tom Tromey  <tom@tromey.com>
10310
10311         * dwarf2read.c (dwarf2_per_objfile): Update.
10312         (struct mapped_index): Add initializers.
10313         (dwarf2_read_index): Use new.
10314         (dw2_symtab_iter_init): Update.
10315         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
10316         unique_ptr.
10317
10318 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10319
10320         * dwarf2read.c (mapped_index) <total_size>: Remove.
10321
10322 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
10323
10324         * unittests/format_pieces-selftests.c (test_format_specifier):
10325         Add ARI comments.
10326
10327 2018-05-18  Tom Tromey  <tom@tromey.com>
10328
10329         * c-typeprint.c (maybe_print_hole): New function.
10330         (c_print_type_struct_field_offset): Update.
10331         (c_type_print_base_struct_union): Call maybe_print_hole.
10332
10333 2018-05-17  Keith Seitz  <keiths@redhat.com>
10334
10335         * breakpoint.c (build_bpstat_chain): New function, moved from
10336         bpstat_stop_status.
10337         (bpstat_stop_status): Add optional parameter, `stop_chain'.
10338         If no stop chain is passed, call build_bpstat_chain to build it.
10339         * breakpoint.h (build_bpstat_chain): Declare.
10340         (bpstat_stop_status): Move documentation here from breakpoint.c.
10341         * infrun.c (handle_signal_stop): Before eliding inlined frames,
10342         build the stop chain and pass it to skip_inline_frames.
10343         Pass this stop chain to bpstat_stop_status.
10344         * inline-frame.c: Include breakpoint.h.
10345         (stopped_by_user_bp_inline_frame): New function.
10346         (skip_inline_frames): Add parameter `stop_chain'.
10347         Move documention to inline-frame.h.
10348         If non-NULL, use stopped_by_user_bp_inline_frame to determine
10349         whether the frame should be elided.
10350         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
10351         Add moved documentation and update for new parameter.
10352
10353 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10354
10355         PR cli/14975
10356         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10357         unittests/format_pieces-selftests.c.
10358         * common/format.h (format_piece) <operator==>: New.
10359         (format_pieces) <operator[]>: Remove.
10360         * common/format.c (format_pieces::format_pieces): Handle \e.
10361         * unittests/format_pieces-selftests.c: New.
10362
10363 2018-05-17  Tom Tromey  <tom@tromey.com>
10364
10365         PR symtab/23010:
10366         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
10367         (dw2_instantiate_symtab): Add skip_partial parameter.
10368         (dw2_find_last_source_symtab, dw2_map_expand_apply)
10369         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
10370         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
10371         (dw2_expand_symtabs_matching_one)
10372         (dw2_find_pc_sect_compunit_symtab)
10373         (dw2_debug_names_lookup_symbol)
10374         (dw2_debug_names_expand_symtabs_for_function): Update.
10375         (init_cutu_and_read_dies): Add skip_partial parameter.
10376         (process_psymtab_comp_unit, build_type_psymtabs_1)
10377         (process_skeletonless_type_unit, load_partial_comp_unit)
10378         (psymtab_to_symtab_1): Update.
10379         (load_full_comp_unit): Add skip_partial parameter.
10380         (process_imported_unit_die, dwarf2_read_addr_index)
10381         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
10382         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
10383         (read_signatured_type): Update.
10384
10385 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
10386
10387         * value.c (release_value): Remove unused variable.
10388         (record_latest_value): Likewise.
10389         (access_value_history): Likewise.
10390         (preserve_values): Likewise.
10391
10392 2018-05-17  Tom Tromey  <tom@tromey.com>
10393
10394         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
10395         Initialize.
10396
10397 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
10398
10399         PR gdb/22286
10400         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
10401         Also handle registers whose width is not a multiple of
10402         PTRACE_TYPE_RET.
10403         (linux_nat_trad_target::store_register): Likewise.
10404
10405 2018-05-16  Tom Tromey  <tom@tromey.com>
10406
10407         * gdbcore.h (core_bfd): Redefine.
10408         * corelow.c (core_target::close): Update.
10409         (core_target_open): Update.
10410         * progspace.h (struct program_space) <cbfd>: Now a
10411         gdb_bfd_ref_ptr.
10412
10413 2018-05-16  Tom Tromey  <tom@tromey.com>
10414
10415         PR cli/19551:
10416         * symfile-add-flags.h (enum symfile_add_flags)
10417         <SYMFILE_NOT_FILENAME>: New constant.
10418         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
10419         objfile name from BFD.
10420         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
10421         * minidebug.c (find_separate_debug_file_in_section): Put
10422         ".gnu_debugdata" into BFD's file name.
10423
10424 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
10425
10426         * regcache.c (regcache_read_ftype, regcache_write_ftype):
10427         Remove.
10428
10429 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
10430
10431         PR binutils/21446
10432         * aarch64-tdep.c (aarch64_analyze_prologue,
10433         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
10434         Indicate not interested in errors.
10435
10436 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10437
10438         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
10439         Supply the MIPS_ZERO_REGNUM register.
10440
10441 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
10442
10443         * mips-tdep.c (mask_address_var): Make variable static.
10444
10445 2018-05-14  Tom Tromey  <tom@tromey.com>
10446
10447         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
10448
10449 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
10450
10451         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
10452         FXSAVE_ADDR for the mxcsr register.
10453
10454 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
10455
10456         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
10457
10458 2018-05-11  Pedro Alves  <palves@redhat.com>
10459
10460         * corelow.c (core_target) <core_target>: No longer inline.
10461         Initialize m_core_gdbarch, m_core_vec and build the section table
10462         here.
10463         <~core_target>: New.
10464         <core_gdbarch, get_core_register_section>: New methods.
10465         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
10466         factored out from ...
10467         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
10468         (core_ops): Delete.
10469         (sniff_core_bfd): Add gdbarch parameter.
10470         (core_close): Delete, merged into ...
10471         (core_target::close): ... here.  Delete self.
10472         (core_close_cleanup): Delete.
10473         (core_target_open): Allocate a core_target on the heap.  Use a
10474         unique_ptr instead of a cleanup.  Bits moved into the core_target
10475         ctor.  Adjust to use core_target methods instead of globals.
10476         (get_core_register_section): Rename to ...
10477         (core_target::get_core_register_section): ... this and adjust.
10478         (struct get_core_registers_cb_data): New.
10479         (get_core_registers_cb): Use it.  Use bool.
10480         (core_target::fetch_registers, core_target::files_info)
10481         (core_target::xfer_partial, core_target::read_description)
10482         (core_target::pid_to, core_target::thread_name): Adjust to
10483         reference class fields instead of globals.
10484         * target.h (struct target_ops_deleter, target_ops_up): New.
10485
10486 2018-05-11  Pedro Alves  <palves@redhat.com>
10487
10488         * corefile.c (core_file_command): Move to corelow.c.
10489         * corelow.c (the_core_target): Delete.
10490         (core_file_command): Moved from corefile.c.  Check exec_bfd
10491         instead of the_core_target.  Use target_detach instead of calling
10492         into the_core_target directly.
10493         (maybe_say_no_core_file_now): New.
10494         (core_target::detach): Use it.
10495         (_initialize_corelow): Remove references to the_core_target.
10496         * gdbcore.h (the_core_target): Delete.
10497
10498 2018-05-11  Tom Tromey  <tromey@redhat.com>
10499             Pedro Alves  <palves@redhat.com>
10500
10501         * corefile.c (core_bfd): Remove.
10502         * gdbcore.h (core_bfd): Now a macro.
10503         * progspace.h (struct program_space) <cbfd>: New field.
10504
10505 2018-05-11  Tom Tromey  <tom@tromey.com>
10506
10507         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
10508         gdb::def_vector.
10509
10510 2018-05-10  Tom Tromey  <tom@tromey.com>
10511
10512         * configure: Rebuild.
10513         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
10514
10515 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
10516
10517         PR server/23158:
10518         * regformats/regdat.sh: Adjust script, following the addition
10519         of the new expedite_regs parameter to init_target_desc.
10520
10521 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
10522     
10523         PR gdb/23127
10524         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
10525         set_gdbarch_significant_addr_bit.
10526         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
10527         set_gdbarch_significant_addr_bit.
10528         * utils.c (address_significant): Update to sign extend addr.
10529
10530 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
10531
10532         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
10533         (xtensa_linux_init_abi): Limit tdep->num_regs by
10534         tdep->num_nopriv_regs.
10535         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
10536         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
10537         not initialized.
10538
10539 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
10540
10541         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
10542
10543 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
10544
10545         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
10546         (I387_MXCSR_INIT_VAL): New constant.
10547         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
10548         buffer if it was supplied by the inferior.
10549         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
10550         (i387_xsave_get_clear_bv): New function.
10551         (i387_supply_xsave): Only read x87 control registers from the
10552         xsave buffer if the feature is enabled, and the state will have
10553         been written, otherwise, provide a suitable default.
10554         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
10555         including x87 control registers.  Update control registers if they
10556         have changed from the default value, and mark features as enabled
10557         as required.
10558         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
10559
10560 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10561
10562         * spu-tdep.c (info_spu_event_command): Fix output formatting.
10563
10564 2018-05-07  Tom Tromey  <tom@tromey.com>
10565
10566         * configure: Rebuild.
10567         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
10568
10569 2018-05-07  Tom Tromey  <tom@tromey.com>
10570
10571         PR tdep/20362:
10572         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
10573         bit.  Use correct value for VDIV.
10574
10575 2018-05-04  Tom Tromey  <tom@tromey.com>
10576
10577         * configure: Rebuild.
10578         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
10579
10580 2018-05-04  Tom Tromey  <tom@tromey.com>
10581
10582         * linux-record.c (record_linux_system_call) <case
10583         RECORD_SYS_RECVFROM>: Add "break".
10584
10585 2018-05-04  Tom Tromey  <tom@tromey.com>
10586
10587         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
10588         Add missing "break".
10589         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
10590         Add missing "break".
10591
10592 2018-05-04  Tom Tromey  <tom@tromey.com>
10593
10594         * rs6000-tdep.c (ppc_process_record_op4)
10595         (ppc_process_record_op63): Add fall-through comment.
10596
10597 2018-05-04  Tom Tromey  <tom@tromey.com>
10598
10599         * i386-tdep.c (i386_process_record): Add fall-through comment.
10600
10601 2018-05-04  Tom Tromey  <tom@tromey.com>
10602
10603         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
10604         comment.
10605
10606 2018-05-04  Tom Tromey  <tom@tromey.com>
10607
10608         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
10609         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
10610         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
10611         comment.
10612         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
10613         comment.
10614         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
10615         comment.
10616
10617 2018-05-04  Tom Tromey  <tom@tromey.com>
10618
10619         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
10620
10621 2018-05-04  Tom Tromey  <tom@tromey.com>
10622
10623         * s390-tdep.c (s390_process_record): Fix fall-through comments.
10624         * xcoffread.c (scan_xcoff_symtab): Move comment later.
10625         * symfile.c (section_is_mapped): Fix fall-through comment.
10626         * stabsread.c (define_symbol, read_member_functions): Fix
10627         fall-through comment.
10628         * s390-linux-tdep.c (s390_process_record): Fix fall-through
10629         comment.
10630         * remote.c (remote_wait_as): Fix fall-through comment.
10631         * p-exp.y (yylex): Fix fall-through comment.
10632         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
10633         comment.
10634         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
10635         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
10636         * jv-exp.y (yylex): Fix fall-through comment.
10637         * go-exp.y (lex_one_token): Fix fall-through comment.
10638         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
10639         fall-through comment.
10640         * f-exp.y (yylex): Fix fall-through comment.
10641         * dwarf2read.c (process_die): Fix fall-through comments.
10642         * dbxread.c (process_one_symbol): Fix fall-through comment.
10643         * d-exp.y (lex_one_token): Fix fall-through comment.
10644         * cp-name-parser.y (yylex): Fix fall-through comment.
10645         * coffread.c (coff_symtab_read): Fix fall-through comment.
10646         * c-exp.y (lex_one_token): Fix fall-through comment.
10647         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
10648         comment.
10649         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
10650         comment.
10651
10652 2018-05-04  Tom Tromey  <tom@tromey.com>
10653
10654         PR python/22730:
10655         * NEWS: Mention gdb.execute change.
10656         * gdbcmd.h (execute_control_command): Don't declare.
10657         * python/python.c (execute_gdb_command): Use read_command_lines_1,
10658         execute_control_commands, execute_control_commands_to_string.
10659         * cli/cli-script.h (execute_control_commands)
10660         (execute_control_commands_to_string): Declare.
10661         (execute_control_command): Add from_tty parameter.
10662         * cli/cli-script.c (execute_control_commands)
10663         (execute_control_commands_to_string): New functions.
10664         (execute_user_command): Use execute_control_commands.
10665         (execute_control_command_1): Add "from_tty" parameter.  Update.
10666         (execute_control_command): Likewise.
10667
10668 2018-05-04  Tom Tromey  <tom@tromey.com>
10669
10670         PR python/22731:
10671         * NEWS: Mention that breakpoint commands are writable.
10672         * python/py-breakpoint.c (bppy_set_commands): New function.
10673         (breakpoint_object_getset) <"commands">: Use it.
10674
10675 2018-05-04  Tom Tromey  <tom@tromey.com>
10676
10677         * tracepoint.c (actions_command): Update.
10678         * mi/mi-cmd-break.c (mi_command_line_array)
10679         (mi_command_line_array_cnt, mi_command_line_array_ptr)
10680         (mi_read_next_line): Remove.
10681         (mi_cmd_break_commands): Update.
10682         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
10683         function_view.
10684         * cli/cli-script.c (get_command_line): Update.
10685         (process_next_line): Use function_view.  Constify.
10686         (recurse_read_control_structure, read_command_lines)
10687         (read_command_lines_1): Change argument types to function_view.
10688         (do_define_command, document_command): Update.
10689         * breakpoint.h (check_tracepoint_command): Don't declare.
10690         * breakpoint.c (check_tracepoint_command): Remove.
10691         (commands_command_1, create_tracepoint_from_upload): Update.
10692
10693 2018-05-04  Tom Tromey  <tom@tromey.com>
10694
10695         PR gdb/11750:
10696         * cli/cli-script.h (enum command_control_type) <define_control>:
10697         New constant.
10698         * cli/cli-script.c (multi_line_command_p): Handle define_control.
10699         (build_command_line, execute_control_command_1)
10700         (process_next_line): Likewise.
10701         (do_define_command): New function, extracted from define_command.
10702         (define_command): Use it.
10703
10704 2018-05-04  Tom Tromey  <tom@tromey.com>
10705
10706         * tracepoint.c (actions_command): Update.
10707         * cli/cli-script.h (read_command_lines): Update.
10708         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
10709         (MAX_TMPBUF): Remove define.
10710         (define_command): Use string_printf.
10711         (document_command): Likewise.
10712         * breakpoint.c (commands_command_1): Update.
10713
10714 2018-05-04  Tom Tromey  <tom@tromey.com>
10715
10716         * top.c (execute_command): Update.
10717         * cli/cli-script.h (print_command_lines): Now varargs.
10718         * cli/cli-script.c (print_command_lines): Now varargs.
10719         (execute_control_command_1) <case while_control, case if_control>:
10720         Update.
10721
10722 2018-05-04  Tom Tromey  <tom@tromey.com>
10723
10724         * tracepoint.c (all_tracepoint_actions): Rename from
10725         all_tracepoint_actions_and_cleanup.  Change return type.
10726         (actions_command, encode_actions_1, encode_actions)
10727         (trace_dump_actions, tdump_command): Update.
10728         * remote.c (remote_download_command_source): Update.
10729         * python/python.c (gdbpy_eval_from_control_command)
10730         (python_command, python_interactive_command): Update.
10731         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10732         * guile/guile.c (guile_command)
10733         (gdbscm_eval_from_control_command, guile_command): Update.
10734         * compile/compile.c (compile_code_command)
10735         (compile_print_command, compile_to_object): Update.
10736         * cli/cli-script.h (struct command_lines_deleter): New.
10737         (counted_command_line): New typedef.
10738         (struct command_line): Add constructor, destructor.
10739         <body_list>: Remove.
10740         <body_list_0, body_list_1>: New members.
10741         (command_line_up): Remove typedef.
10742         (read_command_lines, read_command_lines_1, get_command_line):
10743         Update.
10744         (copy_command_lines): Don't declare.
10745         * cli/cli-script.c (build_command_line): Use "new".
10746         (get_command_line): Return counted_command_line.
10747         (print_command_lines, execute_user_command)
10748         (execute_control_command_1, while_command, if_command): Update.
10749         (realloc_body_list): Remove.
10750         (process_next_line, recurse_read_control_structure): Update.
10751         (read_command_lines, read_command_lines_1): Return counted_command_line.
10752         (free_command_lines): Use "delete".
10753         (copy_command_lines): Remove.
10754         (define_command, document_command, show_user_1): Update.
10755         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
10756         a counted_command_line.
10757         * breakpoint.h (counted_command_line): Remove typedef.
10758         (breakpoint_set_commands): Update.
10759         * breakpoint.c (check_no_tracepoint_commands)
10760         (validate_commands_for_breakpoint): Update.
10761         (breakpoint_set_commands): Change commands to be a
10762         counted_command_line.
10763         (commands_command_1, update_dprintf_command_list)
10764         (create_tracepoint_from_upload): Update.
10765
10766 2018-05-04  Tom Tromey  <tom@tromey.com>
10767
10768         * cli/cli-decode.h (cmd_list_element): New constructor.
10769         (~cmd_list_element): New destructor.
10770         (struct cmd_list_element): Add initializers.
10771         * cli/cli-decode.c (do_add_cmd): Use "new".
10772         (delete_cmd): Use "delete".
10773
10774 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
10775             Pedro Alves <palves@redhat.com>
10776
10777         PR breakpoints/19806 and support for PR external/20207.
10778         * NEWS: Mention Aarch64 watchpoint improvements.
10779         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
10780         watchpoints and PR external/20207 watchpoints.
10781         * nat/aarch64-linux-hw-point.c
10782         (kernel_supports_any_contiguous_range): New.
10783         (aarch64_watchpoint_offset): New.
10784         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
10785         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
10786         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
10787         (aarch64_align_watchpoint): New parameters aligned_offset_p and
10788         next_addr_orig_p.  Support PR external/20207 watchpoints.
10789         (aarch64_downgrade_regs): New.
10790         (aarch64_dr_state_insert_one_point): New parameters offset and
10791         addr_orig.
10792         (aarch64_dr_state_remove_one_point): Likewise.
10793         (aarch64_handle_breakpoint): Update caller.
10794         (aarch64_handle_aligned_watchpoint): Likewise.
10795         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
10796         aligned_offset.
10797         (aarch64_linux_set_debug_regs): Remove const from state.  Call
10798         aarch64_downgrade_regs.
10799         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
10800         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
10801         (DR_CONTROL_MASK): ... this.
10802         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
10803         (unsigned int aarch64_watchpoint_offset): New prototype.
10804         (aarch64_linux_set_debug_regs): Remove const from state.
10805         * utils.c (align_up, align_down): Move to ...
10806         * common/common-utils.c (align_up, align_down): ... here.
10807         * utils.h (align_up, align_down): Move to ...
10808         * common/common-utils.h (align_up, align_down): ... here.
10809
10810 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
10811
10812         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
10813         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
10814         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
10815         Re-implement to match the ABI as summarized in GCC's
10816         gcc/config/sparc/sparc.c.  All callers updated.
10817         (sparc32_store_arguments): Remove assertion.
10818
10819 2018-05-04  Tom Tromey  <tom@tromey.com>
10820
10821         * printcmd.c: Don't include tui.h.
10822         (decode_format): Use skip_spaces.
10823
10824 2018-05-04  Tom Tromey  <tom@tromey.com>
10825
10826         PR gdb/22619:
10827         * printcmd.c (last_count): New global.
10828         (x_command): Use saved count when repeating.
10829
10830 2018-05-04  Tom Tromey  <tom@tromey.com>
10831
10832         * nto-procfs.c (do_closedir_cleanup): Remove.
10833         (procfs_pidlist): Use gdb_dir_up.
10834         * procfs.c (do_closedir_cleanup): Remove.
10835         (proc_update_threads): Use gdb_dir_up.
10836         * common/filestuff.h (struct gdb_dir_deleter): New.
10837         (gdb_dir_up): New typedef.
10838
10839 2018-05-04  Tom Tromey  <tom@tromey.com>
10840
10841         * ada-lang.c (print_mention_exception): Use std::string.
10842
10843 2018-05-04  Tom Tromey  <tom@tromey.com>
10844
10845         * ada-lang.c (create_excep_cond_exprs): Update.
10846         (ada_exception_catchpoint_cond_string): Use std::string.
10847
10848 2018-05-04  Tom Tromey  <tom@tromey.com>
10849
10850         * ada-lang.c (xget_renaming_scope): Return std::string.
10851         (old_renaming_is_invisible): Update.
10852
10853 2018-05-04  Tom Tromey  <tom@tromey.com>
10854
10855         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
10856         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
10857
10858 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
10859
10860         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
10861
10862 2018-05-04  Tom Tromey  <tom@tromey.com>
10863
10864         * remote.c (remote_query_supported_append): Change type.
10865         (remote_check_symbols): Update.
10866
10867 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
10868
10869         PR gdb/11420
10870         * configure.ac: Prepend libpython.
10871         * python/python-config.py: Likewise.
10872         * configure: Regenerate.
10873
10874 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10875
10876         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
10877
10878 2018-05-03  Pedro Alves  <palves@redhat.com>
10879
10880         * s390-linux-nat.c
10881         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
10882         override.  Write 'true' instead of '1'.
10883         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
10884         declaration.
10885
10886 2018-05-02  Pedro Alves  <palves@redhat.com>
10887
10888         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
10889         add_inf_child_target.
10890         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
10891         add_inf_child_target.
10892         * aix-thread.c (aix_thread_target_info): New.
10893         (aix_thread_target) <shortname, longname, doc>: Delete.
10894         <info>: New.
10895         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
10896         add_inf_child_target.
10897         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
10898         add_inf_child_target.
10899         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
10900         add_inf_child_target.
10901         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
10902         add_inf_child_target.
10903         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
10904         add_inf_child_target.
10905         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
10906         add_inf_child_target.
10907         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
10908         add_inf_child_target.
10909         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
10910         add_inf_child_target.
10911         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
10912         add_inf_child_target.
10913         * bfd-target.c (target_bfd_target_info): New.
10914         (target_bfd) <shortname, longname, doc>: Delete.
10915         <info>: New.
10916         * bsd-kvm.c (bsd_kvm_target_info): New.
10917         (bsd_kvm_target) <shortname, longname, doc>: Delete.
10918         <info>: New.
10919         (bsd_kvm_target::open): Rename to ...
10920         (bsd_kvm_target_open): ... this.  Adjust.
10921         * bsd-uthread.c (bsd_uthread_target_info): New.
10922         (bsd_uthread_target) <shortname, longname, doc>: Delete.
10923         <info>: New.
10924         * corefile.c (core_file_command): Adjust.
10925         * corelow.c (core_target_info): New.
10926         (core_target) <shortname, longname, doc>: Delete.
10927         <info>: New.
10928         (core_target::open): Rename to ...
10929         (core_target_open): ... this.  Adjust.
10930         * ctf.c (ctf_target_info): New.
10931         (ctf_target) <shortname, longname, doc>: Delete.
10932         <info>: New.
10933         (ctf_target::open): Rename to ...
10934         (ctf_target_open): ... this.
10935         (_initialize_ctf): Adjust.
10936         * exec.c (exec_target_info): New.
10937         (exec_target) <shortname, longname, doc>: Delete.
10938         <info>: New.
10939         (exec_target::open): Rename to ...
10940         (exec_target_open): ... this.
10941         * gdbcore.h (core_target_open): Declare.
10942         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
10943         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
10944         add_inf_child_target.
10945         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
10946         add_inf_child_target.
10947         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
10948         add_inf_child_target.
10949         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
10950         add_inf_child_target.
10951         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
10952         add_inf_child_target.
10953         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
10954         add_inf_child_target.
10955         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
10956         add_inf_child_target.
10957         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
10958         add_inf_child_target.
10959         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
10960         add_inf_child_target.
10961         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
10962         add_inf_child_target.
10963         * inf-child.c (inf_child_target_info): New.
10964         (inf_child_target::info): New.
10965         (inf_child_open_target): Remove 'target' parameter.  Use
10966         get_native_target instead.
10967         (inf_child_target::open): Delete.
10968         (add_inf_child_target): New.
10969         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
10970         Delete.
10971         <info>: New.
10972         (add_inf_child_target): Declare.
10973         (inf_child_open_target): Declare.
10974         * linux-thread-db.c (thread_db_target_info): New.
10975         (thread_db_target) <shortname, longname, doc>: Delete.
10976         <info>: New.
10977         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
10978         add_inf_child_target.
10979         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
10980         add_inf_child_target.
10981         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
10982         add_inf_child_target.
10983         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
10984         add_inf_child_target.
10985         * make-target-delegates (print_class): Adjust.
10986         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
10987         add_inf_child_target.
10988         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
10989         add_inf_child_target.
10990         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
10991         add_inf_child_target.
10992         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
10993         add_inf_child_target.
10994         * nto-procfs.c (nto_native_target_info): New.
10995         (nto_procfs_target_native) <shortname, longname, doc>:
10996         Delete.
10997         <info>: New.
10998         (nto_procfs_target_info): New.
10999         (nto_procfs_target_procfs) <shortname, longname, doc>:
11000         Delete.
11001         <info>: New.
11002         (init_procfs_targets): Adjust.
11003         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
11004         add_inf_child_target.
11005         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
11006         add_inf_child_target.
11007         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
11008         add_inf_child_target.
11009         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
11010         add_inf_child_target.
11011         * ravenscar-thread.c (ravenscar_target_info): New.
11012         (ravenscar_thread_target) <shortname, longname, doc>:
11013         Delete.
11014         <info>: New.
11015         * record-btrace.c (record_btrace_target_info):
11016         (record_btrace_target) <shortname, longname, doc>: Delete.
11017         <info>: New.
11018         (record_btrace_target::open): Rename to ...
11019         (record_btrace_target_open): ... this.  Adjust.
11020         * record-full.c (record_longname, record_doc): New.
11021         (record_full_base_target) <shortname, longname, doc>: Delete.
11022         <info>: New.
11023         (record_full_target_info): New.
11024         (record_full_target): <shortname>: Delete.
11025         <info>: New.
11026         (record_full_core_open_1, record_full_open_1): Update comments.
11027         (record_full_base_target::open): Rename to ...
11028         (record_full_open): ... this.
11029         (cmd_record_full_restore): Update.
11030         (_initialize_record_full): Update.
11031         * remote-sim.c (remote_sim_target_info): New.
11032         (gdbsim_target) <shortname, longname, doc>: Delete.
11033         <info>: New.
11034         (gdbsim_target::open): Rename to ...
11035         (gdbsim_target_open): ... this.
11036         (_initialize_remote_sim): Adjust.
11037         * remote.c (remote_doc): New.
11038         (remote_target_info): New.
11039         (remote_target) <shortname, longname, doc>: Delete.
11040         <info>: New.
11041         (extended_remote_target_info): New.
11042         (extended_remote_target) <shortname, longname, doc>: Delete.
11043         <info>: New.
11044         (remote_target::open_1): Make static.  Adjust.
11045         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
11046         * s390-linux-nat.c (_initialize_s390_nat): Use
11047         add_inf_child_target.
11048         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
11049         add_inf_child_target.
11050         * sol-thread.c (thread_db_target_info): New.
11051         (sol_thread_target) <shortname, longname, doc>: Delete.
11052         <info>: New.
11053         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
11054         add_inf_child_target.
11055         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
11056         add_inf_child_target.
11057         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
11058         add_inf_child_target.
11059         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
11060         add_inf_child_target.
11061         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
11062         add_inf_child_target.
11063         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
11064         add_inf_child_target.
11065         * spu-linux-nat.c (_initialize_spu_nat): Use
11066         add_inf_child_target.
11067         * spu-multiarch.c (spu_multiarch_target_info): New.
11068         (spu_multiarch_target) <shortname, longname, doc>: Delete.
11069         <info>: New.
11070         * target-delegates.c: Regenerate.
11071         * target.c: Include <unordered_map>.
11072         (target_ops_p): Delete.
11073         (DEF_VEC_P(target_ops_p)): Delete.
11074         (target_factories): New.
11075         (test_target_info): New.
11076         (test_target_ops::info): New.
11077         (open_target): Adjust to use target_factories.
11078         (add_target_with_completer): Rename to ...
11079         (add_target): ... this.  Change prototype.  Register target_info
11080         and open callback in target_factories.  Register target_info in
11081         command context instead of target_ops.
11082         (add_target): Delete old implementation.
11083         (add_deprecated_target_alias): Change prototype.  Adjust.
11084         (the_native_target): New.
11085         (set_native_target, get_native_target): New.
11086         (find_default_run_target): Use the_native_target.
11087         (find_attach_target, find_run_target): Simplify.
11088         (target_ops::open): Delete.
11089         (dummy_target_info): New.
11090         (dummy_target::shortname, dummy_target::longname)
11091         (dummy_target::doc): Delete.
11092         (dummy_target::info): New.
11093         (debug_target::shortname, debug_target::longname)
11094         (debug_target::doc): Delete.
11095         (debug_target::info): New.
11096         * target.h (struct target_info): New.
11097         (target_ops::~target_ops): Add comment.
11098         (target_ops::info): New.
11099         (target_ops::shortname, target_ops::longname, target_ops::doc): No
11100         longer virtual.  Implement in terms of target_info.
11101         (set_native_target, get_native_target): Declare.
11102         (target_open_ftype): New.
11103         (add_target, add_target_with_completer)
11104         (add_deprecated_target_alias): Change prototype.
11105         (test_target) <shortname, longname, doc>: Delete.
11106         <info>: New.
11107         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
11108         add_inf_child_target.
11109         * tracefile-tfile.c (tfile_target_info): New.
11110         (tfile_target) <shortname, longname, doc>: Delete.
11111         <info>: New.
11112         (tfile_target::open): Rename to ...
11113         (tfile_target_open): ... this.
11114         (_initialize_tracefile_tfile): Adjust.
11115         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
11116         add_inf_child_target.
11117         * windows-nat.c (_initialize_windows_nat): Use
11118         add_inf_child_target.
11119         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
11120         add_inf_child_target.
11121
11122 2018-05-02  Pedro Alves  <palves@redhat.com>
11123
11124         * linux-nat.h (linux_nat_target) <low_new_thread,
11125         low_delete_thread, low_new_fork, low_forget_process,
11126         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
11127         New virtual methods.
11128         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
11129         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
11130         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
11131         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
11132         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
11133         Delete.
11134         * linux-fork.c (delete_fork): Adjust to call low method.
11135         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
11136         (linux_nat_new_fork, linux_nat_forget_process_hook)
11137         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
11138         (linux_nat_status_is_event):
11139         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
11140         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
11141         to call low method.
11142         (sigtrap_is_event): Rename to ...
11143         (linux_nat_target::low_status_is_event): ... this.
11144         (linux_nat_set_status_is_event): Delete.
11145         (save_stop_reason, linux_nat_wait_1)
11146         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
11147         low methods.
11148         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
11149         (linux_nat_set_new_fork, linux_nat_set_forget_process)
11150         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
11151         (linux_nat_set_prepare_to_resume): Delete.
11152         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
11153         low virtual methods.
11154         * amd64-linux-nat.c: Likewise.
11155         * arm-linux-nat.c: Likewise.
11156         * i386-linux-nat.c: Likewise.
11157         * ia64-linux-nat.c: Likewise.
11158         * mips-linux-nat.c: Likewise.
11159         * ppc-linux-nat.c: Likewise.
11160         * s390-linux-nat.c: Likewise.
11161         * sparc64-linux-nat.c: Likewise.
11162         * x86-linux-nat.c: Likewise.
11163         * x86-linux-nat.h: Include "nat/x86-linux.h".
11164         (x86_linux_nat_target) <low_new_fork, low_forget_process,
11165         low_prepare_to_resume, low_new_thread, low_delete_thread>:
11166         Override methods.
11167
11168 2018-05-02  Pedro Alves  <palves@redhat.com>
11169
11170         * target.h (target_ops)
11171         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11172         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
11173         stopped_by_watchpoint, have_continuable_watchpoint,
11174         stopped_data_address, watchpoint_addr_within_range,
11175         can_accel_watchpoint_condition, can_run, thread_alive,
11176         has_all_memory, has_memory, has_stack, has_registers,
11177         has_execution, can_async_p, is_async_p, supports_non_stop,
11178         always_non_stop_p, can_execute_reverse, supports_multi_process,
11179         supports_enable_disable_tracepoint,
11180         supports_disable_randomization, supports_string_tracing,
11181         supports_evaluation_of_breakpoint_conditions,
11182         can_run_breakpoint_commands, filesystem_is_local,
11183         can_download_tracepoint, get_trace_state_variable_value,
11184         set_trace_notes, get_tib_address, use_agent, can_use_agent,
11185         record_is_replaying, record_will_replay,
11186         augmented_libraries_svr4_read>: Adjust to return bool.
11187         * aarch64-linux-nat.c: All implementations adjusted.
11188         * aix-thread.c: All implementations adjusted.
11189         * arm-linux-nat.c: All implementations adjusted.
11190         * breakpoint.c: All implementations adjusted.
11191         * bsd-kvm.c: All implementations adjusted.
11192         * bsd-uthread.c: All implementations adjusted.
11193         * corelow.c: All implementations adjusted.
11194         * ctf.c: All implementations adjusted.
11195         * darwin-nat.c: All implementations adjusted.
11196         * darwin-nat.h: All implementations adjusted.
11197         * exec.c: All implementations adjusted.
11198         * fbsd-nat.c: All implementations adjusted.
11199         * fbsd-nat.h: All implementations adjusted.
11200         * gnu-nat.c: All implementations adjusted.
11201         * gnu-nat.h: All implementations adjusted.
11202         * go32-nat.c: All implementations adjusted.
11203         * ia64-linux-nat.c: All implementations adjusted.
11204         * inf-child.c: All implementations adjusted.
11205         * inf-child.h: All implementations adjusted.
11206         * inf-ptrace.c: All implementations adjusted.
11207         * inf-ptrace.h: All implementations adjusted.
11208         * linux-nat.c: All implementations adjusted.
11209         * linux-nat.h: All implementations adjusted.
11210         * mips-linux-nat.c: All implementations adjusted.
11211         * nto-procfs.c: All implementations adjusted.
11212         * ppc-linux-nat.c: All implementations adjusted.
11213         * procfs.c: All implementations adjusted.
11214         * ravenscar-thread.c: All implementations adjusted.
11215         * record-btrace.c: All implementations adjusted.
11216         * record-full.c: All implementations adjusted.
11217         * remote-sim.c: All implementations adjusted.
11218         * remote.c: All implementations adjusted.
11219         * s390-linux-nat.c: All implementations adjusted.
11220         * sol-thread.c: All implementations adjusted.
11221         * spu-multiarch.c: All implementations adjusted.
11222         * target-delegates.c: All implementations adjusted.
11223         * target.c: All implementations adjusted.
11224         * target.h: All implementations adjusted.
11225         * tracefile-tfile.c: All implementations adjusted.
11226         * tracefile.c: All implementations adjusted.
11227         * tracefile.h: All implementations adjusted.
11228         * windows-nat.c: All implementations adjusted.
11229         * x86-linux-nat.h: All implementations adjusted.
11230         * x86-nat.h: All implementations adjusted.
11231
11232 2018-05-02  Pedro Alves  <palves@redhat.com>
11233
11234         * make-target-delegates (scan_target_h): Don't trim lines here.
11235         Replace sequences of tabs and/or whitespace with a single
11236         whitespace.
11237         (top level, parsing methods): Trim each line before processing it
11238         here.
11239
11240 2018-05-02  Pedro Alves  <palves@redhat.com>
11241             John Baldwin  <jhb@freebsd.org>
11242
11243         * target.h (enum strata) <debug_stratum>: New.
11244         (struct target_ops) <all delegation methods>: Replace by C++
11245         virtual methods, and drop "to_" prefix.  All references updated
11246         throughout.
11247         <to_shortname, to_longname, to_doc, to_data,
11248         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
11249         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
11250         virtual methods.  All references updated throughout.
11251         <can_attach, supports_terminal_ours, can_create_inferior,
11252         get_thread_control_capabilities, attach_no_wait>: New
11253         virtual methods.
11254         <insert_breakpoint, remove_breakpoint>: Now
11255         TARGET_DEFAULT_NORETURN methods.
11256         <info_proc>: Now returns bool.
11257         <to_magic>: Delete.
11258         (OPS_MAGIC): Delete.
11259         (current_target): Delete.  All references replaced by references
11260         to ...
11261         (target_stack): ... this.  New.
11262         (target_shortname, target_longname): Adjust.
11263         (target_can_run): Now a function declaration.
11264         (default_child_has_all_memory, default_child_has_memory)
11265         (default_child_has_stack, default_child_has_registers)
11266         (default_child_has_execution): Remove target_ops parameter.
11267         (complete_target_initialization): Delete.
11268         (memory_breakpoint_target): New template class.
11269         (test_target_ops): Refactor as a C++ class with virtual methods.
11270         * make-target-delegates (NAME_PART): Tighten.
11271         (POINTER_PART, CP_SYMBOL): New.
11272         (SIMPLE_RETURN_PART): Reimplement.
11273         (VEC_RETURN_PART): Expect less.
11274         (RETURN_PART, VIRTUAL_PART): New.
11275         (METHOD): Adjust to C++ virtual methods.
11276         (scan_target_h): Remove reference to C99.
11277         (dname): Output "target_ops::" prefix.
11278         (write_function_header): Adjust to output a C++ class method.
11279         (write_declaration): New.
11280         (write_delegator): Adjust to output a C++ class method.
11281         (tdname): Output "dummy_target::" prefix.
11282         (write_tdefault, write_debugmethod): Adjust to output a C++ class
11283         method.
11284         (tdefault_names, debug_names): Delete.
11285         (return_types, tdefaults, styles, argtypes_array): New.
11286         (top level): All methods are delegators.
11287         (print_class): New.
11288         (top level): Print dummy_target and debug_target classes.
11289         * target-delegates.c: Regenerate.
11290         * target-debug.h (target_debug_print_enum_info_proc_what)
11291         (target_debug_print_thread_control_capabilities)
11292         (target_debug_print_thread_info_p): New.
11293         * target.c (dummy_target): Delete.
11294         (the_dummy_target, the_debug_target): New.
11295         (target_stack): Now extern.
11296         (set_targetdebug): Push/unpush debug target.
11297         (default_child_has_all_memory, default_child_has_memory)
11298         (default_child_has_stack, default_child_has_registers)
11299         (default_child_has_execution): Remove target_ops parameter.
11300         (complete_target_initialization): Delete.
11301         (add_target_with_completer): No longer call
11302         complete_target_initialization.
11303         (target_supports_terminal_ours): Use regular delegation.
11304         (update_current_target): Delete.
11305         (push_target): No longer check magic number.  Don't call
11306         update_current_target.
11307         (unpush_target): Don't call update_current_target.
11308         (target_is_pushed): No longer check magic number.
11309         (target_require_runnable): Skip for all stratums over
11310         process_stratum.
11311         (target_ops::info_proc): New.
11312         (target_info_proc): Use find_target_at and
11313         find_default_run_target.
11314         (target_supports_disable_randomization): Use regular delegation.
11315         (target_get_osdata): Use find_target_at.
11316         (target_ops::open, target_ops::close, target_ops::can_attach)
11317         (target_ops::attach, target_ops::can_create_inferior)
11318         (target_ops::create_inferior, target_ops::can_run)
11319         (target_can_run): New.
11320         (default_fileio_target): Use regular delegation.
11321         (target_ops::fileio_open, target_ops::fileio_pwrite)
11322         (target_ops::fileio_pread, target_ops::fileio_fstat)
11323         (target_ops::fileio_close, target_ops::fileio_unlink)
11324         (target_ops::fileio_readlink): New.
11325         (target_fileio_open_1, target_fileio_unlink)
11326         (target_fileio_readlink): Always call the target method.  Handle
11327         FILEIO_ENOSYS.
11328         (return_zero, return_zero_has_execution): Delete.
11329         (init_dummy_target): Delete.
11330         (dummy_target::dummy_target, dummy_target::shortname)
11331         (dummy_target::longname, dummy_target::doc)
11332         (debug_target::debug_target, debug_target::shortname)
11333         (debug_target::longname, debug_target::doc): New.
11334         (target_supports_delete_record): Use regular delegation.
11335         (setup_target_debug): Delete.
11336         (maintenance_print_target_stack): Skip debug_stratum.
11337         (initialize_targets): Instantiate the_dummy_target and
11338         the_debug_target.
11339         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
11340         use target_stack.
11341         (target_auxv_search, fprint_target_auxv): Adjust.
11342         (info_auxv_command): Adjust to use target_stack.
11343         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
11344         * exceptions.c (print_flush): Handle a NULL target_stack.
11345         * regcache.c (target_ops_no_register): Refactor as class with
11346         virtual methods.
11347
11348         * exec.c (exec_target): New class.
11349         (exec_ops): Now an exec_target.
11350         (exec_open, exec_close_1, exec_get_section_table)
11351         (exec_xfer_partial, exec_files_info, exec_has_memory)
11352         (exec_make_note_section): Refactor as exec_target methods.
11353         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
11354         Delete.
11355         (exec_target::find_memory_regions): New.
11356         (_initialize_exec): Don't call init_exec_ops.
11357         * gdbcore.h (exec_file_clear): Delete.
11358
11359         * corefile.c (core_target): Delete.
11360         (core_file_command): Adjust.
11361         * corelow.c (core_target): New class.
11362         (the_core_target): New.
11363         (core_close): Remove target_ops parameter.
11364         (core_close_cleanup): Adjust.
11365         (core_target::close): New.
11366         (core_open, core_detach, get_core_registers, core_files_info)
11367         (core_xfer_partial, core_thread_alive, core_read_description)
11368         (core_pid_to_str, core_thread_name, core_has_memory)
11369         (core_has_stack, core_has_registers, core_info_proc): Rework as
11370         core_target methods.
11371         (ignore, core_remove_breakpoint, init_core_ops): Delete.
11372         (_initialize_corelow): Initialize the_core_target.
11373         * gdbcore.h (core_target): Delete.
11374         (the_core_target): New.
11375
11376         * ctf.c: (ctf_target): New class.
11377         (ctf_ops): Now a ctf_target.
11378         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
11379         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
11380         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
11381         methods.
11382         (init_ctf_ops): Delete.
11383         (_initialize_ctf): Don't call it.
11384         * tracefile-tfile.c (tfile_target): New class.
11385         (tfile_ops): Now a tfile_target.
11386         (tfile_open, tfile_close, tfile_files_info)
11387         (tfile_get_tracepoint_status, tfile_trace_find)
11388         (tfile_fetch_registers, tfile_xfer_partial)
11389         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
11390         Refactor as tfile_target methods.
11391         (tfile_xfer_partial_features): Remove target_ops parameter.
11392         (init_tfile_ops): Delete.
11393         (_initialize_tracefile_tfile): Don't call it.
11394         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
11395         (tracefile_has_stack, tracefile_has_registers)
11396         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
11397         tracefile_target methods.
11398         (init_tracefile_ops): Delete.
11399         (tracefile_target::tracefile_target): New.
11400         * tracefile.h: Include "target.h".
11401         (tracefile_target): New class.
11402         (init_tracefile_ops): Delete.
11403
11404         * spu-multiarch.c (spu_multiarch_target): New class.
11405         (spu_ops): Now a spu_multiarch_target.
11406         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
11407         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
11408         (spu_search_memory, spu_mourn_inferior): Refactor as
11409         spu_multiarch_target methods.
11410         (init_spu_ops): Delete.
11411         (_initialize_spu_multiarch): Remove references to init_spu_ops,
11412         complete_target_initialization.
11413
11414         * ravenscar-thread.c (ravenscar_thread_target): New class.
11415         (ravenscar_ops): Now a ravenscar_thread_target.
11416         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
11417         (ravenscar_thread_alive, ravenscar_pid_to_str)
11418         (ravenscar_fetch_registers, ravenscar_store_registers)
11419         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
11420         (ravenscar_stopped_by_hw_breakpoint)
11421         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
11422         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
11423         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
11424         methods.
11425         (init_ravenscar_thread_ops): Delete.
11426         (_initialize_ravenscar): Remove references to
11427         init_ravenscar_thread_ops and complete_target_initialization.
11428
11429         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
11430         (bsd_uthread_target): New class.
11431         (bsd_uthread_ops): Now a bsd_uthread_target.
11432         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
11433         (bsd_uthread_close, bsd_uthread_mourn_inferior)
11434         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
11435         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
11436         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
11437         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
11438         (bsd_uthread_target): Delete function.
11439         (_initialize_bsd_uthread): Remove reference to
11440         complete_target_initialization.
11441
11442         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
11443         (target_bfd): ... this new class.
11444         (target_bfd_xfer_partial, target_bfd_get_section_table)
11445         (target_bfd_close): Refactor as target_bfd methods.
11446         (target_bfd::~target_bfd): New.
11447         (target_bfd_reopen): Adjust.
11448         (target_bfd::close): New.
11449
11450         * record-btrace.c (record_btrace_target): New class.
11451         (record_btrace_ops): Now a record_btrace_target.
11452         (record_btrace_open, record_btrace_stop_recording)
11453         (record_btrace_disconnect, record_btrace_close)
11454         (record_btrace_async, record_btrace_info)
11455         (record_btrace_insn_history, record_btrace_insn_history_range)
11456         (record_btrace_insn_history_from, record_btrace_call_history)
11457         (record_btrace_call_history_range)
11458         (record_btrace_call_history_from, record_btrace_record_method)
11459         (record_btrace_is_replaying, record_btrace_will_replay)
11460         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
11461         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
11462         (record_btrace_store_registers, record_btrace_prepare_to_store)
11463         (record_btrace_to_get_unwinder)
11464         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
11465         (record_btrace_commit_resume, record_btrace_wait)
11466         (record_btrace_stop, record_btrace_can_execute_reverse)
11467         (record_btrace_stopped_by_sw_breakpoint)
11468         (record_btrace_supports_stopped_by_sw_breakpoint)
11469         (record_btrace_stopped_by_hw_breakpoint)
11470         (record_btrace_supports_stopped_by_hw_breakpoint)
11471         (record_btrace_update_thread_list, record_btrace_thread_alive)
11472         (record_btrace_goto_begin, record_btrace_goto_end)
11473         (record_btrace_goto, record_btrace_stop_replaying_all)
11474         (record_btrace_execution_direction)
11475         (record_btrace_prepare_to_generate_core)
11476         (record_btrace_done_generating_core): Refactor as
11477         record_btrace_target methods.
11478         (init_record_btrace_ops): Delete.
11479         (_initialize_record_btrace): Remove reference to
11480         init_record_btrace_ops.
11481         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
11482         the execution_direction global.
11483         (record_full_base_target, record_full_target)
11484         (record_full_core_target): New classes.
11485         (record_full_ops): Now a record_full_target.
11486         (record_full_core_ops): Now a record_full_core_target.
11487         (record_full_target::detach, record_full_target::disconnect)
11488         (record_full_core_target::disconnect)
11489         (record_full_target::mourn_inferior, record_full_target::kill):
11490         New.
11491         (record_full_open, record_full_close, record_full_async): Refactor
11492         as methods of the record_full_base_target class.
11493         (record_full_resume, record_full_commit_resume): Refactor
11494         as methods of the record_full_target class.
11495         (record_full_wait, record_full_stopped_by_watchpoint)
11496         (record_full_stopped_data_address)
11497         (record_full_stopped_by_sw_breakpoint)
11498         (record_full_supports_stopped_by_sw_breakpoint)
11499         (record_full_stopped_by_hw_breakpoint)
11500         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
11501         methods of the record_full_base_target class.
11502         (record_full_store_registers, record_full_xfer_partial)
11503         (record_full_insert_breakpoint, record_full_remove_breakpoint):
11504         Refactor as methods of the record_full_target class.
11505         (record_full_can_execute_reverse, record_full_get_bookmark)
11506         (record_full_goto_bookmark, record_full_execution_direction)
11507         (record_full_record_method, record_full_info, record_full_delete)
11508         (record_full_is_replaying, record_full_will_replay)
11509         (record_full_goto_begin, record_full_goto_end, record_full_goto)
11510         (record_full_stop_replaying): Refactor as methods of the
11511         record_full_base_target class.
11512         (record_full_core_resume, record_full_core_kill)
11513         (record_full_core_fetch_registers)
11514         (record_full_core_prepare_to_store)
11515         (record_full_core_store_registers, record_full_core_xfer_partial)
11516         (record_full_core_insert_breakpoint)
11517         (record_full_core_remove_breakpoint)
11518         (record_full_core_has_execution): Refactor
11519         as methods of the record_full_core_target class.
11520         (record_full_base_target::supports_delete_record): New.
11521         (init_record_full_ops): Delete.
11522         (init_record_full_core_ops): Delete.
11523         (record_full_save): Refactor as method of the
11524         record_full_base_target class.
11525         (_initialize_record_full): Remove references to
11526         init_record_full_ops and init_record_full_core_ops.
11527
11528         * remote.c (remote_target, extended_remote_target): New classes.
11529         (remote_ops): Now a remote_target.
11530         (extended_remote_ops): Now an extended_remote_target.
11531         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
11532         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
11533         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
11534         (remote_pass_signals, remote_set_syscall_catchpoint)
11535         (remote_program_signals, )
11536         (remote_thread_always_alive): Remove target_ops parameter.
11537         (remote_thread_alive, remote_thread_name)
11538         (remote_update_thread_list, remote_threads_extra_info)
11539         (remote_static_tracepoint_marker_at)
11540         (remote_static_tracepoint_markers_by_strid)
11541         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
11542         (remote_open): Refactor as methods of remote_target.
11543         (extended_remote_open, extended_remote_detach)
11544         (extended_remote_attach, extended_remote_post_attach):
11545         (extended_remote_supports_disable_randomization)
11546         (extended_remote_create_inferior): : Refactor as method of
11547         extended_remote_target.
11548         (remote_set_permissions, remote_open_1, remote_detach)
11549         (remote_follow_fork, remote_follow_exec, remote_disconnect)
11550         (remote_resume, remote_commit_resume, remote_stop)
11551         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
11552         (remote_terminal_ours, remote_wait, remote_fetch_registers)
11553         (remote_prepare_to_store, remote_store_registers)
11554         (remote_flash_erase, remote_flash_done, remote_files_info)
11555         (remote_kill, remote_mourn, remote_insert_breakpoint)
11556         (remote_remove_breakpoint, remote_insert_watchpoint)
11557         (remote_watchpoint_addr_within_range)
11558         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
11559         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
11560         (remote_supports_stopped_by_sw_breakpoint)
11561         (remote_stopped_by_hw_breakpoint)
11562         (remote_supports_stopped_by_hw_breakpoint)
11563         (remote_stopped_by_watchpoint, remote_stopped_data_address)
11564         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
11565         (remote_verify_memory): Refactor as methods of remote_target.
11566         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
11567         parameter.
11568         (remote_xfer_partial, remote_get_memory_xfer_limit)
11569         (remote_search_memory, remote_rcmd, remote_memory_map)
11570         (remote_pid_to_str, remote_get_thread_local_address)
11571         (remote_get_tib_address, remote_read_description): Refactor as
11572         methods of remote_target.
11573         (remote_target::fileio_open, remote_target::fileio_pwrite)
11574         (remote_target::fileio_pread, remote_target::fileio_close): New.
11575         (remote_hostio_readlink, remote_hostio_fstat)
11576         (remote_filesystem_is_local, remote_can_execute_reverse)
11577         (remote_supports_non_stop, remote_supports_disable_randomization)
11578         (remote_supports_multi_process, remote_supports_cond_breakpoints)
11579         (remote_supports_enable_disable_tracepoint)
11580         (remote_supports_string_tracing)
11581         (remote_can_run_breakpoint_commands, remote_trace_init)
11582         (remote_download_tracepoint, remote_can_download_tracepoint)
11583         (remote_download_trace_state_variable, remote_enable_tracepoint)
11584         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
11585         (remote_trace_start, remote_get_trace_status)
11586         (remote_get_tracepoint_status, remote_trace_stop)
11587         (remote_trace_find, remote_get_trace_state_variable_value)
11588         (remote_save_trace_data, remote_get_raw_trace_data)
11589         (remote_set_disconnected_tracing, remote_core_of_thread)
11590         (remote_set_circular_trace_buffer, remote_traceframe_info)
11591         (remote_get_min_fast_tracepoint_insn_len)
11592         (remote_set_trace_buffer_size, remote_set_trace_notes)
11593         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
11594         (remote_disable_btrace, remote_teardown_btrace)
11595         (remote_read_btrace, remote_btrace_conf)
11596         (remote_augmented_libraries_svr4_read, remote_load)
11597         (remote_pid_to_exec_file, remote_can_do_single_step)
11598         (remote_execution_direction, remote_thread_handle_to_thread_info):
11599         Refactor as methods of remote_target.
11600         (init_remote_ops, init_extended_remote_ops): Delete.
11601         (remote_can_async_p, remote_is_async_p, remote_async)
11602         (remote_thread_events, remote_upload_tracepoints)
11603         (remote_upload_trace_state_variables): Refactor as methods of
11604         remote_target.
11605         (_initialize_remote): Remove references to init_remote_ops and
11606         init_extended_remote_ops.
11607
11608         * remote-sim.c (gdbsim_target): New class.
11609         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
11610         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
11611         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
11612         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
11613         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
11614         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
11615         Refactor as methods of gdbsim_target.
11616         (gdbsim_ops): Now a gdbsim_target.
11617         (init_gdbsim_ops): Delete.
11618         (gdbsim_cntrl_c): Adjust.
11619         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
11620
11621         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
11622         (the_amd64_linux_nat_target): New.
11623         (amd64_linux_fetch_inferior_registers)
11624         (amd64_linux_store_inferior_registers): Refactor as methods of
11625         amd64_linux_nat_target.
11626         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
11627         * i386-linux-nat.c: Don't include "linux-nat.h".
11628         (i386_linux_nat_target): New class.
11629         (the_i386_linux_nat_target): New.
11630         (i386_linux_fetch_inferior_registers)
11631         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
11632         as methods of i386_linux_nat_target.
11633         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
11634         * inf-child.c (inf_child_ops): Delete.
11635         (inf_child_fetch_inferior_registers)
11636         (inf_child_store_inferior_registers): Delete.
11637         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
11638         methods of inf_child_target.
11639         (inf_child_target::supports_terminal_ours)
11640         (inf_child_target::terminal_init)
11641         (inf_child_target::terminal_inferior)
11642         (inf_child_target::terminal_ours_for_output)
11643         (inf_child_target::terminal_ours, inf_child_target::interrupt)
11644         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
11645         New.
11646         (inf_child_open, inf_child_disconnect, inf_child_close)
11647         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
11648         (inf_child_post_startup_inferior, inf_child_can_run)
11649         (inf_child_pid_to_exec_file): Refactor as methods of
11650         inf_child_target.
11651         (inf_child_follow_fork): Delete.
11652         (inf_child_target::can_create_inferior)
11653         (inf_child_target::can_attach): New.
11654         (inf_child_target::has_all_memory, inf_child_target::has_memory)
11655         (inf_child_target::has_stack, inf_child_target::has_registers)
11656         (inf_child_target::has_execution): New.
11657         (inf_child_fileio_open, inf_child_fileio_pwrite)
11658         (inf_child_fileio_pread, inf_child_fileio_fstat)
11659         (inf_child_fileio_close, inf_child_fileio_unlink)
11660         (inf_child_fileio_readlink, inf_child_use_agent)
11661         (inf_child_can_use_agent): Refactor as methods of
11662         inf_child_target.
11663         (return_zero, inf_child_target): Delete.
11664         (inf_child_target::inf_child_target): New.
11665         * inf-child.h: Include "target.h".
11666         (inf_child_target): Delete function prototype.
11667         (inf_child_target): New class.
11668         (inf_child_open_target, inf_child_mourn_inferior)
11669         (inf_child_maybe_unpush_target): Delete.
11670         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
11671         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
11672         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
11673         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
11674         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
11675         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
11676         (inf_ptrace_wait, inf_ptrace_xfer_partial)
11677         (inf_ptrace_thread_alive, inf_ptrace_files_info)
11678         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
11679         methods of inf_ptrace_target.
11680         (inf_ptrace_target): Delete function.
11681         * inf-ptrace.h: Include "inf-child.h".
11682         (inf_ptrace_target): Delete function declaration.
11683         (inf_ptrace_target): New class.
11684         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
11685         * linux-nat.c (linux_target): New.
11686         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
11687         (linux_nat_target::~linux_nat_target): New.
11688         (linux_child_post_attach, linux_child_post_startup_inferior)
11689         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
11690         (linux_child_remove_fork_catchpoint)
11691         (linux_child_insert_vfork_catchpoint)
11692         (linux_child_remove_vfork_catchpoint)
11693         (linux_child_insert_exec_catchpoint)
11694         (linux_child_remove_exec_catchpoint)
11695         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
11696         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
11697         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
11698         (linux_nat_stopped_data_address)
11699         (linux_nat_stopped_by_sw_breakpoint)
11700         (linux_nat_supports_stopped_by_sw_breakpoint)
11701         (linux_nat_stopped_by_hw_breakpoint)
11702         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
11703         (linux_nat_kill, linux_nat_mourn_inferior)
11704         (linux_nat_xfer_partial, linux_nat_thread_alive)
11705         (linux_nat_update_thread_list, linux_nat_pid_to_str)
11706         (linux_nat_thread_name, linux_child_pid_to_exec_file)
11707         (linux_child_static_tracepoint_markers_by_strid)
11708         (linux_nat_is_async_p, linux_nat_can_async_p)
11709         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
11710         (linux_nat_supports_multi_process)
11711         (linux_nat_supports_disable_randomization, linux_nat_async)
11712         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
11713         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
11714         (linux_nat_fileio_open, linux_nat_fileio_readlink)
11715         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
11716         methods of linux_nat_target.
11717         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
11718         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
11719         parameter.
11720         (check_stopped_by_watchpoint): Adjust.
11721         (linux_xfer_partial): Delete.
11722         (linux_target_install_ops, linux_target, linux_nat_add_target):
11723         Delete.
11724         (linux_nat_target::linux_nat_target): New.
11725         * linux-nat.h: Include "inf-ptrace.h".
11726         (linux_nat_target): New.
11727         (linux_target, linux_target_install_ops, linux_nat_add_target):
11728         Delete function declarations.
11729         (linux_target): Declare global.
11730         * linux-thread-db.c (thread_db_target): New.
11731         (thread_db_target::thread_db_target): New.
11732         (thread_db_ops): Delete.
11733         (the_thread_db_target): New.
11734         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
11735         (thread_db_update_thread_list, thread_db_pid_to_str)
11736         (thread_db_extra_thread_info)
11737         (thread_db_thread_handle_to_thread_info)
11738         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
11739         (thread_db_resume): Refactor as methods of thread_db_target.
11740         (init_thread_db_ops): Delete.
11741         (_initialize_thread_db): Remove reference to init_thread_db_ops.
11742         * x86-linux-nat.c: Don't include "linux-nat.h".
11743         (super_post_startup_inferior): Delete.
11744         (x86_linux_nat_target::~x86_linux_nat_target): New.
11745         (x86_linux_child_post_startup_inferior)
11746         (x86_linux_read_description, x86_linux_enable_btrace)
11747         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
11748         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
11749         methods of x86_linux_nat_target.
11750         (x86_linux_create_target): Delete.  Bits folded ...
11751         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
11752         pointer.
11753         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
11754         (x86_linux_nat_target): New class.
11755         (x86_linux_create_target): Delete.
11756         (x86_linux_add_target): Now takes a linux_nat_target pointer.
11757         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
11758         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
11759         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
11760         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
11761         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
11762         make extern.
11763         (x86_use_watchpoints): Delete.
11764         * x86-nat.h: Include "breakpoint.h" and "target.h".
11765         (x86_use_watchpoints): Delete.
11766         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
11767         (x86_stopped_by_watchpoint, x86_stopped_data_address)
11768         (x86_insert_watchpoint, x86_remove_watchpoint)
11769         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
11770         (x86_stopped_by_hw_breakpoint): New declarations.
11771         (x86_nat_target): New template class.
11772
11773         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
11774         (the_ppc_linux_nat_target): New.
11775         (ppc_linux_fetch_inferior_registers)
11776         (ppc_linux_can_use_hw_breakpoint)
11777         (ppc_linux_region_ok_for_hw_watchpoint)
11778         (ppc_linux_ranged_break_num_registers)
11779         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
11780         (ppc_linux_insert_mask_watchpoint)
11781         (ppc_linux_remove_mask_watchpoint)
11782         (ppc_linux_can_accel_watchpoint_condition)
11783         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
11784         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
11785         (ppc_linux_watchpoint_addr_within_range)
11786         (ppc_linux_masked_watch_num_registers)
11787         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
11788         (ppc_linux_read_description): Refactor as methods of
11789         ppc_linux_nat_target.
11790         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
11791
11792         * procfs.c (procfs_xfer_partial): Delete forward declaration.
11793         (procfs_target): New class.
11794         (the_procfs_target): New.
11795         (procfs_target): Delete function.
11796         (procfs_auxv_parse, procfs_attach, procfs_detach)
11797         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
11798         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
11799         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
11800         (procfs_create_inferior, procfs_update_thread_list)
11801         (procfs_thread_alive, procfs_pid_to_str)
11802         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
11803         (procfs_stopped_data_address, procfs_insert_watchpoint)
11804         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
11805         (proc_find_memory_regions, procfs_info_proc)
11806         (procfs_make_note_section): Refactor as methods of procfs_target.
11807         (_initialize_procfs): Adjust.
11808         * sol-thread.c (sol_thread_target): New class.
11809         (sol_thread_ops): Now a sol_thread_target.
11810         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11811         (sol_thread_fetch_registers, sol_thread_store_registers)
11812         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
11813         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
11814         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
11815         (init_sol_thread_ops): Delete.
11816         (_initialize_sol_thread): Adjust.  Remove references to
11817         init_sol_thread_ops and complete_target_initialization.
11818
11819         * windows-nat.c (windows_nat_target): New class.
11820         (windows_fetch_inferior_registers)
11821         (windows_store_inferior_registers, windows_resume, windows_wait)
11822         (windows_attach, windows_detach, windows_pid_to_exec_file)
11823         (windows_files_info, windows_create_inferior)
11824         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
11825         (windows_close, windows_pid_to_str, windows_xfer_partial)
11826         (windows_get_tib_address, windows_get_ada_task_ptid)
11827         (windows_thread_name, windows_thread_alive): Refactor as
11828         windows_nat_target methods.
11829         (do_initial_windows_stuff): Adjust.
11830         (windows_target): Delete function.
11831         (_initialize_windows_nat): Adjust.
11832
11833         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
11834         (darwin_mourn_inferior, darwin_kill_inferior)
11835         (darwin_create_inferior, darwin_attach, darwin_detach)
11836         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
11837         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
11838         (darwin_supports_multi_process): Refactor as darwin_nat_target
11839         methods.
11840         (darwin_resume_to, darwin_files_info): Delete.
11841         (_initialize_darwin_inferior): Rename to ...
11842         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
11843         * darwin-nat.h: Include "inf-child.h".
11844         (darwin_nat_target): New class.
11845         (darwin_complete_target): Delete.
11846         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
11847         (darwin_target): New.
11848         (i386_darwin_fetch_inferior_registers)
11849         (i386_darwin_store_inferior_registers): Refactor as methods of
11850         darwin_nat_target.
11851         (darwin_complete_target): Delete, with ...
11852         (_initialize_i386_darwin_nat): ... bits factored out here.
11853
11854         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
11855         (the_alpha_linux_nat_target): New.
11856         (alpha_linux_register_u_offset): Refactor as
11857         alpha_linux_nat_target method.
11858         (_initialize_alpha_linux_nat): Adjust.
11859         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
11860         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
11861         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
11862         methods of linux_nat_trad_target.
11863         (linux_trad_target): Delete.
11864         * linux-nat-trad.h (linux_trad_target): Delete function.
11865         (linux_nat_trad_target): New class.
11866         * mips-linux-nat.c (mips_linux_nat_target): New class.
11867         (super_fetch_registers, super_store_registers, super_close):
11868         Delete.
11869         (the_mips_linux_nat_target): New.
11870         (mips64_linux_regsets_fetch_registers)
11871         (mips64_linux_regsets_store_registers)
11872         (mips64_linux_fetch_registers, mips64_linux_store_registers)
11873         (mips_linux_register_u_offset, mips_linux_read_description)
11874         (mips_linux_can_use_hw_breakpoint)
11875         (mips_linux_stopped_by_watchpoint)
11876         (mips_linux_stopped_data_address)
11877         (mips_linux_region_ok_for_hw_watchpoint)
11878         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
11879         (mips_linux_close): Refactor as methods of mips_linux_nat.
11880         (_initialize_mips_linux_nat): Adjust to C++ification.
11881
11882         * aix-thread.c (aix_thread_target): New class.
11883         (aix_thread_ops): Now an aix_thread_target.
11884         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11885         (aix_thread_fetch_registers, aix_thread_store_registers)
11886         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11887         (aix_thread_thread_alive, aix_thread_pid_to_str)
11888         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
11889         Refactor as methods of aix_thread_target.
11890         (init_aix_thread_ops): Delete.
11891         (_initialize_aix_thread): Remove references to init_aix_thread_ops
11892         and complete_target_initialization.
11893         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
11894         (rs6000_nat_target): New class.
11895         (the_rs6000_nat_target): New.
11896         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
11897         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
11898         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
11899         (super_create_inferior): Delete.
11900         (_initialize_rs6000_nat): Adjust to C++ification.
11901
11902         * arm-linux-nat.c (arm_linux_nat_target): New class.
11903         (the_arm_linux_nat_target): New.
11904         (arm_linux_fetch_inferior_registers)
11905         (arm_linux_store_inferior_registers, arm_linux_read_description)
11906         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
11907         (arm_linux_remove_hw_breakpoint)
11908         (arm_linux_region_ok_for_hw_watchpoint)
11909         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
11910         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
11911         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
11912         arm_linux_nat_target.
11913         (_initialize_arm_linux_nat): Adjust to C++ification.
11914
11915         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
11916         (the_aarch64_linux_nat_target): New.
11917         (aarch64_linux_fetch_inferior_registers)
11918         (aarch64_linux_store_inferior_registers)
11919         (aarch64_linux_child_post_startup_inferior)
11920         (aarch64_linux_read_description)
11921         (aarch64_linux_can_use_hw_breakpoint)
11922         (aarch64_linux_insert_hw_breakpoint)
11923         (aarch64_linux_remove_hw_breakpoint)
11924         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
11925         (aarch64_linux_region_ok_for_hw_watchpoint)
11926         (aarch64_linux_stopped_data_address)
11927         (aarch64_linux_stopped_by_watchpoint)
11928         (aarch64_linux_watchpoint_addr_within_range)
11929         (aarch64_linux_can_do_single_step): Refactor as methods of
11930         aarch64_linux_nat_target.
11931         (super_post_startup_inferior): Delete.
11932         (_initialize_aarch64_linux_nat): Adjust to C++ification.
11933
11934         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
11935         (the_hppa_linux_nat_target): New.
11936         (hppa_linux_fetch_inferior_registers)
11937         (hppa_linux_store_inferior_registers): Refactor as methods of
11938         hppa_linux_nat_target.
11939         (_initialize_hppa_linux_nat): Adjust to C++ification.
11940
11941         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
11942         (the_ia64_linux_nat_target): New.
11943         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
11944         (ia64_linux_stopped_data_address)
11945         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
11946         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
11947         ia64_linux_nat_target methods.
11948         (super_xfer_partial): Delete.
11949         (_initialize_ia64_linux_nat): Adjust to C++ification.
11950
11951         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
11952         (the_m32r_linux_nat_target): New.
11953         (m32r_linux_fetch_inferior_registers)
11954         (m32r_linux_store_inferior_registers): Refactor as
11955         m32r_linux_nat_target methods.
11956         (_initialize_m32r_linux_nat): Adjust to C++ification.
11957
11958         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
11959         (the_m68k_linux_nat_target): New.
11960         (m68k_linux_fetch_inferior_registers)
11961         (m68k_linux_store_inferior_registers): Refactor as
11962         m68k_linux_nat_target methods.
11963         (_initialize_m68k_linux_nat): Adjust to C++ification.
11964
11965         * s390-linux-nat.c (s390_linux_nat_target): New class.
11966         (the_s390_linux_nat_target): New.
11967         (s390_linux_fetch_inferior_registers)
11968         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
11969         (s390_insert_watchpoint, s390_remove_watchpoint)
11970         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
11971         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
11972         (s390_auxv_parse, s390_read_description): Refactor as methods of
11973         s390_linux_nat_target.
11974         (_initialize_s390_nat): Adjust to C++ification.
11975
11976         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
11977         (the_sparc_linux_nat_target): New.
11978         (_initialize_sparc_linux_nat): Adjust to C++ification.
11979         * sparc-nat.c (sparc_fetch_inferior_registers)
11980         (sparc_store_inferior_registers): Remove target_ops parameter.
11981         * sparc-nat.h (sparc_fetch_inferior_registers)
11982         (sparc_store_inferior_registers): Remove target_ops parameter.
11983         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
11984         (the_sparc64_linux_nat_target): New.
11985         (_initialize_sparc64_linux_nat): Adjust to C++ification.
11986
11987         * spu-linux-nat.c (spu_linux_nat_target): New class.
11988         (the_spu_linux_nat_target): New.
11989         (spu_child_post_startup_inferior, spu_child_post_attach)
11990         (spu_child_wait, spu_fetch_inferior_registers)
11991         (spu_store_inferior_registers, spu_xfer_partial)
11992         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
11993         methods.
11994         (_initialize_spu_nat): Adjust to C++ification.
11995
11996         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
11997         (the_tilegx_linux_nat_target): New.
11998         (fetch_inferior_registers, store_inferior_registers):
11999         Refactor as methods.
12000         (_initialize_tile_linux_nat): Adjust to C++ification.
12001
12002         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
12003         (the_xtensa_linux_nat_target): New.
12004         (xtensa_linux_fetch_inferior_registers)
12005         (xtensa_linux_store_inferior_registers): Refactor as
12006         xtensa_linux_nat_target methods.
12007         (_initialize_xtensa_linux_nat): Adjust to C++ification.
12008
12009         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
12010         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
12011         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
12012         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
12013         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
12014         (fbsd_stopped_by_sw_breakpoint)
12015         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
12016         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
12017         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
12018         (fbsd_post_startup_inferior, fbsd_post_attach)
12019         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
12020         (fbsd_set_syscall_catchpoint)
12021         (super_xfer_partial, super_resume, super_wait)
12022         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
12023         (fbsd_handle_debug_trap): Remove target_ops parameter.
12024         (fbsd_nat_add_target): Delete.
12025         * fbsd-nat.h: Include "inf-ptrace.h".
12026         (fbsd_nat_add_target): Delete.
12027         (USE_SIGTRAP_SIGINFO): Define.
12028         (fbsd_nat_target): New class.
12029
12030         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
12031         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
12032         (amd64bsd_target): Delete.
12033         * amd64-bsd-nat.h: New file.
12034         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
12035         "x86-bsd-nat.h".
12036         (amd64_fbsd_nat_target): New class.
12037         (the_amd64_fbsd_nat_target): New.
12038         (amd64fbsd_read_description): Refactor as method of
12039         amd64_fbsd_nat_target.
12040         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
12041         (_initialize_amd64fbsd_nat): Adjust to C++ification.
12042         * amd64-nat.h (amd64bsd_target): Delete function declaration.
12043         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
12044         (i386bsd_store_inferior_registers): Remove target_ops parameter.
12045         (i386bsd_target): Delete.
12046         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
12047         (i386bsd_fetch_inferior_registers)
12048         (i386bsd_store_inferior_registers): Declare.
12049         (i386_bsd_nat_target): New class.
12050         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
12051         (the_i386_fbsd_nat_target): New.
12052         (i386fbsd_resume, i386fbsd_read_description): Refactor as
12053         i386_fbsd_nat_target methods.
12054         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
12055         (_initialize_i386fbsd_nat): Adjust to C++ification.
12056         * x86-bsd-nat.c (super_mourn_inferior): Delete.
12057         (x86bsd_mourn_inferior, x86bsd_target): Delete.
12058         (_initialize_x86_bsd_nat): Adjust to C++ification.
12059         * x86-bsd-nat.h: Include "x86-nat.h".
12060         (x86bsd_target): Delete declaration.
12061         (x86bsd_nat_target): New class.
12062
12063         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
12064         (the_aarch64_fbsd_nat_target): New.
12065         (aarch64_fbsd_fetch_inferior_registers)
12066         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
12067         aarch64_fbsd_nat_target.
12068         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
12069         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
12070         (the_alpha_bsd_nat_target): New.
12071         (alphabsd_fetch_inferior_registers)
12072         (alphabsd_store_inferior_registers): Refactor as
12073         alpha_bsd_nat_target methods.
12074         (_initialize_alphabsd_nat): Refactor as methods of
12075         alpha_bsd_nat_target.
12076         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
12077         (the_amd64_nbsd_nat_target): New.
12078         (_initialize_amd64nbsd_nat): Adjust to C++ification.
12079         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
12080         (the_amd64_obsd_nat_target): New.
12081         (_initialize_amd64obsd_nat): Adjust to C++ification.
12082         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
12083         (the_arm_fbsd_nat_target): New.
12084         (arm_fbsd_fetch_inferior_registers)
12085         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
12086         (_initialize_arm_fbsd_nat): Refactor as methods of
12087         arm_fbsd_nat_target.
12088         (_initialize_arm_fbsd_nat): Adjust to C++ification.
12089         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
12090         (the_arm_netbsd_nat_target): New.
12091         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
12092         arm_netbsd_nat_target.
12093         (_initialize_arm_netbsd_nat): Adjust to C++ification.
12094         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
12095         (the_hppa_nbsd_nat_target): New.
12096         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
12097         hppa_nbsd_nat_target methods.
12098         (_initialize_hppanbsd_nat): Adjust to C++ification.
12099         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
12100         (the_hppa_obsd_nat_target): New.
12101         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
12102         methods of hppa_obsd_nat_target.
12103         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
12104         add_target.
12105         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
12106         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
12107         add_target.
12108         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
12109         (_initialize_i386obsd_nat): Use add_target.
12110         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
12111         (the_m68k_bsd_nat_target): New.
12112         (m68kbsd_fetch_inferior_registers)
12113         (m68kbsd_store_inferior_registers): Refactor as methods of
12114         m68k_bsd_nat_target.
12115         (_initialize_m68kbsd_nat): Adjust to C++ification.
12116         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
12117         (the_mips_fbsd_nat_target): New.
12118         (mips_fbsd_fetch_inferior_registers)
12119         (mips_fbsd_store_inferior_registers): Refactor as methods of
12120         mips_fbsd_nat_target.
12121         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
12122         add_target.
12123         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
12124         (the_mips_nbsd_nat_target): New.
12125         (mipsnbsd_fetch_inferior_registers)
12126         (mipsnbsd_store_inferior_registers): Refactor as methods of
12127         mips_nbsd_nat_target.
12128         (_initialize_mipsnbsd_nat): Adjust to C++ification.
12129         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
12130         (the_mips64_obsd_nat_target): New.
12131         (mips64obsd_fetch_inferior_registers)
12132         (mips64obsd_store_inferior_registers): Refactor as methods of
12133         mips64_obsd_nat_target.
12134         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
12135         add_target.
12136         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
12137         nbsd_nat_target.
12138         * nbsd-nat.h: Include "inf-ptrace.h".
12139         (nbsd_nat_target): New class.
12140         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
12141         (obsd_wait): Refactor as methods of obsd_nat_target.
12142         (obsd_add_target): Delete.
12143         * obsd-nat.h: Include "inf-ptrace.h".
12144         (obsd_nat_target): New class.
12145         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
12146         (the_ppc_fbsd_nat_target): New.
12147         (ppcfbsd_fetch_inferior_registers)
12148         (ppcfbsd_store_inferior_registers): Refactor as methods of
12149         ppc_fbsd_nat_target.
12150         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
12151         add_target.
12152         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
12153         (the_ppc_nbsd_nat_target): New.
12154         (ppcnbsd_fetch_inferior_registers)
12155         (ppcnbsd_store_inferior_registers): Refactor as methods of
12156         ppc_nbsd_nat_target.
12157         (_initialize_ppcnbsd_nat): Adjust to C++ification.
12158         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
12159         (the_ppc_obsd_nat_target): New.
12160         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
12161         methods of ppc_obsd_nat_target.
12162         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
12163         add_target.
12164         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
12165         (the_sh_nbsd_nat_target): New.
12166         (shnbsd_fetch_inferior_registers)
12167         (shnbsd_store_inferior_registers): Refactor as methods of
12168         sh_nbsd_nat_target.
12169         (_initialize_shnbsd_nat): Adjust to C++ification.
12170         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
12171         (inf_ptrace_xfer_partial): Delete.
12172         (sparc_xfer_partial, sparc_target): Delete.
12173         * sparc-nat.h (sparc_fetch_inferior_registers)
12174         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
12175         (sparc_target): Delete function declaration.
12176         (sparc_target): New template class.
12177         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
12178         (_initialize_sparcnbsd_nat): Adjust to C++ification.
12179         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
12180         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
12181         add_target.
12182         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
12183         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
12184         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
12185         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
12186         add_target.
12187         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
12188         (the_vax_bsd_nat_target): New.
12189         (vaxbsd_fetch_inferior_registers)
12190         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
12191         methods.
12192         (_initialize_vaxbsd_nat): Adjust to C++ification.
12193
12194         * bsd-kvm.c (bsd_kvm_target): New class.
12195         (bsd_kvm_ops): Now a bsd_kvm_target.
12196         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
12197         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
12198         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
12199         bsd_kvm_target.
12200         (bsd_kvm_return_one): Delete.
12201         (bsd_kvm_add_target): Adjust to C++ification.
12202
12203         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
12204         (nto_procfs_target_procfs): New classes.
12205         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
12206         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
12207         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
12208         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
12209         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
12210         (procfs_remove_hw_breakpoint, procfs_resume)
12211         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
12212         (procfs_kill_inferior, procfs_store_registers)
12213         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
12214         as methods of nto_procfs_target.
12215         (nto_procfs_ops): Now an nto_procfs_target_procfs.
12216         (nto_native_ops): Delete.
12217         (procfs_open, procfs_native_open): Delete.
12218         (nto_native_ops): Now an nto_procfs_target_native.
12219         (init_procfs_targets): Adjust to C++ification.
12220         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
12221         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
12222         Refactor as methods of nto_procfs_target.
12223
12224         * go32-nat.c (go32_nat_target): New class.
12225         (the_go32_nat_target): New.
12226         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
12227         (go32_store_registers, go32_xfer_partial, go32_files_info)
12228         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
12229         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
12230         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
12231         (go32_pid_to_str): Refactor as methods of go32_nat_target.
12232         (go32_target): Delete.
12233         (_initialize_go32_nat): Adjust to C++ification.
12234
12235         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
12236         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
12237         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
12238         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
12239         gnu_nat_target.
12240         (gnu_target): Delete.
12241         * gnu-nat.h (gnu_target): Delete.
12242         (gnu_nat_target): New class.
12243         * i386-gnu-nat.c (gnu_base_target): New.
12244         (i386_gnu_nat_target): New class.
12245         (the_i386_gnu_nat_target): New.
12246         (_initialize_i386gnu_nat): Adjust to C++ification.
12247
12248 2018-05-02  Pedro Alves  <palves@redhat.com>
12249
12250         * bfd-target.c (target_bfd_xclose): Rename to ...
12251         (target_bfd_close): ... this.
12252         (target_bfd_reopen): Adjust.
12253         * target.c (target_close): Remove references to to_xclose.
12254         * target.h (target_ops::to_xclose): Delete.
12255         (target_ops::to_close): Update comments.
12256
12257 2018-05-02  Pedro Alves  <palves@redhat.com>
12258
12259         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
12260         "linux-nat.h".
12261         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
12262         * inf-ptrace.c (inf_ptrace_register_u_offset)
12263         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
12264         (inf_ptrace_store_register, inf_ptrace_store_registers)
12265         (inf_ptrace_trad_target): Move to ...
12266         * linux-nat-trad.c: ... this new file.
12267         * linux-nat-trad.h: New file.
12268         * linux-nat.c (linux_target_install_ops): Make extern.
12269         (linux_trad_target): Delete.
12270         * linux-nat.h (linux_trad_target): Delete declaration.
12271         (linux_target_install_ops): Declare.
12272         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
12273         "linux-nat.h".
12274
12275 2018-05-02  Pedro Alves  <palves@redhat.com>
12276
12277         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12278         procfs_target/add_target here.
12279         * procfs.c (procfs_target): Make static.
12280         (_initialize_procfs): Call add_target here.
12281         * procfs.h (struct target_ops): Remove forward declaration.
12282         (procfs_target): Remove declaration.
12283         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
12284
12285 2018-05-02  Pedro Alves  <palves@redhat.com>
12286
12287         * procfs.c (procfs_stopped_by_watchpoint)
12288         (procfs_insert_watchpoint, procfs_remove_watchpoint)
12289         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
12290         Forward declare.
12291         (procfs_use_watchpoints): Delete, move contents...
12292         (procfs_target): ... here.
12293         * procfs.h (procfs_use_watchpoints): Delete declaration.
12294         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
12295         procfs_use_watchpoints.
12296         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
12297         procfs_use_watchpoints.
12298
12299 2018-05-02  Tom Tromey  <tom@tromey.com>
12300
12301         PR python/20084:
12302         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
12303         and var_zuinteger_unlimited.
12304         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
12305         and PARAM_ZUINTEGER_UNLIMITED.
12306         (set_parameter_value): Handle var_zuinteger and
12307         var_zuinteger_unlimited.
12308         (add_setshow_generic): Likewise.
12309         (parmpy_init): Likewise.
12310
12311 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
12312
12313         PR rust/23124
12314         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
12315         pointer is not null before dereferencing it.
12316
12317 2018-04-30  Tom Tromey  <tom@tromey.com>
12318
12319         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
12320         is_mi_like_p.
12321
12322 2018-04-30  Tom Tromey  <tom@tromey.com>
12323
12324         * breakpoint.c (mention): Remove use of is_mi_like_p.
12325         (print_mention_ranged_breakpoint): Likewise.
12326         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
12327         of is_mi_like_p.
12328
12329 2018-04-30  Tom Tromey  <tom@tromey.com>
12330
12331         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
12332
12333 2018-04-30  Tom Tromey  <tom@tromey.com>
12334
12335         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
12336         (info_spu_event_command): Remove some uses of is_mi_like_p.
12337
12338 2018-04-30  Tom Tromey  <tom@tromey.com>
12339
12340         * python/py-framefilter.c (py_print_single_arg)
12341         (enumerate_locals, py_print_args, py_print_frame): Remove some
12342         uses of is_mi_like_p.
12343
12344 2018-04-30  Tom Tromey  <tom@tromey.com>
12345
12346         * ui-out.c: Update.
12347         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
12348         * ui-out.h (ui_out::is_mi_like_p): Now const.
12349         (ui_out::do_is_mi_like_p): Now const.
12350         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
12351
12352 2018-04-30  Tom Tromey  <tom@tromey.com>
12353
12354         * varobj.c (varobj_set_visualizer): Use new_reference.
12355         * python/python.c (gdbpy_decode_line): Use new_reference.
12356         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
12357         new_reference.
12358
12359 2018-04-30  Tom Tromey  <tom@tromey.com>
12360
12361         * varobj.c (install_new_value): Use new_reference.
12362         * value.h (value_incref): Return void.  Swap intro comment with
12363         value_decref.
12364         * value.c (set_value_parent): Use new_reference.
12365         (value_incref): Return void.  Update intro comment.
12366         (release_value): Use new_reference.
12367         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
12368
12369 2018-04-30  Tom Tromey  <tom@tromey.com>
12370
12371         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
12372         * gdb_bfd.h (new_bfd_ref): Remove.
12373         (gdb_bfd_open): Update comment.
12374         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12375         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
12376         (gdb_bfd_fdopenr): Use new_reference.
12377         * exec.c (exec_file_attach): Use new_reference.
12378
12379 2018-04-30  Tom Tromey  <tom@tromey.com>
12380
12381         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
12382         method.
12383
12384 2018-04-30  Tom Tromey  <tom@tromey.com>
12385
12386         * jit.c (jit_read_code_entry): Use type_align.
12387         * i386-tdep.c (i386_gdbarch_init): Don't call
12388         set_gdbarch_long_long_align_bit.
12389         * gdbarch.sh: Remove long_long_align_bit.
12390         * gdbarch.c, gdbarch.h: Rebuild.
12391         * arc-tdep.c (arc_type_align): New function.
12392         (arc_gdbarch_init): Use arc_type_align.  Don't call
12393         set_gdbarch_long_long_align_bit.
12394
12395 2018-04-30  Tom Tromey  <tom@tromey.com>
12396
12397         * rust-lang.c (rust_type_alignment): Remove.
12398         (rust_composite_type): Use type_align.
12399
12400 2018-04-30  Tom Tromey  <tom@tromey.com>
12401
12402         * NEWS: Mention Type.align.
12403         * python/py-type.c (typy_get_alignof): New function.
12404         (type_object_getset): Add "alignof".
12405
12406 2018-04-30  Tom Tromey  <tom@tromey.com>
12407
12408         PR exp/17095:
12409         * NEWS: Update.
12410         * std-operator.def (UNOP_ALIGNOF): New operator.
12411         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
12412         New.
12413         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
12414         * c-lang.c (c_op_print_tab): Add alignof.
12415         * c-exp.y (ALIGNOF): New token.
12416         (exp): Add "ALIGNOF" production.
12417         (ident_tokens): Add _Alignof and alignof.
12418
12419 2018-04-30  Tom Tromey  <tom@tromey.com>
12420
12421         * i386-tdep.c (i386_type_align): New function.
12422         (i386_gdbarch_init): Update.
12423         * gdbarch.sh (type_align): New method.
12424         * gdbarch.c, gdbarch.h: Rebuild.
12425         * arch-utils.h (default_type_align): Declare.
12426         * arch-utils.c (default_type_align): New function.
12427         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
12428         (struct type) <align_log2>: New field.
12429         <instance_flags>: Now a bitfield.
12430         (TYPE_RAW_ALIGN): New macro.
12431         (type_align, type_raw_align, set_type_align): Declare.
12432         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
12433         functions.
12434         * dwarf2read.c (quirk_rust_enum): Set type alignment.
12435         (get_alignment, maybe_set_alignment): New functions.
12436         (read_structure_type, read_enumeration_type, read_array_type)
12437         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
12438         (read_subrange_type, read_base_type): Set type alignment.
12439
12440 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
12441
12442         * dwarf2read.c (read_index_from_section): Use bool.
12443
12444 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
12445
12446         PR gdb/22950
12447         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
12448         with #ifdef.
12449
12450 2018-04-29  John Reiser  <jreiser@BitWagon.com>
12451
12452         PR build/22873
12453         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
12454         last step, and do it atomically.
12455
12456 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
12457
12458         * compile/compile-c-types.c (convert_int, convert_float):
12459         Update for C FE v1.
12460
12461 2018-04-27  Tom Tromey  <tom@tromey.com>
12462
12463         PR rust/22545:
12464         * rust-lang.c (rust_inclusive_range_type_p): New function.
12465         (rust_range): Handle inclusive ranges.
12466         (rust_compute_range): Likewise.
12467         * rust-exp.y (struct rust_op) <inclusive>: New field.
12468         (DOTDOTEQ): New constant.
12469         (range_expr): Add "..=" productions.
12470         (operator_tokens): Add "..=" token.
12471         (ast_range): Add "inclusive" parameter.
12472         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
12473         ranges.
12474         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
12475         bounds values.
12476         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
12477         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
12478         Update comments.
12479         * expprint.c (print_subexp_standard): Handle new bounds values.
12480         (dump_subexp_body_standard): Likewise.
12481
12482 2018-04-27  Tom Tromey  <tom@tromey.com>
12483
12484         * configure: Rebuild.
12485         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
12486         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
12487         "OVERRIDE".
12488         (class symbol_needs_eval_context): Likewise.
12489         * dwarf2read.c (mock_mapped_index::symbol_name_count)
12490         (mock_mapped_index::symbol_name_at): Use "override".  Remove
12491         "virtual".
12492         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
12493         "override".
12494         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
12495         * aarch64-tdep.c (instruction_reader::read): Use "override".
12496         (instruction_reader_test::read): Likewise.
12497         * arm-tdep.c (instruction_reader::read): Use "override".
12498         (instruction_reader_thumb::read): Likewise.
12499
12500 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
12501
12502         PR remote/9665
12503         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
12504         instead of remote_send.
12505         (remote_send): Remove.
12506
12507 2018-04-26  Pedro Alves  <palves@redhat.com>
12508
12509         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
12510         find_function_start_sal instead of find_pc_line.
12511
12512 2018-04-26  Pedro Alves  <palves@redhat.com>
12513
12514         * breakpoint.c (set_breakpoint_location_function): Handle
12515         mst_data_gnu_ifunc.
12516         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
12517         * elfread.c (elf_symtab_read): Give data symbols with
12518         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
12519         (elf_rel_plt_read): Update comment.
12520         * linespec.c (convert_linespec_to_sals): Handle
12521         mst_data_gnu_ifunc.
12522         (minsym_found): Handle mst_data_gnu_ifunc.
12523         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
12524         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
12525         * parse.c (find_minsym_type_and_address): Handle
12526         mst_data_gnu_ifunc.
12527         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
12528         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
12529         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
12530         comment.
12531         <mst_data_gnu_ifunc>: New enumerator.
12532
12533 2018-04-26  Pedro Alves  <palves@redhat.com>
12534
12535         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
12536         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
12537         'want_trampoline' parameter by a lookup_msym_prefer parameter.
12538         Handle it.
12539         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
12540         (lookup_minimal_symbol_by_pc): Adjust.
12541         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
12542         (lookup_solib_trampoline_symbol_by_pc): Adjust.
12543         * minsyms.h (lookup_msym_prefer): New enum.
12544         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12545         parameter by a lookup_msym_prefer parameter.
12546
12547 2018-04-26  Pedro Alves  <palves@redhat.com>
12548
12549         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
12550         ends in "@plt" instead of looking at the symbol's section.
12551
12552 2018-04-26  Pedro Alves  <palves@redhat.com>
12553
12554         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
12555         all references.
12556         (find_pc_partial_function_gnu_ifunc): Rename to ...
12557         (find_pc_partial_function): ... this, and remove references to
12558         'is_gnu_ifunc_p'.
12559         (find_pc_partial_function): Delete old implementation.
12560         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
12561
12562 2018-04-26  Pedro Alves  <palves@redhat.com>
12563
12564         * linespec.c (struct bound_minimal_symbol_search_key): New.
12565         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
12566         skip first line if we found a GNU ifunc minimal symbol by name.
12567         (compare_msymbols): Change parameters to work with a destructured
12568         lhs minsym.
12569         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
12570         functions.
12571
12572 2018-04-26  Pedro Alves  <palves@redhat.com>
12573
12574         * breakpoint.c (set_breakpoint_location_function): Don't resolve
12575         ifunc targets here.  Instead, if we have an ifunc minsym, use its
12576         address/name.
12577         (add_location_to_breakpoint): Store the minsym and the objfile in
12578         the breakpoint location.
12579         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
12580         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
12581         Record the minsym in the sal.
12582         * symtab.h (symtab_and_line) <msymbol>: New field.
12583
12584 2018-04-26  Pedro Alves  <palves@redhat.com>
12585
12586         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
12587         unless we actually resolved the ifunc.
12588
12589 2018-04-26  Pedro Alves  <palves@redhat.com>
12590
12591         * c-exp.y (variable production): Prefer ifunc minsyms over
12592         regular function symbols.
12593         * symtab.c (find_gnu_ifunc): New function.
12594         * minsyms.h (lookup_msym_prefer): New enum.
12595         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
12596         parameter by a lookup_msym_prefer parameter.
12597         * symtab.h (find_gnu_ifunc): New declaration.
12598
12599 2018-04-26  Pedro Alves  <palves@redhat.com>
12600
12601         * blockframe.c (find_gnu_ifunc_target_type): New function.
12602         (find_function_type): New.
12603         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
12604         return a value with a memory address.
12605         (eval_call): For calls to GNU ifunc functions, try to find the
12606         type of the target function from the type that the resolver
12607         returns.
12608         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
12609         symbols.
12610         * infcall.c (find_function_return_type): Delete.
12611         (find_function_addr): Add 'function_type' parameter.  For calls to
12612         GNU ifunc functions, try to find the type of the target function
12613         from the type that the resolver returns, and return it via
12614         FUNCTION_TYPE.
12615         (call_function_by_hand_dummy): Adjust to use the function type
12616         returned by find_function_addr.
12617         (find_function_addr): Add 'function_type' parameter and move
12618         description here.
12619         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
12620         declarations.
12621
12622 2018-04-26  Pedro Alves  <palves@redhat.com>
12623
12624         * c-exp.y (variable production): Skip finding an alias for ifunc
12625         symbols.
12626
12627 2018-04-26  Pedro Alves  <palves@redhat.com>
12628
12629         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
12630
12631 2018-04-25  Pedro Alves  <palves@redhat.com>
12632
12633         * infcmd.c (kill_command): Print the pid as string, not the whole
12634         thread's ptid.  Add comment.  s/has been killed/killed/ in output
12635         message.
12636         * remote.c (remote_detach_1): Print the pid as string, not the
12637         whole thread's ptid.
12638
12639 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
12640             Sergio Durigan Junior  <sergiodj@redhat.com>
12641             Pedro Alves  <palves@redhat.com>
12642
12643         * infcmd.c (kill_command): Print message when inferior has
12644         been killed.
12645         * inferior.c (print_inferior_events): Remove 'static'.  Set as
12646         '1'.
12647         (add_inferior): Improve message printed when
12648         'print_inferior_events' is on.
12649         (exit_inferior): Remove message printed when
12650         'print_inferior_events' is on.
12651         (detach_inferior): Improve message printed when
12652         'print_inferior_events' is on.
12653         (initialize_inferiors): Use 'add_inferior_silent' to set
12654         'current_inferior_'.
12655         * inferior.h (print_inferior_events): Declare here as
12656         'extern'.
12657         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
12658         '[Detaching...]' messages when 'print_inferior_events' is on.
12659         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
12660         as prefix/suffix for messages.  Remove periods.  Fix erroneous
12661         'Detaching after fork from child...', replace it by '... from
12662         parent...'.
12663         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
12664         prefix/suffix when printing 'Detaching...' messages.  Print
12665         them when 'print_inferior_events' is on.
12666         * remote.c (remote_detach_1): Print message when detaching
12667         from inferior and '!is_fork_parent'.
12668
12669 2018-04-24  Tom Tromey  <tom@tromey.com>
12670
12671         * cli-out.h: Reindent.
12672
12673 2018-04-24  Tom Tromey  <tom@tromey.com>
12674
12675         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
12676         (cli_ui_out::do_field_string): Use fputs_filtered.
12677         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
12678
12679 2018-04-23  Tom Tromey  <tom@tromey.com>
12680
12681         * guile/scm-frame.c (gdbscm_frame_read_var): Use
12682         gdb::unique_xmalloc_ptr.
12683
12684 2018-04-23  Tom Tromey  <tom@tromey.com>
12685
12686         * configure: Rebuild.
12687
12688 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
12689
12690         PR gdb/23095
12691         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
12692         prepare_for_testing.  Set normal_bp to r_debug_state if target
12693         is bsd.
12694
12695 2018-04-21  Pedro Alves  <palves@redhat.com>
12696             Rajendra SY  <rajendra.sy@gmail.com>
12697
12698         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
12699         * remote.c (extended_remote_attach): In all-stop mode, mark the
12700         thread as executing.
12701
12702 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12703
12704         * thread.c (thread_apply_all_command): Fix comment.
12705         (thread_command): Fix comment.
12706
12707 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
12708
12709         * common/tdesc.h (tdesc_create_feature): Remove xml filename
12710         parameter.
12711         * features/aarch64-core.c (create_feature_aarch64_core):
12712         Regenerate.
12713         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
12714         Likewise.
12715         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
12716         Likewise.
12717         * features/i386/32bit-avx512.c
12718         (create_feature_i386_32bit_avx512): Likewise.
12719         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
12720         Likewise.
12721         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
12722         Likewise.
12723         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
12724         Likewise.
12725         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
12726         Likewise.
12727         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
12728         Likewise.
12729         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
12730         Likewise.
12731         * features/i386/64bit-avx512.c
12732         (create_feature_i386_64bit_avx512): Likewise.
12733         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
12734         Likewise.
12735         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
12736         Likewise.
12737         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
12738         Likewise.
12739         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
12740         Likewise.
12741         * features/i386/64bit-segments.c
12742         (create_feature_i386_64bit_segments): Likewise.
12743         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
12744         Likewise.
12745         * features/i386/x32-core.c
12746         (create_feature_i386_x32_core): Likewise.
12747         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
12748         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
12749         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
12750         * target-descriptions.c: In generated code, don't pass xml
12751         filename.
12752
12753 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12754
12755         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
12756         (print_xml_feature::visit_post): Likewise.
12757         (print_xml_feature::visit): Likewise.
12758         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
12759         (print_xml_feature): Add new class.
12760         * regformats/regdat.sh: Null xmltarget on feature targets.
12761         * target-descriptions.c (struct target_desc): Add xmltarget.
12762         (maintenance_check_tdesc_xml_convert): Add unittest function.
12763         (tdesc_get_features_xml): Add function to get xml.
12764         (maintenance_check_xml_descriptions): Test xml generation.
12765         * xml-tdesc.c (string_read_description_xml): Add function.
12766         * xml-tdesc.h (string_read_description_xml): Add declaration.
12767
12768 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12769
12770         * features/Makefile: Add feature marker to targets with new style
12771         target descriptions.
12772         * regformats/aarch64.dat: Regenerate.
12773         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
12774         * regformats/i386/amd64-avx-linux.dat: Likewise.
12775         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
12776         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
12777         * regformats/i386/amd64-linux.dat: Likewise.
12778         * regformats/i386/amd64-mpx-linux.dat: Likewise.
12779         * regformats/i386/amd64.dat: Likewise.
12780         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
12781         * regformats/i386/i386-avx-linux.dat: Likewise.
12782         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
12783         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
12784         * regformats/i386/i386-linux.dat: Likewise.
12785         * regformats/i386/i386-mmx-linux.dat: Likewise.
12786         * regformats/i386/i386-mpx-linux.dat: Likewise.
12787         * regformats/i386/i386.dat: Likewise.
12788         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
12789         * regformats/i386/x32-avx-linux.dat: Likewise.
12790         * regformats/i386/x32-linux.dat: Likewise.
12791         * regformats/tic6x-c62x-linux.dat: Likewise.
12792         * regformats/tic6x-c64x-linux.dat: Likewise.
12793         * regformats/tic6x-c64xp-linux.dat: Likewise.
12794         * regformats/regdat.sh: Parse feature marker.
12795
12796 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12797
12798         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
12799         (tdesc_osabi_name): Likewise.
12800         * target-descriptions.c (tdesc_architecture_name): Add new
12801         function.
12802         (tdesc_osabi_name): Likewise.
12803
12804 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12805
12806         * common/tdesc.c (tdesc_predefined_type): Move to here.
12807         (tdesc_named_type): Likewise.
12808         (tdesc_create_vector): Likewise.
12809         (tdesc_create_struct): Likewise.
12810         (tdesc_set_struct_size): Likewise.
12811         (tdesc_create_union): Likewise.
12812         (tdesc_create_flags): Likewise.
12813         (tdesc_create_enum): Likewise.
12814         (tdesc_add_field): Likewise.
12815         (tdesc_add_typed_bitfield): Likewise.
12816         (tdesc_add_bitfield): Likewise.
12817         (tdesc_add_flag): Likewise.
12818         (tdesc_add_enum_value): Likewise.
12819         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
12820         (struct tdesc_type_vector): Likewise.
12821         (struct tdesc_type_field): Likewise.
12822         (struct tdesc_type_with_fields): Likewise.
12823         (tdesc_create_enum): Add declaration.
12824         (tdesc_add_typed_bitfield): Likewise.
12825         (tdesc_add_enum_value): Likewise.
12826         * target-descriptions.c (tdesc_type_field): Move from here.
12827         (tdesc_type_builtin): Likewise.
12828         (tdesc_type_vector): Likewise.
12829         (tdesc_type_with_fields): Likewise.
12830         (tdesc_predefined_types): Likewise.
12831         (tdesc_named_type): Likewise.
12832         (tdesc_create_vector): Likewise.
12833         (tdesc_create_struct): Likewise.
12834         (tdesc_set_struct_size): Likewise.
12835         (tdesc_create_union): Likewise.
12836         (tdesc_create_flags): Likewise.
12837         (tdesc_create_enum): Likewise.
12838         (tdesc_add_field): Likewise.
12839         (tdesc_add_typed_bitfield): Likewise.
12840         (tdesc_add_bitfield): Likewise.
12841         (tdesc_add_flag): Likewise.
12842         (tdesc_add_enum_value): Likewise.
12843         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
12844         (tdesc_add_typed_bitfield): Likewise.
12845         (tdesc_add_enum_value): Likewise.
12846
12847 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12848
12849         * common/tdesc.c (tdesc_feature::accept): Move to here.
12850         (tdesc_feature::operator==): Likewise.
12851         (tdesc_create_reg): Likewise.
12852         * common/tdesc.h (tdesc_type_kind): Likewise.
12853         (struct tdesc_type): Likewise.
12854         (struct tdesc_feature): Likewise.
12855         * regformats/regdat.sh: Create a feature.
12856         * target-descriptions.c (tdesc_type_kind): Move from here.
12857         (tdesc_type): Likewise.
12858         (tdesc_type_up): Likewise.
12859         (tdesc_feature): Likewise.
12860         (tdesc_create_reg): Likewise.
12861
12862 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
12863
12864         * Makefile.in: Add arch/tdesc.c
12865         * common/tdesc.c: New file.
12866         * common/tdesc.h (tdesc_element_visitor): Move to here.
12867         (tdesc_element): Likewise.
12868         (tdesc_reg): Likewise.
12869         (tdesc_reg_up): Likewise.
12870         * regformats/regdef.h (reg): Add offset to constructors.
12871         * target-descriptions.c (tdesc_element_visitor): Move from here.
12872         (tdesc_element): Likewise.
12873         (tdesc_reg): Likewise.
12874         (tdesc_reg_up): Likewise.
12875
12876 2018-04-17  Tom Tromey  <tom@tromey.com>
12877
12878         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
12879         discriminant field.
12880
12881 2018-04-17  Tom Tromey  <tom@tromey.com>
12882
12883         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
12884
12885 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12886
12887         * symtab.c (print_symbol_info): Skip printing filename and line
12888         number when `last' is NULL.
12889         (symtab_symbol_info): Use empty string instead of NULL for first
12890         invocation of print_symbol_info.
12891         (rbreak_command): Pass NULL to `last' parameter of
12892         print_symbol_info.
12893
12894 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
12895
12896         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
12897         instead of nullptr.
12898
12899 2018-04-16  Pedro Alves  <palves@redhat.com>
12900
12901         * MAINTAINERS (sh): Remove.
12902         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
12903         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
12904         (ALLDEPFILES): Remove sh64-tdep.c.
12905         * NEWS: Mentions that support for SH-5/SH64 is removed.
12906         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
12907         (sh*-*-openbsd*): Ditto.
12908         (sh64-*-elf*): Remove.
12909         (sh*): Remove.
12910         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
12911         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
12912         * sh-tdep.c: No longer include "sh64-tdep.h".
12913         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
12914         * sh64-tdep.c, sh64-tdep.h: Remove files.
12915
12916 2018-04-16  Pedro Alves  <palves@redhat.com>
12917
12918         * MAINTAINERS: Remove m88k.
12919         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
12920         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
12921         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
12922         * NEWS: Mention that support for m88k was removed.
12923         * configure.host (m88*-*-*): Remove support.
12924         * configure.nat (m88k-*-*): Remove support.
12925         * configure.tgt (m88*-*-openbsd*): Remove.
12926         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
12927
12928 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
12929
12930         * configure.tgt (x86_tobjs): New variable.
12931         (amd64_tobjs, i386_tobjs): Use it.
12932
12933 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12934
12935         * symtab.c (print_symbol_info): Precede the symbol definition by
12936         the line number when available.
12937         * NEWS: Advertise this enhancement.
12938
12939 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12940
12941         * NEWS (New options): announce set/show record btrace cpu.
12942         * btrace.c: Include record-btrace.h.
12943         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
12944         the vendor is unknown.
12945         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
12946         Maybe overwrite the btrace configuration's cpu.
12947         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
12948         (btrace_fetch): Add cpu parameter.  Update callers.
12949         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
12950         Maybe overwrite the btrace configuration's cpu.  Skip enabling
12951         errata workarounds if the vendor is unknown.
12952         * python/py-record-btrace.c: Include record-btrace.h.
12953         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
12954         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
12955         * record-btrace.c (record_btrace_cpu_state_kind): New.
12956         (record_btrace_cpu): New.
12957         (set_record_btrace_cpu_cmdlist): New.
12958         (record_btrace_get_cpu): New.
12959         (require_btrace_thread, record_btrace_info)
12960         (record_btrace_resume_thread): Call record_btrace_get_cpu.
12961         (cmd_set_record_btrace_cpu_none): New.
12962         (cmd_set_record_btrace_cpu_auto): New.
12963         (cmd_set_record_btrace_cpu): New.
12964         (cmd_show_record_btrace_cpu): New.
12965         (_initialize_record_btrace): Initialize set/show record btrace cpu
12966         commands.
12967         * record-btrace.h (record_btrace_get_cpu): New.
12968
12969 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12970
12971         * record.c (set_record_command): Fix typo in message.
12972
12973 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12974
12975         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
12976
12977 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
12978
12979         * infrun.c (process_event_stop_test): Call
12980         gdbarch_in_indirect_branch_thunk.
12981         * gdbarch.sh (in_indirect_branch_thunk): New.
12982         * gdbarch.c: Regenerated.
12983         * gdbarch.h: Regenerated.
12984         * x86-tdep.h: New.
12985         * x86-tdep.c: New.
12986         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
12987         (HFILES_NO_SRCDIR): Add x86-tdep.h.
12988         (ALLDEPFILES): Add x86-tdep.c.
12989         * arch-utils.h (default_in_indirect_branch_thunk): New.
12990         * arch-utils.c (default_in_indirect_branch_thunk): New.
12991         * i386-tdep: Include x86-tdep.h.
12992         (i386_in_indirect_branch_thunk): New.
12993         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
12994         function.
12995         * amd64-tdep: Include x86-tdep.h.
12996         (amd64_in_indirect_branch_thunk): New.
12997         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
12998
12999 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
13000
13001         PR gdb/23053
13002         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
13003         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
13004         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
13005         regression.
13006
13007 2018-04-12  Tom Tromey  <tom@tromey.com>
13008
13009         * rust-lang.c (rust_print_struct_def): Remove univariant code.
13010         (rust_evaluate_subexp): Likewise.
13011
13012 2018-04-12  Pedro Alves  <palves@redhat.com>
13013
13014         * procfs.c (procfs_detach): Make forward declaration's prototype
13015         match definition's protototype.
13016         (proc_get_LDT_entry): Remove stale do_cleanups call.
13017
13018 2018-04-12  Pedro Alves  <palves@redhat.com>
13019
13020         * target.h (target_ops::to_has_exited): Delete.
13021         (target_has_exited): Delete.
13022         * target-delegates.c: Regenerate.
13023
13024 2018-04-11  Pedro Alves  <palves@redhat.com>
13025
13026         * target.c (fileio_fh_t::t): Add comment.
13027         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
13028         (target_fileio_close): Handle a NULL target.
13029         (invalidate_fileio_fh): New.
13030         (target_close): Call it.
13031         * remote.c (remote_hostio_send_command): No longer check whether
13032         remote_desc is open.
13033
13034 2018-04-11  Pedro Alves  <palves@redhat.com>
13035
13036         * target.c (fileio_fh_t): Make it a named struct instead of a
13037         typedef.
13038         (fileio_fh_t::is_closed): New method.
13039         (DEF_VEC_O (fileio_fh_t)): Remove.
13040         (fileio_fhandles): Now a std::vector.
13041         (is_closed_fileio_fh): Delete.
13042         (acquire_fileio_fd): Adjust.  Rename parameters.
13043         (release_fileio_fd): Adjust.
13044         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
13045         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
13046         (target_fileio_close): Adjust.
13047
13048 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
13049
13050         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
13051         index.
13052
13053 2018-04-10  Pedro Alves  <palves@redhat.com>
13054
13055         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
13056         (scoped_finish_thread_state): New class.
13057         * infcmd.c (run_command_1): Use it instead of finish_thread_state
13058         cleanup.
13059         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
13060         (fetch_inferior_event, normal_stop): Likewise.
13061         * thread.c (finish_thread_state_cleanup): Delete.
13062
13063 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13064             Pedro Alves  <palves@redhat.com>
13065
13066         * value.c: Include "selftest.h" and "common/array-view.h".
13067         (struct range) <operator ==>: New.
13068         (test_ranges_contain): New.
13069         (check_ranges_vector): New.
13070         (test_insert_into_bit_range_vector): New.
13071         (_initialize_values): Register selftests.
13072         * common/array-view.h (operator==, operator!=): New.
13073
13074 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13075
13076         * common/gdb_vecs.h (unordered_remove): Add overload that takes
13077         an iterator.
13078         * inline-frame.c: Include <algorithm>.
13079         (struct inline_state): Add constructor.
13080         (inline_state_s): Remove.
13081         (DEF_VEC_O(inline_state_s)): Remove.
13082         (inline_states): Change type to std::vector.
13083         (find_inline_frame_state): Adjust to std::vector.
13084         (allocate_inline_frame_state): Remove.
13085         (clear_inline_frame_state): Adjust to std::vector.
13086         (skip_inline_frames): Adjust to std::vector.
13087
13088 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13089
13090         * tracepoint.h (struct trace_state_variable): Add constructor.
13091         <name>: Change type to std::string.
13092         * tracepoint.c (tsv_s): Remove.
13093         (DEF_VEC_O(tsv_s)): Remove.
13094         (tvariables): Change to std::vector.
13095         (create_trace_state_variable): Adjust to std::vector.
13096         (find_trace_state_variable): Likewise.
13097         (find_trace_state_variable_by_number): Likewise.
13098         (delete_trace_state_variable): Likewise.
13099         (trace_variable_command): Adjust to std::string.
13100         (delete_trace_variable_command): Likewise.
13101         (tvariables_info_1): Adjust to std::vector.
13102         (save_trace_state_variables): Likewise.
13103         (start_tracing): Likewise.
13104         (merge_uploaded_trace_state_variables): Adjust to std::vector
13105         and std::string.
13106         * target.h (struct target_ops)
13107         <to_download_trace_state_variable>: Pass reference to
13108         trace_state_variable.
13109         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
13110         * target-delegates.c: Re-generate.
13111         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
13112         (mi_tsv_deleted): Likewise.
13113         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
13114         * remote.c (remote_download_trace_state_variable): Change
13115         pointer to reference and adjust.
13116         * make-target-delegates (parse_argtypes): Handle references.
13117         (write_function_header): Likewise.
13118         (munge_type): Likewise.
13119
13120 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13121
13122         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13123         string_view-selftests.c.
13124         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
13125         testsuite.
13126         * unittests/basic_string_view/cons/char/1.cc: Likewise.
13127         * unittests/basic_string_view/cons/char/2.cc: Likewise.
13128         * unittests/basic_string_view/cons/char/3.cc: Likewise.
13129         * unittests/basic_string_view/element_access/char/1.cc:
13130         Likewise.
13131         * unittests/basic_string_view/element_access/char/empty.cc:
13132         Likewise.
13133         * unittests/basic_string_view/element_access/char/front_back.cc:
13134         Likewise.
13135         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
13136         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
13137         Likewise.
13138         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
13139         Likewise.
13140         * unittests/basic_string_view/modifiers/swap/char/1.cc:
13141         Likewise.
13142         * unittests/basic_string_view/operations/compare/char/1.cc:
13143         Likewise.
13144         * unittests/basic_string_view/operations/compare/char/13650.cc:
13145         Likewise.
13146         * unittests/basic_string_view/operations/copy/char/1.cc:
13147         Likewise.
13148         * unittests/basic_string_view/operations/data/char/1.cc:
13149         Likewise.
13150         * unittests/basic_string_view/operations/find/char/1.cc:
13151         Likewise.
13152         * unittests/basic_string_view/operations/find/char/2.cc:
13153         Likewise.
13154         * unittests/basic_string_view/operations/find/char/3.cc:
13155         Likewise.
13156         * unittests/basic_string_view/operations/find/char/4.cc:
13157         Likewise.
13158         * unittests/basic_string_view/operations/rfind/char/1.cc:
13159         Likewise.
13160         * unittests/basic_string_view/operations/rfind/char/2.cc:
13161         Likewise.
13162         * unittests/basic_string_view/operations/rfind/char/3.cc:
13163         Likewise.
13164         * unittests/basic_string_view/operations/substr/char/1.cc:
13165         Likewise.
13166         * unittests/basic_string_view/operators/char/2.cc: Likewise.
13167         * unittests/string_view-selftests.c: New file.
13168
13169 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13170
13171         * unittests/basic_string_view/capacity/1.cc: New file.
13172         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
13173         * unittests/basic_string_view/cons/char/1.cc: New file.
13174         * unittests/basic_string_view/cons/char/2.cc: New file.
13175         * unittests/basic_string_view/cons/char/3.cc: New file.
13176         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
13177         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
13178         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
13179         * unittests/basic_string_view/element_access/char/1.cc: New file.
13180         * unittests/basic_string_view/element_access/char/2.cc: New file.
13181         * unittests/basic_string_view/element_access/char/empty.cc: New file.
13182         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
13183         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
13184         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
13185         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
13186         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
13187         * unittests/basic_string_view/include.cc: New file.
13188         * unittests/basic_string_view/inserters/char/1.cc: New file.
13189         * unittests/basic_string_view/inserters/char/2.cc: New file.
13190         * unittests/basic_string_view/inserters/char/3.cc: New file.
13191         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
13192         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
13193         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
13194         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
13195         * unittests/basic_string_view/literals/types.cc: New file.
13196         * unittests/basic_string_view/literals/values.cc: New file.
13197         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
13198         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
13199         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
13200         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
13201         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
13202         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
13203         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
13204         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
13205         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
13206         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
13207         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
13208         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
13209         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
13210         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
13211         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
13212         * unittests/basic_string_view/operations/data/char/1.cc: New file.
13213         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
13214         * unittests/basic_string_view/operations/find/char/1.cc: New file.
13215         * unittests/basic_string_view/operations/find/char/2.cc: New file.
13216         * unittests/basic_string_view/operations/find/char/3.cc: New file.
13217         * unittests/basic_string_view/operations/find/char/4.cc: New file.
13218         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
13219         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
13220         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
13221         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
13222         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
13223         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
13224         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
13225         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
13226         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
13227         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
13228         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
13229         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
13230         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
13231         * unittests/basic_string_view/operators/char/2.cc: New file.
13232         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
13233         * unittests/basic_string_view/range_access/char/1.cc: New file.
13234         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
13235         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
13236         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
13237         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
13238         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
13239         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
13240         * unittests/basic_string_view/requirements/typedefs.cc: New file.
13241         * unittests/basic_string_view/typedefs.cc: New file.
13242         * unittests/basic_string_view/types/1.cc: New file.
13243
13244 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13245
13246         * common/gdb_string_view.h: Remove libstdc++ implementation
13247         details, adjust to gdb reality.
13248         * common/gdb_string_view.tcc: Likewise.
13249         * cli/cli-script.c (struct string_view): Remove.
13250         (user_args) <m_args>: Change element type to gdb::string_view.
13251         (user_args::insert_args): Adjust.
13252
13253 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13254
13255         * common/gdb_string_view.h: New file.
13256         * common/gdb_string_view.tcc: New file.
13257
13258 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13259
13260         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
13261         * configure: Re-generate.
13262
13263 2018-04-09  Pedro Alves  <palves@redhat.com>
13264
13265         * gdbarch.sh: Include "observable.h" instead of "observer.h".
13266         (set_target_gdbarch): Call
13267         gdb::observers::architecture_changed.notify instead of
13268         observer_notify_architecture_changed.
13269
13270 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13271
13272         * tracepoint.c (struct current_traceframe_cleanup): Remove.
13273         (do_restore_current_traceframe_cleanup): Remove.
13274         (restore_current_traceframe_cleanup_dtor): Remove.
13275         (make_cleanup_restore_current_traceframe): Remove.
13276         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
13277         New.
13278         * tracepoint.h (struct scoped_restore_current_traceframe): New.
13279         * infrun.c (fetch_inferior_event): Use
13280         scoped_restore_current_traceframe.
13281
13282 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13283
13284         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
13285         Remove.
13286         <n_allocated_type_units>: Remove.
13287         <all_type_units>: Change to std::vector.
13288         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13289         to std::vector change.
13290         (dwarf2_per_objfile::get_cutu): Likewise.
13291         (dwarf2_per_objfile::get_tu): Likewise.
13292         (create_signatured_type_table_from_index): Likewise.
13293         (create_signatured_type_table_from_debug_names): Likewise.
13294         (dw2_symtab_iter_next): Likewise.
13295         (dw2_print_stats): Likewise.
13296         (dw2_expand_all_symtabs): Likewise.
13297         (dw2_expand_marked_cus): Likewise.
13298         (dw2_debug_names_iterator::next): Likewise.
13299         (dwarf2_initialize_objfile): Likewise.
13300         (add_signatured_type_cu_to_table): Likewise.
13301         (create_all_type_units): Likewise.
13302         (add_type_unit): Likewise.
13303         (struct tu_abbrev_offset): Add constructor.
13304         (build_type_psymtabs_1): Adjust to std::vector change.
13305         (print_tu_stats): Likewise.
13306         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13307         (write_debug_names): Likewise.
13308
13309 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13310
13311         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
13312         Make an std::vector.
13313         <n_comp_units>: Remove.
13314         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
13315         to std::vector change.
13316         (dwarf2_per_objfile::get_cutu): Likewise.
13317         (dwarf2_per_objfile::get_cu): Likewise.
13318         (create_cus_from_index): Likewise.
13319         (create_addrmap_from_index): Likewise.
13320         (create_addrmap_from_aranges): Likewise.
13321         (dwarf2_read_index): Likewise.
13322         (dw2_find_last_source_symtab): Likewise.
13323         (dw2_map_symtabs_matching_filename): Likewise.
13324         (dw2_symtab_iter_next): Likewise.
13325         (dw2_print_stats): Likewise.
13326         (dw2_expand_all_symtabs): Likewise.
13327         (dw2_expand_symtabs_with_fullname): Likewise.
13328         (dw2_expand_marked_cus): Likewise.
13329         (dw2_map_symbol_filenames): Likewise.
13330         (create_cus_from_debug_names): Likewise.
13331         (dwarf2_read_debug_names): Likewise.
13332         (dw2_debug_names_iterator::next): Likewise.
13333         (dwarf2_initialize_objfile): Likewise.
13334         (set_partial_user): Likewise.
13335         (dwarf2_build_psymtabs_hard): Likewise.
13336         (read_comp_units_from_section): Remove arguments, adjust to
13337         std::vector change.
13338         (create_all_comp_units): Adjust to std::vector and
13339         read_comp_units_from_section changes.
13340         (dwarf2_find_containing_comp_unit): Adjust to std::vector
13341         change.
13342         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
13343         (psyms_seen_size): Likewise.
13344         (write_gdbindex): Likewise.
13345         (write_debug_names): Likewise.
13346
13347 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13348
13349         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
13350         with dwarf2_per_objfile.
13351         (create_cus_from_index): Likewise.
13352         (create_signatured_type_table_from_index): Likewise.
13353         (dwarf2_read_index): Likewise.
13354         (dwarf2_initialize_objfile): Likewise.
13355         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
13356         per_cu rather than get_dwarf2_per_objfile.
13357
13358 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13359
13360         * dwarf2read.h (struct signatured_type): Forward declare.
13361         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
13362         New methods.
13363         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
13364         (dw2_get_cutu): ...this.
13365         (dwarf2_per_objfile::get_cu): Rename from...
13366         (dw2_get_cu): ...this.
13367         (dwarf2_per_objfile::get_tu): New.
13368         (create_addrmap_from_index): Adjust.
13369         (create_addrmap_from_aranges): Adjust.
13370         (dw2_find_last_source_symtab): Adjust.
13371         (dw2_map_symtabs_matching_filename): Adjust.
13372         (dw2_symtab_iter_next): Adjust.
13373         (dw2_print_stats): Adjust.
13374         (dw2_expand_all_symtabs): Adjust.
13375         (dw2_expand_symtabs_with_fullname): Adjust.
13376         (dw2_expand_marked_cus): Adjust.
13377         (dw_expand_symtabs_matching_file_matcher): Adjust.
13378         (dw2_map_symbol_filenames): Adjust.
13379         (dw2_debug_names_iterator::next): Adjust.
13380         (dwarf2_initialize_objfile): Adjust.
13381         (set_partial_user): Adjust.
13382         (dwarf2_build_psymtabs_hard): Adjust.
13383
13384 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13385
13386         * dwarf2read.c (create_signatured_type_table_from_debug_names):
13387         Remove unused variables.
13388         (dw2_map_symtabs_matching_filename): Likewise.
13389         (dwarf2_record_block_ranges): Likewise.
13390         (dwarf2_read_addr_index): Likewise.
13391         (follow_die_offset): Likewise.
13392
13393 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13394
13395         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
13396         to symbol_file_add_main.
13397
13398 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13399
13400         PR mi/22299
13401         * mi/mi-console.c (do_fputc_async_safe): New.
13402         (mi_console_file::write_async_safe): New.
13403         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
13404         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
13405         New.
13406         * ui-file.c (ui_file::putstrn): Adjust call to
13407         fputstrn_unfiltered.
13408         * utils.c (printchar): Replace do_fputs and do_fprintf
13409         parameters by do_fputc.
13410         (fputstr_filtered): Adjust call to printchar.
13411         (fputstr_unfiltered): Likewise.
13412         (fputstrn_filtered): Likewise.
13413         (fputstrn_unfiltered): Add do_fputc parameter, pass to
13414         printchar.
13415         * utils.h (do_fputc_ftype): New typedef.
13416         (fputstrn_unfiltered): Add do_fputc parameter.
13417
13418 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
13419
13420         * regformats/i386/i386-avx.dat: Remove.
13421
13422 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13423
13424         PR gdb/22979
13425         * amd64-tdep.c (amd64_none_init_abi): New function.
13426         (amd64_x32_none_init_abi): New function.
13427         (_initialize_amd64_tdep): Register handlers for x86-64 and
13428         x64_32 with GDB_OSABI_NONE.
13429         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
13430         GDB_OSABI_NONE osabi.
13431
13432 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13433
13434         PR gdb/22980
13435         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
13436         GDB_OSABI_NONE.
13437         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
13438         * osabi.c (gdb_osabi_names): Add "unknown" entry.
13439
13440 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13441
13442         * common/byte-vector.h (char_vector): New type.
13443         * target.h (target_read_alloc): Return
13444         gdb::optional<byte_vector>.
13445         (target_read_stralloc): Return gdb::optional<char_vector>.
13446         (target_get_osdata): Return gdb::optional<char_vector>.
13447         * target.c (target_read_alloc_1): Templatize.  Replacement
13448         manual memory management with vector.
13449         (target_read_alloc): Change return type, adjust.
13450         (target_read_stralloc): Change return type, adjust.
13451         (target_get_osdata): Change return type, adjust.
13452         * auxv.c (struct auxv_info) <length>: Remove.
13453         <data>: Change type to gdb::optional<byte_vector>.
13454         (auxv_inferior_data_cleanup): Free auxv_info with delete.
13455         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
13456         (target_auxv_search): Adjust.
13457         (fprint_target_auxv): Adjust.
13458         * avr-tdep.c (avr_io_reg_read_command): Adjust.
13459         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
13460         (linux_make_corefile_notes): Adjust.
13461         * osdata.c (get_osdata): Adjust.
13462         * remote.c (remote_get_threads_with_qxfer): Adjust.
13463         (remote_memory_map): Adjust.
13464         (remote_traceframe_info): Adjust.
13465         (btrace_read_config): Adjust.
13466         (remote_read_btrace): Adjust.
13467         (remote_pid_to_exec_file): Adjust.
13468         * solib-aix.c (solib_aix_get_library_list): Adjust.
13469         * solib-dsbt.c (decode_loadmap): Don't free buf.
13470         (dsbt_get_initial_loadmaps): Adjust.
13471         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
13472         * solib-target.c (solib_target_current_sos): Adjust.
13473         * tracepoint.c (sdata_make_value): Adjust.
13474         * xml-support.c (xinclude_start_include): Adjust.
13475         (xml_fetch_content_from_file): Adjust.
13476         * xml-support.h (xml_fetch_another): Change return type.
13477         (xml_fetch_content_from_file): Change return type.
13478         * xml-syscall.c (xml_init_syscalls_info): Adjust.
13479         * xml-tdesc.c (file_read_description_xml): Adjust.
13480         (fetch_available_features_from_target): Change return type.
13481         (target_fetch_description_xml): Adjust.
13482         (target_read_description_xml): Adjust.
13483
13484 2018-04-06  Tom Tromey  <tom@tromey.com>
13485
13486         * value.c (~value): Update.
13487         (struct value) <contents>: Now unique_xmalloc_ptr.
13488         (value_contents_bits_eq, allocate_value_contents)
13489         (value_contents_raw, value_contents_all_raw)
13490         (value_contents_for_printing, value_contents_for_printing_const)
13491         (set_value_enclosing_type): Update.
13492
13493 2018-04-06  Tom Tromey  <tom@tromey.com>
13494
13495         * value.c (range_s): Remove typedef, VEC.
13496         (struct range): Add operator<.
13497         (range_lessthan): Remove.
13498         (ranges_contain): Change type.
13499         (~value): Update.
13500         (struct value) <unavailable, optimized_out>: Now std::vector.
13501         (value_entirely_available)
13502         (value_entirely_covered_by_range_vector)
13503         (value_entirely_unavailable, value_entirely_optimized_out):
13504         Update.
13505         (insert_into_bit_range_vector): Change argument type.
13506         (find_first_range_overlap): Likewise.
13507         (struct ranges_and_idx, value_contents_bits_eq)
13508         (require_not_optimized_out, require_available): Update.
13509         (ranges_copy_adjusted): Change argument types.
13510         (value_optimized_out, value_copy, value_fetch_lazy): Update.
13511
13512 2018-04-06  Tom Tromey  <tom@tromey.com>
13513
13514         * value.c (~value): Update.
13515         (struct value) <parent>: Now a value_ref_ptr.
13516         (value_parent, set_value_parent, value_address, value_copy):
13517         Update.
13518
13519 2018-04-06  Tom Tromey  <tom@tromey.com>
13520
13521         * value.c (struct value): Add constructor, destructor, and member
13522         initializers.
13523         (allocate_value_lazy, value_decref): Update.
13524
13525 2018-04-06  Tom Tromey  <tom@tromey.com>
13526
13527         * value.c (struct value) <released, next>: Remove.
13528         (all_values): Now a std::vector.
13529         (allocate_value_lazy): Update.
13530         (value_next): Remove.
13531         (value_mark, value_free_to_mark, release_value)
13532         (value_release_to_mark): Update.
13533
13534 2018-04-06  Tom Tromey  <tom@tromey.com>
13535
13536         * value.h (fetch_subexp_value, value_release_to_mark): Update.
13537         (free_value_chain): Remove.
13538         * value.c (free_value_chain): Remove.
13539         (value_release_to_mark): Return a std::vector.
13540         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
13541         std::vector.
13542         (check_condition): Update.
13543         * eval.c (fetch_subexp_value): Change "val_chain" to a
13544         std::vector.
13545         * breakpoint.c (update_watchpoint): Update.
13546         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
13547
13548 2018-04-06  Tom Tromey  <tom@tromey.com>
13549
13550         * value.h (free_all_values): Remove.
13551         * value.c (free_all_values): Remove.
13552
13553 2018-04-06  Tom Tromey  <tom@tromey.com>
13554
13555         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
13556         (value_history_chain, value_history_count): Remove.
13557         (value_history): New global.
13558         (record_latest_value, access_value_history, show_values)
13559         (preserve_values): Update.
13560
13561 2018-04-06  Tom Tromey  <tom@tromey.com>
13562
13563         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
13564         * varobj.c (varobj_set_display_format, varobj_set_value)
13565         (install_default_visualizer, construct_visualizer)
13566         (install_new_value, ~varobj, varobj_get_value_type)
13567         (my_value_of_variable, varobj_editable_p): Update.
13568         * c-varobj.c (c_describe_child, c_value_of_variable)
13569         (cplus_number_of_children, cplus_describe_child): Update.
13570         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
13571         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
13572         (ada_value_of_variable, ada_value_is_changeable_p): Update.
13573
13574 2018-04-06  Tom Tromey  <tom@tromey.com>
13575
13576         * printcmd.c (last_examine_address): Change type to
13577         value_ref_ptr.
13578         (do_examine, x_command): Update.
13579
13580 2018-04-06  Tom Tromey  <tom@tromey.com>
13581
13582         * value.c (release_value): Update.
13583         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
13584         (struct bpstats) <val>: Now a value_ref_ptr.
13585         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13586         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13587         (~watchpoint, print_it_watchpoint, watch_command_1)
13588         (invalidate_bp_value_on_memory_change): Update.
13589
13590 2018-04-06  Tom Tromey  <tom@tromey.com>
13591
13592         * varobj.c (varobj_clear_saved_item)
13593         (update_dynamic_varobj_children, install_new_value, ~varobj):
13594         Update.
13595         * value.h (value_incref): Move declaration earlier.
13596         (value_decref): Rename from value_free.
13597         (struct value_ref_policy): New.
13598         (value_ref_ptr): New typedef.
13599         (struct value_deleter): Remove.
13600         (gdb_value_up): Remove typedef.
13601         (release_value): Change return type.
13602         (release_value_or_incref): Remove.
13603         * value.c (set_value_parent): Update.
13604         (value_incref): Change return type.
13605         (value_decref): Rename from value_free.
13606         (value_free_to_mark, free_all_values, free_value_chain): Update.
13607         (release_value): Return value_ref_ptr.
13608         (release_value_or_incref): Remove.
13609         (record_latest_value, set_internalvar, clear_internalvar):
13610         Update.
13611         * stack.c (info_frame_command): Don't call value_free.
13612         * python/py-value.c (valpy_dealloc, valpy_new)
13613         (value_to_value_object): Update.
13614         * printcmd.c (do_examine): Update.
13615         * opencl-lang.c (lval_func_free_closure): Update.
13616         * mi/mi-main.c (register_changed_p): Don't call value_free.
13617         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
13618         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
13619         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
13620         value_free.
13621         * guile/scm-value.c (vlscm_free_value_smob)
13622         (vlscm_scm_from_value): Update.
13623         * frame.c (frame_register_unwind, frame_unwind_register_signed)
13624         (frame_unwind_register_unsigned, get_frame_register_bytes)
13625         (put_frame_register_bytes): Don't call value_free.
13626         * findvar.c (address_from_register): Don't call value_free.
13627         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
13628         * dwarf2loc.c (entry_data_value_free_closure)
13629         (value_of_dwarf_reg_entry, free_pieced_value_closure)
13630         (dwarf2_evaluate_loc_desc_full): Update.
13631         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
13632         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
13633         (~watchpoint, watch_command_1)
13634         (invalidate_bp_value_on_memory_change): Update.
13635         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
13636
13637 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
13638
13639         PR gdb/23022
13640         * warning.m4: Add -Wno-error=deprecated-register.
13641         * configure: Re-generate.
13642
13643 2018-04-05  Tom Tromey  <tom@tromey.com>
13644
13645         * linespec.h: Remove include of "vec.h".
13646
13647 2018-04-05  Tom Tromey  <tom@tromey.com>
13648
13649         * linespec.c (typep): Remove typedef.
13650         (find_methods, find_superclass_methods): Take a std::vector.
13651         (find_method): Use std::vector.
13652
13653 2018-04-05  Tom Tromey  <tom@tromey.com>
13654
13655         * utils.c (compare_strings): Remove.
13656         * utils.h (compare_strings): Remove.
13657         * objc-lang.h (find_imps): Update.
13658         * objc-lang.c (find_methods): Take a std::vector.
13659         (uniquify_strings, find_imps): Likewise.
13660         * linespec.c (find_methods): Take a std::vector.
13661         (decode_objc): Use std::vector.
13662         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
13663         a std::vector.
13664         (find_method, find_function_symbols): Use std::vector.
13665
13666 2018-04-05  Tom Tromey  <tom@tromey.com>
13667
13668         * completer.c (completion_tracker::completion_tracker): Remove
13669         cast.
13670         (completion_tracker::discard_completions): Likewise.
13671         * breakpoint.c (ambiguous_names_p): Remove cast.
13672         * ada-lang.c (_initialize_ada_language): Remove cast.
13673         * utils.h (streq): Update.
13674         (streq_hash): Add new declaration.
13675         * utils.c (streq): Return bool.
13676         (streq_hash): New function.
13677
13678 2018-04-05  Tom Tromey  <tom@tromey.com>
13679
13680         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
13681         Remove a string copy.
13682
13683 2018-04-05  Tom Tromey  <tom@tromey.com>
13684
13685         * linespec.c (filter_results): Use std::vector.
13686         (decode_line_2, decode_line_full): Update.
13687
13688 2018-04-05  Tom Tromey  <tom@tromey.com>
13689
13690         * linespec.c (canonical_to_fullform): Return std::string.
13691         (filter_results): Update.
13692         (struct decode_line_2_item): Add constructor.
13693         <fullform, displayform>: Now std::string.
13694         (decode_line_2_compare_items): Now a std::sort comparator.
13695         (decode_line_2): Update.
13696
13697 2018-04-05  Tom Tromey  <tom@tromey.com>
13698
13699         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
13700         (unexpected_linespec_error): Update.
13701         (linespec_parse_basic, parse_linespec): Update.
13702
13703 2018-04-05  Tom Tromey  <tom@tromey.com>
13704
13705         * linespec.c (linespec_parse_basic): Reindent.
13706
13707 2018-04-05  Tom Tromey  <tom@tromey.com>
13708
13709         * minsyms.h (iterate_over_minimal_symbols): Update.
13710         * minsyms.c (iterate_over_minimal_symbols): Take a
13711         gdb::function_view.
13712         * linespec.c (struct collect_minsyms): Remove.
13713         (compare_msyms): Now a std::sort comparator.
13714         (add_minsym): Add parameters.
13715         (search_minsyms_for_name): Update.  Use std::vector.
13716
13717 2018-04-03  Tom Tromey  <tom@tromey.com>
13718
13719         * mipsread.c (read_alphacoff_dynamic_symtab): Use
13720         gdb::byte_vector.
13721
13722 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13723
13724         * MAINTAINERS (Write After Approval): Add Weimin Pan.
13725
13726 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
13727
13728         PR gdb/16959
13729         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
13730         printing static type.
13731
13732 2018-04-01  Tom Tromey  <tom@tromey.com>
13733
13734         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
13735         (rs6000_xfer_shared_libraries): Update.
13736
13737 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
13738
13739         * common/gdb_vecs.h (char_ptr): Remove.
13740         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
13741
13742 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13743
13744         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
13745         with std::vector.
13746         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
13747
13748 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
13749
13750         * tracepoint.h (struct uploaded_tp): Initialize fields.
13751         <actions, step_actions, cmd_strings>: Change type to
13752         std::vector<char *>.
13753         * tracepoint.c (get_uploaded_tp): Allocate with new.
13754         (free_uploaded_tps): Free with delete.
13755         (parse_tracepoint_definition): Adjust to std::vector change.
13756         * breakpoint.c (read_uploaded_action): Likewise.
13757         (create_tracepoint_from_upload): Likewise.
13758         * ctf.c (ctf_write_uploaded_tp): Likewise.
13759         (SET_ARRAY_FIELD): Likewise.
13760         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
13761
13762 2018-03-30  Tom Tromey  <tom@tromey.com>
13763
13764         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
13765         std::unique_ptr.
13766         (svr4_keep_data_in_core): Update.
13767         (svr4_read_so_list): Update.
13768
13769 2018-03-30  Tom Tromey  <tom@tromey.com>
13770
13771         * windows-nat.c (handle_output_debug_string, handle_exception):
13772         Update.
13773         * target.h (target_read_string): Update.
13774         * target.c (target_read_string): Change "string" to
13775         unique_xmalloc_ptr.
13776         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
13777         Update.
13778         * solib-frv.c (frv_current_sos): Update.
13779         * solib-dsbt.c (dsbt_current_sos): Update.
13780         * solib-darwin.c (darwin_current_sos): Update.
13781         * linux-thread-db.c (inferior_has_bug): Update.
13782         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
13783         Update.  Remove alloca.
13784         * ada-lang.c (ada_main_name): Update.
13785
13786 2018-03-30  Tom Tromey  <tom@tromey.com>
13787
13788         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
13789         (struct dwo_file_deleter): New.
13790         (dwo_file_up): New typedef.
13791         (open_and_init_dwo_file): Use dwo_file_up.
13792         (free_dwo_file_cleanup): Remove.
13793
13794 2018-03-30  Tom Tromey  <tom@tromey.com>
13795
13796         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
13797         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
13798
13799 2018-03-30  Tom Tromey  <tom@tromey.com>
13800
13801         * dwarf2read.c (class free_cached_comp_units): New class.
13802         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
13803         (free_cached_comp_units): Remove function.
13804
13805 2018-03-30  Tom Tromey  <tom@tromey.com>
13806
13807         * utils.h (make_cleanup_unpush_target): Remove.
13808         * inf-ptrace.c (struct target_unpusher): New.
13809         (target_unpush_up) New typedef.
13810         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
13811         target_unpush_up.
13812         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
13813
13814 2018-03-27  Tom Tromey  <tom@tromey.com>
13815
13816         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
13817
13818 2018-03-27  Pedro Alves  <palves@redhat.com>
13819             Tom Tromey  <tom@tromey.com>
13820
13821         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
13822         destructor.  Now a class.
13823         (gdb_readline_wrapper_cleanup): Remove function.
13824         (gdb_readline_wrapper): Remove cleanups.
13825
13826 2018-03-27  Tom Tromey  <tom@tromey.com>
13827
13828         * typeprint.h (struct type_print_options) <local_typedefs,
13829         global_typedefs>: Remove "struct" keyword.
13830         (class typedef_hash_table): New class.
13831         (recursively_update_typedef_hash, add_template_parameters)
13832         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
13833         (find_typedef_in_hash): Don't declare.
13834         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
13835         (typedef_hash_table::recursively_update): Rename from
13836         recursively_update_typedef_hash.  Now a member.
13837         (typedef_hash_table::add_template_parameters): Rename from
13838         add_template_parameters.  Now a member.
13839         (typedef_hash_table::typedef_hash_table): Now a constructor;
13840         rename from create_typedef_hash.
13841         (typedef_hash_table::~typedef_hash_table): Now a destructor;
13842         rename from free_typedef_hash.
13843         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
13844         (do_free_global_table): Remove.
13845         (typedef_hash_table::typedef_hash_table): New constructor; renamed
13846         from copy_type_recursive.
13847         (create_global_typedef_table): Remove.
13848         (typedef_hash_table::find_global_typedef): Now a member of
13849         typedef_hash_table.
13850         (typedef_hash_table::find_typedef): Rename from
13851         find_typedef_in_hash; now a member.
13852         (whatis_exp): Update.
13853         * extension.h (struct ext_lang_type_printers): Add constructor and
13854         destructor.
13855         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
13856         declare.
13857         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
13858         Now a constructor; rename from start_ext_lang_type_printers.
13859         (ext_lang_type_printers): Now a destructor; rename from
13860         free_ext_lang_type_printers.
13861         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
13862         Update.
13863         (c_type_print_base_struct_union): Update.  Remove cleanups.
13864
13865 2018-03-27  Tom Tromey  <tom@tromey.com>
13866
13867         * dwarf-index-write.c: Include <cmath>.
13868
13869 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13870
13871         * NEWS: Add entry describing new "set|show varsize-limit" command.
13872         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
13873         command.
13874         * printcmd.c (_initialize_printcmd): Add "set var" alias of
13875         "set variable".
13876
13877 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
13878
13879         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
13880         dwarf-index-write.c
13881         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
13882         * dwarf-index-common.c: New file.
13883         * dwarf-index-common.h: New file.
13884         * dwarf-index-write.c: New file.
13885         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
13886         (struct dwarf2_section_info): Move from here.
13887         (dwarf2_section_info_def): Likewise.
13888         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
13889         (offset_type): Likewise.
13890         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
13891         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
13892         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
13893         (byte_swap): Likewise.
13894         (MAYBE_SWAP): Likewise.
13895         (dwarf2_per_cu_ptr): Likewise.
13896         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
13897         (struct tu_stats): Likewise.
13898         (struct dwarf2_per_objfile): Likewise.
13899         (struct dwarf2_per_cu_data): Likewise.
13900         (struct signatured_type): Likewise.
13901         (sig_type_ptr): Likewise.
13902         (DEF_VEC_P (sig_type_ptr)): Likewise.
13903         (INDEX4_SUFFIX): Likewise.
13904         (INDEX5_SUFFIX): Likewise.
13905         (DEBUG_STR_SUFFIX): Likewise.
13906         (dwarf2_read_section): Make non-static.
13907         (mapped_index_string_hash): Move from here.
13908         (dwarf5_djb_hash): Likewise.
13909         (file_write): Likewise.
13910         (class data_buf): Likewise.
13911         (struct symtab_index_entry): Likewise.
13912         (struct mapped_symtab): Likewise.
13913         (find_slot): Likewise.
13914         (hash_expand): Likewise.
13915         (add_index_entry): Likewise.
13916         (uniquify_cu_indices): Likewise.
13917         (class c_str_view): Likewise.
13918         (class c_str_view_hasher): Likewise.
13919         (class vector_hasher): Likewise.
13920         (write_hash_table): Likewise.
13921         (psym_index_map): Likewise.
13922         (struct addrmap_index_data): Likewise.
13923         (add_address_entry): Likewise.
13924         (add_address_entry_worker): Likewise.
13925         (write_address_map): Likewise.
13926         (symbol_kind): Likewise.
13927         (write_psymbols): Likewise.
13928         (struct signatured_type_index_data): Likewise.
13929         (write_one_signatured_type): Likewise.
13930         (recursively_count_psymbols): Likewise.
13931         (recursively_write_psymbols): Likewise.
13932         (class debug_names): Likewise.
13933         (check_dwarf64_offsets): Likewise.
13934         (psyms_seen_size): Likewise.
13935         (write_gdbindex): Likewise.
13936         (write_debug_names): Likewise.
13937         (assert_file_size): Likewise.
13938         (write_psymtabs_to_index): Likewise.
13939         (save_gdb_index_command): Likewise.
13940         (_initialize_dwarf2_read): Don't register the "save gdb-index"
13941         command.
13942         * dwarf2read.h: New file.
13943
13944 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
13945
13946         PR gdb/22670
13947         * dwarf2read.c (dwarf2_physname): Do not return the demangled
13948         symbol name if the CU's language stores symbol names in linkage
13949         format.
13950         * language.h (struct language_defn)
13951         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
13952         all instances of this struct.
13953
13954 2018-03-26  Tom Tromey  <tom@tromey.com>
13955
13956         * stack.c (backtrace_command_1): Remove verbose code.
13957
13958 2018-03-26  Tom Tromey  <tom@tromey.com>
13959
13960         * python/py-framefilter.c (py_print_type): Don't catch
13961         exceptions.  Return void.
13962         (py_print_value): Likewise.
13963         (py_print_single_arg): Likewise.
13964         (enumerate_args): Don't catch exceptions.
13965         (py_print_args): Likewise.
13966         (py_print_frame): Likewise.
13967         (gdbpy_apply_frame_filter): Catch exceptions here.
13968
13969 2018-03-26  Tom Tromey  <tom@tromey.com>
13970
13971         * stack.c (_initialize_stack): Remove trailing newlines from help
13972         text.  Add "Usage" line to "backtrace" help.
13973
13974 2018-03-26  Tom Tromey  <tom@tromey.com>
13975
13976         PR python/16486:
13977         * python/py-framefilter.c (py_print_args): Call wrap_hint.
13978
13979 2018-03-26  Tom Tromey  <tom@tromey.com>
13980
13981         * python/py-framefilter.c (py_print_single_arg): Return
13982         EXT_LANG_BT_ERROR from catch.
13983
13984 2018-03-26  Tom Tromey  <tom@tromey.com>
13985
13986         PR backtrace/15584:
13987         * stack.c (backtrace_command_1): Move some code into no-filters
13988         "if".
13989
13990 2018-03-26  Tom Tromey  <tom@tromey.com>
13991
13992         * python/py-framefilter.c (throw_quit_or_print_exception): New
13993         function.
13994         (gdbpy_apply_frame_filter): Use it.
13995
13996 2018-03-26  Tom Tromey  <tom@tromey.com>
13997
13998         PR cli/17716:
13999         * python/py-framefilter.c (py_print_type, py_print_value)
14000         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
14001         RETURN_MASK_ERROR.
14002
14003 2018-03-26  Tom Tromey  <tom@tromey.com>
14004
14005         * python/py-framefilter.c (enumerate_args): Use
14006         gdb::unique_xmalloc_ptr.
14007
14008 2018-03-26  Tom Tromey  <tom@tromey.com>
14009
14010         * python/py-framefilter.c (py_print_frame): Return
14011         EXT_LANG_BT_OK.
14012         (gdbpy_apply_frame_filter): Update comment.
14013         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
14014         Remove.
14015         <EXT_LANG_BT_NO_FILTERS>: Change value.
14016
14017 2018-03-26  Tom Tromey  <tom@tromey.com>
14018
14019         PR backtrace/15582:
14020         * stack.c (backtrace_command): Parse "hide" argument.
14021         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
14022         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
14023         constant.
14024
14025 2018-03-26  Tom Tromey  <tom@tromey.com>
14026
14027         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
14028         add "flags".
14029         (backtrace_command): Remove "fulltrace", add "flags".
14030
14031 2018-03-26  Tom Tromey  <tom@tromey.com>
14032
14033         * stack.c (backtrace_command): Rewrite command line parsing.
14034
14035 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
14036
14037         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
14038
14039 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
14040
14041         * filename-seen-cache.h: Add include guard.
14042
14043 2018-03-26  Keith Seitz  <keiths@redhat.com>
14044
14045         * symfile.c (place_section): Remove "struct" from section_addr_info
14046         in comment.
14047         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
14048         "struct" keyword from section_addr_info.
14049
14050 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
14051
14052         * regformats/regdef.h (reg): Add constructors.
14053
14054 2018-03-25  Pedro Alves  <palves@redhat.com>
14055
14056         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
14057         if then/else bodies in var_func_name extraction.
14058
14059 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
14060
14061         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
14062         lookup_minimal_symbol() to find symbol entry.
14063         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
14064
14065 2018-03-23  Keith Seitz  <keiths@redhat.com>
14066
14067         PR c++/22968
14068         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
14069         nested type definitions for C++, too.
14070
14071 2018-03-23  Tom Tromey  <tom@tromey.com>
14072
14073         * machoread.c (struct oso_el): Add a constructor.  Don't define as
14074         a typedef.
14075         (macho_register_oso): Remove.
14076         (macho_symtab_read): Take a std::vector.
14077         (oso_el_compare_name): Now a std::sort comparator.
14078         (macho_symfile_read_all_oso): Take a std::vector.
14079         (macho_symfile_read): Use std::vector.  Remove cleanups.
14080
14081 2018-03-22  Tom Tromey  <tom@tromey.com>
14082
14083         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
14084         (record_full_goto_bookmark): Use std::string.
14085
14086 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
14087
14088         PR tdep/18295
14089         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
14090         a single mask.
14091
14092 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
14093
14094         * rs6000-tdep.c (store_insn_p): New function.
14095         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
14096         and cr_reg to their unshifted values. Use store_insn_p to
14097         match LR saves using either R1 or fdata->alloca_reg. Use
14098         store_insn_p to match CR saves. Set alloca_reg_offset
14099         when alloca_reg and framep are set. Remove lr_reg shift
14100         when assigning to fdata->lr_register.
14101
14102 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14103
14104         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
14105         command line args instead of emitting a warning.
14106
14107 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14108
14109         * tracepoint.h (struct static_tracepoint_marker): Initialize
14110         fields, define default constructor, move constructor and move
14111         assignment, disable the rest.
14112         <str_id, extra>: Make std::string.
14113         (release_static_tracepoint_marker): Remove.
14114         (free_current_marker): Remove.
14115         * tracepoint.c (free_current_marker): Remove.
14116         (parse_static_tracepoint_marker_definition): Adjust to
14117         std::string, use new hex2str overload.
14118         (release_static_tracepoint_marker): Remove.
14119         (print_one_static_tracepoint_marker): Get marker by reference
14120         and adjust to std::string.
14121         (info_static_tracepoint_markers_command): Adjust to std::vector
14122         changes
14123         * target.h (static_tracepoint_marker_p): Remove typedef.
14124         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
14125         (struct target_ops) <to_static_tracepoint_marker_at>: Return
14126         bool.
14127         <to_static_tracepoint_markers_by_strid>: Return std::vector.
14128         * target-debug.h
14129         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
14130         (target_debug_print_std_vector_static_tracepoint_marker): New.
14131         (target_debug_print_struct_static_tracepoint_marker_p): Rename
14132         to...
14133         (target_debug_print_static_tracepoint_marker_p): ... this.
14134         * target-delegates.c: Re-generate.
14135         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
14136         Make std::string.
14137         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
14138         (decode_static_tracepoint_spec): Adjust to std::vector.
14139         (tracepoint_print_one_detail): Adjust to std::string.
14140         (strace_marker_decode_location): Adjust to std::string.
14141         (update_static_tracepoint): Adjust to std::string, remove call
14142         to release_static_tracepoint_marker.
14143         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
14144         Adjust to std::vector.
14145         * remote.c (remote_static_tracepoint_marker_at): Return bool.
14146         (remote_static_tracepoint_markers_by_strid): Adjust to
14147         std::vector.
14148         * common/rsp-low.h (hex2str): New overload with explicit count
14149         of bytes.
14150         * common/rsp-low.c (hex2str): New overload with explicit count
14151         of bytes.
14152         * unittests/rsp-low-selftests.c (test_hex2str): New function.
14153         (_initialize_rsp_low_selftests): Add test_hex2str test.
14154         * unittests/tracepoint-selftests.c
14155         (test_parse_static_tracepoint_marker_definition): Adjust to
14156         std::string.
14157
14158 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14159
14160         * tracepoint.c (parse_static_tracepoint_marker_definition):
14161         Consider case where the definition is followed by more
14162         definitions.
14163         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14164         tracepoint-selftests.c.
14165         * unittests/tracepoint-selftests.c: New.
14166
14167 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
14168
14169         * MAINTAINERS (Write After Approval): Add Pedro Franco de
14170         Carvalho.
14171
14172 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
14173
14174         * symtab.c (find_pc_sect_line): fixed indentation.
14175
14176 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
14177
14178         * symtab.c (find_pc_sect_line): now uses binary search.
14179
14180 2018-03-19  Tom Tromey  <tom@tromey.com>
14181
14182         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
14183         "IDENT" production.
14184
14185 2018-03-19  Pedro Alves  <palves@redhat.com>
14186             Tom Tromey  <tom@tromey.com>
14187
14188         * unittests/observable-selftests.c: New file.
14189         * common/observable.h: New file.
14190         * observable.h: New file.
14191         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
14192         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
14193         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
14194         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
14195         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
14196         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
14197         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
14198         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
14199         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
14200         python/py-breakpoint.c, python/py-finishbreakpoint.c,
14201         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
14202         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
14203         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
14204         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
14205         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
14206         tui/tui-interp.c, valops.c: Update all users.
14207         * tui/tui-hooks.c (tui_bp_created_observer)
14208         (tui_bp_deleted_observer, tui_bp_modified_observer)
14209         (tui_inferior_exit_observer, tui_before_prompt_observer)
14210         (tui_normal_stop_observer, tui_register_changed_observer):
14211         Remove.
14212         (tui_observers_token): New global.
14213         (attach_or_detach, tui_attach_detach_observers): New functions.
14214         (tui_install_hooks, tui_remove_hooks): Use
14215         tui_attach_detach_observers.
14216         * record-btrace.c (record_btrace_thread_observer): Remove.
14217         (record_btrace_thread_observer_token): New global.
14218         * observer.sh: Remove.
14219         * observer.c: Rename to observable.c.
14220         * observable.c (namespace gdb_observers): Define new objects.
14221         (observer_debug): Move into gdb_observers namespace.
14222         (struct observer, struct observer_list, xalloc_observer_list_node)
14223         (xfree_observer_list_node, generic_observer_attach)
14224         (generic_observer_detach, generic_observer_notify): Remove.
14225         (_initialize_observer): Update.
14226         Don't include observer.inc.
14227         * Makefile.in (generated_files): Remove observer.h, observer.inc.
14228         (clean mostlyclean): Likewise.
14229         (observer.h, observer.inc): Remove targets.
14230         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
14231         (COMMON_SFILES): Use observable.c, not observer.c.
14232         * .gitignore: Remove observer.h.
14233
14234 2018-03-18  Tom Tromey  <tom@tromey.com>
14235
14236         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
14237         gdb::def_vector.
14238         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
14239
14240 2018-03-17  Tom Tromey  <tom@tromey.com>
14241
14242         * auto-load.c (auto_load_objfile_script_1): Use std::string.
14243
14244 2018-03-17  Tom Tromey  <tom@tromey.com>
14245
14246         * target.c (class scoped_target_fd): New.
14247         (target_fileio_close_cleanup): Remove.
14248         (target_fileio_read_alloc_1): Use scoped_target_fd.
14249
14250 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
14251
14252         * silent-rules.mk: New.
14253         * Makefile.in: Include silent-rules.mk
14254         (srcdir, VPATH, top_srcdir): Move up.
14255         (COMPILE): Add ECHO_CXX.
14256         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
14257         (init.c): Add ECHO_INIT_C.
14258         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
14259         (version.c): Add ECHO_GEN.
14260         (printcmd.o): Add ECHO_CXX.
14261         (target-float.o): Add ECHO_CXX.
14262         (ada-exp.o): Add ECHO_CXX.
14263         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
14264         (insight$(EXEEXT)): Add ECHO_CXXLD.
14265         * gnulib/configure.ac: Add AM_SILENT_RULES.
14266         * gnulib/aclocal.m4: Re-generate.
14267         * gnulib/configure: Re-generate.
14268         * gnulib/import/Makefile.in: Re-generate.
14269
14270 2018-03-16  Tom Tromey  <tom@tromey.com>
14271
14272         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
14273         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
14274         * utils.c (do_free_section_addr_info)
14275         (make_cleanup_free_section_addr_info): Remove.
14276         * symfile.h (struct other_sections): Add constructor.
14277         (struct section_addr_info): Remove.
14278         (section_addr_info): New typedef.
14279         (struct sym_fns) <sym_offsets>: Change type of parameter.
14280         (build_section_addr_info_from_objfile)
14281         (relative_addr_info_to_section_offsets, addr_info_make_relative)
14282         (default_symfile_offsets, symbol_file_add)
14283         (symbol_file_add_from_bfd)
14284         (build_section_addr_info_from_section_table): Update.
14285         (alloc_section_addr_info, free_section_addr_info): Don't declare.
14286         * symfile.c (alloc_section_addr_info): Remove.
14287         (build_section_addr_info_from_section_table): Change return type.
14288         Update.
14289         (build_section_addr_info_from_bfd)
14290         (build_section_addr_info_from_objfile): Likewise.
14291         (free_section_addr_info): Remove.
14292         (relative_addr_info_to_section_offsets): Change type of "addrs".
14293         (addrs_section_compar): Now a std::sort comparator.
14294         (addrs_section_sort): Change return type.
14295         (addr_info_make_relative): Change type of "addrs".  Update.
14296         (default_symfile_offsets, syms_from_objfile_1)
14297         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
14298         (symbol_file_add_separate): Update.
14299         (symbol_file_add): Change type of "addrs".  Update.
14300         (add_symbol_file_command): Update.  Remove cleanups.
14301         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
14302         cleanups.
14303         * symfile-debug.c (debug_sym_offsets): Change type of "info".
14304         * solib.c (solib_read_symbols): Update.
14305         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
14306         * machoread.c (macho_symfile_offsets): Update.
14307         * jit.c (jit_bfd_try_read_symtab): Update.
14308
14309 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
14310
14311         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14312         unittests/utils-selftests.c.
14313         * unittests/utils-selftests.c: New file.
14314
14315 2018-03-14  Tom Tromey  <tom@tromey.com>
14316
14317         PR cli/14977:
14318         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
14319         for NULL.
14320
14321 2018-03-14  Tom Tromey  <tom@tromey.com>
14322
14323         PR cli/19918:
14324         * printcmd.c (printf_pointer): Allow "-" in format.
14325
14326 2018-03-14  Tom Tromey  <tom@tromey.com>
14327
14328         * printcmd.c (_initialize_printcmd): Add usage to printf.
14329
14330 2018-03-14  Yao Qi  <qiyao@sourceware.org>
14331
14332         * MAINTAINERS: Update my email address.
14333
14334 2018-03-13  Tom Tromey  <tom@tromey.com>
14335
14336         * machoread.c (macho_check_dsym): Change filenamep to a
14337         std::string*.
14338         (macho_symfile_read): Update.
14339         * symfile.c (load_command): Use std::string.
14340
14341 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
14342
14343         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
14344         to error message string.
14345         (riscv_register_name): Use xsnprintf instead of sprintf.
14346         (riscv_insn::fetch_instruction): Use gdb_assert instead of
14347         internal_error.
14348         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
14349         error.
14350         (riscv_push_dummy_call): Likewise.
14351
14352 2018-03-12  Tom Tromey  <tom@tromey.com>
14353
14354         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
14355         Use gdb::byte_vector.
14356         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
14357
14358 2018-03-12  Yao Qi  <yao.qi@linaro.org>
14359
14360         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
14361         parameter type to readable_regcache.
14362         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
14363         the declaration.
14364
14365 2018-03-11  Tom Tromey  <tom@tromey.com>
14366
14367         * dwarf2read.c (struct nextfield): Add initializers.
14368         (struct nextfnfield): Remove.
14369         (struct fnfieldlist): Add initializers.  Remove "length" and
14370         "head", use std::vector.
14371         (struct decl_field_list): Remove.
14372         (struct field_info): Add initializers.
14373         <fields, baseclasses>: Now std::vector.
14374         <nbaseclasses, nfnfields, typedef_field_list_count,
14375         nested_types_list_count>: Remove.
14376         (dwarf2_add_field, dwarf2_add_type_defn)
14377         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
14378         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
14379         (process_structure_scope): Update.
14380
14381 2018-03-11  Tom Tromey  <tom@tromey.com>
14382
14383         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
14384         for use by std::sort.
14385         (build_type_psymtabs_1): Use std::vector.
14386
14387 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
14388
14389         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
14390         and LIBMPFR in the printed configuration.
14391
14392 2018-03-08  Tom Tromey  <tom@tromey.com>
14393
14394         * source.c (get_filename_and_charpos): Use scoped_fd.
14395         * nto-procfs.c (procfs_open_1): Use scoped_fd.
14396         (procfs_pidlist): Likewise.
14397         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
14398         (iterate_over_mappings): Likewise.
14399
14400 2018-03-08  Tom Tromey  <tom@tromey.com>
14401
14402         * infcall.c (struct call_return_meta_info)
14403         <stack_temporaries_enabled>: Remove.
14404         (get_call_return_value, call_function_by_hand_dummy): Update.
14405         * thread.c (disable_thread_stack_temporaries): Remove.
14406         (enable_thread_stack_temporaries): Remove.
14407         (thread_stack_temporaries_enabled_p): Return bool.
14408         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
14409         (get_last_thread_stack_temporary): Update.
14410         * eval.c (evaluate_subexp): Update.
14411         * gdbthread.h (class enable_thread_stack_temporaries): Now a
14412         class, not a function.
14413         (value_ptr, value_vec): Remove typedefs.
14414         (class thread_info) <stack_temporaries_enabled>: Now bool.
14415         <stack_temporaries>: Now a std::vector.
14416         (thread_stack_temporaries_enabled_p)
14417         (value_in_thread_stack_temporaries): Return bool.
14418
14419 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
14420
14421         * remote.c (putpkt_binary): Fix omitted bytes reporting.
14422         (getpkt_or_notif_sane_1): Likewise.
14423
14424 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14425
14426         * build-id.c (build_id_to_debug_bfd): Use std::string.
14427
14428 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14429
14430         * build-id.c (find_separate_debug_file_by_buildid): Return
14431         std::string.
14432         * build-id.h (find_separate_debug_file_by_buildid): Return
14433         std::string.
14434         * coffread.c (coff_symfile_read): Adjust to std::string.
14435         * elfread.c (elf_symfile_read): Adjust to std::string.
14436         * symfile.c (separate_debug_file_exists): Change parameter to
14437         std::string.
14438         (find_separate_debug_file): Return std::string.
14439         (find_separate_debug_file_by_debuglink): Return std::string.
14440         * symfile.h (find_separate_debug_file_by_debuglink): Return
14441         std::string.
14442
14443 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
14444
14445         * common/xml-utils.c (xml_escape_text): Move code to...
14446         (xml_escape_text_append): ... this new function.
14447         * common/xml-utils.h (xml_escape_text_append): New declaration.
14448         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
14449         New function.
14450         (_initialize_xml_utils): register test_xml_escape_text_append as
14451         a selftest.
14452
14453 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
14454
14455         * defs.h: Remove MAX_REGISTER_SIZE.
14456         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
14457         asserts.
14458         * python/py-unwind.c (pyuw_sniffer): Likewise.
14459
14460 2018-03-07  Tom Tromey  <tom@tromey.com>
14461
14462         * linux-tdep.c (linux_info_proc): Update.
14463         * target.h (struct target_ops) <to_fileio_readlink>: Return
14464         optional<string>.
14465         (target_fileio_readlink): Return optional<string>.
14466         * remote.c (remote_hostio_readlink): Return optional<string>.
14467         * inf-child.c (inf_child_fileio_readlink): Return
14468         optional<string>.
14469         * target.c (target_fileio_readlink): Return optional<string>.
14470
14471 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
14472
14473         * regcache.c (cooked_read_test): Add riscv to the list of
14474         architectures that have a save_reggroup.
14475
14476 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14477
14478         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
14479         value is not a dynamic class object.
14480
14481 2018-03-06  Tom Tromey  <tom@tromey.com>
14482
14483         * rust-exp.y: Formatting fixes.
14484
14485 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14486
14487         * riscv-tdep.c (riscv_register_name): Remove target description
14488         support.
14489         (riscv_gdbarch_init): Remove target description check.
14490
14491 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14492
14493         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
14494         comment.
14495         * riscv-tdep.h: Likewise.
14496
14497 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14498
14499         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
14500         (riscv_pseudo_register_write): Delete.
14501         (riscv_gdbarch_init): Remove all use of pseudo registers.
14502
14503 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14504
14505         * record-btrace.c (btrace_print_lines): Replace cleanup
14506         parameter with RAII equivalents.
14507         (btrace_insn_history): Replace cleanup with RAII equivalents.
14508         * ui-out.h (make_cleanup_ui_out_list_begin_end,
14509         make_cleanup_ui_out_tuple_begin_end): Remove.
14510         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
14511         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
14512         make_cleanup_ui_out_list_begin_end): Remove.
14513
14514 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14515
14516         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
14517         parameter types to std::vector.  Use bool.
14518         (record_btrace_wait): Replace VEC(tp_t) with
14519         std::vector<thread_info *>.
14520         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
14521
14522 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
14523
14524         * record-btrace.c (record_btrace_disable_callback): Remove.
14525         (struct scoped_btrace_disable): New.
14526         (record_btrace_open): Use scoped_btrace_disable.
14527
14528 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14529
14530         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
14531         reading values from registers.
14532
14533 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14534
14535         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
14536         where appropriate.
14537
14538 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14539
14540         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
14541         change parameter type.  Use GDB's print functions, and use
14542         core_addr_to_string where appropriate.
14543         (riscv_push_dummy_call): Use core_addr_to_string where
14544         appropriate, update call to riscv_print_arg_location, and reindent
14545         a few lines.
14546         (riscv_return_value): Update call to riscv_print_arg_location.
14547
14548 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14549             Tim Newsome <tim@sifive.com>
14550             Albert Ou <a0u@eecs.berkeley.edu>
14551             Darius Rad <darius@bluespec.com>
14552
14553         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
14554         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
14555         (ALLDEPFILES): Add riscv-tdep.c
14556         * configure.tgt: Add riscv support.
14557         * riscv-tdep.c: New file.
14558         * riscv-tdep.h: New file.
14559         * NEWS: Mention new target.
14560         * MAINTAINERS: Add entry for riscv.
14561
14562 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
14563
14564         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
14565         fields within aggregates.
14566
14567 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
14568
14569         * record-btrace.c (btrace_print_lines): Change type of flags to
14570         gdb_disassembly_flags.
14571
14572 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14573
14574         * fbsd-nat.c: Include "inf-ptrace.h".
14575         (USE_SIGTRAP_SIGINFO): Conditionally define.
14576         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
14577         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
14578         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
14579         function.
14580         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
14581         Likewise.
14582         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
14583         Likewise.
14584         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
14585         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
14586         "supports_stopped_by_hw_breakpoint" target methods.
14587
14588 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14589
14590         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
14591         * fbsd-nat.c (debug_fbsd_nat): New variable.
14592         (show_fbsd_nat_debug): New function.
14593         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
14594         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
14595
14596 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
14597
14598         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
14599         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
14600         prototype.
14601         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
14602         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
14603         method.
14604
14605 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14606
14607         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
14608         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
14609
14610 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14611
14612         * charset.c (struct charset_vector): New.
14613         (charsets): Change type to charset_vector.
14614         (find_charset_names): Adjust.
14615         (add_one): Adjust.
14616         (_initialize_charset): Adjust.
14617
14618 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14619
14620         * progspace.h (struct program_space) <deleted_solibs>: Change
14621         type to std::vector<std::string>.
14622         * progspace.c (clear_program_space_solib_cache): Adjust.
14623         * breakpoint.c (print_solib_event): Adjust.
14624         (check_status_catch_solib): Adjust.
14625         * solib.c (update_solib_list): Adjust.
14626         * ui-out.h (class ui_out) <field_string>: New overload.
14627         * ui-out.c (ui_out::field_string): New overload.
14628
14629 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14630
14631         * progspace.h (struct program_space): Add constructor and
14632         destructor, initialize fields.
14633         (add_program_space): Remove.
14634         * progspace.c (add_program_space): Rename to...
14635         (program_space::program_space): ... this.
14636         (release_program_space): Rename to...
14637         (program_space::~program_space): ... this.
14638         (delete_program_space): Use delete to delete program_space.
14639         (initialize_progspace): Use new to allocate program_space.
14640         * inferior.c (add_inferior_with_spaces): Likewise.
14641         (clone_inferior_command): Likewise.
14642         * infrun.c (follow_fork_inferior): Likewise.
14643         (handle_vfork_child_exec_or_exit): Likewise.
14644
14645 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
14646
14647         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
14648         (delim_string_to_char_ptr_vec): Return std::vector of
14649         gdb::unique_xmalloc_ptr.
14650         (dirnames_to_char_ptr_vec_append): Take std::vector of
14651         gdb::unique_xmalloc_ptr.
14652         (dirnames_to_char_ptr_vec): Return std::vector of
14653         gdb::unique_xmalloc_ptr.
14654         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
14655         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
14656         (delim_string_to_char_ptr_vec): Return an std::vector of
14657         gdb::unique_xmalloc_ptr, adjust the code.
14658         (dirnames_to_char_ptr_vec_append): Take an std::vector of
14659         gdb::unique_xmalloc_ptr, adjust the code.
14660         (dirnames_to_char_ptr_vec): Return an std::vector of
14661         gdb::unique_xmalloc_ptr, adjust the code.
14662         * auto-load.c (auto_load_safe_path_vec): Change type to
14663         std::vector of gdb::unique_xmalloc_ptr.
14664         (auto_load_expand_dir_vars): Return an std::vector of
14665         gdb::unique_xmalloc_ptr, adjust the code.
14666         (auto_load_safe_path_vec_update): Adjust.
14667         (filename_is_in_auto_load_safe_path_vec): Adjust.
14668         (auto_load_objfile_script_1): Adjust.
14669         * build-id.c (build_id_to_debug_bfd): Adjust.
14670         * linux-thread-db.c (thread_db_load_search): Adjust.
14671         * source.c (add_path): Adjust.
14672         (openp): Adjust.
14673         * symfile.c (find_separate_debug_file): Adjust.
14674         * utils.c (do_free_char_ptr_vec): Remove.
14675         (make_cleanup_free_char_ptr_vec): Remove.
14676
14677 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
14678
14679         PR gdb/22907
14680         * common/pathstuff.c: Conditionally include "<windows.h>".
14681
14682 2018-03-01  Georg Sauthoff  <mail@georg.so>
14683
14684         PR gdb/22888
14685         * gcore.in: Quote variables and switch interpreter to bash.
14686
14687 2018-03-01  Tom Tromey  <tom@tromey.com>
14688
14689         * dwarf2read.c (alloc_discriminant_info): Fix default_index
14690         assertion.  Add assertion for discriminant_index.
14691         (quirk_rust_enum): Use correct base type name in univariant case.
14692
14693 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
14694
14695         * record.c (get_call_history_modifiers): Return a
14696         record_print_flags.
14697         (cmd_record_call_history): Adjust.
14698         * record-btrace.c (record_btrace_call_history): Adjust.
14699         (record_btrace_call_history_range): Adjust.
14700         (record_btrace_call_history_from): Adjust.
14701         * target-debug.h (target_debug_print_record_print_flags): New.
14702         * target-delegates.c: Re-generate.
14703         * target.c (target_call_history): Change flags type.
14704         (target_call_history_from): Likewise.
14705         (target_call_history_range): Likewise.
14706         * target.h (struct target_ops) <target_call_history>: Likewise.
14707         (target_call_history_from): Likewise.
14708         (target_call_history_range): Likewise.
14709
14710 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14711             Simon Marchi  <simon.marchi@polymtl.ca>
14712
14713         * common/common-utils.c: Include "sys/stat.h".
14714         (is_regular_file): Move here from "source.c"; change return
14715         type to "bool".
14716         * common/common-utils.h (is_regular_file): New prototype.
14717         * common/pathstuff.c (contains_dir_separator): New function.
14718         * common/pathstuff.h (contains_dir_separator): New prototype.
14719         * source.c: Don't include "sys/stat.h".
14720         (is_regular_file): Move to "common/common-utils.c".
14721
14722 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
14723
14724         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
14725         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
14726         * auto-load.c: Include "common/pathstuff.h".
14727         * common/common-def.h (current_directory): Move here.
14728         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
14729         function.
14730         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
14731         prototype.
14732         * common/pathstuff.c: New file.
14733         * common/pathstuff.h: New file.
14734         * compile/compile.c: Include "common/pathstuff.h".
14735         * defs.h (current_directory): Move to "common/common-defs.h".
14736         * dwarf2read.c: Include "common/pathstuff.h".
14737         * exec.c: Likewise.
14738         * guile/scm-safe-call.c: Likewise.
14739         * linux-thread-db.c: Likewise.
14740         * main.c: Likewise.
14741         * nto-tdep.c: Likewise.
14742         * objfiles.c: Likewise.
14743         * source.c: Likewise.
14744         * symtab.c: Likewise.
14745         * utils.c: Include "common/pathstuff.h".
14746         (gdb_realpath): Move to "common/pathstuff.c".
14747         (gdb_realpath_keepfile): Likewise.
14748         (gdb_abspath): Likewise.
14749         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
14750         (gdb_realpath_keepfile): Likewise.
14751         (gdb_abspath): Likewise.
14752
14753 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
14754
14755         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
14756         wildcard process pid for super_resume for kernels with a
14757         specific bug.
14758
14759 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
14760
14761         * compile/compile.c (get_args): Add additional comments
14762         explaining function.
14763
14764 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
14765             Tom Tromey  <tom@tromey.com>
14766
14767         * target.h (memory_write_request_s): Remove typedef.  Don't define
14768         VEC.
14769         (target_write_memory_blocks): Change argument to std::vector.
14770         (struct memory_write_request): Add constructor.
14771         * target-memory.c (compare_block_starting_address): Return bool.
14772         Change argument types.
14773         (claim_memory): Change arguments to use std::vector.
14774         (split_regular_and_flash_blocks, blocks_to_erase)
14775         (compute_garbled_blocks): Likewise.
14776         (cleanup_request_data, cleanup_write_requests_vector): Remove.
14777         (target_write_memory_blocks): Change argument to std::vector.
14778         * symfile.c (struct load_section_data): Add constructor and
14779         destructor.  Use std::vector for "requests".
14780         (struct load_progress_data): Add initializers.
14781         (load_section_callback): Update.  Use "new".
14782         (clear_memory_write_data): Remove.
14783         (generic_load): Update.
14784
14785 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
14786
14787         * arch/aarch64.h: Use common/tdesc.h.
14788
14789 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14790
14791         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
14792         architecture with a 64-bit ABI.
14793
14794 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
14795
14796         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
14797         ahead of target description loading.
14798
14799 2018-02-26  Tom Tromey  <tom@tromey.com>
14800
14801         * stack.c (backtrace_command_1): Update.
14802         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
14803         of "flags".
14804         * python/py-framefilter.c (py_print_frame)
14805         (gdbpy_apply_frame_filter): Change type of "flags".
14806         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
14807         of "flags".
14808         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
14809         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
14810         * extension.h (enum frame_filter_flag): Rename from
14811         frame_filter_flags.
14812         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
14813         (apply_ext_lang_frame_filter): Change type of "flags".
14814         * extension.c (apply_ext_lang_frame_filter): Change type of
14815         "flags".
14816         * extension-priv.h (struct extension_language_ops)
14817         <apply_frame_filter>: Change type of "flags".
14818
14819 2018-02-26  Tom Tromey  <tom@tromey.com>
14820
14821         PR python/16497:
14822         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
14823         off-by-one in py_end computation.
14824         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
14825         PRINT_MORE_FRAMES.
14826         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
14827         constant.
14828
14829 2018-02-26  Tom Tromey  <tom@tromey.com>
14830
14831         * dwarf2read.c (struct variant_field): New.
14832         (struct nextfield) <variant>: New field.
14833         (dwarf2_add_field): Handle DW_TAG_variant_part.
14834         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
14835         discriminated union.
14836         (read_structure_type): Handle DW_TAG_variant_part.
14837         (handle_struct_member_die): New function, extracted from
14838         process_structure_scope.  Handle DW_TAG_variant.
14839         (process_structure_scope): Handle discriminated unions.  Call
14840         handle_struct_member_die.
14841
14842 2018-02-26  Tom Tromey  <tom@tromey.com>
14843
14844         * rust-lang.h (rust_last_path_segment): Declare.
14845         * rust-lang.c (rust_last_path_segment): Now public.  Change
14846         contract.
14847         (struct disr_info): Remove.
14848         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
14849         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
14850         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
14851         (rust_enum_p, rust_enum_variant): New function.
14852         (rust_underscore_fields): Remove "offset" parameter.
14853         (rust_print_enum): New function.
14854         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
14855         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
14856         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
14857         enums.
14858         (rust_internal_print_type): New function, from rust_print_type.
14859         Remove enum code.
14860         (rust_print_type): Call rust_internal_print_type.
14861         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
14862         Update enum handling.
14863         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
14864         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
14865         (rust_union_quirks): New functions.
14866         (process_full_comp_unit, process_full_type_unit): Call
14867         rust_union_quirks.
14868         (process_structure_scope): Update rust_unions if necessary.
14869
14870 2018-02-26  Tom Tromey  <tom@tromey.com>
14871
14872         * value.h (value_union_variant): Declare.
14873         * valops.c (value_union_variant): New function.
14874         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
14875         (struct discriminant_info): New.
14876         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
14877         enumerator.
14878         (struct main_type) <flag_discriminated_union>: New field.
14879
14880 2018-02-26  Tom Tromey  <tom@tromey.com>
14881
14882         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14883         unittests/unpack-selftests.c.
14884         * unittests/unpack-selftests.c: New file.
14885         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
14886
14887 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14888
14889         * dwarf2read.c (struct partial_die_info) <read>: New method.
14890         (read_partial_die): Remove the declaration.
14891         (load_partial_dies): Update.
14892         (partial_die_info::partial_die_info):
14893         (read_partial_die): Change it to partial_die_info::read.
14894
14895 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14896
14897         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
14898         (fixup_partial_die): Remove declaration.
14899         (scan_partial_symbols): Update.
14900         (partial_die_parent_scope): Likewise.
14901         (partial_die_full_name): Likewise.
14902         (fixup_partial_die): Change it to partial_die_info::fixup.
14903
14904 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14905
14906         * dwarf2read.c (read_partial_die): Update the declaration.
14907         (load_partial_dies): Caller update.
14908         (read_partial_die): Remove one argument abbrev_len.
14909
14910 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14911
14912         * dwarf2read.c (struct partial_die_info): Add ctor, delete
14913         assignment operator.
14914         (load_partial_dies): Use ctor and copy ctor.
14915         (read_partial_die): Update.
14916         (dwarf2_cu::find_partial_die): Use ctor.
14917
14918 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14919
14920         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
14921         (find_partial_die_in_comp_unit): Change it to
14922         dwarf2_cu::find_partial_die.
14923         (find_partial_die): Update.
14924
14925 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14926
14927         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
14928         is NULL.
14929
14930 2018-02-26  Yao Qi  <yao.qi@linaro.org>
14931
14932         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
14933
14934 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
14935
14936         * arch/amd64.h: Use common/tdesc.h.
14937         * arch/i386.c: Likewise.
14938         * arch/i386.h: Likewise.
14939         * arch/tic6x.c: Likewise.
14940         * arch/tdesc.h: Move file from here...
14941         * common/tdesc.h: ...to here.
14942         * features/aarch64-core.c: Regenerate.
14943         * features/aarch64-fpu.c: Regenerate.
14944         * features/i386/32bit-avx.c: Regenerate.
14945         * features/i386/32bit-avx512.c: Regenerate.
14946         * features/i386/32bit-core.c: Regenerate.
14947         * features/i386/32bit-linux.c: Regenerate.
14948         * features/i386/32bit-mpx.c: Regenerate.
14949         * features/i386/32bit-pkeys.c: Regenerate.
14950         * features/i386/32bit-sse.c: Regenerate.
14951         * features/i386/64bit-avx.c: Regenerate.
14952         * features/i386/64bit-avx512.c: Regenerate.
14953         * features/i386/64bit-core.c: Regenerate.
14954         * features/i386/64bit-linux.c: Regenerate.
14955         * features/i386/64bit-mpx.c: Regenerate.
14956         * features/i386/64bit-pkeys.c: Regenerate.
14957         * features/i386/64bit-segments.c: Regenerate.
14958         * features/i386/64bit-sse.c: Regenerate.
14959         * features/i386/x32-core.c: Regenerate.
14960         * features/tic6x-c6xp.c: Regenerate.
14961         * features/tic6x-core.c: Regenerate.
14962         * features/tic6x-gp.c: Regenerate.
14963         * target-descriptions.c: Use common/tdesc.h.
14964         * target-descriptions.h: Likewise.
14965
14966 2018-02-24  Tom Tromey  <tom@tromey.com>
14967
14968         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
14969         (try_thread_db_load_from_dir, thread_db_load_search): Use
14970         std::string.
14971         (info_auto_load_libthread_db_compare): Return bool.  Change
14972         argument types.
14973         (info_auto_load_libthread_db): Use std::vector, std::string.
14974         Remove cleanups.
14975
14976 2018-02-24  Tom Tromey  <tom@tromey.com>
14977
14978         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
14979         std::string.
14980         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
14981         std::string*.
14982         * gdbarch.c: Rebuild.
14983         * gdbarch.h: Rebuild.
14984         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
14985         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
14986         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
14987         std::string*.
14988
14989 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
14990
14991         * gdbtypes.h (sect_offset): Change type to uint64_t.
14992         (sect_offset_str): New function.
14993         * dwarf2read.c (create_addrmap_from_aranges): Use
14994         sect_offset_str.
14995         (error_check_comp_unit_head): Likewise.
14996         (create_debug_type_hash_table): Likewise.
14997         (read_cutu_die_from_dwo): Likewise.
14998         (init_cutu_and_read_dies): Likewise.
14999         (init_cutu_and_read_dies_no_follow): Likewise.
15000         (process_psymtab_comp_unit_reader): Likewise.
15001         (partial_die_parent_scope): Likewise.
15002         (peek_die_abbrev): Likewise.
15003         (process_queue): Likewise.
15004         (dwarf2_physname): Likewise.
15005         (read_namespace_alias): Likewise.
15006         (read_import_statement): Likewise.
15007         (create_dwo_cu_reader): Likewise.
15008         (create_cus_hash_table): Likewise.
15009         (lookup_dwo_cutu): Likewise.
15010         (inherit_abstract_dies): Likewise.
15011         (read_func_scope): Likewise.
15012         (read_call_site_scope): Likewise.
15013         (dwarf2_add_member_fn): Likewise.
15014         (read_common_block): Likewise.
15015         (read_module_type): Likewise.
15016         (read_typedef): Likewise.
15017         (read_subrange_type): Likewise.
15018         (load_partial_dies): Likewise.
15019         (read_partial_die): Likewise.
15020         (find_partial_die): Likewise.
15021         (read_str_index): Likewise.
15022         (dwarf2_string_attr): Likewise.
15023         (build_error_marker_type): Likewise.
15024         (lookup_die_type): Likewise.
15025         (dump_die_shallow): Likewise.
15026         (follow_die_ref): Likewise.
15027         (dwarf2_fetch_die_loc_sect_off): Likewise.
15028         (dwarf2_fetch_constant_bytes): Likewise.
15029         (follow_die_sig): Likewise.
15030         (get_signatured_type): Likewise.
15031         (get_DW_AT_signature_type): Likewise.
15032         (dwarf2_find_containing_comp_unit): Likewise.
15033         (set_die_type): Likewise.
15034
15035 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
15036
15037         * arch/aarch64.c: Include "common-defs.h".
15038         * arch/amd64.c: Likewise.
15039         * arch/i386.c: Likewise.
15040
15041 2018-02-21  Tom Tromey  <tom@tromey.com>
15042
15043         * value.h: (extract_field_op): Update.
15044         * eval.c (extract_field_op): Return a const char *.
15045         * expression.h (parse_expression_for_completion): Update.
15046         * completer.c (complete_expression): Update.
15047         (add_struct_fields): Make fieldname const.
15048         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
15049         (mark_completion_tag, parse_exp_in_context_1): Update.
15050         (parse_expression_for_completion): Change "name" to
15051         unique_xmalloc_ptr*.
15052
15053 2018-02-21  Tom Tromey  <tom@tromey.com>
15054
15055         * infcall.c (call_function_by_hand_dummy): Use std::vector.
15056
15057 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15058
15059         * avr-tdep.c (avr_read_pc): Change parameter type to
15060         readable_regcache.
15061         * gdbarch.sh (read_pc): Likewise.
15062         * gdbarch.c: Re-generated.
15063         * gdbarch.h: Re-generated.
15064         * hppa-tdep.c (hppa_read_pc): Change parameter type to
15065         readable_regcache.
15066         * ia64-tdep.c (ia64_read_pc): Likewise.
15067         * mips-tdep.c (mips_read_pc): Likewise.
15068         * spu-tdep.c (spu_read_pc): Likewise.
15069
15070 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15071
15072         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
15073         * regcache-dump.c: New file.
15074         * regcache.c: Move register_dump to regcache-dump.c.
15075         (maintenance_print_registers): Likewise.
15076         (maintenance_print_raw_registers): Likewise.
15077         (maintenance_print_cooked_registers): Likewise.
15078         (maintenance_print_register_groups): Likewise.
15079         (maintenance_print_remote_registers): Likewise.
15080         (_initialize_regcache): Likewise.
15081         * regcache.h (register_dump): Moved from regcache.c.
15082
15083 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15084
15085         * regcache.c (regcache::regcache): Update.
15086         (regcache::invalidate): Move it to detached_regcache::invalidate.
15087         (get_thread_arch_aspace_regcache): Update.
15088         (regcache::raw_update): Update.
15089         (regcache::cooked_read): Remove some code.
15090         (regcache::cooked_read_value): Likewise.
15091         (regcache::raw_write): Remove assert on m_readonly_p.
15092         (regcache::raw_supply_integer): Move it to
15093         detached_regcache::raw_supply_integer.
15094         (regcache::raw_supply_zeroed): Likewise.
15095         * regcache.h (detached_regcache) <raw_supply_integer>: New
15096         declaration.
15097         <raw_supply_zeroed, invalidate>: Likewise.
15098         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
15099         <invalidate>: Likewise.
15100         <m_readonly_p>: Removed.
15101
15102 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15103
15104         * infcmd.c (get_return_value): Let stop_regs point to
15105         get_current_regcache.
15106         * regcache.c (regcache::regcache): Remove.
15107         (register_dump_reg_buffer): New class.
15108         (regcache_print): Adjust.
15109         * regcache.h (regcache): Remove constructors.
15110
15111 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15112
15113         * regcache.c (class register_dump): New class.
15114         (register_dump_regcache, register_dump_none): New class.
15115         (register_dump_remote, register_dump_groups): New class.
15116         (regcache_print): Update.
15117         * regcache.h (regcache_dump_what): Move it to regcache.c.
15118         (regcache) <dump>: Remove.
15119
15120 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15121
15122         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
15123          reg_buffer_rw *.
15124         (jit_unwind_reg_set_impl): Call raw_supply.
15125         (jit_frame_sniffer): Use reg_buffer_rw.
15126         * record-full.c (record_full_core_regbuf): Change its type.
15127         (record_full_core_open_1): Use reg_buffer_rw.
15128         (record_full_close): Likewise.
15129         (record_full_core_fetch_registers): Use regcache->raw_supply.
15130         (record_full_core_store_registers): Likewise.
15131         * regcache.c (regcache::get_register_status): Move it to
15132         reg_buffer.
15133         (regcache_raw_set_cached_value): Remove.
15134         (regcache::raw_set_cached_value): Remove.
15135         (regcache::raw_write): Call raw_supply.
15136         (regcache::raw_supply): Move it to reg_buffer_rw.
15137         * regcache.h (regcache_raw_set_cached_value): Remove.
15138         (reg_buffer_rw): New class.
15139
15140 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15141
15142         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
15143         readonly_detached_regcache.
15144         (dummy_frame_prev_register): Use regcache->cooked_read.
15145         * frame.c (frame_save_as_regcache): Change return type.
15146         (frame_pop): Update.
15147         * frame.h (frame_save_as_regcache): Update declaration.
15148         * inferior.h (get_infcall_suspend_state_regcache): Update
15149         declaration.
15150         * infrun.c (infcall_suspend_state) <registers>: use
15151         readonly_detached_regcache.
15152         (save_infcall_suspend_state): Don't use regcache_dup.
15153         (get_infcall_suspend_state_regcache): Change return type.
15154         * linux-fork.c (struct fork_info) <savedregs>: Change to
15155         readonly_detached_regcache.
15156         <pc>: New field.
15157         (fork_save_infrun_state): Don't use regcache_dup.
15158         (info_checkpoints_command): Adjust.
15159         * mi/mi-main.c (register_changed_p): Update declaration.
15160         (mi_cmd_data_list_changed_registers): Use
15161         readonly_detached_regcache.
15162         (register_changed_p): Change parameter type to
15163         readonly_detached_regcache.
15164         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
15165         readonly_detached_regcache.
15166         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
15167         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
15168         New.
15169         (regcache::save): Move it to reg_buffer.
15170         (regcache::restore): Change parameter type.
15171         (regcache_dup): Remove.
15172         * regcache.h (reg_buffer) <save>: New method.
15173         (readonly_detached_regcache): New class.
15174         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
15175         readonly_detached_regcache.
15176         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
15177
15178 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15179
15180         * frame.c (frame_save_as_regcache): Use regcache method save.
15181         (frame_pop): Use regcache method restore.
15182         * infrun.c (restore_infcall_suspend_state): Likewise.
15183         * linux-fork.c (fork_load_infrun_state): Likewise.
15184         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
15185         save.
15186         * regcache.c (regcache_save): Remove.
15187         (regcache::restore): More asserts.
15188         (regcache_cpy): Remove.
15189         * regcache.h (regcache_save): Remove the declaration.
15190         (regcache::restore): Move from private to public.
15191         Remove the friend declaration of regcache_cpy.
15192         (regcache_cpy): Remove declaration.
15193
15194 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15195
15196         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
15197         parameter type to 'readable_regcache *'.
15198         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15199         * arm-tdep.c (arm_neon_quad_read): Likewise.
15200         (arm_pseudo_read): Likewise.
15201         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15202         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15203         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15204         * gdbarch.c: Re-generated.
15205         * gdbarch.h: Re-generated.
15206         * gdbarch.sh (pseudo_register_read): Change parameter type to
15207         'readable_regcache *'.
15208         (pseudo_register_read_value): Likewise.
15209         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
15210         (h8300_pseudo_register_read): Likewise.
15211         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
15212         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15213         (i386_pseudo_register_read_into_value): Likewise.
15214         (i386_pseudo_register_read_value): Likewise.
15215         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
15216         declaration.
15217         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
15218         * m32c-tdep.c (m32c_raw_read): Likewise.
15219         (m32c_read_flg): Likewise.
15220         (m32c_banked_register): Likewise.
15221         (m32c_banked_read): Likewise.
15222         (m32c_sb_read): Likewise.
15223         (m32c_part_read): Likewise.
15224         (m32c_cat_read): Likewise.
15225         (m32c_r3r2r1r0_read): Likewise.
15226         (m32c_pseudo_register_read): Likewise.
15227         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15228         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15229         (mep_pseudo_cr64_read): Likewise.
15230         (mep_pseudo_register_read): Likewise.
15231         * mips-tdep.c (mips_pseudo_register_read): Likewise.
15232         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15233         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15234         * regcache.c (regcache::raw_read): Move it to readable_regcache.
15235         (regcache::cooked_read): Likewise.
15236         (regcache::cooked_read_value): Likewise.
15237         (regcache_cooked_read_signed):
15238         (regcache::cooked_read): Likewise.
15239         * regcache.h (readable_regcache): New class.
15240         (regcache): Inherit readable_regcache.  Move some methods to
15241         readable_regcache.
15242         * rl78-tdep.c (rl78_pseudo_register_read): Change
15243         parameter type to 'readable_regcache *'.
15244         * rs6000-tdep.c (do_regcache_raw_read): Remove.
15245         (e500_pseudo_register_read): Change parameter type to
15246         'readable_regcache *'.
15247         (dfp_pseudo_register_read): Likewise.
15248         (vsx_pseudo_register_read): Likewise.
15249         (efpr_pseudo_register_read): Likewise.
15250         * s390-tdep.c (s390_pseudo_register_read): Likewise.
15251         * sh-tdep.c (sh_pseudo_register_read): Likewise.
15252         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
15253         (sh64_pseudo_register_read): Likewise.
15254         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
15255         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15256         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
15257         (spu_pseudo_register_read): Likewise.
15258         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15259         (xtensa_pseudo_register_read): Likewise.
15260
15261 2018-02-21  Yao Qi  <yao.qi@linaro.org>
15262
15263         * regcache.c (regcache::regcache): Call reg_buffer ctor.
15264         (regcache::arch): Move it to reg_buffer::arch.
15265         (regcache::register_buffer): Likewise.
15266         (regcache::assert_regnum): Likewise.
15267         (regcache::num_raw_registers): Likewise.
15268         * regcache.h (reg_buffer): New class.
15269         (regcache): Inherit reg_buffer.
15270
15271 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
15272
15273         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
15274         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
15275
15276 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
15277
15278         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
15279
15280 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
15281
15282         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
15283         (SFILES): Remove common/*.c files.
15284         (COMMON_OBS): Remove some *.o files built from common/*.c files.
15285         * common/common.host: Add common reference.
15286         * configure.ac: Likewise.
15287         * configure: Regenerate.
15288
15289 2018-02-16  Yao Qi  <yao.qi@linaro.org>
15290
15291         * block.c (block_namespace_info): Inherit allocate_on_obstack.
15292         (block_initialize_namespace): Use new.
15293         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
15294         (dwarf2_free_objfile): Use delete.
15295         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
15296         (copy_type_recursive): Use new.
15297         * gdb_obstack.h (allocate_on_obstack): New.
15298
15299 2018-02-15  Yao Qi  <yao.qi@linaro.org>
15300
15301         PR gdb/22849
15302         * inferior.c (exit_inferior_1): Reset inf->control.
15303
15304 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
15305
15306         * ada-lang.c (ada_to_fixed_value_create): Delete advance
15307         declaration.
15308
15309 2018-02-14  Pedro Alves  <palves@redhat.com>
15310
15311         * frame-unwind.c (frame_unwind_try_unwinder): Always call
15312         frame_cleanup_after_sniffer on exception.
15313
15314 2018-02-14  Tom Tromey  <tom@tromey.com>
15315
15316         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
15317         const.
15318         (solib_bfd_open): Make pathname const.
15319         * solib.c (solib_bfd_open): Make pathname const.
15320         * solib-spu.c (spu_bfd_fopen): Make name const.
15321         (spu_bfd_open): Make pathname const.
15322         * solib-darwin.c (darwin_bfd_open): Make pathname const.
15323         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
15324
15325 2018-02-14  Tom Tromey  <tom@tromey.com>
15326
15327         * symfile.c (symfile_bfd_open): Update.
15328         * source.h (openp, source_full_path_of, find_and_open_source):
15329         Change argument type to unique_xmalloc_ptr.
15330         * source.c (openp): Take a unique_xmalloc_ptr.
15331         (source_full_path_of, find_and_open_source): Likewise.
15332         (open_source_file, symtab_to_fullname): Update.
15333         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
15334         unique_xmalloc_ptr.
15335         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
15336         (exec_file_find): Update.
15337         * psymtab.c (psymtab_to_fullname): Update.
15338         * nto-tdep.h (nto_find_and_open_solib): Update.
15339         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
15340         unique_xmalloc_ptr.
15341         * exec.c (exec_file_attach): Update.
15342         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
15343         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
15344
15345 2018-02-14  Tom Tromey  <tom@tromey.com>
15346
15347         * solib.c: Include source.h.
15348         * nto-tdep.c: Include source.h.
15349         * mi/mi-cmd-env.c: Include source.h.
15350         * infcmd.c: Include source.h.
15351         * exec.c: Include source.h.
15352         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
15353         (add_path, directory_switch, source_path, init_source_path): Move
15354         declarations...
15355         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
15356         (add_path, directory_switch, source_path, init_source_path):
15357         ...here.
15358
15359 2018-02-14  Tom Tromey  <tom@tromey.com>
15360
15361         * solist.h (exec_file_find, solib_find): Return
15362         unique_xmalloc_ptr.
15363         (solib_bfd_fopen): Take a const char *.
15364         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
15365         (exec_file_find, solib_find): Likewise.
15366         (solib_bfd_fopen): Do not take ownership of "pathname".
15367         (solib_bfd_open): Use unique_xmalloc_ptr.
15368         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
15369         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
15370         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
15371         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
15372
15373 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
15374
15375         * ada-lang.c (name_match_type_from_name): Remove reference to
15376         ada_name_for_lookup in function's documentation.
15377         * ada-lang.h (ada_name_for_lookup): Delete declaration.
15378
15379 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15380
15381         * defs.h (enum openp_flags): New enum.
15382         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
15383         Move to enum openp_flags.
15384         (openp_flags): New enum flags.
15385         (openp): Change parameter type to openp_flags.
15386         * source.c (openp): Change parameter type to openp_flags.
15387         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
15388         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
15389
15390 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
15391
15392         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
15393         per-command.
15394
15395 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
15396
15397         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
15398         into...
15399         (class dwarf2_queue_guard): ...the destructor of this new class.
15400         (dw2_do_instantiate_symtab): Create instance of the new class
15401         dwarf2_queue_guard, remove cleanup.
15402
15403 2018-02-09  Tom Tromey  <tom@tromey.com>
15404
15405         * source.c (find_source_lines): Don't reference past the end of
15406         the vector.
15407
15408 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15409
15410         * remote.c (remote_btrace_maybe_reopen): Change error message.
15411         * btrace.c (btrace_enable): Likewise.
15412         (parse_xml_btrace): Likewise.
15413         (parse_xml_btrace_conf): Likewise.
15414
15415 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15416
15417         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
15418         (linux_enable_pt, linux_enable_bts): Call
15419         diagnose_perf_event_open_fail.
15420
15421 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15422
15423         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
15424         Remove parameter and change return type.  Update callers.  Move it.
15425         (linux_enable_bts, linux_enable_pt): Improve error message.
15426         (linux_enable_pt): Remove zero buffer size check.
15427         (linux_enable_btrace): Improve error messages.  Remove NULL return
15428         check.
15429
15430 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15431
15432         * btrace.c (btrace_enable): Remove target_supports_btrace call.
15433         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
15434         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15435         (linux_supports_pt, linux_supports_btrace): Remove.
15436         (linux_enable_bts): Call cpu_supports_bts.
15437         * nat/linux-btrace.h (linux_supports_btrace): Remove.
15438         * remote.c (remote_supports_btrace): Remove.
15439         (init_remote_ops): Remove remote_supports_btrace.
15440         * target-delegates.c: Regenerated.
15441         * target.c (target_supports_btrace): Remove.
15442         * target.h (target_ops) <to_supports_btrace>: Remove
15443         (target_supports_btrace): Remove.
15444         * x86-linux-nat.c (x86_linux_create_target): Remove
15445         linux_supports_btrace.
15446
15447 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15448
15449         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
15450         btrace failed.
15451         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
15452         exception and use message in own exception.
15453
15454 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15455
15456         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
15457         (perf_event_pt_event_type): Use gdb_file_up.
15458         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
15459         scoped_fd, and scoped_mmap.
15460
15461 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15462
15463         * common/scoped_mmap.h: New.
15464         * unittests/scoped_mmap-selftest.c: New.
15465         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15466         unittests/scoped_mmap-selftest.c.
15467
15468 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
15469
15470         * common/scoped_fd.h: New.
15471         * unittests/scoped_fd-selftest.c: New.
15472         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15473         unittests/scoped_fd-selftest.c.
15474
15475 2018-02-09  Tom Tromey  <tom@tromey.com>
15476
15477         * auto-load.c (auto_load_section_scripts): Use
15478         gdb::unique_xmalloc_ptr.
15479
15480 2018-02-09  Tom Tromey  <tom@tromey.com>
15481
15482         * auto-load.c (execute_script_contents): Use std::string.
15483
15484 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
15485
15486         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
15487         Python function, rather than a new command.
15488
15489 2018-02-08  Tom Tromey  <tom@tromey.com>
15490
15491         * solib.c (solib_find_1): Use std::string.
15492         (solib_bfd_fopen): Use unique_xmalloc_ptr.
15493
15494 2018-02-08  Tom Tromey  <tom@tromey.com>
15495
15496         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
15497
15498 2018-02-08  Tom Tromey  <tom@tromey.com>
15499
15500         * source.c (find_source_lines): Use gdb::def_vector.
15501
15502 2018-02-08  Tom Tromey  <tom@tromey.com>
15503
15504         * macrocmd.c (struct temporary_macro_definition): New.
15505         (macro_define_command): Use temporary_macro_definition.  Remove
15506         cleanups.
15507         (free_macro_definition_ptr): Remove.
15508
15509 2018-02-08  Tom Tromey  <tom@tromey.com>
15510
15511         * macroexp.c (maybe_expand): Use std::string.
15512
15513 2018-02-08  Tom Tromey  <tom@tromey.com>
15514
15515         * macroexp.c (struct macro_buffer): Add initializers for some
15516         members.
15517         (init_buffer, init_shared_buffer, free_buffer)
15518         (free_buffer_return_text): Remove.
15519         (macro_buffer): New constructors.
15520         (~macro_buffer): New destructor.
15521         (macro_buffer::set_shared): New method.
15522         (macro_buffer::resize_buffer, macro_buffer::appendc)
15523         (macro_buffer::appendmem): Now methods, not free functions.
15524         (set_token, append_tokens_without_splicing, stringify)
15525         (macro_stringify): Update.
15526         (gather_arguments): Change return type.  Remove argc_p argument,
15527         add args_ptr argument.  Use std::vector.
15528         (substitute_args): Remove argc argument.  Accept std::vector.
15529         (expand): Update.  Use std::vector.
15530         (scan, macro_expand, macro_expand_next): Update.
15531
15532 2018-02-08  Tom Tromey  <tom@tromey.com>
15533
15534         * symtab.c (default_collect_symbol_completion_matches_break_on):
15535         Use unique_xmalloc_ptr.
15536         * macroscope.h: (sal_macro_scope, user_macro_scope)
15537         (default_macro_scope): Return unique_xmalloc_ptr.
15538         * macroscope.c (sal_macro_scope, user_macro_scope)
15539         (default_macro_scope): Return unique_xmalloc_ptr.
15540         * macroexp.h (macro_expand, macro_expand_once): Return
15541         unique_xmalloc_ptr.
15542         * macroexp.c (macro_expand, macro_expand_once): Return
15543         unique_xmalloc_ptr.
15544         * macrocmd.c (macro_expand_command, macro_expand_once_command)
15545         (info_macro_command, info_macros_command): Use
15546         unique_xmalloc_ptr.
15547         * compile/compile-c-support.c (write_macro_definitions): Use
15548         unique_xmalloc_ptr.
15549         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
15550
15551 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
15552
15553         * value.c (value_static_field): Assign field type instead of
15554         containing type when returning an optimized out value.
15555
15556 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15557
15558         * ft32-tdep.c (ft32_read_pc): Remove.
15559         (ft32_write_pc): Remove.
15560         (ft32_gdbarch_init): Update.
15561         * m32r-tdep.c (m32r_read_pc): Remove.
15562         (m32r_gdbarch_init): Update.
15563         * mep-tdep.c (mep_read_pc): Remove.
15564         (mep_gdbarch_init): Update.
15565         * microblaze-tdep.c (microblaze_write_pc): Remove.
15566         (microblaze_gdbarch_init): Update.
15567         * mn10300-tdep.c (mn10300_read_pc): Remove.
15568         (mn10300_write_pc): Remove.
15569         (mn10300_gdbarch_init): Update.
15570         * moxie-tdep.c (moxie_read_pc): Remove.
15571         (moxie_write_pc): Remove.
15572         (moxie_gdbarch_init): Update.
15573
15574 2018-02-06  Yao Qi  <yao.qi@linaro.org>
15575
15576         * expprint.c (print_subexp_standard): Handle
15577         OP_F77_UNDETERMINED_ARGLIST.
15578         (dump_subexp_body_standard): Likewise.
15579
15580 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
15581
15582         * target-descriptions.c (tdesc_element_visitor) Add empty
15583         implementations.
15584         (tdesc_type): Move make_gdb_type from here.
15585         (tdesc_type_builtin): Likewise.
15586         (tdesc_type_vector): Likewise.
15587         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
15588         (make_gdb_type_struct): Move from tdesc_type_with_fields.
15589         (make_gdb_type_union): Likewise.
15590         (make_gdb_type_flags): Likewise.
15591         (make_gdb_type_enum): Likewise.
15592         (make_gdb_type): New function.
15593         (tdesc_register_type): Use static make_gdb_type.
15594
15595 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
15596
15597         * infcmd.c (default_print_one_register_info): Align natural-format
15598         column values consistently one under another.
15599         (pad_to_column): New function.
15600
15601 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
15602
15603         * dwarf2read.c (dwarf2_physname): Move commment.
15604
15605 2018-02-01  Leszek Swirski  <leszeks@google.com>
15606
15607         * varobj.c (varobj_formatted_print_options): Allow recursive
15608         pretty printing if pretty printing is enabled.
15609
15610 2018-02-01  Leszek Swirski  <leszeks@google.com>
15611
15612         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
15613         names after a structop as a filename.
15614
15615 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15616
15617         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
15618         (arm_record_coproc_data_proc): Likewise.
15619
15620 2018-02-01  Yao Qi  <yao.qi@linaro.org>
15621
15622         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
15623
15624 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
15625
15626         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
15627         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
15628
15629 2018-01-31  Pedro Alves  <palves@redhat.com>
15630
15631         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
15632         * inflow.c (child_terminal_save_inferior): Wrap reference to
15633         tcgetpgrp in HAVE_TERMIOS_H.
15634         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
15635         _WIN32.
15636         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
15637         always iterate over all inferiors.
15638         (gdbsim_cntrl_c): Adjust.
15639         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
15640
15641 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15642
15643         * gdbtypes.c (lookup_array_range_type): Make sure the array's
15644         index type is objfile-owned if the element type is as well.
15645
15646 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
15647
15648         GDB 8.1 released.
15649
15650 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15651
15652         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
15653         "features/s390x-linux64.c".
15654         (_initialize_s390_linux_tdep): Remove initialization of tdescs
15655         s390_linux32 and s390x_linux64.
15656         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
15657         default tdesc.
15658         * s390-tdep.c: Include "features/s390-linux32.c" and
15659         "features/s390x-linux64.c".
15660         (s390_tdesc_valid): Add check for tdesc_has_registers.
15661         (s390_gdbarch_init): Make sure there is always a valid tdesc.
15662         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
15663         tdesc_s390x_linux64.
15664         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
15665         tdesc_s390x_linux64 to...
15666         * s390-tdep.h: ...here.
15667
15668 2018-01-30  Pedro Alves  <palves@redhat.com>
15669
15670         PR gdb/13211
15671         * config.in, configure: Regenerate.
15672         * configure.ac: Check for getpgid.
15673         * go32-nat.c (go32_pass_ctrlc): New.
15674         (go32_target): Install it.
15675         * inf-child.c (inf_child_target): Install
15676         child_terminal_save_inferior, child_pass_ctrlc and
15677         child_interrupt.
15678         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
15679         (inf_ptrace_target): No longer install it.
15680         * infcmd.c (interrupt_target_1): Adjust.
15681         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
15682         (child_interrupt): Declare.
15683         (inferior::terminal_state): New.
15684         * inflow.c (struct terminal_info): Update comments.
15685         (inferior_process_group): Delete.
15686         (terminal_is_ours): Delete.
15687         (gdb_tty_state): New.
15688         (child_terminal_init): Adjust.
15689         (is_gdb_terminal, sharing_input_terminal_1)
15690         (sharing_input_terminal): New functions.
15691         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
15692         Set the process's actual process group in the foreground if
15693         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
15694         mark terminal as the inferior's if not sharing GDB's terminal.
15695         Don't check attach_flag.
15696         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
15697         pass down a target_terminal_state.
15698         (child_terminal_save_inferior): New, factored out from ...
15699         (child_terminal_ours_1): ... this.  Handle
15700         target_terminal_state::is_ours_for_output.
15701         (child_interrupt, child_pass_ctrlc): New.
15702         (inflow_inferior_exit): Clear the inferior's terminal_state.
15703         (copy_terminal_info): Copy the inferior's terminal state.
15704         (_initialize_inflow): Remove reference to terminal_is_ours.
15705         * inflow.h (inferior_process_group): Delete.
15706         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
15707         * procfs.c (procfs_target): Don't install procfs_interrupt.
15708         (procfs_interrupt): Delete.
15709         * remote.c (remote_serial_quit_handler): Adjust.
15710         (remote_interrupt): Remove ptid parameter.  Adjust.
15711         * target-delegates.c: Regenerate.
15712         * target.c: Include "terminal.h".
15713         (target_terminal::terminal_state): Rename to ...
15714         (target_terminal::m_terminal_state): ... this.
15715         (target_terminal::init): Adjust.
15716         (target_terminal::inferior): Adjust to per-inferior
15717         terminal_state.
15718         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
15719         (target_terminal::ours, target_terminal::ours_for_output): Use
15720         target_terminal_is_ours_kind.
15721         (target_interrupt): Remove ptid parameter.  Adjust.
15722         (default_target_pass_ctrlc): Adjust.
15723         * target.h (target_ops::to_terminal_save_inferior): New field.
15724         (target_ops::to_interrupt): Remove ptid_t parameter.
15725         (target_interrupt): Remove ptid_t parameter.  Update comment.
15726         (target_pass_ctrlc): Update comment.
15727         * target/target.h (target_terminal_state): New scoped enum,
15728         factored out of ...
15729         (target_terminal::terminal_state): ... here.
15730         (target_terminal::inferior): Update comments.
15731         (target_terminal::restore_inferior): New.
15732         (target_terminal::is_inferior, target_terminal::is_ours)
15733         (target_terminal::is_ours_for_output): Adjust.
15734         (target_terminal::scoped_restore_terminal_state): Adjust to
15735         rename, and call restore_inferior() instead of inferior().
15736         (target_terminal::scoped_restore_terminal_state::m_state): Change
15737         type.
15738         (target_terminal::terminal_state): Rename to ...
15739         (target_terminal::m_terminal_state): ... this and change type.
15740
15741 2018-01-30  Pedro Alves  <palves@redhat.com>
15742
15743         * linux-nat.c (wait_for_signal): New function.
15744         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
15745         directly.
15746         (async_terminal_is_ours)
15747         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
15748         (linux_nat_add_target): Don't override
15749         to_terminal_inferior/to_terminal_ours.
15750
15751 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
15752
15753         * remote.c (remote_follow_fork): Don't call "detach_inferior".
15754
15755 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
15756
15757         * dwarf2read.c (free_dwo_files): Add forward-declaration.
15758         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
15759         dwarf2_per_objfile_free here.
15760         (dwarf2_per_objfile_free): Remove.
15761         (_initialize_dwarf2_read): Don't register
15762         dwarf2_per_objfile_free as a registry cleanup.
15763
15764 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
15765
15766         Avoid compilation errors in MinGW native builds
15767
15768         The error is triggered by including python-internal.h, and the
15769         error message is:
15770
15771              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
15772                       from build-gnulib/import/math.h:27,
15773                       from d:/usr/Python26/include/pyport.h:235,
15774                       from d:/usr/Python26/include/Python.h:58,
15775                       from python/python-internal.h:94,
15776                       from python/py-arch.c:24:
15777              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
15778         using ::hypot;
15779                 ^~~~~
15780
15781         This happens because Python headers define 'hypot' to expand t
15782         '_hypot' in the Windows builds.
15783         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
15784         'hypoth'.  This avoids a compilation error.
15785
15786 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15787
15788         * MAINTAINERS (Write After Approval): Fix ordering.
15789
15790 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
15791
15792         * MAINTAINERS (Write After Approval): Add Alan Hayward.
15793
15794 2018-01-26  Alan Modra  <amodra@gmail.com>
15795
15796         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
15797         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
15798         Remove nop.  Make const.  Comment.
15799         (powerpc32_plt_stub_so_2): New.
15800         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
15801         Correct count.  Update uses.
15802         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
15803         Move common code reading PLT entry word.  Correct
15804         powerpc32_plt_stub PLT address calculation.
15805         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
15806         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
15807         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
15808         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
15809         (ppc64_standard_linkage8): Likewise.
15810         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
15811         Correct insns description.
15812         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
15813
15814 2018-01-24  Pedro Alves  <palves@redhat.com>
15815
15816         GCC PR libstdc++/83906
15817         * gdbtypes.c (operator==(const dynamic_prop &,
15818         const dynamic_prop &)): New.
15819         (operator==(const range_bounds &, const range_bounds &)): New.
15820         (check_types_equal): Use them instead of memcmp.
15821         * gdbtypes.h (operator==(const dynamic_prop &,
15822         const dynamic_prop &)): Declare.
15823         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
15824         (operator==(const range_bounds &, const range_bounds &)): Declare.
15825         (operator!=(const range_bounds &, const range_bounds &)): Declare.
15826
15827 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15828
15829         * s390-linux-tdep.c (s390_record_address_mask)
15830         (s390_record_calc_disp_common, s390_record_calc_disp)
15831         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15832         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15833         (s390_process_record): Move to s390-tdep.c.
15834         (s390_linux_init_abi_any): Adjust.
15835         * s390-tdep.c (s390_record_address_mask)
15836         (s390_record_calc_disp_common, s390_record_calc_disp)
15837         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
15838         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
15839         (s390_process_record): Moved from s390-linux-tdep.c
15840         (s390_gdbarch_init): Adjust.
15841
15842 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15843
15844         * s390-linux-nat.c (s390-tdep.h): New include.
15845         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
15846         (HFILES_NO_SRCDIR): Add s390-tdep.h.
15847         (ALLDEPFILES): Add s390-tdep.c.
15848         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
15849         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
15850         * s390-tdep.h: ...this.  New file.
15851         * s390-linux-tdep.c (s390-tdep.h): New include.
15852         (_initialize_s390_tdep): Rename to...
15853         (_initialize_s390_linux_tdep): ...this and adjust.
15854         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
15855         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
15856         s390-tdep.h.
15857         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
15858         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
15859         (s390_is_partial_instruction, s390_software_single_step)
15860         (is_non_branch_ril, s390_displaced_step_copy_insn)
15861         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
15862         (s390_prologue_data, s390_addr, s390_store, s390_load)
15863         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
15864         (s390_register_call_saved, s390_guess_tracepoint_registers)
15865         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
15866         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
15867         (s390_pseudo_register_name, s390_pseudo_register_type)
15868         (s390_pseudo_register_read, s390_pseudo_register_write)
15869         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
15870         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
15871         (s390_addr_bits_remove, s390_address_class_type_flags)
15872         (s390_address_class_type_flags_to_name)
15873         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
15874         (s390_function_arg_float, s390_function_arg_vector)
15875         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
15876         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
15877         (s390_frame_align, s390_register_return_value, s390_return_value)
15878         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
15879         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
15880         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
15881         (s390_trad_frame_prev_register, s390_unwind_cache)
15882         (s390_prologue_frame_unwind_cache)
15883         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
15884         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
15885         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
15886         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
15887         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
15888         (s390_frame_base_address, s390_local_base_address)
15889         (s390_frame_base, s390_gcc_target_options)
15890         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
15891         (s390_validate_reg_range, s390_tdesc_valid)
15892         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
15893         * s390-tdep.c: ...this.  New file.
15894
15895 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15896
15897         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
15898         (s390_process_record, s390_gdbarch_tdep_alloc)
15899         (s390_linux_init_abi_any): Use/set new hook.
15900
15901 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15902
15903         * s390-linux-tdep.c (osabi.h): New include.
15904         (s390_linux_init_abi_31, s390_linux_init_abi_64)
15905         (s390_linux_init_abi_any): New functions.
15906         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
15907
15908 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15909
15910         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
15911         tdesc_has_registers check
15912
15913 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15914
15915         * s390-linux-tdep.c (s390_tdesc_valid): New function.
15916         (s390_validate_reg_range): New macro.
15917         (s390_gdbarch_init): Adjust.
15918
15919 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15920
15921         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
15922         (s390_gdbarch_tdep_alloc): Adjust.
15923         (s390_gdbarch_init): Adjust.
15924
15925 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15926
15927         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
15928         <have_tdb>: Change type to bool.
15929         (s390_gdbarch_tdep_alloc): Adjust.
15930         (s390_gdbarch_init): Adjust.
15931
15932 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15933
15934         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
15935         (gdbarch_tdep) <have_upper, have_vx>: New fields.
15936         (s390_gdbarch_tdep_alloc): New function.
15937         (s390_gdbarch_init): Allocate tdep at start and use its fields
15938         instead of separate variables.
15939
15940 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15941
15942         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
15943         when looking for cached gdbarch and add comment for remaining.
15944
15945 2018-01-22  Pedro Alves  <palves@redhat.com>
15946             Sergio Durigan Junior  <sergiodj@redhat.com>
15947
15948         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
15949         case.
15950
15951 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
15952
15953         * MAINTAINERS: Update my company e-mail address.
15954
15955 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15956
15957         * regcache.c (cooked_write_test): New function.
15958         (_initialize_regcache): Register the test.
15959
15960 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15961
15962         * ia64-tdep.c (ia64_pseudo_register_read): Call
15963         regcache->cooked_read instead of regcache_cooked_read_unsigned.
15964         * m32c-tdep.c (m32c_cat_read): Likewise.
15965         (m32c_r3r2r1r0_read): Likewise.
15966         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
15967         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
15968
15969 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15970
15971         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
15972         method raw_read instead of regcache_raw_read.
15973         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
15974         * arm-tdep.c (arm_neon_quad_read): Likewise.
15975         * avr-tdep.c (avr_pseudo_register_read): Likewise.
15976         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
15977         * frv-tdep.c (frv_pseudo_register_read): Likewise.
15978         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
15979         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
15980         (i386_pseudo_register_read_into_value): Likewise.
15981         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
15982         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
15983         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
15984         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
15985         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
15986         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
15987         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
15988         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
15989         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
15990
15991 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15992
15993         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
15994         * configure.tgt: Remove target mt.
15995         * mt-tdep.c: Remove.
15996         * regcache.c (cooked_read_test): Remove the check for mt.
15997
15998 2018-01-22  Yao Qi  <yao.qi@linaro.org>
15999
16000         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
16001         instead of gdbarch_pseudo_register_read_value.
16002
16003 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
16004
16005         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
16006         language is Ada.
16007
16008 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
16009
16010         * linespec.c (create_sals_line_offset): Remove code that preserved
16011         the symtab_and_line's line number.
16012
16013 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16014
16015         * varobj.c (varobj_create): Don't set valid_block when creating a
16016         floating varobj.
16017
16018 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16019
16020         * varobj.c (varobj_create): Remove out of date comment.
16021
16022 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16023
16024         PR mi/20395
16025         * ada-exp.y (write_var_from_sym): Pass extra parameter when
16026         updating innermost block.
16027         * parse.c (innermost_block_tracker::update): Take extra type
16028         parameter, and check types match before updating innermost block.
16029         (write_dollar_variable): Update innermost block for registers.
16030         * parser-defs.h (enum innermost_block_tracker_type): New enum.
16031         (innermost_block_tracker::innermost_block_tracker): Initialise
16032         m_types member.
16033         (innermost_block_tracker::reset): Take type parameter.
16034         (innermost_block_tracker::update): Take type parameter, and pass
16035         type through as needed.
16036         (innermost_block_tracker::m_types): New member.
16037         * varobj.c (varobj_create): Pass type when reseting innermost
16038         block.
16039
16040 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16041
16042         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
16043         * ada-lang.c (resolve_subexp): Likewise.
16044         * breakpoint.c (set_breakpoint_condition) Likewise.
16045         (watch_command_1) Likewise.
16046         * c-exp.y (variable): Likewise.
16047         * d-exp.y (PrimaryExpression): Likewise.
16048         * f-exp.y (variable): Likewise.
16049         * go-exp.y (variable): Likewise.
16050         * m2-exp.y (variable): Likewise.
16051         * objfiles.c (objfile::~objfile): Likewise.
16052         * p-exp.y (variable): Likewise.
16053         * parse.c (innermost_block): Change type.
16054         * parser-defs.h (class innermost_block_tracker): New.
16055         (innermost_block): Change to innermost_block_tracker.
16056         * printcmd.c (display_command): Switch to innermost_block API.
16057         (do_one_display): Likewise.
16058         * rust-exp.y (do_one_display): Likewise.
16059         * symfile.c (clear_symtab_users): Likewise.
16060         * varobj.c (varobj_create): Switch to innermost_block API, replace
16061         use of innermost_block with block stored on varobj object.
16062
16063 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
16064
16065         * expression.h (innermost_block): Remove declaration.
16066         * varobj.c: Add 'parser-defs.h' include.
16067
16068 2018-01-19  Tom Tromey  <tom@tromey.com>
16069
16070         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
16071         symbols in the static and global blocks.
16072
16073 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
16074
16075         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
16076         gdb_ptrace.h, and move including gdb_wait.h ...
16077         * nat/linux-ptrace.h: ... to here.
16078
16079 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
16080
16081         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
16082         inf_ptrace_detach_success.
16083         (inf_ptrace_detach_success): Add inferior parameter, use it
16084         instead of inferior_ptid, pass it to detach_inferior.
16085         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
16086         parameter.
16087         * inferior.c (detach_inferior): Add overload that takes an
16088         inferior object.
16089         * inferior.h (detach_inferior): Likewise.
16090         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
16091         use inferior_ptid, adjust call to inf_ptrace_detach_success.
16092         * linux-thread-db.c (thread_db_detach): Use inf parameter.
16093
16094 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
16095
16096         * target.h (struct target_ops) <to_detach>: Add inferior
16097         parameter.
16098         (target_detach): Likewise.
16099         * target.c (dispose_inferior): Pass inferior down.
16100         (target_detach): Pass inferior down.  Assert that it is equal to
16101         the current inferior.
16102         * aix-thread.c (aix_thread_detach): Pass inferior down.
16103         * corefile.c (core_file_command): Pass current_inferior() down.
16104         * corelow.c (core_detach): Add inferior parameter.
16105         * darwin-nat.c (darwin_detach): Likewise.
16106         * gnu-nat.c (gnu_detach): Likewise.
16107         * inf-ptrace.c (inf_ptrace_detach): Likewise.
16108         * infcmd.c (detach_command): Pass current_inferior() down to
16109         target_detach.
16110         * infrun.c (follow_fork_inferior): Pass parent_inf to
16111         target_detach.
16112         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
16113         target_detach.
16114         * linux-nat.c (linux_nat_detach): Add inferior parameter.
16115         * linux-thread-db.c (thread_db_detach): Likewise.
16116         * nto-procfs.c (procfs_detach): Likewise.
16117         * procfs.c (procfs_detach): Likewise.
16118         * record.c (record_detach): Likewise.
16119         * record.h (struct inferior): Forward-declare.
16120         (record_detach): Add inferior parameter.
16121         * remote-sim.c (gdbsim_detach): Likewise.
16122         * remote.c (remote_detach_1): Likewise.
16123         (remote_detach): Likewise.
16124         (extended_remote_detach): Likewise.
16125         * sol-thread.c (sol_thread_detach): Likewise.
16126         * target-debug.h (target_debug_print_inferior_p): New macro.
16127         * target-delegates.c: Re-generate.
16128         * top.c (kill_or_detach): Pass inferior down to target_detach.
16129         * windows-nat.c (windows_detach): Add inferior parameter.
16130
16131 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
16132
16133         * target.h (struct target_ops) <to_detach>: Remove args
16134         parameter.
16135         (target_detach): Likewise.
16136         * target.c (dispose_inferior): Adjust.
16137         (target_detach): Remove args parameter, adjust.
16138         * aix-thread.c (aix_thread_detach): Adjust.
16139         * corefile.c (core_file_command): Adjust.
16140         * corelow.c (core_detach): Adjust.
16141         * darwin-nat.c (darwin_detach): Adjust.
16142         * gnu-nat.c (gnu_detach): Adjust.
16143         * inf-ptrace.c (inf_ptrace_detach): Adjust.
16144         * infcmd.c (detach_command): Adjust
16145         * infrun.c (follow_fork_inferior): Adjust.
16146         (handle_vfork_child_exec_or_exit): Adjust.
16147         * linux-fork.c (linux_fork_detach): Remove args parameter.
16148         * linux-fork.h (linux_fork_detach): Likewise.
16149         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
16150         * linux-thread-db.c (thread_db_detach): Likewise.
16151         * nto-procfs.c (procfs_detach): Likewise.
16152         * procfs.c (procfs_detach): Likewise.
16153         (do_detach): Remove signo parameter.
16154         * record.c (record_detach): Remove args parameter.
16155         * record.h (record_detach): Likewise.
16156         * remote-sim.c (gdbsim_detach): Likewise.
16157         * remote.c (remote_detach_1): Likewise.
16158         (remote_detach): Likewise.
16159         (extended_remote_detach): Likewise.
16160         * sol-thread.c (sol_thread_detach): Likewise.
16161         * target-delegates.c: Re-generate.
16162         * top.c (struct qt_args) <args>: Remove field.
16163         (kill_or_detach): Don't pass args.
16164         (quit_force): Don't set args.
16165         * windows-nat.c (windows_detach): Remove args parameter.
16166
16167 2018-01-19  Yao Qi  <yao.qi@linaro.org>
16168
16169         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
16170         (arm_linux_init_abi): Install it.
16171
16172 2018-01-19  Yao Qi  <yao.qi@linaro.org>
16173
16174         * osabi.c (gdb_osabi_names): Extend the regexp for
16175         arm-linux-gnueabihf.
16176
16177 2018-01-18  Yao Qi  <yao.qi@linaro.org>
16178
16179         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
16180         m_abbrevs.
16181         (abbrev_table::add_abbrev): Update.
16182         (abbrev_table::lookup_abbrev): Update.
16183
16184 2018-01-18  Yao Qi  <yao.qi@linaro.org>
16185
16186         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
16187
16188 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
16189
16190         * compile/compile.c (compile_to_object): Convert "triplet_rx"
16191         to "std::string".
16192
16193 2018-01-17  Tom Tromey  <tom@tromey.com>
16194
16195         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
16196
16197 2018-01-17  Tom Tromey  <tom@tromey.com>
16198
16199         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
16200         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
16201         (create_array_type_with_stride): Update.
16202         * dwarf2read.c (set_die_type): Update.
16203
16204 2018-01-17  Tom Tromey  <tom@tromey.com>
16205
16206         * dwarf2read.c (delayed_method_info): Remove typedef.
16207         (dwarf2_cu::method_info): Now a std::vector.
16208         (add_to_method_list): Update.
16209         (free_delayed_list): Remove.
16210         (compute_delayed_physnames): Update.
16211         (process_full_comp_unit, process_full_type_unit): Clear the method
16212         list.  Remove cleanups.
16213         (psymtab_include_file_name): Add name_holder parameter.  Use
16214         unique_xmalloc_ptr.
16215         (dwarf_decode_lines): Update.
16216
16217 2018-01-17  Tom Tromey  <tom@tromey.com>
16218             Simon Marchi  <simon.marchi@ericsson.com>
16219
16220         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
16221         (dwarf2_per_objfile::free_cached_comp_units)
16222         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16223         (init_cutu_and_read_dies_no_follow): Update.
16224         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
16225         (dwarf2_cu::~dwarf2_cu): New.
16226         (free_heap_comp_unit, free_stack_comp_unit): Remove.
16227         (age_cached_comp_units, free_one_cached_comp_unit): Update.
16228
16229 2018-01-17  Tom Tromey  <tom@tromey.com>
16230             Simon Marchi  <simon.marchi@ericsson.com>
16231
16232         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
16233         (struct die_reader_specs) <abbrev_table>: New member.
16234         (struct abbrev_table): Add constructor.
16235         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
16236         <abbrev_obstack>: Now an auto_obstack.
16237         (abbrev_table_up): New typedef.
16238         (init_cu_die_reader): Add abbrev_table parameter.
16239         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
16240         Add result_dwo_abbrev_table.
16241         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
16242         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
16243         Update.
16244         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
16245         parameter.
16246         (skip_children): Update.
16247         (abbrev_table::alloc_abbrev): Rename from
16248         abbrev_table_alloc_abbrev.
16249         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
16250         (abbrev_table::lookup_abbrev): Rename from
16251         abbrev_table_lookup_abbrev.
16252         (abbrev_table_read_table): Return abbrev_table_up.
16253         (abbrev_table_free, abbrev_table_free_cleanup)
16254         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
16255         (load_partial_dies): Update.
16256
16257 2018-01-17  Tom Tromey  <tom@tromey.com>
16258
16259         * dwarf2read.c (dwarf2_compute_name): Update comment.
16260         (read_func_scope, read_variable): Update.
16261         (new_symbol): Remove.
16262         (new_symbol_full): Rename to new_symbol.
16263
16264 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
16265
16266         PR gdb/16577
16267         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
16268         a warning instead of throwing an error, set section size to 0 and return
16269         NULL.
16270         * gdb_bfd.h (gdb_bfd_map_section): Update description.
16271
16272 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16273
16274         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
16275         std::string.
16276         (linux_ptrace_attach_fail_reason_string): Likewise.
16277         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
16278         Likewise.
16279         (linux_ptrace_attach_fail_reason_string): Likewise.
16280         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
16281
16282 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
16283
16284         * linux-nat.c (linux_nat_attach): Remove xstrdup.
16285
16286 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
16287
16288         PR gdb/21559
16289         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
16290         checking for fs_base/gs_base fields in struct user_regs_struct.
16291         * configure: Regenerate.
16292
16293 2018-01-17  Yao Qi  <yao.qi@linaro.org>
16294
16295         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
16296         function.
16297         (aarch64_linux_init_abi): Install it to gdbarch hook
16298         gcc_target_options.
16299
16300 2018-01-15  Pedro Alves  <palves@redhat.com>
16301
16302         * common/signals-state-save-restore.c
16303         (save_original_signals_state): Fix typos.
16304
16305 2017-01-12  Tom Tromey  <tom@tromey.com>
16306             Sergio Durigan Junior  <sergiodj@redhat.com>
16307
16308         * Makefile.in (install-only): Install gdb-add-index.
16309
16310 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
16311
16312         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
16313
16314 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16315
16316         * infrun.c (keep_going_pass_signal): Clear step-over info when
16317         insert_breakpoints fails.
16318
16319 2018-01-11  Pedro Alves  <palves@redhat.com>
16320
16321         PR gdb/22583
16322         * infrun.c (resume): Rename to ...
16323         (resume_1): ... this.
16324         (resume): Reimplement as wrapper around resume_1.
16325
16326 2018-01-11  Pedro Alves  <palves@redhat.com>
16327
16328         PR remote/22597
16329         * remote.c (remote_parse_stop_reply): Default to the last-set
16330         general thread instead of to 'magic_null_ptid'.
16331
16332 2018-01-10  Pedro Alves  <palves@redhat.com>
16333
16334         * language.h (language_get_symbol_name_matcher): Rename ...
16335         (get_symbol_name_matcher): ... this.
16336         * language.c (language_get_symbol_name_matcher): Ditto.
16337         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
16338         callers adjusted.
16339
16340 2018-01-10  Pedro Alves  <palves@redhat.com>
16341
16342         PR gdb/22670
16343         * dwarf2read.c
16344         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
16345         Adjust to use language_get_symbol_name_matcher instead of
16346         language_defn::la_get_symbol_name_matcher.
16347         * language.c (language_get_symbol_name_matcher): If in Ada mode
16348         and the lookup name is a verbatim match, return Ada's matcher.
16349         * language.h (language_get_symbol_name_matcher): Adjust comment.
16350         (ada_lookup_name_info::verbatim_p):: New method.
16351
16352 2018-01-10  Pedro Alves  <palves@redhat.com>
16353
16354         PR gdb/22670
16355         * ada-lang.c (ada_collect_symbol_completion_matches): If the
16356         minsym's language is language_auto or language_cplus, pass down
16357         language_ada instead.
16358         * symtab.c (compare_symbol_name): Don't frob symbol language here.
16359
16360 2018-01-10  Pedro Alves  <palves@redhat.com>
16361
16362         PR gdb/22670
16363         * minsyms.c (linkage_name_str): New function.
16364         (iterate_over_minimal_symbols): Use it.
16365
16366 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16367
16368         * NEWS: Document that 'info proc' now works on FreeBSD.
16369
16370 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16371
16372         * configure.ac: Check for kinfo_getfile in libutil.
16373         * configure: Regenerate.
16374         * config.in: Regenerate.
16375         * fbsd-nat.c: Include "fbsd-tdep.h".
16376         (fbsd_fetch_cmdline): New.
16377         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
16378         rather than calling error.
16379         (fbsd_info_proc): New.
16380         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
16381         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
16382         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
16383
16384 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16385
16386         * fbsd-nat.c (struct free_deleter): Remove.
16387         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
16388
16389 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16390
16391         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
16392         NULL for an empty pathname.
16393
16394 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
16395
16396         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
16397         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
16398         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
16399         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
16400         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
16401         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
16402         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
16403         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
16404         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
16405         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
16406         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
16407         (fbsd_core_fetch_timeval, fbsd_print_sigset)
16408         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
16409         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
16410         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
16411
16412 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
16413
16414         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
16415         (gnu_xfer_auxv): New function.
16416         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
16417         TARGET_OBJECT_AUXV.
16418
16419 2018-01-08  Yao Qi  <yao.qi@linaro.org>
16420             Simon Marchi  <simon.marchi@ericsson.com>
16421
16422         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
16423         common/selftest.c.
16424         (COMMON_OBS): Remove selftest.o.
16425         * configure.ac: Append selftest-arch.c and common/selftest.c to
16426         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
16427         * configure: Re-generated.
16428         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
16429         GDB_SELF_TEST.
16430         (maintenance_info_selftests): Likewise.
16431
16432 2018-01-08  Xavier Roirand  <roirand@adacore.com>
16433
16434         * ada-valprint.c (val_print_packed_array_elements): Use
16435         proper number of elements when printing an array indexed
16436         by an enumeration type.
16437
16438 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16439
16440         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
16441         (dw2_get_file_names_reader): Adjust.
16442         (lookup_dwo_signatured_type): Adjust.
16443         (lookup_dwp_signatured_type): Adjust.
16444         (lookup_signatured_type): Adjust.
16445         (create_type_unit_group): Adjust.
16446         (get_type_unit_group): Adjust.
16447         (process_psymtab_comp_unit_reader): Adjust.
16448         (build_type_psymtabs_reader): Adjust.
16449         (scan_partial_symbols): Adjust.
16450         (add_partial_symbol): Adjust.
16451         (add_partial_subprogram): Adjust.
16452         (peek_die_abbrev): Adjust.
16453         (fixup_go_packaging): Adjust.
16454         (process_imported_unit_die): Adjust.
16455         (dwarf2_compute_name): Adjust.
16456         (dwarf2_physname): Adjust.
16457         (read_import_statement): Adjust.
16458         (handle_DW_AT_stmt_list): Adjust.
16459         (read_file_scope): Adjust.
16460         (read_func_scope): Adjust.
16461         (read_lexical_block_scope): Adjust.
16462         (read_call_site_scope): Adjust.
16463         (read_variable): Adjust.
16464         (dwarf2_rnglists_process): Adjust.
16465         (dwarf2_ranges_process): Adjust.
16466         (dwarf2_ranges_read): Adjust.
16467         (dwarf2_get_pc_bounds): Adjust.
16468         (dwarf2_record_block_ranges): Adjust.
16469         (dwarf2_add_field): Adjust.
16470         (dwarf2_add_member_fn): Adjust.
16471         (read_structure_type): Adjust.
16472         (process_structure_scope): Adjust.
16473         (read_enumeration_type): Adjust.
16474         (read_array_type): Adjust.
16475         (mark_common_block_symbol_computed): Adjust.
16476         (read_common_block): Adjust.
16477         (read_namespace_type): Adjust.
16478         (read_namespace): Adjust.
16479         (read_module_type): Adjust.
16480         (read_tag_pointer_type): Adjust.
16481         (read_tag_ptr_to_member_type): Adjust.
16482         (read_tag_string_type): Adjust.
16483         (read_subroutine_type): Adjust.
16484         (read_typedef): Adjust.
16485         (read_base_type): Adjust.
16486         (attr_to_dynamic_prop): Adjust.
16487         (read_subrange_type): Adjust.
16488         (read_unspecified_type): Adjust.
16489         (dwarf2_read_abbrevs): Adjust.
16490         (load_partial_dies): Adjust.
16491         (read_partial_die): Adjust.
16492         (find_partial_die): Adjust.
16493         (guess_partial_die_structure_name): Adjust.
16494         (fixup_partial_die): Adjust.
16495         (read_attribute_value): Adjust.
16496         (read_addr_index): Adjust.
16497         (read_addr_index_from_leb128): Adjust.
16498         (read_str_index): Adjust.
16499         (dwarf2_string_attr): Adjust.
16500         (get_debug_line_section): Adjust.
16501         (dwarf_decode_line_header): Adjust.
16502         (lnp_state_machine::check_line_address): Adjust.
16503         (dwarf_decode_lines_1): Adjust.
16504         (dwarf_decode_lines): Adjust.
16505         (dwarf2_start_symtab): Adjust.
16506         (var_decode_location): Adjust.
16507         (new_symbol_full): Adjust.
16508         (dwarf2_const_value_data): Adjust.
16509         (dwarf2_const_value_attr): Adjust.
16510         (dwarf2_const_value): Adjust.
16511         (die_type): Adjust.
16512         (die_containing_type): Adjust.
16513         (build_error_marker_type): Adjust.
16514         (lookup_die_type): Adjust.
16515         (guess_full_die_structure_name): Adjust.
16516         (anonymous_struct_prefix): Adjust.
16517         (determine_prefix): Adjust.
16518         (dwarf2_name): Adjust.
16519         (follow_die_ref_or_sig): Adjust.
16520         (follow_die_offset): Adjust.
16521         (follow_die_ref): Adjust.
16522         (follow_die_sig_1): Adjust.
16523         (follow_die_sig): Adjust.
16524         (get_signatured_type): Adjust.
16525         (get_DW_AT_signature_type): Adjust.
16526         (decode_locdesc): Adjust.
16527         (dwarf_decode_macros): Adjust.
16528         (cu_debug_loc_section): Adjust.
16529         (fill_in_loclist_baton): Adjust.
16530         (dwarf2_symbol_mark_computed): Adjust.
16531         (init_one_comp_unit): Don't assign
16532         dwarf2_cu::dwarf2_per_objfile.
16533         (set_die_type): Adjust.
16534
16535 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16536
16537         * dwarf2read.c (struct mapped_debug_names): Add constructor.
16538         <dwarf2_per_objfile>: New field.
16539         (dwarf2_per_objfile): Remove global.
16540         (get_dwarf2_per_objfile): New function.
16541         (set_dwarf2_per_objfile): New function.
16542         (dwarf2_build_psymtabs_hard): Change objfile parameter to
16543         dwarf2_per_objfile.
16544         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16545         (read_abbrev_offset): Likewise.
16546         (read_indirect_string): Likewise.
16547         (read_indirect_line_string): Likewise.
16548         (read_indirect_string_at_offset): Likewise.
16549         (read_indirect_string_from_dwz): Likewise.
16550         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16551         dwarf2_per_objfile.
16552         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16553         (create_all_comp_units): Change objfile parameter to
16554         dwarf2_per_objfile.
16555         (create_all_type_units): Likewise.
16556         (process_queue): Add dwarf2_per_objfile parameter.
16557         (read_and_check_comp_unit_head): Likewise.
16558         (lookup_dwo_unit_in_dwp): Likewise.
16559         (get_dwp_file): Likewise.
16560         (process_cu_includes): Likewise.
16561         (struct free_dwo_file_cleanup_data): New struct.
16562         (dwarf2_has_info): Use get_dwarf2_per_objfile and
16563         set_dwarf2_per_objfile.
16564         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
16565         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
16566         context, adjust calls.
16567         (dw2_instantiate_symtab): Likewise.
16568         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
16569         (dw2_get_cu): Likewise.
16570         (create_cu_from_index_list): Change objfile parameter to
16571         dwarf2_per_objfile.
16572         (create_cus_from_index_list): Get dwarf2_per_objfile from
16573         context, adjust calls.
16574         (create_cus_from_index): Likewise.
16575         (create_signatured_type_table_from_index): Change objfile
16576         parameter to dwarf2_per_objfile.
16577         (create_signatured_type_table_from_debug_names): Change objfile
16578         parameter to dwarf2_per_objfile.
16579         (create_addrmap_from_index): Likewise.
16580         (create_addrmap_from_aranges): Likewise.
16581         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
16582         (dw2_setup): Remove.
16583         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
16584         context.
16585         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
16586         get_dwarf2_per_objfile.
16587         (dw2_forget_cached_source_info): Likewise.
16588         (dw2_map_symtabs_matching_filename): Likewise.
16589         (struct dw2_symtab_iterator) <index>: Remove.
16590         <dwarf2_per_objfile>: New field.
16591         (dw2_symtab_iter_init): Replace index parameter with
16592         dwarf2_per_objfile.
16593         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
16594         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
16595         (dw2_print_stats): Likewise.
16596         (dw2_dump): Likewise.
16597         (dw2_expand_symtabs_for_function): Likewise.
16598         (dw2_expand_all_symtabs): Likewise.
16599         (dw2_expand_symtabs_with_fullname): Likewise.
16600         (dw2_expand_marked_cus): Replace index and objfile parameters
16601         with dwarf2_per_objfile.
16602         (dw_expand_symtabs_matching_file_matcher): Add
16603         dwarf2_per_objfile parameter and adjust calls.
16604         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
16605         adjust calls.
16606         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
16607         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
16608         adjust calls.
16609         (create_cus_from_debug_names_list): Replace objfile parameter
16610         with dwarf2_per_objfile and adjust calls.
16611         (create_cus_from_debug_names): Likewise.
16612         (dwarf2_read_debug_names): Likewise.
16613         (mapped_debug_names::namei_to_name): Adjust call.
16614         (dw2_debug_names_iterator::next): Likewise.
16615         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
16616         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
16617         (dw2_debug_names_dump): Likewise.
16618         (dw2_debug_names_expand_symtabs_for_function): Likewise.
16619         (dw2_debug_names_expand_symtabs_matching): Likewise.
16620         (dwarf2_initialize_objfile): Likewise.
16621         (dwarf2_build_psymtabs): Likewise.
16622         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
16623         this_cu.
16624         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
16625         (read_and_check_comp_unit_head): Likewise.
16626         (read_abbrev_offset): Likewise.
16627         (create_debug_type_hash_table): Likewise.
16628         (create_debug_types_hash_table): Likewise.
16629         (create_all_type_units): Replace objfile parameter with
16630         dwarf2_per_objfile.
16631         (add_type_unit): Add dwarf2_per_objfile parameter.
16632         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
16633         with dwarf2_per_objfile.
16634         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
16635         (lookup_dwp_signatured_type): Likewise.
16636         (lookup_signatured_type): Likewise.
16637         (read_cutu_die_from_dwo): Likewise.
16638         (init_tu_and_read_dwo_dies): Likewise.
16639         (init_cutu_and_read_dies): Likewise.
16640         (init_cutu_and_read_dies_no_follow): Likewise.
16641         (allocate_type_unit_groups_table): Add objfile parameter.
16642         (create_type_unit_group): Use dwarf2_per_objfile from cu.
16643         (get_type_unit_group): Likewise.
16644         (process_psymtab_comp_unit): Update call.
16645         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
16646         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
16647         (print_tu_stats): Likewise.
16648         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
16649         in void* parameter.
16650         (build_type_psymtabs): Change objfile parameter to
16651         dwarf2_per_objfile.
16652         (process_skeletonless_type_unit): Use dwarf2_per_objfile
16653         passed in void* parameter.
16654         (process_skeletonless_type_units): Change objfile parameter to
16655         dwarf2_per_objfile.
16656         (set_partial_user): Likewise.
16657         (dwarf2_build_psymtabs_hard): Likewise.
16658         (read_comp_units_from_section): Likewise.
16659         (create_all_comp_units): Likewise.
16660         (scan_partial_symbols): Update calls.
16661         (add_partial_symbol): Likewise.
16662         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
16663         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
16664         (process_queue): Add dwarf2_per_objfile parameter.
16665         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
16666         (compute_compunit_symtab_includes): Likewise.
16667         (process_cu_includes): Add dwarf2_per_objfile parameter.
16668         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
16669         (process_full_type_unit): Likewise.
16670         (process_imported_unit_die): Update call.
16671         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
16672         (read_file_scope): Likewise.
16673         (allocate_dwo_file_hash_table): Add objfile parameter.
16674         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
16675         (create_cus_hash_table): Likewise.
16676         (create_dwp_hash_table): Likewise.
16677         (create_dwo_unit_in_dwp_v1): Likewise.
16678         (create_dwp_v2_section): Likewise.
16679         (create_dwo_unit_in_dwp_v2): Likewise.
16680         (lookup_dwo_unit_in_dwp): Likewise.
16681         (try_open_dwop_file): Likewise.
16682         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
16683         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
16684         cleanup to include a reference to dwarf2_per_objfile.
16685         (open_dwp_file): Add dwarf2_per_objfile parameter.
16686         (open_and_init_dwp_file): Likewise.
16687         (get_dwp_file): Likewise.
16688         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
16689         (queue_and_load_all_dwo_tus): Update call.
16690         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
16691         data.
16692         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
16693         (dwarf2_ranges_process): Likewise.
16694         (dwarf2_get_pc_bounds): Likewise.
16695         (mark_common_block_symbol_computed): Likewise.
16696         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
16697         (dwarf2_read_abbrevs): Update call.
16698         (read_partial_die): Use dwarf2_per_objfile from cu.
16699         (find_partial_die): Likewise.
16700         (fixup_partial_die): Likewise.
16701         (read_attribute_value): Likewise.
16702         (read_indirect_string_at_offset_from): Add objfile parameter.
16703         (read_indirect_string_at_offset): Add dwarf2_per_objfile
16704         parameter.
16705         (read_indirect_string_from_dwz): Add objfile parameter.
16706         (read_indirect_string): Add objfile parameter.
16707         (read_addr_index_1): Add dwarf2_per_objfile parameter.
16708         (read_addr_index): Use dwarf2_per_objfile from cu.
16709         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
16710         call dw2_setup.
16711         (read_str_index): Use dwarf2_per_objfile from cu.
16712         (get_debug_line_section): Likewise.
16713         (read_formatted_entries): Add dwarf2_per_objfile parameter.
16714         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
16715         (new_symbol_full): Use dwarf2_per_objfile from cu.
16716         (build_error_marker_type): Likewise.
16717         (lookup_die_type): Likewise.
16718         (determine_prefix): Likewise.
16719         (follow_die_offset): Likewise.
16720         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
16721         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
16722         (dwarf2_fetch_die_type_sect_off): Likewise.
16723         (dwarf2_get_die_type): Likewise.
16724         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
16725         (get_signatured_type): Likewise.
16726         (get_DW_AT_signature_type): Likewise.
16727         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
16728         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
16729         (cu_debug_loc_section): Likewise.
16730         (fill_in_loclist_baton): Likewise.
16731         (dwarf2_symbol_mark_computed): Likewise.
16732         (dwarf2_find_containing_comp_unit): Change objfile parameter to
16733         dwarf2_per_objfile.
16734         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
16735         parameter.
16736         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
16737         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
16738         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
16739         (set_die_type): Use dwarf2_free_objfile from cu.
16740         (get_die_type_at_offset): Likewise.
16741         (dwarf2_per_objfile_free): Don't assign global variable.
16742         (debug_names) <constructor>: Add dwarf2_per_objfile
16743         parameter, update m_debugstrlookup construction.
16744         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
16745         parameter.
16746         <m_dwarf2_per_objfile>: New field.
16747         <lookup>: Use m_dwarf2_per_objfile.
16748         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
16749         (psyms_seen_size): Likewise.
16750         (write_gdbindex): Replace objfile parameter with
16751         dwarf2_per_objfile.
16752         (write_debug_names): Likewise.
16753         (write_psymtabs_to_index): Likewise.
16754         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
16755         calls.
16756
16757 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16758
16759         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
16760         <dwarf2_per_objfile>: New field.
16761         (struct dwarf2_per_cu_data) <objfile>: Remove.
16762         <dwarf2_per_objfile>: New field.
16763         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
16764         of objfile.
16765         (create_signatured_type_table_from_index): Likewise.
16766         (create_debug_type_hash_table): Likewise.
16767         (fill_in_sig_entry_from_dwo_entry): Likewise.
16768         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
16769         (create_type_unit_group): Assign dwarf2_per_objfile instead of
16770         objfile.
16771         (create_partial_symtab): Access objfile through
16772         dwarf2_per_objfile.
16773         (process_psymtab_comp_unit_reader): Likewise.
16774         (read_comp_units_from_section): Likewise.
16775         (scan_partial_symbols): Likewise.
16776         (add_partial_symbol): Likewise.
16777         (add_partial_subprogram): Likewise.
16778         (peek_die_abbrev): Likewise.
16779         (fixup_go_packaging): Likewise.
16780         (process_full_comp_unit): Likewise.
16781         (process_full_type_unit): Likewise.
16782         (process_imported_unit_die): Likewise.
16783         (dwarf2_compute_name): Likewise.
16784         (dwarf2_physname): Likewise.
16785         (read_import_statement): Likewise.
16786         (create_cus_hash_table): Assign dwarf2_physname instead of
16787         objfile.
16788         (read_func_scope): Access objfile through dwarf2_per_objfile.
16789         (read_lexical_block_scope): Likewise.
16790         (read_call_site_scope): Likewise.
16791         (read_variable): Likewise.
16792         (dwarf2_rnglists_process): Likewise.
16793         (dwarf2_ranges_process): Likewise.
16794         (dwarf2_ranges_read): Likewise.
16795         (dwarf2_record_block_ranges): Likewise.
16796         (dwarf2_add_field): Likewise.
16797         (dwarf2_add_member_fn): Likewise.
16798         (read_structure_type): Likewise.
16799         (process_structure_scope): Likewise.
16800         (read_enumeration_type): Likewise.
16801         (read_array_type): Likewise.
16802         (read_common_block): Likewise.
16803         (read_namespace_type): Likewise.
16804         (read_namespace): Likewise.
16805         (read_module_type): Likewise.
16806         (read_tag_pointer_type): Likewise.
16807         (read_tag_ptr_to_member_type): Likewise.
16808         (read_tag_string_type): Likewise.
16809         (read_subroutine_type): Likewise.
16810         (read_typedef): Likewise.
16811         (read_base_type): Likewise.
16812         (attr_to_dynamic_prop): Likewise.
16813         (read_subrange_type): Likewise.
16814         (read_unspecified_type): Likewise.
16815         (load_partial_dies): Likewise.
16816         (read_partial_die): Likewise.
16817         (find_partial_die): Likewise.
16818         (guess_partial_die_structure_name): Likewise.
16819         (fixup_partial_die): Likewise.
16820         (read_attribute_value): Likewise.
16821         (read_addr_index_from_leb128): Likewise.
16822         (dwarf2_read_addr_index): Likewise.
16823         (dwarf2_string_attr): Likewise.
16824         (lnp_state_machine::check_line_address): Likewise.
16825         (dwarf_decode_lines_1): Likewise.
16826         (dwarf_decode_lines): Likewise.
16827         (dwarf2_start_symtab): Likewise.
16828         (var_decode_location): Likewise.
16829         (new_symbol_full): Likewise.
16830         (dwarf2_const_value_data): Likewise.
16831         (dwarf2_const_value_attr): Likewise.
16832         (dwarf2_const_value): Likewise.
16833         (die_type): Likewise.
16834         (die_containing_type): Likewise.
16835         (lookup_die_type): Likewise.
16836         (guess_full_die_structure_name): Likewise.
16837         (anonymous_struct_prefix): Likewise.
16838         (dwarf2_name): Likewise.
16839         (follow_die_ref_or_sig): Likewise.
16840         (follow_die_offset): Likewise.
16841         (follow_die_ref): Likewise.
16842         (dwarf2_fetch_die_loc_sect_off): Likewise.
16843         (dwarf2_fetch_constant_bytes): Likewise.
16844         (dwarf2_fetch_die_type_sect_off): Likewise.
16845         (dwarf2_get_die_type): Likewise.
16846         (follow_die_sig): Likewise.
16847         (decode_locdesc): Likewise.
16848         (dwarf2_per_cu_objfile): Likewise.
16849         (dwarf2_per_cu_text_offset): Likewise.
16850         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
16851         objfile.
16852         (set_die_type): Access objfile through
16853         dwarf2_per_objfile.
16854
16855 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
16856
16857         * valprint.c (converted_character_d): Remove typedef.
16858         (DEF_VEC_O (converted_character_d)): Remove.
16859         (count_next_character): Use std::vector.
16860         (print_converted_chars_to_obstack): Likewise.
16861         (generic_printstr): Likewise.
16862
16863 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16864
16865         * xml-support.h (struct gdb_xml_value): Add constructor.
16866         <value>: Change type to unique_xmalloc_ptr.
16867         (gdb_xml_value_s): Remove typedef.
16868         (DEF_VEC_O (gdb_xml_value_s)): Remove.
16869         (gdb_xml_element_start_handler): Change parameter type to
16870         std::vector.
16871         (xml_find_attribute): Likewise.
16872         * xml-support.c (xml_find_attribute): Change parameter type to
16873         std::vector and adjust.
16874         (gdb_xml_values_cleanup): Remove.
16875         (gdb_xml_parser::start_element): Adjust to std::vector.
16876         (xinclude_start_include): Change paraeter type to std::vector
16877         and adjust.
16878         * btrace.c (check_xml_btrace_version): Likewise.
16879         (parse_xml_btrace_block): Likewise.
16880         (parse_xml_btrace_pt_config_cpu): Likewise.
16881         (parse_xml_btrace_pt): Likewise.
16882         (parse_xml_btrace_conf_bts): Likewise.
16883         (parse_xml_btrace_conf_pt): Likewise.
16884         * memory-map.c (memory_map_start_memory): Likewise.
16885         (memory_map_start_property): Likewise.
16886         * osdata.c (osdata_start_osdata): Likewise.
16887         (osdata_start_item): Likewise.
16888         (osdata_start_column): Likewise.
16889         * remote.c (start_thread): Likewise.
16890         * solib-aix.c (library_list_start_library): Likewise.
16891         (library_list_start_list): Likewise.
16892         * solib-svr4.c (library_list_start_library): Likewise.
16893         (svr4_library_list_start_list): Likewise.
16894         * solib-target.c (library_list_start_segment): Likewise.
16895         (library_list_start_section): Likewise.
16896         (library_list_start_library): Likewise.
16897         (library_list_start_list): Likewise.
16898         * tracepoint.c (traceframe_info_start_memory): Likewise.
16899         (traceframe_info_start_tvar): Likewise.
16900         * xml-syscall.c (syscall_start_syscall): Likewise.
16901         * xml-tdesc.c (tdesc_start_target): Likewise.
16902         (tdesc_start_feature): Likewise.
16903         (tdesc_start_reg): Likewise.
16904         (tdesc_start_union): Likewise.
16905         (tdesc_start_struct): Likewise.
16906         (tdesc_start_flags): Likewise.
16907         (tdesc_start_enum): Likewise.
16908         (tdesc_start_field): Likewise.
16909         (tdesc_start_enum_value): Likewise.
16910         (tdesc_start_vector): Likewise.
16911
16912 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16913
16914         * extension.h (struct xmethod_worker) <clone>: Remove.
16915         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
16916         Remove.
16917         (python_xmethod_worker::clone): Remove.
16918         * valops.c (find_overload_match): Use std::move instead of
16919         clone.
16920
16921 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
16922
16923         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
16924         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
16925         <free_xmethod_worker_data>: Remove.
16926         <get_matching_xmethod_workers>: Chance VEC to std::vector.
16927         <get_xmethod_arg_types>: Remove.
16928         <get_xmethod_result_type>: Remove.
16929         <invoke_xmethod>: Remove.
16930         * extension.c (new_xmethod_worker): Remove.
16931         (clone_xmethod_worker): Remove.
16932         (get_matching_xmethod_workers): Return void, pass std::vector by
16933         pointer.
16934         (get_xmethod_arg_types): Rename to...
16935         (xmethod_worker::get_arg_types): ... this, and adjust.
16936         (get_xmethod_result_type): Rename to...
16937         (xmethod_worker::get_result_type): ... this, and adjust.
16938         (invoke_xmethod): Remove.
16939         (free_xmethod_worker): Remove.
16940         (free_xmethod_worker_vec): Remove.
16941         * extension.h (enum ext_lang_rc): Move here from
16942         extension-priv.h.
16943         (struct xmethod_worker): Add constructor and destructor.
16944         <data>: Remove.
16945         <value>: Remove.
16946         <invoke, clone, do_get_result_type, do_get_arg_types>: New
16947         virtual pure methods.
16948         <get_arg_types, get_result_type>: New methods.
16949         (xmethod_worker_ptr): Remove typedef.
16950         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
16951         (xmethod_worker_vec): Remove typedef.
16952         (xmethod_worker_up): New typedef.
16953         (invoke_xmethod): Remove.
16954         (clone_xmethod_worker): Remove.
16955         (free_xmethod_worker): Remove.
16956         (free_xmethod_worker_vec): Remove.
16957         (get_xmethod_arg_types): Remove.
16958         (get_xmethod_result_type): Remove.
16959         * valops.c (find_method_list): Use std::vector, don't use
16960         intermediate vector.
16961         (value_find_oload_method_list): Use std::vector.
16962         (find_overload_match): Use std::vector.
16963         (find_oload_champ): Use std::vector.
16964         * value.c (value_free): Use operator delete.
16965         (value_of_xmethod): Rename to...
16966         (value_from_xmethod): ... this.  Don't assign
16967         xmethod_worker::value, take rvalue-reference.
16968         (result_type_of_xmethod): Adjust.
16969         (call_xmethod): Adjust.
16970         * value.h: Include extension.h.
16971         (struct xmethod_worker): Don't forward-declare.
16972         (value_of_xmethod): Rename to...
16973         (value_from_xmethod): ... this, take rvalue-reference.
16974         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
16975         (struct python_xmethod_worker): ... this, add constructor and
16976         destructor.
16977         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
16978         (gdbpy_free_xmethod_worker_data): Rename to...
16979         (python_xmethod_worker::~python_xmethod_worker): ... this and
16980         adjust.
16981         (gdbpy_clone_xmethod_worker_data): Rename to...
16982         (python_xmethod_worker::clone): ... this and adjust.
16983         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
16984         temporary vector.
16985         (gdbpy_get_xmethod_arg_types): Rename to...
16986         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
16987         (gdbpy_get_xmethod_result_type): Rename to...
16988         (python_xmethod_worker::do_get_result_type): ... this and
16989         adjust.
16990         (gdbpy_invoke_xmethod): Rename to...
16991         (python_xmethod_worker::invoke): ... this and adjust.
16992         (new_python_xmethod_worker): Rename to...
16993         (python_xmethod_worker::python_xmethod_worker): ... this and
16994         adjust.
16995         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
16996         Remove.
16997         (gdbpy_free_xmethod_worker_data): Remove.
16998         (gdbpy_get_matching_xmethod_workers): Use std::vector.
16999         (gdbpy_get_xmethod_arg_types): Remove.
17000         (gdbpy_get_xmethod_result_type): Remove.
17001         (gdbpy_invoke_xmethod): Remove.
17002         * python/python.c (python_extension_ops): Remove obsolete
17003         callbacks.
17004
17005 2018-01-05  Pedro Alves  <palves@redhat.com>
17006
17007         PR gdb/18653
17008         * common/signals-state-save-restore.c
17009         (save_original_signals_state): New parameter 'quiet'.  Warn if we
17010         find a custom handler preinstalled, instead of internal erroring.
17011         But only warn if !quiet.
17012         * common/signals-state-save-restore.h
17013         (save_original_signals_state): New parameter 'quiet'.
17014         * main.c (captured_main_1): Move save_original_signals_state call
17015         after option handling, and pass QUIET.
17016
17017 2018-01-05  Pedro Alves  <palves@redhat.com>
17018
17019         * spu-tdep.c (spu_catch_start): Pass
17020         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
17021
17022 2018-01-05  Pedro Alves  <palves@redhat.com>
17023
17024         PR gdb/22670
17025         * ada-lang.c (literal_symbol_name_matcher): New function.
17026         (ada_get_symbol_name_matcher): Use it for
17027         symbol_name_match_type::SEARCH_NAME.
17028         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
17029         it down instead of assuming symbol_name_match_type::FULL.
17030         * block.h (block_lookup_symbol): New parameter 'match_type'.
17031         * c-valprint.c (print_unpacked_pointer): Use
17032         lookup_symbol_search_name instead of lookup_symbol.
17033         * compile/compile-object-load.c (get_out_value_type): Pass down
17034         symbol_name_match_type::SEARCH_NAME.
17035         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
17036         symbol_name_match_type::FULL.
17037         * cp-support.c (cp_get_symbol_name_matcher): Handle
17038         symbol_name_match_type::SEARCH_NAME.
17039         * infrun.c (insert_exception_resume_breakpoint): Use
17040         lookup_symbol_search_name.
17041         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
17042         * psymtab.c (maintenance_check_psymtabs): Use
17043         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
17044         * stack.c (print_frame_args): Use lookup_symbol_search_name and
17045         SYMBOL_SEARCH_NAME.
17046         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
17047         if symbol_name_match_type::SEARCH_NAME.
17048         (lookup_symbol_in_language): Pass down
17049         symbol_name_match_type::FULL.
17050         (lookup_symbol_search_name): New.
17051         (lookup_language_this): Pass down
17052         symbol_name_match_type::SEARCH_NAME.
17053         (lookup_symbol_aux, lookup_local_symbol): New parameter
17054         'match_type'.  Pass it down.
17055         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
17056         (lookup_symbol_search_name): New declaration.
17057         (lookup_symbol_in_block): New 'match_type' parameter.
17058
17059 2018-01-05  Pedro Alves  <palves@redhat.com>
17060
17061         PR gdb/22670
17062         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
17063         ada_lookup_symbol.
17064         (ada_lookup_symbol): Reimplement in terms of
17065         ada_lookup_symbol_list, bits factored out from
17066         ada_lookup_encoded_symbol.
17067
17068 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17069
17070         * ada-exp.y (write_object_renaming): When subscripting an array
17071         using a symbol as the index, pass the block in call to
17072         ada_lookup_encoded_symbol when looking that symbol up.
17073
17074 2018-01-05  Jerome Guitton  <guitton@adacore.com>
17075
17076         * ada-lang.c (ada_array_length): Use ada_index_type instead of
17077         TYPE_INDEX_TYPE.
17078
17079 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17080
17081         * ada-lang.c (ada_to_fixed_value_create): Add handling of
17082         the case where VALUE_LVAL (val0) is not lval_memory.
17083
17084 2018-01-05  Xavier Roirand  <roirand@adacore.com>
17085
17086         * ada-valprint.c (print_optional_low_bound): Handle
17087         character-indexed array printing like boolean-indexed array
17088         printing.
17089
17090 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17091
17092         * NEWS: Create a new section for the next release branch.
17093         Rename the section of the current branch, now that it has
17094         been cut.
17095
17096 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
17097
17098         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
17099         * version.in: Bump version to 8.1.50.DATE-git.
17100
17101 2018-01-03  Xavier Roirand  <roirand@adacore.com>
17102
17103         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
17104         Add field.
17105         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
17106         Add field.
17107         (default_exception_support_info) <catch_handlers_sym>: Add field.
17108         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
17109         (ada_exception_name_addr_1): Add "catch handlers" handling.
17110         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
17111         Update all callers.
17112         (create_excep_cond_exprs) <ex>: Add parameter.
17113         (re_set_exception): Update create_excep_cond_exprs call.
17114         (print_it_exception, print_one_exception, print_mention_exception)
17115         (print_recreate_exception): Add "catch handler" handling.
17116         (allocate_location_catch_handlers, re_set_catch_handlers)
17117         (check_status_catch_handlers, print_it_catch_handlers)
17118         (print_one_catch_handlers, print_mention_catch_handlers)
17119         (print_recreate_catch_handlers): New function.
17120         (catch_handlers_breakpoint_ops): New variable.
17121         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
17122         Add parameter.  Add "catch handler" handling.
17123         (ada_exception_sym_name, ada_exception_breakpoint_ops):
17124         Add "catch handler" handling.
17125         (ada_exception_catchpoint_cond_string): Add "catch handler"
17126         handling.
17127         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
17128         call.
17129         (catch_ada_handlers_command): New function.
17130         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
17131         operations structure.
17132         (_initialize_ada_language): Add "catch handlers" command entry.
17133         * NEWS: Document "catch handlers" feature.
17134
17135 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
17136
17137         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
17138         account when creating the array type of the slice.
17139         (ada_value_slice): Likewise.
17140
17141 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
17142
17143         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
17144         New enum value.
17145         (create_array_type_with_stride): Add byte_stride_prop parameter.
17146         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
17147         New parameter.  Update all callers in this file.
17148         (array_type_has_dynamic_stride): New function.
17149         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
17150         of arrays with dynamic byte strides.
17151         * dwarf2read.c (read_array_type): Add support for dynamic
17152         DW_AT_byte_stride attributes.
17153
17154 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
17155
17156         * dwarf2read.c (read_unspecified_type): Treat
17157         DW_TAG_enumeration_type DIEs from Ada units as stubs.
17158
17159 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17160
17161         Update copyright year range in all GDB files.
17162
17163 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
17164
17165         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
17166         and gdb/testsuite/gdb.base/step-line.c.
17167
17168 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17169
17170         * copyright.py (main): Dump the contents of
17171         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
17172         even if BY_HAND is empty.
17173
17174 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17175
17176         * top.c (print_gdb_version): Update Copyright year in version
17177         message.
17178
17179 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
17180
17181         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
17182
17183 For older changes see ChangeLog-2017.
17184 \f
17185 Local Variables:
17186 mode: change-log
17187 left-margin: 8
17188 fill-column: 74
17189 version-control: never
17190 coding: utf-8
17191 End: