Minor cleanups in tui-io.c
[external/binutils.git] / gdb / ChangeLog
1 2018-10-19  Tom Tromey  <tom@tromey.com>
2
3         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
4         (key_is_backspace, tui_getc): Don't declare.
5         * tui/tui-io.c (key_is_start_sequence): Now static.
6         (key_is_end_sequence, key_is_backspace): Remove.
7         (tui_getc): Now static.
8
9 2018-10-19  Tom Tromey  <tom@tromey.com>
10
11         * symfile.c (reread_symbols): Clear "static_links".
12
13 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
14
15         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
16         define.
17         (aarch64_linux_sigframe_init): Extra boundary checks.
18
19 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
20
21         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
22         the possibly non-existent tdesc type 'vec128', but the type of raw
23         register v16 instead.
24
25 2018-10-19  Gary Benson <gbenson@redhat.com>
26
27         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
28
29 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
30
31         PR cli/23785
32         * cli/cli-dump.c (restore_binary_file): Check if "file" is
33         NULL.
34
35 2018-10-17  Paul Koning  <paul_koning@dell.com>
36
37         * charset.c (convert_between_encodings): Fix unsigned overflow.
38
39 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
40
41         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
42         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
43         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
44         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
45         New functions.
46         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
47         and fbsd_info_proc_mappings_header.
48         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
49         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
50         New.
51
52 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
53
54         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
55         Solaris Maintainer.
56
57 2018-10-15  Tom Tromey  <tom@tromey.com>
58
59         * tui/tui.c (strcat_to_buf): Remove casts.
60         * tui/tui-winsource.c (tui_show_source_line)
61         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
62         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
63         * tui/tui-windata.c (tui_first_data_item_displayed)
64         (tui_delete_data_content_windows, tui_erase_data_content)
65         (tui_display_all_data, tui_display_data_from)
66         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
67         * tui/tui-win.c (tui_set_win_height)
68         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
69         casts.
70         * tui/tui-win.c (tui_resize_all): Remove casts.
71         (tui_scroll_backward_command, tui_set_focus)
72         (tui_set_tab_width_command): Likewise.
73         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
74         * tui/tui-regs.c (tui_show_register_group): Remove cast.
75         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
76         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
77         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
78         Remove casts.
79
80 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
81
82         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
83         AArch64/ARM maintainer.
84
85 2018-10-11  Gary Benson <gbenson@redhat.com>
86
87         * interps.h (interp::m_name): Make private and mutable.
88         * interps.c (interp::~interp): Free m_name.
89
90 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
91             Simon Marchi <simark@simark.ca>
92
93         * README (`configure' options): Add documentation for new
94         "--enable-unit-tests" option.
95         * acinclude.m4: Include "selftest.m4".
96         * configure: Regenerate.
97         * configure.ac: Use "GDB_AC_SELFTEST".
98         * maint.c (maintenance_selftest): Update message informing
99         that selftests have been disabled.
100         (maintenance_info_selftests): Likewise.
101         * selftest.m4: New file.
102
103 2018-10-10  Gary Benson <gbenson@redhat.com>
104
105         * remote.c (remote_target::remote_send_printf): Add
106         missing va_end found by Coverity.
107
108 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
109
110         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
111
112 2018-10-09  Tom Tromey  <tom@tromey.com>
113
114         * configure: Rebuild.
115         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
116         * NEWS: Update --enable-ubsan documentation.
117
118 2018-10-09  Gary Benson <gbenson@redhat.com>
119
120         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
121         found by Coverity.
122
123 2018-10-08  Tom Tromey  <tom@tromey.com>
124
125         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
126         variable.
127         (riscv_fbsd_init_abi): Likewise.
128
129 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
130         * valops.c (value_struct_elt_for_reference): Rename local variable
131         to work around the shadowing a previous local warning.
132
133 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
134
135         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
136         * NEWS: Mention new FreeBSD/riscv native configuration.
137         * configure.host: Add riscv*-*-freebsd*.
138         * configure.nat: Likewise.
139         * riscv-fbsd-nat.c: New file.
140
141 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
142
143         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
144         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
145         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
146         * NEWS: Mention new FreeBSD/riscv target.
147         * configure.tgt: Add riscv*-*-freebsd*.
148         * riscv-fbsd-tdep.c: New file.
149         * riscv-fbsd-tdep.h: New file.
150
151 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
152
153         * regcache.h (struct regcache_map_entry): Note that this type can
154         be used with traditional frame caches.
155         * trad-frame.c (trad_frame_set_reg_regmap): New.
156         * trad-frame.h (trad_frame_set_reg_regmap): New.
157
158 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
159
160         PR c++/16841
161         * valops.c (get_virtual_base_offset): New function.
162         (value_struct_elt_for_reference): Use it to get virtual base offset
163         and add it in calculating class member address.
164
165 2018-10-08   John Darrington <john@darrington.wattle.id.au>
166
167     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
168       (check_producer): Check if the producer is codewarrior.
169       (producer_is_codewarrior): New function.
170       (lnp_state_machine::record_line): Ignore is_stmt flag for records
171        produced by codewarrior.
172       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
173
174 2018-10-06  Tom Tromey  <tom@tromey.com>
175
176         PR python/19399:
177         * python/py-inferior.c: Add "architecture" entry.
178         (infpy_architecture): New function.
179
180 2018-10-06  Tom Tromey  <tom@tromey.com>
181
182         PR python/21765:
183         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
184         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
185         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
186         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
187
188 2018-10-06  Tom Tromey  <tom@tromey.com>
189
190         PR build/17077:
191         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
192         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
193         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
194         #include.
195
196 2018-10-06  Tom Tromey  <tom@tromey.com>
197
198         * python/py-breakpoint.c (bppy_get_location): Handle a
199         bp_breakpoint without a location.
200
201 2018-10-06  Tom Tromey  <tom@tromey.com>
202
203         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
204         (_RegEx): Reformat help text.
205         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
206         (AnyCallerIs, AnyCallerMatches): Reformat help text.
207         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
208         text.
209         * python/lib/gdb/command/xmethods.py (InfoXMethod)
210         (EnableXMethod, DisableXMethod): Remove help indentation.
211         Capitalize meta-syntactic variables.
212         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
213         (EnableUnwinder, DisableUnwinder): Remove help indentation.
214         Capitalize meta-syntactic variables.
215         * python/lib/gdb/command/explore.py (ExploreCommand)
216         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
217         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
218         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
219         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
220         Remove help indentation.
221         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
222         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
223         (DisableFrameFilter, SetFrameFilterPriority)
224         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
225
226 2018-10-06  Tom Tromey  <tom@tromey.com>
227
228         PR tui/28819:
229         * tui/tui-io.c (gdb_wgetch): New function.
230         (tui_mld_getc, tui_getc): Use it.
231
232 2018-10-05  Tom Tromey  <tom@tromey.com>
233
234         * sol-thread.c (sol_thread_target::wait): Rename inner
235         "save_ptid".
236
237 2018-10-04  Tom Tromey  <tom@tromey.com>
238
239         * configure: Rebuild.
240         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
241
242 2018-10-04  Tom Tromey  <tom@tromey.com>
243
244         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
245         declaration of "block".
246
247 2018-10-04  Tom Tromey  <tom@tromey.com>
248
249         * common/filestuff.c (fdwalk): Remove inner declaration of
250         "result".
251
252 2018-10-04  Tom Tromey  <tom@tromey.com>
253
254         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
255         "structs_addr" and hoist declaration.
256
257 2018-10-04  Tom Tromey  <tom@tromey.com>
258
259         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
260         variable "size".
261
262 2018-10-04  Tom Tromey  <tom@tromey.com>
263
264         * mdebugread.c (parse_partial_symbols): Use std::string.
265
266 2018-10-04  Tom Tromey  <tom@tromey.com>
267
268         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
269         * p-valprint.c (pascal_val_print): Split inner "i" variable.
270         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
271         header.
272         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
273         more inner scope.
274         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
275         * varobj.c (varobj_update): Rename inner "newobj",
276         "type_changed".
277         * valprint.c (generic_emit_char): Rename inner "buf".
278         * valops.c (find_overload_match): Rename inner "temp".
279         (value_struct_elt_for_reference): Declare "v" in more inner
280         scope.
281         * v850-tdep.c (v850_push_dummy_call): Rename "len".
282         * unittests/array-view-selftests.c (run_tests): Rename inner
283         "vec".
284         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
285         header.
286         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
287         "tsv" in more inner scope.
288         (print_one_static_tracepoint_marker): Rename inner
289         "tuple_emitter".
290         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
291         (tic6x_push_dummy_call): Don't redeclare "addr".
292         * target-float.c: Declare "dto" lower.
293         * symtab.c (lookup_local_symbol): Rename inner "sym".
294         (find_pc_sect_line): Rename inner "pc".
295         * stack.c (print_frame): Don't redeclare "gdbarch".
296         (return_command): Rename inner "gdbarch".
297         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
298         "sp".
299         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
300         header.
301         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
302         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
303         scope.
304         * remote.c (remote_target::update_thread_list): Don't redeclare
305         "tp".
306         (remote_target::process_initial_stop_replies): Rename inner
307         "thread".
308         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
309         (remote_target::wait_as): Don't redeclare "stop_reply".
310         (remote_target::get_thread_local_address): Rename inner
311         "result".
312         (remote_target::get_tib_address): Likewise.
313
314         * regcache.c (cooked_read_test): Rename "regnum".
315         * record-btrace.c (cmd_record_btrace_start): Rename inner
316         "exception".
317         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
318         loop header.
319         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
320         header.
321         (ppu2spu_sniffer): Rename inner "buf".
322         * parse.c (operator_check_standard): Rename inner "type",
323         "objfile".
324         * p-valprint.c (pascal_val_print): Introduce new scope for
325         "low_bound", "high_bound".
326         * p-exp.y (yylex): Declare "i" in loop header.
327         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
328         Lower declaration of "s".
329         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
330         header.
331         (nios2_push_dummy_call): Rename "len".
332         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
333         "buf".
334         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
335         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
336         (linux_xfer_osdata_modules): Likewise.
337         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
338         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
339         (mips_o64_push_dummy_call): Likewise.
340         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
341         "op".
342         * mi/mi-main.c (list_available_thread_groups): Rename inner
343         "tuple_emitter".
344         (mi_cmd_data_read_memory): Rename inner "opts".
345         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
346         "tuple_emitter".
347         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
348         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
349         more inner scope.
350         (parse_partial_symbols): Rename inner "pst", "p", "name"
351         * main.c (captured_main_1): Rename inner "i"s.
352         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
353         "oso2".
354         * linux-tdep.c (linux_info_proc): Rename inner "filename".
355         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
356         * infrun.c (handle_no_resumed): Don't redeclare "thread".
357         (handle_signal_stop): Rename inner "gdbarch".
358         (handle_command): Declare "signum" in loop header.
359         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
360         "status".
361         (examine_prologue): Rename inner "sol" and "sof".
362         (ia64_extract_return_value): Rename inner "val".  Declare another
363         "val" in a more inner scope.
364         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
365         inner scope.
366         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
367         "except".
368         * findvar.c (default_read_var_value): Don't redeclare "addr".
369         * f-exp.y (yylex): Declare "i" in loop header.
370         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
371         Rename inner "type", "expect_type".
372         (evaluate_subexp_for_sizeof): Rename inner "pc".
373         * elfread.c (elf_symfile_read): Rename inner "abfd".
374         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
375         "bytes_read".
376         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
377         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
378         (dwarf_decode_line_header): Rename inner "lh".
379         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
380         "offset".  Declare "i" in loop header.
381         (disassemble_dwarf_expression): Rename inner "addr_size".
382         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
383         inner "result".
384         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
385         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
386         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
387         "inner_list_emitter".
388         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
389         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
390         declaration in a block.
391         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
392         * cp-valprint.c (cp_print_value_fields): Don't redeclare
393         "obstack_final_size".
394         * cp-support.c (inspect_type): Declare "i" in loop header.
395         * compile/compile.c (compile_instance::insert_symbol_error):
396         Rename inner "e".
397         * common/agent.c (agent_run_command): Remove inner "ret"
398         declaration.
399         * coffread.c (coff_symfile_read): Rename inner "name".
400         (coff_symfile_read): Rename inner "abfd".
401         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
402         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
403         "high".
404         * c-exp.y (lex_one_token): Move "len" declaration lower.
405         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
406         "gdbarch".
407         (create_exception_master_breakpoint): Likewise.  Don't redeclare
408         "b".
409         (watch_command_1): Declare "mark" later.
410         (clear_command): Don't shadow "a" or "b".
411         (delete_command): Rename inner "b".
412         (delete_trace_command): Likewise.
413         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
414         "op".
415         (arm_gdbarch_init): Remove inner "e_flags".
416         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
417         "offset" in inner blocks.
418
419 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
420
421         * dwarf-index-write.c (file_write): Don't write if the vector is
422         empty.
423
424 2018-10-05  Tom de Vries  <tdevries@suse.de>
425
426         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
427         PyArg_ParseTuple call.
428
429 2018-10-05  Tom de Vries  <tdevries@suse.de>
430
431         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
432         PyArg_ParseTuple call.
433
434 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
435
436         * psymtab.c (recursively_search_psymtabs): Reformat parameters
437         to avoid exceeding 80 characters per line limit.
438
439 2018-10-04  Tom Tromey  <tom@tromey.com>
440
441         * symfile.c (syms_from_objfile_1, finish_new_objfile)
442         (reread_symbols): Update.
443         * complaints.h (clear_complaints): Remove argument.
444         * complaints.c (enum complaint_series): Remove.
445         (series): Remove global.
446         (complaint_internal): Update.
447         (clear_complaints): Remove argument.
448
449 2018-10-04  Tom Tromey  <tom@tromey.com>
450
451         * symfile.c (symbol_file_add_with_addrs): Do not print "no
452         debugging symbols" message if there is a separate debug objfile.
453
454 2018-10-04  Tom Tromey  <tom@tromey.com>
455
456         PR cli/19551:
457         * symfile.c (symbol_file_add_with_addrs): Update output.
458         * psymtab.c (require_partial_symbols): Update output.
459
460 2018-10-04  Tom Tromey  <tom@tromey.com>
461
462         PR cli/22234:
463         * complaints.c: Emit \n.
464
465 2018-10-04  Tom Tromey  <tom@tromey.com>
466
467         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
468         (separate_debug_file_exists, find_separate_debug_file)
469         (add_symbol_file_command, reread_symbols, allocate_symtab)
470         (allocate_compunit_symtab): Use filtered printing, not
471         unfiltered.
472         * psymtab.c (require_partial_symbols, dump_psymtab)
473         (allocate_psymtab): Use filtered printing, not unfiltered.
474
475 2018-10-04  Tom Tromey  <tom@tromey.com>
476
477         * complaints.c (complaint_internal): Correctly check complaint
478         count.
479
480 2018-10-04  Tom Tromey  <tom@tromey.com>
481
482         * complaints.h (struct complaints): Remove declaration.
483         * complaints.c (clear_complaints): Remove an unused variable.
484
485 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
486
487         * MAINTAINERS (Write After Approval): Add self.
488
489 2018-10-03  Tom Tromey  <tom@tromey.com>
490
491         * guile/scm-value.c (gdbscm_value_to_string): Initialize
492         "buffer_contents".
493         * coffread.c (coff_symtab_read): Initialize "newobj".
494
495 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
496
497         * dwarf2read.c (read_func_scope): Remove struct keyword in
498         range-based for.
499
500 2018-10-03  Tom Tromey  <tom@tromey.com>
501
502         * README: Mention --enable-ubsan.
503         * NEWS: Mention --enable-ubsan.
504         * acinclude.m4: Include sanitize.m4.
505         * configure: Rebuild.
506         * configure.ac: Call AM_GDB_UBSAN.
507         * sanitize.m4: New file.
508
509 2018-10-03  Tom Tromey  <tom@tromey.com>
510
511         * expression.h (enum exp_opcode): Use uint8_t as base type.
512         * expprint.c (op_name): Handle invalid opcodes.
513
514 2018-10-03  Tom Tromey  <tom@tromey.com>
515
516         * parse.c (prefixify_expression): Add assert.
517         (parse_exp_in_context_1): Throw exception if the expression is
518         empty.
519
520 2018-10-03  Tom Tromey  <tom@tromey.com>
521
522         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
523
524 2018-10-03  Tom Tromey  <tom@tromey.com>
525
526         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
527
528 2018-10-03  Tom Tromey  <tom@tromey.com>
529
530         * dwarf2read.c (read_subrange_type): Make "negative_mask"
531         unsigned.
532
533 2018-10-03  Tom Tromey  <tom@tromey.com>
534
535         * findvar.c (extract_integer): Do work in an unsigned type.
536
537 2018-10-03  Tom Tromey  <tom@tromey.com>
538
539         * common/enum-flags.h (enum_flags::operator~): Add static assert.
540         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
541         base type.
542         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
543         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
544         type.
545         * c-lang.h (enum c_string_type_values): Use unsigned as base
546         type.
547         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
548
549 2018-10-03  Tom Tromey  <tom@tromey.com>
550
551         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
552         <~dwarf2_frame_state_reg_info>: Update.
553         <dwarf2_frame_state_reg_info>: Update.
554         <alloc_regs>: Add assertion.  Update.
555         <reg>: Now a std::vector.
556         <num_regs>: Remove.
557         <swap>: Update.
558         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
559         (execute_cfa_program_test, dwarf2_frame_cache): Update.
560
561 2018-10-03  Tom Tromey  <tom@tromey.com>
562
563         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
564
565 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
566
567         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
568
569 2018-10-02  Tom Tromey  <tom@tromey.com>
570
571         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
572
573 2018-10-02  John Darrington <john@darrington.wattle.id.au>
574
575         * NEWS: Mention changed commands.
576         * ser-uds.c: New file.
577         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
578         * configure: Regenerate.
579         * Makefile.in: Add new file.
580         * serial.c (serial_open): Check if filename is a socket
581           and lookup the appropriate interface accordingly.
582
583 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
584
585         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
586         define.
587         (AARCH64_EXTRA_MAGIC): Likewise.
588         (AARCH64_FPSIMD_MAGIC): Likewise.
589         (AARCH64_SVE_MAGIC): Likewise.
590         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
591         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
592         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
593         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
594         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
595         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
596         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
597         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
598         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
599         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
600         (read_aarch64_ctx): Add function.
601         (aarch64_linux_sigframe_init): Detect FP registers.
602
603 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
604
605         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
606         (AARCH64_D0_REGNUM): Likewise.
607         (AARCH64_S0_REGNUM): Likewise.
608         (AARCH64_H0_REGNUM): Likewise.
609         (AARCH64_B0_REGNUM): Likewise.
610         (AARCH64_SVE_V0_REGNUM): Likewise.
611         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
612         (AARCH64_D0_REGNUM): Likewise.
613         (AARCH64_S0_REGNUM): Likewise.
614         (AARCH64_H0_REGNUM): Likewise.
615         (AARCH64_B0_REGNUM): Likewise.
616         (AARCH64_SVE_V0_REGNUM): Likewise.
617
618 2018-10-01  Gary Benson <gbenson@redhat.com>
619
620         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
621         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
622         prfpregset_t instead of gdb_prfpregset_t.
623         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
624         * configure, config.in: Rebuild.
625
626 2018-10-01  Gary Benson <gbenson@redhat.com>
627
628         * common/gdb_proc_service.h: New file, factored out from...
629         * gdb_proc_service.h: Moved common code to the above file.
630         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
631
632 2018-10-01  Gary Benson <gbenson@redhat.com>
633
634         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
635         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
636
637 2018-10-01  Gary Benson <gbenson@redhat.com>
638
639         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
640         (AC_CHECK_HEADERS): Check for linux/elf.h.
641         * configure, config.in: Rebuild.
642         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
643         doesn't define elf_fpregset_t.
644
645 2018-10-01  Gary Benson <gbenson@redhat.com>
646
647         * gdb_proc_service.h: Whitespace change.
648
649 2018-10-01  Tom Tromey  <tom@tromey.com>
650
651         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
652         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
653         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
654
655 2018-10-01  Tom Tromey  <tom@tromey.com>
656
657         * README: Minor change.
658
659 2018-09-30  Pedro Alves  <palves@redhat.com>
660
661         * darwin-nat-info.c (darwin_debug_regions_recurse)
662         (info_mach_exceptions_command): Remove unused local variables.
663         * darwin-nat.c (darwin_decode_notify_message)
664         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
665         (darwin_stop_inferior, darwin_setup_exceptions)
666         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
667         (darwin_nat_target::attach, darwin_nat_target::detach)
668         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
669         local variables.
670         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
671         variables.
672
673 2018-09-29  Tom Tromey  <tom@tromey.com>
674
675         * README: Remove some leftover text.
676
677 2018-09-29  Tom Tromey  <tom@tromey.com>
678
679         * PROBLEMS: Rewrite.
680         * README: Update.
681
682 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
683
684         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
685         case with explicit breakpoint kind.
686         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
687         'additional_info' and related logic.
688         (riscv_debug_breakpoints): New variable.
689         (riscv_breakpoint_kind_from_pc): Use the length of the existing
690         instruction to determine the breakpoint kind.
691         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
692         flag.  Update description of 'set/show riscv
693         use-compressed-breakpoints' flag.
694
695 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
696
697         (NEWS): Mention changes to frame related commands.
698         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
699         (add_prefix_cmd_suppress_notification): New function.
700         (add_com_suppress_notification): Call
701         add_cmd_suppress_notification.
702         * command.h (add_cmd_suppress_notification): Declare.
703         (add_prefix_cmd_suppress_notification): Declare.
704         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
705         (parse_frame_specification): Moved from stack.c, with
706         simplification to handle a single argument.
707         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
708         switch to the selected frame.  Add a header comment.
709         * stack.c: Remove 'safe-ctype.h' include.
710         (find_frame_for_function): Add declaration.
711         (find_frame_for_address): New function.
712         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
713         (frame_selection_by_function_completer): New function.
714         (info_frame_command): Rename to...
715         (info_frame_command_core): ...this, and update parameter types.
716         (select_frame_command): Rename to...
717         (select_frame_command_core): ...this, and update parameter types.
718         (frame_command): Rename to...
719         (frame_command_core): ...this, and update parameter types.
720         (class frame_command_helper): New class to wrap implementations of
721         frame related sub-commands.
722         (frame_apply_cmd_list): New static global.
723         (frame_cmd_list): Make static.
724         (select_frame_cmd_list): New global for sub-commands.
725         (info_frame_cmd_list): New global for sub-commands.
726         (_initialize_stack): Register sub-commands for 'frame',
727         'select-frame', and 'info frame'.  Update 'frame apply' commands
728         to use frame_apply_cmd_list.  Move function local static
729         frame_apply_list to file static frame_apply_cmd_list for
730         consistency.
731         * stack.h (select_frame_command): Delete declarationn.
732         (select_frame_for_mi): Declare new function.
733
734 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
735
736         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
737         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
738         and NOP.
739
740 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
741
742         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
743
744 2018-09-26  Tom Tromey  <tom@tromey.com>
745
746         * valops.c (auto_abandon): Remove dead code.
747
748 2018-09-26  Tom Tromey  <tom@tromey.com>
749
750         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
751
752 2018-09-24  Tom Tromey  <tom@tromey.com>
753
754         * common/pathstuff.c (get_standard_cache_dir): Make
755         "xdg_cache_home" and "home" const.
756         * top.c (init_history): Make "tmpenv" const.
757         * main.c (get_init_files): Make "homedir" const.
758
759 2018-09-23  Tom Tromey  <tom@tromey.com>
760
761         PR python/18852:
762         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
763
764 2018-09-23  Tom Tromey  <tom@tromey.com>
765
766         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
767         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
768         * python/python-internal.h (gdbpy_handle_exception): Declare.
769         * python/py-utils.c (gdbpy_handle_exception): New function.
770
771 2018-09-23  Tom Tromey  <tom@tromey.com>
772
773         PR python/17284:
774         * python/py-type.c (typy_template_argument): Check for negative
775         argument number.
776
777 2018-09-23  Tom Tromey  <tom@tromey.com>
778
779         PR python/14062:
780         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
781
782 2018-09-23  Tom Tromey  <tom@tromey.com>
783
784         PR python/18170:
785         * python/py-value.c (valpy_int): Allow conversion from pointer
786         type.
787
788 2018-09-23  Tom Tromey  <tom@tromey.com>
789
790         PR python/20126:
791         * python/py-value.c (valpy_int): Respect type sign.
792
793 2018-09-23  Tom Tromey  <tom@tromey.com>
794
795         PR python/18352;
796         * python/py-value.c (valpy_float): Allow conversions from int or
797         char.
798         (valpy_int, valpy_long): Allow conversions from float.
799
800 2018-09-23  Tom Tromey  <tom@tromey.com>
801
802         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
803         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
804
805 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
806
807         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
808         __sighndlr.
809         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
810
811 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
812
813         * windows-nat.c (windows_nat_target::wait): Remove a spurious
814         target_terminal::ours().
815
816 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
817
818         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
819         of vl to ULONGEST.
820
821 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
822
823         * breakpoint.c (update_inserted_breakpoint_locations): Remove
824         redundant condition.
825
826 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
827
828         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
829
830         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
831         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
832         * sol-thread.c (ps_pdmodel): Don't guard definition.
833
834         * procfs.c: Fix formatting.
835
836         * procfs.c (sysset_t_alloc): Remove.
837         (create_procinfo): Use XNEW instead of sysset_t_alloc.
838         (procfs_debug_inferior): Likewise.
839         (procfs_set_exec_trap): Likewise.
840         (proc_set_traced_sysentry): Don't allocate argp dynamically.
841         (proc_set_traced_sysexit): Likewise.
842
843         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
844         (dead_procinfo): Likewise.
845         (proc_warn): Likewise.
846         (proc_error): Likewise.
847         (proc_get_LDT_entry): Likewise.
848         (do_attach): Likewise.
849         (procfs_target::pid_to_str): Likewise.
850         (iterate_over_mappings): Likewise.
851
852         * procfs.c (create_procinfo): Fix ARI warning.
853         (proc_get_status): Likewise.
854         (proc_stop_process): Likewise.
855         (proc_run_process): Likewise.
856         (proc_kill): Likewise.
857         (proc_get_LDT_entry): Likewise.
858         (procfs_find_LDT_entry): Likewise.
859         (proc_update_threads): Likewise.
860         (proc_iterate_over_threads): Likewise.
861         (do_attach): Likewise.
862         (procfs_xfer_memory): Likewise.
863         (invalidate_cache): Likewise.
864         (procfs_target::resume): Likewise.
865         (procfs_init_inferior): Likewise.
866         (procfs_set_exec_trap): Likewise.
867         (procfs_target::thread_alive): Likewise.
868         (procfs_target::pid_to_exec_file): Likewise.
869         (iterate_over_mappings): Likewise.
870         (procfs_target::make_corefile_notes): Likewise.
871         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
872
873         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
874         (procfs_find_LDT_entry): Likewise.
875         * sol-thread.c (ps_lgetLDT): Likewise.
876
877 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
878
879         PR tdep/17903
880         * procfs.c (procfs_target): Declare pid_to_exec_file.
881         (procfs_target::pid_to_exec_file): New.
882
883 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
884
885         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
886         renaming.
887         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
888         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
889
890 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
891
892         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
893         (supply_fpregset, fill_fpregset): Move ...
894         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
895         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
896         Remove references to ioctl-based procfs.
897         Include <sys/reg.h>.
898         Remove PR_MODEL_NATIVE guards.
899         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
900         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
901
902 2018-09-19  Xavier Roirand  <roirand@adacore.com>
903
904         PR gdb/20981:
905         * solib-darwin.c (darwin_get_dyld_bfd): New function.
906         (darwin_solib_get_all_image_info_addr_at_init): Update call.
907         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
908
909 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
910
911         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
912         (fbsd_print_sockaddr_in6): Likewise.
913
914 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
915             Chris January  <chris.january@arm.com>
916
917         * eval.c (skip_undetermined_arglist): Skip argument list helper.
918         (evaluate_subexp_standard): Return a dummy type when
919         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
920         OP_F77_UNDETERMINED_ARGLIST case.
921         * expression.h (enum noside): Update comment.
922
923 2018-09-19  George Vasick <george.vasick@oracle.com>
924
925         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
926
927 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
928             April Chin <april.chin@oracle.com>
929             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
930
931         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
932         uint_t lwpid_t.
933         (create_procinfo): Print pids in /proc without leading zeros.
934
935 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
936
937         * nios2-tdep.c (nios2_gcc_target_options): New.
938         (nios2_gdb_arch_init): Install new hook.
939
940 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
941
942         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
943         New file.
944         * update-gnulib.sh: Apply patch.
945         * configure: Re-generate.
946
947 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
948
949         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
950         description.  Make "info proc" command descriptions more
951         consistent.
952
953 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
954
955         * NEWS: Mention 'info proc files' command.
956
957 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
958
959         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
960         descriptors for IP_FILES and IP_ALL.
961
962 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
963
964         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
965         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
966         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
967         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
968         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
969         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
970         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
971         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
972         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
973         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
974         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
975         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
976         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
977         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
978         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
979         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
980         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
981         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
982         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
983         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
984         (struct fbsd_sockaddr_un): New types.
985         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
986         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
987         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
988         (fbsd_core_info_proc_files): New functions.
989         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
990         IP_ALL.
991         * fbsd-tdep.h (fbsd_info_proc_files_header)
992         (fbsd_info_proc_files_entry): New.
993
994 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
995
996         * defs.h (enum info_proc_what) [IP_FILES]: New value.
997         * infcmd.c (info_proc_cmd_files): New function.
998         (_initialize_infcmd): Register 'info proc files' command.
999
1000 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1001
1002         * gnulib/aclocal-m4-deps.mk: Re-generate.
1003         * gnulib/aclocal.m4: Re-generate.
1004         * gnulib/config.in: Re-generate.
1005         * gnulib/configure: Re-generate.
1006         * gnulib/import/Makefile.am: Re-generate.
1007         * gnulib/import/Makefile.in: Re-generate.
1008         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1009         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1010         * gnulib/import/arpa_inet.in.h: New file.
1011         * gnulib/import/inet_ntop.c: New file.
1012         * gnulib/import/m4/arpa_inet_h.m4: New file.
1013         * gnulib/import/m4/inet_ntop.m4: New file.
1014         * gnulib/import/m4/netinet_in_h.m4: New file.
1015         * gnulib/import/m4/socklen.m4: New file.
1016         * gnulib/import/m4/sockpfaf.m4: New file.
1017         * gnulib/import/m4/stdalign.m4: New file.
1018         * gnulib/import/m4/sys_uio_h.m4: New file.
1019         * gnulib/import/netinet_in.in.h: New file.
1020         * gnulib/import/stdalign.in.h: New file.
1021         * gnulib/import/sys_socket.c: New file.
1022         * gnulib/import/sys_socket.in.h: New file.
1023         * gnulib/import/sys_uio.in.h: New file.
1024         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1025         module.
1026
1027 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1028
1029         * gnulib/aclocal-m4-deps.mk: New file.
1030         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1031         deterministically.
1032
1033 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1034
1035         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1036         KVE_PATH.
1037
1038 2018-09-18  Tom Tromey  <tom@tromey.com>
1039
1040         * compile/compile-object-load.c (struct
1041         link_hash_table_cleanup_data): Add constructor and destructor.
1042         Use DISABLE_COPY_AND_ASSIGN.
1043         (~link_hash_table_cleanup_data): Rename from
1044         link_hash_table_free.  Now a destructor.
1045         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1046
1047 2018-09-18  Tom Tromey  <tom@tromey.com>
1048
1049         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1050         * compile/compile-object-load.c (struct munmap_list): Move to
1051         header file.
1052         (munmap_list::add): Rename from munmap_list_add; rewrite.
1053         (munmap_list::~munmap_list): Rename from munmap_list_free.
1054         (munmap_listp_free_cleanup): Remove.
1055         (compile_object_load): Update.
1056         * compile/compile-object-load.h (struct munmap_list): Move from
1057         compile-object-load.c.  Rewrite.
1058
1059 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1060
1061         * aarch64-tdep.c (pass_in_v): Use register size.
1062         (aarch64_extract_return_value): Likewise.
1063         (aarch64_store_return_value): Likewise.
1064
1065 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1066
1067         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1068         rlim_t.
1069
1070 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1071
1072         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1073         Fix short help line.
1074
1075 2018-09-17  Tom Tromey  <tom@tromey.com>
1076
1077         PR python/20445:
1078         * configure: Rebuild.
1079         * configure.ac: Conditionally use -DNDEBUG for Python.
1080
1081 2018-09-17  Tom Tromey  <tom@tromey.com>
1082
1083         * configure: Rebuild.
1084         * configure.ac: Use gmp as a library dependency when checking for
1085         mpfr.
1086
1087 2018-09-17  Pedro Alves  <palves@redhat.com>
1088
1089         * python/py-inferior.c (find_inferior_object): Delete.
1090
1091 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1092
1093         * compile/compile-cplus-types.c
1094         (compile_cplus_instance::enter_scope): Don't use new_scope after
1095         std::move.
1096
1097 2018-09-17  Tom Tromey  <tom@tromey.com>
1098
1099         * common/pathstuff.c (get_standard_cache_dir): Use
1100         ~/Library/Caches on macOS.
1101         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1102
1103 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1104
1105         PR python/23669
1106         * breakpoint.c (commands_cmd_element): New.
1107         (_initialize_breakpoint): Assign commands_cmd_element.
1108         * breakpoint.h (commands_cmd_element): New.
1109         * cli/cli-script.c (while_cmd_element, if_command,
1110         define_cmd_element): New.
1111         (command_name_equals): Remove.
1112         (process_next_line): Compare commands by pointer, not by name.
1113         (_initialize_cli_script): Assign the various cmd_list_element
1114         variables.
1115         * compile/compile.c (compile_cmd_element): New.
1116         (_initialize_compile): Assign compile_cmd_element.
1117         * compile/compile.h (compile_cmd_element): New.
1118         * guile/guile.c (guile_cmd_element): New.
1119         (install_gdb_commands): Assign guile_cmd_element.
1120         * guile/guile.h (guile_cmd_element): New.
1121         * python/python.c (python_cmd_element): New.
1122         (_initialize_python): Assign python_cmd_element.
1123         * python/python.h (python_cmd_element): New.
1124         * tracepoint.c (while_stepping_cmd_element): New.
1125         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1126         * tracepoint.h (while_stepping_cmd_element): New.
1127
1128 2018-09-17  Tom Tromey  <tom@tromey.com>
1129
1130         * infrun.c (save_infcall_suspend_state): Return
1131         infcall_suspend_state_up.
1132         (save_infcall_control_state): Return infcall_control_state_up.
1133         * inferior.h (save_infcall_suspend_state)
1134         (save_infcall_control_state): Declare later.  Return unique
1135         pointers.
1136
1137 2018-09-17  Tom Tromey  <tom@tromey.com>
1138
1139         * infrun.c (struct stop_context): Declare constructor,
1140         destructor, "changed" method.
1141         (stop_context::stop_context): Rename from save_stop_context.
1142         (stop_context::~stop_context): Rename from
1143         release_stop_context_cleanup.
1144         (normal_stop): Update.
1145         (stop_context::changed): Rename from stop_context_changed.  Return
1146         bool.
1147
1148 2018-09-17  Tom Tromey  <tom@tromey.com>
1149
1150         * inferior.h (struct infcall_suspend_state_deleter): New.
1151         (infcall_suspend_state_up): New typedef.
1152         (struct infcall_control_state_deleter): New.
1153         (infcall_control_state_up): New typedef.
1154         (make_cleanup_restore_infcall_suspend_state)
1155         (make_cleanup_restore_infcall_control_state): Don't declare.
1156         * infcall.c (call_function_by_hand_dummy): Update.
1157         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1158         (make_cleanup_restore_infcall_suspend_state): Remove.
1159         (do_restore_infcall_control_state_cleanup)
1160         (make_cleanup_restore_infcall_control_state): Remove.
1161
1162 2018-09-17  Tom Tromey  <tom@tromey.com>
1163
1164         * gdbthread.h (struct thread_control_state): Add initializer.
1165         (class thread_info) <control>: Remove initializer.
1166         * inferior.h (struct inferior_control_state): Add initializer.
1167         (class inferior) <control>: Remove initializer.
1168         (exit_inferior_1): Update.
1169         * infrun.c (struct infcall_control_state): Add constructors.
1170         (save_infcall_control_state): Use new.
1171         (restore_infcall_control_state, discard_infcall_control_state):
1172         Use delete.
1173
1174 2018-09-17  Tom Tromey  <tom@tromey.com>
1175
1176         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1177         unique_ptr.
1178         <siginfo_data>: Now a unique_xmalloc_ptr.
1179         (save_infcall_suspend_state, restore_infcall_suspend_state)
1180         (discard_infcall_suspend_state)
1181         (get_infcall_suspend_state_regcache): Update.
1182
1183 2018-09-17  Tom Tromey  <tom@tromey.com>
1184
1185         * gdbthread.h (struct thread_suspend_state): Add initializers.
1186         (class thread_info) <suspend>: Remove initializer.
1187         * infrun.c (struct infcall_suspend_state): Add initializers.
1188         (save_infcall_suspend_state): Use new.
1189         (discard_infcall_suspend_state): Use delete.
1190
1191 2018-09-16  Tom Tromey  <tom@tromey.com>
1192
1193         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1194         Remove.
1195         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1196         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1197         (py_varobj_iter_new): Likewise.
1198         (py_varobj_get_iterator): Use gdbpy_ref.
1199
1200 2018-09-16  Tom Tromey  <tom@tromey.com>
1201
1202         * python/py-threadevent.c (py_get_event_thread): Simplify.
1203         * python/py-inferior.c (infpy_thread_from_thread_handle):
1204         Return immediately after calling thread_to_thread_object.  Use
1205         Py_RETURN_NONE.
1206         (thread_to_thread_object): Set the exception on a NULL return.
1207
1208 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1209
1210         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1211
1212 2018-09-16  Tom Tromey  <tom@tromey.com>
1213
1214         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1215         Remove.
1216
1217 2018-09-16  Tom Tromey  <tom@tromey.com>
1218
1219         * python/python-internal.h (thread_to_thread_object): Change
1220         return type.
1221         * python/py-inferior.c (thread_to_thread_object): Return a new
1222         reference.
1223         (infpy_thread_from_thread_handle): Update.
1224         * python/py-infthread.c (gdbpy_selected_thread): Update.
1225         * python/py-stopevent.c (create_stop_event_object): Update.
1226         * python/py-threadevent.c (py_get_event_thread): Return a new
1227         reference.
1228         (py_get_event_thread): Update.
1229         * python/py-event.h (py_get_event_thread): Change return type.
1230         * python/py-continueevent.c (create_continue_event_object):
1231         Update.
1232
1233 2018-09-16  Tom Tromey  <tom@tromey.com>
1234
1235         * python/py-progspace.c (pspy_get_objfiles): Update.
1236         * python/python-internal.h (objfile_to_objfile_object): Change
1237         return type.
1238         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1239         Update.
1240         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1241         Update.
1242         * python/python.c (gdbpy_get_current_objfile): Update.
1243         (gdbpy_objfiles): Update.
1244         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1245         Update.
1246         (objfile_to_objfile_object): Return a new reference.
1247         * python/py-symtab.c (stpy_get_objfile): Update.
1248         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1249         Update.
1250
1251 2018-09-16  Tom Tromey  <tom@tromey.com>
1252
1253         * python/py-inferior.c (infpy_get_progspace): Update.
1254         * python/python-internal.h (pspace_to_pspace_object): Change
1255         return type.
1256         * python/py-newobjfileevent.c
1257         (create_clear_objfiles_event_object): Update.
1258         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1259         Update.
1260         * python/python.c (gdbpy_get_current_progspace): Update.
1261         (gdbpy_progspaces): Update.
1262         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1263         reference.
1264         * python/py-objfile.c (objfpy_get_progspace): Update.
1265         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1266         Update.
1267
1268 2018-09-16  Tom Tromey  <tom@tromey.com>
1269
1270         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1271         (solib_name, block_for_pc, find_pc_line): New functions.
1272         (execute_unwinders): Update.
1273         * python/py-block.c (gdbpy_block_for_pc): Remove.
1274         * python/py-inferior.c (infpy_get_progspace): New function.
1275         (inferior_object_getset) <progspace>: Add.
1276         * python/py-progspace.c (pspy_objfiles): Rewrite.
1277         (pspy_solib_name, pspy_block_for_pc)
1278         (pspy_find_pc_line, pspy_is_valid): New functions.
1279         (progspace_object_methods): Add entries for solib_name,
1280         block_for_pc, find_pc_line, is_valid.
1281         * python/python-internal.h (gdbpy_block_for_pc)
1282         (build_objfiles_list): Don't declare.
1283         * python/python.c: Don't include solib.h.
1284         (gdbpy_solib_name, gdbpy_find_pc_line)
1285         (gdbpy_get_current_progspace, build_objfiles_list)
1286         (gdbpy_objfiles): Remove.
1287         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1288         solib_name, find_pc_line>: Remove entries.
1289
1290 2018-09-16  Tom Tromey  <tom@tromey.com>
1291
1292         * top.c (new_ui_command): Use GNU style for metasyntactic
1293         variables.
1294         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1295         variables.
1296         * maint.c (maintenance_translate_address): Remove "<>" around
1297         text.
1298         * interps.c (interpreter_exec_cmd): Use GNU style for
1299         metasyntactic variables.
1300         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1301         metasyntactic variables.
1302         * tracepoint.c (tfind_range_command): Use GNU style for
1303         metasyntactic variables.
1304         (tfind_outside_command): Likewise.
1305         (_initialize_tracepoint): Likewise.
1306         * remote.c (extended_remote_target::create_inferior): Use GNU
1307         style for metasyntactic variables.
1308         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1309         metasyntactic variables.
1310         (adi_assign_command): Likewise.
1311
1312 2018-09-16  Tom Tromey  <tom@tromey.com>
1313
1314         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1315         metasyntactic variables.  Print message if no disassembler options
1316         are available.
1317
1318 2018-09-15  Tom Tromey  <tom@tromey.com>
1319
1320         * infcmd.c (get_inferior_args): Return const char *.
1321         * inferior.h (get_inferior_args): Return type now const.
1322         * linux-tdep.c (linux_fill_prpsinfo): Update.
1323         * procfs.c (procfs_target::make_corefile_notes): Update.
1324
1325 2018-09-07  Tom Tromey  <tom@tromey.com>
1326
1327         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1328         inside the TRY.
1329
1330 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1331
1332         * nios2-tdep.c (nios2_type_align): New.
1333         (nios2_gdb_arch_init): Install type_align hook.
1334
1335 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1336
1337         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1338         type that is neither object file owned, nor gdbarch owned.
1339         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1340         gdbarch is non-NULL.
1341         (alloc_type_instance): Allocate non-objfile owned types on the
1342         gdbarch obstack.
1343         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1344         using TYPE_ALLOC to ensure memory is allocated on the correct
1345         obstack.
1346         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1347         obstack, or the gdbarch obstack.
1348         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1349
1350 2018-09-14  Tom Tromey  <tom@tromey.com>
1351
1352         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1353         block.
1354
1355 2018-09-14  Tom Tromey  <tom@tromey.com>
1356
1357         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1358
1359 2018-09-13  Tom Tromey  <tom@tromey.com>
1360
1361         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1362         static.
1363
1364 2018-09-13  Tom Tromey  <tom@tromey.com>
1365
1366         * exec.c (try_open_exec_file): Use std::string.
1367
1368 2018-09-13  Tom Tromey  <tom@tromey.com>
1369
1370         * utils.h (gdb_bfd_errmsg): Return std::string.
1371         * exec.c (exec_file_attach): Update.
1372         * compile/compile-object-load.c (compile_object_load): Update.
1373         * utils.c (gdb_bfd_errmsg): Return std::string.
1374
1375 2018-09-13  Tom Tromey  <tom@tromey.com>
1376
1377         * procfs.c (struct procinfo_deleter): New.
1378         (procinfo_up): New typedef.
1379         (do_destroy_procinfo_cleanup): Remove.
1380         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1381
1382 2018-09-13  Tom Tromey  <tom@tromey.com>
1383
1384         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1385
1386 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1387 2018-09-13  Tom Tromey  <tom@tromey.com>
1388
1389         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1390         (pspy_get_objfiles): New function.
1391         (progspace_object_methods): New.
1392         (pspace_object_type): Add tp_methods callback.
1393         * python/python-internal.h (build_objfiles_list): New
1394         declaration.
1395         * python/python.c (build_objfiles_list): New function.
1396         (gdbpy_objfiles): Implement using build_objfiles_list.
1397         * NEWS: Mention the Progspace.objfiles method.
1398
1399 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1400
1401         * python/py-inferior.c (infpy_get_progspace): New function.
1402         (inferior_object_getset): Add progspace property.
1403         * NEWS: Mention the new property.
1404
1405 2018-09-13  Tom Tromey  <tom@tromey.com>
1406
1407         PR rust/23650:
1408         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1409
1410 2018-09-13  Tom Tromey  <tom@tromey.com>
1411
1412         PR rust/23626:
1413         * rust-lang.c (rust_enum_variant): Now static.
1414         (rust_empty_enum_p): New function.
1415         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1416         Handle empty enum.
1417
1418 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1419
1420         * python/py-inferior.c (infpy_repr): New.
1421         (inferior_object_type): Register infpy_repr.
1422         * python/py-objfile.c (objfpy_repr): New.
1423         (objfile_object_type): Register objfpy_repr.
1424
1425 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1426
1427         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1428
1429 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1430
1431         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1432         typo.
1433
1434 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1435
1436         * common/common-utils.c: Don't include '<sys/stat.h>'.
1437         (is_regular_file): Move to...
1438         * common/filestuff.c (is_regular_file): ... here.
1439         * common/common-utils.h (is_regular_file): Move to...
1440         * common/filestuff.h (is_regular_file): ... here.
1441
1442 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1443
1444         * skip.c (debug_skip): New variable.
1445         (skiplist_entry::do_skip_file_p): Add debug output.
1446         (skiplist_entry::do_skip_gfile_p): Likewise.
1447         (skiplist_entry::skip_function_p): Likewise.
1448         (_initialize_step_skip): Create debug command.
1449         * NEWS: Mention set/show debug skip.
1450
1451 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1452
1453         * darwin-nat.c (should_disable_startup_with_shell):
1454         New function.
1455         (darwin_nat_target::create_inferior): Add call.
1456
1457 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1458
1459         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1460         inf_port, msg_state>: Initialize.
1461         (struct darwin_thread_info) <signaled, single_step>: Change
1462         type and initialize.
1463         (struct darwin_thread_info) <event>: Initialize.
1464
1465 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1466
1467         PR gdb/23555
1468         PR gdb/23558
1469         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1470         guesses.
1471
1472 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1473
1474         Revert:
1475         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1476
1477         PR gdb/23555
1478         PR gdb/23558
1479         * gnulib/aclocal.m4: Regenerate.
1480         * gnulib/config.in: Regenerate.
1481         * gnulib/configure: Regenerate.
1482         * gnulib/import/Makefile.am: Update.
1483         * gnulib/import/Makefile.in: Update.
1484         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1485         * gnulib/import/_Noreturn.h: ... this.
1486         * gnulib/import/alloca.in.h: Update.
1487         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1488         * gnulib/import/arg-nonnull.h: ... this.
1489         * gnulib/import/assure.h: Update.
1490         * gnulib/import/at-func.c: Update.
1491         * gnulib/import/basename-lgpl.c: Update.
1492         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1493         * gnulib/import/c++defs.h: ... this.
1494         * gnulib/import/canonicalize-lgpl.c: Update.
1495         * gnulib/import/cdefs.h: Update.
1496         * gnulib/import/chdir-long.c: Update.
1497         * gnulib/import/chdir-long.h: Update.
1498         * gnulib/import/cloexec.c: Update.
1499         * gnulib/import/cloexec.h: Update.
1500         * gnulib/import/close.c: Update.
1501         * gnulib/import/closedir.c: Update.
1502         * gnulib/import/config.charset: Update.
1503         * gnulib/import/dirent-private.h: Update.
1504         * gnulib/import/dirent.in.h: Update.
1505         * gnulib/import/dirfd.c: Update.
1506         * gnulib/import/dirname-lgpl.c: Update.
1507         * gnulib/import/dirname.h: Update.
1508         * gnulib/import/dosname.h: Update.
1509         * gnulib/import/dup-safer-flag.c: Update.
1510         * gnulib/import/dup-safer.c: Update.
1511         * gnulib/import/dup.c: Update.
1512         * gnulib/import/dup2.c: Update.
1513         * gnulib/import/errno.in.h: Update.
1514         * gnulib/import/error.c: Update.
1515         * gnulib/import/error.h: Update.
1516         * gnulib/import/exitfail.c: Update.
1517         * gnulib/import/exitfail.h: Update.
1518         * gnulib/import/extra/update-copyright: Update.
1519         * gnulib/import/fchdir.c: Update.
1520         * gnulib/import/fcntl.c: Update.
1521         * gnulib/import/fcntl.in.h: Update.
1522         * gnulib/import/fd-hook.c: Update.
1523         * gnulib/import/fd-hook.h: Update.
1524         * gnulib/import/fd-safer-flag.c: Update.
1525         * gnulib/import/fd-safer.c: Update.
1526         * gnulib/import/fdopendir.c: Update.
1527         * gnulib/import/filename.h: Update.
1528         * gnulib/import/filenamecat-lgpl.c: Update.
1529         * gnulib/import/filenamecat.h: Update.
1530         * gnulib/import/flexmember.h: Update.
1531         * gnulib/import/float+.h: Update.
1532         * gnulib/import/float.c: Update.
1533         * gnulib/import/float.in.h: Update.
1534         * gnulib/import/fnmatch.c: Update.
1535         * gnulib/import/fnmatch.in.h: Update.
1536         * gnulib/import/fnmatch_loop.c: Update.
1537         * gnulib/import/fpucw.h: Update.
1538         * gnulib/import/frexp.c: Update.
1539         * gnulib/import/frexpl.c: Update.
1540         * gnulib/import/fstat.c: Update.
1541         * gnulib/import/fstatat.c: Update.
1542         * gnulib/import/getcwd-lgpl.c: Update.
1543         * gnulib/import/getcwd.c: Update.
1544         * gnulib/import/getdtablesize.c: Update.
1545         * gnulib/import/getlogin_r.c: Update.
1546         * gnulib/import/getprogname.c: Update.
1547         * gnulib/import/getprogname.h: Update.
1548         * gnulib/import/gettext.h: Update.
1549         * gnulib/import/gettimeofday.c: Update.
1550         * gnulib/import/glob-libc.h: Update.
1551         * gnulib/import/glob.c: Update.
1552         * gnulib/import/glob.in.h: Update.
1553         * gnulib/import/glob_internal.h: Update.
1554         * gnulib/import/glob_pattern_p.c: Update.
1555         * gnulib/import/globfree.c: Update.
1556         * gnulib/import/hard-locale.c: Update.
1557         * gnulib/import/hard-locale.h: Update.
1558         * gnulib/import/intprops.h: Update.
1559         * gnulib/import/inttypes.in.h: Update.
1560         * gnulib/import/isnan.c: Update.
1561         * gnulib/import/isnand-nolibm.h: Update.
1562         * gnulib/import/isnand.c: Update.
1563         * gnulib/import/isnanl-nolibm.h: Update.
1564         * gnulib/import/isnanl.c: Update.
1565         * gnulib/import/itold.c: Update.
1566         * gnulib/import/libc-config.h: Update.
1567         * gnulib/import/limits.in.h: Update.
1568         * gnulib/import/localcharset.c: Update.
1569         * gnulib/import/localcharset.h: Update.
1570         * gnulib/import/localtime-buffer.c: Update.
1571         * gnulib/import/localtime-buffer.h: Update.
1572         * gnulib/import/lstat.c: Update.
1573         * gnulib/import/m4/00gnulib.m4: Update.
1574         * gnulib/import/m4/__inline.m4: Update.
1575         * gnulib/import/m4/absolute-header.m4: Update.
1576         * gnulib/import/m4/alloca.m4: Update.
1577         * gnulib/import/m4/builtin-expect.m4: Update.
1578         * gnulib/import/m4/canonicalize.m4: Update.
1579         * gnulib/import/m4/chdir-long.m4: Update.
1580         * gnulib/import/m4/close.m4: Update.
1581         * gnulib/import/m4/closedir.m4: Update.
1582         * gnulib/import/m4/configmake.m4: Update.
1583         * gnulib/import/m4/d-ino.m4: Update.
1584         * gnulib/import/m4/d-type.m4: Update.
1585         * gnulib/import/m4/dirent_h.m4: Update.
1586         * gnulib/import/m4/dirfd.m4: Update.
1587         * gnulib/import/m4/dirname.m4: Update.
1588         * gnulib/import/m4/double-slash-root.m4: Update.
1589         * gnulib/import/m4/dup.m4: Update.
1590         * gnulib/import/m4/dup2.m4: Update.
1591         * gnulib/import/m4/eealloc.m4: Update.
1592         * gnulib/import/m4/environ.m4: Update.
1593         * gnulib/import/m4/errno_h.m4: Update.
1594         * gnulib/import/m4/error.m4: Update.
1595         * gnulib/import/m4/exponentd.m4: Update.
1596         * gnulib/import/m4/exponentl.m4: Update.
1597         * gnulib/import/m4/extensions.m4: Update.
1598         * gnulib/import/m4/extern-inline.m4: Update.
1599         * gnulib/import/m4/fchdir.m4: Update.
1600         * gnulib/import/m4/fcntl-o.m4: Update.
1601         * gnulib/import/m4/fcntl.m4: Update.
1602         * gnulib/import/m4/fcntl_h.m4: Update.
1603         * gnulib/import/m4/fdopendir.m4: Update.
1604         * gnulib/import/m4/filenamecat.m4: Update.
1605         * gnulib/import/m4/flexmember.m4: Update.
1606         * gnulib/import/m4/float_h.m4: Update.
1607         * gnulib/import/m4/fnmatch.m4: Update.
1608         * gnulib/import/m4/fnmatch_h.m4: Update.
1609         * gnulib/import/m4/fpieee.m4: Update.
1610         * gnulib/import/m4/frexp.m4: Update.
1611         * gnulib/import/m4/frexpl.m4: Update.
1612         * gnulib/import/m4/fstat.m4: Update.
1613         * gnulib/import/m4/fstatat.m4: Update.
1614         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1615         * gnulib/import/m4/getcwd-path-max.m4: Update.
1616         * gnulib/import/m4/getcwd.m4: Update.
1617         * gnulib/import/m4/getdtablesize.m4: Update.
1618         * gnulib/import/m4/getlogin.m4: Update.
1619         * gnulib/import/m4/getlogin_r.m4: Update.
1620         * gnulib/import/m4/getpagesize.m4: Update.
1621         * gnulib/import/m4/getprogname.m4: Update.
1622         * gnulib/import/m4/gettimeofday.m4: Update.
1623         * gnulib/import/m4/glibc21.m4: Update.
1624         * gnulib/import/m4/glob.m4: Update.
1625         * gnulib/import/m4/glob_h.m4: Update.
1626         * gnulib/import/m4/gnulib-cache.m4: Update.
1627         * gnulib/import/m4/gnulib-common.m4: Update.
1628         * gnulib/import/m4/gnulib-comp.m4: Update.
1629         * gnulib/import/m4/gnulib-tool.m4: Update.
1630         * gnulib/import/m4/hard-locale.m4: Update.
1631         * gnulib/import/m4/include_next.m4: Update.
1632         * gnulib/import/m4/inttypes-pri.m4: Update.
1633         * gnulib/import/m4/inttypes.m4: Update.
1634         * gnulib/import/m4/isnand.m4: Update.
1635         * gnulib/import/m4/isnanl.m4: Update.
1636         * gnulib/import/m4/largefile.m4: Update.
1637         * gnulib/import/m4/limits-h.m4: Update.
1638         * gnulib/import/m4/localcharset.m4: Update.
1639         * gnulib/import/m4/locale-fr.m4: Update.
1640         * gnulib/import/m4/locale-ja.m4: Update.
1641         * gnulib/import/m4/locale-zh.m4: Update.
1642         * gnulib/import/m4/localtime-buffer.m4: Update.
1643         * gnulib/import/m4/longlong.m4: Update.
1644         * gnulib/import/m4/lstat.m4: Update.
1645         * gnulib/import/m4/malloc.m4: Update.
1646         * gnulib/import/m4/malloca.m4: Update.
1647         * gnulib/import/m4/math_h.m4: Update.
1648         * gnulib/import/m4/mbrtowc.m4: Update.
1649         * gnulib/import/m4/mbsinit.m4: Update.
1650         * gnulib/import/m4/mbsrtowcs.m4: Update.
1651         * gnulib/import/m4/mbstate_t.m4: Update.
1652         * gnulib/import/m4/memchr.m4: Update.
1653         * gnulib/import/m4/memmem.m4: Update.
1654         * gnulib/import/m4/mempcpy.m4: Update.
1655         * gnulib/import/m4/memrchr.m4: Update.
1656         * gnulib/import/m4/mkdir.m4: Update.
1657         * gnulib/import/m4/mkstemp.m4: Update.
1658         * gnulib/import/m4/mmap-anon.m4: Update.
1659         * gnulib/import/m4/mode_t.m4: Update.
1660         * gnulib/import/m4/msvc-inval.m4: Update.
1661         * gnulib/import/m4/msvc-nothrow.m4: Update.
1662         * gnulib/import/m4/multiarch.m4: Update.
1663         * gnulib/import/m4/nocrash.m4: Update.
1664         * gnulib/import/m4/off_t.m4: Update.
1665         * gnulib/import/m4/onceonly.m4: Update.
1666         * gnulib/import/m4/open-cloexec.m4: Update.
1667         * gnulib/import/m4/open.m4: Update.
1668         * gnulib/import/m4/openat.m4: Update.
1669         * gnulib/import/m4/opendir.m4: Update.
1670         * gnulib/import/m4/pathmax.m4: Update.
1671         * gnulib/import/m4/rawmemchr.m4: Update.
1672         * gnulib/import/m4/readdir.m4: Update.
1673         * gnulib/import/m4/readlink.m4: Update.
1674         * gnulib/import/m4/realloc.m4: Update.
1675         * gnulib/import/m4/rename.m4: Update.
1676         * gnulib/import/m4/rewinddir.m4: Update.
1677         * gnulib/import/m4/rmdir.m4: Update.
1678         * gnulib/import/m4/save-cwd.m4: Update.
1679         * gnulib/import/m4/secure_getenv.m4: Update.
1680         * gnulib/import/m4/setenv.m4: Update.
1681         * gnulib/import/m4/signal_h.m4: Update.
1682         * gnulib/import/m4/ssize_t.m4: Update.
1683         * gnulib/import/m4/stat-time.m4: Update.
1684         * gnulib/import/m4/stat.m4: Update.
1685         * gnulib/import/m4/std-gnu11.m4: Update.
1686         * gnulib/import/m4/stdbool.m4: Update.
1687         * gnulib/import/m4/stddef_h.m4: Update.
1688         * gnulib/import/m4/stdint.m4: Update.
1689         * gnulib/import/m4/stdio_h.m4: Update.
1690         * gnulib/import/m4/stdlib_h.m4: Update.
1691         * gnulib/import/m4/strchrnul.m4: Update.
1692         * gnulib/import/m4/strdup.m4: Update.
1693         * gnulib/import/m4/strerror.m4: Update.
1694         * gnulib/import/m4/string_h.m4: Update.
1695         * gnulib/import/m4/strstr.m4: Update.
1696         * gnulib/import/m4/strtok_r.m4: Update.
1697         * gnulib/import/m4/sys_socket_h.m4: Update.
1698         * gnulib/import/m4/sys_stat_h.m4: Update.
1699         * gnulib/import/m4/sys_time_h.m4: Update.
1700         * gnulib/import/m4/sys_types_h.m4: Update.
1701         * gnulib/import/m4/tempname.m4: Update.
1702         * gnulib/import/m4/time_h.m4: Update.
1703         * gnulib/import/m4/unistd-safer.m4: Update.
1704         * gnulib/import/m4/unistd_h.m4: Update.
1705         * gnulib/import/m4/warn-on-use.m4: Update.
1706         * gnulib/import/m4/wchar_h.m4: Update.
1707         * gnulib/import/m4/wchar_t.m4: Update.
1708         * gnulib/import/m4/wctype_h.m4: Update.
1709         * gnulib/import/m4/wint_t.m4: Update.
1710         * gnulib/import/malloc.c: Update.
1711         * gnulib/import/malloc/scratch_buffer.h: Update.
1712         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1713         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1714         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1715         * gnulib/import/malloca.c: Update.
1716         * gnulib/import/malloca.h: Update.
1717         * gnulib/import/malloca.valgrind: Update.
1718         * gnulib/import/math.in.h: Update.
1719         * gnulib/import/mbrtowc.c: Update.
1720         * gnulib/import/mbsinit.c: Update.
1721         * gnulib/import/mbsrtowcs-impl.h: Update.
1722         * gnulib/import/mbsrtowcs-state.c: Update.
1723         * gnulib/import/mbsrtowcs.c: Update.
1724         * gnulib/import/memchr.c: Update.
1725         * gnulib/import/memmem.c: Update.
1726         * gnulib/import/mempcpy.c: Update.
1727         * gnulib/import/memrchr.c: Update.
1728         * gnulib/import/mkdir.c: Update.
1729         * gnulib/import/mkstemp.c: Update.
1730         * gnulib/import/msvc-inval.c: Update.
1731         * gnulib/import/msvc-inval.h: Update.
1732         * gnulib/import/msvc-nothrow.c: Update.
1733         * gnulib/import/msvc-nothrow.h: Update.
1734         * gnulib/import/open.c: Update.
1735         * gnulib/import/openat-die.c: Update.
1736         * gnulib/import/openat-priv.h: Update.
1737         * gnulib/import/openat-proc.c: Update.
1738         * gnulib/import/openat.c: Update.
1739         * gnulib/import/openat.h: Update.
1740         * gnulib/import/opendir.c: Update.
1741         * gnulib/import/pathmax.h: Update.
1742         * gnulib/import/pipe-safer.c: Update.
1743         * gnulib/import/rawmemchr.c: Update.
1744         * gnulib/import/readdir.c: Update.
1745         * gnulib/import/readlink.c: Update.
1746         * gnulib/import/realloc.c: Update.
1747         * gnulib/import/ref-add.sin: Update.
1748         * gnulib/import/ref-del.sin: Update.
1749         * gnulib/import/rename.c: Update.
1750         * gnulib/import/rewinddir.c: Update.
1751         * gnulib/import/rmdir.c: Update.
1752         * gnulib/import/same-inode.h: Update.
1753         * gnulib/import/save-cwd.c: Update.
1754         * gnulib/import/save-cwd.h: Update.
1755         * gnulib/import/scratch_buffer.h: Update.
1756         * gnulib/import/secure_getenv.c: Update.
1757         * gnulib/import/setenv.c: Update.
1758         * gnulib/import/signal.in.h: Update.
1759         * gnulib/import/stat-time.c: Update.
1760         * gnulib/import/stat-time.h: Update.
1761         * gnulib/import/stat-w32.c: Update.
1762         * gnulib/import/stat-w32.h: Update.
1763         * gnulib/import/stat.c: Update.
1764         * gnulib/import/stdbool.in.h: Update.
1765         * gnulib/import/stddef.in.h: Update.
1766         * gnulib/import/stdint.in.h: Update.
1767         * gnulib/import/stdio.in.h: Update.
1768         * gnulib/import/stdlib.in.h: Update.
1769         * gnulib/import/str-two-way.h: Update.
1770         * gnulib/import/strchrnul.c: Update.
1771         * gnulib/import/strdup.c: Update.
1772         * gnulib/import/streq.h: Update.
1773         * gnulib/import/strerror-override.c: Update.
1774         * gnulib/import/strerror-override.h: Update.
1775         * gnulib/import/strerror.c: Update.
1776         * gnulib/import/string.in.h: Update.
1777         * gnulib/import/stripslash.c: Update.
1778         * gnulib/import/strnlen1.c: Update.
1779         * gnulib/import/strnlen1.h: Update.
1780         * gnulib/import/strstr.c: Update.
1781         * gnulib/import/strtok_r.c: Update.
1782         * gnulib/import/sys_stat.in.h: Update.
1783         * gnulib/import/sys_time.in.h: Update.
1784         * gnulib/import/sys_types.in.h: Update.
1785         * gnulib/import/tempname.c: Update.
1786         * gnulib/import/tempname.h: Update.
1787         * gnulib/import/time.in.h: Update.
1788         * gnulib/import/unistd--.h: Update.
1789         * gnulib/import/unistd-safer.h: Update.
1790         * gnulib/import/unistd.in.h: Update.
1791         * gnulib/import/unsetenv.c: Update.
1792         * gnulib/import/verify.h: Update.
1793         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1794         * gnulib/import/wchar.in.h: Update.
1795         * gnulib/import/wctype.in.h: Update.
1796         * gnulib/import/xalloc-oversized.h: Update.
1797         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1798         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1799
1800 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1801
1802         * record-btrace.c (get_thread_current_frame): Remove
1803         old_inferior_ptid.
1804
1805 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1806
1807         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1808         with check_tag to 1 if and only if the type is tagged and the
1809         component being searched cannot been found in the current
1810         view. Otherwise, always call ada_to_fixed_type with
1811         check_tag to 0.
1812
1813 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1814
1815         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1816         declaration.
1817         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1818         * ada-varobj.c (ada_varobj_get_number_of_children,
1819         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1820
1821 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1822
1823         * ada-valprint.c (ada_value_print): Use type instead of
1824         enclosing type.
1825
1826 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1827
1828         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1829         an array of access to unconstrained array.
1830
1831 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1832
1833         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1834         (ada_check_typedef): Use it.
1835
1836 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1837
1838         * ada-varobj.c (ada_varobj_describe_struct_child)
1839         (ada_varobj_describe_child): Handle union case like struct one.
1840
1841 2018-09-10  Tom Tromey  <tom@tromey.com>
1842
1843         PR python/18380:
1844         * python/python.c (_initialize_python): Make example in "python"
1845         help work in Python 3.
1846
1847 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1848
1849         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1850         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1851         $(EXEEXT) to the script, as it is not a program.
1852
1853 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1854
1855         * python/py-prettyprint.c (pretty_print_one_value): Return
1856         gdbpy_ref<>.
1857         (print_string_repr): Adjust.
1858         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1859         * python/python-internal.h (apply_varobj_pretty_printer): Return
1860         gdbpy_ref<>.
1861         * varobj.c (varobj_value_get_print_value): Adjust.
1862
1863 2018-09-08  Tom Tromey  <tom@tromey.com>
1864
1865         PR python/16047:
1866         * python/py-prettyprint.c (pretty_print_one_value): Check for
1867         to_string method.
1868
1869 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1870
1871         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1872         replace_operator_with_call.
1873
1874 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1875
1876         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1877
1878 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1879
1880         * ada-typeprint.c (print_range): Print the bounds using TYPE
1881         rather than its TYPE_TARGET_TYPE.
1882
1883 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1884
1885         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1886         call to ada_to_fixed_value_create.
1887
1888 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1889
1890         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1891
1892 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1893
1894         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1895         by calls to error.
1896
1897 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1898
1899         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1900         Move update of loop variable "fi".
1901
1902 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1903
1904         * ada-lang.c (value_assign_to_component): In the case of
1905         big-endian targets, extract the bits of the given VAL
1906         using an src_offset of zero if container is not a scalar.
1907
1908 2018-09-06  Simon Ser  <contact@emersion.fr>
1909
1910         PR gdb/23105
1911         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1912         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1913         * fbsd-tdep.c (fbsd_make_note_desc): New.
1914         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1915         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1916         * target.h (enum target_object) Add FreeBSD-specific
1917         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1918
1919 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1920
1921         * compile/compile-c.h (generate_c_for_variable_locations):
1922         Change reference to pointer.
1923         * compile/compile-c-support.c (compile_program) <compute>:
1924         Likewise.
1925         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1926         (generate_c_for_for_one_variable): Likewise
1927         (generate_c_for_variable_locations): Likewise
1928         * compile/compile-c-types.c (compile_c_instance::convert_type):
1929         Likewise
1930         * compile/compile-cplus-symbols.c (convert_one_symbol):
1931         std::move the scope passed to enter_scope.
1932         * compile/compile-cplus-types.c
1933         (compile_cplus_instance::enter_scope): Make parameter
1934         rvalue-reference.
1935         (compile_cplus_instance::new_scope): Change reference to
1936         pointer.
1937         (compile_cplus_instance::convert_type): Likewise
1938         (compile_cplus_convert_typedef): std::move the scope passed to
1939         enter_scope.
1940         (compile_cplus_convert_struct_or_union): Likewise.
1941         (compile_cplus_convert_enum): Likewise.
1942         (compile_cplus_convert_namespace): Likewise.
1943         * compile/compile-cplus.h (compile_cplus_instance)
1944         <enter_scope>: Make parameter rvalue-reference.
1945         * compile/compile-internal.h (compile_instance)
1946         <get_cached_type>: Likewise
1947         * compile/compile-loc2c.c (push): Likewise
1948         (pushf): Likewise
1949         (unary): Likewise
1950         (binary): Likewise
1951         (print_label): Likewise
1952         (pushf_register_address): Likewise
1953         (pushf_register): Likewise
1954         (do_compile_dwarf_expr_to_c): Likewise
1955         (compile_dwarf_expr_to_c): Likewise
1956         (compile_dwarf_bounds_to_c): Likewise
1957         * compile/compile.c (compile_instance::get_cached_type):
1958         Likewise
1959         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1960         (compile_dwarf_bounds_to_c): Likewise
1961         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1962         (dwarf2_compile_property_to_c): Likewise
1963         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1964         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1965         Likewise
1966
1967 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1968
1969         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1970         * tui/tui-data.c (init_content_element): Don't initialize it.
1971
1972 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1973
1974         * tui/tui-data.h (struct tui_win_info)
1975         <detail::opaque>: Remove.
1976         * tui/tui-data.c (init_win_info): Remove assignment.
1977
1978 2018-09-05  Tom Tromey  <tom@tromey.com>
1979
1980         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1981         -Wformat-nonliteral.
1982         * target-float.c (host_float_ops<T>::to_string)
1983         (host_float_ops<T>::from_string): Use
1984         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1985         * configure: Rebuild.
1986
1987 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1988
1989         * printcmd.c (printf_c_string): Use
1990         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1991         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1992
1993 2018-09-05  Tom Tromey  <tom@tromey.com>
1994
1995         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1996
1997 2018-09-05  Tom de Vries  <tdevries@suse.de>
1998
1999         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2000         with resolve_abstract_p == true.
2001         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2002         defaulting to false. Propagate resolve_abstract_p to
2003         dwarf2_fetch_die_loc_sect_off.
2004         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2005         parameter, defaulting to false.
2006         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2007         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2008         parameter.
2009         * dwarf2read.h (struct die_info): Forward-declare.
2010         (die_info_ptr): New typedef.
2011         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2012
2013 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2014
2015         GDB 8.2 released.
2016
2017 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2018             Pedro Alves  <palves@redhat.com>
2019
2020         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2021         "aclocal-m4-deps.mk".  Include file here.
2022         $(srcdir)/aclocal.m4: Add "configure.ac".
2023         * gnulib/aclocal-m4-deps.mk: New file.
2024         * gnulib/update-gnulib.sh: Automatically update
2025         "aclocal-m4-deps.mk".
2026
2027 2018-09-04  Tom Tromey  <tom@tromey.com>
2028
2029         * configure: Rebuild.
2030         * configure.ac: Remove multi-ice code.
2031
2032 2018-09-04  Tom Tromey  <tom@tromey.com>
2033
2034         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2035         (ada-exp.o): Update.
2036
2037 2018-09-04  Tom Tromey  <tom@tromey.com>
2038
2039         * Makefile.in (printcmd.o, target-float.o): Remove.
2040         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2041
2042 2018-09-04  Tom Tromey  <tom@tromey.com>
2043
2044         * gnulib/Makefile.in: Remove obsolete comment.
2045         * Makefile.in: Remove obsolete comment.
2046
2047 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2048
2049         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2050         line with '+'.
2051
2052 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2053
2054         * riscv-tdep.c: Add 'prologue-value.h' include.
2055         (struct riscv_unwind_cache): New struct.
2056         (riscv_debug_unwinder): New global.
2057         (riscv_scan_prologue): Update arguments, capture register details
2058         from prologue scan.
2059         (riscv_skip_prologue): Reformat arguments line, move end of
2060         prologue calculation into riscv_scan_prologue.
2061         (riscv_frame_cache): Update return type, create
2062         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2063         details.
2064         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2065         (riscv_frame_prev_register): Use the trad_frame within the
2066         riscv_unwind_cache.
2067         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2068         flag.
2069
2070 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2071
2072         * trad-frame.h (trad_frame_set_realreg): Declare.
2073         (trad_frame_set_addr): Declare.
2074         * trad-frame.c (trad_frame_set_realreg): Define new function.
2075         (trad_frame_set_addr): Define new function.
2076         (trad_frame_set_reg_realreg): Use new function.
2077         (trad_frame_set_reg_addr): Use new function.
2078
2079 2018-09-01  Keith Seitz  <keiths@redhat.com>
2080
2081         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2082         pulongest instead of "%lld".
2083         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2084         ATTRIBUTE_UNUSED.
2085
2086 2018-08-31  Tom Tromey  <tom@tromey.com>
2087
2088         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2089         variant part type.
2090
2091 2018-08-31  Pedro Alves  <palves@redhat.com>
2092
2093         * gdbarch.h: Regenerate.
2094
2095 2018-08-31  Pedro Alves  <palves@redhat.com>
2096
2097         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2098         * target.h (Hardware watchpoint interfaces): Describe
2099         continuable/steppable/non-steppable watchpoints.
2100         * gdbarch.h, gdbarch.c: Regenerate.
2101
2102 2018-08-31  Pedro Alves  <palves@redhat.com>
2103
2104         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2105         Delete.
2106         * s390-linux-nat.c
2107         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2108         * target.h (target_ops::have_continuable_watchpoint): Delete.
2109         (target_have_continuable_watchpoint): Delete.
2110         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2111         * target-delegates.c: Regenerate.
2112
2113 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2114
2115         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2116         the files present in "gnulib/import/m4/".
2117
2118 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2119
2120         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2121         c.sw, c.swsp, and c.sdsp.
2122
2123 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2124
2125         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2126         (riscv_read_misa_reg): Don't cache value read into inferior data.
2127         (riscv_new_inferior_data): Delete.
2128         (riscv_inferior_data_cleanup): Delete.
2129         (riscv_inferior_data): Delete.
2130         (riscv_invalidate_inferior_data): Delete.
2131         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2132
2133 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2134
2135         * compile/compile-cplus-types.c
2136         (compile_cplus_instance::leave_scope): Take the address of scope
2137         object.
2138         (compile_cplus_instance::convert_qualified_base): Compare quals
2139         to 0.
2140
2141 2018-08-30  Keith Seitz  <keiths@redhat.com>
2142
2143         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2144         Use "%s" and host_address_to_string instead of "%p" in printf.
2145
2146 2018-08-29  Keith Seitz  <keiths@redhat.com>
2147
2148         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2149         and compile-cplus-types.c.
2150         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2151         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2152         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2153         Declare.
2154         * compile/compile-c-support.c: Include compile-cplus.h.
2155         (load_libcompile): Templatize.
2156         (get_compile_context): "New" function.
2157         (c_get_compile_context): Use get_compile_context.
2158         (cplus_get_compile_context): New function.
2159         (cplus_push_user_expression, cplus_pop_user_expression)
2160         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2161         (cplus_compute_program): Define new structs/functions.
2162         * compile/compile-cplus-symmbols.c: New file.
2163         * compile/compile-cplus-types.c: New file.
2164         * compile/compile-cplus.h: New file.
2165         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2166         Declare.
2167         * compile/compile-object-load.c (get_out_value_type): Use
2168         strncmp_iw when comparing symbol names.
2169         (compile_object_load): Add mst_bss and mst_data.
2170         * compile/compile.c (_initialize_compile): Remove
2171         -Wno-implicit-function-declaration from `compile_args'.
2172         * compile/gcc-cp-plugin.h: New file.
2173         * NEWS: Mention C++ compile support and new debug options.
2174
2175 2018-08-29  Keith Seitz  <keiths@redhat.com>
2176
2177         * linespec.c (collect_info::add_symbol): Make virtual.
2178         (struct symbol_searcher_collect_info): New struct.
2179         (symbol_searcher::find_all_symbols): New method.
2180         * symtab.h (class symbol_searcher): New class.
2181
2182 2018-08-29  Keith Seitz  <keiths@redhat.com>
2183
2184         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2185         Change to vector of block_symbol.  Update all users.
2186         (struct collect_info) <symbols>: Likewise.
2187         (collect_info::add_symbol): Take block_symbol as argument.
2188         Update all callers.
2189         (decode_compound_collector) <m_symbols>: Change type to vector
2190         of block_symbol.  Update all users.
2191         (decode_compound_collector::operator ()): Change parameter type
2192         to block_symbol.
2193         (find_method, find_function_symbols, find_linespec_symbols)
2194         (find_label_symbols_in_block, find_label_symbols): Change symbol
2195         vectors to block_symbol vectors.
2196         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2197         block_symbol.
2198
2199 2018-08-29  Keith Seitz  <keiths@redhat.com>
2200
2201         * linespec.c (symbolp): Remove typedef and VEC definitions.
2202         (bound_minimal_symbol_d): Likewise.
2203
2204 2018-08-29  Keith Seitz  <keiths@redhat.com>
2205
2206         * linespec.c (decode_compound_collector::decode_compound_collector):
2207         Remove initialization for `m_symtabs'.
2208         (decode_compound_collector::release_symbols): Change return type
2209         to std::vector.  Update all callers.
2210         (class decode_compound_collector) <m_symbols>: Change type to
2211         std::vector.
2212         (lookup_prefix_sym): Change return type to std::vector.  Update all
2213         callers.
2214         (compare_symbols): Remove.
2215         (std_compare_symbols): Rename to `compare_symbols'.
2216         (find_method): Change `sym_classes' parameter to std::vector.
2217         Update all callers.  Use std::sort to sort sym_classes.
2218         (find_linespec_symbols): Remove cleanup.
2219
2220 2018-08-29  Keith Seitz  <keiths@redhat.com>
2221
2222         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2223         std::vector.  Update all users.
2224         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2225         (struct collect_info) <minimal_symbols>: Likewise.
2226         (compare_msymbols): Return bool.  Change parameters to const
2227         bound_minimal_symbol references.
2228         (find_method, find_function_symbols, find_linespec_symbols): Change
2229         `minsyms' parameter to std::vector.  Update all callers.
2230
2231 2018-08-29  Keith Seitz  <keiths@redhat.com>
2232
2233         * linespec.c (struct linespec) <label_symbols>: Change type to
2234         std::vector.  Update all users.
2235         (find_label_symbols_in_block): Change `result' parameter to
2236         std::vector.  Update all callers.
2237         (find_label_symbols): Return std::vector.  Update all callers.
2238
2239 2018-08-29  Keith Seitz  <keiths@redhat.com>
2240
2241         * linespec.c (struct linespec) <function_symbols>: Change type to
2242         std::vector.  Update all users.
2243         (struct collect_info) <function_symbols>: Likewise.
2244         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2245         (std_compare_symbols): New function.
2246         (find_method, find_function_symbols, find_linespec_symbols)
2247         (find_label_symbols_in_block): Change `symbols' parameter to
2248         std::vector.  Update all callers.
2249         (find_label_symbols): Likewise for `function_symbols' and
2250         `label_funcs_ret'.
2251
2252 2018-08-29  Keith Seitz  <keiths@redhat.com>
2253
2254         * linespec.c (symtab_vector_up): Define.
2255         (struct linespec) <file_symtabs>: Change type to std::vector *.
2256         Update all uses.
2257         (struct collect_info) <file_symtabs>: Likewise.
2258         (collect_symtabs_from_filename): Return symtab_vector_up.
2259         Update all callers.
2260         (decode_objc): Remove cleanup.
2261         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2262         (symtab_collector::release_symtabs): Return symtab_vector_up.
2263         Update all callers.
2264         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2265         Update all users.
2266         (collect_symtabs_from_filename, symtabs_from_filename): Return
2267         symtab_vector_up.  Update all callers.
2268
2269 2018-08-29  Tom Tromey  <tom@tromey.com>
2270
2271         * csky-tdep.c (csky_analyze_prologue): Use
2272         core_addr_to_string_nz.
2273
2274 2018-08-29  Tom Tromey  <tom@tromey.com>
2275
2276         * windows-nat.c (struct xlate_exception) <them>: Change type to
2277         DWORD.
2278         (xlate): Fix formatting.  Remove last entry.
2279         (struct xlate_exception, xlate): Comment out.
2280         (windows_nat_target::resume): Use ranged for.
2281
2282 2018-08-29  Jim Wilson  <jimw@sifive.com>
2283
2284         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2285         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2286         of NT_PRFPREG.
2287         (riscv_linux_nat_target::store_registers): Likewise.
2288
2289 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2290
2291         PR gdb/23555
2292         PR gdb/23558
2293         * gnulib/aclocal.m4: Regenerate.
2294         * gnulib/config.in: Regenerate.
2295         * gnulib/configure: Regenerate.
2296         * gnulib/import/Makefile.am: Update.
2297         * gnulib/import/Makefile.in: Update.
2298         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2299         * gnulib/import/_Noreturn.h: ... this.
2300         * gnulib/import/alloca.in.h: Update.
2301         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2302         * gnulib/import/arg-nonnull.h: ... this.
2303         * gnulib/import/assure.h: Update.
2304         * gnulib/import/at-func.c: Update.
2305         * gnulib/import/basename-lgpl.c: Update.
2306         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2307         * gnulib/import/c++defs.h: ... this.
2308         * gnulib/import/canonicalize-lgpl.c: Update.
2309         * gnulib/import/cdefs.h: Update.
2310         * gnulib/import/chdir-long.c: Update.
2311         * gnulib/import/chdir-long.h: Update.
2312         * gnulib/import/cloexec.c: Update.
2313         * gnulib/import/cloexec.h: Update.
2314         * gnulib/import/close.c: Update.
2315         * gnulib/import/closedir.c: Update.
2316         * gnulib/import/config.charset: Update.
2317         * gnulib/import/dirent-private.h: Update.
2318         * gnulib/import/dirent.in.h: Update.
2319         * gnulib/import/dirfd.c: Update.
2320         * gnulib/import/dirname-lgpl.c: Update.
2321         * gnulib/import/dirname.h: Update.
2322         * gnulib/import/dosname.h: Update.
2323         * gnulib/import/dup-safer-flag.c: Update.
2324         * gnulib/import/dup-safer.c: Update.
2325         * gnulib/import/dup.c: Update.
2326         * gnulib/import/dup2.c: Update.
2327         * gnulib/import/errno.in.h: Update.
2328         * gnulib/import/error.c: Update.
2329         * gnulib/import/error.h: Update.
2330         * gnulib/import/exitfail.c: Update.
2331         * gnulib/import/exitfail.h: Update.
2332         * gnulib/import/extra/update-copyright: Update.
2333         * gnulib/import/fchdir.c: Update.
2334         * gnulib/import/fcntl.c: Update.
2335         * gnulib/import/fcntl.in.h: Update.
2336         * gnulib/import/fd-hook.c: Update.
2337         * gnulib/import/fd-hook.h: Update.
2338         * gnulib/import/fd-safer-flag.c: Update.
2339         * gnulib/import/fd-safer.c: Update.
2340         * gnulib/import/fdopendir.c: Update.
2341         * gnulib/import/filename.h: Update.
2342         * gnulib/import/filenamecat-lgpl.c: Update.
2343         * gnulib/import/filenamecat.h: Update.
2344         * gnulib/import/flexmember.h: Update.
2345         * gnulib/import/float+.h: Update.
2346         * gnulib/import/float.c: Update.
2347         * gnulib/import/float.in.h: Update.
2348         * gnulib/import/fnmatch.c: Update.
2349         * gnulib/import/fnmatch.in.h: Update.
2350         * gnulib/import/fnmatch_loop.c: Update.
2351         * gnulib/import/fpucw.h: Update.
2352         * gnulib/import/frexp.c: Update.
2353         * gnulib/import/frexpl.c: Update.
2354         * gnulib/import/fstat.c: Update.
2355         * gnulib/import/fstatat.c: Update.
2356         * gnulib/import/getcwd-lgpl.c: Update.
2357         * gnulib/import/getcwd.c: Update.
2358         * gnulib/import/getdtablesize.c: Update.
2359         * gnulib/import/getlogin_r.c: Update.
2360         * gnulib/import/getprogname.c: Update.
2361         * gnulib/import/getprogname.h: Update.
2362         * gnulib/import/gettext.h: Update.
2363         * gnulib/import/gettimeofday.c: Update.
2364         * gnulib/import/glob-libc.h: Update.
2365         * gnulib/import/glob.c: Update.
2366         * gnulib/import/glob.in.h: Update.
2367         * gnulib/import/glob_internal.h: Update.
2368         * gnulib/import/glob_pattern_p.c: Update.
2369         * gnulib/import/globfree.c: Update.
2370         * gnulib/import/hard-locale.c: Update.
2371         * gnulib/import/hard-locale.h: Update.
2372         * gnulib/import/intprops.h: Update.
2373         * gnulib/import/inttypes.in.h: Update.
2374         * gnulib/import/isnan.c: Update.
2375         * gnulib/import/isnand-nolibm.h: Update.
2376         * gnulib/import/isnand.c: Update.
2377         * gnulib/import/isnanl-nolibm.h: Update.
2378         * gnulib/import/isnanl.c: Update.
2379         * gnulib/import/itold.c: Update.
2380         * gnulib/import/libc-config.h: Update.
2381         * gnulib/import/limits.in.h: Update.
2382         * gnulib/import/localcharset.c: Update.
2383         * gnulib/import/localcharset.h: Update.
2384         * gnulib/import/localtime-buffer.c: Update.
2385         * gnulib/import/localtime-buffer.h: Update.
2386         * gnulib/import/lstat.c: Update.
2387         * gnulib/import/m4/00gnulib.m4: Update.
2388         * gnulib/import/m4/__inline.m4: Update.
2389         * gnulib/import/m4/absolute-header.m4: Update.
2390         * gnulib/import/m4/alloca.m4: Update.
2391         * gnulib/import/m4/builtin-expect.m4: Update.
2392         * gnulib/import/m4/canonicalize.m4: Update.
2393         * gnulib/import/m4/chdir-long.m4: Update.
2394         * gnulib/import/m4/close.m4: Update.
2395         * gnulib/import/m4/closedir.m4: Update.
2396         * gnulib/import/m4/configmake.m4: Update.
2397         * gnulib/import/m4/d-ino.m4: Update.
2398         * gnulib/import/m4/d-type.m4: Update.
2399         * gnulib/import/m4/dirent_h.m4: Update.
2400         * gnulib/import/m4/dirfd.m4: Update.
2401         * gnulib/import/m4/dirname.m4: Update.
2402         * gnulib/import/m4/double-slash-root.m4: Update.
2403         * gnulib/import/m4/dup.m4: Update.
2404         * gnulib/import/m4/dup2.m4: Update.
2405         * gnulib/import/m4/eealloc.m4: Update.
2406         * gnulib/import/m4/environ.m4: Update.
2407         * gnulib/import/m4/errno_h.m4: Update.
2408         * gnulib/import/m4/error.m4: Update.
2409         * gnulib/import/m4/exponentd.m4: Update.
2410         * gnulib/import/m4/exponentl.m4: Update.
2411         * gnulib/import/m4/extensions.m4: Update.
2412         * gnulib/import/m4/extern-inline.m4: Update.
2413         * gnulib/import/m4/fchdir.m4: Update.
2414         * gnulib/import/m4/fcntl-o.m4: Update.
2415         * gnulib/import/m4/fcntl.m4: Update.
2416         * gnulib/import/m4/fcntl_h.m4: Update.
2417         * gnulib/import/m4/fdopendir.m4: Update.
2418         * gnulib/import/m4/filenamecat.m4: Update.
2419         * gnulib/import/m4/flexmember.m4: Update.
2420         * gnulib/import/m4/float_h.m4: Update.
2421         * gnulib/import/m4/fnmatch.m4: Update.
2422         * gnulib/import/m4/fnmatch_h.m4: Update.
2423         * gnulib/import/m4/fpieee.m4: Update.
2424         * gnulib/import/m4/frexp.m4: Update.
2425         * gnulib/import/m4/frexpl.m4: Update.
2426         * gnulib/import/m4/fstat.m4: Update.
2427         * gnulib/import/m4/fstatat.m4: Update.
2428         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2429         * gnulib/import/m4/getcwd-path-max.m4: Update.
2430         * gnulib/import/m4/getcwd.m4: Update.
2431         * gnulib/import/m4/getdtablesize.m4: Update.
2432         * gnulib/import/m4/getlogin.m4: Update.
2433         * gnulib/import/m4/getlogin_r.m4: Update.
2434         * gnulib/import/m4/getpagesize.m4: Update.
2435         * gnulib/import/m4/getprogname.m4: Update.
2436         * gnulib/import/m4/gettimeofday.m4: Update.
2437         * gnulib/import/m4/glibc21.m4: Update.
2438         * gnulib/import/m4/glob.m4: Update.
2439         * gnulib/import/m4/glob_h.m4: Update.
2440         * gnulib/import/m4/gnulib-cache.m4: Update.
2441         * gnulib/import/m4/gnulib-common.m4: Update.
2442         * gnulib/import/m4/gnulib-comp.m4: Update.
2443         * gnulib/import/m4/gnulib-tool.m4: Update.
2444         * gnulib/import/m4/hard-locale.m4: Update.
2445         * gnulib/import/m4/include_next.m4: Update.
2446         * gnulib/import/m4/inttypes-pri.m4: Update.
2447         * gnulib/import/m4/inttypes.m4: Update.
2448         * gnulib/import/m4/isnand.m4: Update.
2449         * gnulib/import/m4/isnanl.m4: Update.
2450         * gnulib/import/m4/largefile.m4: Update.
2451         * gnulib/import/m4/limits-h.m4: Update.
2452         * gnulib/import/m4/localcharset.m4: Update.
2453         * gnulib/import/m4/locale-fr.m4: Update.
2454         * gnulib/import/m4/locale-ja.m4: Update.
2455         * gnulib/import/m4/locale-zh.m4: Update.
2456         * gnulib/import/m4/localtime-buffer.m4: Update.
2457         * gnulib/import/m4/longlong.m4: Update.
2458         * gnulib/import/m4/lstat.m4: Update.
2459         * gnulib/import/m4/malloc.m4: Update.
2460         * gnulib/import/m4/malloca.m4: Update.
2461         * gnulib/import/m4/math_h.m4: Update.
2462         * gnulib/import/m4/mbrtowc.m4: Update.
2463         * gnulib/import/m4/mbsinit.m4: Update.
2464         * gnulib/import/m4/mbsrtowcs.m4: Update.
2465         * gnulib/import/m4/mbstate_t.m4: Update.
2466         * gnulib/import/m4/memchr.m4: Update.
2467         * gnulib/import/m4/memmem.m4: Update.
2468         * gnulib/import/m4/mempcpy.m4: Update.
2469         * gnulib/import/m4/memrchr.m4: Update.
2470         * gnulib/import/m4/mkdir.m4: Update.
2471         * gnulib/import/m4/mkstemp.m4: Update.
2472         * gnulib/import/m4/mmap-anon.m4: Update.
2473         * gnulib/import/m4/mode_t.m4: Update.
2474         * gnulib/import/m4/msvc-inval.m4: Update.
2475         * gnulib/import/m4/msvc-nothrow.m4: Update.
2476         * gnulib/import/m4/multiarch.m4: Update.
2477         * gnulib/import/m4/nocrash.m4: Update.
2478         * gnulib/import/m4/off_t.m4: Update.
2479         * gnulib/import/m4/onceonly.m4: Update.
2480         * gnulib/import/m4/open-cloexec.m4: Update.
2481         * gnulib/import/m4/open.m4: Update.
2482         * gnulib/import/m4/openat.m4: Update.
2483         * gnulib/import/m4/opendir.m4: Update.
2484         * gnulib/import/m4/pathmax.m4: Update.
2485         * gnulib/import/m4/rawmemchr.m4: Update.
2486         * gnulib/import/m4/readdir.m4: Update.
2487         * gnulib/import/m4/readlink.m4: Update.
2488         * gnulib/import/m4/realloc.m4: Update.
2489         * gnulib/import/m4/rename.m4: Update.
2490         * gnulib/import/m4/rewinddir.m4: Update.
2491         * gnulib/import/m4/rmdir.m4: Update.
2492         * gnulib/import/m4/save-cwd.m4: Update.
2493         * gnulib/import/m4/secure_getenv.m4: Update.
2494         * gnulib/import/m4/setenv.m4: Update.
2495         * gnulib/import/m4/signal_h.m4: Update.
2496         * gnulib/import/m4/ssize_t.m4: Update.
2497         * gnulib/import/m4/stat-time.m4: Update.
2498         * gnulib/import/m4/stat.m4: Update.
2499         * gnulib/import/m4/std-gnu11.m4: Update.
2500         * gnulib/import/m4/stdbool.m4: Update.
2501         * gnulib/import/m4/stddef_h.m4: Update.
2502         * gnulib/import/m4/stdint.m4: Update.
2503         * gnulib/import/m4/stdio_h.m4: Update.
2504         * gnulib/import/m4/stdlib_h.m4: Update.
2505         * gnulib/import/m4/strchrnul.m4: Update.
2506         * gnulib/import/m4/strdup.m4: Update.
2507         * gnulib/import/m4/strerror.m4: Update.
2508         * gnulib/import/m4/string_h.m4: Update.
2509         * gnulib/import/m4/strstr.m4: Update.
2510         * gnulib/import/m4/strtok_r.m4: Update.
2511         * gnulib/import/m4/sys_socket_h.m4: Update.
2512         * gnulib/import/m4/sys_stat_h.m4: Update.
2513         * gnulib/import/m4/sys_time_h.m4: Update.
2514         * gnulib/import/m4/sys_types_h.m4: Update.
2515         * gnulib/import/m4/tempname.m4: Update.
2516         * gnulib/import/m4/time_h.m4: Update.
2517         * gnulib/import/m4/unistd-safer.m4: Update.
2518         * gnulib/import/m4/unistd_h.m4: Update.
2519         * gnulib/import/m4/warn-on-use.m4: Update.
2520         * gnulib/import/m4/wchar_h.m4: Update.
2521         * gnulib/import/m4/wchar_t.m4: Update.
2522         * gnulib/import/m4/wctype_h.m4: Update.
2523         * gnulib/import/m4/wint_t.m4: Update.
2524         * gnulib/import/malloc.c: Update.
2525         * gnulib/import/malloc/scratch_buffer.h: Update.
2526         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2527         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2528         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2529         * gnulib/import/malloca.c: Update.
2530         * gnulib/import/malloca.h: Update.
2531         * gnulib/import/malloca.valgrind: Update.
2532         * gnulib/import/math.in.h: Update.
2533         * gnulib/import/mbrtowc.c: Update.
2534         * gnulib/import/mbsinit.c: Update.
2535         * gnulib/import/mbsrtowcs-impl.h: Update.
2536         * gnulib/import/mbsrtowcs-state.c: Update.
2537         * gnulib/import/mbsrtowcs.c: Update.
2538         * gnulib/import/memchr.c: Update.
2539         * gnulib/import/memmem.c: Update.
2540         * gnulib/import/mempcpy.c: Update.
2541         * gnulib/import/memrchr.c: Update.
2542         * gnulib/import/mkdir.c: Update.
2543         * gnulib/import/mkstemp.c: Update.
2544         * gnulib/import/msvc-inval.c: Update.
2545         * gnulib/import/msvc-inval.h: Update.
2546         * gnulib/import/msvc-nothrow.c: Update.
2547         * gnulib/import/msvc-nothrow.h: Update.
2548         * gnulib/import/open.c: Update.
2549         * gnulib/import/openat-die.c: Update.
2550         * gnulib/import/openat-priv.h: Update.
2551         * gnulib/import/openat-proc.c: Update.
2552         * gnulib/import/openat.c: Update.
2553         * gnulib/import/openat.h: Update.
2554         * gnulib/import/opendir.c: Update.
2555         * gnulib/import/pathmax.h: Update.
2556         * gnulib/import/pipe-safer.c: Update.
2557         * gnulib/import/rawmemchr.c: Update.
2558         * gnulib/import/readdir.c: Update.
2559         * gnulib/import/readlink.c: Update.
2560         * gnulib/import/realloc.c: Update.
2561         * gnulib/import/ref-add.sin: Update.
2562         * gnulib/import/ref-del.sin: Update.
2563         * gnulib/import/rename.c: Update.
2564         * gnulib/import/rewinddir.c: Update.
2565         * gnulib/import/rmdir.c: Update.
2566         * gnulib/import/same-inode.h: Update.
2567         * gnulib/import/save-cwd.c: Update.
2568         * gnulib/import/save-cwd.h: Update.
2569         * gnulib/import/scratch_buffer.h: Update.
2570         * gnulib/import/secure_getenv.c: Update.
2571         * gnulib/import/setenv.c: Update.
2572         * gnulib/import/signal.in.h: Update.
2573         * gnulib/import/stat-time.c: Update.
2574         * gnulib/import/stat-time.h: Update.
2575         * gnulib/import/stat-w32.c: Update.
2576         * gnulib/import/stat-w32.h: Update.
2577         * gnulib/import/stat.c: Update.
2578         * gnulib/import/stdbool.in.h: Update.
2579         * gnulib/import/stddef.in.h: Update.
2580         * gnulib/import/stdint.in.h: Update.
2581         * gnulib/import/stdio.in.h: Update.
2582         * gnulib/import/stdlib.in.h: Update.
2583         * gnulib/import/str-two-way.h: Update.
2584         * gnulib/import/strchrnul.c: Update.
2585         * gnulib/import/strdup.c: Update.
2586         * gnulib/import/streq.h: Update.
2587         * gnulib/import/strerror-override.c: Update.
2588         * gnulib/import/strerror-override.h: Update.
2589         * gnulib/import/strerror.c: Update.
2590         * gnulib/import/string.in.h: Update.
2591         * gnulib/import/stripslash.c: Update.
2592         * gnulib/import/strnlen1.c: Update.
2593         * gnulib/import/strnlen1.h: Update.
2594         * gnulib/import/strstr.c: Update.
2595         * gnulib/import/strtok_r.c: Update.
2596         * gnulib/import/sys_stat.in.h: Update.
2597         * gnulib/import/sys_time.in.h: Update.
2598         * gnulib/import/sys_types.in.h: Update.
2599         * gnulib/import/tempname.c: Update.
2600         * gnulib/import/tempname.h: Update.
2601         * gnulib/import/time.in.h: Update.
2602         * gnulib/import/unistd--.h: Update.
2603         * gnulib/import/unistd-safer.h: Update.
2604         * gnulib/import/unistd.in.h: Update.
2605         * gnulib/import/unsetenv.c: Update.
2606         * gnulib/import/verify.h: Update.
2607         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2608         * gnulib/import/wchar.in.h: Update.
2609         * gnulib/import/wctype.in.h: Update.
2610         * gnulib/import/xalloc-oversized.h: Update.
2611         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2612         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2613
2614 2018-08-16  Gary Benson <gbenson@redhat.com>
2615
2616         PR gdb/13000:
2617         * gdb/main.c (captured_main_1): Exit with nonzero status
2618         in batch mode if the last command to be executed failed.
2619         * NEWS: Mention the above.
2620
2621 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2622
2623         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2624         end of warning message.
2625
2626 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2627
2628         PR gdb/22943:
2629         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2630         (aarch64_extract_return_value): Use
2631         aapcs_is_vfp_call_or_return_candidate.
2632         (aarch64_return_in_memory): Likewise.
2633         (aarch64_store_return_value): Likewise.
2634
2635 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2636
2637         * aarch64-tdep.c
2638         (aapcs_is_vfp_call_or_return_candidate): Make static
2639         (pass_in_v_or_stack): Remove function.
2640         (pass_in_v_vfp_candidate): New function.
2641         (aarch64_push_dummy_call): Check for float register candidates.
2642
2643 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2644
2645         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2646         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2647         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2648
2649 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2650
2651         PR build/23399
2652         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2653         (struct ipa_sym_addresses): Rename to...
2654         (struct ipa_sym_addresses_common): ... this.
2655         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2656
2657 2018-08-28  Tom Tromey  <tom@tromey.com>
2658
2659         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2660         (token_fifo): Now a std::vector.
2661         (yylex, c_parse): Update.
2662         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2663         (token_fifo): Now a std::vector.
2664         (yylex, d_parse): Update.
2665         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2666         (token_fifo): Now a std::vector.
2667         (yylex, go_parse): Update.
2668
2669 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2670
2671         * parser-defs.h (struct type_stack) <elements>: Change type to
2672         std::vector<union type_stack_elt>.
2673         <depth, size>: Remove.
2674         * parse.c (parse_exp_in_context_1): Adjust.
2675         (type_stack_reserve): Remove.
2676         (check_type_stack_depth): Remove.
2677         (insert_into_type_stack): Adjust to std::vector.
2678         (insert_type): Likewise.
2679         (push_type): Likewise.
2680         (push_type_int): Likewise.
2681         (insert_type_address_space): Likewise.
2682         (pop_type): Likewise.
2683         (pop_type_int): Likewise.
2684         (pop_typelist): Likewise.
2685         (pop_type_stack): Likewise.
2686         (append_type_stack): Likewise.
2687         (push_type_stack): Likewise.
2688         (get_type_stack): Likewise.
2689         (type_stack_cleanup): Likewise.
2690         (push_typelist): Likewise.
2691         (follow_types): Likewise.
2692         (_initialize_parse): Likewise.
2693
2694 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2695
2696         * NEWS: Mention csky target.
2697
2698 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2699             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2700             Don Breazeal  <donb@codesourcery.com>
2701
2702         * csky-linux-tdep.c: New file.
2703         * csky-tdep.c: Likewise.
2704         * csky-tdep.h: Likewise.
2705         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2706         csky-tdep.o.
2707         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2708         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2709         * configure.tgt: Add csky support.
2710
2711 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2712
2713         * python/py-framefilter.c (py_print_frame): Print frame architecture
2714         when printing on an MI output.
2715
2716 2018-08-27  Tom Tromey  <tom@tromey.com>
2717
2718         PR build/23087:
2719         * configure: Rebuild.
2720         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2721
2722 2018-08-27  Tom Tromey  <tom@tromey.com>
2723
2724         * aarch64-linux-tdep.c
2725         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2726         casts to int.
2727
2728 2018-08-27  Tom Tromey  <tom@tromey.com>
2729
2730         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2731         unsigned.
2732         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2733         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2734         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2735         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2736         unsigned.
2737
2738 2018-08-27  Tom Tromey  <tom@tromey.com>
2739
2740         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2741         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2742
2743 2018-08-27  Tom Tromey  <tom@tromey.com>
2744
2745         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2746         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2747         ULONGEST_MAX.
2748         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2749         ULONGEST_MAX.
2750         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2751         ULONGEST_MAX.
2752         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2753         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2754         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2755         ULONGEST_MAX.
2756         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2757         (ppc64_linux_sigaction_tramp_frame)
2758         (ppc32_linux_sighandler_tramp_frame)
2759         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2760         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2761         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2762         * mn10300-linux-tdep.c (am33_linux_sigframe)
2763         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2764         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2765         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2766         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2767         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2768         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2769         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2770         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2771         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2772         * microblaze-linux-tdep.c
2773         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2774         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2775         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2776         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2777         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2778         * common/common-types.h (ULONGEST_MAX): New define.
2779         (CORE_ADDR_MAX): Fix formatting.
2780         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2781         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2782         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2783         (arm_linux_rt_sigreturn_tramp_frame)
2784         (arm_eabi_linux_sigreturn_tramp_frame)
2785         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2786         (thumb2_eabi_linux_sigreturn_tramp_frame)
2787         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2788         (arm_linux_restart_syscall_tramp_frame)
2789         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2790         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2791         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2792         ULONGEST_MAX.
2793         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2794
2795 2018-08-27  Tom Tromey  <tom@tromey.com>
2796
2797         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2798         CORE_ADDR_MAX.
2799         * mips-tdep.c (mips_deal_with_atomic_sequence)
2800         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2801         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2802         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2803         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2804         CORE_ADDR_MAX.
2805         * aarch64-tdep.c (aarch64_software_single_step): Use
2806         CORE_ADDR_MAX.
2807
2808 2018-08-27  Tom Tromey  <tom@tromey.com>
2809
2810         * linespec.c (complete_linespec_component): Add cast to "char".
2811         * completer.c (completion_tracker::build_completion_result): Add
2812         cast to "char".
2813
2814 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2815
2816         * solist.h (struct solist, struct target_so_ops): Fix
2817         indentation.
2818
2819 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2820
2821         * ada-tasks.c (ada_task_info_s): Remove typedef.
2822         (DEF_VEC_O(ada_task_info_s)): Remove.
2823         (struct ada_tasks_inferior_data): Initialize fields.
2824         <task_list>: Make an std::vector.
2825         (get_ada_tasks_inferior_data): Allocate with new.
2826         (ada_get_task_number): Adjust.
2827         (get_task_number_from_id): Likewise.
2828         (valid_task_id): Likewise.
2829         (ada_get_task_info_from_ptid): Likewise.
2830         (iterate_over_live_ada_tasks): Likewise.
2831         (add_ada_task): Likewise.
2832         (read_known_tasks): Likewise.
2833         (ada_build_task_list): Likewise.
2834         (print_ada_task_info): Likewise.
2835         (info_task): Likewise.
2836         (task_command_1): Likewise.
2837
2838 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2839
2840         * ada-lang.c (add_angle_brackets): Return std::string.
2841
2842 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2843
2844         * python/py-threadevent.c (py_get_event_thread): Initialize
2845         pythread.
2846
2847 2018-08-24  Pedro Alves  <palves@redhat.com>
2848
2849         * python/py-bpevent.c (create_breakpoint_event_object): Use
2850         copy-initialization.
2851         * python/py-continueevent.c (emit_continue_event): Use
2852         copy-initialization.
2853         * python/py-exitedevent.c (create_exited_event_object): Return a
2854         gdbpy_ref<>.
2855         (emit_exited_event): Use copy-initialization.
2856         * python/py-inferior.c (python_new_inferior)
2857         (python_inferior_deleted, add_thread_object): Use
2858         copy-initialization.
2859         * python/py-infevents.c (create_inferior_call_event_object)
2860         (create_register_changed_event_object)
2861         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2862         (emit_inferior_call_event, emit_memory_changed_event)
2863         (emit_register_changed_event): Use copy-initialization.
2864         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2865         Return a gdbpy_ref<>.
2866         (emit_new_objfile_event): Use copy-initialization.
2867         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2868         (emit_clear_objfiles_event): Use copy-initialization.
2869         * python/py-signalevent.c (create_signal_event_object): Use
2870         copy-initialization.
2871         * python/py-threadevent.c (create_thread_event_object): Use
2872         copy-initialization.
2873
2874 2018-08-24  Pedro Alves  <palves@redhat.com>
2875             Simon Marchi  <simon.marchi@ericsson.com>
2876
2877         PR gdb/23379
2878         * python/py-continueevent.c: Include "gdbthread.h".
2879         (create_continue_event_object): Add intro comment.  Add 'ptid'
2880         parameter.  Use it to find thread to pass to
2881         create_thread_event_object.
2882         (emit_continue_event): Pass PTID down to
2883         create_continue_event_object.
2884         * python/py-event.h (py_get_event_thread): Declare.
2885         (create_thread_event_object): Remove default from 'thread'
2886         parameter.
2887         * python/py-stopevent.c (create_stop_event_object): Use
2888         py_get_event_thread.
2889         * python/py-threadevent.c (get_event_thread): Rename to ...
2890         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2891         and use it to find the thread.
2892         (create_thread_event_object): Assert that THREAD isn't null.
2893         Don't find the event thread here.
2894
2895 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2896
2897         * block.h (blockrange, blockranges): New struct declarations.
2898         (struct block): Add new field named `ranges'.
2899         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2900         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2901         macros for accessing ranges in struct block.
2902         (make_blockranges): New declaration.
2903         block.c (make_blockranges): New function.
2904         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2905         for block.
2906         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2907         * blockframe.c (cache_pc_function_block): New static global.
2908         (clear_pc_function_cache): Clear cache_pc_function_block.
2909         (find_pc_partial_function): Move comment to symtab.h.  Add
2910         support for non-contiguous blocks.
2911         * cli/cli-cmds.c (block.h): Include.
2912         (print_disassembly): Handle printing of non-contiguous blocks.
2913         (disassemble_current_function): Likewise.
2914         (disassemble_command): Likewise.
2915
2916         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2917         BLOCK_START.
2918         * blockframe.c (get_pc_function_start): Likewise.
2919         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2920         (gcc_symbol_address): Likewise.
2921         * compile/compile-object-run.c (compile_object_run): Likewise.
2922         * compile/compile.c (get_expr_block_and_pc): Likewise.
2923         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2924         (func_addr_to_tail_call_list): Likewise.
2925         * findvar.c (default_read_var_value): Likewise.
2926         * inline-frame.c (inline_frame_this_id): Likewise.
2927         (skip-inline_frames): Likewise.
2928         * infcmd.c (until_next_command): Likewise.
2929         * linespec.c (convert_linespec_to_sals): Likewise.
2930         * parse.c (parse_exp_in_context_1): Likewise.
2931         * printcmd.c (build_address_symbolic): likewise.
2932         (info_address_command): Likewise.
2933         symtab.c (find_function_start_sal): Likewise.
2934         (skip_prologue_sal): Likewise.
2935         (find_function_alias_target): Likewise.
2936         (find_gnu_ifunc): Likewise.
2937         * stack.c (find_frame_funname): Likewise.
2938         * symtab.c (fixup_symbol_section): Likewise.
2939         (find_function_start_sal): Likewise.
2940         (skip_prologue_sal): Likewsie.
2941         (find_function_alias_target): Likewise.
2942         (find_gnu_ifunc): Likewise.
2943         * tracepoint.c (info_scope_command): Likewise.
2944         * value.c (value_fn_field): Likewise.
2945
2946         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2947         in place of find_pc_partial_function.
2948         * blockframe.c (find_function_entry_range_from_pc): New function.
2949         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2950         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2951         for each range in a block.
2952
2953
2954 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2955
2956         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2957         incrementation.
2958
2959 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2960
2961         * solib-svr4.c (read_program_headers_from_bfd): Return
2962         gdb::optional<gdb::byte_vector>.
2963         (svr4_exec_displacement): Adjust.
2964
2965 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2966
2967         * solib-svr4.c (read_program_header): Return
2968         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2969         (find_program_interpreter): Return
2970         gdb::optional<gdb::byte_vector>.
2971         (scan_dyntag_auxv): Adjust.
2972         (enable_break): Adjust.
2973         (svr4_exec_displacement): Adjust.
2974
2975 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2976
2977         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2978         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2979
2980 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2981
2982         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2983         string_vprintf.
2984         * guile/scm-utils.c (gdbscm_printf): Likewise.
2985         * serial.c (serial_printf): Likewise.
2986         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2987
2988 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2989
2990         * stack.c (print_frame): Print frame architecture when printing on
2991         an MI output.
2992         * NEWS: Mention new "arch" attribute in frame output.
2993
2994 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2995
2996         * arch/aarch64.h (aarch64_regnum): Update comment.
2997
2998 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2999
3000         * NEWS: Add SVE to 8.2 section.
3001
3002 2018-08-21  Pedro Alves  <palves@redhat.com>
3003
3004         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3005         out from gdbscm_parse_function_args.
3006         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3007         gdbscm_parse_function_args_1.
3008
3009 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3010
3011         PR gdb/17816
3012         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3013         operator.
3014
3015 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3016
3017         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3018
3019 2018-08-19  Michael Spang  <spang@google.com>
3020
3021         PR gdb/11786
3022         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3023         for PT_TLS segments.
3024
3025 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3026
3027         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3028         dwarf_variable_value.
3029         * dwarf2-frame.c (class dwarf_expr_executor):
3030         Add override for dwarf_variable_value.
3031         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3032         (class symbol_needs_eval_context): Likewise.
3033         (indirect_synthetic_pointer): Add forward declaration.
3034         (sect_variable_value): New function.
3035         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3036         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3037         for DW_OP_GNU_variable_value.
3038
3039 2018-08-16  Tom Tromey  <tom@tromey.com>
3040
3041         * top.c (read_command_file): Update.
3042         (command_line_input): Remove "repeat" argument.
3043         * ada-lang.c (get_selections): Update.
3044         * linespec.c (decode_line_2): Update.
3045         * defs.h (command_line_input): Remove argument.
3046         * cli/cli-script.c (read_next_line): Update.
3047         * python/py-gdb-readline.c: Update.
3048
3049 2018-08-17  Tom Tromey  <tom@tromey.com>
3050
3051         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3052         command_line_input.
3053
3054 2018-08-15  Tom Tromey  <tom@tromey.com>
3055
3056         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3057
3058 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3059
3060         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3061         If used, use find_pc_partial_function to find address range
3062         to disassemble.
3063         * mi/mi-main.c (mi_cmd_list_features): Report
3064         "data-disassemble-a-option" feature.
3065         * NEWS: Mention new -data-disassemble option -a.
3066
3067 2018-08-13  Tom Tromey  <tom@tromey.com>
3068
3069         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3070
3071 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3072
3073         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3074         (aarch64_linux_collect_sve_regset): Likewise.
3075         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3076         * regcache.h (regcache_map_entry_size): New function.
3077
3078 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3079
3080         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3081         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3082         (SVE_HEADER_VL_LENGTH): Likewise.
3083         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3084         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3085         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3086         (SVE_HEADER_SIZE_OFFSET): Likewise.
3087         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3088         (SVE_HEADER_VL_OFFSET): Likewise.
3089         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3090         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3091         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3092         (SVE_HEADER_SIZE): Likewise.
3093         (aarch64_linux_core_read_vq): Add function.
3094         (aarch64_linux_core_read_description): Check for SVE section.
3095
3096 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3097
3098         * aarch64-fbsd-tdep.c
3099         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3100         collect_size.
3101         * aarch64-linux-tdep.c
3102         (aarch64_linux_iterate_over_regset_sections): Likewise.
3103         * alpha-linux-tdep.c
3104         (alpha_linux_iterate_over_regset_sections):
3105         * alpha-nbsd-tdep.c
3106         (alphanbsd_iterate_over_regset_sections): Likewise.
3107         * amd64-fbsd-tdep.c
3108         (amd64fbsd_iterate_over_regset_sections): Likewise.
3109         * amd64-linux-tdep.c
3110         (amd64_linux_iterate_over_regset_sections): Likewise.
3111         * arm-bsd-tdep.c
3112         (armbsd_iterate_over_regset_sections): Likewise.
3113         * arm-fbsd-tdep.c
3114         (arm_fbsd_iterate_over_regset_sections): Likewise.
3115         * arm-linux-tdep.c
3116         (arm_linux_iterate_over_regset_sections): Likewise.
3117         * corelow.c (get_core_registers_cb): Likewise.
3118         (core_target::fetch_registers): Likewise.
3119         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3120         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3121         * gdbarch.h (void): Regenerate.
3122         * gdbarch.sh: Add supply_size and collect_size.
3123         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3124         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3125         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3126         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3127         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3128         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3129         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3130         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3131         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3132         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3133         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3134         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3135         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3136         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3137         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3138         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3139         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3140         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3141         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3142         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3143         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3144         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3145         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3146         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3147         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3148         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3149         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3150         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3151         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3152         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3153
3154 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3155
3156         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3157         with string_printf.
3158
3159 2018-08-10  Keith Seitz  <keiths@redhat.com>
3160
3161         * compile/compile-c-support.c (add_code_header, add_code_footer):
3162         Move into policy class.
3163         (c_push_user_expression, pop_user_expression_nop)
3164         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3165         (compile_program): New host class.
3166         (c_compile_program): New typedef.
3167         (c_compute_porgram): Use c_compile_program.
3168
3169 2018-08-10  Keith Seitz  <keiths@redhat.com>
3170
3171         * compile/compile-internal.h (compile_instance::~compile_instance):
3172         Remove calls to htab_delete.
3173         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3174         * compile.c (compile_instance::compile_instance): Initialize
3175         htab unique pointers.
3176         (compile_instance::get_cached_type, compile_instance::insert_type)
3177         (compile_instance::error_symbol_once): Update for unique_ptr.
3178
3179 2018-08-10  Keith Seitz  <keiths@redhat.com>
3180
3181         * compile/compile-c-symbols.c (struct symbol_error)
3182         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3183         (compile_instance::insert_symbol_error)
3184         (compile_instance::error_symbol_once): Move to ...
3185         * compile/compile.c: ... here.
3186
3187 2018-08-10  Keith Seitz  <keiths@redhat.com>
3188
3189         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3190         instead of `new_compile_instance'.
3191         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3192         Update description.
3193         If the symbol error map is not initialized, create it.
3194         (generate_c_for_for_one_symbol): Do not check/initialize
3195         the symbol error map.
3196         * compile/compile-c-types.c (compile_c_instance): Make a class.
3197         Update all callers.
3198         (compile_instance::compile_instance): Initialize the type cache.
3199         (get_cached_type): New function.
3200         (insert_type): Update description.
3201         (compile_c_instance::m_default_cflags): Define.
3202         (convert_type): Update description.  Use get_cached_type.
3203         (delete_instance): Moved to destructor.
3204         (new_compile_instance): Moved to constructor.
3205         * compile/compile-c.h (compile_c_instance): Make class inheriting
3206         from compile_instance.
3207         <base>: Remove field.
3208         <type_map, symbol_err_map>: Move to base class.
3209         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3210         * compile/compile-internal.h (compile_instance): Make class.
3211         <type_map_t, symbol_err_map_t>: Define.
3212         <fe>: Rename to `m_gcc_fe'.
3213         <scope, block, gcc_target_options>: Add `m_' prefix.
3214         <m_type_map, m_symbol_err_map>: New fields, moved from
3215         compile_c_instance.
3216         <destroy>: Remove.
3217         (convert_type, new_compile_instance): Remove.
3218         * compile/compile.c (cleanup_compile_instance): Remove.
3219         (compile_to_object): Use unique_ptr to eliminate cleanups.
3220         (compile_instance::set_print_callback, compile_instance::version)
3221         (compile_instance::set_verbose)
3222         (compile_instance::set_driver_filename)
3223         (compile_instance::set_triplet_regexp)
3224         (compile_instance::set_arguments)
3225         (compile_instance::set_source_file)
3226         (compile_instance::compile): Define.
3227
3228 2018-08-10  Keith Seitz  <keiths@redhat.com>
3229
3230         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3231         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3232         gcc-c-fe.def to define C plugin.
3233         (delete_instance): Delete `c_plugin'.
3234         (new_compile_instance): Initialize `c_plugin'.
3235         * compile/compile-c.h: Include gcc_c_plugin.h.
3236         (struct compile_c_instance) <c_plugin>: New member.
3237         * gcc-c-plugin.h: New file.
3238         Update all callers with API change.
3239
3240 2018-08-10  Keith Seitz  <keiths@redhat.com>
3241
3242         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3243         (HFILES_NO_SRCDIR): ... to here.
3244         Add compile-internal.h and compile-c.h.
3245         * compile/compile-c-support.c: Include compile-c.h.
3246         * compile/compile-c-symbols.c: Include compile-c.h.
3247         (generate_c_for_variable_locations): Update comment.
3248         * compile/compile-c-types.c: Include compile-c.h.
3249         * compile/compile-c.h: New file -- moved C language declarations
3250         from other files here.
3251         * compile/compile-internal.h: Do not include hashtab.h or
3252         common/enum-flags.h.
3253         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3254         (gcc_convert_symbol, gcc_symbol_address)
3255         (generate_c_for_variable_locations, c_get_mode_for_size)
3256         (c_get_range_decl_name): Definitions moved to compile-c.h.
3257         * compile/compile-loc2c.c: Include compile-c.h.
3258
3259 2018-08-10  Keith Seitz  <keiths@redhat.com>
3260
3261         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3262         (c_symbol_substitution_name): ... this.
3263         Update all callers.
3264
3265 2018-08-10  Keith Seitz  <keiths@redhat.com>
3266
3267         * compile/compile-c-support.c (c_compute_program): Use
3268         unique_xmalloc_ptr to eliminate cleanup.
3269         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3270         Return a unique_xmalloc_ptr and eliminate cleanup.
3271         * compile/compile-internal.h (generate_c_for_variable_locations):
3272         Return unique_xmalloc_ptr and update description.
3273
3274 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3275
3276         * corelow.c (core_target::get_core_register_section): Rename
3277         min_size to section_min_size.
3278
3279 2018-08-09  Jim Wilson  <jimw@sifive.com>
3280
3281         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3282         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3283         * NEWS: Mention new GNU/Linux RISC-V target.
3284         * configure.host: Add riscv*-*-linux*.
3285         * configure.nat: Add riscv*.
3286         * configure.tgt: Add riscv*-*-linux*.
3287         * riscv-linux-nat.c: New file.
3288         * riscv-linux-tdep.c: New file.
3289
3290 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3291
3292         * infrun.c (resume): Make static, add forward declaration.
3293         (proceed): Update header comment.
3294         * infrun.h (resume): Delete declaration.
3295
3296 2018-08-09  Tom Tromey  <tom@tromey.com>
3297
3298         * riscv-tdep.h: Minor formatting fixes.
3299
3300 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3301
3302         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3303         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3304         (test_mkdir_recursive): Likewise.
3305         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3306
3307 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3308
3309         * valarith.c (value_subscripted_rvalue): If an array is not in
3310         memory, and we don't know the upper bound, then we can't know that
3311         the requested element exists or not.
3312
3313 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3314
3315         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3316         (target_options_to_string): Add comment.
3317
3318 2018-08-08  Tom Tromey  <tom@tromey.com>
3319
3320         * unittests/scoped_mmap-selftests.c: Check result of "write".
3321
3322 2018-08-08  Jim Wilson  <jimw@sifive.com>
3323
3324         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3325         (decode_register_index_short): New.
3326         (decode_j_type_insn, decode_cj_type_insn): New.
3327         (decode_b_type_insn, decode_cb_type_insn): New.
3328         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3329         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3330         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3331         is_c_sw_insn instead of is_sw_insn.
3332         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3333         (riscv_software_single_step): New.
3334         * riscv-tdep.h (riscv_software_single_step): Declare.
3335
3336         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3337         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3338
3339 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3340
3341         PR gdb/18050:
3342         * target.c (dispose_inferior): Don't dispose of inferiors that are
3343         already killed.
3344
3345 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3346
3347         * remote.c (remote_target::download_tracepoint): Change char* to
3348         const char*.
3349
3350 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3351
3352         * target.h (target_options_to_string): Return an std::string.
3353         * target.c (str_comma_list_concat_elem): Return void, use
3354         std::string.
3355         (do_option): Likewise.
3356         (target_options_to_string): Return an std::string.
3357         * linux-nat.c (linux_nat_target::wait): Adjust.
3358         * target-debug.h (target_debug_print_options): Adjust.
3359
3360 2018-08-07  Tom Tromey  <tom@tromey.com>
3361
3362         * Makefile.in (CPPFLAGS): New variable.
3363         (INTERNAL_CPPFLAGS): Use it.
3364
3365 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3366
3367         * NEWS: Mention the index cache.
3368
3369 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3370
3371         * common/pathstuff.h (get_standard_cache_dir): New.
3372         * common/pathstuff.c (get_standard_cache_dir): New.
3373         * build-id.h (build_id_to_string): New.
3374         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3375         DEBUG_STR_SUFFIX): Move to here.
3376         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3377         DEBUG_STR_SUFFIX): Move from there.
3378         (write_psymtabs_to_index): Make non-static, add basename
3379         parameter.  Write to temporary files, rename when done.
3380         (save_gdb_index_command): Adjust call to
3381         write_psymtabs_to_index.
3382         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3383         field.
3384         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3385         (get_gdb_index_contents_from_cache): New.
3386         (get_gdb_index_contents_from_cache_dwz): New.
3387         (dwarf2_initialize_objfile): Read index from cache.
3388         (dwarf2_build_psymtabs): Save to index.
3389         * dwarf-index-cache.h: New file.
3390         * dwarf-index-cache.c: New file.
3391         * dwarf-index-write.h: New file.
3392
3393 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3394
3395         * gnulib/aclocal.m4: Re-generate.
3396         * gnulib/config.in: Re-generate.
3397         * gnulib/configure: Re-generate.
3398         * gnulib/import/Makefile.am: Re-generate.
3399         * gnulib/import/Makefile.in: Re-generate.
3400         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3401         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3402         * gnulib/import/m4/mkdir.m4: New file.
3403         * gnulib/import/mkdir.c: New file.
3404         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3405         module.
3406
3407 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3408
3409         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3410         * common/scoped_mmap.c: New file.
3411         * common/scoped_mmap.h (destroy): New method.
3412         (~scoped_mmap, reset): Use destroy.
3413         (scoped_mmap): New move constructor.
3414         (mmap_file): New declaration.
3415         * unittests/scoped_mmap-selftests.c (test_normal,
3416         test_invalid_filename, run_tests): New functions.
3417         (_initialize_scoped_mmap_selftests): Register selftest.
3418
3419 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3420
3421         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3422         (read_gdb_index_from_buffer): ... this.  Remove section
3423         parameter, add buffer parameter.
3424         (get_gdb_index_contents_ftype,
3425         get_gdb_index_contents_dwz_ftype): New typedefs.
3426         (dwarf2_read_gdb_index): Add callback parameters to get the
3427         index contents.
3428         (get_gdb_index_contents_from_section): New.
3429         (dwarf2_initialize_objfile): Update call to
3430         dwarf2_read_gdb_index.
3431
3432 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3433
3434         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3435         (gdb_open_cloexec): Likewise.
3436         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3437         (commandline_from_pid): Likewise.
3438         (linux_xfer_osdata_threads): Likewise.
3439         (linux_xfer_osdata_fds): Likewise.
3440         * ada-lang.c (is_package_name): Likewise.
3441         * auxv.c (procfs_xfer_auxv): Likewise.
3442         * breakpoint.c (print_one_breakpoint_location): Use
3443         uiout::field_fmt.
3444         (print_one_catch_solib): Use string_printf.
3445         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3446         (add_pe_forwarded_sym): Likewise.
3447         * dwarf2read.c (create_type_unit_group): Likewise.
3448         (build_error_marker_type): Likewise.
3449         * infcall.c (get_function_name): Likewise.
3450         * valprint.c (print_converted_chars_to_obstack): Likewise.
3451         * xtensa-tdep.c (xtensa_register_type): Likewise.
3452
3453 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3454
3455         * remote.c (remote_target::download_tracepoint): Fix format
3456         string errors.
3457
3458 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3459
3460         * tracefile.c: Include common/byte-vector.h.
3461         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3462         with trace_regblock_size if needed.  Update uses of buf.
3463
3464 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3465
3466         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3467         std::vector<unsigned char>.
3468         * tracepoint.c (collection_list::collection_list): Remove
3469         m_regs_mask initializer from initializer list.  Resize
3470         m_regs_mask using the largest remote register number.
3471         (collection_list::add_remote_register): Remove size check on
3472         m_regs_mask.  Use at to access element.
3473         (collection_list::stringify): Change type of temp_buf to
3474         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3475         stringify the register mask.  Use pack_hex_byte for the register
3476         mask.
3477
3478 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3479
3480         * tracepoint.h (class collection_list) <add_register>: Remove.
3481         <add_remote_register, add_ax_registers, add_local_register>:
3482         Declare.
3483         <add_memrange>: Add scope parameter.
3484         * tracepoint.c (encode_actions_1): Likewise.
3485         (collection_list::add_register): Rename to ...
3486         (collection_list::add_remote_register): ... this.  Update
3487         comment.
3488         (collection_list::add_ax_registers, add_local_register): New
3489         methods.
3490         (collection_list::add_memrange): Add scope parameter.  Call
3491         add_local_register instead of add_register.
3492         (finalize_tracepoint_aexpr): New function.
3493         (collection_list::collect_symbol): Update calls to add_memrange.
3494         Call add_local_register instead of add_register.  Call
3495         add_ax_registers.  Call finalize_tracepoint_aexpr.
3496         (encode_actions_1): Get remote regnos for $reg action.  Call
3497         add_remote_register, add_ax_registers, and add_local_register.
3498         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3499         (validate_actionline): Call finalize_tracepoint_aexpr.
3500
3501 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3502
3503         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3504         Replace array buf with gdb::char_vector buf, of size
3505         get_remote_packet_size ().  Replace references to buf and
3506         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3507         and xsnprintf with snprintf.  Raise errors if the buffer is too
3508         small.
3509
3510 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3511
3512         * remote.c (remote_target::download_tracepoint): Fix the has_more
3513         predicate in the QTDP action list iteration.
3514
3515 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3516
3517         * remote.c (remote_target::download_tracepoint): Fix indentation
3518         in for block.
3519
3520 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3521
3522         * proc-api.c (_initialize_proc_api): Remove c, unused.
3523         * procfs.c (procfs_init_inferior): Remove signals, unused.
3524         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3525         unused.
3526
3527 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3528             Andrew Burgess  <andrew.burgess@embecosm.com>
3529
3530         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3531         'W_STOPCODE (0)' as this could be ambiguous.
3532
3533 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3534
3535         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3536         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3537         "ai_socktype").
3538
3539 2018-08-02  Tom Tromey  <tom@tromey.com>
3540
3541         PR symtab/16842.
3542         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3543         symbols.
3544         (process_structure_scope): Likewise.
3545
3546 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3547
3548         PR gdb/22629:
3549         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3550         kill inferior.
3551
3552 2018-08-02  Tom Tromey  <tom@tromey.com>
3553
3554         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3555         (darwin_suspend_inferior, darwin_resume_inferior)
3556         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3557         (darwin_check_new_threads): Check result of get_darwin_inferior.
3558
3559 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3560
3561         GDB 8.1.1 released.
3562
3563 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3564
3565         * varobj.c (varobj_get_path_expr_parent): Report an error if
3566         parent is a dynamic varobj.
3567
3568 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3569
3570         * gnulib/aclocal.m4: Re-generate.
3571         * gnulib/config.in: Re-generate.
3572         * gnulib/configure: Re-generate.
3573         * gnulib/import/Makefile.in: Re-generate.
3574         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3575         * gnulib/import/m4/onceonly.m4: Re-generate.
3576
3577 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3578
3579         * target-descriptions.c (struct xml_test_tdesc): New.
3580         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3581         (record_xml_tdesc): Update.
3582         (maintenance_check_xml_descriptions): Update.
3583         * target-descriptions.h (record_xml_tdesc): Update comment.
3584
3585 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3586
3587         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3588         checking array bounds are defined.
3589
3590 2018-07-30  Tom Tromey  <tom@tromey.com>
3591
3592         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3593         irreflexivity violation.
3594
3595 2018-07-30  Tom Tromey  <tom@tromey.com>
3596
3597         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3598         * value.c (unpack_long): Remove lint code.
3599         * valops.c (value_ind): Remove lint code.
3600         * valarith.c (value_x_binop, value_x_unop, value_equal)
3601         (value_pos): Remove lint code.
3602
3603 2018-07-28  Tom de Vries  <tdevries@suse.de>
3604
3605         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3606         with undefined upper bound as <optimized out>.
3607
3608 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3609
3610         * gcore.in: Rename variable "name" to "prefix".  Expand
3611         "usage" text.
3612
3613 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3614
3615         * windows-nat.c (windows_nat_target::create_inferior): Update to
3616         call close() in global namespace.
3617
3618 2018-07-26  Tom Tromey  <tom@tromey.com>
3619
3620         * dwarf-index-write.c (add_address_entry): Don't add objfile
3621         offsets.
3622         * dbxread.c (find_stab_function): Rename from
3623         find_stab_function_addr.  Return a bound_minimal_symbol.
3624         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3625         Don't add objfile offsets.
3626         (end_psymtab): Use raw_text_low, raw_text_high,
3627         MSYMBOL_VALUE_RAW_ADDRESS.
3628         (read_ofile_symtab): Update.
3629         (process_one_symbol): Update.
3630         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3631         offsets.
3632         (dw2_relocate): Remove.
3633         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3634         searching addrmap.
3635         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3636         Update.
3637         (process_psymtab_comp_unit_reader, add_partial_symbol)
3638         (add_partial_subprogram, dwarf2_ranges_read): Update.
3639         (load_partial_dies): Update.
3640         (add_address_entry): Don't add objfile offsets.
3641         (dwarf2_build_include_psymtabs): Update.
3642         (create_addrmap_from_aranges): Don't add objfile offsets.
3643         (dw2_find_pc_sect_compunit_symtab): Update.
3644         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3645         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3646         Update.
3647         (parse_partial_symbols): Don't add objfile offsets.  Use
3648         raw_text_low, raw_text_high.  Update.
3649         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3650         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3651         or call 'relocate' quick function.  Clear psymbol_map.
3652         * psympriv.h (struct partial_symbol) <address>: Add section
3653         offset.
3654         <set_unrelocated_address>: Rename from set_address.
3655         <raw_text_low, raw_text_high>: New methods.
3656         <text_low, text_high>: Add objfile parameter.
3657         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3658         set_unrelocated_address.
3659         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3660         (find_pc_psymbol): Update.
3661         (fixup_psymbol_section, relocate_psymtabs): Remove.
3662         (dump_psymtab, psym_functions): Update.
3663         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3664         parameter.
3665         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3666         (start_psymtab_common): Update.
3667         * symfile-debug.c (debug_qf_relocate): Remove.
3668         (debug_sym_quick_functions): Update.
3669         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3670         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3671         Update.
3672
3673 2018-07-26  Tom Tromey  <tromey@redhat.com>
3674
3675         * dbxread.c (end_psymtab): Use text_high_valid and
3676         text_low_valid.
3677         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3678         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3679         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3680         Update comment.
3681         <text_low_valid, text_high_valid>: New fields.
3682         <set_text_low, set_text_high>: Update.
3683         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3684
3685 2018-07-26  Tom Tromey  <tom@tromey.com>
3686
3687         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3688         Update.
3689         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3690         textlow and texthigh fields.
3691         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3692         Update.
3693         * mdebugread.c (parse_lines, parse_partial_symbols)
3694         (psymtab_to_symtab_1): Update.
3695         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3696         Rename fields.  Update comment.  Now private.
3697         <text_low, text_high, set_text_low, set_text_high>: New methods.
3698         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3699         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3700         (start_psymtab_common, maintenance_info_psymtabs)
3701         (maintenance_check_psymtabs): Update.
3702         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3703         texthigh fields.
3704         (scan_xcoff_symtab): Update.
3705
3706 2018-07-26  Tom Tromey  <tromey@redhat.com>
3707
3708         * psympriv.h (struct partial_symbol) <unrelocated_address,
3709         address, set_address>: New methods.
3710         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3711         (fixup_psymbol_section, relocate_psymtabs): Update.
3712         (print_partial_symbols): Add 'objfile' parameter.  Update.
3713         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3714         Update.
3715
3716 2018-07-26  Tom Tromey  <tom@tromey.com>
3717
3718         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3719         (debug_names::write_psymbols): Update.
3720         * psympriv.h (struct partial_symbol): Derive from
3721         general_symbol_info.
3722         <obj_section>: New method.
3723         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3724         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3725         (find_pc_sect_psymbol, fixup_psymbol_section)
3726         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3727         (print_partial_symbols, recursively_search_psymtabs)
3728         (compare_psymbols, psymbol_hash, psymbol_compare)
3729         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3730         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3731
3732 2018-07-26  Tom Tromey  <tromey@redhat.com>
3733
3734         * dbxread.c (end_psymtab): Remove dead code.
3735
3736 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3737
3738         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3739         DWARF unwinders are disabled.
3740         * dwarf2-frame.c: Add dwarf2read.h include.
3741         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3742         disabled.
3743         (dwarf2_frame_unwinders_enabled_p): Define.
3744         (show_dwarf_unwinders_enabled_p): New function.
3745         (_initialize_dwarf2_frame): Register switch to control DWARF
3746         unwinder use.
3747         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3748         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3749         (show_dwarf_cmdlist): Remove static keyword.
3750         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3751         (show_dwarf_cmdlist): Declare.
3752         * NEWS: Document new feature.
3753
3754 2018-07-26  Tom de Vries  <tdevries@suse.de>
3755
3756         PR breakpoints/23366
3757         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3758
3759 2018-07-26  Tom de Vries  <tdevries@suse.de>
3760
3761         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3762         DW_AT_count can't be translated to a dynamic prop.
3763
3764 2018-07-25  Tom de Vries  <tdevries@suse.de>
3765
3766         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3767         try/catch.
3768
3769 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3770
3771         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3772
3773 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3774
3775         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3776
3777 2018-07-24  Keith Seitz  <keiths@redhat.comt
3778
3779         PR symtab/23010
3780         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3781         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3782         instead of add_symbol_to_list.
3783         (read_file_scope): Call prepare_one_comp_unit before reading
3784         any other DIEs.
3785
3786 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3787
3788         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3789
3790 2018-07-24  Tom Tromey  <tom@tromey.com>
3791
3792         * utils.c (malloc, realloc, free): Don't declare.
3793         * configure, config.in: Rebuild.
3794         * configure.ac: Don't check for declarations of free, malloc, or
3795         realloc.
3796
3797 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3798
3799         * aarch64-linux-nat.c
3800         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3801         variable.
3802         * arm-linux-nat.c (fetch_regs): Likewise.
3803         (store_regs): Likewise.
3804         (fetch_vfp_regs): Likewise.
3805         (store_vfp_regs): Likewise.
3806         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3807         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3808         (arm_linux_nat_target::insert_watchpoint): Likewise.
3809         (arm_linux_nat_target::remove_watchpoint): Likewise.
3810         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3811         Likewise.
3812         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3813         Likewise.
3814         * ppc-linux-nat.c (fetch_register): Likewise.
3815         (fetch_all_gp_regs): Likewise.
3816         (fetch_ppc_registers): Likewise.
3817         (store_all_gp_regs): Likewise.
3818         (store_ppc_registers): Likewise.
3819         (hwdebug_insert_point): Likewise.
3820         (can_use_watchpoint_cond_accel): Likewise.
3821         * remote-sim.c (gdb_os_write_stdout): Likewise.
3822
3823 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3824             Tom Tromey  <tom@tromey.com>
3825
3826         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3827         test for it.
3828         * configure: Rebuild.
3829
3830 2018-07-22  Tom Tromey  <tom@tromey.com>
3831
3832         * regformats/regdat.sh: Define xmltarget_${name} inside
3833         #ifndef IN_PROCESS_AGENT.
3834
3835 2018-07-22  Tom Tromey  <tom@tromey.com>
3836
3837         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3838
3839 2018-07-22  Tom Tromey  <tom@tromey.com>
3840
3841         * symfile.c (reread_symbols): Notify iter, not objfile.
3842
3843 2018-07-22  Tom Tromey  <tom@tromey.com>
3844
3845         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3846         Use arch_ops.
3847         (ravenscar_thread_target::prepare_to_store): Likewise.
3848
3849 2018-07-22  Tom Tromey  <tom@tromey.com>
3850
3851         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3852         unused variable.  Call value_fetch_lazy when needed.
3853         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3854         Remove unused variable.  Call value_fetch_lazy when needed.
3855
3856 2018-07-22  Tom Tromey  <tom@tromey.com>
3857
3858         * m32c-tdep.c (mark_dma): Return void.
3859         (make_regs): Remove unused declarations.
3860
3861 2018-07-22  Tom Tromey  <tom@tromey.com>
3862
3863         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3864         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3865         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3866         bkscm_get_valid_block_smob_arg_unsafe for effect.
3867
3868 2018-07-22  Tom Tromey  <tom@tromey.com>
3869
3870         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3871         value_type.
3872
3873 2018-07-22  Tom Tromey  <tom@tromey.com>
3874
3875         * windows-nat.c (saved_context): Conditionally define.
3876         * remote.c (remote_target::remote_btrace_maybe_reopen):
3877         Conditionally declare "warned".
3878         * inflow.c (sigquit_ours): Conditionally define.
3879         (new_tty): Move "tty" declaration inside #if.
3880         * guile/guile.c (guile_datadir): Conditionally define.
3881         * charset.c (set_be_le_names): Move some declarations inside #if.
3882         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3883         #if.
3884         (parse_xml_btrace_conf): Likewise.
3885
3886 2018-07-22  Tom Tromey  <tom@tromey.com>
3887
3888         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3889
3890 2018-07-22  Tom Tromey  <tom@tromey.com>
3891
3892         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3893         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3894         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3895         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3896         * stack.c (frame_apply_level_command): Remove unused variable.
3897         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3898         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3899         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3900         unused variable.
3901         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3902         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3903         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3904         variable.
3905         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3906         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3907         variable.
3908         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3909         Remove unused variable.
3910         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3911         variable.
3912         * common/tdesc.c (print_xml_feature::visit): Remove unused
3913         variable.
3914         * compile/compile-object-load.c (store_regs): Remove unused
3915         variables.
3916         * complaints.c (clear_complaints): Remove unused variable.
3917         * corelow.c (core_target_open): Remove unused variable.
3918         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3919         variable.
3920         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3921         variable.
3922         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3923         variable.
3924         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3925         variable.
3926         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3927         variable.
3928         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3929         variable.
3930         * ia64-tdep.c (examine_prologue): Remove unused variable.
3931         * infcall.c (run_inferior_call): Remove unused variable.
3932         * inferior.c (exit_inferior): Remove unused variable.
3933         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3934         * linespec.c (decode_line_2): Remove unused variable.
3935         * linux-nat.c (super_close): Remove.
3936         * linux-tdep.c (linux_info_proc): Remove unused variable.
3937         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3938         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3939         Remove unused variable.
3940         * parse.c (find_minsym_type_and_address): Remove unused variable.
3941         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3942         variable.
3943         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3944         variable.
3945         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3946         variables.
3947         * record-btrace.c (record_btrace_target::store_registers): Remove
3948         unused variable.
3949         (cmd_show_record_btrace_cpu): Remove unused variable.
3950         * riscv-tdep.c (riscv_register_reggroup_p)
3951         (riscv_push_dummy_call, riscv_return_value): Remove unused
3952         variable.
3953         * rust-exp.y (literal): Remove unused variable.
3954         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3955         unused variable.
3956         <STRUCTOP_ANONYMOUS>: Likewise.
3957         * s390-linux-tdep.c (s390_linux_init_abi_31)
3958         (s390_linux_init_abi_64): Remove unused variable.
3959         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3960         (file_select_thread, net_windows_open, _initialize_ser_windows):
3961         Remove unused variables.
3962         * symtab.c (find_pc_sect_line): Remove unused variable.
3963         * target-memory.c (compute_garbled_blocks): Remove unused
3964         variable.
3965         (target_write_memory_blocks): Remove unused variable.
3966         * target.c (target_stack::unpush): Remove unused variables.
3967         * tracepoint.c (start_tracing, all_tracepoint_actions)
3968         (merge_uploaded_trace_state_variables)
3969         (print_one_static_tracepoint_marker): Remove unused variable.
3970         * unittests/basic_string_view/element_access/char/1.cc (test01):
3971         Remove unused variable.
3972         * windows-nat.c (windows_continue, windows_add_all_dlls)
3973         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3974         Remove unused variables.
3975
3976 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3977
3978         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3979         attr_profile in HAVE_ELF.
3980         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3981         HAVE_ELF.
3982
3983 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3984
3985         * frame.c (frame_register_unwind): Change parameter name.
3986         (frame_unwind_register): Likewise.
3987         (frame_unwind_register_value): Likewise.
3988         (frame_unwind_register_signed): Likewise.
3989         (frame_unwind_register_unsigned): Likewise.
3990         * frame.h (frame_register_unwind): Likewise.
3991         (frame_unwind_register): Likewise.
3992         (frame_unwind_register_value): Likewise.
3993         (frame_unwind_register_signed): Likewise.
3994         (frame_unwind_register_unsigned): Likewise.
3995         (frame_unwind_arch): Likewise.
3996
3997 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3998
3999         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4000         ISA maintenance.
4001
4002 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4003
4004         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4005         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4006         hand.
4007
4008 2018-07-20  Keith Seitz  <keiths@redhat.com>
4009
4010         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4011         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4012         m_compunit_symtab, m_language>: Add "m_" prefix.
4013         Update all uses.
4014         * buildsym.c: Update all uses.
4015
4016 2018-07-20  Tom Tromey  <tom@tromey.com>
4017
4018         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4019         * buildsym.h (record_line_ftype): Remove typedef.
4020
4021 2018-07-20  Tom Tromey  <tom@tromey.com>
4022
4023         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4024         (end_expandable_symtab): Likewise.
4025         (end_symtab_get_static_block): Likewise.
4026         (end_symtab_from_static_block): Likewise.
4027         * buildsym-legacy.c (augment_type_symtab): Remove.
4028         (end_expandable_symtab): Remove.
4029         (end_symtab_get_static_block): Remove.
4030         (end_symtab_from_static_block): Remove.
4031
4032 2018-07-20  Tom Tromey  <tom@tromey.com>
4033
4034         * dwarf2read.c: Include buildsym.h.
4035         (struct dwarf2_cu) <builder>: New method.
4036         (fixup_go_packaging): Update.
4037         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4038         use scoped_free_pendings.
4039         (using_directives): Add "cu" parameter, remove "language".
4040         (read_import_statement, setup_type_unit_groups, )
4041         (read_func_scope, read_lexical_block_scope)
4042         (dwarf2_record_block_ranges, read_namespace): Update.
4043         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4044         (lnp_state_machine::handle_end_sequence): Update.
4045         (class lnp_state_machine) <m_cu>: New member.
4046         <m_record_line_callback>: Remove.
4047         <m_currently_recording_lines>: New member.
4048         (lnp_state_machine::handle_set_file): Update.
4049         (noop_record_line): Remove.
4050         (dwarf_record_line_p): Add cu parameter.
4051         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4052         (lnp_state_machine::record_line)
4053         (lnp_state_machine::lnp_state_machine)
4054         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4055         (dwarf_decode_lines): Update.
4056         (dwarf2_start_subfile): Add cu parameter.
4057         (dwarf2_start_symtab, new_symbol): Update.
4058         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4059         Remove dwarf2_per_objfile parameter.
4060         (dwarf_decode_macros): Update.
4061
4062 2018-07-20  Tom Tromey  <tom@tromey.com>
4063
4064         * stabsread.c (define_symbol): Update.
4065         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4066         * dwarf2read.c (new_symbol): Update.
4067         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4068         * cp-namespace.c: Include buildsym.h.
4069         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4070         * buildsym-legacy.c (get_buildsym_compunit): New function.
4071
4072 2018-07-20  Tom Tromey  <tom@tromey.com>
4073
4074         * xcoffread.c: Include buildsym-legacy.h.
4075         * windows-nat.c: Include buildsym-legacy.h.
4076         * stabsread.c: Include buildsym-legacy.h.
4077         * mdebugread.c: Include buildsym-legacy.h.
4078         * buildsym-legacy.h: New file.
4079         * buildsym-legacy.c: New file, from buildsym.c.
4080         * go32-nat.c: Include buildsym-legacy.h.
4081         * dwarf2read.c: Include buildsym-legacy.h.
4082         * dbxread.c: Include buildsym-legacy.h.
4083         * cp-namespace.c: Include buildsym-legacy.h.
4084         * coffread.c: Include buildsym-legacy.h.
4085         * buildsym.h: Move some contents to buildsym-legacy.h.
4086         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4087         buildsym-legacy.c.
4088         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4089
4090 2018-07-20  Tom Tromey  <tom@tromey.com>
4091
4092         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4093         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4094         (buildsym_compunit::buildsym_compunit)
4095         (buildsym_compunit::~buildsym_compunit)
4096         (buildsym_compunit::get_macro_table): Define.
4097
4098 2018-07-20  Tom Tromey  <tom@tromey.com>
4099
4100         * buildsym.c (reset_symtab_globals): Remove.
4101         (buildsym_compunit::end_symtab_from_static_block): Update.
4102         (buildsym_compunit::augment_type_symtab): Update.
4103         (end_symtab_from_static_block): Call free_buildsym_compunit.
4104         (augment_type_symtab, end_symtab, end_expandable_symtab):
4105         Likewise.
4106
4107 2018-07-20  Tom Tromey  <tom@tromey.com>
4108
4109         * arch-utils.c: Do not include buildsym.h.
4110         * mipsread.c: Do not include buildsym.h.
4111         * machoread.c: Do not include buildsym.h.
4112         * elfread.c: Do not include buildsym.h.
4113
4114 2018-07-20  Tom Tromey  <tom@tromey.com>
4115
4116         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4117         initialization.
4118         (buildsym_compunit): Add new constructor.
4119         (struct buildsym_compunit) <get_last_source_file, finish_block,
4120         record_block_range, start_subfile, patch_subfile_names,
4121         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4122         set_last_source_start_addr, get_last_source_start_addr,
4123         get_local_using_directives, set_local_using_directives,
4124         get_global_using_directives, outermost_context_p,
4125         get_current_context_stack, get_context_stack_depth,
4126         get_current_subfile, get_local_symbols, get_file_symbols,
4127         get_global_symbols, record_debugformat, record_producer,
4128         push_context, pop_context, end_symtab_get_static_block,
4129         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4130         New public methods.
4131         <record_pending_block, finish_block_internal, make_blockvector,
4132         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4133         private methods.
4134         Update all users.
4135
4136 2018-05-22  Tom Tromey  <tom@tromey.com>
4137
4138         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4139         parameter.
4140         (finish_block_internal): Update.
4141
4142 2018-07-20  Tom Tromey  <tom@tromey.com>
4143
4144         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4145         parameter.
4146         (finish_block_internal): Update.
4147
4148 2018-07-20  Tom Tromey  <tom@tromey.com>
4149
4150         * buildsym.h (EXTERN): Don't define or undef.
4151         * buildsym.c (EXTERN): Don't define.
4152
4153 2018-07-20  Tom Tromey  <tom@tromey.com>
4154
4155         * buildsym.c: Remove TODO comment.
4156
4157 2018-07-20  Tom Tromey  <tom@tromey.com>
4158
4159         * coffread.c (coff_symtab_read): Update.
4160         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4161         (xcoff_new_init): Update.
4162         * mipsread.c (mipscoff_new_init): Update.
4163         * mdebugread.c (mdebug_build_psymtabs): Update.
4164         * elfread.c (elf_new_init): Update.
4165         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4166         Update.
4167         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4168         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4169         (stabsect_build_psymtabs): Update.
4170         * buildsym.h (buildsym_init): Don't declare.
4171         * buildsym.c: Update comment.
4172         (prepare_for_building): Remove.
4173         (start_symtab, restart_symtab): Update.
4174         (reset_symtab_globals): Update comment.
4175         (buildsym_init): Remove.
4176
4177 2018-07-20  Tom Tromey  <tom@tromey.com>
4178
4179         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4180         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4181         (read_enum_type, common_block_start, common_block_end)
4182         (cleanup_undefined_types_1, finish_global_stabs): Update.
4183         * mdebugread.c (psymtab_to_symtab_1): Update.
4184         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4185         (read_lexical_block_scope, new_symbol): Update.
4186         * dbxread.c (process_one_symbol): Update.
4187         * coffread.c (coff_symtab_read, process_coff_symbol)
4188         (coff_read_enum_type): Update.
4189         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4190         declare.
4191         (get_local_symbols, get_file_symbols, get_global_symbols): New
4192         functions.
4193         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4194         m_global_symbols.
4195         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4196         (~scoped_free_pendings): Update.
4197         (finish_block, prepare_for_building, reset_symtab_globals)
4198         (end_symtab_get_static_block, end_symtab_with_blockvector)
4199         (augment_type_symtab, push_context): Update.
4200         (get_local_symbols, get_file_symbols, get_global_symbols): New
4201         functions.
4202         (buildsym_init): Update.
4203
4204 2018-07-20  Tom Tromey  <tom@tromey.com>
4205
4206         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4207         (process_full_type_unit): Likewise.
4208         (dwarf2_start_symtab): Set list_in_scope.
4209
4210 2018-07-20  Tom Tromey  <tom@tromey.com>
4211
4212         * dwarf2read.c (process_psymtab_comp_unit_reader)
4213         (build_type_psymtabs_reader): Do not set list_in_scope.
4214
4215 2018-07-20  Tom Tromey  <tom@tromey.com>
4216
4217         * buildsym.c (free_pendings): Remove.
4218         (add_symbol_to_list, scoped_free_pendings)
4219         (finish_block_internal, buildsym_init): Update.
4220
4221 2018-07-20  Tom Tromey  <tom@tromey.com>
4222
4223         * xcoffread.c (read_xcoff_symtab): Update.
4224         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4225         Update.
4226         * dbxread.c (process_one_symbol): Update.
4227         * coffread.c (coff_symtab_read): Update.
4228         * buildsym.h (finish_block): Update.
4229         * buildsym.c (finish_block): Remove "listhead" argument.
4230         (end_symtab_get_static_block): Update.
4231
4232 2018-07-20  Tom Tromey  <tom@tromey.com>
4233
4234         * buildsym.h (class scoped_free_pendings): Remove constructor.
4235         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4236         method.
4237         <m_pending_block_obstack, m_pending_blocks>: New members.
4238         (pending_block_obstack, pending_blocks): Remove.
4239         (scoped_free_pendings::scoped_free_pendings): Default.
4240         (~scoped_free_pendings): Update.
4241         (free_pending_blocks): Remove.
4242         (finish_block_internal, record_pending_block, make_blockvector)
4243         (end_symtab_get_static_block, augment_type_symtab, push_context)
4244         (buildsym_init): Update.
4245
4246 2018-07-20  Tom Tromey  <tom@tromey.com>
4247
4248         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4249         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4250         members.
4251         (pending_addrmap, pending_addrmap_obstack)
4252         (pending_addrmap_interesting): Remove.
4253         (scoped_free_pendings, record_block_range, make_blockvector)
4254         (prepare_for_building, reset_symtab_globals, buildsym_init):
4255         Update.
4256
4257 2018-07-20  Tom Tromey  <tom@tromey.com>
4258
4259         * xcoffread.c (process_linenos): Update.
4260         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4261         * mdebugread.c (psymtab_to_symtab_1): Update.
4262         * dwarf2read.c (setup_type_unit_groups)
4263         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4264         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4265         * dbxread.c (process_one_symbol): Update.
4266         * coffread.c (coff_symtab_read, enter_linenos)
4267         (process_coff_symbol): Update.
4268         * buildsym.h (current_subfile): Don't declare.
4269         (get_current_subfile): Declare.
4270         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4271         member.
4272         (start_subfile, free_buildsym_compunit, push_subfile)
4273         (prepare_for_building, start_symtab): Update.
4274         (get_current_subfile): New function.
4275
4276 2018-07-20  Tom Tromey  <tom@tromey.com>
4277
4278         * coffread.c (coff_symtab_read): Update.
4279         * xcoffread.c (read_xcoff_symtab): Update.
4280         * dwarf2read.c (new_symbol): Update.
4281         (read_func_scope, read_lexical_block_scope): Update.
4282         * dbxread.c (process_one_symbol): Update.
4283         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4284         (outermost_context_p): Remove macro.
4285         (outermost_context_p, get_current_context_stack)
4286         (get_context_stack_depth): Declare.
4287         (pop_context): Return struct context_stack.
4288         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4289         member.
4290         (context_stack_size): Remove.
4291         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4292         (prepare_for_building, end_symtab_get_static_block)
4293         (augment_type_symtab, push_context): Update.
4294         (pop_context): Return struct context_stack.
4295         (outermost_context_p, get_current_context_stack)
4296         (get_context_stack_depth): New functions.
4297         (buildsym_init): Update.
4298
4299 2018-07-20  Tom Tromey  <tom@tromey.com>
4300
4301         * rust-exp.y: Now a pure parser.  Update all rules.
4302         (%union): Move earlier.
4303         (current_parser, work_obstack): Remove globals.
4304         (rust_parser, ~rust_parser): Update.
4305         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4306         lex_character, lex_number, lex_string, lex_identifier,
4307         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4308         convert_name, convert_params_to_expression,
4309         convert_ast_to_expression, ast_basic_type, ast_operation,
4310         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4311         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4312         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4313         ast_array_type, ast_slice_type, ast_reference_type,
4314         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4315         (rust_parse): Update.
4316         (rustyyerror, rustyylex): Add parser parameter.
4317         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4318         (rust_lex_stringish_test, rust_lex_test_sequence)
4319         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4320         (rust_lex_test_push_back, rust_lex_tests): Update.
4321
4322 2018-07-19  Pedro Alves  <palves@redhat.com>
4323
4324         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4325         gdb::unique_xmalloc_ptr.
4326         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4327         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4328         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4329         copy-initialization.
4330         * guile/scm-pretty-print.c (ppscm_print_children): Use
4331         gdb::unique_xmalloc_ptr instead of cleanups.
4332         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4333         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4334         gdb::unique_xmalloc_ptr.
4335         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4336         Adjust to use gdb::unique_xmalloc_ptr.
4337         * guile/scm-utils.c (extract_arg): Adjust.
4338         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4339         gdb::unique_xmalloc_ptr instead of a cleanup.
4340
4341 2018-07-19  Tom Tromey  <tom@tromey.com>
4342
4343         * utils.c (do_value_free_to_mark)
4344         (make_cleanup_value_free_to_mark): Remove.
4345         * utils.h (make_cleanup_value_free_to_mark): Remove.
4346
4347 2018-07-19  Pedro Alves  <palves@redhat.com>
4348
4349         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4350         forwarding reference.
4351
4352 2018-07-18  Pedro Alves  <palves@redhat.com>
4353
4354         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4355         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4356         cleanup.
4357
4358 2018-07-18  Pedro Alves  <palves@redhat.com>
4359
4360         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4361         exceptions.
4362         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4363         (gdbscm_wrap): New.
4364         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4365         directly instead of a cleanup.
4366         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4367         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4368         (vlscm_binop_gdbthrow): New, factored out from ...
4369         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4370         (vlscm_rich_compare): Use gdbscm_wrap.
4371         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4372         instead of a cleanup.
4373         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4374         cleanup.
4375         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4376         Use xfree directly instead of a cleanup.
4377         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4378         Adjust to use gdbscm_wrap and scoped_value_mark.
4379         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4380         (gdbscm_value_address, gdbscm_value_dereference)
4381         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4382         scoped_value_mark.
4383         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4384         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4385         scoped_value_mark.
4386         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4387         gdbscm_wrap and scoped_value_mark.
4388         (gdbscm_value_to_string): Use xfree directly instead of a
4389         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4390         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4391         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4392         scoped_value_mark.
4393         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4394         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4395         scoped_value_mark.
4396         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4397         gdbscm_wrap.
4398
4399 2018-07-18  Tom de Vries  <tdevries@suse.de>
4400
4401         * findvar.c (default_read_var_value): Also resolve dynamic type for
4402         LOC_OPTIMIZED_OUT vars.
4403
4404 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4405
4406         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4407         decoding.
4408
4409 2018-07-17  Tom Tromey  <tom@tromey.com>
4410
4411         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4412         (compute_enum_list, pascm_set_param_value_x)
4413         (gdbscm_parameter_value): Update.
4414         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4415         (gdbscm_scm_to_host_string): Update.
4416         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4417         Update.
4418         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4419         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4420         * guile/scm-string.c (gdbscm_scm_to_string): Return
4421         unique_xmalloc_ptr.
4422         (gdbscm_scm_to_host_string): Likewise.
4423
4424 2018-07-17  Tom Tromey  <tom@tromey.com>
4425
4426         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4427         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4428         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4429         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4430         unique_xmalloc_ptr.
4431
4432 2018-07-17  Tom Tromey  <tom@tromey.com>
4433
4434         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4435         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4436         Update.
4437         * guile/scm-cmd.c (cmdscm_function): Update.
4438         * guile/scm-pretty-print.c
4439         (ppscm_print_exception_unless_memory_error): Update.
4440         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4441         Return unique_xmalloc_ptr.
4442
4443 2018-07-17  Tom Tromey  <tom@tromey.com>
4444
4445         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4446         Use string_printf.
4447
4448 2018-07-17  Jim Wilson  <jimw@sifive.com>
4449
4450         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4451         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4452         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4453         unecessary braces after EF_RISCV_RVC test.  Delete call to
4454         set_gdbarch_decr_pc_after_break.
4455
4456         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4457         RISCV_LAST_FP_REGNUM + 1.
4458         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4459
4460 2018-07-17  Tom Tromey  <tom@tromey.com>
4461
4462         * configure.ac: Remove --disable-gdbcli.
4463         * configure: Rebuild.
4464         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4465         (SUBDIR_CLI_CFLAGS): Remove.
4466         (SFILES): Use SUBDIR_CLI_SRCS.
4467         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4468
4469 2018-07-17  Tom Tromey  <tom@tromey.com>
4470
4471         PR gdb/18624:
4472         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4473
4474 2018-07-16  Jim Wilson  <jimw@sifive.com>
4475
4476         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4477
4478 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4479
4480         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4481         variable.
4482         (libunwind_frame_sniffer): Likewise.
4483         (libunwind_frame_prev_register): Likewise.
4484         (libunwind_sigtramp_frame_sniffer): Likewise.
4485         * ia64-tdep.c (ia64_access_reg): Likewise.
4486         (ia64_access_rse_reg): Likewise.
4487         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4488         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4489
4490 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4491
4492         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4493
4494 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4495
4496         * remote-sim.c (gdbsim_target::close,
4497         gdbsim_target::mourn_inferior): Remove unused variables.
4498
4499 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4500
4501         * ia64-tdep.c (ktab_buf): New global.
4502         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4503         (get_kernel_table): Adjust.
4504
4505 2018-07-16  Tom Tromey  <tom@tromey.com>
4506
4507         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4508         * dwarf2read.c (using_directives, new_symbol): Use
4509         outermost_context_p.
4510         * dbxread.c (process_one_symbol): Use outermost_context_p.
4511         * coffread.c (coff_symtab_read): Use outermost_context_p.
4512
4513 2018-07-16  Tom Tromey  <tom@tromey.com>
4514
4515         * dwarf2read.c (using_directives, read_func_scope)
4516         (read_lexical_block_scope): Update.
4517         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4518         * buildsym.h (local_using_directives, global_using_directives):
4519         Don't declare.
4520         (get_local_using_directives, set_local_using_directives)
4521         (get_global_using_directives): Declare.
4522         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4523         m_global_using_directives>: New members.
4524         (finish_block_internal, prepare_for_building)
4525         (reset_symtab_globals, end_symtab_get_static_block)
4526         (push_context): Update.
4527         (get_local_using_directives, set_local_using_directives)
4528         (get_global_using_directives): New functions.
4529         (buildsym_init): Update.
4530
4531 2018-07-16  Tom Tromey  <tom@tromey.com>
4532
4533         * xcoffread.c (xcoff_initial_scan): Don't call
4534         free_pending_blocks.
4535         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4536         * buildsym.h (class scoped_free_pendings): Add constructor.
4537         (free_pending_blocks): Don't declare.
4538         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4539         (free_pending_blocks): Now static.
4540
4541 2018-07-16  Tom Tromey  <tom@tromey.com>
4542
4543         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4544         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4545         member.
4546         (struct subfile_stack): Remove.
4547         (subfile_stack): Remove.
4548         (push_subfile, pop_subfile, buildsym_init): Update.
4549
4550 2018-07-16  Tom Tromey  <tom@tromey.com>
4551
4552         * buildsym.c (push_subfile): Use gdb_assert.
4553         (pop_subfile): Use gdb_assert.
4554
4555 2018-07-16  Tom Tromey  <tom@tromey.com>
4556
4557         * buildsym.h (merge_symbol_lists): Remove.
4558         * buildsym.c (merge_symbol_lists): Remove.
4559
4560 2018-07-16  Tom Tromey  <tom@tromey.com>
4561
4562         * stabsread.c (scan_file_globals): Update comment.
4563         * stabsread.h (scan_file_globals): Move from buildsym.h.
4564         * buildsym.h (scan_file_globals): Move to stabsread.h.
4565
4566 2018-07-16  Tom Tromey  <tom@tromey.com>
4567
4568         * xcoffread.c (xcoff_new_init): Update.
4569         * mipsread.c (mipscoff_new_init): Update.
4570         * mdebugread.c (mdebug_build_psymtabs): Update.
4571         * elfread.c (elf_new_init): Update.
4572         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4573         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4574         * buildsym.h (buildsym_new_init): Don't declare.
4575         * buildsym.c (buildsym_new_init): Remove.
4576
4577 2018-07-16  Tom Tromey  <tom@tromey.com>
4578
4579         * stabsread.h (within_function): Move from buildsym.h.
4580         * stabsread.c (start_stabs): Clear within_function.
4581         * coffread.c (coff_start_symtab): Clear within_function.
4582         * buildsym.h (within_function): Move to stabsread.h.
4583         * buildsym.c (prepare_for_building): Update.
4584
4585 2018-07-16  Tom Tromey  <tom@tromey.com>
4586
4587         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4588         * dwarf2read.c (dwarf2_start_symtab): Don't set
4589         processing_gcc_compilation.
4590         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4591
4592 2018-07-16  Tom Tromey  <tom@tromey.com>
4593
4594         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4595         (next_symbol_text_func): Move from buildsym.h.
4596         * stabsread.c (hashname): Move from buildsym.c.
4597         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4598         (next_symbol_text_func, hashname): Move to stabsread.h.
4599         * buildsym.c: Don't include bcache.h
4600         (hashname): Move to stasbread.c.
4601
4602 2018-07-16  Tom Tromey  <tom@tromey.com>
4603
4604         * buildsym.h (context_stack_size): Don't declare.
4605         * buildsym.c (context_stack_size): New global.
4606
4607 2018-07-16  Tom Tromey  <tom@tromey.com>
4608
4609         * dbxread.c (processing_acc_compilation): New global.
4610         * buildsym.h (processing_acc_compilation): Don't declare.
4611
4612 2018-07-16  Tom Tromey  <tom@tromey.com>
4613
4614         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4615         * dbxread.c (read_ofile_symtab): Update.
4616         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4617         * buildsym.h (last_source_start_addr): Remove.
4618         (set_last_source_start_addr, get_last_source_start_addr):
4619         Declare.
4620         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4621         parameter.
4622         (struct buildsym_compunit) <m_last_source_start_addr>: New
4623         member.
4624         (prepare_for_building): Remove start_addr parameter.
4625         (start_symtab, restart_symtab, end_symtab_get_static_block)
4626         (end_symtab_with_blockvector): Update.
4627         (set_last_source_start_addr, get_last_source_start_addr): New
4628         functions.
4629
4630 2018-07-16  Tom Tromey  <tom@tromey.com>
4631
4632         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4633         member.
4634         (have_line_numbers): Remove.
4635         (record_line, prepare_for_building, end_symtab_get_static_block)
4636         (augment_type_symtab): Update.
4637
4638 2018-07-16  Tom Tromey  <tom@tromey.com>
4639
4640         * buildsym.c (~buildsym_compunit): Free the macro table.
4641         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4642         methods.
4643         <m_pending_macros>: New member.
4644         (pending_macros): Remove.
4645         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4646         (reset_symtab_globals, end_symtab_get_static_block)
4647         (end_symtab_with_blockvector, augment_type_symtab)
4648         (buildsym_init): Update.
4649
4650 2018-07-16  Tom Tromey  <tom@tromey.com>
4651
4652         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4653         parameter.
4654         (buildsym_compunit::set_last_source_file): New method.
4655         <m_last_source_file>: New member.
4656         (prepare_for_building): Remove "name" parameter.
4657         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4658         (last_source_file): Remove.
4659         (set_last_source_file, get_last_source_file): Update.
4660
4661 2018-07-16  Tom Tromey  <tom@tromey.com>
4662
4663         * buildsym.c (prepare_for_building): Add assert.
4664
4665 2018-07-16  Tom Tromey  <tom@tromey.com>
4666
4667         * buildsym.c (~buildsym_compunit): Update.
4668         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4669         (start_subfile, patch_subfile_names)
4670         (end_symtab_with_blockvector): Update.
4671
4672 2018-07-16  Tom Tromey  <tom@tromey.com>
4673
4674         * buildsym.c (struct buildsym_compunit): Add constructor,
4675         destructor, initializers.
4676         (start_buildsym_compunit): Remove.
4677         (free_buildsym_compunit): Use "delete".
4678         (start_symtab, restart_symtab): Use "new".
4679
4680 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4681
4682         * symfile.c (set_objfile_default_section_offset): Remove struct
4683         keyword.
4684
4685 2018-07-14  Stafford Horne  <shorne@gmail.com>
4686
4687         * (Responsible Maintainers): Add myself as or1k maintainer.
4688
4689 2018-07-13  Tom Tromey  <tom@tromey.com>
4690
4691         * symfile.c (set_objfile_default_section_offset): Use extra braces
4692         around initializer.
4693
4694 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4695
4696         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4697         non-branching basr.
4698
4699 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4700
4701         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4702         unittests/cli-utils-selftests.c
4703         * unittests/cli-utils-selftests.c: New file.
4704
4705 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4706
4707         * NEWS: Mention new commands. Mention change to 'thread apply'.
4708
4709 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4710
4711         * thread.c (thr_try_catch_cmd): New function.
4712         (thread_apply_all_command): Handle qcs flags.
4713         (thread_apply_command): Handle qcs flags.
4714         (taas_command): New function.
4715         (tfaas_command): New function.
4716         (_initialize_thread): Update to setup the new commands 'taas
4717         and 'tfaas'. Change doc string for 'thread apply'.
4718
4719 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4720
4721         * stack.c: (trailing_outermost_frame): New function, mostly
4722         extracted from backtrace_command_1.
4723         (leading_innermost_frame): New function.
4724         (backtrace_command_1): Update to call trailing_outermost_frame.
4725         (frame_apply_command_count): New function.
4726         (frame_apply_level_command): New function.
4727         (frame_apply_all_command): New function.
4728         (frame_apply_command): New function.
4729         (faas_command): New function.
4730         (frame_cmd_list): New variable.
4731         (_initialize_stack): Update to setup the new commands 'frame apply'
4732         and 'faas'.
4733
4734 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4735
4736         * cli-utils.c (number_or_range_parser::get_number): Only handle
4737         numbers or convenience var as numbers.
4738         (parse_flags): New function.
4739         (parse_flags_qcs): New function.
4740         (number_or_range_parser::finished): Ensure parsing end is detected
4741         before end of string.
4742         * cli-utils.h (parse_flags): New function.
4743         (parse_flags_qcs): New function.
4744         (number_or_range_parser): Remove m_finished bool.
4745         (number_or_range_parser::skip_range): Set m_in_range to false.
4746
4747 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4748
4749         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4750         on Windows.
4751
4752 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4753             Jan Kratochvil  <jan.kratochvil@redhat.com>
4754             Paul Fertser  <fercerpav@gmail.com>
4755             Tsutomu Seki  <sekiriki@gmail.com>
4756             Pedro Alves  <palves@redhat.com>
4757
4758         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4759         'unittests/parse-connection-spec-selftests.c'.
4760         (COMMON_SFILES): Add 'common/netstuff.c'.
4761         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4762         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4763         * common/netstuff.c: New file.
4764         * common/netstuff.h: New file.
4765         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4766         (wait_for_connect): Update comment.  New parameter
4767         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4768         Use 'sock' directly instead of 'scb->fd'.
4769         (try_connect): New function, with code from 'net_open'.
4770         (net_open): Rewrite main loop to deal with multiple
4771         sockets/addresses.  Handle IPv6-style hostnames; implement
4772         support for IPv6 connections.
4773         * unittests/parse-connection-spec-selftests.c: New file.
4774
4775 2018-07-11  Pedro Alves  <palves@redhat.com>
4776
4777         PR gdb/23377
4778         * remote.c (remote_target::remote_detach_pid): Call
4779         set_current_process.
4780
4781 2018-07-11  Pedro Alves  <palves@redhat.com>
4782
4783         * h8300-tdep.c (h8300_gdbarch_init): Remove
4784         set_gdbarch_ecoff_reg_to_regnum calls.
4785
4786 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4787
4788         PR c++/23373
4789         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4790         offsets/sizes for static members of a class/struct.
4791
4792 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4793
4794         * target-descriptions.c (tdesc_register_bitsize): Rename.
4795         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4796         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4797         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4798
4799 2018-07-10  Tom Tromey  <tom@tromey.com>
4800
4801         * breakpoint.c (moribund_locations): Now static and a
4802         std::vector.
4803         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4804         (build_bpstat_chain, update_global_location_list)
4805         (breakpoint_retire_moribund): Update.
4806         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4807         VEC.
4808
4809 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4810
4811         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4812         (riscv_register_reggroup_p): Use new function, remove unneeded
4813         parenthesis.
4814         (riscv_push_dummy_call): Extend assert to compare against xlen or
4815         flen based on register type.
4816
4817 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4818
4819         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4820
4821 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4822
4823         * remote.c (show_hardware_watchpoint_limit): New function.
4824         (show_hardware_watchpoint_length_limit): New function.
4825         (show_hardware_breakpoint_limit): New function.
4826         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4827         where appropriate, update help text.
4828
4829 2018-07-09  Tom Tromey  <tom@tromey.com>
4830
4831         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4832         (CLIBS): Don't mention NAT_CLIBS.
4833
4834 2018-07-09  Tom Tromey  <tom@tromey.com>
4835
4836         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4837         (LIBGDB_OBS, clean mostlyclean): Update.
4838         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4839
4840 2018-07-09  Tom Tromey  <tom@tromey.com>
4841
4842         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4843         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4844         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4845
4846 2018-07-09  Tom Tromey  <tom@tromey.com>
4847
4848         * Makefile.in (ALLDEPFILES): Remove exec.c.
4849         (COMMON_OBS): Remove exec.o.
4850         (COMMON_SFILES): Add exec.c.
4851
4852 2018-07-09  Tom Tromey  <tom@tromey.com>
4853
4854         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4855
4856 2018-07-09  Tom Tromey  <tom@tromey.com>
4857
4858         * Makefile.in (clean mostlyclean): Remove stamp-version.
4859         (version.c): Depend on stamp-version.
4860         (stamp-version): New rule, from version.c rule.
4861
4862 2018-07-09  Tom Tromey  <tom@tromey.com>
4863
4864         * Makefile.in (init.c): Depend on stamp-init.
4865         (stamp-init): New rule, from init.c rule.
4866         (clean mostlyclean): Remove stamp-init.
4867
4868 2018-07-09  Tom Tromey  <tom@tromey.com>
4869
4870         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4871         SUBDIR_GCC_COMPILE_SRCS.
4872
4873 2018-07-09  Tom Tromey  <tom@tromey.com>
4874
4875         * Makefile.in (init.c): Remove some unused sed rules.
4876
4877 2018-07-09  Tom Tromey  <tom@tromey.com>
4878
4879         * Makefile.in (TSOBS): Remove.
4880         (INIT_FILES): Update.
4881         (LIBGDB_OBS): Update.
4882         (COMMON_SFILES): Add inflow.c.
4883         (SFILES): Remove inflow.c.
4884
4885 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4886
4887         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4888
4889 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4890
4891         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4892         get_saveloc_name, is_signal_frame_name, step_name,
4893         init_remote_name, create_addr_space_name,
4894         destroy_addr_space_name, search_unwind_table_name,
4895         find_dyn_list_name): Constify.
4896
4897 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4898
4899         * darwin-nat.c (darwin_pthread_kill): New function.
4900         (darwin_resume_thread): Use darwin_pthread_kill.
4901
4902 2018-07-05  Tom de Vries  <tdevries@suse.de>
4903
4904         * macroexp.c (macro_buffer) <operator=>: New member function.
4905
4906 2018-07-04  Tom Tromey  <tom@tromey.com>
4907
4908         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4909
4910 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4911
4912         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4913         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4914         * maint.c: Likewise.
4915         * top.c: Likewise.
4916
4917 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4918
4919         * NEWS: Create a new section for the next release branch.
4920         Rename the section of the current branch, now that it has
4921         been cut.
4922
4923 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4924
4925         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4926         * version.in: Bump version to 8.2.50.DATE-git.
4927
4928 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4929             Pedro Alves  <palves@redhat.com>
4930
4931         * linux-nat.c (linux_init_ptrace): Rename to ...
4932         (linux_init_ptrace_procfs): ... this.  Call
4933         linux_proc_init_warnings.
4934         (linux_nat_target::post_attach)
4935         (linux_nat_target::post_startup_inferior): Adjust.
4936         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4937         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4938
4939 2018-07-04  Tom de Vries  <tdevries@suse.de>
4940
4941         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4942         check ...
4943         (read_comp_unit_head): ... here.
4944
4945 2018-07-03  Tom Tromey  <tom@tromey.com>
4946
4947         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4948         (stop_tracing, tstatus_command)
4949         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4950         (print_one_static_tracepoint_marker): Update.
4951         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4952         std::vector.
4953         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4954         VEC.
4955         (all_tracepoints, static_tracepoints_here): Return std::vector.
4956
4957 2018-07-03  Tom Tromey  <tom@tromey.com>
4958
4959         * common/ptid.c (ptid_equal): Remove.
4960         * common/ptid.h (ptid_equal): Don't declare.
4961         * ada-tasks.c: Update.
4962         * breakpoint.c: Update.
4963         * common/agent.c: Update.
4964         * corelow.c: Update.
4965         * darwin-nat-info.c: Update.
4966         * darwin-nat.c: Update.
4967         * dcache.c: Update.
4968         * dtrace-probe.c: Update.
4969         * dummy-frame.c: Update.
4970         * fbsd-nat.c: Update.
4971         * frame.c: Update.
4972         * gdbthread.h: Update.
4973         * gnu-nat.c: Update.
4974         * go32-nat.c: Update.
4975         * inf-loop.c: Update.
4976         * inf-ptrace.c: Update.
4977         * infcall.c: Update.
4978         * infcmd.c: Update.
4979         * inflow.c: Update.
4980         * infrun.c: Update.
4981         * linux-fork.c: Update.
4982         * linux-nat.c: Update.
4983         * linux-thread-db.c: Update.
4984         * mi/mi-cmd-var.c: Update.
4985         * mi/mi-interp.c: Update.
4986         * mi/mi-main.c: Update.
4987         * nto-procfs.c: Update.
4988         * ppc-linux-tdep.c: Update.
4989         * procfs.c: Update.
4990         * python/py-inferior.c: Update.
4991         * python/py-record-btrace.c: Update.
4992         * python/py-record.c: Update.
4993         * ravenscar-thread.c: Update.
4994         * regcache.c: Update.
4995         * remote-sim.c: Update.
4996         * remote.c: Update.
4997         * sol-thread.c: Update.
4998         * solib.c: Update.
4999         * target.c: Update.
5000         * tui/tui-stack.c: Update.
5001         * varobj.c: Update.
5002         * windows-nat.c: Update.
5003         * windows-tdep.c: Update.
5004
5005 2018-07-03  Tom Tromey  <tom@tromey.com>
5006
5007         * common/ptid.c (ptid_match): Remove.
5008         * common/ptid.h (ptid_match): Don't declare.
5009         * fbsd-nat.c: Update.
5010         * infcmd.c: Update.
5011         * infrun.c: Update.
5012         * linux-nat.c: Update.
5013         * record-btrace.c: Update.
5014         * regcache.c: Update.
5015         * remote.c: Update.
5016
5017 2018-07-03  Tom Tromey  <tom@tromey.com>
5018
5019         * common/ptid.c (ptid_tid_p): Remove.
5020         * common/ptid.h (ptid_tid_p): Don't declare.
5021         * sol-thread.c: Update.
5022
5023 2018-07-03  Tom Tromey  <tom@tromey.com>
5024
5025         * common/ptid.c (ptid_lwp_p): Remove.
5026         * common/ptid.h (ptid_lwp_p): Don't declare.
5027         * fbsd-nat.c: Update.
5028         * linux-nat.c: Update.
5029         * nat/linux-procfs.c: Update.
5030         * nat/x86-linux-dregs.c: Update.
5031         * sol-thread.c: Update.
5032
5033 2018-07-03  Tom Tromey  <tom@tromey.com>
5034
5035         * common/ptid.c (ptid_is_pid): Remove.
5036         * common/ptid.h (ptid_is_pid): Don't declare.
5037         * infrun.c: Update.
5038         * linux-nat.c: Update.
5039         * mi/mi-interp.c: Update.
5040         * remote.c: Update.
5041         * thread.c: Update.
5042
5043 2018-07-03  Tom Tromey  <tom@tromey.com>
5044
5045         * common/ptid.c (ptid_get_tid): Remove.
5046         * common/ptid.h (ptid_get_tid): Don't declare.
5047         * ada-tasks.c: Update.
5048         * aix-thread.c: Update.
5049         * bsd-uthread.c: Update.
5050         * darwin-nat.c: Update.
5051         * fbsd-nat.c: Update.
5052         * i386-darwin-nat.c: Update.
5053         * infrun.c: Update.
5054         * linux-tdep.c: Update.
5055         * nto-procfs.c: Update.
5056         * ppc-ravenscar-thread.c: Update.
5057         * python/py-infthread.c: Update.
5058         * ravenscar-thread.c: Update.
5059         * sol-thread.c: Update.
5060         * sparc-ravenscar-thread.c: Update.
5061         * windows-nat.c: Update.
5062
5063 2018-07-03  Tom Tromey  <tom@tromey.com>
5064
5065         * common/ptid.c (ptid_get_lwp): Remove.
5066         * common/ptid.h (ptid_get_lwp): Don't declare.
5067         * aarch64-linux-nat.c: Update.
5068         * ada-tasks.c: Update.
5069         * aix-thread.c: Update.
5070         * amd64-linux-nat.c: Update.
5071         * arm-linux-nat.c: Update.
5072         * corelow.c: Update.
5073         * fbsd-nat.c: Update.
5074         * fbsd-tdep.c: Update.
5075         * gnu-nat.c: Update.
5076         * i386-cygwin-tdep.c: Update.
5077         * i386-gnu-nat.c: Update.
5078         * i386-linux-nat.c: Update.
5079         * ia64-linux-nat.c: Update.
5080         * inf-ptrace.c: Update.
5081         * infrun.c: Update.
5082         * linux-fork.c: Update.
5083         * linux-nat.c: Update.
5084         * linux-tdep.c: Update.
5085         * linux-thread-db.c: Update.
5086         * mips-linux-nat.c: Update.
5087         * nat/aarch64-linux-hw-point.c: Update.
5088         * nat/aarch64-linux.c: Update.
5089         * nat/linux-btrace.c: Update.
5090         * nat/linux-osdata.c: Update.
5091         * nat/linux-procfs.c: Update.
5092         * nat/x86-linux-dregs.c: Update.
5093         * obsd-nat.c: Update.
5094         * ppc-fbsd-nat.c: Update.
5095         * ppc-linux-nat.c: Update.
5096         * procfs.c: Update.
5097         * python/py-infthread.c: Update.
5098         * ravenscar-thread.c: Update.
5099         * remote.c: Update.
5100         * s390-linux-nat.c: Update.
5101         * sol-thread.c: Update.
5102         * sol2-tdep.c: Update.
5103         * spu-linux-nat.c: Update.
5104         * x86-linux-nat.c: Update.
5105         * xtensa-linux-nat.c: Update.
5106
5107 2018-07-03  Tom Tromey  <tom@tromey.com>
5108
5109         * common/ptid.c (ptid_get_pid): Remove.
5110         * common/ptid.h (ptid_get_pid): Don't declare.
5111         * aarch64-linux-nat.c: Update.
5112         * ada-lang.c: Update.
5113         * aix-thread.c: Update.
5114         * alpha-bsd-nat.c: Update.
5115         * amd64-fbsd-nat.c: Update.
5116         * amd64-linux-nat.c: Update.
5117         * arm-linux-nat.c: Update.
5118         * arm-nbsd-nat.c: Update.
5119         * auxv.c: Update.
5120         * break-catch-syscall.c: Update.
5121         * breakpoint.c: Update.
5122         * bsd-uthread.c: Update.
5123         * corelow.c: Update.
5124         * ctf.c: Update.
5125         * darwin-nat.c: Update.
5126         * fbsd-nat.c: Update.
5127         * fbsd-tdep.c: Update.
5128         * gcore.c: Update.
5129         * gnu-nat.c: Update.
5130         * hppa-nbsd-nat.c: Update.
5131         * hppa-obsd-nat.c: Update.
5132         * i386-fbsd-nat.c: Update.
5133         * ia64-linux-nat.c: Update.
5134         * inf-ptrace.c: Update.
5135         * infcmd.c: Update.
5136         * inferior.c: Update.
5137         * inferior.h: Update.
5138         * inflow.c: Update.
5139         * infrun.c: Update.
5140         * linux-fork.c: Update.
5141         * linux-nat.c: Update.
5142         * linux-tdep.c: Update.
5143         * linux-thread-db.c: Update.
5144         * m68k-bsd-nat.c: Update.
5145         * mi/mi-interp.c: Update.
5146         * mi/mi-main.c: Update.
5147         * mips-linux-nat.c: Update.
5148         * mips-nbsd-nat.c: Update.
5149         * mips64-obsd-nat.c: Update.
5150         * nat/aarch64-linux-hw-point.c: Update.
5151         * nat/aarch64-linux.c: Update.
5152         * nat/linux-btrace.c: Update.
5153         * nat/linux-osdata.c: Update.
5154         * nat/linux-procfs.c: Update.
5155         * nat/x86-linux-dregs.c: Update.
5156         * nto-procfs.c: Update.
5157         * obsd-nat.c: Update.
5158         * ppc-linux-nat.c: Update.
5159         * ppc-nbsd-nat.c: Update.
5160         * ppc-obsd-nat.c: Update.
5161         * proc-service.c: Update.
5162         * procfs.c: Update.
5163         * python/py-inferior.c: Update.
5164         * python/py-infthread.c: Update.
5165         * ravenscar-thread.c: Update.
5166         * record.c: Update.
5167         * remote-sim.c: Update.
5168         * remote.c: Update.
5169         * rs6000-nat.c: Update.
5170         * s390-linux-nat.c: Update.
5171         * sh-nbsd-nat.c: Update.
5172         * sol-thread.c: Update.
5173         * sparc-nat.c: Update.
5174         * sparc64-tdep.c: Update.
5175         * spu-linux-nat.c: Update.
5176         * spu-tdep.c: Update.
5177         * target-debug.h: Update.
5178         * target.c: Update.
5179         * thread.c: Update.
5180         * tid-parse.c: Update.
5181         * tracefile-tfile.c: Update.
5182         * vax-bsd-nat.c: Update.
5183         * windows-nat.c: Update.
5184         * x86-linux-nat.c: Update.
5185         * x86-nat.c: Update.
5186
5187 2018-07-03  Tom Tromey  <tom@tromey.com>
5188
5189         * common/ptid.c (pid_to_ptid): Remove.
5190         * common/ptid.h (pid_to_ptid): Don't declare.
5191         * aix-thread.c: Update.
5192         * arm-linux-nat.c: Update.
5193         * common/ptid.c: Update.
5194         * common/ptid.h: Update.
5195         * corelow.c: Update.
5196         * ctf.c: Update.
5197         * darwin-nat.c: Update.
5198         * fbsd-nat.c: Update.
5199         * fork-child.c: Update.
5200         * gnu-nat.c: Update.
5201         * go32-nat.c: Update.
5202         * inf-ptrace.c: Update.
5203         * infcmd.c: Update.
5204         * inferior.c: Update.
5205         * infrun.c: Update.
5206         * linux-fork.c: Update.
5207         * linux-nat.c: Update.
5208         * nat/aarch64-linux-hw-point.c: Update.
5209         * nat/fork-inferior.c: Update.
5210         * nat/x86-linux-dregs.c: Update.
5211         * nto-procfs.c: Update.
5212         * obsd-nat.c: Update.
5213         * procfs.c: Update.
5214         * progspace.c: Update.
5215         * remote.c: Update.
5216         * rs6000-nat.c: Update.
5217         * s390-linux-nat.c: Update.
5218         * sol-thread.c: Update.
5219         * spu-linux-nat.c: Update.
5220         * target.c: Update.
5221         * top.c: Update.
5222         * tracefile-tfile.c: Update.
5223         * windows-nat.c: Update.
5224
5225 2018-07-03  Tom Tromey  <tom@tromey.com>
5226
5227         * common/ptid.h (ptid_build): Don't declare.
5228         * common/ptid.c (ptid_build): Remove.
5229         * aix-thread.c: Update.
5230         * bsd-kvm.c: Update.
5231         * bsd-uthread.c: Update.
5232         * common/agent.c: Update.
5233         * common/ptid.c: Update.
5234         * common/ptid.h: Update.
5235         * corelow.c: Update.
5236         * darwin-nat.c: Update.
5237         * fbsd-nat.c: Update.
5238         * gnu-nat.c: Update.
5239         * linux-fork.c: Update.
5240         * linux-nat.c: Update.
5241         * linux-thread-db.c: Update.
5242         * nat/linux-osdata.c: Update.
5243         * nat/linux-procfs.c: Update.
5244         * nto-procfs.c: Update.
5245         * obsd-nat.c: Update.
5246         * proc-service.c: Update.
5247         * procfs.c: Update.
5248         * ravenscar-thread.c: Update.
5249         * remote-sim.c: Update.
5250         * remote.c: Update.
5251         * sol-thread.c: Update.
5252         * target.c: Update.
5253         * windows-nat.c: Update.
5254
5255 2018-07-03  Tom Tromey  <tom@tromey.com>
5256
5257         * infrun.c (follow_exec): Use exit_inferior_silent.
5258         * inferior.c (exit_inferior_num_silent): Remove.
5259         * inferior.h (exit_inferior_num_silent): Don't declare.
5260
5261 2018-07-03  Tom Tromey  <tom@tromey.com>
5262
5263         PR cli/23340:
5264         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5265         inferior_ptid on error.
5266
5267 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5268             Simon Marchi  <simon.marchi@polymtl.ca>
5269
5270         PR tdep/8282
5271         * disasm.h (gdb_disassembler): Add
5272         `m_disassembler_options_holder'. member
5273         * disasm.c (get_all_disassembler_options): New function.
5274         (gdb_disassembler::gdb_disassembler): Use it.
5275         (gdb_buffered_insn_length_init_dis): Likewise.
5276         (gdb_buffered_insn_length): Adjust accordingly.
5277         (set_disassembler_options): Handle options with arguments.
5278         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5279         line if showing options with descriptions.
5280         (disassembler_options_completer): Adapt to using the
5281         `disasm_options_and_args_t' structure.
5282         * mips-tdep.c (mips_disassembler_options): New variable.
5283         (mips_disassembler_options_o32): Likewise.
5284         (mips_disassembler_options_n32): Likewise.
5285         (mips_disassembler_options_n64): Likewise.
5286         (gdb_print_insn_mips): Don't set `disassembler_options'.
5287         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5288         functions.
5289         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5290         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5291         `gdbarch_disassembler_options_implicit' and
5292         `gdbarch_valid_disassembler_options'.
5293         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5294         `disasm_options_and_args_t' structure.
5295         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5296         method.
5297         (valid_disassembler_options): Switch from `disasm_options_t' to
5298         the `disasm_options_and_args_t' structure.
5299         * NEWS: Document `set disassembler-options' support for the MIPS
5300         target.
5301         * gdbarch.h: Regenerate.
5302         * gdbarch.c: Regenerate.
5303
5304 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5305
5306         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5307
5308 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5309
5310         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5311         parameter in call to amd64_target_description.
5312         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5313         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5314         (amd64fbsd_init_abi): Likewise.
5315         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5316         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5317         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5318         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5319
5320 2018-06-29  Pedro Alves  <palves@redhat.com>
5321
5322         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5323         "segments" parameter.
5324         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5325         (_initialize_amd64_tdep): Update call to
5326         amd64_create_target_description.
5327         (amd64_target_description): Add "segments" parameter.  Adjust
5328         the implementation to use it.
5329         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5330         call to amd64_create_target_description.
5331         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5332         * gdb/arch/amd64.h (amd64_create_target_description): Add
5333         "segments" register.
5334         * gdb/arch/amd64.c (amd64_create_target_description): Add
5335         "segments" parameter.  Call create_feature_i386_64bit_segments
5336         only if SEGMENTS is true.
5337         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5338         call to amd64_create_target_description.
5339
5340 2018-06-29  Pedro Alves  <palves@redhat.com>
5341
5342         * thread.c (thread_target_id_str): New, factored out from ...
5343         (print_thread_info_1): ... here.  Use it to compute the max
5344         "Target Id" column width.
5345
5346 2018-06-29  Pedro Alves  <palves@redhat.com>
5347
5348         * remote.c (remote_target::extra_thread_info): Delete
5349         'display_buf' and 'n' locals.  from the cache, regardless of
5350         packet mechanims is in use.  Use cache for qThreadExtra and qP
5351         methods too.
5352
5353 2018-06-29  Pedro Alves  <palves@redhat.com>
5354
5355         * blockframe.c (find_pc_sect_containing_function): New function.
5356         * breakpoint.c (print_breakpoint_location): Don't call
5357         find_pc_sect_function.
5358         * linespec.c (create_sals_line_offset): Record the location's
5359         symbol in the sal.
5360         * linespec.c (convert_address_location_to_sals): Fill in sal's
5361         symbol with find_pc_sect_containing_function.
5362         * symtab.c (find_function_start_sal): Rename to ...
5363         (find_function_start_sal_1): ... this.
5364         (find_function_start_sal): Reimplement as wrapper around
5365         find_function_start_sal_1, and use
5366         find_pc_sect_containing_function to fill in the sal's symbol.
5367         (find_function_start_sal(symbol*, bool)): Adjust.
5368         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5369         comments.
5370         (find_pc_sect_containing_function): Declare.
5371
5372 2018-06-29  Pedro Alves  <palves@redhat.com>
5373
5374         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5375         true if the the location has no symbol.
5376
5377 2018-06-28  Tom Tromey  <tom@tromey.com>
5378
5379         * NEWS: Mention --enable-codesign.
5380         * silent-rules.mk (ECHO_SIGN): New variable.
5381         * configure.ac: Add --enable-codesign.
5382         * configure: Rebuild.
5383         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5384         (gdb$(EXEEXT)): Optionally invoke codesign.
5385
5386 2018-06-28  Pedro Alves  <palves@redhat.com>
5387
5388         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5389         comments.
5390         (switch_to_thread_no_regs): Adjust comment.
5391         * infcmd.c (stop_pc): Delete.
5392         (post_create_inferior, info_program_command): Replace references
5393         to stop_pc with references to thread_info->suspend.stop_pc.
5394         * inferior.h (stop_pc): Delete declaration.
5395         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5396         (handle_inferior_event_1, handle_signal_stop)
5397         (process_event_stop_test, keep_going_stepped_thread)
5398         (handle_step_into_function, handle_step_into_function_backward)
5399         (print_stop_location): Replace references to stop_pc with
5400         references to thread_info->suspend.stop_pc.
5401         (struct infcall_suspend_state) <stop_pc>: Delete field.
5402         (save_infcall_suspend_state, restore_infcall_suspend_state):
5403         Remove references to inf_stat->stop_pc.
5404         * linux-fork.c (fork_load_infrun_state): Likewise.
5405         * record-btrace.c (record_btrace_set_replay): Likewise.
5406         * record-full.c (record_full_goto_entry): Likewise.
5407         * remote.c (print_one_stopped_thread): Likewise.
5408         * target.c (target_resume): Extend comment.
5409         * thread.c (set_executing_thread): New.
5410         (set_executing): Use it.
5411         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5412         Remove references to stop_pc.
5413
5414 2018-06-28  Pedro Alves  <palves@redhat.com>
5415
5416         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5417         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5418
5419 2018-06-28  Tom Tromey  <tom@tromey.com>
5420
5421         * coffread.c (coff_symfile_finish): Update.
5422         * xcoffread.c (xcoff_symfile_finish): Update.
5423         * elfread.c (elf_symfile_finish): Update.
5424         * symfile.h (dwarf2_free_objfile): Don't declare.
5425         * dwarf2read.c (_initialize_dwarf2_read): Use
5426         register_objfile_data_with_cleanup.
5427         (dwarf2_free_objfile): Now static.  Change signature.
5428
5429 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5430
5431         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5432         option "-o" to add-symbol-file-load to add an offset to each
5433         section's load address.
5434         * symfile.c (set_objfile_default_section_offset): New function.
5435
5436 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5437
5438         * symfile.c (add_symbol_file_command): Make sure that sections
5439         with the same name are sorted in the same order.
5440
5441 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5442
5443         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5444         require the second argument.  If omitted, load sections at the
5445         addresses specified in the file.
5446
5447 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5448
5449         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5450         (_initialize_symfile): Add option "-o" to symbol-file to add an
5451         offset to each section of the symbol file.
5452
5453 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5454
5455         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5456
5457 2018-06-27  Tom Tromey  <tom@tromey.com>
5458
5459         * stack.c (_initialize_stack): Update "func" help text.
5460
5461 2018-06-27  Tom Tromey  <tom@tromey.com>
5462
5463         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5464         std::vector.
5465         (unwind_infopy_str, pyuw_create_unwind_info)
5466         (unwind_infopy_add_saved_register, pyuw_sniffer)
5467         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5468         Update.
5469         (struct saved_reg): Add constructor.
5470         <value>: Now a gdbpy_ref<>.
5471
5472 2018-06-27  Tom Tromey  <tom@tromey.com>
5473
5474         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5475
5476 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5477
5478         * gdb-gdb.py.in: Format using autopep8.
5479
5480 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5481
5482         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5483         (type_lookup_function): Recognize CORE_ADDR values.
5484
5485 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5486
5487         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5488         print tag_name.
5489
5490 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5491
5492         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5493         <__lt__>: Add.
5494
5495 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5496
5497         * gdb-gdb.py: Move to...
5498         * gdb-gdb.py.in: ... here.
5499         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5500         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5501         dependencies.
5502         (distclean): Remove gdb-gdb.py when cleaning.
5503         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5504         * configure: Re-generate.
5505
5506 2018-06-27  Pedro Alves  <palves@redhat.com>
5507
5508         * proc-service.c (get_ps_regcache): New.
5509         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5510         (ps_lsetfpregs): Use it.
5511
5512 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5513
5514         PR gdb/21695
5515         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5516         (dwarf_decode_lines_1): Adjust.
5517
5518 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5519
5520         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5521         override.
5522         <info_proc>: Likewise.
5523
5524 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5525
5526         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5527         to windows_fetch_one_register, and only handle the case of
5528         fetching one register.  Move the code that reloads the context
5529         and iterates over all registers if R is negative to...
5530         (windows_nat_target::fetch_registers): ... here.
5531         (do_windows_store_inferior_registers): Rename to
5532         windows_store_one_register, and only handle the case of storing
5533         one register.  Move the code that handles the case where r is
5534         negative to...
5535         (windows_nat_target::store_registers) ... here.
5536
5537 2018-06-26  Tom Tromey  <tom@tromey.com>
5538
5539         PR rust/22574:
5540         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5541         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5542         Update.
5543         (rust_internal_print_type): Add podata parameter.
5544         (rust_print_type): Update.
5545
5546 2018-06-26  Tom Tromey  <tom@tromey.com>
5547
5548         * typeprint.h (struct print_offset_data) <update, finish,
5549         maybe_print_hole>: New methods.
5550         <indentation>: New constant.
5551         * typeprint.c (print_offset_data::indentation): Define.
5552         (print_offset_data::maybe_print_hole, print_offset_data::update)
5553         (print_offset_data::finish): Move from c-typeprint.c and rename.
5554         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5555         (print_spaces_filtered_with_print_options): Update.
5556         (c_print_type_union_field_offset, maybe_print_hole)
5557         (c_print_type_struct_field_offset): Move to typeprint.c and
5558         rename.
5559         (c_type_print_base_struct_union): Update.
5560
5561 2018-06-25  Pedro Alves  <palves@redhat.com>
5562
5563         * gdbthread.h (thread_info_ref, delete_thread)
5564         (delete_thread_silent, first_thread_of_inferior)
5565         (any_thread_of_inferior, switch_to_thread)
5566         (enable_thread_stack_temporaries)
5567         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5568         (get_last_thread_stack_temporary)
5569         (value_in_thread_stack_temporaries, can_access_registers_thread):
5570         Spell out "struct thread_info" instead of just "thread_info".
5571         * inferior.h (notice_new_inferior): Likewise.
5572
5573 2018-06-25  Pedro Alves  <palves@redhat.com>
5574
5575         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5576         pass thread_info pointer to delete_thread.
5577         (windows_nat_target::detach): Pass inferior pointer to
5578         detach_inferior.
5579         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5580         delete_thread.
5581         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5582         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5583         and pass a thread_info pointer to delete_thread.
5584         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5585         pass thread_info pointer to delete_thread.
5586         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5587         delete_thread_silent call.
5588         * procfs.c (procfs_target::detach): Pass inferior pointer to
5589         detach_inferior.
5590         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5591         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5592         delete_thread_silent call.
5593         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5594         pass thread_info pointer to delete_thread.
5595         (windows_nat_target::detach): Pass inferior pointer to
5596         delete_inferior.
5597
5598 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5599
5600         * regcache.c (readable_regcache::read_part): Fix asserts.
5601         (reg_buffer::raw_collect_part): New function.
5602         (regcache::write_part): Fix asserts.
5603         (reg_buffer::raw_supply_part): New function.
5604         (regcache::transfer_regset_register): New helper function.
5605         (regcache::transfer_regset): Call new functions.
5606         (regcache_supply_regset): Use gdb_byte*.
5607         (regcache::supply_regset): Likewise.
5608         (regcache_collect_regset): Likewise.
5609         (regcache::collect_regset): Likewise.
5610         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5611         (reg_buffer::raw_supply_part): Likewise.
5612         (regcache::transfer_regset_register): Likewise.
5613         (regcache::transfer_regset): Use gdb_byte*.
5614
5615 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5616
5617         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5618
5619 2018-06-21  Pedro Alves  <palves@redhat.com>
5620
5621         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5622         instead of a ptid_t.  All callers adjusted.
5623         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5624         adjusted.
5625         (print_ada_task_info, display_current_task_id, task_command_1):
5626         Adjust.
5627         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5628         inferior_thread.
5629         (breakpoint_kind): Adjust.
5630         (remove_breakpoints_pid): Rename to ...
5631         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5632         pointer.  All callers adjusted.
5633         (bpstat_clear_actions): Use inferior_thread.
5634         (get_bpstat_thread): New.
5635         (bpstat_do_actions): Use it.
5636         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5637         to take a thread_info pointer.  All callers adjusted.
5638         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5639         (breakpoint_re_set_thread): Use inferior_thread.
5640         * breakpoint.h (struct inferior): Forward declare.
5641         (bpstat_stop_status): Update.
5642         (remove_breakpoints_pid): Delete.
5643         (remove_breakpoints_inf): New.
5644         * bsd-uthread.c (bsd_uthread_target::wait)
5645         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5646         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5647         (maint_btrace_packet_history_cmd)
5648         (maint_btrace_clear_packet_history_cmd): Adjust.
5649         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5650         inferior_thread.
5651         * cli/cli-interp.c: Include "inferior.h".
5652         * common/refcounted-object.h (struct
5653         refcounted_object_ref_policy): New.
5654         * compile/compile-object-load.c: Include gdbthread.h.
5655         (store_regs): Use inferior_thread.
5656         * corelow.c (core_target::close): Use current_inferior.
5657         (core_target_open): Adjust to use first_thread_of_inferior and use
5658         the current inferior.
5659         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5660         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5661         <thread>: ... this new field.  All references adjusted.
5662         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5663         Take a thread_info pointer instead of a ptid_t.
5664         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5665         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5666         thread_info pointer instead of a ptid_t.
5667         * elfread.c: Include "inferior.h".
5668         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5669         Use inferior_thread.
5670         * eval.c (evaluate_subexp): Likewise.
5671         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5672         inferior_thread.
5673         * gdb_proc_service.h (struct thread_info): Forward declare.
5674         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5675         <thread>: ... this new field.  All references adjusted.
5676         * gdbarch.h, gdbarch.c: Regenerate.
5677         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5678         'thread' parameter.  All implementations and callers adjusted.
5679         * gdbthread.h (thread_info) <set_running>: New method.
5680         (delete_thread, delete_thread_silent): Take a thread_info pointer
5681         instead of a ptid.
5682         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5683         (first_thread_of_process): Delete, replaced by ...
5684         (first_thread_of_inferior): ... this new function.  All callers
5685         adjusted.
5686         (any_live_thread_of_process): Delete, replaced by ...
5687         (any_live_thread_of_inferior): ... this new function.  All callers
5688         adjusted.
5689         (switch_to_thread, switch_to_no_thread): Declare.
5690         (is_executing): Delete.
5691         (enable_thread_stack_temporaries): Update comment.
5692         <enable_thread_stack_temporaries>: Take a thread_info pointer
5693         instead of a ptid_t.  Incref the thread.
5694         <~enable_thread_stack_temporaries>: Decref the thread.
5695         <m_ptid>: Delete
5696         <m_thr>: New.
5697         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5698         (get_last_thread_stack_temporary)
5699         (value_in_thread_stack_temporaries, can_access_registers_thread):
5700         Take a thread_info pointer instead of a ptid_t.  All callers
5701         adjusted.
5702         * infcall.c (get_call_return_value): Use inferior_thread.
5703         (run_inferior_call): Work with thread pointers instead of ptid_t.
5704         (call_function_by_hand_dummy): Work with thread pointers instead
5705         of ptid_t.  Use thread_info_ref.
5706         * infcmd.c (proceed_thread_callback): Access thread's state
5707         directly.
5708         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5709         access thread's state directly.
5710         (continue_command): Use inferior_thread.
5711         (info_program_command): Use find_thread_ptid and access thread
5712         state directly.
5713         (proceed_after_attach_callback): Use thread state directly.
5714         (notice_new_inferior): Take a thread_info pointer instead of a
5715         ptid_t.  All callers adjusted.
5716         (exit_inferior): Take an inferior pointer instead of a pid.  All
5717         callers adjusted.
5718         (exit_inferior_silent): New.
5719         (detach_inferior): Delete.
5720         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5721         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5722         (detach_inferior_command, kill_inferior_command): Use
5723         find_inferior_id instead of valid_gdb_inferior_id and
5724         gdb_inferior_id_to_pid.
5725         (inferior_command): Use inferior and thread pointers.
5726         * inferior.h (struct thread_info): Forward declare.
5727         (notice_new_inferior): Take a thread_info pointer instead of a
5728         ptid_t.  All callers adjusted.
5729         (detach_inferior): Delete declaration.
5730         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5731         instead of a pid.  All callers adjusted.
5732         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5733         (valid_gdb_inferior_id): Delete.
5734         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5735         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5736         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5737         ...
5738         <inf>: ... this new field.
5739         <step_ptid>: Delete, replaced by ...
5740         <step_thread>: ... this new field.
5741         (get_displaced_stepping_state): Take an inferior pointer instead
5742         of a pid.  All callers adjusted.
5743         (displaced_step_in_progress_any_inferior): Adjust.
5744         (displaced_step_in_progress_thread): Take a thread pointer instead
5745         of a ptid_t.  All callers adjusted.
5746         (displaced_step_in_progress, add_displaced_stepping_state): Take
5747         an inferior pointer instead of a pid.  All callers adjusted.
5748         (get_displaced_step_closure_by_addr): Adjust.
5749         (remove_displaced_stepping_state): Take an inferior pointer
5750         instead of a pid.  All callers adjusted.
5751         (displaced_step_prepare_throw, displaced_step_prepare)
5752         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5753         All callers adjusted.
5754         (start_step_over): Adjust.
5755         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5756         displaced step queue.
5757         (do_target_resume): Adjust.
5758         (fetch_inferior_event): Use inferior_thread.
5759         (context_switch, get_inferior_stop_soon): Take an
5760         execution_control_state pointer instead of a ptid_t.  All callers
5761         adjusted.
5762         (switch_to_thread_cleanup): Delete.
5763         (stop_all_threads): Use scoped_restore_current_thread.
5764         * inline-frame.c: Include "gdbthread.h".
5765         (inline_state) <inline_state>: Take a thread pointer instead of a
5766         ptid_t.  All callers adjusted.
5767         <ptid>: Delete, replaced by ...
5768         <thread>: ... this new field.
5769         (find_inline_frame_state): Take a thread pointer instead of a
5770         ptid_t.  All callers adjusted.
5771         (skip_inline_frames, step_into_inline_frame)
5772         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5773         pointer instead of a ptid_t.  All callers adjusted.
5774         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5775         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5776         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5777         pointers directly.
5778         * linux-nat.c (get_detach_signal): Likewise.
5779         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5780         (thread_db_notice_clone): Adjust.
5781         (thread_db_find_new_threads_silently)
5782         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5783         a thread pointer instead of a ptid_t.  All callers adjusted.
5784         * mi/mi-cmd-var.c: Include "inferior.h".
5785         (mi_cmd_var_update_iter): Update to use thread pointers.
5786         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5787         inferior directly.
5788         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5789         out to ...
5790         (mi_output_running): ... this new function.
5791         (mi_on_resume_1): Adjust to use it.
5792         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5793         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5794         directly.
5795         (interrupt_thread_callback): : Adjust to use thread and inferior
5796         pointers.
5797         * proc-service.c: Include "gdbthread.h".
5798         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5799         * progspace-and-thread.c: Include "inferior.h".
5800         * progspace.c: Include "inferior.h".
5801         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5802         hold a reference to an inferior_object.
5803         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5804         inferior_thread.
5805         * python/py-inferior.c (struct inferior_object): Give the type a
5806         tag name instead of a typedef.
5807         (python_on_normal_stop): No need to check if the current thread is
5808         listed.
5809         (inferior_to_inferior_object): Change return type to
5810         inferior_object.  All callers adjusted.
5811         (find_thread_object): Delete, bits factored out to ...
5812         (thread_to_thread_object): ... this new function.
5813         * python/py-infthread.c (create_thread_object): Use
5814         inferior_to_inferior_object.
5815         (thpy_is_stopped): Use thread pointer directly.
5816         (gdbpy_selected_thread): Use inferior_thread.
5817         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5818         field, replaced with ...
5819         <thread>: ... this new field.  All users adjusted.
5820         (btpy_insn_or_gap_new): Drop const.
5821         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5822         callers adjusted.
5823         * python/py-record.c: Include "gdbthread.h".
5824         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5825         a ptid_t.  All callers adjusted.
5826         (gdbpy_current_recording): Use inferior_thread.
5827         * python/py-record.h (recpy_record_object) <ptid>: Delete
5828         field, replaced with ...
5829         <thread>: ... this new field.  All users adjusted.
5830         (recpy_element_object) <ptid>: Delete
5831         field, replaced with ...
5832         <thread>: ... this new field.  All users adjusted.
5833         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5834         a ptid_t.  All callers adjusted.
5835         * python/py-threadevent.c: Include "gdbthread.h".
5836         (get_event_thread): Use thread_to_thread_object.
5837         * python/python-internal.h (struct inferior_object): Forward
5838         declare.
5839         (find_thread_object, find_inferior_object): Delete declarations.
5840         (thread_to_thread_object, inferior_to_inferior_object): New
5841         declarations.
5842         * record-btrace.c: Include "inferior.h".
5843         (require_btrace_thread): Use inferior_thread.
5844         (record_btrace_frame_sniffer)
5845         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5846         (get_thread_current_frame): Use scoped_restore_current_thread and
5847         switch_to_thread.
5848         (get_thread_current_frame): Use thread pointer directly.
5849         (record_btrace_replay_at_breakpoint): Use thread's inferior
5850         pointer directly.
5851         * record-full.c: Include "inferior.h".
5852         * regcache.c: Include "gdbthread.h".
5853         (get_thread_arch_regcache): Use the inferior's address space
5854         directly.
5855         (get_thread_regcache, registers_changed_thread): New.
5856         * regcache.h (get_thread_regcache(thread_info *thread)): New
5857         overload.
5858         (registers_changed_thread): New.
5859         (remote_target) <remote_detach_1>: Swap order of parameters.
5860         (remote_add_thread): <remote_add_thread>: Return the new thread.
5861         (get_remote_thread_info(ptid_t)): New overload.
5862         (remote_target::remote_notice_new_inferior): Use thread pointers
5863         directly.
5864         (remote_target::process_initial_stop_replies): Use
5865         thread_info::set_running.
5866         (remote_target::remote_detach_1, remote_target::detach)
5867         (extended_remote_target::detach): Adjust.
5868         * stack.c (frame_show_address): Use inferior_thread.
5869         * target-debug.h (target_debug_print_thread_info_pp): New.
5870         * target-delegates.c: Regenerate.
5871         * target.c (default_thread_address_space): Delete.
5872         (memory_xfer_partial_1): Use current_inferior.
5873         (target_detach): Use current_inferior.
5874         (target_thread_address_space): Delete.
5875         (generic_mourn_inferior): Use current_inferior.
5876         * target.h (struct target_ops) <thread_address_space>: Delete.
5877         (target_thread_address_space): Delete.
5878         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5879         pointers directly.
5880         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5881         thread pointer instead of a ptid_t.  Adjust all callers.
5882         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5883         (first_thread_of_process): Delete, replaced by ...
5884         (first_thread_of_inferior): ... this new function.  All callers
5885         adjusted.
5886         (any_thread_of_process): Rename to ...
5887         (any_thread_of_inferior): ... this, and take an inferior pointer.
5888         (any_live_thread_of_process): Rename to ...
5889         (any_live_thread_of_inferior): ... this, and take an inferior
5890         pointer.
5891         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5892         (value_in_thread_stack_temporaries)
5893         (get_last_thread_stack_temporary): Take a thread pointer instead
5894         of a ptid_t.  Adjust all callers.
5895         (thread_info::set_running): New.
5896         (validate_registers_access): Use inferior_thread.
5897         (can_access_registers_ptid): Rename to ...
5898         (can_access_registers_thread): ... this, and take a thread
5899         pointer.
5900         (print_thread_info_1): Adjust to compare thread pointers instead
5901         of ptids.
5902         (switch_to_no_thread, switch_to_thread): Make extern.
5903         (scoped_restore_current_thread::~scoped_restore_current_thread):
5904         Use m_thread pointer directly.
5905         (scoped_restore_current_thread::scoped_restore_current_thread):
5906         Use inferior_thread.
5907         (thread_command): Use thread pointer directly.
5908         (thread_num_make_value_helper): Use inferior_thread.
5909         * top.c (execute_command): Use inferior_thread.
5910         * tui/tui-interp.c: Include "inferior.h".
5911         * varobj.c (varobj_create): Use inferior_thread.
5912         (value_of_root_1): Use find_thread_global_id instead of
5913         global_thread_id_to_ptid.
5914
5915 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5916
5917         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5918         possible.
5919         (regcache::write_part): Likewise.
5920         (readable_regcache::cooked_read_part): Update comment.
5921         (readable_regcache::cooked_write_part): Likewise.
5922         * regcache.h: (readable_regcache::read_part): Likewise.
5923         (regcache::write_part): Likewise.
5924
5925 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5926             Dirk Schubert  <dirk.schubert@arm.com>
5927
5928         * aarch64-linux-nat.c (post_attach): New.
5929         (aarch64_linux_nat_target::post_attach): Override post_attach to
5930         record the number of hardware debug registers.
5931
5932 2018-06-20  Tom Tromey  <tom@tromey.com>
5933
5934         * python/py-param.c (add_setshow_generic): Make parameters const.
5935         (parmpy_init): Update.
5936
5937 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5938
5939         * regcache.h (regcache_cooked_read_ftype): Rename to...
5940         (register_read_ftype): ...this, change type to function_view.
5941         (class reg_buffer) <save>: Remove src parameter.
5942         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5943         parameter non-const in first overload.  Remove src parameter in
5944         second overload.
5945         * regcache.c (do_cooked_read): Remove.
5946         (readonly_detached_regcache::readonly_detached_regcache): Make
5947         parameter non-const, adjust call to other constructor.
5948         (reg_buffer::save): Remove src parameter.
5949         * frame.c (do_frame_register_read): Remove.
5950         (frame_save_as_regcache): Use lambda function.
5951         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5952         parameter to ppu2spu_data *.
5953         (ppu2spu_sniffer): Use lambda function.
5954
5955 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5956
5957         * record-full.c (record_full_target::insert_breakpoint): Remove
5958         "struct" keyword, add const.
5959
5960 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5961
5962         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5963         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5964         * configure.ac: Remove AC_PREREQ, add missing quoting.
5965         * gnulib/configure.ac: Modernize usage of
5966         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5967         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5968         (AUTOMAKE_VERSION): Bump to 1.15.1.
5969         * configure: Re-generate.
5970         * config.in: Re-generate.
5971         * aclocal.m4: Re-generate.
5972         * gnulib/aclocal.m4: Re-generate.
5973         * gnulib/config.in: Re-generate.
5974         * gnulib/configure: Re-generate.
5975         * gnulib/import/Makefile.in: Re-generate.
5976
5977 2018-06-19  Pedro Alves  <palves@redhat.com>
5978
5979         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5980         (lookup_minimal_symbol_by_pc_section): ... here with
5981         gdb_assert_not_reached added.
5982
5983 2018-06-19  Pedro Alves  <palves@redhat.com>
5984
5985         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5986         parameter with a block parameter.  Compare location's block symbol
5987         with the frame's block instead of addresses.
5988         (skip_inline_frames): Pass the current block instead of the
5989         frame's address.  Break out as soon as we determine the frame
5990         should not be skipped.
5991
5992 2018-06-18  Tom Tromey  <tom@tromey.com>
5993
5994         * solib-aix.c (solib_aix_get_section_offsets): Return
5995         unique_xmalloc_ptr.
5996         (solib_aix_solib_create_inferior_hook): Update.
5997
5998 2018-06-18  Tom Tromey  <tom@tromey.com>
5999
6000         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6001
6002 2018-06-18  Tom Tromey  <tom@tromey.com>
6003
6004         * solib-frv.c (frv_relocate_main_executable): Use
6005         unique_xmalloc_ptr.
6006         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6007         unique_xmalloc_ptr.
6008
6009 2018-06-18  Tom Tromey  <tom@tromey.com>
6010
6011         * objfiles.h (inhibit_section_map_updates): Update.
6012         (resume_section_map_updates, resume_section_map_updates_cleanup):
6013         Remove.
6014         * solib-svr4.c (svr4_handle_solib_event): Update.
6015         * objfiles.c (inhibit_section_map_updates): Return
6016         scoped_restore_tmpl<int>.
6017         (resume_section_map_updates, resume_section_map_updates_cleanup):
6018         Remove.
6019
6020 2018-06-18  Tom Tromey  <tom@tromey.com>
6021
6022         * valprint.h (read_string): Update.
6023         * valprint.c (read_string): Change type of "buffer".
6024         (val_print_string): Update.
6025         * python/py-value.c (valpy_string): Update.
6026         * language.h (struct language_defn) <la_get_string>: Change
6027         type of "buffer".
6028         (default_get_string, c_get_string): Update.
6029         * language.c (default_get_string): Change type of "buffer".
6030         * guile/scm-value.c (gdbscm_value_to_string): Update.
6031         * c-lang.c (c_get_string): Change type of "buffer".
6032
6033 2018-06-18  Tom Tromey  <tom@tromey.com>
6034
6035         * ser-mingw.c (struct pipe_state_destroyer): New.
6036         (pipe_state_up): New typedef.
6037         (cleanup_pipe_state): Remove.
6038         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6039
6040 2018-06-18  Tom Tromey  <tom@tromey.com>
6041
6042         * rust-lang.h (rust_yyerror): Don't declare.
6043         * rust-lang.c (rust_language_defn): Update.
6044         * rust-exp.y (yyerror): Now static.
6045         * parse.c (parse_exp_in_context_1): Update.
6046         * p-lang.h (p_yyerror): Don't declare.
6047         * p-lang.c (p_language_defn): Update.
6048         * p-exp.y (yyerror): Now static.
6049         * opencl-lang.c (opencl_language_defn): Update.
6050         * objc-lang.c (objc_language_defn): Update.
6051         * m2-lang.h (m2_yyerror): Don't declare.
6052         * m2-lang.c (m2_language_defn): Update.
6053         * m2-exp.y (yyerror): Now static.
6054         * language.h (struct language_defn) <la_error>: Remove.
6055         * language.c (unk_lang_error): Remove.
6056         (unknown_language_defn, auto_language_defn): Remove.
6057         * go-lang.h (go_yyerror): Don't declare.
6058         * go-lang.c (go_language_defn): Update.
6059         * go-exp.y (yyerror): Now static.
6060         * f-lang.h (f_yyerror): Don't declare.
6061         * f-lang.c (f_language_defn): Update.
6062         * f-exp.y (yyerror): Now static.
6063         * d-lang.h (d_yyerror): Don't declare.
6064         * d-lang.c (d_language_defn): Update.
6065         * d-exp.y (yyerror): Now static.
6066         * c-lang.h (c_yyerror): Don't declare.
6067         * c-lang.c (c_language_defn, cplus_language_defn)
6068         (asm_language_defn, minimal_language_defn): Update.
6069         * c-exp.y (yyerror): Now static.
6070         * ada-lang.h (ada_yyerror): Don't declare.
6071         * ada-lang.c (ada_language_defn): Update.
6072         * ada-exp.y (yyerror): Now static.
6073
6074 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6075
6076         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6077         (store_sveregs_to_thread): Likewise.
6078         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6079         (aarch64_linux_store_inferior_registers): Likewise.
6080         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6081         function.
6082         (aarch64_sve_regs_copy_to_regcache): Likewise.
6083         (aarch64_sve_regs_copy_from_regcache): Likewise.
6084         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6085         declaration.
6086         (aarch64_sve_regs_copy_to_regcache): Likewise.
6087         (aarch64_sve_regs_copy_from_regcache): Likewise.
6088         (sve_context): Structure from Linux headers.
6089         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6090         (SVE_SIG_ZREG_SIZE): Likewise.
6091         (SVE_SIG_PREG_SIZE): Likewise.
6092         (SVE_SIG_FFR_SIZE): Likewise.
6093         (SVE_SIG_REGS_OFFSET): Likewise.
6094         (SVE_SIG_ZREGS_OFFSET): Likewise.
6095         (SVE_SIG_ZREG_OFFSET): Likewise.
6096         (SVE_SIG_ZREGS_SIZE): Likewise.
6097         (SVE_SIG_PREGS_OFFSET): Likewise.
6098         (SVE_SIG_PREG_OFFSET): Likewise.
6099         (SVE_SIG_PREGS_SIZE): Likewise.
6100         (SVE_SIG_FFR_OFFSET): Likewise.
6101         (SVE_SIG_REGS_SIZE): Likewise.
6102         (SVE_SIG_CONTEXT_SIZE): Likewise.
6103         (SVE_PT_REGS_MASK): Likewise.
6104         (SVE_PT_REGS_FPSIMD): Likewise.
6105         (SVE_PT_REGS_SVE): Likewise.
6106         (SVE_PT_VL_INHERIT): Likewise.
6107         (SVE_PT_VL_ONEXEC): Likewise.
6108         (SVE_PT_REGS_OFFSET): Likewise.
6109         (SVE_PT_FPSIMD_OFFSET): Likewise.
6110         (SVE_PT_FPSIMD_SIZE): Likewise.
6111         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6112         (SVE_PT_SVE_PREG_SIZE): Likewise.
6113         (SVE_PT_SVE_FFR_SIZE): Likewise.
6114         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6115         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6116         (__SVE_SIG_TO_PT): Likewise.
6117         (SVE_PT_SVE_OFFSET): Likewise.
6118         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6119         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6120         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6121         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6122         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6123         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6124         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6125         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6126         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6127         (SVE_PT_SVE_SIZE): Likewise.
6128         (SVE_PT_SIZE): Likewise.
6129         (HAS_SVE_STATE): New define.
6130
6131 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6132
6133         * nat/aarch64-sve-linux-sigcontext.h: New file.
6134         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6135         new files.
6136         (SVE_VQ_MIN): Likewise.
6137         (SVE_VQ_MAX): Likewise.
6138         (SVE_VL_MIN): Likewise.
6139         (SVE_VL_MAX): Likewise.
6140         (SVE_NUM_ZREGS): Likewise.
6141         (SVE_NUM_PREGS): Likewise.
6142         (sve_vl_valid): Likewise.
6143         (struct user_sve_header): Likewise.
6144
6145 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6146             Richard Bunt <Richard.Bunt@arm.com>
6147
6148         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6149         was requested by GDB.
6150
6151 2018-06-15  Tom de Vries  <tdevries@suse.de>
6152
6153         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6154
6155 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6156
6157         * gnulib/update-gnulib.sh: Print expected versions of
6158         autoconf/aclocal.
6159
6160 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6161
6162         * arch-utils.c (default_type_align): Use type_length_units.
6163         * gdbtypes.c (type_align): Use type_length_units.
6164
6165 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6166
6167         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6168         of 'define' command.
6169
6170 2018-06-14  Tom de Vries  <tdevries@suse.de>
6171
6172         PR cli/22573
6173         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6174         get_no_prettyformat_print_options.
6175
6176 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6177
6178         * sparc-nat.h: Include target.h.
6179         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6180         <fetch_registers>: Remove this argument in function call.
6181         <store_registers>: Remove this argument in function call, remove
6182         extra semicolon.
6183         <low_forget_process>: Call sparc64_forget_process instead of
6184         sparc_forget_process.
6185
6186 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6187
6188         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6189         (procfs_target::make_corefile_notes): Adjust to new
6190         target_read_alloc return type.
6191
6192 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6193             Stephen Roberts  <stephen.roberts@arm.com>
6194
6195         PR gdb/22882
6196         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6197         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6198         Move should_notify_stop local into more inner scope.
6199
6200 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6201             Stephen Roberts  <stephen.roberts@arm.com>
6202
6203         PR gdb/22882
6204         * infrun.c (resume_1): Add call to mark_async_event_handler.
6205
6206 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6207
6208         * infrun.c (do_target_wait): Change old version of $pc printed.
6209
6210 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6211
6212         * dwarf2read.c (read_index_from_section): Rename to...
6213         (read_gdb_index_from_section): ... this, update all callers.
6214         (dwarf2_read_index): Rename to...
6215         (dwarf2_read_gdb_index): ... this, update all callers.
6216
6217 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6218
6219         * gdb/hppa-linux-nat.c
6220         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6221         hppa_linux_nat_target::fetch_registers.
6222
6223 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6224
6225         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6226         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6227         (AARCH64_DWARF_SVE_FFR): Likewise.
6228         (AARCH64_DWARF_SVE_P0): Likewise.
6229         (AARCH64_DWARF_SVE_Z0): Likewise.
6230
6231 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6232
6233         * common/common-regcache.h (raw_compare): New function.
6234         * regcache.c (regcache::raw_compare): Likewise.
6235         * regcache.h (regcache::raw_compare): New declaration.
6236
6237 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6238
6239         * common/common-regcache.h (reg_buffer_common): New structure.
6240         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6241         (reg_buffer::raw_supply): Likewise.
6242         (reg_buffer::raw_supply_integer): Likewise.
6243         (reg_buffer::raw_supply_zeroed): Likewise.
6244         (reg_buffer::raw_collect): Likewise.
6245         (reg_buffer::raw_collect_integer): Likewise.
6246         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6247         (reg_buffer::raw_supply): Likewise.
6248         (reg_buffer::raw_supply_integer): Likewise.
6249         (reg_buffer::raw_supply_zeroed): Likewise.
6250         (reg_buffer::raw_collect): Likewise.
6251         (reg_buffer::raw_collect_integer): Likewise.
6252
6253 2018-06-10  Tom Tromey  <tom@tromey.com>
6254
6255         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6256         (class remote_state) <stop_reply_queue>: Now std::vector.
6257         (remote_state::~remote_state)
6258         (remote_target::stop_reply_queue_length): Update.
6259         (struct queue_iter_param, remove_child_of_pending_fork)
6260         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6261         (check_pending_event_prevents_wildcard_vcont_callback)
6262         (remove_stop_reply_for_inferior)
6263         (remove_stop_reply_of_remote_state)
6264         (remote_notif_remove_once_on_match)
6265         (stop_reply_match_ptid_and_ws)
6266         (remote_kill_child_of_pending_fork): Remove.
6267         (remote_target::remove_new_fork_children)
6268         (remote_target::check_pending_events_prevent_wildcard_vcont)
6269         (remote_target::discard_pending_stop_replies)
6270         (remote_target::discard_pending_stop_replies_in_queue)
6271         (remote_target::remote_notif_remove_queued_reply)
6272         (remote_target::queued_stop_reply)
6273         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6274         (remote_target::wait, remote_target::kill_new_fork_children)
6275         (remote_target::async): Update.
6276
6277 2018-06-10  Tom Tromey  <tom@tromey.com>
6278
6279         * record-full.c (record_full_arch_list_cleanups): Remove.
6280         (record_full_message): Use try/catch.
6281         (record_full_wait_cleanups): Remove.
6282         (record_full_wait_1): Use try/catch.
6283         (record_full_restore): Likewise.
6284
6285 2018-06-10  Tom Tromey  <tom@tromey.com>
6286
6287         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6288         declare VEC.  Add constructor.
6289         <in_target_beneath>: Now bool.
6290         (record_full_breakpoints): Now a std::vector, static.
6291         (record_full_sync_record_breakpoints)
6292         (record_full_init_record_breakpoints)
6293         (record_full_target::insert_breakpoint)
6294         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6295
6296 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6297
6298         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6299         * serial.c (serial_interface_lookup): Remove struct keyword.
6300
6301 2018-06-10  Tom Tromey  <tom@tromey.com>
6302
6303         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6304         method.
6305         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6306         a method.
6307         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6308         method.
6309         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6310         "beneath" as a method.
6311         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6312         Use "beneath" as a method.
6313
6314 2018-06-10  Tom Tromey  <tom@tromey.com>
6315
6316         * tracefile.c (struct trace_file_writer_deleter): New.
6317         <operator()>: Rename from trace_file_writer_xfree.
6318         (trace_file_writer_up): New typedef.
6319         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6320
6321 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6322
6323         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6324         <m_registers, m_register_status>: Change type to
6325         std::unique_ptr.
6326         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6327         XCNEWVEC.
6328
6329 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6330
6331         * common/common-regcache.h (enum register_status): Add
6332         underlying type "signed char".
6333         * regcache.h (reg_buffer) <m_register_status>: Change type to
6334         register_status *.
6335         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6336         register_status instead of signed char.
6337         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6338         (reg_buffer::get_register_status): Remove cast.
6339         (readable_regcache::raw_read): Remove cast.
6340         (readable_regcache::cooked_read): Remove cast.
6341
6342 2018-06-09  Tom Tromey  <tom@tromey.com>
6343
6344         * source.c (reverse_search_command, forward_search_command): Use
6345         scoped_fd.
6346
6347 2018-06-09  Tom Tromey  <tom@tromey.com>
6348
6349         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6350         (serial_ops_list): Now static, std::vector.
6351         (serial_interface_lookup, serial_add_interface): Update.
6352
6353 2018-06-09  Tom Tromey  <tom@tromey.com>
6354
6355         * dwarf2read.c (process_cu_includes): Update.
6356         (process_full_comp_unit): Update.
6357         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6358         std::vector.
6359
6360 2018-06-08  Paul Koning  <paul_koning@dell.com>
6361
6362         PR gdb/23252
6363
6364         * python/python.c (do_start_initialization):
6365         Avoid call to internal Python API.
6366         (init__gdb_module): New function.
6367
6368 2018-06-08  Gary Benson <gbenson@redhat.com>
6369
6370         * linux-thread-db.c (valprint.h): New include.
6371         (struct check_thread_db_info): New structure.
6372         (check_thread_db_on_load, tdb_testinfo): New static globals.
6373         (check_thread_db, check_thread_db_callback): New functions.
6374         (try_thread_db_load_1): Run integrity checks if requested.
6375         (maintenance_check_libthread_db): New function.
6376         (_initialize_thread_db): Register "maint check libthread-db"
6377         and "maint set/show check-libthread-db".
6378         * NEWS: Mention the above new commands.
6379
6380 2018-06-08  Tom Tromey  <tom@tromey.com>
6381
6382         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6383         now a method.
6384
6385 2018-06-08  Tom Tromey  <tom@tromey.com>
6386
6387         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6388
6389 2018-06-08  Tom Tromey  <tom@tromey.com>
6390
6391         * common/btrace-common.h (struct btrace_data): Add constructor,
6392         destructor, move assignment operator.
6393         <empty, clear, fini>: New methods.
6394         <format>: Initialize.
6395         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6396         (btrace_data_empty): Don't declare.
6397         * common/btrace-common.c (btrace_data_init): Remove.
6398         (btrace_data::fini): Rename from btrace_data_fini.
6399         (btrace_data::empty): Rename from btrace_data_empty.
6400         (btrace_data::clear): Rename from btrace_data_clear.  Return
6401         bool.
6402         * btrace.h (make_cleanup_btrace_data): Don't declare.
6403         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6404         (parse_xml_btrace): Update.
6405         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6406         (maint_btrace_clear_packet_history_cmd): Update.
6407
6408 2018-06-07  Pedro Alves  <palves@redhat.com>
6409
6410         * target.h (target_ops) <beneath>: Now a method.  All references
6411         updated.
6412         (class target_stack): New.
6413         * target.c (g_target_stack): New.
6414         (g_current_top_target): Delete.
6415         (current_top_target): Get the top target out of g_target_stack.
6416         (target_stack::push, target_stack::unpush): New.
6417         (push_target, unpush_target): Reimplement.
6418         (target_is_pushed): Reimplement in terms of g_target_stack.
6419         (target_ops::beneath, target_stack::find_beneath): New.
6420
6421 2018-06-07  Pedro Alves  <palves@redhat.com>
6422
6423         * target.h (find_target_beneath): Delete declaration.
6424         * target.c (find_target_beneath): Delete definition.
6425         * aix-thread.c: All callers of find_target_beneath adjusted to
6426         call target_ops::beneath instead.
6427         * bsd-uthread.c: Likewise.
6428         * linux-thread-db.c: Likewise.
6429         * ravenscar-thread.c: Likewise.
6430         * sol-thread.c: Likewise.
6431         * spu-multiarch.c: Likewise.
6432
6433 2018-06-07  Pedro Alves  <palves@redhat.com>
6434
6435         * target.h (target_ops) <beneath>: Now a method.  All references
6436         updated.
6437         (target_ops) <m_beneath>: New.
6438         * target.c (target_ops::beneath): New.
6439         * corelow.c: Adjust all references to target_ops::beneath.
6440         * linux-thread-db.c: Likewise.
6441         * make-target-delegates: Likewise.
6442         * record-btrace.c: Likewise.
6443         * record-full.c: Likewise.
6444         * remote.c: Likewise.
6445         * target.c: Likewise.
6446         * target-delegates.c: Regenerate.
6447
6448 2018-06-07  Pedro Alves  <palves@redhat.com>
6449
6450         * target.h (target_stack): Delete.
6451         (current_top_target): Declare function.
6452         * target.c (target_stack): Delete.
6453         (g_current_top_target): New.
6454         (current_top_target): New function.
6455         * auxv.c: Use current_top_target instead of target_stack
6456         throughout.
6457         * avr-tdep.c: Likewise.
6458         * breakpoint.c: Likewise.
6459         * corefile.c: Likewise.
6460         * elfread.c: Likewise.
6461         * eval.c: Likewise.
6462         * exceptions.c: Likewise.
6463         * frame.c: Likewise.
6464         * gdbarch-selftests.c: Likewise.
6465         * gnu-v3-abi.c: Likewise.
6466         * ia64-tdep.c: Likewise.
6467         * ia64-vms-tdep.c: Likewise.
6468         * infcall.c: Likewise.
6469         * infcmd.c: Likewise.
6470         * infrun.c: Likewise.
6471         * linespec.c: Likewise.
6472         * linux-tdep.c: Likewise.
6473         * minsyms.c: Likewise.
6474         * ppc-linux-nat.c: Likewise.
6475         * ppc-linux-tdep.c: Likewise.
6476         * procfs.c: Likewise.
6477         * regcache.c: Likewise.
6478         * remote.c: Likewise.
6479         * rs6000-tdep.c: Likewise.
6480         * s390-linux-nat.c: Likewise.
6481         * s390-tdep.c: Likewise.
6482         * solib-aix.c: Likewise.
6483         * solib-darwin.c: Likewise.
6484         * solib-dsbt.c: Likewise.
6485         * solib-spu.c: Likewise.
6486         * solib-svr4.c: Likewise.
6487         * solib-target.c: Likewise.
6488         * sparc-tdep.c: Likewise.
6489         * sparc64-tdep.c: Likewise.
6490         * spu-tdep.c: Likewise.
6491         * symfile.c: Likewise.
6492         * symtab.c: Likewise.
6493         * target-descriptions.c: Likewise.
6494         * target-memory.c: Likewise.
6495         * target.c: Likewise.
6496         * target.h: Likewise.
6497         * tracefile-tfile.c: Likewise.
6498         * tracepoint.c: Likewise.
6499         * valops.c: Likewise.
6500         * valprint.c: Likewise.
6501         * value.c: Likewise.
6502         * windows-tdep.c: Likewise.
6503         * mi/mi-main.c: Likewise.
6504
6505 2018-06-07  Tom Tromey  <tom@tromey.com>
6506
6507         * valprint.h (build_address_symbolic): Declare.
6508         * printcmd.c (print_address_symbolic): Update.
6509         (build_address_symbolic): Change "name" and "filename" to
6510         std::string.
6511         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6512         Update.
6513         * defs.h (build_address_symbolic): Remove declaration.
6514
6515 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6516
6517         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6518         (aarch64_vnv_type): Add function.
6519         (aarch64_pseudo_register_name): Add V regs for SVE.
6520         (aarch64_pseudo_register_type): Likewise.
6521         (aarch64_pseudo_register_reggroup_p): Likewise.
6522         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6523         (aarch64_pseudo_read_value): Add V regs for SVE.
6524         (aarch64_pseudo_write_2): Use V0 offset for SVE
6525         (aarch64_pseudo_write): Add V regs for SVE.
6526         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6527
6528 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6529
6530         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6531         (sve_vl_from_vq): Likewise.
6532
6533 2018-06-05  Tom Tromey  <tom@tromey.com>
6534
6535         * cli/cli-cmds.c (show_version): Update.
6536         * top.c (print_gdb_version): Add "interactive" parameter.
6537         Update.
6538         * main.c (captured_main_1): Update.
6539         * top.h (print_gdb_version): Add "interactive" parameter and a
6540         comment.
6541
6542 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6543
6544         * common/enum-flags.h: Add trailing semicolon to example in
6545         comment.
6546
6547 2018-06-05  Tom Tromey  <tom@tromey.com>
6548
6549         PR cli/12326:
6550         * NEWS: Add entry about pager.
6551         * utils.c (pagination_disabled_for_command): New global.
6552         (prompt_for_continue): Allow "c" response to prompt.
6553         (reinitialize_more_filter): Clear
6554         pagination_disabled_for_command.
6555         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6556
6557 2018-06-04  Tom Tromey  <tom@tromey.com>
6558
6559         * ada-lang.h (ada_lookup_symbol_list): Update.
6560         * ada-lang.c (resolve_subexp): Update.
6561         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6562         parameter.
6563         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6564         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6565         results parameter to std::vector.
6566         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6567         Update.
6568         * ada-exp.y (block_lookup): Update.
6569         (select_possible_type_sym): Change type of syms.  Remove nsyms
6570         parameter.
6571         (write_var_or_type, write_name_assoc): Update.
6572
6573 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6574
6575         * windows-nat.c (windows_nat_target::xfer_partial): Return
6576         TARGET_XFER_E_IO if we need to delegate to the target beneath
6577         but BENEATH is NULL.
6578
6579 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6580
6581         * Makefile.in (config.status): Add configure.nat as a
6582         dependency.
6583
6584 2018-06-04  Tom Tromey  <tom@tromey.com>
6585
6586         * cp-name-parser.y (cpname_state): Add method declarations.
6587         (HANDLE_QUAL): Update.
6588         (cpname_state::d_grab, cpname_state::fill_comp)
6589         (cpname_state::make_operator, cpname_state::make_dtor)
6590         (cpname_state::make_builtin_type, cpname_state::make_name)
6591         (cpname_state::d_qualify, cpname_state::d_int_type)
6592         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6593         (%union): Move earlier.
6594
6595 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6596
6597         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6598
6599 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6600
6601         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6602         (aarch64_pseudo_write_1): Likewise.
6603         (aarch64_pseudo_read_value): Use helper.
6604         (aarch64_pseudo_write): Likewise.
6605
6606 2018-06-04  Pedro Alves  <palves@redhat.com>
6607
6608         * darwin-nat.c (darwin_ops): Delete.
6609         (darwin_attach_pid): Use get_native_target.
6610
6611 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6612
6613         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6614         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6615
6616 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6617
6618         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6619         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6620         (aarch64_gdbarch_init): Check for SVE.
6621         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6622
6623 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6624
6625         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6626         * aarch64-tdep.h (aarch64_read_description): Likewise.
6627         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6628         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6629         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6630         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6631         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6632
6633 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6634
6635         * value.c (value_fetch_lazy_bitfield): New.
6636         (value_fetch_lazy_memory): New.
6637         (value_fetch_lazy_register): New.
6638         (value_fetch_lazy): Factor out to smaller functions.
6639
6640 2018-06-01  Tom Tromey  <tom@tromey.com>
6641
6642         * cp-name-parser.y (backslashable, represented): Now const.
6643
6644 2018-06-01  Tom Tromey  <tom@tromey.com>
6645
6646         * cp-name-parser.y: Include parser-defs.h.
6647         (parser_fprintf): Remove declaration.
6648
6649 2018-06-01  Tom Tromey  <tom@tromey.com>
6650
6651         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6652         %parse-param.
6653         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6654         (global_result): Remove globals.
6655         (struct cpname_state): New.
6656         (yyparse): Don't declare.
6657         (yylex, yyerror): Move declarations after %union.
6658         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6659         (make_name): Add state parameter.
6660         Update all callers.
6661         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6662         parameter.
6663         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6664         Update.
6665         (yylex): Add lvalp, state parameters.
6666         (yyerror): Add state parameter.
6667         (cp_demangled_name_to_comp): Update.
6668
6669 2018-06-01  Tom Tromey  <tom@tromey.com>
6670
6671         * cp-name-parser.y (parser_fprintf): Declare.
6672         (GDB_YY_REMAP_PREFIX): Define.
6673         Include yy-remap.h.  Don't redefine yy* identifiers.
6674
6675 2018-06-01  Tom Tromey  <tom@tromey.com>
6676
6677         * python/py-type.c (typy_legacy_template_argument): Update.
6678         * cp-support.h (cp_demangled_name_to_comp): Update.
6679         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6680         parameter to be a "std::string *".
6681         (main): Update.
6682
6683 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6684
6685         * ada-lex.l: Include "diagnostics.h" instead of
6686         "common/diagnostics.h".
6687         * unittests/environ-selftests.c: Likewise.
6688         * common/diagnostics.h: Moved to ../include.
6689
6690 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6691
6692         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6693         to language_mode_manual while calling breakpoint_re_set_one.
6694
6695 2018-06-01  Tom Tromey  <tom@tromey.com>
6696
6697         * valops.c (value_cast_structs, destructor_name_p): Update.
6698         * symtab.c (gdb_mangle_name): Update.
6699         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6700         Update.
6701         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6702         (pascal_object_print_value_fields, pascal_object_print_value):
6703         Update.
6704         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6705         * linespec.c (find_methods): Update.
6706         * gdbtypes.h (type_name_no_tag): Remove.
6707         (type_name_or_error): Rename from type_name_no_tag_or_error.
6708         * gdbtypes.c (type_name_no_tag): Remove.
6709         (type_name_or_error): Rename from type_name_no_tag_or_error.
6710         (lookup_struct_elt_type, check_typedef): Update.
6711         * expprint.c (print_subexp_standard): Update.
6712         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6713         * d-namespace.c (d_lookup_nested_symbol): Update.
6714         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6715         (cp_print_class_member): Update.
6716         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6717         * completer.c (add_struct_fields): Update.
6718         * c-typeprint.c (cp_type_print_derivation_info)
6719         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6720         Update.
6721         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6722         (ada_prefer_type, ada_is_exception_sym): Update.
6723
6724 2018-06-01  Tom Tromey  <tom@tromey.com>
6725
6726         * valops.c (enum_constant_from_type, value_namespace_elt)
6727         (value_maybe_namespace_elt): Update.
6728         * valarith.c (find_size_for_pointer_math): Update.
6729         * target-descriptions.c (make_gdb_type): Update.
6730         * symmisc.c (print_symbol): Update.
6731         * stabsread.c (define_symbol, read_type)
6732         (complain_about_struct_wipeout, add_undefined_type)
6733         (cleanup_undefined_types_1): Update.
6734         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6735         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6736         (rust_internal_print_type, rust_composite_type)
6737         (rust_evaluate_funcall, rust_evaluate_subexp)
6738         (rust_inclusive_range_type_p): Update.
6739         * python/py-type.c (typy_get_tag): Update.
6740         * p-typeprint.c (pascal_type_print_base): Update.
6741         * mdebugread.c (parse_symbol, parse_type): Update.
6742         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6743         Update.
6744         * guile/scm-type.c (gdbscm_type_tag): Update.
6745         * go-lang.c (sixg_string_p): Update.
6746         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6747         Update.
6748         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6749         (TYPE_TAG_NAME): Remove.
6750         * gdbtypes.c (type_name_no_tag): Simplify.
6751         (check_typedef, check_types_equal, recursive_dump_type)
6752         (copy_type_recursive, arch_composite_type): Update.
6753         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6754         in summary mode when needed.
6755         * eval.c (evaluate_funcall): Update.
6756         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6757         (process_structure_scope, read_enumeration_type)
6758         (read_namespace_type, read_module_type, determine_prefix): Update.
6759         * cp-support.c (inspect_type): Update.
6760         * coffread.c (process_coff_symbol, decode_base_type): Update.
6761         * c-varobj.c (c_is_path_expr_parent): Update.
6762         * c-typeprint.c (c_type_print_base_struct_union): Update.
6763         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6764         summary when using C language.
6765         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6766         (gen_maybe_namespace_elt): Update.
6767         * ada-lang.c (ada_type_name): Simplify.
6768         (empty_record, ada_template_to_fixed_record_type_1)
6769         (template_to_static_fixed_type)
6770         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6771
6772 2018-06-01  Tom Tromey  <tom@tromey.com>
6773
6774         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6775         c_print_type.
6776         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6777         (c_print_type): Update.
6778         (c_print_type): New overload.
6779         (c_type_print_varspec_prefix, c_type_print_args)
6780         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6781         (c_type_print_base_struct_union, c_type_print_base_1)
6782         (cp_type_print_method_args): Add "language" parameter.
6783         (c_type_print_base): Update.
6784         * c-lang.h (c_print_type): Add new overload.
6785
6786 2018-06-01  Tom Tromey  <tom@tromey.com>
6787
6788         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6789         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6790
6791 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6792
6793         * aarch64-tdep.c (aarch64_sve_register_names): New const
6794         var.
6795         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6796         (AARCH64_SVE_Z_REGS_NUM): New define.
6797         (AARCH64_SVE_P_REGS_NUM): Likewise.
6798         (AARCH64_SVE_NUM_REGS): Likewise.
6799
6800 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6801
6802         * nat/linux-ptrace.h [__alpha__]
6803         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6804         definitions.
6805
6806 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6807
6808         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6809         the endianness selected.
6810         * NEWS: Document `set endian auto' mode operation update.
6811
6812 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6813
6814         * Makefile.in: Add new header.
6815         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6816         (sve_vl_from_vg): Likewise.
6817         (sve_vq_from_vl): Likewise.
6818         (sve_vl_from_vq): Likewise.
6819         (sve_vq_from_vg): Likewise.
6820         (sve_vg_from_vq): Likewise.
6821         * configure.nat: Add new c file.
6822         * nat/aarch64-sve-linux-ptrace.c: New file.
6823         * nat/aarch64-sve-linux-ptrace.h: New file.
6824
6825 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6826
6827         * aarch64-linux-nat.c (aarch64_linux_read_description):
6828         Add parmeter zero.
6829         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6830         Likewise.
6831         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6832         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6833         (aarch64_gdbarch_init): Add parmeter zero.
6834         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6835         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6836         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6837         parmeter.
6838         * doc/gdb.texinfo: Describe SVE feature
6839         * features/aarch64-sve.c: New file.
6840
6841 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6842
6843         PR gdb/23210
6844         * gdbarch.sh (significant_addr_bit): Default to zero when
6845         not set by target architecture.
6846         * gdbarch.c: Re-generated.
6847         * utils.c (address_significant): Update.
6848
6849 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6850
6851         * stack.c (func_command): Remove trailing newline in call to error.
6852
6853 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6854
6855         * regcache.h (regcache_raw_collect): Remove, update callers to
6856         use regcache::raw_collect.
6857         * regcache.c (regcache_raw_collect): Remove.
6858
6859 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6860
6861         * regcache.h (regcache_raw_supply): Remove, update callers to
6862         use detached_regcache::raw_supply.
6863         * regcache.c (regcache_raw_supply): Remove.
6864
6865 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6866
6867         * regcache.h (regcache_cooked_write_part): Remove, update
6868         callers to use regcache::cooked_write_part.
6869         * regcache.c (regcache_cooked_write_part): Remove.
6870
6871 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6872
6873         * regcache.h (regcache_cooked_read_part): Remove, update callers
6874         to use readable_regcache::cooked_read_part.
6875         * regcache.c (regcache_cooked_read_part): Remove.
6876
6877 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6878
6879         * regcache.h (regcache_cooked_read_value): Remove, update
6880         callers to use readable_regcache::cooked_read_value.
6881         * regcache.c (regcache_cooked_read_value): Remove.
6882
6883 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6884
6885         * regcache.h (regcache_cooked_write): Remove, update callers to
6886         use regcache::cooked_write.
6887         * regcache.c (regcache_cooked_write): Remove.
6888
6889 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6890
6891         * regcache.h (regcache_invalidate): Remove, update callers to
6892         use detached_regcache::invalidate instead.
6893         * regcache.c (regcache_invalidate): Remove.
6894
6895 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6896
6897         * regcache.h (regcache_raw_write_part): Remove, update callers
6898         to use regcache::raw_write_part instead.
6899         * regcache.c (regcache_raw_write_part): Remove.
6900
6901 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6902
6903         * regcache.h (regcache_raw_read_part): Remove, update callers to
6904         use readable_regcache::raw_read_part instead.
6905         * regcache.c (regcache_raw_read_part): Remove.
6906
6907 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6908
6909         * regcache.h (regcache_cooked_read): Remove, update callers to
6910         use readable_regcache::cooked_read instead.
6911         * regcache.c (regcache_cooked_read): Remove.
6912
6913 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6914
6915         * regcache.h (regcache_raw_write): Remove, update callers to use
6916         regcache::raw_write instead.
6917         * regcache.c (regcache_raw_write): Remove.
6918
6919 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6920
6921         * regcache.h (regcache_raw_read): Remove, update callers to use
6922         readable_regcache::raw_read instead.
6923         * regcache.c (regcache_raw_read): Remove.
6924
6925 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6926
6927         * regcache.h (regcache_raw_update): Remove, update callers to
6928         use readable_regcache::raw_update instead.
6929         * regcache.c (regcache_raw_update): Remove.
6930
6931 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6932
6933         * regcache.h (regcache_register_status): Remove, update callers
6934         to use reg_buffer::get_register_status directly instead.
6935         * regcache.c (regcache_register_status): Remove.
6936
6937 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6938
6939         * regcache.h (regcache_get_ptid): Remove, update all callers to
6940         call regcache::ptid instead.
6941         * regcache.c (regcache_get_ptid): Remove.
6942
6943 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6944
6945         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6946
6947 2018-05-30  Pedro Alves  <palves@redhat.com>
6948
6949         * common/common-exceptions.h (exception_rethrow): Use
6950         ATTRIBUTE_NORETURN.
6951
6952 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6953
6954         * breakpoint.c (print_solib_event, check_status_catch_solib):
6955         Remove struct keyword in range-based for loops.
6956         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6957         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6958         Likewise.
6959         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6960         Likewise.
6961         * symfile.c (addr_info_make_relative): Likewise.
6962         * thread.c (value_in_thread_stack_temporaries): Likewise.
6963
6964 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6965
6966         PR gdb/16841
6967         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6968         aggregate type to get its real type before accessing it.
6969
6970 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6971
6972         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6973         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6974         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6975         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6976         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6977         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6978         * printcmd.c (info_address_command): Likewise.
6979
6980 2018-05-29  Tom Tromey  <tom@tromey.com>
6981
6982         * windows-nat.c (handle_exception): Update fall-through comment.
6983
6984 2018-05-29  Tom Tromey  <tom@tromey.com>
6985
6986         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6987         (struct program_space) <added_solibs>: Now a std::vector.
6988         * breakpoint.c (print_solib_event): Update.
6989         (check_status_catch_solib): Update.
6990         * progspace.c (clear_program_space_solib_cache): Update.
6991         * solib.c (update_solib_list): Update.
6992
6993 2018-05-29  Tom Tromey  <tom@tromey.com>
6994
6995         * python/py-type.c (typy_richcompare): Update.
6996         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6997         * gdbtypes.h (types_deeply_equal): Return bool.
6998         (types_equal): Likewise.
6999         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7000         declare VEC.
7001         (check_types_equal): Change worklist to std::vector.  Return
7002         bool.
7003         (struct type_equality_entry): Add constructor.
7004         (compare_maybe_null_strings): Return bool.
7005         (check_types_worklist): Return bool.  Change worklist to
7006         std::vector.
7007         (types_deeply_equal): Use std::vector.
7008         (types_equal): Return bool.
7009         (compare_maybe_null_strings): Simplify.
7010
7011 2018-05-29  Tom Tromey  <tom@tromey.com>
7012
7013         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7014
7015 2018-05-29  Tom Tromey  <tom@tromey.com>
7016
7017         * objc-lang.h: Don't include cp-support.h.
7018         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7019         declare VEC.
7020
7021 2018-05-27  Tom Tromey  <tom@tromey.com>
7022
7023         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7024
7025 2018-05-25  Tom Tromey  <tom@tromey.com>
7026
7027         * value.c (value::location): Initialize.
7028
7029 2018-05-25  Tom Tromey  <tom@tromey.com>
7030
7031         * dbxread.c (init_bincl_list): Remove.
7032         (bincl_list): Now a std::vector.
7033         (bincls_allocated, next_bincl): Remove.
7034         (free_bincl_list, do_free_bincl_list_cleanup)
7035         (make_cleanup_free_bincl_list): Remove.
7036         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7037         unique_xmalloc_ptr.
7038         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7039         (struct header_file_location): Add constructor.
7040         (add_bincl_to_list): Remove.
7041
7042 2018-05-25  Tom Tromey  <tom@tromey.com>
7043
7044         * tui/tui.c (tui_enable): Update.
7045         * mi/mi-interp.c (mi_interp::init): Update.
7046         * interps.h (class interp) <name>: New method.
7047         <m_name>: Rename from name.
7048         (~scoped_restore_interp): Update.
7049         * interps.c (interp::interp): Update.
7050         (interp_add, interp_set, interp_lookup_existing)
7051         (current_interp_named_p): Update.
7052
7053 2018-05-25  Tom Tromey  <tom@tromey.com>
7054
7055         * interps.c (interp_name): Remove.
7056         * mi/mi-interp.c (mi_interp::init): Update.
7057         * interps.h (interp_name): Remove.
7058         (~scoped_restore_interp): Update.
7059         * tui/tui.c (tui_enable): Update.
7060
7061 2018-05-25  Tom Tromey  <tom@tromey.com>
7062
7063         * utils.c (fputs_maybe_filtered): Update.
7064         * linespec.c (decode_line_full): Update.
7065         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7066         (mi_print_breakpoint_for_event, mi_solib_loaded)
7067         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7068         (mi_user_selected_context_changed): Update.
7069         * mi/mi-main.c (mi_execute_command): Update.
7070         * cli/cli-script.c (execute_control_command): Update.
7071         * python/python.c (execute_gdb_command): Update.
7072         * solib.c (info_sharedlibrary_command): Update.
7073         * interps.c (interp_ui_out): Remove.
7074         * interps.h (interp_ui_out): Remove.
7075
7076 2018-05-25  Tom Tromey  <tom@tromey.com>
7077
7078         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7079         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7080         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7081
7082 2018-05-25  Tom Tromey  <tom@tromey.com>
7083
7084         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7085         * interps.c (interp_exec): Use scoped_restore.
7086
7087 2018-05-25  Tom Tromey  <tom@tromey.com>
7088
7089         * remote.c (remote_target::remote_file_get): Use
7090         gdb::byte_vector.
7091         (remote_target::remote_file_put): Likewise.
7092
7093 2018-05-25  Tom Tromey  <tom@tromey.com>
7094
7095         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7096         a std::string.
7097         (get_pe_section_index, add_pe_exported_sym): Update.
7098         (read_pe_exported_syms): Use gdb::def_vector.
7099
7100 2018-05-25  Tom Tromey  <tom@tromey.com>
7101
7102         * frame.c (remove_prev_frame): Remove.
7103         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7104
7105 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7106
7107         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7108         Remove prototypes.
7109         * mips-linux-nat.c (supply_fpregset): Always call
7110         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7111         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7112         `mips_fill_fpregset'.
7113         * mips-linux-tdep.c (mips_supply_fpregset)
7114         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7115         (mips_fill_fpregset_wrapper): Remove functions.
7116         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7117         (mips_linux_fpregset): Remove variable.
7118         (mips_linux_iterate_over_regset_sections): Use
7119         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7120         (mips_linux_o32_sigframe_init): Remove comment.
7121
7122 2018-05-25  Pedro Alves  <palves@redhat.com>
7123
7124         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7125         (struct readahead_cache, struct packet_reg, struct
7126         remote_arch_state, class remote_state): Move higher up in the
7127         file.
7128         (remote_target::m_remote_state): Now an object instead of a pointer.
7129         (remote_target::get_remote_state): Adjust.
7130
7131 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7132
7133         * stack.c (select_and_print_frame): Delete.
7134         (struct function_bounds): Move struct within function.
7135         (func_command): Most content moved into new function
7136         find_frame_for_function, use new function, print result, add
7137         function comment.
7138         (find_frame_for_function): New function, now returns a result.
7139
7140 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7141
7142         * stack.c (iterate_over_block_arg_vars): Fix comment.
7143         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7144
7145 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7146
7147         PR gdb/23203
7148         * frame.c
7149         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7150         Define.
7151         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7152         Define.
7153         * frame.h (class scoped_restore_selected_frame): New class.
7154         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7155         of any exception, use scoped_restore_selected_frame to restore the
7156         frame instead.
7157
7158 2018-05-24  Pedro Alves  <palves@redhat.com>
7159
7160         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7161         override.
7162
7163 2018-05-23  Tom Tromey  <tom@tromey.com>
7164
7165         * complaints.c (struct complaints): Remove.
7166         (symfile_complaint_book): Remove.
7167         (series): New global.
7168         (complaint_internal): Update.
7169         (clear_complaints): Update.
7170
7171 2018-05-23  Tom Tromey  <tom@tromey.com>
7172
7173         * complaints.c (counters): New global.
7174         (struct complain): Remove.
7175         (struct complaints) <root>: Remove.
7176         (complaint_sentinel): Remove.
7177         (symfile_complaint_book): Update.
7178         (find_complaint) Remove.
7179         (complaint_internal, clear_complaints): Update.
7180
7181 2018-05-23  Tom Tromey  <tom@tromey.com>
7182
7183         * complaints.c (struct complain) <file, line>: Remove.
7184         (find_complaint): Remove file, line parameters.
7185         (complaint_internal): Update.
7186
7187 2018-05-23  Tom Tromey  <tom@tromey.com>
7188
7189         * complaints.c (vcomplaint): Remove.
7190         (complaint_internal) Merge in contents of vcomplaint.
7191
7192 2018-05-23  Tom Tromey  <tom@tromey.com>
7193
7194         * complaints.c (struct complaints) <explanation>: Remove.
7195         (symfile_explanations): Remove.
7196         (symfile_complaint_book): Update.
7197         (vcomplaint): Update.
7198         (struct explanation): Remove.
7199
7200 2018-05-23  Tom Tromey  <tom@tromey.com>
7201
7202         * complaints.c (symfile_complaints): Remove.
7203         (complaint_internal): Remove "complaints" parameter.
7204         (clear_complaints, vcomplaint): Remove "c" parameter.
7205         (get_complaints): Remove.
7206         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7207         (dwarf2_debug_line_missing_file_complaint)
7208         (dwarf2_debug_line_missing_end_sequence_complaint)
7209         (dwarf2_complex_location_expr_complaint)
7210         (dwarf2_const_value_length_mismatch_complaint)
7211         (dwarf2_section_buffer_overflow_complaint)
7212         (dwarf2_macro_malformed_definition_complaint)
7213         (dwarf2_invalid_attrib_class_complaint)
7214         (create_addrmap_from_index, dw2_symtab_iter_next)
7215         (dw2_expand_marked_cus)
7216         (dw2_debug_names_iterator::find_vec_in_debug_names)
7217         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7218         (create_debug_type_hash_table, init_cutu_and_read_dies)
7219         (partial_die_parent_scope, add_partial_enumeration)
7220         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7221         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7222         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7223         (create_cus_hash_table, create_dwp_hash_table)
7224         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7225         (dwarf2_rnglists_process, dwarf2_ranges_process)
7226         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7227         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7228         (handle_struct_member_die, process_structure_scope)
7229         (read_array_type, read_common_block, read_module_type)
7230         (read_tag_pointer_type, read_typedef, read_base_type)
7231         (read_subrange_type, load_partial_dies, partial_die_info::read)
7232         (partial_die_info::read, partial_die_info::read)
7233         (partial_die_info::read, read_checked_initial_length_and_offset)
7234         (dwarf2_string_attr, read_formatted_entries)
7235         (dwarf_decode_line_header)
7236         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7237         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7238         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7239         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7240         (get_signatured_type, get_DW_AT_signature_type)
7241         (decode_locdesc, file_file_name, consume_improper_spaces)
7242         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7243         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7244         (dwarf2_symbol_mark_computed, set_die_type)
7245         (read_attribute_value): Update.
7246         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7247         Update.
7248         * dbxread.c (unknown_symtype_complaint)
7249         (lbrac_mismatch_complaint, repeated_header_complaint)
7250         (set_namestring, function_outside_compilation_unit_complaint)
7251         (read_dbx_symtab, process_one_symbol): Update.
7252         * gdbtypes.c (stub_noname_complaint): Update.
7253         * windows-nat.c (handle_unload_dll): Update.
7254         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7255         (decode_base_type): Update.
7256         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7257         (eb_complaint, record_include_begin, record_include_end)
7258         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7259         (process_xcoff_symbol, read_symbol)
7260         (function_outside_compilation_unit_complaint)
7261         (scan_xcoff_symtab): Update.
7262         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7263         * buildsym.c (finish_block_internal, make_blockvector)
7264         (end_symtab_get_static_block, augment_type_symtab): Update.
7265         * dtrace-probe.c (dtrace_process_dof)
7266         (dtrace_static_probe_ops::get_probes): Update.
7267         * complaints.h (struct complaint): Don't declare.
7268         (symfile_complaints): Remove.
7269         (complaint_internal): Remove "complaints" parameter.
7270         (complaint): Likewise.
7271         (clear_complaints): Likewise.
7272         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7273         (reread_symbols): Update.
7274         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7275         (dwarf2_frame_cache, decode_frame_entry): Update.
7276         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7277         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7278         (info_selectors_command): Update.
7279         * macrotab.c (macro_include, check_for_redefinition)
7280         (macro_undef): Update.
7281         * objfiles.c (filter_overlapping_sections): Update.
7282         * stabsread.c (invalid_cpp_abbrev_complaint)
7283         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7284         (define_symbol, error_type, read_type, rs6000_builtin_type)
7285         (stabs_method_name_from_physname, read_member_functions)
7286         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7287         (attach_fields_to_type, complain_about_struct_wipeout)
7288         (read_range_type, read_args, common_block_start)
7289         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7290         Update.
7291         * mdebugread.c (index_complaint, unknown_ext_complaint)
7292         (basic_type_complaint, bad_tag_guess_complaint)
7293         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7294         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7295         (parse_procedure, parse_lines)
7296         (function_outside_compilation_unit_complaint)
7297         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7298         (bad_tag_guess_complaint, reg_value_complaint): Update.
7299         * cp-support.c (demangled_name_complaint): Update.
7300         * macroscope.c (sal_macro_scope): Update.
7301         * dwarf-index-write.c (class debug_names): Update.
7302
7303 2018-05-23  Tom Tromey  <tom@tromey.com>
7304
7305         * complaints.c (clear_complaints): Remove "noisy" parameter.
7306         * complaints.h (clear_complaints): Update.
7307         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7308         (reread_symbols): Update.
7309
7310 2018-05-23  Tom Tromey  <tom@tromey.com>
7311
7312         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7313         SUBSEQUENT_MESSAGE.
7314         (vcomplaint, clear_complaints): Update.
7315         (symfile_explanations): Remove some messages.
7316
7317 2018-05-23  Tom Tromey  <tom@tromey.com>
7318
7319         * complaints.c (internal_complaint): Remove.
7320         * complaints.h (internal_complaint): Remove.
7321
7322 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7323
7324         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7325
7326 2018-05-22  Pedro Alves  <palves@redhat.com>
7327
7328         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7329         (remote_fileio_badfd, remote_fileio_return_errno)
7330         (remote_fileio_return_success, remote_fileio_func_open)
7331         (remote_fileio_func_open, remote_fileio_func_close)
7332         (remote_fileio_func_read, remote_fileio_func_write)
7333         (remote_fileio_func_lseek, remote_fileio_func_rename)
7334         (remote_fileio_func_unlink, remote_fileio_func_stat)
7335         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7336         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7337         remote_target parameter.
7338         (remote_fio_func_map) <func>: Add remote_target parameter.
7339         (do_remote_fileio_request, remote_fileio_request):
7340         * remote-fileio.h (remote_fileio_request):
7341         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7342         remote_target parameter.
7343         (remote_notif_process, handle_notification): Adjust to pass down
7344         the remote.
7345         (remote_notif_state_allocate): Add remote_target parameter.  Save
7346         it.
7347         * remote-notif.h (struct remote_target): Forward declare.
7348         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7349         remote_target parameter.
7350         (struct remote_notif_state) <remote>: New field.
7351         (remote_notif_ack, remote_notif_parse): Add remote_target
7352         parameter.
7353         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7354         remote_target parameter.
7355         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7356         (threads_listing_context, rmt_thread_action, protocol_feature)
7357         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7358         (packet_result, struct threads_listing_context, remote_state):
7359         Move definitions and declarations higher up.
7360         (remote_target) <~remote_target>: Declare.
7361         (remote_download_command_source, remote_file_put, remote_file_get)
7362         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7363         (remote_hostio_pread_vFile, remote_hostio_send_command)
7364         (remote_hostio_set_filesystem, remote_hostio_open)
7365         (remote_hostio_close, remote_hostio_unlink, remote_state)
7366         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7367         (get_memory_write_packet_size, get_memory_read_packet_size)
7368         (append_pending_thread_resumptions, remote_detach_1)
7369         (append_resumption, remote_resume_with_vcont)
7370         (add_current_inferior_and_thread, wait_ns, wait_as)
7371         (process_stop_reply, remote_notice_new_inferior)
7372         (process_initial_stop_replies, remote_add_thread)
7373         (btrace_sync_conf, remote_btrace_maybe_reopen)
7374         (remove_new_fork_children, kill_new_fork_children)
7375         (discard_pending_stop_replies, stop_reply_queue_length)
7376         (check_pending_events_prevent_wildcard_vcont)
7377         (discard_pending_stop_replies_in_queue, stop_reply)
7378         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7379         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7380         (remote_interrupt_as, remote_interrupt_ns)
7381         (remote_get_noisy_reply, remote_query_attached)
7382         (remote_add_inferior, remote_current_thread, get_current_thread)
7383         (set_thread, set_general_thread, set_continue_thread)
7384         (set_general_process, write_ptid)
7385         (remote_unpack_thread_info_response, remote_get_threadinfo)
7386         (parse_threadlist_response, remote_get_threadlist)
7387         (remote_threadlist_iterator, remote_get_threads_with_ql)
7388         (remote_get_threads_with_qxfer)
7389         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7390         (get_offsets, remote_check_symbols, remote_supported_packet)
7391         (remote_query_supported, remote_packet_size)
7392         (remote_serial_quit_handler, remote_detach_pid)
7393         (remote_vcont_probe, remote_resume_with_hc)
7394         (send_interrupt_sequence, interrupt_query)
7395         (remote_notif_get_pending_events, fetch_register_using_p)
7396         (send_g_packet, process_g_packet, fetch_registers_using_g)
7397         (store_register_using_P, store_registers_using_G)
7398         (set_remote_traceframe, check_binary_download)
7399         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7400         (remote_xfer_live_readonly_partial, remote_read_bytes)
7401         (remote_send_printf, remote_flash_write, readchar)
7402         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7403         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7404         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7405         (extended_remote_disable_randomization, extended_remote_run)
7406         (send_environment_packet, extended_remote_environment_support)
7407         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7408         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7409         (packet_command): Now methods of ...
7410         (remote_target): ... this class.
7411         (m_remote_state) <remote_target>: New field.
7412         (struct remote_state) <stop_reply_queue,
7413         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7414         fields.
7415         (remote_state::remote_state): Allocate stop_reply_queue.
7416         (remote_state): Delete global.
7417         (get_remote_state_raw): Delete.
7418         (remote_target::get_remote_state): Allocate m_remote_state on
7419         demand.
7420         (get_current_remote_target): New.
7421         (remote_ops, extended_remote_ops): Delete.
7422         (wait_forever_enabled_p, remote_async_inferior_event_token):
7423         Delete, moved to struct remote_state.
7424         (remote_target::close): Delete self.  Destruction bits split to
7425         ...
7426         (remote_target::~remote_target): ... this.
7427         (show_memory_packet_size): Adjust to use
7428         get_current_remote_target.
7429         (struct protocol_feature) <func>: Add remote_target parameter.
7430         All callers adjusted.
7431         (curr_quit_handler_target): New.
7432         (remote_serial_quit_handler): Reimplement.
7433         (remote_target::open_1): Adjust to use get_current_remote_target.
7434         Heap-allocate remote_target/extended_remote_target instances.
7435         (vcont_builder::vcont_builder): Add remote_target parameter, and
7436         save it in m_remote.  All callers adjusted.
7437         (vcont_builder::m_remote): New field.
7438         (vcont_builder::restart, vcont_builder::flush)
7439         (vcont_builder::push_action): Use it.
7440         (remote_target::commit_resume): Use it.
7441         (struct queue_iter_param) <remote>: New field.
7442         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7443         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7444         (check_pending_event_prevents_wildcard_vcont_callback)
7445         (remote_target::check_pending_events_prevent_wildcard_vcont)
7446         (remote_target::discard_pending_stop_replies)
7447         (remote_target::discard_pending_stop_replies_in_queue)
7448         (remote_target::remote_notif_remove_queued_reply): Fill in
7449         'remote' field.
7450         (remote_notif_get_pending_events): New.
7451         (remote_target::readchar, remote_target::remote_serial_write):
7452         Save/restore curr_quit_handler_target.
7453         (putpkt): New.
7454         (kill_new_fork_children): Fill in 'remote' field.
7455         (packet_command): Use get_current_remote_target, defer to
7456         remote_target method of same name.
7457         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7458         parameter, and save it in m_remote.  All callers adjusted.
7459         (scoped_remote_fd::release): Use m_remote.
7460         (scoped_remote_fd::m_remote): New field.
7461         (remote_file_put, remote_file_get, remote_file_delete): Use
7462         get_current_remote_target, defer to remote_target method of same
7463         name.
7464         (remote_btrace_reset): Add remote_state paremeter.  Update all
7465         callers.
7466         (remote_async_inferior_event_handler). Pass down 'data'.
7467         (remote_new_objfile): Use get_current_remote_target.
7468         (remote_target::vcont_r_supported): New.
7469         (set_range_stepping): Use get_current_remote_target and
7470         remote_target::vcont_r_supported.
7471         (_initialize_remote): Don't allocate 'remote_state' and
7472         'stop_reply_queue' globals.
7473         * remote.h (struct remote_target): Forward declare.
7474         (getpkt, putpkt, remote_notif_get_pending_events): Add
7475         'remote_target' parameter.
7476
7477 2018-05-22  Pedro Alves  <palves@redhat.com>
7478
7479         * remote.c (vcont_builder): Now a class.  Make all data members
7480         private.
7481         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7482         Declare methods.
7483         (vcont_builder_restart): Rename to ...
7484         (vcont_builder::restart): ... this.
7485         (vcont_builder_flush): Rename to ...
7486         (vcont_builder::flush): ... this.
7487         (vcont_builder_push_action): Rename to ...
7488         (vcont_builder::push_action): ... this.
7489         (remote_target::commit_resume): Adjust.
7490
7491 2018-05-22  Pedro Alves  <palves@redhat.com>
7492
7493         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7494         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7495         (get_fixed_memory_packet_size): New.
7496         (get_memory_packet_size): Use it.
7497         (set_memory_packet_size): Don't override the config size with
7498         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7499         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7500         Don't refer to get_memory_packet_size if not connected to a remote
7501         target.  Show "(default)" if configured size is 0.
7502
7503 2018-05-22  Pedro Alves  <palves@redhat.com>
7504
7505         * remote.c (remote_target::mourn_inferior): Move
7506         discard_pending_stop_replies call here from ...
7507         (_initialize_remote): ... here.
7508
7509 2018-05-22  Pedro Alves  <palves@redhat.com>
7510
7511         * remote.c (compare_section_command): Remove set_general_process
7512         call.
7513
7514 2018-05-22  Pedro Alves  <palves@redhat.com>
7515
7516         * remote.c (struct packet_reg, struct remote_arch_state):
7517         Move higher up in the file.
7518         (remote_state) <m_arch_states>: Store remote_arch_state values
7519         instead of remote_arch_state pointers.
7520         (remote_state::get_remote_arch_state): Adjust.
7521
7522 2018-05-22  Pedro Alves  <palves@redhat.com>
7523
7524         * remote.c: Include <unordered_map>.
7525         (remote_state): Now a class.
7526         (remote_state) <get_remote_arch_state>: Declare method.
7527         <get_remote_arch_state>: New field.
7528         (remote_arch_state) <remote_arch_state>: Declare ctor.
7529         <regs>: Now a unique_ptr.
7530         (remote_gdbarch_data_handle): Delete.
7531         (get_remote_arch_state): Delete.
7532         (remote_state::get_remote_arch_state): New.
7533         (get_remote_state): Adjust to call remote_state's
7534         get_remote_arch_state method.
7535         (init_remote_state): Delete, bits factored out to ...
7536         (remote_arch_state::remote_arch_state): ... this new method.
7537         (get_remote_packet_size, get_memory_packet_size)
7538         (process_g_packet, remote_target::fetch_registers)
7539         (remote_target::prepare_to_store, store_registers_using_G)
7540         (remote_target::store_registers, remote_target::get_trace_status):
7541         Adjust to call remote_state's method.
7542         (_initialize_remote): Remove reference to
7543         remote_gdbarch_data_handle.
7544
7545 2018-05-22  Pedro Alves  <palves@redhat.com>
7546
7547         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7548         pread>: New method declarations.
7549         (remote_target::open_1): Adjust.
7550         (readahead_cache_invalidate): Rename to ...
7551         (readahead_cache::invalidate): ... this, and adjust to be a class
7552         method.
7553         (readahead_cache_invalidate_fd): Rename to ...
7554         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7555         class method.
7556         (remote_hostio_pwrite): Adjust.
7557         (remote_hostio_pread_from_cache): Rename to ...
7558         (readahead_cache::pread): ... this, and adjust to be a class
7559         method.
7560         (remote_hostio_close): Adjust.
7561
7562 2018-05-22  Pedro Alves  <palves@redhat.com>
7563
7564         * remote.c (remote_hostio_close_cleanup): Delete.
7565         (class scoped_remote_fd): New.
7566         (remote_file_put, remote_file_get): Use it.
7567
7568 2018-05-22  Pedro Alves  <palves@redhat.com>
7569
7570         (struct vCont_action_support): Use bool and initialize all fields.
7571         (struct readahead_cache): Initialize all fields.
7572         (remote_state): Use bool and initialize all fields.
7573         (remote_state::remote_state, remote_state::~remote_state): New.
7574         (new_remote_state): Delete.
7575         (_initialize_remote): Use new to allocate remote_state.
7576
7577 2018-05-22  Pedro Alves  <palves@redhat.com>
7578             張俊芝  <zjz@zjz.name>
7579
7580         PR gdb/22973
7581         * c-exp.y: Include "c-support.h".
7582         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7583         of tolower.  Use c_ident_is_alpha to scan names.
7584         * c-lang.c: Include "c-support.h".
7585         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7586         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7587         * c-support.h: New file, with bits factored out from ...
7588         * cp-name-parser.y: ... this file.
7589         Include "c-support.h".
7590         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7591         c-support.h and renamed.
7592         (symbol_end, yylex): Adjust.
7593
7594 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7595
7596         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7597         parameter type to CORE_ADDR.
7598         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7599         parameter type in declaration to CORE_ADDR.
7600         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7601         target_auxv_search to get AT_HWCAP and use the result to get the
7602         target description.
7603         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7604         to CORE_ADDR. Remove the cast of the return value to unsigned
7605         long. Fix error predicate of target_auxv_search.
7606         (ppc_linux_nat_target::read_description): Change the type of the
7607         hwcap variable to CORE_ADDR.
7608
7609 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7610
7611         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7612         if the size of fpscr is larger than 32 bits.
7613
7614 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7615
7616         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7617         (ppc32_linux_vsxregmap): New global.
7618         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7619         regcache_supply_regset, and regcache_collect_regset.
7620         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7621         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7622         (fetch_vsx_register, store_vsx_register): Remove.
7623         (fetch_vsx_registers): Add regno parameter. Get regset using
7624         ppc_linux_vsxregset. Use regset to supply registers.
7625         (store_vsx_registers): Add regno parameter. Get regset using
7626         ppc_linux_vsxregset. Use regset to collect registers.
7627         (fetch_register): Call fetch_vsx_registers instead of
7628         fetch_vsx_register.
7629         (store_register): Call store_vsx_registers instead of
7630         store_vsx_register.
7631         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7632         new regno parameter.
7633         (store_ppc_registers): Call store_vsx_registers with -1 for the
7634         new regno parameter.
7635         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7636         (ppc_collect_vsxregset): Remove.
7637
7638 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7639
7640         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7641         offset fields.
7642         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7643         for vector register offset fields.
7644         (ppc64_fbsd_reg_offsets): Likewise.
7645         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7646         to vector register offset fields.
7647         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7648         to vector register offset fields.
7649         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7650         vector register offset fields.
7651         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7652         initializers for vector register offset fields.
7653         (rs6000_aix64_reg_offsets): Likewise.
7654         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7655         (ppc_supply_vrregset): Remove.
7656         (ppc_collect_vrregset): Remove.
7657         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7658         (ppc_linux_vrregset) : New function.
7659         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7660         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7661         (ppc32_linux_vrregset): Remove.
7662         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7663         and use result instead of ppc32_linux_vrregset.
7664         (ppc32_linux_reg_offsets): Remove initializers for vector register
7665         offset fields.
7666         (ppc64_linux_reg_offsets): Likewise.
7667         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7668         * ppc-linux-nat.c: Include regset.h.
7669         (gdb_vrregset_t): Adjust comment to account for little-endian
7670         mode.
7671         (supply_vrregset, fill_vrregset): Remove.
7672         (fetch_altivec_register, store_altivec_register): Remove.
7673         (fetch_altivec_registers): Add regno parameter. Get regset using
7674         ppc_linux_vrregset. Use regset to supply registers.
7675         (store_altivec_registers): Add regno parameter. Get regset using
7676         ppc_linux_vrregset. Use regset to collect registers.
7677         (fetch_register): Call fetch_altivec_registers instead of
7678         fetch_altivec_register.
7679         (store_register): Call store_altivec_registers instead of
7680         store_altivec_register.
7681         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7682         the new regno parameter.
7683         (store_ppc_registers): Call store_altivec_registers with -1 for
7684         the new regno parameter.
7685
7686 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7687
7688         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7689         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7690         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7691         (gdb_vrregset_t): Change array type size to
7692         PPC_LINUX_SIZEOF_VRREGSET.
7693         (gdb_vsxregset_t): Change array type size to
7694         PPC_LINUX_SIZEOF_VSXREGSET.
7695         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7696         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7697         PPC_LINUX_SIZEOF_VSXREGSET.
7698
7699 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7700
7701         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7702         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7703         nat/ppc-linux.c.
7704         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7705         ppc_linux_target_wordsize with tid.
7706         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7707         wordsize with tid.
7708         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7709         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7710         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7711         tid parameter. Remove static specifier.
7712         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7713         (ppc_linux_target_wordsize): New declaration.
7714
7715 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7716
7717         * arch/ppc-linux-common.c: New file.
7718         * arch/ppc-linux-common.h: New file.
7719         * arch/ppc-linux-tdesc.h: New file.
7720         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7721         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7722         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7723         arch/ppc-linux-tdesc.h.
7724         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7725         arch/ppc-linux-tdesc.h.
7726         (ppc_linux_nat_target::read_description): Remove target
7727         description matching code. Fill a ppc_linux_features struct and
7728         call ppc_linux_match_description with it. Move comment about ISA
7729         2.05 to ppc-linux-common.c.
7730         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7731         arch/ppc-linux-tdesc.h.
7732         (ppc_linux_core_read_description): Remove target description
7733         matching code. Fill a ppc_linux_features struct and call
7734         ppc_linux_match_description with it.
7735         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7736         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7737         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7738         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7739         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7740         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7741         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7742         (tdesc_powerpc_e500l): Remove.
7743
7744 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7745
7746         * ada-lang.c (catch_assert_command): Pass empty string instead
7747         of NULL for excep_string argument.
7748
7749 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7750
7751         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7752         the width of the requested register exceeds the width of the
7753         `ptrace' data type.
7754
7755 2018-05-21  Tom Tromey  <tom@tromey.com>
7756
7757         * printcmd.c (output_command): Remove.
7758         (output_command_const): Rename to output_command.
7759         * valprint.h (output_command): Rename from output_command_const.
7760         * tracepoint.c (trace_dump_actions): Call output_command.
7761
7762 2018-05-21  Tom Tromey  <tom@tromey.com>
7763
7764         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7765         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7766         * ada-lang.h (create_ada_exception_catchpoint): Update.
7767         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7768         std::string.
7769         (create_excep_cond_exprs, ~ada_catchpoint)
7770         (should_stop_exception, print_one_exception)
7771         (print_mention_exception, print_recreate_exception): Update.
7772         (ada_get_next_arg): Remove.
7773         (catch_ada_exception_command_split): Use std::string.  Change type
7774         of "excep_string", "cond_string".
7775         (catch_ada_exception_command): Update.
7776         (create_ada_exception_catchpoint): Change type of excep_string.
7777         (ada_exception_sal): Remove excep_string parameter.
7778         (~ada_catchpoint): Remove.
7779
7780 2018-05-21  Tom Tromey  <tom@tromey.com>
7781
7782         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7783         cleanup.
7784
7785 2018-05-21  Tom Tromey  <tom@tromey.com>
7786
7787         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7788         Return unique_xmalloc_ptr.
7789         (print_it_exception): Update.
7790
7791 2018-05-21  Tom Tromey  <tom@tromey.com>
7792
7793         * tracepoint.c (trace_dump_actions): Use std::string.
7794
7795 2018-05-21  Tom Tromey  <tom@tromey.com>
7796
7797         * symfile.c (reread_symbols): Use std::string for original_name.
7798
7799 2018-05-21  Tom Tromey  <tom@tromey.com>
7800
7801         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7802         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7803         constructor.
7804
7805 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7806
7807         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7808         instance to...
7809         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7810         * objfiles.c (get_objfile_bfd_data): Allocate
7811         objfile_per_bfd_storage with obstack_new when allocating on
7812         obstack.
7813
7814 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7815
7816         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7817         OBSTACK_ZALLOC.
7818         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7819         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7820         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7821         (add_pending): Likewise.
7822         (parse_symbol): Likewise.
7823         (parse_partial_symbols): Likewise.
7824         (psymtab_to_symtab_1): Likewise.
7825         (new_psymtab): Likewise.
7826         (elfmdebug_build_psymtabs): Likewise.
7827         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7828         * objfiles.c (get_objfile_bfd_data): Likewise.
7829         (objfile_register_static_link): Likewise.
7830         * psymtab.c (allocate_psymtab): Likewise.
7831         * stabsread.c (read_member_functions): Likewise.
7832         * xcoffread.c (xcoff_end_psymtab): Likewise.
7833
7834 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7835
7836         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7837         compiler supports std::is_trivially_constructible.
7838         * common/poison.h: Include obstack.h.
7839         (IsMallocable): Define to is_trivially_constructible if the
7840         compiler supports it, define to true_type otherwise.
7841         (xobnew): New.
7842         (XOBNEW): Redefine.
7843         (xobnewvec): New.
7844         (XOBNEWVEC): Redefine.
7845         * gdb_obstack.h (obstack_zalloc): New.
7846         (OBSTACK_ZALLOC): Redefine.
7847         (obstack_calloc): New.
7848         (OBSTACK_CALLOC): Redefine.
7849         (obstack_new): New.
7850         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7851         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7852         gdbarch.c.
7853         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7854         obstack_calloc/obstack_zalloc.
7855         (gdbarch_obstack_zalloc): Remove.
7856         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7857
7858 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7859
7860         * stack.c (backtrace_command_1): Remove useless variable int i.
7861
7862 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7863
7864         * stack.c (print_frame_info): Fix comment.
7865
7866 2018-05-18  Tom Tromey  <tom@tromey.com>
7867
7868         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7869         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7870         (~dwarf2_per_objfile): Update
7871         (dwarf2_get_dwz_file): Use new.
7872         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7873         unique_ptr.
7874
7875 2018-05-18  Tom Tromey  <tom@tromey.com>
7876
7877         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7878         unique_ptr.
7879         * dwarf2read.c (struct dwp_file): Add constructor and
7880         initializers.
7881         (open_and_init_dwp_file): Return a unique_ptr.
7882         (dwarf2_per_objfile, create_dwp_hash_table)
7883         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7884         (lookup_dwo_unit_in_dwp): Update.
7885         (open_and_init_dwp_file, get_dwp_file): Update.
7886
7887 2018-05-18  Tom Tromey  <tom@tromey.com>
7888
7889         * dwarf2read.c (dwarf2_per_objfile): Update.
7890         (struct mapped_index): Add initializers.
7891         (dwarf2_read_index): Use new.
7892         (dw2_symtab_iter_init): Update.
7893         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7894         unique_ptr.
7895
7896 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7897
7898         * dwarf2read.c (mapped_index) <total_size>: Remove.
7899
7900 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7901
7902         * unittests/format_pieces-selftests.c (test_format_specifier):
7903         Add ARI comments.
7904
7905 2018-05-18  Tom Tromey  <tom@tromey.com>
7906
7907         * c-typeprint.c (maybe_print_hole): New function.
7908         (c_print_type_struct_field_offset): Update.
7909         (c_type_print_base_struct_union): Call maybe_print_hole.
7910
7911 2018-05-17  Keith Seitz  <keiths@redhat.com>
7912
7913         * breakpoint.c (build_bpstat_chain): New function, moved from
7914         bpstat_stop_status.
7915         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7916         If no stop chain is passed, call build_bpstat_chain to build it.
7917         * breakpoint.h (build_bpstat_chain): Declare.
7918         (bpstat_stop_status): Move documentation here from breakpoint.c.
7919         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7920         build the stop chain and pass it to skip_inline_frames.
7921         Pass this stop chain to bpstat_stop_status.
7922         * inline-frame.c: Include breakpoint.h.
7923         (stopped_by_user_bp_inline_frame): New function.
7924         (skip_inline_frames): Add parameter `stop_chain'.
7925         Move documention to inline-frame.h.
7926         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7927         whether the frame should be elided.
7928         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7929         Add moved documentation and update for new parameter.
7930
7931 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7932
7933         PR cli/14975
7934         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7935         unittests/format_pieces-selftests.c.
7936         * common/format.h (format_piece) <operator==>: New.
7937         (format_pieces) <operator[]>: Remove.
7938         * common/format.c (format_pieces::format_pieces): Handle \e.
7939         * unittests/format_pieces-selftests.c: New.
7940
7941 2018-05-17  Tom Tromey  <tom@tromey.com>
7942
7943         PR symtab/23010:
7944         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7945         (dw2_instantiate_symtab): Add skip_partial parameter.
7946         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7947         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7948         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7949         (dw2_expand_symtabs_matching_one)
7950         (dw2_find_pc_sect_compunit_symtab)
7951         (dw2_debug_names_lookup_symbol)
7952         (dw2_debug_names_expand_symtabs_for_function): Update.
7953         (init_cutu_and_read_dies): Add skip_partial parameter.
7954         (process_psymtab_comp_unit, build_type_psymtabs_1)
7955         (process_skeletonless_type_unit, load_partial_comp_unit)
7956         (psymtab_to_symtab_1): Update.
7957         (load_full_comp_unit): Add skip_partial parameter.
7958         (process_imported_unit_die, dwarf2_read_addr_index)
7959         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7960         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7961         (read_signatured_type): Update.
7962
7963 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7964
7965         * value.c (release_value): Remove unused variable.
7966         (record_latest_value): Likewise.
7967         (access_value_history): Likewise.
7968         (preserve_values): Likewise.
7969
7970 2018-05-17  Tom Tromey  <tom@tromey.com>
7971
7972         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7973         Initialize.
7974
7975 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7976
7977         PR gdb/22286
7978         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7979         Also handle registers whose width is not a multiple of
7980         PTRACE_TYPE_RET.
7981         (linux_nat_trad_target::store_register): Likewise.
7982
7983 2018-05-16  Tom Tromey  <tom@tromey.com>
7984
7985         * gdbcore.h (core_bfd): Redefine.
7986         * corelow.c (core_target::close): Update.
7987         (core_target_open): Update.
7988         * progspace.h (struct program_space) <cbfd>: Now a
7989         gdb_bfd_ref_ptr.
7990
7991 2018-05-16  Tom Tromey  <tom@tromey.com>
7992
7993         PR cli/19551:
7994         * symfile-add-flags.h (enum symfile_add_flags)
7995         <SYMFILE_NOT_FILENAME>: New constant.
7996         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7997         objfile name from BFD.
7998         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7999         * minidebug.c (find_separate_debug_file_in_section): Put
8000         ".gnu_debugdata" into BFD's file name.
8001
8002 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8003
8004         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8005         Remove.
8006
8007 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8008
8009         PR binutils/21446
8010         * aarch64-tdep.c (aarch64_analyze_prologue,
8011         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8012         Indicate not interested in errors.
8013
8014 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8015
8016         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8017         Supply the MIPS_ZERO_REGNUM register.
8018
8019 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8020
8021         * mips-tdep.c (mask_address_var): Make variable static.
8022
8023 2018-05-14  Tom Tromey  <tom@tromey.com>
8024
8025         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8026
8027 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8028
8029         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8030         FXSAVE_ADDR for the mxcsr register.
8031
8032 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8033
8034         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8035
8036 2018-05-11  Pedro Alves  <palves@redhat.com>
8037
8038         * corelow.c (core_target) <core_target>: No longer inline.
8039         Initialize m_core_gdbarch, m_core_vec and build the section table
8040         here.
8041         <~core_target>: New.
8042         <core_gdbarch, get_core_register_section>: New methods.
8043         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8044         factored out from ...
8045         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8046         (core_ops): Delete.
8047         (sniff_core_bfd): Add gdbarch parameter.
8048         (core_close): Delete, merged into ...
8049         (core_target::close): ... here.  Delete self.
8050         (core_close_cleanup): Delete.
8051         (core_target_open): Allocate a core_target on the heap.  Use a
8052         unique_ptr instead of a cleanup.  Bits moved into the core_target
8053         ctor.  Adjust to use core_target methods instead of globals.
8054         (get_core_register_section): Rename to ...
8055         (core_target::get_core_register_section): ... this and adjust.
8056         (struct get_core_registers_cb_data): New.
8057         (get_core_registers_cb): Use it.  Use bool.
8058         (core_target::fetch_registers, core_target::files_info)
8059         (core_target::xfer_partial, core_target::read_description)
8060         (core_target::pid_to, core_target::thread_name): Adjust to
8061         reference class fields instead of globals.
8062         * target.h (struct target_ops_deleter, target_ops_up): New.
8063
8064 2018-05-11  Pedro Alves  <palves@redhat.com>
8065
8066         * corefile.c (core_file_command): Move to corelow.c.
8067         * corelow.c (the_core_target): Delete.
8068         (core_file_command): Moved from corefile.c.  Check exec_bfd
8069         instead of the_core_target.  Use target_detach instead of calling
8070         into the_core_target directly.
8071         (maybe_say_no_core_file_now): New.
8072         (core_target::detach): Use it.
8073         (_initialize_corelow): Remove references to the_core_target.
8074         * gdbcore.h (the_core_target): Delete.
8075
8076 2018-05-11  Tom Tromey  <tromey@redhat.com>
8077             Pedro Alves  <palves@redhat.com>
8078
8079         * corefile.c (core_bfd): Remove.
8080         * gdbcore.h (core_bfd): Now a macro.
8081         * progspace.h (struct program_space) <cbfd>: New field.
8082
8083 2018-05-11  Tom Tromey  <tom@tromey.com>
8084
8085         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8086         gdb::def_vector.
8087
8088 2018-05-10  Tom Tromey  <tom@tromey.com>
8089
8090         * configure: Rebuild.
8091         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8092
8093 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8094
8095         PR server/23158:
8096         * regformats/regdat.sh: Adjust script, following the addition
8097         of the new expedite_regs parameter to init_target_desc.
8098
8099 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8100     
8101         PR gdb/23127
8102         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8103         set_gdbarch_significant_addr_bit.
8104         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8105         set_gdbarch_significant_addr_bit.
8106         * utils.c (address_significant): Update to sign extend addr.
8107
8108 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8109
8110         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8111         (xtensa_linux_init_abi): Limit tdep->num_regs by
8112         tdep->num_nopriv_regs.
8113         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8114         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8115         not initialized.
8116
8117 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8118
8119         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8120
8121 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8122
8123         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8124         (I387_MXCSR_INIT_VAL): New constant.
8125         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8126         buffer if it was supplied by the inferior.
8127         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8128         (i387_xsave_get_clear_bv): New function.
8129         (i387_supply_xsave): Only read x87 control registers from the
8130         xsave buffer if the feature is enabled, and the state will have
8131         been written, otherwise, provide a suitable default.
8132         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8133         including x87 control registers.  Update control registers if they
8134         have changed from the default value, and mark features as enabled
8135         as required.
8136         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8137
8138 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8139
8140         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8141
8142 2018-05-07  Tom Tromey  <tom@tromey.com>
8143
8144         * configure: Rebuild.
8145         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8146
8147 2018-05-07  Tom Tromey  <tom@tromey.com>
8148
8149         PR tdep/20362:
8150         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8151         bit.  Use correct value for VDIV.
8152
8153 2018-05-04  Tom Tromey  <tom@tromey.com>
8154
8155         * configure: Rebuild.
8156         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8157
8158 2018-05-04  Tom Tromey  <tom@tromey.com>
8159
8160         * linux-record.c (record_linux_system_call) <case
8161         RECORD_SYS_RECVFROM>: Add "break".
8162
8163 2018-05-04  Tom Tromey  <tom@tromey.com>
8164
8165         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8166         Add missing "break".
8167         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8168         Add missing "break".
8169
8170 2018-05-04  Tom Tromey  <tom@tromey.com>
8171
8172         * rs6000-tdep.c (ppc_process_record_op4)
8173         (ppc_process_record_op63): Add fall-through comment.
8174
8175 2018-05-04  Tom Tromey  <tom@tromey.com>
8176
8177         * i386-tdep.c (i386_process_record): Add fall-through comment.
8178
8179 2018-05-04  Tom Tromey  <tom@tromey.com>
8180
8181         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8182         comment.
8183
8184 2018-05-04  Tom Tromey  <tom@tromey.com>
8185
8186         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8187         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8188         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8189         comment.
8190         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8191         comment.
8192         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8193         comment.
8194
8195 2018-05-04  Tom Tromey  <tom@tromey.com>
8196
8197         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8198
8199 2018-05-04  Tom Tromey  <tom@tromey.com>
8200
8201         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8202         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8203         * symfile.c (section_is_mapped): Fix fall-through comment.
8204         * stabsread.c (define_symbol, read_member_functions): Fix
8205         fall-through comment.
8206         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8207         comment.
8208         * remote.c (remote_wait_as): Fix fall-through comment.
8209         * p-exp.y (yylex): Fix fall-through comment.
8210         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8211         comment.
8212         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8213         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8214         * jv-exp.y (yylex): Fix fall-through comment.
8215         * go-exp.y (lex_one_token): Fix fall-through comment.
8216         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8217         fall-through comment.
8218         * f-exp.y (yylex): Fix fall-through comment.
8219         * dwarf2read.c (process_die): Fix fall-through comments.
8220         * dbxread.c (process_one_symbol): Fix fall-through comment.
8221         * d-exp.y (lex_one_token): Fix fall-through comment.
8222         * cp-name-parser.y (yylex): Fix fall-through comment.
8223         * coffread.c (coff_symtab_read): Fix fall-through comment.
8224         * c-exp.y (lex_one_token): Fix fall-through comment.
8225         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8226         comment.
8227         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8228         comment.
8229
8230 2018-05-04  Tom Tromey  <tom@tromey.com>
8231
8232         PR python/22730:
8233         * NEWS: Mention gdb.execute change.
8234         * gdbcmd.h (execute_control_command): Don't declare.
8235         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8236         execute_control_commands, execute_control_commands_to_string.
8237         * cli/cli-script.h (execute_control_commands)
8238         (execute_control_commands_to_string): Declare.
8239         (execute_control_command): Add from_tty parameter.
8240         * cli/cli-script.c (execute_control_commands)
8241         (execute_control_commands_to_string): New functions.
8242         (execute_user_command): Use execute_control_commands.
8243         (execute_control_command_1): Add "from_tty" parameter.  Update.
8244         (execute_control_command): Likewise.
8245
8246 2018-05-04  Tom Tromey  <tom@tromey.com>
8247
8248         PR python/22731:
8249         * NEWS: Mention that breakpoint commands are writable.
8250         * python/py-breakpoint.c (bppy_set_commands): New function.
8251         (breakpoint_object_getset) <"commands">: Use it.
8252
8253 2018-05-04  Tom Tromey  <tom@tromey.com>
8254
8255         * tracepoint.c (actions_command): Update.
8256         * mi/mi-cmd-break.c (mi_command_line_array)
8257         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8258         (mi_read_next_line): Remove.
8259         (mi_cmd_break_commands): Update.
8260         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8261         function_view.
8262         * cli/cli-script.c (get_command_line): Update.
8263         (process_next_line): Use function_view.  Constify.
8264         (recurse_read_control_structure, read_command_lines)
8265         (read_command_lines_1): Change argument types to function_view.
8266         (do_define_command, document_command): Update.
8267         * breakpoint.h (check_tracepoint_command): Don't declare.
8268         * breakpoint.c (check_tracepoint_command): Remove.
8269         (commands_command_1, create_tracepoint_from_upload): Update.
8270
8271 2018-05-04  Tom Tromey  <tom@tromey.com>
8272
8273         PR gdb/11750:
8274         * cli/cli-script.h (enum command_control_type) <define_control>:
8275         New constant.
8276         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8277         (build_command_line, execute_control_command_1)
8278         (process_next_line): Likewise.
8279         (do_define_command): New function, extracted from define_command.
8280         (define_command): Use it.
8281
8282 2018-05-04  Tom Tromey  <tom@tromey.com>
8283
8284         * tracepoint.c (actions_command): Update.
8285         * cli/cli-script.h (read_command_lines): Update.
8286         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8287         (MAX_TMPBUF): Remove define.
8288         (define_command): Use string_printf.
8289         (document_command): Likewise.
8290         * breakpoint.c (commands_command_1): Update.
8291
8292 2018-05-04  Tom Tromey  <tom@tromey.com>
8293
8294         * top.c (execute_command): Update.
8295         * cli/cli-script.h (print_command_lines): Now varargs.
8296         * cli/cli-script.c (print_command_lines): Now varargs.
8297         (execute_control_command_1) <case while_control, case if_control>:
8298         Update.
8299
8300 2018-05-04  Tom Tromey  <tom@tromey.com>
8301
8302         * tracepoint.c (all_tracepoint_actions): Rename from
8303         all_tracepoint_actions_and_cleanup.  Change return type.
8304         (actions_command, encode_actions_1, encode_actions)
8305         (trace_dump_actions, tdump_command): Update.
8306         * remote.c (remote_download_command_source): Update.
8307         * python/python.c (gdbpy_eval_from_control_command)
8308         (python_command, python_interactive_command): Update.
8309         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8310         * guile/guile.c (guile_command)
8311         (gdbscm_eval_from_control_command, guile_command): Update.
8312         * compile/compile.c (compile_code_command)
8313         (compile_print_command, compile_to_object): Update.
8314         * cli/cli-script.h (struct command_lines_deleter): New.
8315         (counted_command_line): New typedef.
8316         (struct command_line): Add constructor, destructor.
8317         <body_list>: Remove.
8318         <body_list_0, body_list_1>: New members.
8319         (command_line_up): Remove typedef.
8320         (read_command_lines, read_command_lines_1, get_command_line):
8321         Update.
8322         (copy_command_lines): Don't declare.
8323         * cli/cli-script.c (build_command_line): Use "new".
8324         (get_command_line): Return counted_command_line.
8325         (print_command_lines, execute_user_command)
8326         (execute_control_command_1, while_command, if_command): Update.
8327         (realloc_body_list): Remove.
8328         (process_next_line, recurse_read_control_structure): Update.
8329         (read_command_lines, read_command_lines_1): Return counted_command_line.
8330         (free_command_lines): Use "delete".
8331         (copy_command_lines): Remove.
8332         (define_command, document_command, show_user_1): Update.
8333         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8334         a counted_command_line.
8335         * breakpoint.h (counted_command_line): Remove typedef.
8336         (breakpoint_set_commands): Update.
8337         * breakpoint.c (check_no_tracepoint_commands)
8338         (validate_commands_for_breakpoint): Update.
8339         (breakpoint_set_commands): Change commands to be a
8340         counted_command_line.
8341         (commands_command_1, update_dprintf_command_list)
8342         (create_tracepoint_from_upload): Update.
8343
8344 2018-05-04  Tom Tromey  <tom@tromey.com>
8345
8346         * cli/cli-decode.h (cmd_list_element): New constructor.
8347         (~cmd_list_element): New destructor.
8348         (struct cmd_list_element): Add initializers.
8349         * cli/cli-decode.c (do_add_cmd): Use "new".
8350         (delete_cmd): Use "delete".
8351
8352 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8353             Pedro Alves <palves@redhat.com>
8354
8355         PR breakpoints/19806 and support for PR external/20207.
8356         * NEWS: Mention Aarch64 watchpoint improvements.
8357         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8358         watchpoints and PR external/20207 watchpoints.
8359         * nat/aarch64-linux-hw-point.c
8360         (kernel_supports_any_contiguous_range): New.
8361         (aarch64_watchpoint_offset): New.
8362         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8363         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8364         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8365         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8366         next_addr_orig_p.  Support PR external/20207 watchpoints.
8367         (aarch64_downgrade_regs): New.
8368         (aarch64_dr_state_insert_one_point): New parameters offset and
8369         addr_orig.
8370         (aarch64_dr_state_remove_one_point): Likewise.
8371         (aarch64_handle_breakpoint): Update caller.
8372         (aarch64_handle_aligned_watchpoint): Likewise.
8373         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8374         aligned_offset.
8375         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8376         aarch64_downgrade_regs.
8377         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8378         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8379         (DR_CONTROL_MASK): ... this.
8380         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8381         (unsigned int aarch64_watchpoint_offset): New prototype.
8382         (aarch64_linux_set_debug_regs): Remove const from state.
8383         * utils.c (align_up, align_down): Move to ...
8384         * common/common-utils.c (align_up, align_down): ... here.
8385         * utils.h (align_up, align_down): Move to ...
8386         * common/common-utils.h (align_up, align_down): ... here.
8387
8388 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8389
8390         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8391         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8392         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8393         Re-implement to match the ABI as summarized in GCC's
8394         gcc/config/sparc/sparc.c.  All callers updated.
8395         (sparc32_store_arguments): Remove assertion.
8396
8397 2018-05-04  Tom Tromey  <tom@tromey.com>
8398
8399         * printcmd.c: Don't include tui.h.
8400         (decode_format): Use skip_spaces.
8401
8402 2018-05-04  Tom Tromey  <tom@tromey.com>
8403
8404         PR gdb/22619:
8405         * printcmd.c (last_count): New global.
8406         (x_command): Use saved count when repeating.
8407
8408 2018-05-04  Tom Tromey  <tom@tromey.com>
8409
8410         * nto-procfs.c (do_closedir_cleanup): Remove.
8411         (procfs_pidlist): Use gdb_dir_up.
8412         * procfs.c (do_closedir_cleanup): Remove.
8413         (proc_update_threads): Use gdb_dir_up.
8414         * common/filestuff.h (struct gdb_dir_deleter): New.
8415         (gdb_dir_up): New typedef.
8416
8417 2018-05-04  Tom Tromey  <tom@tromey.com>
8418
8419         * ada-lang.c (print_mention_exception): Use std::string.
8420
8421 2018-05-04  Tom Tromey  <tom@tromey.com>
8422
8423         * ada-lang.c (create_excep_cond_exprs): Update.
8424         (ada_exception_catchpoint_cond_string): Use std::string.
8425
8426 2018-05-04  Tom Tromey  <tom@tromey.com>
8427
8428         * ada-lang.c (xget_renaming_scope): Return std::string.
8429         (old_renaming_is_invisible): Update.
8430
8431 2018-05-04  Tom Tromey  <tom@tromey.com>
8432
8433         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8434         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8435
8436 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8437
8438         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8439
8440 2018-05-04  Tom Tromey  <tom@tromey.com>
8441
8442         * remote.c (remote_query_supported_append): Change type.
8443         (remote_check_symbols): Update.
8444
8445 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8446
8447         PR gdb/11420
8448         * configure.ac: Prepend libpython.
8449         * python/python-config.py: Likewise.
8450         * configure: Regenerate.
8451
8452 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8453
8454         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8455
8456 2018-05-03  Pedro Alves  <palves@redhat.com>
8457
8458         * s390-linux-nat.c
8459         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8460         override.  Write 'true' instead of '1'.
8461         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8462         declaration.
8463
8464 2018-05-02  Pedro Alves  <palves@redhat.com>
8465
8466         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8467         add_inf_child_target.
8468         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8469         add_inf_child_target.
8470         * aix-thread.c (aix_thread_target_info): New.
8471         (aix_thread_target) <shortname, longname, doc>: Delete.
8472         <info>: New.
8473         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8474         add_inf_child_target.
8475         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8476         add_inf_child_target.
8477         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8478         add_inf_child_target.
8479         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8480         add_inf_child_target.
8481         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8482         add_inf_child_target.
8483         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8484         add_inf_child_target.
8485         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8486         add_inf_child_target.
8487         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8488         add_inf_child_target.
8489         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8490         add_inf_child_target.
8491         * bfd-target.c (target_bfd_target_info): New.
8492         (target_bfd) <shortname, longname, doc>: Delete.
8493         <info>: New.
8494         * bsd-kvm.c (bsd_kvm_target_info): New.
8495         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8496         <info>: New.
8497         (bsd_kvm_target::open): Rename to ...
8498         (bsd_kvm_target_open): ... this.  Adjust.
8499         * bsd-uthread.c (bsd_uthread_target_info): New.
8500         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8501         <info>: New.
8502         * corefile.c (core_file_command): Adjust.
8503         * corelow.c (core_target_info): New.
8504         (core_target) <shortname, longname, doc>: Delete.
8505         <info>: New.
8506         (core_target::open): Rename to ...
8507         (core_target_open): ... this.  Adjust.
8508         * ctf.c (ctf_target_info): New.
8509         (ctf_target) <shortname, longname, doc>: Delete.
8510         <info>: New.
8511         (ctf_target::open): Rename to ...
8512         (ctf_target_open): ... this.
8513         (_initialize_ctf): Adjust.
8514         * exec.c (exec_target_info): New.
8515         (exec_target) <shortname, longname, doc>: Delete.
8516         <info>: New.
8517         (exec_target::open): Rename to ...
8518         (exec_target_open): ... this.
8519         * gdbcore.h (core_target_open): Declare.
8520         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8521         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8522         add_inf_child_target.
8523         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8524         add_inf_child_target.
8525         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8526         add_inf_child_target.
8527         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8528         add_inf_child_target.
8529         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8530         add_inf_child_target.
8531         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8532         add_inf_child_target.
8533         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8534         add_inf_child_target.
8535         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8536         add_inf_child_target.
8537         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8538         add_inf_child_target.
8539         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8540         add_inf_child_target.
8541         * inf-child.c (inf_child_target_info): New.
8542         (inf_child_target::info): New.
8543         (inf_child_open_target): Remove 'target' parameter.  Use
8544         get_native_target instead.
8545         (inf_child_target::open): Delete.
8546         (add_inf_child_target): New.
8547         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8548         Delete.
8549         <info>: New.
8550         (add_inf_child_target): Declare.
8551         (inf_child_open_target): Declare.
8552         * linux-thread-db.c (thread_db_target_info): New.
8553         (thread_db_target) <shortname, longname, doc>: Delete.
8554         <info>: New.
8555         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8556         add_inf_child_target.
8557         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8558         add_inf_child_target.
8559         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8560         add_inf_child_target.
8561         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8562         add_inf_child_target.
8563         * make-target-delegates (print_class): Adjust.
8564         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8565         add_inf_child_target.
8566         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8567         add_inf_child_target.
8568         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8569         add_inf_child_target.
8570         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8571         add_inf_child_target.
8572         * nto-procfs.c (nto_native_target_info): New.
8573         (nto_procfs_target_native) <shortname, longname, doc>:
8574         Delete.
8575         <info>: New.
8576         (nto_procfs_target_info): New.
8577         (nto_procfs_target_procfs) <shortname, longname, doc>:
8578         Delete.
8579         <info>: New.
8580         (init_procfs_targets): Adjust.
8581         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8582         add_inf_child_target.
8583         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8584         add_inf_child_target.
8585         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8586         add_inf_child_target.
8587         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8588         add_inf_child_target.
8589         * ravenscar-thread.c (ravenscar_target_info): New.
8590         (ravenscar_thread_target) <shortname, longname, doc>:
8591         Delete.
8592         <info>: New.
8593         * record-btrace.c (record_btrace_target_info):
8594         (record_btrace_target) <shortname, longname, doc>: Delete.
8595         <info>: New.
8596         (record_btrace_target::open): Rename to ...
8597         (record_btrace_target_open): ... this.  Adjust.
8598         * record-full.c (record_longname, record_doc): New.
8599         (record_full_base_target) <shortname, longname, doc>: Delete.
8600         <info>: New.
8601         (record_full_target_info): New.
8602         (record_full_target): <shortname>: Delete.
8603         <info>: New.
8604         (record_full_core_open_1, record_full_open_1): Update comments.
8605         (record_full_base_target::open): Rename to ...
8606         (record_full_open): ... this.
8607         (cmd_record_full_restore): Update.
8608         (_initialize_record_full): Update.
8609         * remote-sim.c (remote_sim_target_info): New.
8610         (gdbsim_target) <shortname, longname, doc>: Delete.
8611         <info>: New.
8612         (gdbsim_target::open): Rename to ...
8613         (gdbsim_target_open): ... this.
8614         (_initialize_remote_sim): Adjust.
8615         * remote.c (remote_doc): New.
8616         (remote_target_info): New.
8617         (remote_target) <shortname, longname, doc>: Delete.
8618         <info>: New.
8619         (extended_remote_target_info): New.
8620         (extended_remote_target) <shortname, longname, doc>: Delete.
8621         <info>: New.
8622         (remote_target::open_1): Make static.  Adjust.
8623         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8624         * s390-linux-nat.c (_initialize_s390_nat): Use
8625         add_inf_child_target.
8626         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8627         add_inf_child_target.
8628         * sol-thread.c (thread_db_target_info): New.
8629         (sol_thread_target) <shortname, longname, doc>: Delete.
8630         <info>: New.
8631         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8632         add_inf_child_target.
8633         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8634         add_inf_child_target.
8635         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8636         add_inf_child_target.
8637         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8638         add_inf_child_target.
8639         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8640         add_inf_child_target.
8641         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8642         add_inf_child_target.
8643         * spu-linux-nat.c (_initialize_spu_nat): Use
8644         add_inf_child_target.
8645         * spu-multiarch.c (spu_multiarch_target_info): New.
8646         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8647         <info>: New.
8648         * target-delegates.c: Regenerate.
8649         * target.c: Include <unordered_map>.
8650         (target_ops_p): Delete.
8651         (DEF_VEC_P(target_ops_p)): Delete.
8652         (target_factories): New.
8653         (test_target_info): New.
8654         (test_target_ops::info): New.
8655         (open_target): Adjust to use target_factories.
8656         (add_target_with_completer): Rename to ...
8657         (add_target): ... this.  Change prototype.  Register target_info
8658         and open callback in target_factories.  Register target_info in
8659         command context instead of target_ops.
8660         (add_target): Delete old implementation.
8661         (add_deprecated_target_alias): Change prototype.  Adjust.
8662         (the_native_target): New.
8663         (set_native_target, get_native_target): New.
8664         (find_default_run_target): Use the_native_target.
8665         (find_attach_target, find_run_target): Simplify.
8666         (target_ops::open): Delete.
8667         (dummy_target_info): New.
8668         (dummy_target::shortname, dummy_target::longname)
8669         (dummy_target::doc): Delete.
8670         (dummy_target::info): New.
8671         (debug_target::shortname, debug_target::longname)
8672         (debug_target::doc): Delete.
8673         (debug_target::info): New.
8674         * target.h (struct target_info): New.
8675         (target_ops::~target_ops): Add comment.
8676         (target_ops::info): New.
8677         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8678         longer virtual.  Implement in terms of target_info.
8679         (set_native_target, get_native_target): Declare.
8680         (target_open_ftype): New.
8681         (add_target, add_target_with_completer)
8682         (add_deprecated_target_alias): Change prototype.
8683         (test_target) <shortname, longname, doc>: Delete.
8684         <info>: New.
8685         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8686         add_inf_child_target.
8687         * tracefile-tfile.c (tfile_target_info): New.
8688         (tfile_target) <shortname, longname, doc>: Delete.
8689         <info>: New.
8690         (tfile_target::open): Rename to ...
8691         (tfile_target_open): ... this.
8692         (_initialize_tracefile_tfile): Adjust.
8693         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8694         add_inf_child_target.
8695         * windows-nat.c (_initialize_windows_nat): Use
8696         add_inf_child_target.
8697         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8698         add_inf_child_target.
8699
8700 2018-05-02  Pedro Alves  <palves@redhat.com>
8701
8702         * linux-nat.h (linux_nat_target) <low_new_thread,
8703         low_delete_thread, low_new_fork, low_forget_process,
8704         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8705         New virtual methods.
8706         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8707         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8708         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8709         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8710         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8711         Delete.
8712         * linux-fork.c (delete_fork): Adjust to call low method.
8713         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8714         (linux_nat_new_fork, linux_nat_forget_process_hook)
8715         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8716         (linux_nat_status_is_event):
8717         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8718         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8719         to call low method.
8720         (sigtrap_is_event): Rename to ...
8721         (linux_nat_target::low_status_is_event): ... this.
8722         (linux_nat_set_status_is_event): Delete.
8723         (save_stop_reason, linux_nat_wait_1)
8724         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8725         low methods.
8726         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8727         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8728         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8729         (linux_nat_set_prepare_to_resume): Delete.
8730         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8731         low virtual methods.
8732         * amd64-linux-nat.c: Likewise.
8733         * arm-linux-nat.c: Likewise.
8734         * i386-linux-nat.c: Likewise.
8735         * ia64-linux-nat.c: Likewise.
8736         * mips-linux-nat.c: Likewise.
8737         * ppc-linux-nat.c: Likewise.
8738         * s390-linux-nat.c: Likewise.
8739         * sparc64-linux-nat.c: Likewise.
8740         * x86-linux-nat.c: Likewise.
8741         * x86-linux-nat.h: Include "nat/x86-linux.h".
8742         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8743         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8744         Override methods.
8745
8746 2018-05-02  Pedro Alves  <palves@redhat.com>
8747
8748         * target.h (target_ops)
8749         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8750         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8751         stopped_by_watchpoint, have_continuable_watchpoint,
8752         stopped_data_address, watchpoint_addr_within_range,
8753         can_accel_watchpoint_condition, can_run, thread_alive,
8754         has_all_memory, has_memory, has_stack, has_registers,
8755         has_execution, can_async_p, is_async_p, supports_non_stop,
8756         always_non_stop_p, can_execute_reverse, supports_multi_process,
8757         supports_enable_disable_tracepoint,
8758         supports_disable_randomization, supports_string_tracing,
8759         supports_evaluation_of_breakpoint_conditions,
8760         can_run_breakpoint_commands, filesystem_is_local,
8761         can_download_tracepoint, get_trace_state_variable_value,
8762         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8763         record_is_replaying, record_will_replay,
8764         augmented_libraries_svr4_read>: Adjust to return bool.
8765         * aarch64-linux-nat.c: All implementations adjusted.
8766         * aix-thread.c: All implementations adjusted.
8767         * arm-linux-nat.c: All implementations adjusted.
8768         * breakpoint.c: All implementations adjusted.
8769         * bsd-kvm.c: All implementations adjusted.
8770         * bsd-uthread.c: All implementations adjusted.
8771         * corelow.c: All implementations adjusted.
8772         * ctf.c: All implementations adjusted.
8773         * darwin-nat.c: All implementations adjusted.
8774         * darwin-nat.h: All implementations adjusted.
8775         * exec.c: All implementations adjusted.
8776         * fbsd-nat.c: All implementations adjusted.
8777         * fbsd-nat.h: All implementations adjusted.
8778         * gnu-nat.c: All implementations adjusted.
8779         * gnu-nat.h: All implementations adjusted.
8780         * go32-nat.c: All implementations adjusted.
8781         * ia64-linux-nat.c: All implementations adjusted.
8782         * inf-child.c: All implementations adjusted.
8783         * inf-child.h: All implementations adjusted.
8784         * inf-ptrace.c: All implementations adjusted.
8785         * inf-ptrace.h: All implementations adjusted.
8786         * linux-nat.c: All implementations adjusted.
8787         * linux-nat.h: All implementations adjusted.
8788         * mips-linux-nat.c: All implementations adjusted.
8789         * nto-procfs.c: All implementations adjusted.
8790         * ppc-linux-nat.c: All implementations adjusted.
8791         * procfs.c: All implementations adjusted.
8792         * ravenscar-thread.c: All implementations adjusted.
8793         * record-btrace.c: All implementations adjusted.
8794         * record-full.c: All implementations adjusted.
8795         * remote-sim.c: All implementations adjusted.
8796         * remote.c: All implementations adjusted.
8797         * s390-linux-nat.c: All implementations adjusted.
8798         * sol-thread.c: All implementations adjusted.
8799         * spu-multiarch.c: All implementations adjusted.
8800         * target-delegates.c: All implementations adjusted.
8801         * target.c: All implementations adjusted.
8802         * target.h: All implementations adjusted.
8803         * tracefile-tfile.c: All implementations adjusted.
8804         * tracefile.c: All implementations adjusted.
8805         * tracefile.h: All implementations adjusted.
8806         * windows-nat.c: All implementations adjusted.
8807         * x86-linux-nat.h: All implementations adjusted.
8808         * x86-nat.h: All implementations adjusted.
8809
8810 2018-05-02  Pedro Alves  <palves@redhat.com>
8811
8812         * make-target-delegates (scan_target_h): Don't trim lines here.
8813         Replace sequences of tabs and/or whitespace with a single
8814         whitespace.
8815         (top level, parsing methods): Trim each line before processing it
8816         here.
8817
8818 2018-05-02  Pedro Alves  <palves@redhat.com>
8819             John Baldwin  <jhb@freebsd.org>
8820
8821         * target.h (enum strata) <debug_stratum>: New.
8822         (struct target_ops) <all delegation methods>: Replace by C++
8823         virtual methods, and drop "to_" prefix.  All references updated
8824         throughout.
8825         <to_shortname, to_longname, to_doc, to_data,
8826         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8827         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8828         virtual methods.  All references updated throughout.
8829         <can_attach, supports_terminal_ours, can_create_inferior,
8830         get_thread_control_capabilities, attach_no_wait>: New
8831         virtual methods.
8832         <insert_breakpoint, remove_breakpoint>: Now
8833         TARGET_DEFAULT_NORETURN methods.
8834         <info_proc>: Now returns bool.
8835         <to_magic>: Delete.
8836         (OPS_MAGIC): Delete.
8837         (current_target): Delete.  All references replaced by references
8838         to ...
8839         (target_stack): ... this.  New.
8840         (target_shortname, target_longname): Adjust.
8841         (target_can_run): Now a function declaration.
8842         (default_child_has_all_memory, default_child_has_memory)
8843         (default_child_has_stack, default_child_has_registers)
8844         (default_child_has_execution): Remove target_ops parameter.
8845         (complete_target_initialization): Delete.
8846         (memory_breakpoint_target): New template class.
8847         (test_target_ops): Refactor as a C++ class with virtual methods.
8848         * make-target-delegates (NAME_PART): Tighten.
8849         (POINTER_PART, CP_SYMBOL): New.
8850         (SIMPLE_RETURN_PART): Reimplement.
8851         (VEC_RETURN_PART): Expect less.
8852         (RETURN_PART, VIRTUAL_PART): New.
8853         (METHOD): Adjust to C++ virtual methods.
8854         (scan_target_h): Remove reference to C99.
8855         (dname): Output "target_ops::" prefix.
8856         (write_function_header): Adjust to output a C++ class method.
8857         (write_declaration): New.
8858         (write_delegator): Adjust to output a C++ class method.
8859         (tdname): Output "dummy_target::" prefix.
8860         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8861         method.
8862         (tdefault_names, debug_names): Delete.
8863         (return_types, tdefaults, styles, argtypes_array): New.
8864         (top level): All methods are delegators.
8865         (print_class): New.
8866         (top level): Print dummy_target and debug_target classes.
8867         * target-delegates.c: Regenerate.
8868         * target-debug.h (target_debug_print_enum_info_proc_what)
8869         (target_debug_print_thread_control_capabilities)
8870         (target_debug_print_thread_info_p): New.
8871         * target.c (dummy_target): Delete.
8872         (the_dummy_target, the_debug_target): New.
8873         (target_stack): Now extern.
8874         (set_targetdebug): Push/unpush debug target.
8875         (default_child_has_all_memory, default_child_has_memory)
8876         (default_child_has_stack, default_child_has_registers)
8877         (default_child_has_execution): Remove target_ops parameter.
8878         (complete_target_initialization): Delete.
8879         (add_target_with_completer): No longer call
8880         complete_target_initialization.
8881         (target_supports_terminal_ours): Use regular delegation.
8882         (update_current_target): Delete.
8883         (push_target): No longer check magic number.  Don't call
8884         update_current_target.
8885         (unpush_target): Don't call update_current_target.
8886         (target_is_pushed): No longer check magic number.
8887         (target_require_runnable): Skip for all stratums over
8888         process_stratum.
8889         (target_ops::info_proc): New.
8890         (target_info_proc): Use find_target_at and
8891         find_default_run_target.
8892         (target_supports_disable_randomization): Use regular delegation.
8893         (target_get_osdata): Use find_target_at.
8894         (target_ops::open, target_ops::close, target_ops::can_attach)
8895         (target_ops::attach, target_ops::can_create_inferior)
8896         (target_ops::create_inferior, target_ops::can_run)
8897         (target_can_run): New.
8898         (default_fileio_target): Use regular delegation.
8899         (target_ops::fileio_open, target_ops::fileio_pwrite)
8900         (target_ops::fileio_pread, target_ops::fileio_fstat)
8901         (target_ops::fileio_close, target_ops::fileio_unlink)
8902         (target_ops::fileio_readlink): New.
8903         (target_fileio_open_1, target_fileio_unlink)
8904         (target_fileio_readlink): Always call the target method.  Handle
8905         FILEIO_ENOSYS.
8906         (return_zero, return_zero_has_execution): Delete.
8907         (init_dummy_target): Delete.
8908         (dummy_target::dummy_target, dummy_target::shortname)
8909         (dummy_target::longname, dummy_target::doc)
8910         (debug_target::debug_target, debug_target::shortname)
8911         (debug_target::longname, debug_target::doc): New.
8912         (target_supports_delete_record): Use regular delegation.
8913         (setup_target_debug): Delete.
8914         (maintenance_print_target_stack): Skip debug_stratum.
8915         (initialize_targets): Instantiate the_dummy_target and
8916         the_debug_target.
8917         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8918         use target_stack.
8919         (target_auxv_search, fprint_target_auxv): Adjust.
8920         (info_auxv_command): Adjust to use target_stack.
8921         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8922         * exceptions.c (print_flush): Handle a NULL target_stack.
8923         * regcache.c (target_ops_no_register): Refactor as class with
8924         virtual methods.
8925
8926         * exec.c (exec_target): New class.
8927         (exec_ops): Now an exec_target.
8928         (exec_open, exec_close_1, exec_get_section_table)
8929         (exec_xfer_partial, exec_files_info, exec_has_memory)
8930         (exec_make_note_section): Refactor as exec_target methods.
8931         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8932         Delete.
8933         (exec_target::find_memory_regions): New.
8934         (_initialize_exec): Don't call init_exec_ops.
8935         * gdbcore.h (exec_file_clear): Delete.
8936
8937         * corefile.c (core_target): Delete.
8938         (core_file_command): Adjust.
8939         * corelow.c (core_target): New class.
8940         (the_core_target): New.
8941         (core_close): Remove target_ops parameter.
8942         (core_close_cleanup): Adjust.
8943         (core_target::close): New.
8944         (core_open, core_detach, get_core_registers, core_files_info)
8945         (core_xfer_partial, core_thread_alive, core_read_description)
8946         (core_pid_to_str, core_thread_name, core_has_memory)
8947         (core_has_stack, core_has_registers, core_info_proc): Rework as
8948         core_target methods.
8949         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8950         (_initialize_corelow): Initialize the_core_target.
8951         * gdbcore.h (core_target): Delete.
8952         (the_core_target): New.
8953
8954         * ctf.c: (ctf_target): New class.
8955         (ctf_ops): Now a ctf_target.
8956         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8957         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8958         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8959         methods.
8960         (init_ctf_ops): Delete.
8961         (_initialize_ctf): Don't call it.
8962         * tracefile-tfile.c (tfile_target): New class.
8963         (tfile_ops): Now a tfile_target.
8964         (tfile_open, tfile_close, tfile_files_info)
8965         (tfile_get_tracepoint_status, tfile_trace_find)
8966         (tfile_fetch_registers, tfile_xfer_partial)
8967         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8968         Refactor as tfile_target methods.
8969         (tfile_xfer_partial_features): Remove target_ops parameter.
8970         (init_tfile_ops): Delete.
8971         (_initialize_tracefile_tfile): Don't call it.
8972         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8973         (tracefile_has_stack, tracefile_has_registers)
8974         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8975         tracefile_target methods.
8976         (init_tracefile_ops): Delete.
8977         (tracefile_target::tracefile_target): New.
8978         * tracefile.h: Include "target.h".
8979         (tracefile_target): New class.
8980         (init_tracefile_ops): Delete.
8981
8982         * spu-multiarch.c (spu_multiarch_target): New class.
8983         (spu_ops): Now a spu_multiarch_target.
8984         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8985         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8986         (spu_search_memory, spu_mourn_inferior): Refactor as
8987         spu_multiarch_target methods.
8988         (init_spu_ops): Delete.
8989         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8990         complete_target_initialization.
8991
8992         * ravenscar-thread.c (ravenscar_thread_target): New class.
8993         (ravenscar_ops): Now a ravenscar_thread_target.
8994         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8995         (ravenscar_thread_alive, ravenscar_pid_to_str)
8996         (ravenscar_fetch_registers, ravenscar_store_registers)
8997         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8998         (ravenscar_stopped_by_hw_breakpoint)
8999         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9000         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9001         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9002         methods.
9003         (init_ravenscar_thread_ops): Delete.
9004         (_initialize_ravenscar): Remove references to
9005         init_ravenscar_thread_ops and complete_target_initialization.
9006
9007         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9008         (bsd_uthread_target): New class.
9009         (bsd_uthread_ops): Now a bsd_uthread_target.
9010         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9011         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9012         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9013         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9014         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9015         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9016         (bsd_uthread_target): Delete function.
9017         (_initialize_bsd_uthread): Remove reference to
9018         complete_target_initialization.
9019
9020         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9021         (target_bfd): ... this new class.
9022         (target_bfd_xfer_partial, target_bfd_get_section_table)
9023         (target_bfd_close): Refactor as target_bfd methods.
9024         (target_bfd::~target_bfd): New.
9025         (target_bfd_reopen): Adjust.
9026         (target_bfd::close): New.
9027
9028         * record-btrace.c (record_btrace_target): New class.
9029         (record_btrace_ops): Now a record_btrace_target.
9030         (record_btrace_open, record_btrace_stop_recording)
9031         (record_btrace_disconnect, record_btrace_close)
9032         (record_btrace_async, record_btrace_info)
9033         (record_btrace_insn_history, record_btrace_insn_history_range)
9034         (record_btrace_insn_history_from, record_btrace_call_history)
9035         (record_btrace_call_history_range)
9036         (record_btrace_call_history_from, record_btrace_record_method)
9037         (record_btrace_is_replaying, record_btrace_will_replay)
9038         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9039         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9040         (record_btrace_store_registers, record_btrace_prepare_to_store)
9041         (record_btrace_to_get_unwinder)
9042         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9043         (record_btrace_commit_resume, record_btrace_wait)
9044         (record_btrace_stop, record_btrace_can_execute_reverse)
9045         (record_btrace_stopped_by_sw_breakpoint)
9046         (record_btrace_supports_stopped_by_sw_breakpoint)
9047         (record_btrace_stopped_by_hw_breakpoint)
9048         (record_btrace_supports_stopped_by_hw_breakpoint)
9049         (record_btrace_update_thread_list, record_btrace_thread_alive)
9050         (record_btrace_goto_begin, record_btrace_goto_end)
9051         (record_btrace_goto, record_btrace_stop_replaying_all)
9052         (record_btrace_execution_direction)
9053         (record_btrace_prepare_to_generate_core)
9054         (record_btrace_done_generating_core): Refactor as
9055         record_btrace_target methods.
9056         (init_record_btrace_ops): Delete.
9057         (_initialize_record_btrace): Remove reference to
9058         init_record_btrace_ops.
9059         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9060         the execution_direction global.
9061         (record_full_base_target, record_full_target)
9062         (record_full_core_target): New classes.
9063         (record_full_ops): Now a record_full_target.
9064         (record_full_core_ops): Now a record_full_core_target.
9065         (record_full_target::detach, record_full_target::disconnect)
9066         (record_full_core_target::disconnect)
9067         (record_full_target::mourn_inferior, record_full_target::kill):
9068         New.
9069         (record_full_open, record_full_close, record_full_async): Refactor
9070         as methods of the record_full_base_target class.
9071         (record_full_resume, record_full_commit_resume): Refactor
9072         as methods of the record_full_target class.
9073         (record_full_wait, record_full_stopped_by_watchpoint)
9074         (record_full_stopped_data_address)
9075         (record_full_stopped_by_sw_breakpoint)
9076         (record_full_supports_stopped_by_sw_breakpoint)
9077         (record_full_stopped_by_hw_breakpoint)
9078         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9079         methods of the record_full_base_target class.
9080         (record_full_store_registers, record_full_xfer_partial)
9081         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9082         Refactor as methods of the record_full_target class.
9083         (record_full_can_execute_reverse, record_full_get_bookmark)
9084         (record_full_goto_bookmark, record_full_execution_direction)
9085         (record_full_record_method, record_full_info, record_full_delete)
9086         (record_full_is_replaying, record_full_will_replay)
9087         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9088         (record_full_stop_replaying): Refactor as methods of the
9089         record_full_base_target class.
9090         (record_full_core_resume, record_full_core_kill)
9091         (record_full_core_fetch_registers)
9092         (record_full_core_prepare_to_store)
9093         (record_full_core_store_registers, record_full_core_xfer_partial)
9094         (record_full_core_insert_breakpoint)
9095         (record_full_core_remove_breakpoint)
9096         (record_full_core_has_execution): Refactor
9097         as methods of the record_full_core_target class.
9098         (record_full_base_target::supports_delete_record): New.
9099         (init_record_full_ops): Delete.
9100         (init_record_full_core_ops): Delete.
9101         (record_full_save): Refactor as method of the
9102         record_full_base_target class.
9103         (_initialize_record_full): Remove references to
9104         init_record_full_ops and init_record_full_core_ops.
9105
9106         * remote.c (remote_target, extended_remote_target): New classes.
9107         (remote_ops): Now a remote_target.
9108         (extended_remote_ops): Now an extended_remote_target.
9109         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9110         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9111         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9112         (remote_pass_signals, remote_set_syscall_catchpoint)
9113         (remote_program_signals, )
9114         (remote_thread_always_alive): Remove target_ops parameter.
9115         (remote_thread_alive, remote_thread_name)
9116         (remote_update_thread_list, remote_threads_extra_info)
9117         (remote_static_tracepoint_marker_at)
9118         (remote_static_tracepoint_markers_by_strid)
9119         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9120         (remote_open): Refactor as methods of remote_target.
9121         (extended_remote_open, extended_remote_detach)
9122         (extended_remote_attach, extended_remote_post_attach):
9123         (extended_remote_supports_disable_randomization)
9124         (extended_remote_create_inferior): : Refactor as method of
9125         extended_remote_target.
9126         (remote_set_permissions, remote_open_1, remote_detach)
9127         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9128         (remote_resume, remote_commit_resume, remote_stop)
9129         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9130         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9131         (remote_prepare_to_store, remote_store_registers)
9132         (remote_flash_erase, remote_flash_done, remote_files_info)
9133         (remote_kill, remote_mourn, remote_insert_breakpoint)
9134         (remote_remove_breakpoint, remote_insert_watchpoint)
9135         (remote_watchpoint_addr_within_range)
9136         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9137         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9138         (remote_supports_stopped_by_sw_breakpoint)
9139         (remote_stopped_by_hw_breakpoint)
9140         (remote_supports_stopped_by_hw_breakpoint)
9141         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9142         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9143         (remote_verify_memory): Refactor as methods of remote_target.
9144         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9145         parameter.
9146         (remote_xfer_partial, remote_get_memory_xfer_limit)
9147         (remote_search_memory, remote_rcmd, remote_memory_map)
9148         (remote_pid_to_str, remote_get_thread_local_address)
9149         (remote_get_tib_address, remote_read_description): Refactor as
9150         methods of remote_target.
9151         (remote_target::fileio_open, remote_target::fileio_pwrite)
9152         (remote_target::fileio_pread, remote_target::fileio_close): New.
9153         (remote_hostio_readlink, remote_hostio_fstat)
9154         (remote_filesystem_is_local, remote_can_execute_reverse)
9155         (remote_supports_non_stop, remote_supports_disable_randomization)
9156         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9157         (remote_supports_enable_disable_tracepoint)
9158         (remote_supports_string_tracing)
9159         (remote_can_run_breakpoint_commands, remote_trace_init)
9160         (remote_download_tracepoint, remote_can_download_tracepoint)
9161         (remote_download_trace_state_variable, remote_enable_tracepoint)
9162         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9163         (remote_trace_start, remote_get_trace_status)
9164         (remote_get_tracepoint_status, remote_trace_stop)
9165         (remote_trace_find, remote_get_trace_state_variable_value)
9166         (remote_save_trace_data, remote_get_raw_trace_data)
9167         (remote_set_disconnected_tracing, remote_core_of_thread)
9168         (remote_set_circular_trace_buffer, remote_traceframe_info)
9169         (remote_get_min_fast_tracepoint_insn_len)
9170         (remote_set_trace_buffer_size, remote_set_trace_notes)
9171         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9172         (remote_disable_btrace, remote_teardown_btrace)
9173         (remote_read_btrace, remote_btrace_conf)
9174         (remote_augmented_libraries_svr4_read, remote_load)
9175         (remote_pid_to_exec_file, remote_can_do_single_step)
9176         (remote_execution_direction, remote_thread_handle_to_thread_info):
9177         Refactor as methods of remote_target.
9178         (init_remote_ops, init_extended_remote_ops): Delete.
9179         (remote_can_async_p, remote_is_async_p, remote_async)
9180         (remote_thread_events, remote_upload_tracepoints)
9181         (remote_upload_trace_state_variables): Refactor as methods of
9182         remote_target.
9183         (_initialize_remote): Remove references to init_remote_ops and
9184         init_extended_remote_ops.
9185
9186         * remote-sim.c (gdbsim_target): New class.
9187         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9188         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9189         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9190         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9191         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9192         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9193         Refactor as methods of gdbsim_target.
9194         (gdbsim_ops): Now a gdbsim_target.
9195         (init_gdbsim_ops): Delete.
9196         (gdbsim_cntrl_c): Adjust.
9197         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9198
9199         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9200         (the_amd64_linux_nat_target): New.
9201         (amd64_linux_fetch_inferior_registers)
9202         (amd64_linux_store_inferior_registers): Refactor as methods of
9203         amd64_linux_nat_target.
9204         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9205         * i386-linux-nat.c: Don't include "linux-nat.h".
9206         (i386_linux_nat_target): New class.
9207         (the_i386_linux_nat_target): New.
9208         (i386_linux_fetch_inferior_registers)
9209         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9210         as methods of i386_linux_nat_target.
9211         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9212         * inf-child.c (inf_child_ops): Delete.
9213         (inf_child_fetch_inferior_registers)
9214         (inf_child_store_inferior_registers): Delete.
9215         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9216         methods of inf_child_target.
9217         (inf_child_target::supports_terminal_ours)
9218         (inf_child_target::terminal_init)
9219         (inf_child_target::terminal_inferior)
9220         (inf_child_target::terminal_ours_for_output)
9221         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9222         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9223         New.
9224         (inf_child_open, inf_child_disconnect, inf_child_close)
9225         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9226         (inf_child_post_startup_inferior, inf_child_can_run)
9227         (inf_child_pid_to_exec_file): Refactor as methods of
9228         inf_child_target.
9229         (inf_child_follow_fork): Delete.
9230         (inf_child_target::can_create_inferior)
9231         (inf_child_target::can_attach): New.
9232         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9233         (inf_child_target::has_stack, inf_child_target::has_registers)
9234         (inf_child_target::has_execution): New.
9235         (inf_child_fileio_open, inf_child_fileio_pwrite)
9236         (inf_child_fileio_pread, inf_child_fileio_fstat)
9237         (inf_child_fileio_close, inf_child_fileio_unlink)
9238         (inf_child_fileio_readlink, inf_child_use_agent)
9239         (inf_child_can_use_agent): Refactor as methods of
9240         inf_child_target.
9241         (return_zero, inf_child_target): Delete.
9242         (inf_child_target::inf_child_target): New.
9243         * inf-child.h: Include "target.h".
9244         (inf_child_target): Delete function prototype.
9245         (inf_child_target): New class.
9246         (inf_child_open_target, inf_child_mourn_inferior)
9247         (inf_child_maybe_unpush_target): Delete.
9248         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9249         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9250         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9251         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9252         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9253         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9254         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9255         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9256         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9257         methods of inf_ptrace_target.
9258         (inf_ptrace_target): Delete function.
9259         * inf-ptrace.h: Include "inf-child.h".
9260         (inf_ptrace_target): Delete function declaration.
9261         (inf_ptrace_target): New class.
9262         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9263         * linux-nat.c (linux_target): New.
9264         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9265         (linux_nat_target::~linux_nat_target): New.
9266         (linux_child_post_attach, linux_child_post_startup_inferior)
9267         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9268         (linux_child_remove_fork_catchpoint)
9269         (linux_child_insert_vfork_catchpoint)
9270         (linux_child_remove_vfork_catchpoint)
9271         (linux_child_insert_exec_catchpoint)
9272         (linux_child_remove_exec_catchpoint)
9273         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9274         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9275         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9276         (linux_nat_stopped_data_address)
9277         (linux_nat_stopped_by_sw_breakpoint)
9278         (linux_nat_supports_stopped_by_sw_breakpoint)
9279         (linux_nat_stopped_by_hw_breakpoint)
9280         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9281         (linux_nat_kill, linux_nat_mourn_inferior)
9282         (linux_nat_xfer_partial, linux_nat_thread_alive)
9283         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9284         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9285         (linux_child_static_tracepoint_markers_by_strid)
9286         (linux_nat_is_async_p, linux_nat_can_async_p)
9287         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9288         (linux_nat_supports_multi_process)
9289         (linux_nat_supports_disable_randomization, linux_nat_async)
9290         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9291         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9292         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9293         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9294         methods of linux_nat_target.
9295         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9296         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9297         parameter.
9298         (check_stopped_by_watchpoint): Adjust.
9299         (linux_xfer_partial): Delete.
9300         (linux_target_install_ops, linux_target, linux_nat_add_target):
9301         Delete.
9302         (linux_nat_target::linux_nat_target): New.
9303         * linux-nat.h: Include "inf-ptrace.h".
9304         (linux_nat_target): New.
9305         (linux_target, linux_target_install_ops, linux_nat_add_target):
9306         Delete function declarations.
9307         (linux_target): Declare global.
9308         * linux-thread-db.c (thread_db_target): New.
9309         (thread_db_target::thread_db_target): New.
9310         (thread_db_ops): Delete.
9311         (the_thread_db_target): New.
9312         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9313         (thread_db_update_thread_list, thread_db_pid_to_str)
9314         (thread_db_extra_thread_info)
9315         (thread_db_thread_handle_to_thread_info)
9316         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9317         (thread_db_resume): Refactor as methods of thread_db_target.
9318         (init_thread_db_ops): Delete.
9319         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9320         * x86-linux-nat.c: Don't include "linux-nat.h".
9321         (super_post_startup_inferior): Delete.
9322         (x86_linux_nat_target::~x86_linux_nat_target): New.
9323         (x86_linux_child_post_startup_inferior)
9324         (x86_linux_read_description, x86_linux_enable_btrace)
9325         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9326         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9327         methods of x86_linux_nat_target.
9328         (x86_linux_create_target): Delete.  Bits folded ...
9329         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9330         pointer.
9331         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9332         (x86_linux_nat_target): New class.
9333         (x86_linux_create_target): Delete.
9334         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9335         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9336         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9337         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9338         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9339         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9340         make extern.
9341         (x86_use_watchpoints): Delete.
9342         * x86-nat.h: Include "breakpoint.h" and "target.h".
9343         (x86_use_watchpoints): Delete.
9344         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9345         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9346         (x86_insert_watchpoint, x86_remove_watchpoint)
9347         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9348         (x86_stopped_by_hw_breakpoint): New declarations.
9349         (x86_nat_target): New template class.
9350
9351         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9352         (the_ppc_linux_nat_target): New.
9353         (ppc_linux_fetch_inferior_registers)
9354         (ppc_linux_can_use_hw_breakpoint)
9355         (ppc_linux_region_ok_for_hw_watchpoint)
9356         (ppc_linux_ranged_break_num_registers)
9357         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9358         (ppc_linux_insert_mask_watchpoint)
9359         (ppc_linux_remove_mask_watchpoint)
9360         (ppc_linux_can_accel_watchpoint_condition)
9361         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9362         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9363         (ppc_linux_watchpoint_addr_within_range)
9364         (ppc_linux_masked_watch_num_registers)
9365         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9366         (ppc_linux_read_description): Refactor as methods of
9367         ppc_linux_nat_target.
9368         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9369
9370         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9371         (procfs_target): New class.
9372         (the_procfs_target): New.
9373         (procfs_target): Delete function.
9374         (procfs_auxv_parse, procfs_attach, procfs_detach)
9375         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9376         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9377         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9378         (procfs_create_inferior, procfs_update_thread_list)
9379         (procfs_thread_alive, procfs_pid_to_str)
9380         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9381         (procfs_stopped_data_address, procfs_insert_watchpoint)
9382         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9383         (proc_find_memory_regions, procfs_info_proc)
9384         (procfs_make_note_section): Refactor as methods of procfs_target.
9385         (_initialize_procfs): Adjust.
9386         * sol-thread.c (sol_thread_target): New class.
9387         (sol_thread_ops): Now a sol_thread_target.
9388         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9389         (sol_thread_fetch_registers, sol_thread_store_registers)
9390         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9391         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9392         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9393         (init_sol_thread_ops): Delete.
9394         (_initialize_sol_thread): Adjust.  Remove references to
9395         init_sol_thread_ops and complete_target_initialization.
9396
9397         * windows-nat.c (windows_nat_target): New class.
9398         (windows_fetch_inferior_registers)
9399         (windows_store_inferior_registers, windows_resume, windows_wait)
9400         (windows_attach, windows_detach, windows_pid_to_exec_file)
9401         (windows_files_info, windows_create_inferior)
9402         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9403         (windows_close, windows_pid_to_str, windows_xfer_partial)
9404         (windows_get_tib_address, windows_get_ada_task_ptid)
9405         (windows_thread_name, windows_thread_alive): Refactor as
9406         windows_nat_target methods.
9407         (do_initial_windows_stuff): Adjust.
9408         (windows_target): Delete function.
9409         (_initialize_windows_nat): Adjust.
9410
9411         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9412         (darwin_mourn_inferior, darwin_kill_inferior)
9413         (darwin_create_inferior, darwin_attach, darwin_detach)
9414         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9415         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9416         (darwin_supports_multi_process): Refactor as darwin_nat_target
9417         methods.
9418         (darwin_resume_to, darwin_files_info): Delete.
9419         (_initialize_darwin_inferior): Rename to ...
9420         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9421         * darwin-nat.h: Include "inf-child.h".
9422         (darwin_nat_target): New class.
9423         (darwin_complete_target): Delete.
9424         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9425         (darwin_target): New.
9426         (i386_darwin_fetch_inferior_registers)
9427         (i386_darwin_store_inferior_registers): Refactor as methods of
9428         darwin_nat_target.
9429         (darwin_complete_target): Delete, with ...
9430         (_initialize_i386_darwin_nat): ... bits factored out here.
9431
9432         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9433         (the_alpha_linux_nat_target): New.
9434         (alpha_linux_register_u_offset): Refactor as
9435         alpha_linux_nat_target method.
9436         (_initialize_alpha_linux_nat): Adjust.
9437         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9438         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9439         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9440         methods of linux_nat_trad_target.
9441         (linux_trad_target): Delete.
9442         * linux-nat-trad.h (linux_trad_target): Delete function.
9443         (linux_nat_trad_target): New class.
9444         * mips-linux-nat.c (mips_linux_nat_target): New class.
9445         (super_fetch_registers, super_store_registers, super_close):
9446         Delete.
9447         (the_mips_linux_nat_target): New.
9448         (mips64_linux_regsets_fetch_registers)
9449         (mips64_linux_regsets_store_registers)
9450         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9451         (mips_linux_register_u_offset, mips_linux_read_description)
9452         (mips_linux_can_use_hw_breakpoint)
9453         (mips_linux_stopped_by_watchpoint)
9454         (mips_linux_stopped_data_address)
9455         (mips_linux_region_ok_for_hw_watchpoint)
9456         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9457         (mips_linux_close): Refactor as methods of mips_linux_nat.
9458         (_initialize_mips_linux_nat): Adjust to C++ification.
9459
9460         * aix-thread.c (aix_thread_target): New class.
9461         (aix_thread_ops): Now an aix_thread_target.
9462         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9463         (aix_thread_fetch_registers, aix_thread_store_registers)
9464         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9465         (aix_thread_thread_alive, aix_thread_pid_to_str)
9466         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9467         Refactor as methods of aix_thread_target.
9468         (init_aix_thread_ops): Delete.
9469         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9470         and complete_target_initialization.
9471         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9472         (rs6000_nat_target): New class.
9473         (the_rs6000_nat_target): New.
9474         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9475         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9476         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9477         (super_create_inferior): Delete.
9478         (_initialize_rs6000_nat): Adjust to C++ification.
9479
9480         * arm-linux-nat.c (arm_linux_nat_target): New class.
9481         (the_arm_linux_nat_target): New.
9482         (arm_linux_fetch_inferior_registers)
9483         (arm_linux_store_inferior_registers, arm_linux_read_description)
9484         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9485         (arm_linux_remove_hw_breakpoint)
9486         (arm_linux_region_ok_for_hw_watchpoint)
9487         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9488         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9489         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9490         arm_linux_nat_target.
9491         (_initialize_arm_linux_nat): Adjust to C++ification.
9492
9493         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9494         (the_aarch64_linux_nat_target): New.
9495         (aarch64_linux_fetch_inferior_registers)
9496         (aarch64_linux_store_inferior_registers)
9497         (aarch64_linux_child_post_startup_inferior)
9498         (aarch64_linux_read_description)
9499         (aarch64_linux_can_use_hw_breakpoint)
9500         (aarch64_linux_insert_hw_breakpoint)
9501         (aarch64_linux_remove_hw_breakpoint)
9502         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9503         (aarch64_linux_region_ok_for_hw_watchpoint)
9504         (aarch64_linux_stopped_data_address)
9505         (aarch64_linux_stopped_by_watchpoint)
9506         (aarch64_linux_watchpoint_addr_within_range)
9507         (aarch64_linux_can_do_single_step): Refactor as methods of
9508         aarch64_linux_nat_target.
9509         (super_post_startup_inferior): Delete.
9510         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9511
9512         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9513         (the_hppa_linux_nat_target): New.
9514         (hppa_linux_fetch_inferior_registers)
9515         (hppa_linux_store_inferior_registers): Refactor as methods of
9516         hppa_linux_nat_target.
9517         (_initialize_hppa_linux_nat): Adjust to C++ification.
9518
9519         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9520         (the_ia64_linux_nat_target): New.
9521         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9522         (ia64_linux_stopped_data_address)
9523         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9524         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9525         ia64_linux_nat_target methods.
9526         (super_xfer_partial): Delete.
9527         (_initialize_ia64_linux_nat): Adjust to C++ification.
9528
9529         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9530         (the_m32r_linux_nat_target): New.
9531         (m32r_linux_fetch_inferior_registers)
9532         (m32r_linux_store_inferior_registers): Refactor as
9533         m32r_linux_nat_target methods.
9534         (_initialize_m32r_linux_nat): Adjust to C++ification.
9535
9536         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9537         (the_m68k_linux_nat_target): New.
9538         (m68k_linux_fetch_inferior_registers)
9539         (m68k_linux_store_inferior_registers): Refactor as
9540         m68k_linux_nat_target methods.
9541         (_initialize_m68k_linux_nat): Adjust to C++ification.
9542
9543         * s390-linux-nat.c (s390_linux_nat_target): New class.
9544         (the_s390_linux_nat_target): New.
9545         (s390_linux_fetch_inferior_registers)
9546         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9547         (s390_insert_watchpoint, s390_remove_watchpoint)
9548         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9549         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9550         (s390_auxv_parse, s390_read_description): Refactor as methods of
9551         s390_linux_nat_target.
9552         (_initialize_s390_nat): Adjust to C++ification.
9553
9554         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9555         (the_sparc_linux_nat_target): New.
9556         (_initialize_sparc_linux_nat): Adjust to C++ification.
9557         * sparc-nat.c (sparc_fetch_inferior_registers)
9558         (sparc_store_inferior_registers): Remove target_ops parameter.
9559         * sparc-nat.h (sparc_fetch_inferior_registers)
9560         (sparc_store_inferior_registers): Remove target_ops parameter.
9561         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9562         (the_sparc64_linux_nat_target): New.
9563         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9564
9565         * spu-linux-nat.c (spu_linux_nat_target): New class.
9566         (the_spu_linux_nat_target): New.
9567         (spu_child_post_startup_inferior, spu_child_post_attach)
9568         (spu_child_wait, spu_fetch_inferior_registers)
9569         (spu_store_inferior_registers, spu_xfer_partial)
9570         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9571         methods.
9572         (_initialize_spu_nat): Adjust to C++ification.
9573
9574         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9575         (the_tilegx_linux_nat_target): New.
9576         (fetch_inferior_registers, store_inferior_registers):
9577         Refactor as methods.
9578         (_initialize_tile_linux_nat): Adjust to C++ification.
9579
9580         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9581         (the_xtensa_linux_nat_target): New.
9582         (xtensa_linux_fetch_inferior_registers)
9583         (xtensa_linux_store_inferior_registers): Refactor as
9584         xtensa_linux_nat_target methods.
9585         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9586
9587         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9588         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9589         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9590         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9591         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9592         (fbsd_stopped_by_sw_breakpoint)
9593         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9594         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9595         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9596         (fbsd_post_startup_inferior, fbsd_post_attach)
9597         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9598         (fbsd_set_syscall_catchpoint)
9599         (super_xfer_partial, super_resume, super_wait)
9600         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9601         (fbsd_handle_debug_trap): Remove target_ops parameter.
9602         (fbsd_nat_add_target): Delete.
9603         * fbsd-nat.h: Include "inf-ptrace.h".
9604         (fbsd_nat_add_target): Delete.
9605         (USE_SIGTRAP_SIGINFO): Define.
9606         (fbsd_nat_target): New class.
9607
9608         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9609         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9610         (amd64bsd_target): Delete.
9611         * amd64-bsd-nat.h: New file.
9612         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9613         "x86-bsd-nat.h".
9614         (amd64_fbsd_nat_target): New class.
9615         (the_amd64_fbsd_nat_target): New.
9616         (amd64fbsd_read_description): Refactor as method of
9617         amd64_fbsd_nat_target.
9618         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9619         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9620         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9621         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9622         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9623         (i386bsd_target): Delete.
9624         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9625         (i386bsd_fetch_inferior_registers)
9626         (i386bsd_store_inferior_registers): Declare.
9627         (i386_bsd_nat_target): New class.
9628         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9629         (the_i386_fbsd_nat_target): New.
9630         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9631         i386_fbsd_nat_target methods.
9632         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9633         (_initialize_i386fbsd_nat): Adjust to C++ification.
9634         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9635         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9636         (_initialize_x86_bsd_nat): Adjust to C++ification.
9637         * x86-bsd-nat.h: Include "x86-nat.h".
9638         (x86bsd_target): Delete declaration.
9639         (x86bsd_nat_target): New class.
9640
9641         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9642         (the_aarch64_fbsd_nat_target): New.
9643         (aarch64_fbsd_fetch_inferior_registers)
9644         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9645         aarch64_fbsd_nat_target.
9646         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9647         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9648         (the_alpha_bsd_nat_target): New.
9649         (alphabsd_fetch_inferior_registers)
9650         (alphabsd_store_inferior_registers): Refactor as
9651         alpha_bsd_nat_target methods.
9652         (_initialize_alphabsd_nat): Refactor as methods of
9653         alpha_bsd_nat_target.
9654         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9655         (the_amd64_nbsd_nat_target): New.
9656         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9657         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9658         (the_amd64_obsd_nat_target): New.
9659         (_initialize_amd64obsd_nat): Adjust to C++ification.
9660         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9661         (the_arm_fbsd_nat_target): New.
9662         (arm_fbsd_fetch_inferior_registers)
9663         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9664         (_initialize_arm_fbsd_nat): Refactor as methods of
9665         arm_fbsd_nat_target.
9666         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9667         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9668         (the_arm_netbsd_nat_target): New.
9669         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9670         arm_netbsd_nat_target.
9671         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9672         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9673         (the_hppa_nbsd_nat_target): New.
9674         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9675         hppa_nbsd_nat_target methods.
9676         (_initialize_hppanbsd_nat): Adjust to C++ification.
9677         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9678         (the_hppa_obsd_nat_target): New.
9679         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9680         methods of hppa_obsd_nat_target.
9681         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9682         add_target.
9683         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9684         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9685         add_target.
9686         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9687         (_initialize_i386obsd_nat): Use add_target.
9688         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9689         (the_m68k_bsd_nat_target): New.
9690         (m68kbsd_fetch_inferior_registers)
9691         (m68kbsd_store_inferior_registers): Refactor as methods of
9692         m68k_bsd_nat_target.
9693         (_initialize_m68kbsd_nat): Adjust to C++ification.
9694         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9695         (the_mips_fbsd_nat_target): New.
9696         (mips_fbsd_fetch_inferior_registers)
9697         (mips_fbsd_store_inferior_registers): Refactor as methods of
9698         mips_fbsd_nat_target.
9699         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9700         add_target.
9701         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9702         (the_mips_nbsd_nat_target): New.
9703         (mipsnbsd_fetch_inferior_registers)
9704         (mipsnbsd_store_inferior_registers): Refactor as methods of
9705         mips_nbsd_nat_target.
9706         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9707         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9708         (the_mips64_obsd_nat_target): New.
9709         (mips64obsd_fetch_inferior_registers)
9710         (mips64obsd_store_inferior_registers): Refactor as methods of
9711         mips64_obsd_nat_target.
9712         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9713         add_target.
9714         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9715         nbsd_nat_target.
9716         * nbsd-nat.h: Include "inf-ptrace.h".
9717         (nbsd_nat_target): New class.
9718         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9719         (obsd_wait): Refactor as methods of obsd_nat_target.
9720         (obsd_add_target): Delete.
9721         * obsd-nat.h: Include "inf-ptrace.h".
9722         (obsd_nat_target): New class.
9723         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9724         (the_ppc_fbsd_nat_target): New.
9725         (ppcfbsd_fetch_inferior_registers)
9726         (ppcfbsd_store_inferior_registers): Refactor as methods of
9727         ppc_fbsd_nat_target.
9728         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9729         add_target.
9730         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9731         (the_ppc_nbsd_nat_target): New.
9732         (ppcnbsd_fetch_inferior_registers)
9733         (ppcnbsd_store_inferior_registers): Refactor as methods of
9734         ppc_nbsd_nat_target.
9735         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9736         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9737         (the_ppc_obsd_nat_target): New.
9738         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9739         methods of ppc_obsd_nat_target.
9740         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9741         add_target.
9742         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9743         (the_sh_nbsd_nat_target): New.
9744         (shnbsd_fetch_inferior_registers)
9745         (shnbsd_store_inferior_registers): Refactor as methods of
9746         sh_nbsd_nat_target.
9747         (_initialize_shnbsd_nat): Adjust to C++ification.
9748         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9749         (inf_ptrace_xfer_partial): Delete.
9750         (sparc_xfer_partial, sparc_target): Delete.
9751         * sparc-nat.h (sparc_fetch_inferior_registers)
9752         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9753         (sparc_target): Delete function declaration.
9754         (sparc_target): New template class.
9755         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9756         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9757         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9758         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9759         add_target.
9760         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9761         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9762         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9763         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9764         add_target.
9765         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9766         (the_vax_bsd_nat_target): New.
9767         (vaxbsd_fetch_inferior_registers)
9768         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9769         methods.
9770         (_initialize_vaxbsd_nat): Adjust to C++ification.
9771
9772         * bsd-kvm.c (bsd_kvm_target): New class.
9773         (bsd_kvm_ops): Now a bsd_kvm_target.
9774         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9775         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9776         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9777         bsd_kvm_target.
9778         (bsd_kvm_return_one): Delete.
9779         (bsd_kvm_add_target): Adjust to C++ification.
9780
9781         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9782         (nto_procfs_target_procfs): New classes.
9783         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9784         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9785         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9786         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9787         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9788         (procfs_remove_hw_breakpoint, procfs_resume)
9789         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9790         (procfs_kill_inferior, procfs_store_registers)
9791         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9792         as methods of nto_procfs_target.
9793         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9794         (nto_native_ops): Delete.
9795         (procfs_open, procfs_native_open): Delete.
9796         (nto_native_ops): Now an nto_procfs_target_native.
9797         (init_procfs_targets): Adjust to C++ification.
9798         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9799         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9800         Refactor as methods of nto_procfs_target.
9801
9802         * go32-nat.c (go32_nat_target): New class.
9803         (the_go32_nat_target): New.
9804         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9805         (go32_store_registers, go32_xfer_partial, go32_files_info)
9806         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9807         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9808         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9809         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9810         (go32_target): Delete.
9811         (_initialize_go32_nat): Adjust to C++ification.
9812
9813         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9814         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9815         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9816         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9817         gnu_nat_target.
9818         (gnu_target): Delete.
9819         * gnu-nat.h (gnu_target): Delete.
9820         (gnu_nat_target): New class.
9821         * i386-gnu-nat.c (gnu_base_target): New.
9822         (i386_gnu_nat_target): New class.
9823         (the_i386_gnu_nat_target): New.
9824         (_initialize_i386gnu_nat): Adjust to C++ification.
9825
9826 2018-05-02  Pedro Alves  <palves@redhat.com>
9827
9828         * bfd-target.c (target_bfd_xclose): Rename to ...
9829         (target_bfd_close): ... this.
9830         (target_bfd_reopen): Adjust.
9831         * target.c (target_close): Remove references to to_xclose.
9832         * target.h (target_ops::to_xclose): Delete.
9833         (target_ops::to_close): Update comments.
9834
9835 2018-05-02  Pedro Alves  <palves@redhat.com>
9836
9837         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9838         "linux-nat.h".
9839         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9840         * inf-ptrace.c (inf_ptrace_register_u_offset)
9841         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9842         (inf_ptrace_store_register, inf_ptrace_store_registers)
9843         (inf_ptrace_trad_target): Move to ...
9844         * linux-nat-trad.c: ... this new file.
9845         * linux-nat-trad.h: New file.
9846         * linux-nat.c (linux_target_install_ops): Make extern.
9847         (linux_trad_target): Delete.
9848         * linux-nat.h (linux_trad_target): Delete declaration.
9849         (linux_target_install_ops): Declare.
9850         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9851         "linux-nat.h".
9852
9853 2018-05-02  Pedro Alves  <palves@redhat.com>
9854
9855         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9856         procfs_target/add_target here.
9857         * procfs.c (procfs_target): Make static.
9858         (_initialize_procfs): Call add_target here.
9859         * procfs.h (struct target_ops): Remove forward declaration.
9860         (procfs_target): Remove declaration.
9861         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9862
9863 2018-05-02  Pedro Alves  <palves@redhat.com>
9864
9865         * procfs.c (procfs_stopped_by_watchpoint)
9866         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9867         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9868         Forward declare.
9869         (procfs_use_watchpoints): Delete, move contents...
9870         (procfs_target): ... here.
9871         * procfs.h (procfs_use_watchpoints): Delete declaration.
9872         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9873         procfs_use_watchpoints.
9874         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9875         procfs_use_watchpoints.
9876
9877 2018-05-02  Tom Tromey  <tom@tromey.com>
9878
9879         PR python/20084:
9880         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9881         and var_zuinteger_unlimited.
9882         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9883         and PARAM_ZUINTEGER_UNLIMITED.
9884         (set_parameter_value): Handle var_zuinteger and
9885         var_zuinteger_unlimited.
9886         (add_setshow_generic): Likewise.
9887         (parmpy_init): Likewise.
9888
9889 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9890
9891         PR rust/23124
9892         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9893         pointer is not null before dereferencing it.
9894
9895 2018-04-30  Tom Tromey  <tom@tromey.com>
9896
9897         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9898         is_mi_like_p.
9899
9900 2018-04-30  Tom Tromey  <tom@tromey.com>
9901
9902         * breakpoint.c (mention): Remove use of is_mi_like_p.
9903         (print_mention_ranged_breakpoint): Likewise.
9904         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9905         of is_mi_like_p.
9906
9907 2018-04-30  Tom Tromey  <tom@tromey.com>
9908
9909         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9910
9911 2018-04-30  Tom Tromey  <tom@tromey.com>
9912
9913         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9914         (info_spu_event_command): Remove some uses of is_mi_like_p.
9915
9916 2018-04-30  Tom Tromey  <tom@tromey.com>
9917
9918         * python/py-framefilter.c (py_print_single_arg)
9919         (enumerate_locals, py_print_args, py_print_frame): Remove some
9920         uses of is_mi_like_p.
9921
9922 2018-04-30  Tom Tromey  <tom@tromey.com>
9923
9924         * ui-out.c: Update.
9925         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9926         * ui-out.h (ui_out::is_mi_like_p): Now const.
9927         (ui_out::do_is_mi_like_p): Now const.
9928         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9929
9930 2018-04-30  Tom Tromey  <tom@tromey.com>
9931
9932         * varobj.c (varobj_set_visualizer): Use new_reference.
9933         * python/python.c (gdbpy_decode_line): Use new_reference.
9934         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9935         new_reference.
9936
9937 2018-04-30  Tom Tromey  <tom@tromey.com>
9938
9939         * varobj.c (install_new_value): Use new_reference.
9940         * value.h (value_incref): Return void.  Swap intro comment with
9941         value_decref.
9942         * value.c (set_value_parent): Use new_reference.
9943         (value_incref): Return void.  Update intro comment.
9944         (release_value): Use new_reference.
9945         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9946
9947 2018-04-30  Tom Tromey  <tom@tromey.com>
9948
9949         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9950         * gdb_bfd.h (new_bfd_ref): Remove.
9951         (gdb_bfd_open): Update comment.
9952         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9953         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9954         (gdb_bfd_fdopenr): Use new_reference.
9955         * exec.c (exec_file_attach): Use new_reference.
9956
9957 2018-04-30  Tom Tromey  <tom@tromey.com>
9958
9959         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9960         method.
9961
9962 2018-04-30  Tom Tromey  <tom@tromey.com>
9963
9964         * jit.c (jit_read_code_entry): Use type_align.
9965         * i386-tdep.c (i386_gdbarch_init): Don't call
9966         set_gdbarch_long_long_align_bit.
9967         * gdbarch.sh: Remove long_long_align_bit.
9968         * gdbarch.c, gdbarch.h: Rebuild.
9969         * arc-tdep.c (arc_type_align): New function.
9970         (arc_gdbarch_init): Use arc_type_align.  Don't call
9971         set_gdbarch_long_long_align_bit.
9972
9973 2018-04-30  Tom Tromey  <tom@tromey.com>
9974
9975         * rust-lang.c (rust_type_alignment): Remove.
9976         (rust_composite_type): Use type_align.
9977
9978 2018-04-30  Tom Tromey  <tom@tromey.com>
9979
9980         * NEWS: Mention Type.align.
9981         * python/py-type.c (typy_get_alignof): New function.
9982         (type_object_getset): Add "alignof".
9983
9984 2018-04-30  Tom Tromey  <tom@tromey.com>
9985
9986         PR exp/17095:
9987         * NEWS: Update.
9988         * std-operator.def (UNOP_ALIGNOF): New operator.
9989         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9990         New.
9991         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9992         * c-lang.c (c_op_print_tab): Add alignof.
9993         * c-exp.y (ALIGNOF): New token.
9994         (exp): Add "ALIGNOF" production.
9995         (ident_tokens): Add _Alignof and alignof.
9996
9997 2018-04-30  Tom Tromey  <tom@tromey.com>
9998
9999         * i386-tdep.c (i386_type_align): New function.
10000         (i386_gdbarch_init): Update.
10001         * gdbarch.sh (type_align): New method.
10002         * gdbarch.c, gdbarch.h: Rebuild.
10003         * arch-utils.h (default_type_align): Declare.
10004         * arch-utils.c (default_type_align): New function.
10005         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10006         (struct type) <align_log2>: New field.
10007         <instance_flags>: Now a bitfield.
10008         (TYPE_RAW_ALIGN): New macro.
10009         (type_align, type_raw_align, set_type_align): Declare.
10010         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10011         functions.
10012         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10013         (get_alignment, maybe_set_alignment): New functions.
10014         (read_structure_type, read_enumeration_type, read_array_type)
10015         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10016         (read_subrange_type, read_base_type): Set type alignment.
10017
10018 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10019
10020         * dwarf2read.c (read_index_from_section): Use bool.
10021
10022 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10023
10024         PR gdb/22950
10025         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10026         with #ifdef.
10027
10028 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10029
10030         PR build/22873
10031         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10032         last step, and do it atomically.
10033
10034 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10035
10036         * compile/compile-c-types.c (convert_int, convert_float):
10037         Update for C FE v1.
10038
10039 2018-04-27  Tom Tromey  <tom@tromey.com>
10040
10041         PR rust/22545:
10042         * rust-lang.c (rust_inclusive_range_type_p): New function.
10043         (rust_range): Handle inclusive ranges.
10044         (rust_compute_range): Likewise.
10045         * rust-exp.y (struct rust_op) <inclusive>: New field.
10046         (DOTDOTEQ): New constant.
10047         (range_expr): Add "..=" productions.
10048         (operator_tokens): Add "..=" token.
10049         (ast_range): Add "inclusive" parameter.
10050         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10051         ranges.
10052         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10053         bounds values.
10054         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10055         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10056         Update comments.
10057         * expprint.c (print_subexp_standard): Handle new bounds values.
10058         (dump_subexp_body_standard): Likewise.
10059
10060 2018-04-27  Tom Tromey  <tom@tromey.com>
10061
10062         * configure: Rebuild.
10063         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10064         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10065         "OVERRIDE".
10066         (class symbol_needs_eval_context): Likewise.
10067         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10068         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10069         "virtual".
10070         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10071         "override".
10072         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10073         * aarch64-tdep.c (instruction_reader::read): Use "override".
10074         (instruction_reader_test::read): Likewise.
10075         * arm-tdep.c (instruction_reader::read): Use "override".
10076         (instruction_reader_thumb::read): Likewise.
10077
10078 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10079
10080         PR remote/9665
10081         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10082         instead of remote_send.
10083         (remote_send): Remove.
10084
10085 2018-04-26  Pedro Alves  <palves@redhat.com>
10086
10087         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10088         find_function_start_sal instead of find_pc_line.
10089
10090 2018-04-26  Pedro Alves  <palves@redhat.com>
10091
10092         * breakpoint.c (set_breakpoint_location_function): Handle
10093         mst_data_gnu_ifunc.
10094         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10095         * elfread.c (elf_symtab_read): Give data symbols with
10096         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10097         (elf_rel_plt_read): Update comment.
10098         * linespec.c (convert_linespec_to_sals): Handle
10099         mst_data_gnu_ifunc.
10100         (minsym_found): Handle mst_data_gnu_ifunc.
10101         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10102         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10103         * parse.c (find_minsym_type_and_address): Handle
10104         mst_data_gnu_ifunc.
10105         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10106         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10107         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10108         comment.
10109         <mst_data_gnu_ifunc>: New enumerator.
10110
10111 2018-04-26  Pedro Alves  <palves@redhat.com>
10112
10113         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10114         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10115         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10116         Handle it.
10117         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10118         (lookup_minimal_symbol_by_pc): Adjust.
10119         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10120         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10121         * minsyms.h (lookup_msym_prefer): New enum.
10122         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10123         parameter by a lookup_msym_prefer parameter.
10124
10125 2018-04-26  Pedro Alves  <palves@redhat.com>
10126
10127         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10128         ends in "@plt" instead of looking at the symbol's section.
10129
10130 2018-04-26  Pedro Alves  <palves@redhat.com>
10131
10132         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10133         all references.
10134         (find_pc_partial_function_gnu_ifunc): Rename to ...
10135         (find_pc_partial_function): ... this, and remove references to
10136         'is_gnu_ifunc_p'.
10137         (find_pc_partial_function): Delete old implementation.
10138         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10139
10140 2018-04-26  Pedro Alves  <palves@redhat.com>
10141
10142         * linespec.c (struct bound_minimal_symbol_search_key): New.
10143         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10144         skip first line if we found a GNU ifunc minimal symbol by name.
10145         (compare_msymbols): Change parameters to work with a destructured
10146         lhs minsym.
10147         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10148         functions.
10149
10150 2018-04-26  Pedro Alves  <palves@redhat.com>
10151
10152         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10153         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10154         address/name.
10155         (add_location_to_breakpoint): Store the minsym and the objfile in
10156         the breakpoint location.
10157         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10158         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10159         Record the minsym in the sal.
10160         * symtab.h (symtab_and_line) <msymbol>: New field.
10161
10162 2018-04-26  Pedro Alves  <palves@redhat.com>
10163
10164         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10165         unless we actually resolved the ifunc.
10166
10167 2018-04-26  Pedro Alves  <palves@redhat.com>
10168
10169         * c-exp.y (variable production): Prefer ifunc minsyms over
10170         regular function symbols.
10171         * symtab.c (find_gnu_ifunc): New function.
10172         * minsyms.h (lookup_msym_prefer): New enum.
10173         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10174         parameter by a lookup_msym_prefer parameter.
10175         * symtab.h (find_gnu_ifunc): New declaration.
10176
10177 2018-04-26  Pedro Alves  <palves@redhat.com>
10178
10179         * blockframe.c (find_gnu_ifunc_target_type): New function.
10180         (find_function_type): New.
10181         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10182         return a value with a memory address.
10183         (eval_call): For calls to GNU ifunc functions, try to find the
10184         type of the target function from the type that the resolver
10185         returns.
10186         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10187         symbols.
10188         * infcall.c (find_function_return_type): Delete.
10189         (find_function_addr): Add 'function_type' parameter.  For calls to
10190         GNU ifunc functions, try to find the type of the target function
10191         from the type that the resolver returns, and return it via
10192         FUNCTION_TYPE.
10193         (call_function_by_hand_dummy): Adjust to use the function type
10194         returned by find_function_addr.
10195         (find_function_addr): Add 'function_type' parameter and move
10196         description here.
10197         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10198         declarations.
10199
10200 2018-04-26  Pedro Alves  <palves@redhat.com>
10201
10202         * c-exp.y (variable production): Skip finding an alias for ifunc
10203         symbols.
10204
10205 2018-04-26  Pedro Alves  <palves@redhat.com>
10206
10207         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10208
10209 2018-04-25  Pedro Alves  <palves@redhat.com>
10210
10211         * infcmd.c (kill_command): Print the pid as string, not the whole
10212         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10213         message.
10214         * remote.c (remote_detach_1): Print the pid as string, not the
10215         whole thread's ptid.
10216
10217 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10218             Sergio Durigan Junior  <sergiodj@redhat.com>
10219             Pedro Alves  <palves@redhat.com>
10220
10221         * infcmd.c (kill_command): Print message when inferior has
10222         been killed.
10223         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10224         '1'.
10225         (add_inferior): Improve message printed when
10226         'print_inferior_events' is on.
10227         (exit_inferior): Remove message printed when
10228         'print_inferior_events' is on.
10229         (detach_inferior): Improve message printed when
10230         'print_inferior_events' is on.
10231         (initialize_inferiors): Use 'add_inferior_silent' to set
10232         'current_inferior_'.
10233         * inferior.h (print_inferior_events): Declare here as
10234         'extern'.
10235         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10236         '[Detaching...]' messages when 'print_inferior_events' is on.
10237         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10238         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10239         'Detaching after fork from child...', replace it by '... from
10240         parent...'.
10241         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10242         prefix/suffix when printing 'Detaching...' messages.  Print
10243         them when 'print_inferior_events' is on.
10244         * remote.c (remote_detach_1): Print message when detaching
10245         from inferior and '!is_fork_parent'.
10246
10247 2018-04-24  Tom Tromey  <tom@tromey.com>
10248
10249         * cli-out.h: Reindent.
10250
10251 2018-04-24  Tom Tromey  <tom@tromey.com>
10252
10253         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10254         (cli_ui_out::do_field_string): Use fputs_filtered.
10255         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10256
10257 2018-04-23  Tom Tromey  <tom@tromey.com>
10258
10259         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10260         gdb::unique_xmalloc_ptr.
10261
10262 2018-04-23  Tom Tromey  <tom@tromey.com>
10263
10264         * configure: Rebuild.
10265
10266 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10267
10268         PR gdb/23095
10269         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10270         prepare_for_testing.  Set normal_bp to r_debug_state if target
10271         is bsd.
10272
10273 2018-04-21  Pedro Alves  <palves@redhat.com>
10274             Rajendra SY  <rajendra.sy@gmail.com>
10275
10276         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10277         * remote.c (extended_remote_attach): In all-stop mode, mark the
10278         thread as executing.
10279
10280 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10281
10282         * thread.c (thread_apply_all_command): Fix comment.
10283         (thread_command): Fix comment.
10284
10285 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10286
10287         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10288         parameter.
10289         * features/aarch64-core.c (create_feature_aarch64_core):
10290         Regenerate.
10291         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10292         Likewise.
10293         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10294         Likewise.
10295         * features/i386/32bit-avx512.c
10296         (create_feature_i386_32bit_avx512): Likewise.
10297         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10298         Likewise.
10299         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10300         Likewise.
10301         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10302         Likewise.
10303         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10304         Likewise.
10305         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10306         Likewise.
10307         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10308         Likewise.
10309         * features/i386/64bit-avx512.c
10310         (create_feature_i386_64bit_avx512): Likewise.
10311         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10312         Likewise.
10313         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10314         Likewise.
10315         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10316         Likewise.
10317         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10318         Likewise.
10319         * features/i386/64bit-segments.c
10320         (create_feature_i386_64bit_segments): Likewise.
10321         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10322         Likewise.
10323         * features/i386/x32-core.c
10324         (create_feature_i386_x32_core): Likewise.
10325         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10326         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10327         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10328         * target-descriptions.c: In generated code, don't pass xml
10329         filename.
10330
10331 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10332
10333         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10334         (print_xml_feature::visit_post): Likewise.
10335         (print_xml_feature::visit): Likewise.
10336         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10337         (print_xml_feature): Add new class.
10338         * regformats/regdat.sh: Null xmltarget on feature targets.
10339         * target-descriptions.c (struct target_desc): Add xmltarget.
10340         (maintenance_check_tdesc_xml_convert): Add unittest function.
10341         (tdesc_get_features_xml): Add function to get xml.
10342         (maintenance_check_xml_descriptions): Test xml generation.
10343         * xml-tdesc.c (string_read_description_xml): Add function.
10344         * xml-tdesc.h (string_read_description_xml): Add declaration.
10345
10346 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10347
10348         * features/Makefile: Add feature marker to targets with new style
10349         target descriptions.
10350         * regformats/aarch64.dat: Regenerate.
10351         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10352         * regformats/i386/amd64-avx-linux.dat: Likewise.
10353         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10354         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10355         * regformats/i386/amd64-linux.dat: Likewise.
10356         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10357         * regformats/i386/amd64.dat: Likewise.
10358         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10359         * regformats/i386/i386-avx-linux.dat: Likewise.
10360         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10361         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10362         * regformats/i386/i386-linux.dat: Likewise.
10363         * regformats/i386/i386-mmx-linux.dat: Likewise.
10364         * regformats/i386/i386-mpx-linux.dat: Likewise.
10365         * regformats/i386/i386.dat: Likewise.
10366         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10367         * regformats/i386/x32-avx-linux.dat: Likewise.
10368         * regformats/i386/x32-linux.dat: Likewise.
10369         * regformats/tic6x-c62x-linux.dat: Likewise.
10370         * regformats/tic6x-c64x-linux.dat: Likewise.
10371         * regformats/tic6x-c64xp-linux.dat: Likewise.
10372         * regformats/regdat.sh: Parse feature marker.
10373
10374 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10375
10376         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10377         (tdesc_osabi_name): Likewise.
10378         * target-descriptions.c (tdesc_architecture_name): Add new
10379         function.
10380         (tdesc_osabi_name): Likewise.
10381
10382 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10383
10384         * common/tdesc.c (tdesc_predefined_type): Move to here.
10385         (tdesc_named_type): Likewise.
10386         (tdesc_create_vector): Likewise.
10387         (tdesc_create_struct): Likewise.
10388         (tdesc_set_struct_size): Likewise.
10389         (tdesc_create_union): Likewise.
10390         (tdesc_create_flags): Likewise.
10391         (tdesc_create_enum): Likewise.
10392         (tdesc_add_field): Likewise.
10393         (tdesc_add_typed_bitfield): Likewise.
10394         (tdesc_add_bitfield): Likewise.
10395         (tdesc_add_flag): Likewise.
10396         (tdesc_add_enum_value): Likewise.
10397         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10398         (struct tdesc_type_vector): Likewise.
10399         (struct tdesc_type_field): Likewise.
10400         (struct tdesc_type_with_fields): Likewise.
10401         (tdesc_create_enum): Add declaration.
10402         (tdesc_add_typed_bitfield): Likewise.
10403         (tdesc_add_enum_value): Likewise.
10404         * target-descriptions.c (tdesc_type_field): Move from here.
10405         (tdesc_type_builtin): Likewise.
10406         (tdesc_type_vector): Likewise.
10407         (tdesc_type_with_fields): Likewise.
10408         (tdesc_predefined_types): Likewise.
10409         (tdesc_named_type): Likewise.
10410         (tdesc_create_vector): Likewise.
10411         (tdesc_create_struct): Likewise.
10412         (tdesc_set_struct_size): Likewise.
10413         (tdesc_create_union): Likewise.
10414         (tdesc_create_flags): Likewise.
10415         (tdesc_create_enum): Likewise.
10416         (tdesc_add_field): Likewise.
10417         (tdesc_add_typed_bitfield): Likewise.
10418         (tdesc_add_bitfield): Likewise.
10419         (tdesc_add_flag): Likewise.
10420         (tdesc_add_enum_value): Likewise.
10421         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10422         (tdesc_add_typed_bitfield): Likewise.
10423         (tdesc_add_enum_value): Likewise.
10424
10425 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10426
10427         * common/tdesc.c (tdesc_feature::accept): Move to here.
10428         (tdesc_feature::operator==): Likewise.
10429         (tdesc_create_reg): Likewise.
10430         * common/tdesc.h (tdesc_type_kind): Likewise.
10431         (struct tdesc_type): Likewise.
10432         (struct tdesc_feature): Likewise.
10433         * regformats/regdat.sh: Create a feature.
10434         * target-descriptions.c (tdesc_type_kind): Move from here.
10435         (tdesc_type): Likewise.
10436         (tdesc_type_up): Likewise.
10437         (tdesc_feature): Likewise.
10438         (tdesc_create_reg): Likewise.
10439
10440 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10441
10442         * Makefile.in: Add arch/tdesc.c
10443         * common/tdesc.c: New file.
10444         * common/tdesc.h (tdesc_element_visitor): Move to here.
10445         (tdesc_element): Likewise.
10446         (tdesc_reg): Likewise.
10447         (tdesc_reg_up): Likewise.
10448         * regformats/regdef.h (reg): Add offset to constructors.
10449         * target-descriptions.c (tdesc_element_visitor): Move from here.
10450         (tdesc_element): Likewise.
10451         (tdesc_reg): Likewise.
10452         (tdesc_reg_up): Likewise.
10453
10454 2018-04-17  Tom Tromey  <tom@tromey.com>
10455
10456         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10457         discriminant field.
10458
10459 2018-04-17  Tom Tromey  <tom@tromey.com>
10460
10461         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10462
10463 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10464
10465         * symtab.c (print_symbol_info): Skip printing filename and line
10466         number when `last' is NULL.
10467         (symtab_symbol_info): Use empty string instead of NULL for first
10468         invocation of print_symbol_info.
10469         (rbreak_command): Pass NULL to `last' parameter of
10470         print_symbol_info.
10471
10472 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10473
10474         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10475         instead of nullptr.
10476
10477 2018-04-16  Pedro Alves  <palves@redhat.com>
10478
10479         * MAINTAINERS (sh): Remove.
10480         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10481         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10482         (ALLDEPFILES): Remove sh64-tdep.c.
10483         * NEWS: Mentions that support for SH-5/SH64 is removed.
10484         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10485         (sh*-*-openbsd*): Ditto.
10486         (sh64-*-elf*): Remove.
10487         (sh*): Remove.
10488         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10489         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10490         * sh-tdep.c: No longer include "sh64-tdep.h".
10491         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10492         * sh64-tdep.c, sh64-tdep.h: Remove files.
10493
10494 2018-04-16  Pedro Alves  <palves@redhat.com>
10495
10496         * MAINTAINERS: Remove m88k.
10497         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10498         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10499         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10500         * NEWS: Mention that support for m88k was removed.
10501         * configure.host (m88*-*-*): Remove support.
10502         * configure.nat (m88k-*-*): Remove support.
10503         * configure.tgt (m88*-*-openbsd*): Remove.
10504         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10505
10506 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10507
10508         * configure.tgt (x86_tobjs): New variable.
10509         (amd64_tobjs, i386_tobjs): Use it.
10510
10511 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10512
10513         * symtab.c (print_symbol_info): Precede the symbol definition by
10514         the line number when available.
10515         * NEWS: Advertise this enhancement.
10516
10517 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10518
10519         * NEWS (New options): announce set/show record btrace cpu.
10520         * btrace.c: Include record-btrace.h.
10521         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10522         the vendor is unknown.
10523         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10524         Maybe overwrite the btrace configuration's cpu.
10525         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10526         (btrace_fetch): Add cpu parameter.  Update callers.
10527         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10528         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10529         errata workarounds if the vendor is unknown.
10530         * python/py-record-btrace.c: Include record-btrace.h.
10531         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10532         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10533         * record-btrace.c (record_btrace_cpu_state_kind): New.
10534         (record_btrace_cpu): New.
10535         (set_record_btrace_cpu_cmdlist): New.
10536         (record_btrace_get_cpu): New.
10537         (require_btrace_thread, record_btrace_info)
10538         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10539         (cmd_set_record_btrace_cpu_none): New.
10540         (cmd_set_record_btrace_cpu_auto): New.
10541         (cmd_set_record_btrace_cpu): New.
10542         (cmd_show_record_btrace_cpu): New.
10543         (_initialize_record_btrace): Initialize set/show record btrace cpu
10544         commands.
10545         * record-btrace.h (record_btrace_get_cpu): New.
10546
10547 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10548
10549         * record.c (set_record_command): Fix typo in message.
10550
10551 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10552
10553         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10554
10555 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10556
10557         * infrun.c (process_event_stop_test): Call
10558         gdbarch_in_indirect_branch_thunk.
10559         * gdbarch.sh (in_indirect_branch_thunk): New.
10560         * gdbarch.c: Regenerated.
10561         * gdbarch.h: Regenerated.
10562         * x86-tdep.h: New.
10563         * x86-tdep.c: New.
10564         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10565         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10566         (ALLDEPFILES): Add x86-tdep.c.
10567         * arch-utils.h (default_in_indirect_branch_thunk): New.
10568         * arch-utils.c (default_in_indirect_branch_thunk): New.
10569         * i386-tdep: Include x86-tdep.h.
10570         (i386_in_indirect_branch_thunk): New.
10571         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10572         function.
10573         * amd64-tdep: Include x86-tdep.h.
10574         (amd64_in_indirect_branch_thunk): New.
10575         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10576
10577 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10578
10579         PR gdb/23053
10580         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10581         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10582         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10583         regression.
10584
10585 2018-04-12  Tom Tromey  <tom@tromey.com>
10586
10587         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10588         (rust_evaluate_subexp): Likewise.
10589
10590 2018-04-12  Pedro Alves  <palves@redhat.com>
10591
10592         * procfs.c (procfs_detach): Make forward declaration's prototype
10593         match definition's protototype.
10594         (proc_get_LDT_entry): Remove stale do_cleanups call.
10595
10596 2018-04-12  Pedro Alves  <palves@redhat.com>
10597
10598         * target.h (target_ops::to_has_exited): Delete.
10599         (target_has_exited): Delete.
10600         * target-delegates.c: Regenerate.
10601
10602 2018-04-11  Pedro Alves  <palves@redhat.com>
10603
10604         * target.c (fileio_fh_t::t): Add comment.
10605         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10606         (target_fileio_close): Handle a NULL target.
10607         (invalidate_fileio_fh): New.
10608         (target_close): Call it.
10609         * remote.c (remote_hostio_send_command): No longer check whether
10610         remote_desc is open.
10611
10612 2018-04-11  Pedro Alves  <palves@redhat.com>
10613
10614         * target.c (fileio_fh_t): Make it a named struct instead of a
10615         typedef.
10616         (fileio_fh_t::is_closed): New method.
10617         (DEF_VEC_O (fileio_fh_t)): Remove.
10618         (fileio_fhandles): Now a std::vector.
10619         (is_closed_fileio_fh): Delete.
10620         (acquire_fileio_fd): Adjust.  Rename parameters.
10621         (release_fileio_fd): Adjust.
10622         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10623         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10624         (target_fileio_close): Adjust.
10625
10626 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10627
10628         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10629         index.
10630
10631 2018-04-10  Pedro Alves  <palves@redhat.com>
10632
10633         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10634         (scoped_finish_thread_state): New class.
10635         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10636         cleanup.
10637         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10638         (fetch_inferior_event, normal_stop): Likewise.
10639         * thread.c (finish_thread_state_cleanup): Delete.
10640
10641 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10642             Pedro Alves  <palves@redhat.com>
10643
10644         * value.c: Include "selftest.h" and "common/array-view.h".
10645         (struct range) <operator ==>: New.
10646         (test_ranges_contain): New.
10647         (check_ranges_vector): New.
10648         (test_insert_into_bit_range_vector): New.
10649         (_initialize_values): Register selftests.
10650         * common/array-view.h (operator==, operator!=): New.
10651
10652 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10653
10654         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10655         an iterator.
10656         * inline-frame.c: Include <algorithm>.
10657         (struct inline_state): Add constructor.
10658         (inline_state_s): Remove.
10659         (DEF_VEC_O(inline_state_s)): Remove.
10660         (inline_states): Change type to std::vector.
10661         (find_inline_frame_state): Adjust to std::vector.
10662         (allocate_inline_frame_state): Remove.
10663         (clear_inline_frame_state): Adjust to std::vector.
10664         (skip_inline_frames): Adjust to std::vector.
10665
10666 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10667
10668         * tracepoint.h (struct trace_state_variable): Add constructor.
10669         <name>: Change type to std::string.
10670         * tracepoint.c (tsv_s): Remove.
10671         (DEF_VEC_O(tsv_s)): Remove.
10672         (tvariables): Change to std::vector.
10673         (create_trace_state_variable): Adjust to std::vector.
10674         (find_trace_state_variable): Likewise.
10675         (find_trace_state_variable_by_number): Likewise.
10676         (delete_trace_state_variable): Likewise.
10677         (trace_variable_command): Adjust to std::string.
10678         (delete_trace_variable_command): Likewise.
10679         (tvariables_info_1): Adjust to std::vector.
10680         (save_trace_state_variables): Likewise.
10681         (start_tracing): Likewise.
10682         (merge_uploaded_trace_state_variables): Adjust to std::vector
10683         and std::string.
10684         * target.h (struct target_ops)
10685         <to_download_trace_state_variable>: Pass reference to
10686         trace_state_variable.
10687         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10688         * target-delegates.c: Re-generate.
10689         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10690         (mi_tsv_deleted): Likewise.
10691         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10692         * remote.c (remote_download_trace_state_variable): Change
10693         pointer to reference and adjust.
10694         * make-target-delegates (parse_argtypes): Handle references.
10695         (write_function_header): Likewise.
10696         (munge_type): Likewise.
10697
10698 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10699
10700         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10701         string_view-selftests.c.
10702         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10703         testsuite.
10704         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10705         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10706         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10707         * unittests/basic_string_view/element_access/char/1.cc:
10708         Likewise.
10709         * unittests/basic_string_view/element_access/char/empty.cc:
10710         Likewise.
10711         * unittests/basic_string_view/element_access/char/front_back.cc:
10712         Likewise.
10713         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10714         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10715         Likewise.
10716         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10717         Likewise.
10718         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10719         Likewise.
10720         * unittests/basic_string_view/operations/compare/char/1.cc:
10721         Likewise.
10722         * unittests/basic_string_view/operations/compare/char/13650.cc:
10723         Likewise.
10724         * unittests/basic_string_view/operations/copy/char/1.cc:
10725         Likewise.
10726         * unittests/basic_string_view/operations/data/char/1.cc:
10727         Likewise.
10728         * unittests/basic_string_view/operations/find/char/1.cc:
10729         Likewise.
10730         * unittests/basic_string_view/operations/find/char/2.cc:
10731         Likewise.
10732         * unittests/basic_string_view/operations/find/char/3.cc:
10733         Likewise.
10734         * unittests/basic_string_view/operations/find/char/4.cc:
10735         Likewise.
10736         * unittests/basic_string_view/operations/rfind/char/1.cc:
10737         Likewise.
10738         * unittests/basic_string_view/operations/rfind/char/2.cc:
10739         Likewise.
10740         * unittests/basic_string_view/operations/rfind/char/3.cc:
10741         Likewise.
10742         * unittests/basic_string_view/operations/substr/char/1.cc:
10743         Likewise.
10744         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10745         * unittests/string_view-selftests.c: New file.
10746
10747 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10748
10749         * unittests/basic_string_view/capacity/1.cc: New file.
10750         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10751         * unittests/basic_string_view/cons/char/1.cc: New file.
10752         * unittests/basic_string_view/cons/char/2.cc: New file.
10753         * unittests/basic_string_view/cons/char/3.cc: New file.
10754         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10755         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10756         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10757         * unittests/basic_string_view/element_access/char/1.cc: New file.
10758         * unittests/basic_string_view/element_access/char/2.cc: New file.
10759         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10760         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10761         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10762         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10763         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10764         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10765         * unittests/basic_string_view/include.cc: New file.
10766         * unittests/basic_string_view/inserters/char/1.cc: New file.
10767         * unittests/basic_string_view/inserters/char/2.cc: New file.
10768         * unittests/basic_string_view/inserters/char/3.cc: New file.
10769         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10770         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10771         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10772         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10773         * unittests/basic_string_view/literals/types.cc: New file.
10774         * unittests/basic_string_view/literals/values.cc: New file.
10775         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10776         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10777         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10778         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10779         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10780         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10781         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10782         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10783         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10784         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10785         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10786         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10787         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10788         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10789         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10790         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10791         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10792         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10793         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10794         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10795         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10796         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10797         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10798         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10799         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10800         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10801         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10802         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10803         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10804         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10805         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10806         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10807         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10808         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10809         * unittests/basic_string_view/operators/char/2.cc: New file.
10810         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10811         * unittests/basic_string_view/range_access/char/1.cc: New file.
10812         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10813         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10814         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10815         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10816         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10817         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10818         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10819         * unittests/basic_string_view/typedefs.cc: New file.
10820         * unittests/basic_string_view/types/1.cc: New file.
10821
10822 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10823
10824         * common/gdb_string_view.h: Remove libstdc++ implementation
10825         details, adjust to gdb reality.
10826         * common/gdb_string_view.tcc: Likewise.
10827         * cli/cli-script.c (struct string_view): Remove.
10828         (user_args) <m_args>: Change element type to gdb::string_view.
10829         (user_args::insert_args): Adjust.
10830
10831 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10832
10833         * common/gdb_string_view.h: New file.
10834         * common/gdb_string_view.tcc: New file.
10835
10836 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10837
10838         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10839         * configure: Re-generate.
10840
10841 2018-04-09  Pedro Alves  <palves@redhat.com>
10842
10843         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10844         (set_target_gdbarch): Call
10845         gdb::observers::architecture_changed.notify instead of
10846         observer_notify_architecture_changed.
10847
10848 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10849
10850         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10851         (do_restore_current_traceframe_cleanup): Remove.
10852         (restore_current_traceframe_cleanup_dtor): Remove.
10853         (make_cleanup_restore_current_traceframe): Remove.
10854         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10855         New.
10856         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10857         * infrun.c (fetch_inferior_event): Use
10858         scoped_restore_current_traceframe.
10859
10860 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10861
10862         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10863         Remove.
10864         <n_allocated_type_units>: Remove.
10865         <all_type_units>: Change to std::vector.
10866         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10867         to std::vector change.
10868         (dwarf2_per_objfile::get_cutu): Likewise.
10869         (dwarf2_per_objfile::get_tu): Likewise.
10870         (create_signatured_type_table_from_index): Likewise.
10871         (create_signatured_type_table_from_debug_names): Likewise.
10872         (dw2_symtab_iter_next): Likewise.
10873         (dw2_print_stats): Likewise.
10874         (dw2_expand_all_symtabs): Likewise.
10875         (dw2_expand_marked_cus): Likewise.
10876         (dw2_debug_names_iterator::next): Likewise.
10877         (dwarf2_initialize_objfile): Likewise.
10878         (add_signatured_type_cu_to_table): Likewise.
10879         (create_all_type_units): Likewise.
10880         (add_type_unit): Likewise.
10881         (struct tu_abbrev_offset): Add constructor.
10882         (build_type_psymtabs_1): Adjust to std::vector change.
10883         (print_tu_stats): Likewise.
10884         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10885         (write_debug_names): Likewise.
10886
10887 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10888
10889         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10890         Make an std::vector.
10891         <n_comp_units>: Remove.
10892         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10893         to std::vector change.
10894         (dwarf2_per_objfile::get_cutu): Likewise.
10895         (dwarf2_per_objfile::get_cu): Likewise.
10896         (create_cus_from_index): Likewise.
10897         (create_addrmap_from_index): Likewise.
10898         (create_addrmap_from_aranges): Likewise.
10899         (dwarf2_read_index): Likewise.
10900         (dw2_find_last_source_symtab): Likewise.
10901         (dw2_map_symtabs_matching_filename): Likewise.
10902         (dw2_symtab_iter_next): Likewise.
10903         (dw2_print_stats): Likewise.
10904         (dw2_expand_all_symtabs): Likewise.
10905         (dw2_expand_symtabs_with_fullname): Likewise.
10906         (dw2_expand_marked_cus): Likewise.
10907         (dw2_map_symbol_filenames): Likewise.
10908         (create_cus_from_debug_names): Likewise.
10909         (dwarf2_read_debug_names): Likewise.
10910         (dw2_debug_names_iterator::next): Likewise.
10911         (dwarf2_initialize_objfile): Likewise.
10912         (set_partial_user): Likewise.
10913         (dwarf2_build_psymtabs_hard): Likewise.
10914         (read_comp_units_from_section): Remove arguments, adjust to
10915         std::vector change.
10916         (create_all_comp_units): Adjust to std::vector and
10917         read_comp_units_from_section changes.
10918         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10919         change.
10920         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10921         (psyms_seen_size): Likewise.
10922         (write_gdbindex): Likewise.
10923         (write_debug_names): Likewise.
10924
10925 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10926
10927         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10928         with dwarf2_per_objfile.
10929         (create_cus_from_index): Likewise.
10930         (create_signatured_type_table_from_index): Likewise.
10931         (dwarf2_read_index): Likewise.
10932         (dwarf2_initialize_objfile): Likewise.
10933         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10934         per_cu rather than get_dwarf2_per_objfile.
10935
10936 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10937
10938         * dwarf2read.h (struct signatured_type): Forward declare.
10939         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10940         New methods.
10941         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10942         (dw2_get_cutu): ...this.
10943         (dwarf2_per_objfile::get_cu): Rename from...
10944         (dw2_get_cu): ...this.
10945         (dwarf2_per_objfile::get_tu): New.
10946         (create_addrmap_from_index): Adjust.
10947         (create_addrmap_from_aranges): Adjust.
10948         (dw2_find_last_source_symtab): Adjust.
10949         (dw2_map_symtabs_matching_filename): Adjust.
10950         (dw2_symtab_iter_next): Adjust.
10951         (dw2_print_stats): Adjust.
10952         (dw2_expand_all_symtabs): Adjust.
10953         (dw2_expand_symtabs_with_fullname): Adjust.
10954         (dw2_expand_marked_cus): Adjust.
10955         (dw_expand_symtabs_matching_file_matcher): Adjust.
10956         (dw2_map_symbol_filenames): Adjust.
10957         (dw2_debug_names_iterator::next): Adjust.
10958         (dwarf2_initialize_objfile): Adjust.
10959         (set_partial_user): Adjust.
10960         (dwarf2_build_psymtabs_hard): Adjust.
10961
10962 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10963
10964         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10965         Remove unused variables.
10966         (dw2_map_symtabs_matching_filename): Likewise.
10967         (dwarf2_record_block_ranges): Likewise.
10968         (dwarf2_read_addr_index): Likewise.
10969         (follow_die_offset): Likewise.
10970
10971 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10972
10973         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10974         to symbol_file_add_main.
10975
10976 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10977
10978         PR mi/22299
10979         * mi/mi-console.c (do_fputc_async_safe): New.
10980         (mi_console_file::write_async_safe): New.
10981         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10982         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10983         New.
10984         * ui-file.c (ui_file::putstrn): Adjust call to
10985         fputstrn_unfiltered.
10986         * utils.c (printchar): Replace do_fputs and do_fprintf
10987         parameters by do_fputc.
10988         (fputstr_filtered): Adjust call to printchar.
10989         (fputstr_unfiltered): Likewise.
10990         (fputstrn_filtered): Likewise.
10991         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10992         printchar.
10993         * utils.h (do_fputc_ftype): New typedef.
10994         (fputstrn_unfiltered): Add do_fputc parameter.
10995
10996 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10997
10998         * regformats/i386/i386-avx.dat: Remove.
10999
11000 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11001
11002         PR gdb/22979
11003         * amd64-tdep.c (amd64_none_init_abi): New function.
11004         (amd64_x32_none_init_abi): New function.
11005         (_initialize_amd64_tdep): Register handlers for x86-64 and
11006         x64_32 with GDB_OSABI_NONE.
11007         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11008         GDB_OSABI_NONE osabi.
11009
11010 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11011
11012         PR gdb/22980
11013         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11014         GDB_OSABI_NONE.
11015         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11016         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11017
11018 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11019
11020         * common/byte-vector.h (char_vector): New type.
11021         * target.h (target_read_alloc): Return
11022         gdb::optional<byte_vector>.
11023         (target_read_stralloc): Return gdb::optional<char_vector>.
11024         (target_get_osdata): Return gdb::optional<char_vector>.
11025         * target.c (target_read_alloc_1): Templatize.  Replacement
11026         manual memory management with vector.
11027         (target_read_alloc): Change return type, adjust.
11028         (target_read_stralloc): Change return type, adjust.
11029         (target_get_osdata): Change return type, adjust.
11030         * auxv.c (struct auxv_info) <length>: Remove.
11031         <data>: Change type to gdb::optional<byte_vector>.
11032         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11033         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11034         (target_auxv_search): Adjust.
11035         (fprint_target_auxv): Adjust.
11036         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11037         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11038         (linux_make_corefile_notes): Adjust.
11039         * osdata.c (get_osdata): Adjust.
11040         * remote.c (remote_get_threads_with_qxfer): Adjust.
11041         (remote_memory_map): Adjust.
11042         (remote_traceframe_info): Adjust.
11043         (btrace_read_config): Adjust.
11044         (remote_read_btrace): Adjust.
11045         (remote_pid_to_exec_file): Adjust.
11046         * solib-aix.c (solib_aix_get_library_list): Adjust.
11047         * solib-dsbt.c (decode_loadmap): Don't free buf.
11048         (dsbt_get_initial_loadmaps): Adjust.
11049         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11050         * solib-target.c (solib_target_current_sos): Adjust.
11051         * tracepoint.c (sdata_make_value): Adjust.
11052         * xml-support.c (xinclude_start_include): Adjust.
11053         (xml_fetch_content_from_file): Adjust.
11054         * xml-support.h (xml_fetch_another): Change return type.
11055         (xml_fetch_content_from_file): Change return type.
11056         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11057         * xml-tdesc.c (file_read_description_xml): Adjust.
11058         (fetch_available_features_from_target): Change return type.
11059         (target_fetch_description_xml): Adjust.
11060         (target_read_description_xml): Adjust.
11061
11062 2018-04-06  Tom Tromey  <tom@tromey.com>
11063
11064         * value.c (~value): Update.
11065         (struct value) <contents>: Now unique_xmalloc_ptr.
11066         (value_contents_bits_eq, allocate_value_contents)
11067         (value_contents_raw, value_contents_all_raw)
11068         (value_contents_for_printing, value_contents_for_printing_const)
11069         (set_value_enclosing_type): Update.
11070
11071 2018-04-06  Tom Tromey  <tom@tromey.com>
11072
11073         * value.c (range_s): Remove typedef, VEC.
11074         (struct range): Add operator<.
11075         (range_lessthan): Remove.
11076         (ranges_contain): Change type.
11077         (~value): Update.
11078         (struct value) <unavailable, optimized_out>: Now std::vector.
11079         (value_entirely_available)
11080         (value_entirely_covered_by_range_vector)
11081         (value_entirely_unavailable, value_entirely_optimized_out):
11082         Update.
11083         (insert_into_bit_range_vector): Change argument type.
11084         (find_first_range_overlap): Likewise.
11085         (struct ranges_and_idx, value_contents_bits_eq)
11086         (require_not_optimized_out, require_available): Update.
11087         (ranges_copy_adjusted): Change argument types.
11088         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11089
11090 2018-04-06  Tom Tromey  <tom@tromey.com>
11091
11092         * value.c (~value): Update.
11093         (struct value) <parent>: Now a value_ref_ptr.
11094         (value_parent, set_value_parent, value_address, value_copy):
11095         Update.
11096
11097 2018-04-06  Tom Tromey  <tom@tromey.com>
11098
11099         * value.c (struct value): Add constructor, destructor, and member
11100         initializers.
11101         (allocate_value_lazy, value_decref): Update.
11102
11103 2018-04-06  Tom Tromey  <tom@tromey.com>
11104
11105         * value.c (struct value) <released, next>: Remove.
11106         (all_values): Now a std::vector.
11107         (allocate_value_lazy): Update.
11108         (value_next): Remove.
11109         (value_mark, value_free_to_mark, release_value)
11110         (value_release_to_mark): Update.
11111
11112 2018-04-06  Tom Tromey  <tom@tromey.com>
11113
11114         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11115         (free_value_chain): Remove.
11116         * value.c (free_value_chain): Remove.
11117         (value_release_to_mark): Return a std::vector.
11118         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11119         std::vector.
11120         (check_condition): Update.
11121         * eval.c (fetch_subexp_value): Change "val_chain" to a
11122         std::vector.
11123         * breakpoint.c (update_watchpoint): Update.
11124         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11125
11126 2018-04-06  Tom Tromey  <tom@tromey.com>
11127
11128         * value.h (free_all_values): Remove.
11129         * value.c (free_all_values): Remove.
11130
11131 2018-04-06  Tom Tromey  <tom@tromey.com>
11132
11133         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11134         (value_history_chain, value_history_count): Remove.
11135         (value_history): New global.
11136         (record_latest_value, access_value_history, show_values)
11137         (preserve_values): Update.
11138
11139 2018-04-06  Tom Tromey  <tom@tromey.com>
11140
11141         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11142         * varobj.c (varobj_set_display_format, varobj_set_value)
11143         (install_default_visualizer, construct_visualizer)
11144         (install_new_value, ~varobj, varobj_get_value_type)
11145         (my_value_of_variable, varobj_editable_p): Update.
11146         * c-varobj.c (c_describe_child, c_value_of_variable)
11147         (cplus_number_of_children, cplus_describe_child): Update.
11148         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11149         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11150         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11151
11152 2018-04-06  Tom Tromey  <tom@tromey.com>
11153
11154         * printcmd.c (last_examine_address): Change type to
11155         value_ref_ptr.
11156         (do_examine, x_command): Update.
11157
11158 2018-04-06  Tom Tromey  <tom@tromey.com>
11159
11160         * value.c (release_value): Update.
11161         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11162         (struct bpstats) <val>: Now a value_ref_ptr.
11163         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11164         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11165         (~watchpoint, print_it_watchpoint, watch_command_1)
11166         (invalidate_bp_value_on_memory_change): Update.
11167
11168 2018-04-06  Tom Tromey  <tom@tromey.com>
11169
11170         * varobj.c (varobj_clear_saved_item)
11171         (update_dynamic_varobj_children, install_new_value, ~varobj):
11172         Update.
11173         * value.h (value_incref): Move declaration earlier.
11174         (value_decref): Rename from value_free.
11175         (struct value_ref_policy): New.
11176         (value_ref_ptr): New typedef.
11177         (struct value_deleter): Remove.
11178         (gdb_value_up): Remove typedef.
11179         (release_value): Change return type.
11180         (release_value_or_incref): Remove.
11181         * value.c (set_value_parent): Update.
11182         (value_incref): Change return type.
11183         (value_decref): Rename from value_free.
11184         (value_free_to_mark, free_all_values, free_value_chain): Update.
11185         (release_value): Return value_ref_ptr.
11186         (release_value_or_incref): Remove.
11187         (record_latest_value, set_internalvar, clear_internalvar):
11188         Update.
11189         * stack.c (info_frame_command): Don't call value_free.
11190         * python/py-value.c (valpy_dealloc, valpy_new)
11191         (value_to_value_object): Update.
11192         * printcmd.c (do_examine): Update.
11193         * opencl-lang.c (lval_func_free_closure): Update.
11194         * mi/mi-main.c (register_changed_p): Don't call value_free.
11195         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11196         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11197         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11198         value_free.
11199         * guile/scm-value.c (vlscm_free_value_smob)
11200         (vlscm_scm_from_value): Update.
11201         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11202         (frame_unwind_register_unsigned, get_frame_register_bytes)
11203         (put_frame_register_bytes): Don't call value_free.
11204         * findvar.c (address_from_register): Don't call value_free.
11205         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11206         * dwarf2loc.c (entry_data_value_free_closure)
11207         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11208         (dwarf2_evaluate_loc_desc_full): Update.
11209         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11210         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11211         (~watchpoint, watch_command_1)
11212         (invalidate_bp_value_on_memory_change): Update.
11213         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11214
11215 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11216
11217         PR gdb/23022
11218         * warning.m4: Add -Wno-error=deprecated-register.
11219         * configure: Re-generate.
11220
11221 2018-04-05  Tom Tromey  <tom@tromey.com>
11222
11223         * linespec.h: Remove include of "vec.h".
11224
11225 2018-04-05  Tom Tromey  <tom@tromey.com>
11226
11227         * linespec.c (typep): Remove typedef.
11228         (find_methods, find_superclass_methods): Take a std::vector.
11229         (find_method): Use std::vector.
11230
11231 2018-04-05  Tom Tromey  <tom@tromey.com>
11232
11233         * utils.c (compare_strings): Remove.
11234         * utils.h (compare_strings): Remove.
11235         * objc-lang.h (find_imps): Update.
11236         * objc-lang.c (find_methods): Take a std::vector.
11237         (uniquify_strings, find_imps): Likewise.
11238         * linespec.c (find_methods): Take a std::vector.
11239         (decode_objc): Use std::vector.
11240         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11241         a std::vector.
11242         (find_method, find_function_symbols): Use std::vector.
11243
11244 2018-04-05  Tom Tromey  <tom@tromey.com>
11245
11246         * completer.c (completion_tracker::completion_tracker): Remove
11247         cast.
11248         (completion_tracker::discard_completions): Likewise.
11249         * breakpoint.c (ambiguous_names_p): Remove cast.
11250         * ada-lang.c (_initialize_ada_language): Remove cast.
11251         * utils.h (streq): Update.
11252         (streq_hash): Add new declaration.
11253         * utils.c (streq): Return bool.
11254         (streq_hash): New function.
11255
11256 2018-04-05  Tom Tromey  <tom@tromey.com>
11257
11258         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11259         Remove a string copy.
11260
11261 2018-04-05  Tom Tromey  <tom@tromey.com>
11262
11263         * linespec.c (filter_results): Use std::vector.
11264         (decode_line_2, decode_line_full): Update.
11265
11266 2018-04-05  Tom Tromey  <tom@tromey.com>
11267
11268         * linespec.c (canonical_to_fullform): Return std::string.
11269         (filter_results): Update.
11270         (struct decode_line_2_item): Add constructor.
11271         <fullform, displayform>: Now std::string.
11272         (decode_line_2_compare_items): Now a std::sort comparator.
11273         (decode_line_2): Update.
11274
11275 2018-04-05  Tom Tromey  <tom@tromey.com>
11276
11277         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11278         (unexpected_linespec_error): Update.
11279         (linespec_parse_basic, parse_linespec): Update.
11280
11281 2018-04-05  Tom Tromey  <tom@tromey.com>
11282
11283         * linespec.c (linespec_parse_basic): Reindent.
11284
11285 2018-04-05  Tom Tromey  <tom@tromey.com>
11286
11287         * minsyms.h (iterate_over_minimal_symbols): Update.
11288         * minsyms.c (iterate_over_minimal_symbols): Take a
11289         gdb::function_view.
11290         * linespec.c (struct collect_minsyms): Remove.
11291         (compare_msyms): Now a std::sort comparator.
11292         (add_minsym): Add parameters.
11293         (search_minsyms_for_name): Update.  Use std::vector.
11294
11295 2018-04-03  Tom Tromey  <tom@tromey.com>
11296
11297         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11298         gdb::byte_vector.
11299
11300 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11301
11302         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11303
11304 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11305
11306         PR gdb/16959
11307         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11308         printing static type.
11309
11310 2018-04-01  Tom Tromey  <tom@tromey.com>
11311
11312         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11313         (rs6000_xfer_shared_libraries): Update.
11314
11315 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11316
11317         * common/gdb_vecs.h (char_ptr): Remove.
11318         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11319
11320 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11321
11322         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11323         with std::vector.
11324         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11325
11326 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11327
11328         * tracepoint.h (struct uploaded_tp): Initialize fields.
11329         <actions, step_actions, cmd_strings>: Change type to
11330         std::vector<char *>.
11331         * tracepoint.c (get_uploaded_tp): Allocate with new.
11332         (free_uploaded_tps): Free with delete.
11333         (parse_tracepoint_definition): Adjust to std::vector change.
11334         * breakpoint.c (read_uploaded_action): Likewise.
11335         (create_tracepoint_from_upload): Likewise.
11336         * ctf.c (ctf_write_uploaded_tp): Likewise.
11337         (SET_ARRAY_FIELD): Likewise.
11338         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11339
11340 2018-03-30  Tom Tromey  <tom@tromey.com>
11341
11342         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11343         std::unique_ptr.
11344         (svr4_keep_data_in_core): Update.
11345         (svr4_read_so_list): Update.
11346
11347 2018-03-30  Tom Tromey  <tom@tromey.com>
11348
11349         * windows-nat.c (handle_output_debug_string, handle_exception):
11350         Update.
11351         * target.h (target_read_string): Update.
11352         * target.c (target_read_string): Change "string" to
11353         unique_xmalloc_ptr.
11354         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11355         Update.
11356         * solib-frv.c (frv_current_sos): Update.
11357         * solib-dsbt.c (dsbt_current_sos): Update.
11358         * solib-darwin.c (darwin_current_sos): Update.
11359         * linux-thread-db.c (inferior_has_bug): Update.
11360         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11361         Update.  Remove alloca.
11362         * ada-lang.c (ada_main_name): Update.
11363
11364 2018-03-30  Tom Tromey  <tom@tromey.com>
11365
11366         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11367         (struct dwo_file_deleter): New.
11368         (dwo_file_up): New typedef.
11369         (open_and_init_dwo_file): Use dwo_file_up.
11370         (free_dwo_file_cleanup): Remove.
11371
11372 2018-03-30  Tom Tromey  <tom@tromey.com>
11373
11374         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11375         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11376
11377 2018-03-30  Tom Tromey  <tom@tromey.com>
11378
11379         * dwarf2read.c (class free_cached_comp_units): New class.
11380         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11381         (free_cached_comp_units): Remove function.
11382
11383 2018-03-30  Tom Tromey  <tom@tromey.com>
11384
11385         * utils.h (make_cleanup_unpush_target): Remove.
11386         * inf-ptrace.c (struct target_unpusher): New.
11387         (target_unpush_up) New typedef.
11388         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11389         target_unpush_up.
11390         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11391
11392 2018-03-27  Tom Tromey  <tom@tromey.com>
11393
11394         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11395
11396 2018-03-27  Pedro Alves  <palves@redhat.com>
11397             Tom Tromey  <tom@tromey.com>
11398
11399         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11400         destructor.  Now a class.
11401         (gdb_readline_wrapper_cleanup): Remove function.
11402         (gdb_readline_wrapper): Remove cleanups.
11403
11404 2018-03-27  Tom Tromey  <tom@tromey.com>
11405
11406         * typeprint.h (struct type_print_options) <local_typedefs,
11407         global_typedefs>: Remove "struct" keyword.
11408         (class typedef_hash_table): New class.
11409         (recursively_update_typedef_hash, add_template_parameters)
11410         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11411         (find_typedef_in_hash): Don't declare.
11412         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11413         (typedef_hash_table::recursively_update): Rename from
11414         recursively_update_typedef_hash.  Now a member.
11415         (typedef_hash_table::add_template_parameters): Rename from
11416         add_template_parameters.  Now a member.
11417         (typedef_hash_table::typedef_hash_table): Now a constructor;
11418         rename from create_typedef_hash.
11419         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11420         rename from free_typedef_hash.
11421         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11422         (do_free_global_table): Remove.
11423         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11424         from copy_type_recursive.
11425         (create_global_typedef_table): Remove.
11426         (typedef_hash_table::find_global_typedef): Now a member of
11427         typedef_hash_table.
11428         (typedef_hash_table::find_typedef): Rename from
11429         find_typedef_in_hash; now a member.
11430         (whatis_exp): Update.
11431         * extension.h (struct ext_lang_type_printers): Add constructor and
11432         destructor.
11433         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11434         declare.
11435         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11436         Now a constructor; rename from start_ext_lang_type_printers.
11437         (ext_lang_type_printers): Now a destructor; rename from
11438         free_ext_lang_type_printers.
11439         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11440         Update.
11441         (c_type_print_base_struct_union): Update.  Remove cleanups.
11442
11443 2018-03-27  Tom Tromey  <tom@tromey.com>
11444
11445         * dwarf-index-write.c: Include <cmath>.
11446
11447 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11448
11449         * NEWS: Add entry describing new "set|show varsize-limit" command.
11450         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11451         command.
11452         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11453         "set variable".
11454
11455 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11456
11457         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11458         dwarf-index-write.c
11459         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11460         * dwarf-index-common.c: New file.
11461         * dwarf-index-common.h: New file.
11462         * dwarf-index-write.c: New file.
11463         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11464         (struct dwarf2_section_info): Move from here.
11465         (dwarf2_section_info_def): Likewise.
11466         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11467         (offset_type): Likewise.
11468         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11469         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11470         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11471         (byte_swap): Likewise.
11472         (MAYBE_SWAP): Likewise.
11473         (dwarf2_per_cu_ptr): Likewise.
11474         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11475         (struct tu_stats): Likewise.
11476         (struct dwarf2_per_objfile): Likewise.
11477         (struct dwarf2_per_cu_data): Likewise.
11478         (struct signatured_type): Likewise.
11479         (sig_type_ptr): Likewise.
11480         (DEF_VEC_P (sig_type_ptr)): Likewise.
11481         (INDEX4_SUFFIX): Likewise.
11482         (INDEX5_SUFFIX): Likewise.
11483         (DEBUG_STR_SUFFIX): Likewise.
11484         (dwarf2_read_section): Make non-static.
11485         (mapped_index_string_hash): Move from here.
11486         (dwarf5_djb_hash): Likewise.
11487         (file_write): Likewise.
11488         (class data_buf): Likewise.
11489         (struct symtab_index_entry): Likewise.
11490         (struct mapped_symtab): Likewise.
11491         (find_slot): Likewise.
11492         (hash_expand): Likewise.
11493         (add_index_entry): Likewise.
11494         (uniquify_cu_indices): Likewise.
11495         (class c_str_view): Likewise.
11496         (class c_str_view_hasher): Likewise.
11497         (class vector_hasher): Likewise.
11498         (write_hash_table): Likewise.
11499         (psym_index_map): Likewise.
11500         (struct addrmap_index_data): Likewise.
11501         (add_address_entry): Likewise.
11502         (add_address_entry_worker): Likewise.
11503         (write_address_map): Likewise.
11504         (symbol_kind): Likewise.
11505         (write_psymbols): Likewise.
11506         (struct signatured_type_index_data): Likewise.
11507         (write_one_signatured_type): Likewise.
11508         (recursively_count_psymbols): Likewise.
11509         (recursively_write_psymbols): Likewise.
11510         (class debug_names): Likewise.
11511         (check_dwarf64_offsets): Likewise.
11512         (psyms_seen_size): Likewise.
11513         (write_gdbindex): Likewise.
11514         (write_debug_names): Likewise.
11515         (assert_file_size): Likewise.
11516         (write_psymtabs_to_index): Likewise.
11517         (save_gdb_index_command): Likewise.
11518         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11519         command.
11520         * dwarf2read.h: New file.
11521
11522 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11523
11524         PR gdb/22670
11525         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11526         symbol name if the CU's language stores symbol names in linkage
11527         format.
11528         * language.h (struct language_defn)
11529         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11530         all instances of this struct.
11531
11532 2018-03-26  Tom Tromey  <tom@tromey.com>
11533
11534         * stack.c (backtrace_command_1): Remove verbose code.
11535
11536 2018-03-26  Tom Tromey  <tom@tromey.com>
11537
11538         * python/py-framefilter.c (py_print_type): Don't catch
11539         exceptions.  Return void.
11540         (py_print_value): Likewise.
11541         (py_print_single_arg): Likewise.
11542         (enumerate_args): Don't catch exceptions.
11543         (py_print_args): Likewise.
11544         (py_print_frame): Likewise.
11545         (gdbpy_apply_frame_filter): Catch exceptions here.
11546
11547 2018-03-26  Tom Tromey  <tom@tromey.com>
11548
11549         * stack.c (_initialize_stack): Remove trailing newlines from help
11550         text.  Add "Usage" line to "backtrace" help.
11551
11552 2018-03-26  Tom Tromey  <tom@tromey.com>
11553
11554         PR python/16486:
11555         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11556
11557 2018-03-26  Tom Tromey  <tom@tromey.com>
11558
11559         * python/py-framefilter.c (py_print_single_arg): Return
11560         EXT_LANG_BT_ERROR from catch.
11561
11562 2018-03-26  Tom Tromey  <tom@tromey.com>
11563
11564         PR backtrace/15584:
11565         * stack.c (backtrace_command_1): Move some code into no-filters
11566         "if".
11567
11568 2018-03-26  Tom Tromey  <tom@tromey.com>
11569
11570         * python/py-framefilter.c (throw_quit_or_print_exception): New
11571         function.
11572         (gdbpy_apply_frame_filter): Use it.
11573
11574 2018-03-26  Tom Tromey  <tom@tromey.com>
11575
11576         PR cli/17716:
11577         * python/py-framefilter.c (py_print_type, py_print_value)
11578         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11579         RETURN_MASK_ERROR.
11580
11581 2018-03-26  Tom Tromey  <tom@tromey.com>
11582
11583         * python/py-framefilter.c (enumerate_args): Use
11584         gdb::unique_xmalloc_ptr.
11585
11586 2018-03-26  Tom Tromey  <tom@tromey.com>
11587
11588         * python/py-framefilter.c (py_print_frame): Return
11589         EXT_LANG_BT_OK.
11590         (gdbpy_apply_frame_filter): Update comment.
11591         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11592         Remove.
11593         <EXT_LANG_BT_NO_FILTERS>: Change value.
11594
11595 2018-03-26  Tom Tromey  <tom@tromey.com>
11596
11597         PR backtrace/15582:
11598         * stack.c (backtrace_command): Parse "hide" argument.
11599         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11600         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11601         constant.
11602
11603 2018-03-26  Tom Tromey  <tom@tromey.com>
11604
11605         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11606         add "flags".
11607         (backtrace_command): Remove "fulltrace", add "flags".
11608
11609 2018-03-26  Tom Tromey  <tom@tromey.com>
11610
11611         * stack.c (backtrace_command): Rewrite command line parsing.
11612
11613 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11614
11615         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11616
11617 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11618
11619         * filename-seen-cache.h: Add include guard.
11620
11621 2018-03-26  Keith Seitz  <keiths@redhat.com>
11622
11623         * symfile.c (place_section): Remove "struct" from section_addr_info
11624         in comment.
11625         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11626         "struct" keyword from section_addr_info.
11627
11628 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11629
11630         * regformats/regdef.h (reg): Add constructors.
11631
11632 2018-03-25  Pedro Alves  <palves@redhat.com>
11633
11634         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11635         if then/else bodies in var_func_name extraction.
11636
11637 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11638
11639         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11640         lookup_minimal_symbol() to find symbol entry.
11641         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11642
11643 2018-03-23  Keith Seitz  <keiths@redhat.com>
11644
11645         PR c++/22968
11646         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11647         nested type definitions for C++, too.
11648
11649 2018-03-23  Tom Tromey  <tom@tromey.com>
11650
11651         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11652         a typedef.
11653         (macho_register_oso): Remove.
11654         (macho_symtab_read): Take a std::vector.
11655         (oso_el_compare_name): Now a std::sort comparator.
11656         (macho_symfile_read_all_oso): Take a std::vector.
11657         (macho_symfile_read): Use std::vector.  Remove cleanups.
11658
11659 2018-03-22  Tom Tromey  <tom@tromey.com>
11660
11661         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11662         (record_full_goto_bookmark): Use std::string.
11663
11664 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11665
11666         PR tdep/18295
11667         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11668         a single mask.
11669
11670 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11671
11672         * rs6000-tdep.c (store_insn_p): New function.
11673         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11674         and cr_reg to their unshifted values. Use store_insn_p to
11675         match LR saves using either R1 or fdata->alloca_reg. Use
11676         store_insn_p to match CR saves. Set alloca_reg_offset
11677         when alloca_reg and framep are set. Remove lr_reg shift
11678         when assigning to fdata->lr_register.
11679
11680 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11681
11682         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11683         command line args instead of emitting a warning.
11684
11685 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11686
11687         * tracepoint.h (struct static_tracepoint_marker): Initialize
11688         fields, define default constructor, move constructor and move
11689         assignment, disable the rest.
11690         <str_id, extra>: Make std::string.
11691         (release_static_tracepoint_marker): Remove.
11692         (free_current_marker): Remove.
11693         * tracepoint.c (free_current_marker): Remove.
11694         (parse_static_tracepoint_marker_definition): Adjust to
11695         std::string, use new hex2str overload.
11696         (release_static_tracepoint_marker): Remove.
11697         (print_one_static_tracepoint_marker): Get marker by reference
11698         and adjust to std::string.
11699         (info_static_tracepoint_markers_command): Adjust to std::vector
11700         changes
11701         * target.h (static_tracepoint_marker_p): Remove typedef.
11702         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11703         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11704         bool.
11705         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11706         * target-debug.h
11707         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11708         (target_debug_print_std_vector_static_tracepoint_marker): New.
11709         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11710         to...
11711         (target_debug_print_static_tracepoint_marker_p): ... this.
11712         * target-delegates.c: Re-generate.
11713         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11714         Make std::string.
11715         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11716         (decode_static_tracepoint_spec): Adjust to std::vector.
11717         (tracepoint_print_one_detail): Adjust to std::string.
11718         (strace_marker_decode_location): Adjust to std::string.
11719         (update_static_tracepoint): Adjust to std::string, remove call
11720         to release_static_tracepoint_marker.
11721         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11722         Adjust to std::vector.
11723         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11724         (remote_static_tracepoint_markers_by_strid): Adjust to
11725         std::vector.
11726         * common/rsp-low.h (hex2str): New overload with explicit count
11727         of bytes.
11728         * common/rsp-low.c (hex2str): New overload with explicit count
11729         of bytes.
11730         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11731         (_initialize_rsp_low_selftests): Add test_hex2str test.
11732         * unittests/tracepoint-selftests.c
11733         (test_parse_static_tracepoint_marker_definition): Adjust to
11734         std::string.
11735
11736 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11737
11738         * tracepoint.c (parse_static_tracepoint_marker_definition):
11739         Consider case where the definition is followed by more
11740         definitions.
11741         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11742         tracepoint-selftests.c.
11743         * unittests/tracepoint-selftests.c: New.
11744
11745 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11746
11747         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11748         Carvalho.
11749
11750 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11751
11752         * symtab.c (find_pc_sect_line): fixed indentation.
11753
11754 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11755
11756         * symtab.c (find_pc_sect_line): now uses binary search.
11757
11758 2018-03-19  Tom Tromey  <tom@tromey.com>
11759
11760         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11761         "IDENT" production.
11762
11763 2018-03-19  Pedro Alves  <palves@redhat.com>
11764             Tom Tromey  <tom@tromey.com>
11765
11766         * unittests/observable-selftests.c: New file.
11767         * common/observable.h: New file.
11768         * observable.h: New file.
11769         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11770         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11771         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11772         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11773         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11774         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11775         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11776         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11777         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11778         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11779         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11780         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11781         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11782         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11783         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11784         tui/tui-interp.c, valops.c: Update all users.
11785         * tui/tui-hooks.c (tui_bp_created_observer)
11786         (tui_bp_deleted_observer, tui_bp_modified_observer)
11787         (tui_inferior_exit_observer, tui_before_prompt_observer)
11788         (tui_normal_stop_observer, tui_register_changed_observer):
11789         Remove.
11790         (tui_observers_token): New global.
11791         (attach_or_detach, tui_attach_detach_observers): New functions.
11792         (tui_install_hooks, tui_remove_hooks): Use
11793         tui_attach_detach_observers.
11794         * record-btrace.c (record_btrace_thread_observer): Remove.
11795         (record_btrace_thread_observer_token): New global.
11796         * observer.sh: Remove.
11797         * observer.c: Rename to observable.c.
11798         * observable.c (namespace gdb_observers): Define new objects.
11799         (observer_debug): Move into gdb_observers namespace.
11800         (struct observer, struct observer_list, xalloc_observer_list_node)
11801         (xfree_observer_list_node, generic_observer_attach)
11802         (generic_observer_detach, generic_observer_notify): Remove.
11803         (_initialize_observer): Update.
11804         Don't include observer.inc.
11805         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11806         (clean mostlyclean): Likewise.
11807         (observer.h, observer.inc): Remove targets.
11808         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11809         (COMMON_SFILES): Use observable.c, not observer.c.
11810         * .gitignore: Remove observer.h.
11811
11812 2018-03-18  Tom Tromey  <tom@tromey.com>
11813
11814         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11815         gdb::def_vector.
11816         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11817
11818 2018-03-17  Tom Tromey  <tom@tromey.com>
11819
11820         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11821
11822 2018-03-17  Tom Tromey  <tom@tromey.com>
11823
11824         * target.c (class scoped_target_fd): New.
11825         (target_fileio_close_cleanup): Remove.
11826         (target_fileio_read_alloc_1): Use scoped_target_fd.
11827
11828 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11829
11830         * silent-rules.mk: New.
11831         * Makefile.in: Include silent-rules.mk
11832         (srcdir, VPATH, top_srcdir): Move up.
11833         (COMPILE): Add ECHO_CXX.
11834         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11835         (init.c): Add ECHO_INIT_C.
11836         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11837         (version.c): Add ECHO_GEN.
11838         (printcmd.o): Add ECHO_CXX.
11839         (target-float.o): Add ECHO_CXX.
11840         (ada-exp.o): Add ECHO_CXX.
11841         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11842         (insight$(EXEEXT)): Add ECHO_CXXLD.
11843         * gnulib/configure.ac: Add AM_SILENT_RULES.
11844         * gnulib/aclocal.m4: Re-generate.
11845         * gnulib/configure: Re-generate.
11846         * gnulib/import/Makefile.in: Re-generate.
11847
11848 2018-03-16  Tom Tromey  <tom@tromey.com>
11849
11850         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11851         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11852         * utils.c (do_free_section_addr_info)
11853         (make_cleanup_free_section_addr_info): Remove.
11854         * symfile.h (struct other_sections): Add constructor.
11855         (struct section_addr_info): Remove.
11856         (section_addr_info): New typedef.
11857         (struct sym_fns) <sym_offsets>: Change type of parameter.
11858         (build_section_addr_info_from_objfile)
11859         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11860         (default_symfile_offsets, symbol_file_add)
11861         (symbol_file_add_from_bfd)
11862         (build_section_addr_info_from_section_table): Update.
11863         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11864         * symfile.c (alloc_section_addr_info): Remove.
11865         (build_section_addr_info_from_section_table): Change return type.
11866         Update.
11867         (build_section_addr_info_from_bfd)
11868         (build_section_addr_info_from_objfile): Likewise.
11869         (free_section_addr_info): Remove.
11870         (relative_addr_info_to_section_offsets): Change type of "addrs".
11871         (addrs_section_compar): Now a std::sort comparator.
11872         (addrs_section_sort): Change return type.
11873         (addr_info_make_relative): Change type of "addrs".  Update.
11874         (default_symfile_offsets, syms_from_objfile_1)
11875         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11876         (symbol_file_add_separate): Update.
11877         (symbol_file_add): Change type of "addrs".  Update.
11878         (add_symbol_file_command): Update.  Remove cleanups.
11879         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11880         cleanups.
11881         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11882         * solib.c (solib_read_symbols): Update.
11883         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11884         * machoread.c (macho_symfile_offsets): Update.
11885         * jit.c (jit_bfd_try_read_symtab): Update.
11886
11887 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11888
11889         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11890         unittests/utils-selftests.c.
11891         * unittests/utils-selftests.c: New file.
11892
11893 2018-03-14  Tom Tromey  <tom@tromey.com>
11894
11895         PR cli/14977:
11896         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11897         for NULL.
11898
11899 2018-03-14  Tom Tromey  <tom@tromey.com>
11900
11901         PR cli/19918:
11902         * printcmd.c (printf_pointer): Allow "-" in format.
11903
11904 2018-03-14  Tom Tromey  <tom@tromey.com>
11905
11906         * printcmd.c (_initialize_printcmd): Add usage to printf.
11907
11908 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11909
11910         * MAINTAINERS: Update my email address.
11911
11912 2018-03-13  Tom Tromey  <tom@tromey.com>
11913
11914         * machoread.c (macho_check_dsym): Change filenamep to a
11915         std::string*.
11916         (macho_symfile_read): Update.
11917         * symfile.c (load_command): Use std::string.
11918
11919 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11920
11921         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11922         to error message string.
11923         (riscv_register_name): Use xsnprintf instead of sprintf.
11924         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11925         internal_error.
11926         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11927         error.
11928         (riscv_push_dummy_call): Likewise.
11929
11930 2018-03-12  Tom Tromey  <tom@tromey.com>
11931
11932         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11933         Use gdb::byte_vector.
11934         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11935
11936 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11937
11938         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11939         parameter type to readable_regcache.
11940         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11941         the declaration.
11942
11943 2018-03-11  Tom Tromey  <tom@tromey.com>
11944
11945         * dwarf2read.c (struct nextfield): Add initializers.
11946         (struct nextfnfield): Remove.
11947         (struct fnfieldlist): Add initializers.  Remove "length" and
11948         "head", use std::vector.
11949         (struct decl_field_list): Remove.
11950         (struct field_info): Add initializers.
11951         <fields, baseclasses>: Now std::vector.
11952         <nbaseclasses, nfnfields, typedef_field_list_count,
11953         nested_types_list_count>: Remove.
11954         (dwarf2_add_field, dwarf2_add_type_defn)
11955         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11956         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11957         (process_structure_scope): Update.
11958
11959 2018-03-11  Tom Tromey  <tom@tromey.com>
11960
11961         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11962         for use by std::sort.
11963         (build_type_psymtabs_1): Use std::vector.
11964
11965 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11966
11967         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11968         and LIBMPFR in the printed configuration.
11969
11970 2018-03-08  Tom Tromey  <tom@tromey.com>
11971
11972         * source.c (get_filename_and_charpos): Use scoped_fd.
11973         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11974         (procfs_pidlist): Likewise.
11975         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11976         (iterate_over_mappings): Likewise.
11977
11978 2018-03-08  Tom Tromey  <tom@tromey.com>
11979
11980         * infcall.c (struct call_return_meta_info)
11981         <stack_temporaries_enabled>: Remove.
11982         (get_call_return_value, call_function_by_hand_dummy): Update.
11983         * thread.c (disable_thread_stack_temporaries): Remove.
11984         (enable_thread_stack_temporaries): Remove.
11985         (thread_stack_temporaries_enabled_p): Return bool.
11986         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11987         (get_last_thread_stack_temporary): Update.
11988         * eval.c (evaluate_subexp): Update.
11989         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11990         class, not a function.
11991         (value_ptr, value_vec): Remove typedefs.
11992         (class thread_info) <stack_temporaries_enabled>: Now bool.
11993         <stack_temporaries>: Now a std::vector.
11994         (thread_stack_temporaries_enabled_p)
11995         (value_in_thread_stack_temporaries): Return bool.
11996
11997 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11998
11999         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12000         (getpkt_or_notif_sane_1): Likewise.
12001
12002 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12003
12004         * build-id.c (build_id_to_debug_bfd): Use std::string.
12005
12006 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12007
12008         * build-id.c (find_separate_debug_file_by_buildid): Return
12009         std::string.
12010         * build-id.h (find_separate_debug_file_by_buildid): Return
12011         std::string.
12012         * coffread.c (coff_symfile_read): Adjust to std::string.
12013         * elfread.c (elf_symfile_read): Adjust to std::string.
12014         * symfile.c (separate_debug_file_exists): Change parameter to
12015         std::string.
12016         (find_separate_debug_file): Return std::string.
12017         (find_separate_debug_file_by_debuglink): Return std::string.
12018         * symfile.h (find_separate_debug_file_by_debuglink): Return
12019         std::string.
12020
12021 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12022
12023         * common/xml-utils.c (xml_escape_text): Move code to...
12024         (xml_escape_text_append): ... this new function.
12025         * common/xml-utils.h (xml_escape_text_append): New declaration.
12026         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12027         New function.
12028         (_initialize_xml_utils): register test_xml_escape_text_append as
12029         a selftest.
12030
12031 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12032
12033         * defs.h: Remove MAX_REGISTER_SIZE.
12034         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12035         asserts.
12036         * python/py-unwind.c (pyuw_sniffer): Likewise.
12037
12038 2018-03-07  Tom Tromey  <tom@tromey.com>
12039
12040         * linux-tdep.c (linux_info_proc): Update.
12041         * target.h (struct target_ops) <to_fileio_readlink>: Return
12042         optional<string>.
12043         (target_fileio_readlink): Return optional<string>.
12044         * remote.c (remote_hostio_readlink): Return optional<string>.
12045         * inf-child.c (inf_child_fileio_readlink): Return
12046         optional<string>.
12047         * target.c (target_fileio_readlink): Return optional<string>.
12048
12049 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12050
12051         * regcache.c (cooked_read_test): Add riscv to the list of
12052         architectures that have a save_reggroup.
12053
12054 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12055
12056         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12057         value is not a dynamic class object.
12058
12059 2018-03-06  Tom Tromey  <tom@tromey.com>
12060
12061         * rust-exp.y: Formatting fixes.
12062
12063 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12064
12065         * riscv-tdep.c (riscv_register_name): Remove target description
12066         support.
12067         (riscv_gdbarch_init): Remove target description check.
12068
12069 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12070
12071         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12072         comment.
12073         * riscv-tdep.h: Likewise.
12074
12075 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12076
12077         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12078         (riscv_pseudo_register_write): Delete.
12079         (riscv_gdbarch_init): Remove all use of pseudo registers.
12080
12081 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12082
12083         * record-btrace.c (btrace_print_lines): Replace cleanup
12084         parameter with RAII equivalents.
12085         (btrace_insn_history): Replace cleanup with RAII equivalents.
12086         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12087         make_cleanup_ui_out_tuple_begin_end): Remove.
12088         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12089         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12090         make_cleanup_ui_out_list_begin_end): Remove.
12091
12092 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12093
12094         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12095         parameter types to std::vector.  Use bool.
12096         (record_btrace_wait): Replace VEC(tp_t) with
12097         std::vector<thread_info *>.
12098         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12099
12100 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12101
12102         * record-btrace.c (record_btrace_disable_callback): Remove.
12103         (struct scoped_btrace_disable): New.
12104         (record_btrace_open): Use scoped_btrace_disable.
12105
12106 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12107
12108         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12109         reading values from registers.
12110
12111 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12112
12113         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12114         where appropriate.
12115
12116 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12117
12118         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12119         change parameter type.  Use GDB's print functions, and use
12120         core_addr_to_string where appropriate.
12121         (riscv_push_dummy_call): Use core_addr_to_string where
12122         appropriate, update call to riscv_print_arg_location, and reindent
12123         a few lines.
12124         (riscv_return_value): Update call to riscv_print_arg_location.
12125
12126 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12127             Tim Newsome <tim@sifive.com>
12128             Albert Ou <a0u@eecs.berkeley.edu>
12129             Darius Rad <darius@bluespec.com>
12130
12131         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12132         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12133         (ALLDEPFILES): Add riscv-tdep.c
12134         * configure.tgt: Add riscv support.
12135         * riscv-tdep.c: New file.
12136         * riscv-tdep.h: New file.
12137         * NEWS: Mention new target.
12138         * MAINTAINERS: Add entry for riscv.
12139
12140 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12141
12142         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12143         fields within aggregates.
12144
12145 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12146
12147         * record-btrace.c (btrace_print_lines): Change type of flags to
12148         gdb_disassembly_flags.
12149
12150 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12151
12152         * fbsd-nat.c: Include "inf-ptrace.h".
12153         (USE_SIGTRAP_SIGINFO): Conditionally define.
12154         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12155         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12156         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12157         function.
12158         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12159         Likewise.
12160         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12161         Likewise.
12162         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12163         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12164         "supports_stopped_by_hw_breakpoint" target methods.
12165
12166 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12167
12168         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12169         * fbsd-nat.c (debug_fbsd_nat): New variable.
12170         (show_fbsd_nat_debug): New function.
12171         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12172         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12173
12174 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12175
12176         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12177         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12178         prototype.
12179         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12180         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12181         method.
12182
12183 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12184
12185         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12186         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12187
12188 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12189
12190         * charset.c (struct charset_vector): New.
12191         (charsets): Change type to charset_vector.
12192         (find_charset_names): Adjust.
12193         (add_one): Adjust.
12194         (_initialize_charset): Adjust.
12195
12196 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12197
12198         * progspace.h (struct program_space) <deleted_solibs>: Change
12199         type to std::vector<std::string>.
12200         * progspace.c (clear_program_space_solib_cache): Adjust.
12201         * breakpoint.c (print_solib_event): Adjust.
12202         (check_status_catch_solib): Adjust.
12203         * solib.c (update_solib_list): Adjust.
12204         * ui-out.h (class ui_out) <field_string>: New overload.
12205         * ui-out.c (ui_out::field_string): New overload.
12206
12207 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12208
12209         * progspace.h (struct program_space): Add constructor and
12210         destructor, initialize fields.
12211         (add_program_space): Remove.
12212         * progspace.c (add_program_space): Rename to...
12213         (program_space::program_space): ... this.
12214         (release_program_space): Rename to...
12215         (program_space::~program_space): ... this.
12216         (delete_program_space): Use delete to delete program_space.
12217         (initialize_progspace): Use new to allocate program_space.
12218         * inferior.c (add_inferior_with_spaces): Likewise.
12219         (clone_inferior_command): Likewise.
12220         * infrun.c (follow_fork_inferior): Likewise.
12221         (handle_vfork_child_exec_or_exit): Likewise.
12222
12223 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12224
12225         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12226         (delim_string_to_char_ptr_vec): Return std::vector of
12227         gdb::unique_xmalloc_ptr.
12228         (dirnames_to_char_ptr_vec_append): Take std::vector of
12229         gdb::unique_xmalloc_ptr.
12230         (dirnames_to_char_ptr_vec): Return std::vector of
12231         gdb::unique_xmalloc_ptr.
12232         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12233         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12234         (delim_string_to_char_ptr_vec): Return an std::vector of
12235         gdb::unique_xmalloc_ptr, adjust the code.
12236         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12237         gdb::unique_xmalloc_ptr, adjust the code.
12238         (dirnames_to_char_ptr_vec): Return an std::vector of
12239         gdb::unique_xmalloc_ptr, adjust the code.
12240         * auto-load.c (auto_load_safe_path_vec): Change type to
12241         std::vector of gdb::unique_xmalloc_ptr.
12242         (auto_load_expand_dir_vars): Return an std::vector of
12243         gdb::unique_xmalloc_ptr, adjust the code.
12244         (auto_load_safe_path_vec_update): Adjust.
12245         (filename_is_in_auto_load_safe_path_vec): Adjust.
12246         (auto_load_objfile_script_1): Adjust.
12247         * build-id.c (build_id_to_debug_bfd): Adjust.
12248         * linux-thread-db.c (thread_db_load_search): Adjust.
12249         * source.c (add_path): Adjust.
12250         (openp): Adjust.
12251         * symfile.c (find_separate_debug_file): Adjust.
12252         * utils.c (do_free_char_ptr_vec): Remove.
12253         (make_cleanup_free_char_ptr_vec): Remove.
12254
12255 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12256
12257         PR gdb/22907
12258         * common/pathstuff.c: Conditionally include "<windows.h>".
12259
12260 2018-03-01  Georg Sauthoff  <mail@georg.so>
12261
12262         PR gdb/22888
12263         * gcore.in: Quote variables and switch interpreter to bash.
12264
12265 2018-03-01  Tom Tromey  <tom@tromey.com>
12266
12267         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12268         assertion.  Add assertion for discriminant_index.
12269         (quirk_rust_enum): Use correct base type name in univariant case.
12270
12271 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12272
12273         * record.c (get_call_history_modifiers): Return a
12274         record_print_flags.
12275         (cmd_record_call_history): Adjust.
12276         * record-btrace.c (record_btrace_call_history): Adjust.
12277         (record_btrace_call_history_range): Adjust.
12278         (record_btrace_call_history_from): Adjust.
12279         * target-debug.h (target_debug_print_record_print_flags): New.
12280         * target-delegates.c: Re-generate.
12281         * target.c (target_call_history): Change flags type.
12282         (target_call_history_from): Likewise.
12283         (target_call_history_range): Likewise.
12284         * target.h (struct target_ops) <target_call_history>: Likewise.
12285         (target_call_history_from): Likewise.
12286         (target_call_history_range): Likewise.
12287
12288 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12289             Simon Marchi  <simon.marchi@polymtl.ca>
12290
12291         * common/common-utils.c: Include "sys/stat.h".
12292         (is_regular_file): Move here from "source.c"; change return
12293         type to "bool".
12294         * common/common-utils.h (is_regular_file): New prototype.
12295         * common/pathstuff.c (contains_dir_separator): New function.
12296         * common/pathstuff.h (contains_dir_separator): New prototype.
12297         * source.c: Don't include "sys/stat.h".
12298         (is_regular_file): Move to "common/common-utils.c".
12299
12300 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12301
12302         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12303         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12304         * auto-load.c: Include "common/pathstuff.h".
12305         * common/common-def.h (current_directory): Move here.
12306         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12307         function.
12308         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12309         prototype.
12310         * common/pathstuff.c: New file.
12311         * common/pathstuff.h: New file.
12312         * compile/compile.c: Include "common/pathstuff.h".
12313         * defs.h (current_directory): Move to "common/common-defs.h".
12314         * dwarf2read.c: Include "common/pathstuff.h".
12315         * exec.c: Likewise.
12316         * guile/scm-safe-call.c: Likewise.
12317         * linux-thread-db.c: Likewise.
12318         * main.c: Likewise.
12319         * nto-tdep.c: Likewise.
12320         * objfiles.c: Likewise.
12321         * source.c: Likewise.
12322         * symtab.c: Likewise.
12323         * utils.c: Include "common/pathstuff.h".
12324         (gdb_realpath): Move to "common/pathstuff.c".
12325         (gdb_realpath_keepfile): Likewise.
12326         (gdb_abspath): Likewise.
12327         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12328         (gdb_realpath_keepfile): Likewise.
12329         (gdb_abspath): Likewise.
12330
12331 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12332
12333         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12334         wildcard process pid for super_resume for kernels with a
12335         specific bug.
12336
12337 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12338
12339         * compile/compile.c (get_args): Add additional comments
12340         explaining function.
12341
12342 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12343             Tom Tromey  <tom@tromey.com>
12344
12345         * target.h (memory_write_request_s): Remove typedef.  Don't define
12346         VEC.
12347         (target_write_memory_blocks): Change argument to std::vector.
12348         (struct memory_write_request): Add constructor.
12349         * target-memory.c (compare_block_starting_address): Return bool.
12350         Change argument types.
12351         (claim_memory): Change arguments to use std::vector.
12352         (split_regular_and_flash_blocks, blocks_to_erase)
12353         (compute_garbled_blocks): Likewise.
12354         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12355         (target_write_memory_blocks): Change argument to std::vector.
12356         * symfile.c (struct load_section_data): Add constructor and
12357         destructor.  Use std::vector for "requests".
12358         (struct load_progress_data): Add initializers.
12359         (load_section_callback): Update.  Use "new".
12360         (clear_memory_write_data): Remove.
12361         (generic_load): Update.
12362
12363 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12364
12365         * arch/aarch64.h: Use common/tdesc.h.
12366
12367 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12368
12369         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12370         architecture with a 64-bit ABI.
12371
12372 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12373
12374         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12375         ahead of target description loading.
12376
12377 2018-02-26  Tom Tromey  <tom@tromey.com>
12378
12379         * stack.c (backtrace_command_1): Update.
12380         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12381         of "flags".
12382         * python/py-framefilter.c (py_print_frame)
12383         (gdbpy_apply_frame_filter): Change type of "flags".
12384         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12385         of "flags".
12386         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12387         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12388         * extension.h (enum frame_filter_flag): Rename from
12389         frame_filter_flags.
12390         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12391         (apply_ext_lang_frame_filter): Change type of "flags".
12392         * extension.c (apply_ext_lang_frame_filter): Change type of
12393         "flags".
12394         * extension-priv.h (struct extension_language_ops)
12395         <apply_frame_filter>: Change type of "flags".
12396
12397 2018-02-26  Tom Tromey  <tom@tromey.com>
12398
12399         PR python/16497:
12400         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12401         off-by-one in py_end computation.
12402         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12403         PRINT_MORE_FRAMES.
12404         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12405         constant.
12406
12407 2018-02-26  Tom Tromey  <tom@tromey.com>
12408
12409         * dwarf2read.c (struct variant_field): New.
12410         (struct nextfield) <variant>: New field.
12411         (dwarf2_add_field): Handle DW_TAG_variant_part.
12412         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12413         discriminated union.
12414         (read_structure_type): Handle DW_TAG_variant_part.
12415         (handle_struct_member_die): New function, extracted from
12416         process_structure_scope.  Handle DW_TAG_variant.
12417         (process_structure_scope): Handle discriminated unions.  Call
12418         handle_struct_member_die.
12419
12420 2018-02-26  Tom Tromey  <tom@tromey.com>
12421
12422         * rust-lang.h (rust_last_path_segment): Declare.
12423         * rust-lang.c (rust_last_path_segment): Now public.  Change
12424         contract.
12425         (struct disr_info): Remove.
12426         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12427         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12428         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12429         (rust_enum_p, rust_enum_variant): New function.
12430         (rust_underscore_fields): Remove "offset" parameter.
12431         (rust_print_enum): New function.
12432         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12433         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12434         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12435         enums.
12436         (rust_internal_print_type): New function, from rust_print_type.
12437         Remove enum code.
12438         (rust_print_type): Call rust_internal_print_type.
12439         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12440         Update enum handling.
12441         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12442         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12443         (rust_union_quirks): New functions.
12444         (process_full_comp_unit, process_full_type_unit): Call
12445         rust_union_quirks.
12446         (process_structure_scope): Update rust_unions if necessary.
12447
12448 2018-02-26  Tom Tromey  <tom@tromey.com>
12449
12450         * value.h (value_union_variant): Declare.
12451         * valops.c (value_union_variant): New function.
12452         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12453         (struct discriminant_info): New.
12454         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12455         enumerator.
12456         (struct main_type) <flag_discriminated_union>: New field.
12457
12458 2018-02-26  Tom Tromey  <tom@tromey.com>
12459
12460         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12461         unittests/unpack-selftests.c.
12462         * unittests/unpack-selftests.c: New file.
12463         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12464
12465 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12466
12467         * dwarf2read.c (struct partial_die_info) <read>: New method.
12468         (read_partial_die): Remove the declaration.
12469         (load_partial_dies): Update.
12470         (partial_die_info::partial_die_info):
12471         (read_partial_die): Change it to partial_die_info::read.
12472
12473 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12474
12475         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12476         (fixup_partial_die): Remove declaration.
12477         (scan_partial_symbols): Update.
12478         (partial_die_parent_scope): Likewise.
12479         (partial_die_full_name): Likewise.
12480         (fixup_partial_die): Change it to partial_die_info::fixup.
12481
12482 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12483
12484         * dwarf2read.c (read_partial_die): Update the declaration.
12485         (load_partial_dies): Caller update.
12486         (read_partial_die): Remove one argument abbrev_len.
12487
12488 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12489
12490         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12491         assignment operator.
12492         (load_partial_dies): Use ctor and copy ctor.
12493         (read_partial_die): Update.
12494         (dwarf2_cu::find_partial_die): Use ctor.
12495
12496 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12497
12498         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12499         (find_partial_die_in_comp_unit): Change it to
12500         dwarf2_cu::find_partial_die.
12501         (find_partial_die): Update.
12502
12503 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12504
12505         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12506         is NULL.
12507
12508 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12509
12510         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12511
12512 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12513
12514         * arch/amd64.h: Use common/tdesc.h.
12515         * arch/i386.c: Likewise.
12516         * arch/i386.h: Likewise.
12517         * arch/tic6x.c: Likewise.
12518         * arch/tdesc.h: Move file from here...
12519         * common/tdesc.h: ...to here.
12520         * features/aarch64-core.c: Regenerate.
12521         * features/aarch64-fpu.c: Regenerate.
12522         * features/i386/32bit-avx.c: Regenerate.
12523         * features/i386/32bit-avx512.c: Regenerate.
12524         * features/i386/32bit-core.c: Regenerate.
12525         * features/i386/32bit-linux.c: Regenerate.
12526         * features/i386/32bit-mpx.c: Regenerate.
12527         * features/i386/32bit-pkeys.c: Regenerate.
12528         * features/i386/32bit-sse.c: Regenerate.
12529         * features/i386/64bit-avx.c: Regenerate.
12530         * features/i386/64bit-avx512.c: Regenerate.
12531         * features/i386/64bit-core.c: Regenerate.
12532         * features/i386/64bit-linux.c: Regenerate.
12533         * features/i386/64bit-mpx.c: Regenerate.
12534         * features/i386/64bit-pkeys.c: Regenerate.
12535         * features/i386/64bit-segments.c: Regenerate.
12536         * features/i386/64bit-sse.c: Regenerate.
12537         * features/i386/x32-core.c: Regenerate.
12538         * features/tic6x-c6xp.c: Regenerate.
12539         * features/tic6x-core.c: Regenerate.
12540         * features/tic6x-gp.c: Regenerate.
12541         * target-descriptions.c: Use common/tdesc.h.
12542         * target-descriptions.h: Likewise.
12543
12544 2018-02-24  Tom Tromey  <tom@tromey.com>
12545
12546         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12547         (try_thread_db_load_from_dir, thread_db_load_search): Use
12548         std::string.
12549         (info_auto_load_libthread_db_compare): Return bool.  Change
12550         argument types.
12551         (info_auto_load_libthread_db): Use std::vector, std::string.
12552         Remove cleanups.
12553
12554 2018-02-24  Tom Tromey  <tom@tromey.com>
12555
12556         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12557         std::string.
12558         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12559         std::string*.
12560         * gdbarch.c: Rebuild.
12561         * gdbarch.h: Rebuild.
12562         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12563         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12564         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12565         std::string*.
12566
12567 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12568
12569         * gdbtypes.h (sect_offset): Change type to uint64_t.
12570         (sect_offset_str): New function.
12571         * dwarf2read.c (create_addrmap_from_aranges): Use
12572         sect_offset_str.
12573         (error_check_comp_unit_head): Likewise.
12574         (create_debug_type_hash_table): Likewise.
12575         (read_cutu_die_from_dwo): Likewise.
12576         (init_cutu_and_read_dies): Likewise.
12577         (init_cutu_and_read_dies_no_follow): Likewise.
12578         (process_psymtab_comp_unit_reader): Likewise.
12579         (partial_die_parent_scope): Likewise.
12580         (peek_die_abbrev): Likewise.
12581         (process_queue): Likewise.
12582         (dwarf2_physname): Likewise.
12583         (read_namespace_alias): Likewise.
12584         (read_import_statement): Likewise.
12585         (create_dwo_cu_reader): Likewise.
12586         (create_cus_hash_table): Likewise.
12587         (lookup_dwo_cutu): Likewise.
12588         (inherit_abstract_dies): Likewise.
12589         (read_func_scope): Likewise.
12590         (read_call_site_scope): Likewise.
12591         (dwarf2_add_member_fn): Likewise.
12592         (read_common_block): Likewise.
12593         (read_module_type): Likewise.
12594         (read_typedef): Likewise.
12595         (read_subrange_type): Likewise.
12596         (load_partial_dies): Likewise.
12597         (read_partial_die): Likewise.
12598         (find_partial_die): Likewise.
12599         (read_str_index): Likewise.
12600         (dwarf2_string_attr): Likewise.
12601         (build_error_marker_type): Likewise.
12602         (lookup_die_type): Likewise.
12603         (dump_die_shallow): Likewise.
12604         (follow_die_ref): Likewise.
12605         (dwarf2_fetch_die_loc_sect_off): Likewise.
12606         (dwarf2_fetch_constant_bytes): Likewise.
12607         (follow_die_sig): Likewise.
12608         (get_signatured_type): Likewise.
12609         (get_DW_AT_signature_type): Likewise.
12610         (dwarf2_find_containing_comp_unit): Likewise.
12611         (set_die_type): Likewise.
12612
12613 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12614
12615         * arch/aarch64.c: Include "common-defs.h".
12616         * arch/amd64.c: Likewise.
12617         * arch/i386.c: Likewise.
12618
12619 2018-02-21  Tom Tromey  <tom@tromey.com>
12620
12621         * value.h: (extract_field_op): Update.
12622         * eval.c (extract_field_op): Return a const char *.
12623         * expression.h (parse_expression_for_completion): Update.
12624         * completer.c (complete_expression): Update.
12625         (add_struct_fields): Make fieldname const.
12626         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12627         (mark_completion_tag, parse_exp_in_context_1): Update.
12628         (parse_expression_for_completion): Change "name" to
12629         unique_xmalloc_ptr*.
12630
12631 2018-02-21  Tom Tromey  <tom@tromey.com>
12632
12633         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12634
12635 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12636
12637         * avr-tdep.c (avr_read_pc): Change parameter type to
12638         readable_regcache.
12639         * gdbarch.sh (read_pc): Likewise.
12640         * gdbarch.c: Re-generated.
12641         * gdbarch.h: Re-generated.
12642         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12643         readable_regcache.
12644         * ia64-tdep.c (ia64_read_pc): Likewise.
12645         * mips-tdep.c (mips_read_pc): Likewise.
12646         * spu-tdep.c (spu_read_pc): Likewise.
12647
12648 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12649
12650         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12651         * regcache-dump.c: New file.
12652         * regcache.c: Move register_dump to regcache-dump.c.
12653         (maintenance_print_registers): Likewise.
12654         (maintenance_print_raw_registers): Likewise.
12655         (maintenance_print_cooked_registers): Likewise.
12656         (maintenance_print_register_groups): Likewise.
12657         (maintenance_print_remote_registers): Likewise.
12658         (_initialize_regcache): Likewise.
12659         * regcache.h (register_dump): Moved from regcache.c.
12660
12661 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12662
12663         * regcache.c (regcache::regcache): Update.
12664         (regcache::invalidate): Move it to detached_regcache::invalidate.
12665         (get_thread_arch_aspace_regcache): Update.
12666         (regcache::raw_update): Update.
12667         (regcache::cooked_read): Remove some code.
12668         (regcache::cooked_read_value): Likewise.
12669         (regcache::raw_write): Remove assert on m_readonly_p.
12670         (regcache::raw_supply_integer): Move it to
12671         detached_regcache::raw_supply_integer.
12672         (regcache::raw_supply_zeroed): Likewise.
12673         * regcache.h (detached_regcache) <raw_supply_integer>: New
12674         declaration.
12675         <raw_supply_zeroed, invalidate>: Likewise.
12676         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12677         <invalidate>: Likewise.
12678         <m_readonly_p>: Removed.
12679
12680 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12681
12682         * infcmd.c (get_return_value): Let stop_regs point to
12683         get_current_regcache.
12684         * regcache.c (regcache::regcache): Remove.
12685         (register_dump_reg_buffer): New class.
12686         (regcache_print): Adjust.
12687         * regcache.h (regcache): Remove constructors.
12688
12689 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12690
12691         * regcache.c (class register_dump): New class.
12692         (register_dump_regcache, register_dump_none): New class.
12693         (register_dump_remote, register_dump_groups): New class.
12694         (regcache_print): Update.
12695         * regcache.h (regcache_dump_what): Move it to regcache.c.
12696         (regcache) <dump>: Remove.
12697
12698 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12699
12700         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12701          reg_buffer_rw *.
12702         (jit_unwind_reg_set_impl): Call raw_supply.
12703         (jit_frame_sniffer): Use reg_buffer_rw.
12704         * record-full.c (record_full_core_regbuf): Change its type.
12705         (record_full_core_open_1): Use reg_buffer_rw.
12706         (record_full_close): Likewise.
12707         (record_full_core_fetch_registers): Use regcache->raw_supply.
12708         (record_full_core_store_registers): Likewise.
12709         * regcache.c (regcache::get_register_status): Move it to
12710         reg_buffer.
12711         (regcache_raw_set_cached_value): Remove.
12712         (regcache::raw_set_cached_value): Remove.
12713         (regcache::raw_write): Call raw_supply.
12714         (regcache::raw_supply): Move it to reg_buffer_rw.
12715         * regcache.h (regcache_raw_set_cached_value): Remove.
12716         (reg_buffer_rw): New class.
12717
12718 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12719
12720         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12721         readonly_detached_regcache.
12722         (dummy_frame_prev_register): Use regcache->cooked_read.
12723         * frame.c (frame_save_as_regcache): Change return type.
12724         (frame_pop): Update.
12725         * frame.h (frame_save_as_regcache): Update declaration.
12726         * inferior.h (get_infcall_suspend_state_regcache): Update
12727         declaration.
12728         * infrun.c (infcall_suspend_state) <registers>: use
12729         readonly_detached_regcache.
12730         (save_infcall_suspend_state): Don't use regcache_dup.
12731         (get_infcall_suspend_state_regcache): Change return type.
12732         * linux-fork.c (struct fork_info) <savedregs>: Change to
12733         readonly_detached_regcache.
12734         <pc>: New field.
12735         (fork_save_infrun_state): Don't use regcache_dup.
12736         (info_checkpoints_command): Adjust.
12737         * mi/mi-main.c (register_changed_p): Update declaration.
12738         (mi_cmd_data_list_changed_registers): Use
12739         readonly_detached_regcache.
12740         (register_changed_p): Change parameter type to
12741         readonly_detached_regcache.
12742         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12743         readonly_detached_regcache.
12744         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12745         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12746         New.
12747         (regcache::save): Move it to reg_buffer.
12748         (regcache::restore): Change parameter type.
12749         (regcache_dup): Remove.
12750         * regcache.h (reg_buffer) <save>: New method.
12751         (readonly_detached_regcache): New class.
12752         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12753         readonly_detached_regcache.
12754         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12755
12756 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12757
12758         * frame.c (frame_save_as_regcache): Use regcache method save.
12759         (frame_pop): Use regcache method restore.
12760         * infrun.c (restore_infcall_suspend_state): Likewise.
12761         * linux-fork.c (fork_load_infrun_state): Likewise.
12762         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12763         save.
12764         * regcache.c (regcache_save): Remove.
12765         (regcache::restore): More asserts.
12766         (regcache_cpy): Remove.
12767         * regcache.h (regcache_save): Remove the declaration.
12768         (regcache::restore): Move from private to public.
12769         Remove the friend declaration of regcache_cpy.
12770         (regcache_cpy): Remove declaration.
12771
12772 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12773
12774         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12775         parameter type to 'readable_regcache *'.
12776         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12777         * arm-tdep.c (arm_neon_quad_read): Likewise.
12778         (arm_pseudo_read): Likewise.
12779         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12780         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12781         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12782         * gdbarch.c: Re-generated.
12783         * gdbarch.h: Re-generated.
12784         * gdbarch.sh (pseudo_register_read): Change parameter type to
12785         'readable_regcache *'.
12786         (pseudo_register_read_value): Likewise.
12787         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12788         (h8300_pseudo_register_read): Likewise.
12789         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12790         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12791         (i386_pseudo_register_read_into_value): Likewise.
12792         (i386_pseudo_register_read_value): Likewise.
12793         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12794         declaration.
12795         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12796         * m32c-tdep.c (m32c_raw_read): Likewise.
12797         (m32c_read_flg): Likewise.
12798         (m32c_banked_register): Likewise.
12799         (m32c_banked_read): Likewise.
12800         (m32c_sb_read): Likewise.
12801         (m32c_part_read): Likewise.
12802         (m32c_cat_read): Likewise.
12803         (m32c_r3r2r1r0_read): Likewise.
12804         (m32c_pseudo_register_read): Likewise.
12805         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12806         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12807         (mep_pseudo_cr64_read): Likewise.
12808         (mep_pseudo_register_read): Likewise.
12809         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12810         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12811         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12812         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12813         (regcache::cooked_read): Likewise.
12814         (regcache::cooked_read_value): Likewise.
12815         (regcache_cooked_read_signed):
12816         (regcache::cooked_read): Likewise.
12817         * regcache.h (readable_regcache): New class.
12818         (regcache): Inherit readable_regcache.  Move some methods to
12819         readable_regcache.
12820         * rl78-tdep.c (rl78_pseudo_register_read): Change
12821         parameter type to 'readable_regcache *'.
12822         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12823         (e500_pseudo_register_read): Change parameter type to
12824         'readable_regcache *'.
12825         (dfp_pseudo_register_read): Likewise.
12826         (vsx_pseudo_register_read): Likewise.
12827         (efpr_pseudo_register_read): Likewise.
12828         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12829         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12830         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12831         (sh64_pseudo_register_read): Likewise.
12832         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12833         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12834         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12835         (spu_pseudo_register_read): Likewise.
12836         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12837         (xtensa_pseudo_register_read): Likewise.
12838
12839 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12840
12841         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12842         (regcache::arch): Move it to reg_buffer::arch.
12843         (regcache::register_buffer): Likewise.
12844         (regcache::assert_regnum): Likewise.
12845         (regcache::num_raw_registers): Likewise.
12846         * regcache.h (reg_buffer): New class.
12847         (regcache): Inherit reg_buffer.
12848
12849 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12850
12851         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12852         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12853
12854 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12855
12856         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12857
12858 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12859
12860         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12861         (SFILES): Remove common/*.c files.
12862         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12863         * common/common.host: Add common reference.
12864         * configure.ac: Likewise.
12865         * configure: Regenerate.
12866
12867 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12868
12869         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12870         (block_initialize_namespace): Use new.
12871         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12872         (dwarf2_free_objfile): Use delete.
12873         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12874         (copy_type_recursive): Use new.
12875         * gdb_obstack.h (allocate_on_obstack): New.
12876
12877 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12878
12879         PR gdb/22849
12880         * inferior.c (exit_inferior_1): Reset inf->control.
12881
12882 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12883
12884         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12885         declaration.
12886
12887 2018-02-14  Pedro Alves  <palves@redhat.com>
12888
12889         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12890         frame_cleanup_after_sniffer on exception.
12891
12892 2018-02-14  Tom Tromey  <tom@tromey.com>
12893
12894         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12895         const.
12896         (solib_bfd_open): Make pathname const.
12897         * solib.c (solib_bfd_open): Make pathname const.
12898         * solib-spu.c (spu_bfd_fopen): Make name const.
12899         (spu_bfd_open): Make pathname const.
12900         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12901         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12902
12903 2018-02-14  Tom Tromey  <tom@tromey.com>
12904
12905         * symfile.c (symfile_bfd_open): Update.
12906         * source.h (openp, source_full_path_of, find_and_open_source):
12907         Change argument type to unique_xmalloc_ptr.
12908         * source.c (openp): Take a unique_xmalloc_ptr.
12909         (source_full_path_of, find_and_open_source): Likewise.
12910         (open_source_file, symtab_to_fullname): Update.
12911         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12912         unique_xmalloc_ptr.
12913         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12914         (exec_file_find): Update.
12915         * psymtab.c (psymtab_to_fullname): Update.
12916         * nto-tdep.h (nto_find_and_open_solib): Update.
12917         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12918         unique_xmalloc_ptr.
12919         * exec.c (exec_file_attach): Update.
12920         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12921         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12922
12923 2018-02-14  Tom Tromey  <tom@tromey.com>
12924
12925         * solib.c: Include source.h.
12926         * nto-tdep.c: Include source.h.
12927         * mi/mi-cmd-env.c: Include source.h.
12928         * infcmd.c: Include source.h.
12929         * exec.c: Include source.h.
12930         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12931         (add_path, directory_switch, source_path, init_source_path): Move
12932         declarations...
12933         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12934         (add_path, directory_switch, source_path, init_source_path):
12935         ...here.
12936
12937 2018-02-14  Tom Tromey  <tom@tromey.com>
12938
12939         * solist.h (exec_file_find, solib_find): Return
12940         unique_xmalloc_ptr.
12941         (solib_bfd_fopen): Take a const char *.
12942         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12943         (exec_file_find, solib_find): Likewise.
12944         (solib_bfd_fopen): Do not take ownership of "pathname".
12945         (solib_bfd_open): Use unique_xmalloc_ptr.
12946         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12947         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12948         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12949         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12950
12951 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12952
12953         * ada-lang.c (name_match_type_from_name): Remove reference to
12954         ada_name_for_lookup in function's documentation.
12955         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12956
12957 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12958
12959         * defs.h (enum openp_flags): New enum.
12960         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12961         Move to enum openp_flags.
12962         (openp_flags): New enum flags.
12963         (openp): Change parameter type to openp_flags.
12964         * source.c (openp): Change parameter type to openp_flags.
12965         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12966         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12967
12968 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12969
12970         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12971         per-command.
12972
12973 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12974
12975         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12976         into...
12977         (class dwarf2_queue_guard): ...the destructor of this new class.
12978         (dw2_do_instantiate_symtab): Create instance of the new class
12979         dwarf2_queue_guard, remove cleanup.
12980
12981 2018-02-09  Tom Tromey  <tom@tromey.com>
12982
12983         * source.c (find_source_lines): Don't reference past the end of
12984         the vector.
12985
12986 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12987
12988         * remote.c (remote_btrace_maybe_reopen): Change error message.
12989         * btrace.c (btrace_enable): Likewise.
12990         (parse_xml_btrace): Likewise.
12991         (parse_xml_btrace_conf): Likewise.
12992
12993 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12994
12995         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12996         (linux_enable_pt, linux_enable_bts): Call
12997         diagnose_perf_event_open_fail.
12998
12999 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13000
13001         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13002         Remove parameter and change return type.  Update callers.  Move it.
13003         (linux_enable_bts, linux_enable_pt): Improve error message.
13004         (linux_enable_pt): Remove zero buffer size check.
13005         (linux_enable_btrace): Improve error messages.  Remove NULL return
13006         check.
13007
13008 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13009
13010         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13011         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13012         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13013         (linux_supports_pt, linux_supports_btrace): Remove.
13014         (linux_enable_bts): Call cpu_supports_bts.
13015         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13016         * remote.c (remote_supports_btrace): Remove.
13017         (init_remote_ops): Remove remote_supports_btrace.
13018         * target-delegates.c: Regenerated.
13019         * target.c (target_supports_btrace): Remove.
13020         * target.h (target_ops) <to_supports_btrace>: Remove
13021         (target_supports_btrace): Remove.
13022         * x86-linux-nat.c (x86_linux_create_target): Remove
13023         linux_supports_btrace.
13024
13025 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13026
13027         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13028         btrace failed.
13029         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13030         exception and use message in own exception.
13031
13032 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13033
13034         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13035         (perf_event_pt_event_type): Use gdb_file_up.
13036         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13037         scoped_fd, and scoped_mmap.
13038
13039 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13040
13041         * common/scoped_mmap.h: New.
13042         * unittests/scoped_mmap-selftest.c: New.
13043         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13044         unittests/scoped_mmap-selftest.c.
13045
13046 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13047
13048         * common/scoped_fd.h: New.
13049         * unittests/scoped_fd-selftest.c: New.
13050         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13051         unittests/scoped_fd-selftest.c.
13052
13053 2018-02-09  Tom Tromey  <tom@tromey.com>
13054
13055         * auto-load.c (auto_load_section_scripts): Use
13056         gdb::unique_xmalloc_ptr.
13057
13058 2018-02-09  Tom Tromey  <tom@tromey.com>
13059
13060         * auto-load.c (execute_script_contents): Use std::string.
13061
13062 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13063
13064         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13065         Python function, rather than a new command.
13066
13067 2018-02-08  Tom Tromey  <tom@tromey.com>
13068
13069         * solib.c (solib_find_1): Use std::string.
13070         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13071
13072 2018-02-08  Tom Tromey  <tom@tromey.com>
13073
13074         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13075
13076 2018-02-08  Tom Tromey  <tom@tromey.com>
13077
13078         * source.c (find_source_lines): Use gdb::def_vector.
13079
13080 2018-02-08  Tom Tromey  <tom@tromey.com>
13081
13082         * macrocmd.c (struct temporary_macro_definition): New.
13083         (macro_define_command): Use temporary_macro_definition.  Remove
13084         cleanups.
13085         (free_macro_definition_ptr): Remove.
13086
13087 2018-02-08  Tom Tromey  <tom@tromey.com>
13088
13089         * macroexp.c (maybe_expand): Use std::string.
13090
13091 2018-02-08  Tom Tromey  <tom@tromey.com>
13092
13093         * macroexp.c (struct macro_buffer): Add initializers for some
13094         members.
13095         (init_buffer, init_shared_buffer, free_buffer)
13096         (free_buffer_return_text): Remove.
13097         (macro_buffer): New constructors.
13098         (~macro_buffer): New destructor.
13099         (macro_buffer::set_shared): New method.
13100         (macro_buffer::resize_buffer, macro_buffer::appendc)
13101         (macro_buffer::appendmem): Now methods, not free functions.
13102         (set_token, append_tokens_without_splicing, stringify)
13103         (macro_stringify): Update.
13104         (gather_arguments): Change return type.  Remove argc_p argument,
13105         add args_ptr argument.  Use std::vector.
13106         (substitute_args): Remove argc argument.  Accept std::vector.
13107         (expand): Update.  Use std::vector.
13108         (scan, macro_expand, macro_expand_next): Update.
13109
13110 2018-02-08  Tom Tromey  <tom@tromey.com>
13111
13112         * symtab.c (default_collect_symbol_completion_matches_break_on):
13113         Use unique_xmalloc_ptr.
13114         * macroscope.h: (sal_macro_scope, user_macro_scope)
13115         (default_macro_scope): Return unique_xmalloc_ptr.
13116         * macroscope.c (sal_macro_scope, user_macro_scope)
13117         (default_macro_scope): Return unique_xmalloc_ptr.
13118         * macroexp.h (macro_expand, macro_expand_once): Return
13119         unique_xmalloc_ptr.
13120         * macroexp.c (macro_expand, macro_expand_once): Return
13121         unique_xmalloc_ptr.
13122         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13123         (info_macro_command, info_macros_command): Use
13124         unique_xmalloc_ptr.
13125         * compile/compile-c-support.c (write_macro_definitions): Use
13126         unique_xmalloc_ptr.
13127         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13128
13129 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13130
13131         * value.c (value_static_field): Assign field type instead of
13132         containing type when returning an optimized out value.
13133
13134 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13135
13136         * ft32-tdep.c (ft32_read_pc): Remove.
13137         (ft32_write_pc): Remove.
13138         (ft32_gdbarch_init): Update.
13139         * m32r-tdep.c (m32r_read_pc): Remove.
13140         (m32r_gdbarch_init): Update.
13141         * mep-tdep.c (mep_read_pc): Remove.
13142         (mep_gdbarch_init): Update.
13143         * microblaze-tdep.c (microblaze_write_pc): Remove.
13144         (microblaze_gdbarch_init): Update.
13145         * mn10300-tdep.c (mn10300_read_pc): Remove.
13146         (mn10300_write_pc): Remove.
13147         (mn10300_gdbarch_init): Update.
13148         * moxie-tdep.c (moxie_read_pc): Remove.
13149         (moxie_write_pc): Remove.
13150         (moxie_gdbarch_init): Update.
13151
13152 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13153
13154         * expprint.c (print_subexp_standard): Handle
13155         OP_F77_UNDETERMINED_ARGLIST.
13156         (dump_subexp_body_standard): Likewise.
13157
13158 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13159
13160         * target-descriptions.c (tdesc_element_visitor) Add empty
13161         implementations.
13162         (tdesc_type): Move make_gdb_type from here.
13163         (tdesc_type_builtin): Likewise.
13164         (tdesc_type_vector): Likewise.
13165         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13166         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13167         (make_gdb_type_union): Likewise.
13168         (make_gdb_type_flags): Likewise.
13169         (make_gdb_type_enum): Likewise.
13170         (make_gdb_type): New function.
13171         (tdesc_register_type): Use static make_gdb_type.
13172
13173 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13174
13175         * infcmd.c (default_print_one_register_info): Align natural-format
13176         column values consistently one under another.
13177         (pad_to_column): New function.
13178
13179 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13180
13181         * dwarf2read.c (dwarf2_physname): Move commment.
13182
13183 2018-02-01  Leszek Swirski  <leszeks@google.com>
13184
13185         * varobj.c (varobj_formatted_print_options): Allow recursive
13186         pretty printing if pretty printing is enabled.
13187
13188 2018-02-01  Leszek Swirski  <leszeks@google.com>
13189
13190         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13191         names after a structop as a filename.
13192
13193 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13194
13195         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13196         (arm_record_coproc_data_proc): Likewise.
13197
13198 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13199
13200         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13201
13202 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13203
13204         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13205         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13206
13207 2018-01-31  Pedro Alves  <palves@redhat.com>
13208
13209         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13210         * inflow.c (child_terminal_save_inferior): Wrap reference to
13211         tcgetpgrp in HAVE_TERMIOS_H.
13212         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13213         _WIN32.
13214         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13215         always iterate over all inferiors.
13216         (gdbsim_cntrl_c): Adjust.
13217         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13218
13219 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13220
13221         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13222         index type is objfile-owned if the element type is as well.
13223
13224 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13225
13226         GDB 8.1 released.
13227
13228 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13229
13230         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13231         "features/s390x-linux64.c".
13232         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13233         s390_linux32 and s390x_linux64.
13234         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13235         default tdesc.
13236         * s390-tdep.c: Include "features/s390-linux32.c" and
13237         "features/s390x-linux64.c".
13238         (s390_tdesc_valid): Add check for tdesc_has_registers.
13239         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13240         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13241         tdesc_s390x_linux64.
13242         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13243         tdesc_s390x_linux64 to...
13244         * s390-tdep.h: ...here.
13245
13246 2018-01-30  Pedro Alves  <palves@redhat.com>
13247
13248         PR gdb/13211
13249         * config.in, configure: Regenerate.
13250         * configure.ac: Check for getpgid.
13251         * go32-nat.c (go32_pass_ctrlc): New.
13252         (go32_target): Install it.
13253         * inf-child.c (inf_child_target): Install
13254         child_terminal_save_inferior, child_pass_ctrlc and
13255         child_interrupt.
13256         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13257         (inf_ptrace_target): No longer install it.
13258         * infcmd.c (interrupt_target_1): Adjust.
13259         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13260         (child_interrupt): Declare.
13261         (inferior::terminal_state): New.
13262         * inflow.c (struct terminal_info): Update comments.
13263         (inferior_process_group): Delete.
13264         (terminal_is_ours): Delete.
13265         (gdb_tty_state): New.
13266         (child_terminal_init): Adjust.
13267         (is_gdb_terminal, sharing_input_terminal_1)
13268         (sharing_input_terminal): New functions.
13269         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13270         Set the process's actual process group in the foreground if
13271         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13272         mark terminal as the inferior's if not sharing GDB's terminal.
13273         Don't check attach_flag.
13274         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13275         pass down a target_terminal_state.
13276         (child_terminal_save_inferior): New, factored out from ...
13277         (child_terminal_ours_1): ... this.  Handle
13278         target_terminal_state::is_ours_for_output.
13279         (child_interrupt, child_pass_ctrlc): New.
13280         (inflow_inferior_exit): Clear the inferior's terminal_state.
13281         (copy_terminal_info): Copy the inferior's terminal state.
13282         (_initialize_inflow): Remove reference to terminal_is_ours.
13283         * inflow.h (inferior_process_group): Delete.
13284         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13285         * procfs.c (procfs_target): Don't install procfs_interrupt.
13286         (procfs_interrupt): Delete.
13287         * remote.c (remote_serial_quit_handler): Adjust.
13288         (remote_interrupt): Remove ptid parameter.  Adjust.
13289         * target-delegates.c: Regenerate.
13290         * target.c: Include "terminal.h".
13291         (target_terminal::terminal_state): Rename to ...
13292         (target_terminal::m_terminal_state): ... this.
13293         (target_terminal::init): Adjust.
13294         (target_terminal::inferior): Adjust to per-inferior
13295         terminal_state.
13296         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13297         (target_terminal::ours, target_terminal::ours_for_output): Use
13298         target_terminal_is_ours_kind.
13299         (target_interrupt): Remove ptid parameter.  Adjust.
13300         (default_target_pass_ctrlc): Adjust.
13301         * target.h (target_ops::to_terminal_save_inferior): New field.
13302         (target_ops::to_interrupt): Remove ptid_t parameter.
13303         (target_interrupt): Remove ptid_t parameter.  Update comment.
13304         (target_pass_ctrlc): Update comment.
13305         * target/target.h (target_terminal_state): New scoped enum,
13306         factored out of ...
13307         (target_terminal::terminal_state): ... here.
13308         (target_terminal::inferior): Update comments.
13309         (target_terminal::restore_inferior): New.
13310         (target_terminal::is_inferior, target_terminal::is_ours)
13311         (target_terminal::is_ours_for_output): Adjust.
13312         (target_terminal::scoped_restore_terminal_state): Adjust to
13313         rename, and call restore_inferior() instead of inferior().
13314         (target_terminal::scoped_restore_terminal_state::m_state): Change
13315         type.
13316         (target_terminal::terminal_state): Rename to ...
13317         (target_terminal::m_terminal_state): ... this and change type.
13318
13319 2018-01-30  Pedro Alves  <palves@redhat.com>
13320
13321         * linux-nat.c (wait_for_signal): New function.
13322         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13323         directly.
13324         (async_terminal_is_ours)
13325         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13326         (linux_nat_add_target): Don't override
13327         to_terminal_inferior/to_terminal_ours.
13328
13329 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13330
13331         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13332
13333 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13334
13335         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13336         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13337         dwarf2_per_objfile_free here.
13338         (dwarf2_per_objfile_free): Remove.
13339         (_initialize_dwarf2_read): Don't register
13340         dwarf2_per_objfile_free as a registry cleanup.
13341
13342 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13343
13344         Avoid compilation errors in MinGW native builds
13345
13346         The error is triggered by including python-internal.h, and the
13347         error message is:
13348
13349              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13350                       from build-gnulib/import/math.h:27,
13351                       from d:/usr/Python26/include/pyport.h:235,
13352                       from d:/usr/Python26/include/Python.h:58,
13353                       from python/python-internal.h:94,
13354                       from python/py-arch.c:24:
13355              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13356         using ::hypot;
13357                 ^~~~~
13358
13359         This happens because Python headers define 'hypot' to expand t
13360         '_hypot' in the Windows builds.
13361         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13362         'hypoth'.  This avoids a compilation error.
13363
13364 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13365
13366         * MAINTAINERS (Write After Approval): Fix ordering.
13367
13368 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13369
13370         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13371
13372 2018-01-26  Alan Modra  <amodra@gmail.com>
13373
13374         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13375         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13376         Remove nop.  Make const.  Comment.
13377         (powerpc32_plt_stub_so_2): New.
13378         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13379         Correct count.  Update uses.
13380         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13381         Move common code reading PLT entry word.  Correct
13382         powerpc32_plt_stub PLT address calculation.
13383         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13384         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13385         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13386         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13387         (ppc64_standard_linkage8): Likewise.
13388         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13389         Correct insns description.
13390         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13391
13392 2018-01-24  Pedro Alves  <palves@redhat.com>
13393
13394         GCC PR libstdc++/83906
13395         * gdbtypes.c (operator==(const dynamic_prop &,
13396         const dynamic_prop &)): New.
13397         (operator==(const range_bounds &, const range_bounds &)): New.
13398         (check_types_equal): Use them instead of memcmp.
13399         * gdbtypes.h (operator==(const dynamic_prop &,
13400         const dynamic_prop &)): Declare.
13401         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13402         (operator==(const range_bounds &, const range_bounds &)): Declare.
13403         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13404
13405 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13406
13407         * s390-linux-tdep.c (s390_record_address_mask)
13408         (s390_record_calc_disp_common, s390_record_calc_disp)
13409         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13410         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13411         (s390_process_record): Move to s390-tdep.c.
13412         (s390_linux_init_abi_any): Adjust.
13413         * s390-tdep.c (s390_record_address_mask)
13414         (s390_record_calc_disp_common, s390_record_calc_disp)
13415         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13416         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13417         (s390_process_record): Moved from s390-linux-tdep.c
13418         (s390_gdbarch_init): Adjust.
13419
13420 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13421
13422         * s390-linux-nat.c (s390-tdep.h): New include.
13423         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13424         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13425         (ALLDEPFILES): Add s390-tdep.c.
13426         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13427         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13428         * s390-tdep.h: ...this.  New file.
13429         * s390-linux-tdep.c (s390-tdep.h): New include.
13430         (_initialize_s390_tdep): Rename to...
13431         (_initialize_s390_linux_tdep): ...this and adjust.
13432         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13433         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13434         s390-tdep.h.
13435         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13436         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13437         (s390_is_partial_instruction, s390_software_single_step)
13438         (is_non_branch_ril, s390_displaced_step_copy_insn)
13439         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13440         (s390_prologue_data, s390_addr, s390_store, s390_load)
13441         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13442         (s390_register_call_saved, s390_guess_tracepoint_registers)
13443         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13444         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13445         (s390_pseudo_register_name, s390_pseudo_register_type)
13446         (s390_pseudo_register_read, s390_pseudo_register_write)
13447         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13448         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13449         (s390_addr_bits_remove, s390_address_class_type_flags)
13450         (s390_address_class_type_flags_to_name)
13451         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13452         (s390_function_arg_float, s390_function_arg_vector)
13453         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13454         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13455         (s390_frame_align, s390_register_return_value, s390_return_value)
13456         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13457         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13458         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13459         (s390_trad_frame_prev_register, s390_unwind_cache)
13460         (s390_prologue_frame_unwind_cache)
13461         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13462         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13463         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13464         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13465         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13466         (s390_frame_base_address, s390_local_base_address)
13467         (s390_frame_base, s390_gcc_target_options)
13468         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13469         (s390_validate_reg_range, s390_tdesc_valid)
13470         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13471         * s390-tdep.c: ...this.  New file.
13472
13473 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13474
13475         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13476         (s390_process_record, s390_gdbarch_tdep_alloc)
13477         (s390_linux_init_abi_any): Use/set new hook.
13478
13479 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13480
13481         * s390-linux-tdep.c (osabi.h): New include.
13482         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13483         (s390_linux_init_abi_any): New functions.
13484         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13485
13486 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13487
13488         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13489         tdesc_has_registers check
13490
13491 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13492
13493         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13494         (s390_validate_reg_range): New macro.
13495         (s390_gdbarch_init): Adjust.
13496
13497 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13498
13499         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13500         (s390_gdbarch_tdep_alloc): Adjust.
13501         (s390_gdbarch_init): Adjust.
13502
13503 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13504
13505         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13506         <have_tdb>: Change type to bool.
13507         (s390_gdbarch_tdep_alloc): Adjust.
13508         (s390_gdbarch_init): Adjust.
13509
13510 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13511
13512         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13513         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13514         (s390_gdbarch_tdep_alloc): New function.
13515         (s390_gdbarch_init): Allocate tdep at start and use its fields
13516         instead of separate variables.
13517
13518 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13519
13520         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13521         when looking for cached gdbarch and add comment for remaining.
13522
13523 2018-01-22  Pedro Alves  <palves@redhat.com>
13524             Sergio Durigan Junior  <sergiodj@redhat.com>
13525
13526         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13527         case.
13528
13529 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13530
13531         * MAINTAINERS: Update my company e-mail address.
13532
13533 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13534
13535         * regcache.c (cooked_write_test): New function.
13536         (_initialize_regcache): Register the test.
13537
13538 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13539
13540         * ia64-tdep.c (ia64_pseudo_register_read): Call
13541         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13542         * m32c-tdep.c (m32c_cat_read): Likewise.
13543         (m32c_r3r2r1r0_read): Likewise.
13544         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13545         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13546
13547 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13548
13549         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13550         method raw_read instead of regcache_raw_read.
13551         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13552         * arm-tdep.c (arm_neon_quad_read): Likewise.
13553         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13554         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13555         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13556         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13557         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13558         (i386_pseudo_register_read_into_value): Likewise.
13559         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13560         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13561         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13562         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13563         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13564         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13565         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13566         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13567         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13568
13569 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13570
13571         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13572         * configure.tgt: Remove target mt.
13573         * mt-tdep.c: Remove.
13574         * regcache.c (cooked_read_test): Remove the check for mt.
13575
13576 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13577
13578         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13579         instead of gdbarch_pseudo_register_read_value.
13580
13581 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13582
13583         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13584         language is Ada.
13585
13586 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13587
13588         * linespec.c (create_sals_line_offset): Remove code that preserved
13589         the symtab_and_line's line number.
13590
13591 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13592
13593         * varobj.c (varobj_create): Don't set valid_block when creating a
13594         floating varobj.
13595
13596 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13597
13598         * varobj.c (varobj_create): Remove out of date comment.
13599
13600 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13601
13602         PR mi/20395
13603         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13604         updating innermost block.
13605         * parse.c (innermost_block_tracker::update): Take extra type
13606         parameter, and check types match before updating innermost block.
13607         (write_dollar_variable): Update innermost block for registers.
13608         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13609         (innermost_block_tracker::innermost_block_tracker): Initialise
13610         m_types member.
13611         (innermost_block_tracker::reset): Take type parameter.
13612         (innermost_block_tracker::update): Take type parameter, and pass
13613         type through as needed.
13614         (innermost_block_tracker::m_types): New member.
13615         * varobj.c (varobj_create): Pass type when reseting innermost
13616         block.
13617
13618 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13619
13620         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13621         * ada-lang.c (resolve_subexp): Likewise.
13622         * breakpoint.c (set_breakpoint_condition) Likewise.
13623         (watch_command_1) Likewise.
13624         * c-exp.y (variable): Likewise.
13625         * d-exp.y (PrimaryExpression): Likewise.
13626         * f-exp.y (variable): Likewise.
13627         * go-exp.y (variable): Likewise.
13628         * m2-exp.y (variable): Likewise.
13629         * objfiles.c (objfile::~objfile): Likewise.
13630         * p-exp.y (variable): Likewise.
13631         * parse.c (innermost_block): Change type.
13632         * parser-defs.h (class innermost_block_tracker): New.
13633         (innermost_block): Change to innermost_block_tracker.
13634         * printcmd.c (display_command): Switch to innermost_block API.
13635         (do_one_display): Likewise.
13636         * rust-exp.y (do_one_display): Likewise.
13637         * symfile.c (clear_symtab_users): Likewise.
13638         * varobj.c (varobj_create): Switch to innermost_block API, replace
13639         use of innermost_block with block stored on varobj object.
13640
13641 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13642
13643         * expression.h (innermost_block): Remove declaration.
13644         * varobj.c: Add 'parser-defs.h' include.
13645
13646 2018-01-19  Tom Tromey  <tom@tromey.com>
13647
13648         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13649         symbols in the static and global blocks.
13650
13651 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13652
13653         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13654         gdb_ptrace.h, and move including gdb_wait.h ...
13655         * nat/linux-ptrace.h: ... to here.
13656
13657 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13658
13659         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13660         inf_ptrace_detach_success.
13661         (inf_ptrace_detach_success): Add inferior parameter, use it
13662         instead of inferior_ptid, pass it to detach_inferior.
13663         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13664         parameter.
13665         * inferior.c (detach_inferior): Add overload that takes an
13666         inferior object.
13667         * inferior.h (detach_inferior): Likewise.
13668         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13669         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13670         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13671
13672 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13673
13674         * target.h (struct target_ops) <to_detach>: Add inferior
13675         parameter.
13676         (target_detach): Likewise.
13677         * target.c (dispose_inferior): Pass inferior down.
13678         (target_detach): Pass inferior down.  Assert that it is equal to
13679         the current inferior.
13680         * aix-thread.c (aix_thread_detach): Pass inferior down.
13681         * corefile.c (core_file_command): Pass current_inferior() down.
13682         * corelow.c (core_detach): Add inferior parameter.
13683         * darwin-nat.c (darwin_detach): Likewise.
13684         * gnu-nat.c (gnu_detach): Likewise.
13685         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13686         * infcmd.c (detach_command): Pass current_inferior() down to
13687         target_detach.
13688         * infrun.c (follow_fork_inferior): Pass parent_inf to
13689         target_detach.
13690         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13691         target_detach.
13692         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13693         * linux-thread-db.c (thread_db_detach): Likewise.
13694         * nto-procfs.c (procfs_detach): Likewise.
13695         * procfs.c (procfs_detach): Likewise.
13696         * record.c (record_detach): Likewise.
13697         * record.h (struct inferior): Forward-declare.
13698         (record_detach): Add inferior parameter.
13699         * remote-sim.c (gdbsim_detach): Likewise.
13700         * remote.c (remote_detach_1): Likewise.
13701         (remote_detach): Likewise.
13702         (extended_remote_detach): Likewise.
13703         * sol-thread.c (sol_thread_detach): Likewise.
13704         * target-debug.h (target_debug_print_inferior_p): New macro.
13705         * target-delegates.c: Re-generate.
13706         * top.c (kill_or_detach): Pass inferior down to target_detach.
13707         * windows-nat.c (windows_detach): Add inferior parameter.
13708
13709 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13710
13711         * target.h (struct target_ops) <to_detach>: Remove args
13712         parameter.
13713         (target_detach): Likewise.
13714         * target.c (dispose_inferior): Adjust.
13715         (target_detach): Remove args parameter, adjust.
13716         * aix-thread.c (aix_thread_detach): Adjust.
13717         * corefile.c (core_file_command): Adjust.
13718         * corelow.c (core_detach): Adjust.
13719         * darwin-nat.c (darwin_detach): Adjust.
13720         * gnu-nat.c (gnu_detach): Adjust.
13721         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13722         * infcmd.c (detach_command): Adjust
13723         * infrun.c (follow_fork_inferior): Adjust.
13724         (handle_vfork_child_exec_or_exit): Adjust.
13725         * linux-fork.c (linux_fork_detach): Remove args parameter.
13726         * linux-fork.h (linux_fork_detach): Likewise.
13727         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13728         * linux-thread-db.c (thread_db_detach): Likewise.
13729         * nto-procfs.c (procfs_detach): Likewise.
13730         * procfs.c (procfs_detach): Likewise.
13731         (do_detach): Remove signo parameter.
13732         * record.c (record_detach): Remove args parameter.
13733         * record.h (record_detach): Likewise.
13734         * remote-sim.c (gdbsim_detach): Likewise.
13735         * remote.c (remote_detach_1): Likewise.
13736         (remote_detach): Likewise.
13737         (extended_remote_detach): Likewise.
13738         * sol-thread.c (sol_thread_detach): Likewise.
13739         * target-delegates.c: Re-generate.
13740         * top.c (struct qt_args) <args>: Remove field.
13741         (kill_or_detach): Don't pass args.
13742         (quit_force): Don't set args.
13743         * windows-nat.c (windows_detach): Remove args parameter.
13744
13745 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13746
13747         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13748         (arm_linux_init_abi): Install it.
13749
13750 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13751
13752         * osabi.c (gdb_osabi_names): Extend the regexp for
13753         arm-linux-gnueabihf.
13754
13755 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13756
13757         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13758         m_abbrevs.
13759         (abbrev_table::add_abbrev): Update.
13760         (abbrev_table::lookup_abbrev): Update.
13761
13762 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13763
13764         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13765
13766 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13767
13768         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13769         to "std::string".
13770
13771 2018-01-17  Tom Tromey  <tom@tromey.com>
13772
13773         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13774
13775 2018-01-17  Tom Tromey  <tom@tromey.com>
13776
13777         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13778         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13779         (create_array_type_with_stride): Update.
13780         * dwarf2read.c (set_die_type): Update.
13781
13782 2018-01-17  Tom Tromey  <tom@tromey.com>
13783
13784         * dwarf2read.c (delayed_method_info): Remove typedef.
13785         (dwarf2_cu::method_info): Now a std::vector.
13786         (add_to_method_list): Update.
13787         (free_delayed_list): Remove.
13788         (compute_delayed_physnames): Update.
13789         (process_full_comp_unit, process_full_type_unit): Clear the method
13790         list.  Remove cleanups.
13791         (psymtab_include_file_name): Add name_holder parameter.  Use
13792         unique_xmalloc_ptr.
13793         (dwarf_decode_lines): Update.
13794
13795 2018-01-17  Tom Tromey  <tom@tromey.com>
13796             Simon Marchi  <simon.marchi@ericsson.com>
13797
13798         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13799         (dwarf2_per_objfile::free_cached_comp_units)
13800         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13801         (init_cutu_and_read_dies_no_follow): Update.
13802         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13803         (dwarf2_cu::~dwarf2_cu): New.
13804         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13805         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13806
13807 2018-01-17  Tom Tromey  <tom@tromey.com>
13808             Simon Marchi  <simon.marchi@ericsson.com>
13809
13810         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13811         (struct die_reader_specs) <abbrev_table>: New member.
13812         (struct abbrev_table): Add constructor.
13813         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13814         <abbrev_obstack>: Now an auto_obstack.
13815         (abbrev_table_up): New typedef.
13816         (init_cu_die_reader): Add abbrev_table parameter.
13817         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13818         Add result_dwo_abbrev_table.
13819         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13820         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13821         Update.
13822         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13823         parameter.
13824         (skip_children): Update.
13825         (abbrev_table::alloc_abbrev): Rename from
13826         abbrev_table_alloc_abbrev.
13827         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13828         (abbrev_table::lookup_abbrev): Rename from
13829         abbrev_table_lookup_abbrev.
13830         (abbrev_table_read_table): Return abbrev_table_up.
13831         (abbrev_table_free, abbrev_table_free_cleanup)
13832         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13833         (load_partial_dies): Update.
13834
13835 2018-01-17  Tom Tromey  <tom@tromey.com>
13836
13837         * dwarf2read.c (dwarf2_compute_name): Update comment.
13838         (read_func_scope, read_variable): Update.
13839         (new_symbol): Remove.
13840         (new_symbol_full): Rename to new_symbol.
13841
13842 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13843
13844         PR gdb/16577
13845         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13846         a warning instead of throwing an error, set section size to 0 and return
13847         NULL.
13848         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13849
13850 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13851
13852         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13853         std::string.
13854         (linux_ptrace_attach_fail_reason_string): Likewise.
13855         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13856         Likewise.
13857         (linux_ptrace_attach_fail_reason_string): Likewise.
13858         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13859
13860 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13861
13862         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13863
13864 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13865
13866         PR gdb/21559
13867         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13868         checking for fs_base/gs_base fields in struct user_regs_struct.
13869         * configure: Regenerate.
13870
13871 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13872
13873         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13874         function.
13875         (aarch64_linux_init_abi): Install it to gdbarch hook
13876         gcc_target_options.
13877
13878 2018-01-15  Pedro Alves  <palves@redhat.com>
13879
13880         * common/signals-state-save-restore.c
13881         (save_original_signals_state): Fix typos.
13882
13883 2017-01-12  Tom Tromey  <tom@tromey.com>
13884             Sergio Durigan Junior  <sergiodj@redhat.com>
13885
13886         * Makefile.in (install-only): Install gdb-add-index.
13887
13888 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13889
13890         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13891
13892 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13893
13894         * infrun.c (keep_going_pass_signal): Clear step-over info when
13895         insert_breakpoints fails.
13896
13897 2018-01-11  Pedro Alves  <palves@redhat.com>
13898
13899         PR gdb/22583
13900         * infrun.c (resume): Rename to ...
13901         (resume_1): ... this.
13902         (resume): Reimplement as wrapper around resume_1.
13903
13904 2018-01-11  Pedro Alves  <palves@redhat.com>
13905
13906         PR remote/22597
13907         * remote.c (remote_parse_stop_reply): Default to the last-set
13908         general thread instead of to 'magic_null_ptid'.
13909
13910 2018-01-10  Pedro Alves  <palves@redhat.com>
13911
13912         * language.h (language_get_symbol_name_matcher): Rename ...
13913         (get_symbol_name_matcher): ... this.
13914         * language.c (language_get_symbol_name_matcher): Ditto.
13915         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13916         callers adjusted.
13917
13918 2018-01-10  Pedro Alves  <palves@redhat.com>
13919
13920         PR gdb/22670
13921         * dwarf2read.c
13922         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13923         Adjust to use language_get_symbol_name_matcher instead of
13924         language_defn::la_get_symbol_name_matcher.
13925         * language.c (language_get_symbol_name_matcher): If in Ada mode
13926         and the lookup name is a verbatim match, return Ada's matcher.
13927         * language.h (language_get_symbol_name_matcher): Adjust comment.
13928         (ada_lookup_name_info::verbatim_p):: New method.
13929
13930 2018-01-10  Pedro Alves  <palves@redhat.com>
13931
13932         PR gdb/22670
13933         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13934         minsym's language is language_auto or language_cplus, pass down
13935         language_ada instead.
13936         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13937
13938 2018-01-10  Pedro Alves  <palves@redhat.com>
13939
13940         PR gdb/22670
13941         * minsyms.c (linkage_name_str): New function.
13942         (iterate_over_minimal_symbols): Use it.
13943
13944 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13945
13946         * NEWS: Document that 'info proc' now works on FreeBSD.
13947
13948 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13949
13950         * configure.ac: Check for kinfo_getfile in libutil.
13951         * configure: Regenerate.
13952         * config.in: Regenerate.
13953         * fbsd-nat.c: Include "fbsd-tdep.h".
13954         (fbsd_fetch_cmdline): New.
13955         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13956         rather than calling error.
13957         (fbsd_info_proc): New.
13958         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13959         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13960         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13961
13962 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13963
13964         * fbsd-nat.c (struct free_deleter): Remove.
13965         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13966
13967 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13968
13969         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13970         NULL for an empty pathname.
13971
13972 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13973
13974         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13975         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13976         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13977         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13978         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13979         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13980         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13981         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13982         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13983         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13984         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13985         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13986         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13987         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13988         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13989
13990 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13991
13992         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13993         (gnu_xfer_auxv): New function.
13994         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13995         TARGET_OBJECT_AUXV.
13996
13997 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13998             Simon Marchi  <simon.marchi@ericsson.com>
13999
14000         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14001         common/selftest.c.
14002         (COMMON_OBS): Remove selftest.o.
14003         * configure.ac: Append selftest-arch.c and common/selftest.c to
14004         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14005         * configure: Re-generated.
14006         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14007         GDB_SELF_TEST.
14008         (maintenance_info_selftests): Likewise.
14009
14010 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14011
14012         * ada-valprint.c (val_print_packed_array_elements): Use
14013         proper number of elements when printing an array indexed
14014         by an enumeration type.
14015
14016 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14017
14018         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14019         (dw2_get_file_names_reader): Adjust.
14020         (lookup_dwo_signatured_type): Adjust.
14021         (lookup_dwp_signatured_type): Adjust.
14022         (lookup_signatured_type): Adjust.
14023         (create_type_unit_group): Adjust.
14024         (get_type_unit_group): Adjust.
14025         (process_psymtab_comp_unit_reader): Adjust.
14026         (build_type_psymtabs_reader): Adjust.
14027         (scan_partial_symbols): Adjust.
14028         (add_partial_symbol): Adjust.
14029         (add_partial_subprogram): Adjust.
14030         (peek_die_abbrev): Adjust.
14031         (fixup_go_packaging): Adjust.
14032         (process_imported_unit_die): Adjust.
14033         (dwarf2_compute_name): Adjust.
14034         (dwarf2_physname): Adjust.
14035         (read_import_statement): Adjust.
14036         (handle_DW_AT_stmt_list): Adjust.
14037         (read_file_scope): Adjust.
14038         (read_func_scope): Adjust.
14039         (read_lexical_block_scope): Adjust.
14040         (read_call_site_scope): Adjust.
14041         (read_variable): Adjust.
14042         (dwarf2_rnglists_process): Adjust.
14043         (dwarf2_ranges_process): Adjust.
14044         (dwarf2_ranges_read): Adjust.
14045         (dwarf2_get_pc_bounds): Adjust.
14046         (dwarf2_record_block_ranges): Adjust.
14047         (dwarf2_add_field): Adjust.
14048         (dwarf2_add_member_fn): Adjust.
14049         (read_structure_type): Adjust.
14050         (process_structure_scope): Adjust.
14051         (read_enumeration_type): Adjust.
14052         (read_array_type): Adjust.
14053         (mark_common_block_symbol_computed): Adjust.
14054         (read_common_block): Adjust.
14055         (read_namespace_type): Adjust.
14056         (read_namespace): Adjust.
14057         (read_module_type): Adjust.
14058         (read_tag_pointer_type): Adjust.
14059         (read_tag_ptr_to_member_type): Adjust.
14060         (read_tag_string_type): Adjust.
14061         (read_subroutine_type): Adjust.
14062         (read_typedef): Adjust.
14063         (read_base_type): Adjust.
14064         (attr_to_dynamic_prop): Adjust.
14065         (read_subrange_type): Adjust.
14066         (read_unspecified_type): Adjust.
14067         (dwarf2_read_abbrevs): Adjust.
14068         (load_partial_dies): Adjust.
14069         (read_partial_die): Adjust.
14070         (find_partial_die): Adjust.
14071         (guess_partial_die_structure_name): Adjust.
14072         (fixup_partial_die): Adjust.
14073         (read_attribute_value): Adjust.
14074         (read_addr_index): Adjust.
14075         (read_addr_index_from_leb128): Adjust.
14076         (read_str_index): Adjust.
14077         (dwarf2_string_attr): Adjust.
14078         (get_debug_line_section): Adjust.
14079         (dwarf_decode_line_header): Adjust.
14080         (lnp_state_machine::check_line_address): Adjust.
14081         (dwarf_decode_lines_1): Adjust.
14082         (dwarf_decode_lines): Adjust.
14083         (dwarf2_start_symtab): Adjust.
14084         (var_decode_location): Adjust.
14085         (new_symbol_full): Adjust.
14086         (dwarf2_const_value_data): Adjust.
14087         (dwarf2_const_value_attr): Adjust.
14088         (dwarf2_const_value): Adjust.
14089         (die_type): Adjust.
14090         (die_containing_type): Adjust.
14091         (build_error_marker_type): Adjust.
14092         (lookup_die_type): Adjust.
14093         (guess_full_die_structure_name): Adjust.
14094         (anonymous_struct_prefix): Adjust.
14095         (determine_prefix): Adjust.
14096         (dwarf2_name): Adjust.
14097         (follow_die_ref_or_sig): Adjust.
14098         (follow_die_offset): Adjust.
14099         (follow_die_ref): Adjust.
14100         (follow_die_sig_1): Adjust.
14101         (follow_die_sig): Adjust.
14102         (get_signatured_type): Adjust.
14103         (get_DW_AT_signature_type): Adjust.
14104         (decode_locdesc): Adjust.
14105         (dwarf_decode_macros): Adjust.
14106         (cu_debug_loc_section): Adjust.
14107         (fill_in_loclist_baton): Adjust.
14108         (dwarf2_symbol_mark_computed): Adjust.
14109         (init_one_comp_unit): Don't assign
14110         dwarf2_cu::dwarf2_per_objfile.
14111         (set_die_type): Adjust.
14112
14113 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14114
14115         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14116         <dwarf2_per_objfile>: New field.
14117         (dwarf2_per_objfile): Remove global.
14118         (get_dwarf2_per_objfile): New function.
14119         (set_dwarf2_per_objfile): New function.
14120         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14121         dwarf2_per_objfile.
14122         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14123         (read_abbrev_offset): Likewise.
14124         (read_indirect_string): Likewise.
14125         (read_indirect_line_string): Likewise.
14126         (read_indirect_string_at_offset): Likewise.
14127         (read_indirect_string_from_dwz): Likewise.
14128         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14129         dwarf2_per_objfile.
14130         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14131         (create_all_comp_units): Change objfile parameter to
14132         dwarf2_per_objfile.
14133         (create_all_type_units): Likewise.
14134         (process_queue): Add dwarf2_per_objfile parameter.
14135         (read_and_check_comp_unit_head): Likewise.
14136         (lookup_dwo_unit_in_dwp): Likewise.
14137         (get_dwp_file): Likewise.
14138         (process_cu_includes): Likewise.
14139         (struct free_dwo_file_cleanup_data): New struct.
14140         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14141         set_dwarf2_per_objfile.
14142         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14143         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14144         context, adjust calls.
14145         (dw2_instantiate_symtab): Likewise.
14146         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14147         (dw2_get_cu): Likewise.
14148         (create_cu_from_index_list): Change objfile parameter to
14149         dwarf2_per_objfile.
14150         (create_cus_from_index_list): Get dwarf2_per_objfile from
14151         context, adjust calls.
14152         (create_cus_from_index): Likewise.
14153         (create_signatured_type_table_from_index): Change objfile
14154         parameter to dwarf2_per_objfile.
14155         (create_signatured_type_table_from_debug_names): Change objfile
14156         parameter to dwarf2_per_objfile.
14157         (create_addrmap_from_index): Likewise.
14158         (create_addrmap_from_aranges): Likewise.
14159         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14160         (dw2_setup): Remove.
14161         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14162         context.
14163         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14164         get_dwarf2_per_objfile.
14165         (dw2_forget_cached_source_info): Likewise.
14166         (dw2_map_symtabs_matching_filename): Likewise.
14167         (struct dw2_symtab_iterator) <index>: Remove.
14168         <dwarf2_per_objfile>: New field.
14169         (dw2_symtab_iter_init): Replace index parameter with
14170         dwarf2_per_objfile.
14171         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14172         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14173         (dw2_print_stats): Likewise.
14174         (dw2_dump): Likewise.
14175         (dw2_expand_symtabs_for_function): Likewise.
14176         (dw2_expand_all_symtabs): Likewise.
14177         (dw2_expand_symtabs_with_fullname): Likewise.
14178         (dw2_expand_marked_cus): Replace index and objfile parameters
14179         with dwarf2_per_objfile.
14180         (dw_expand_symtabs_matching_file_matcher): Add
14181         dwarf2_per_objfile parameter and adjust calls.
14182         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14183         adjust calls.
14184         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14185         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14186         adjust calls.
14187         (create_cus_from_debug_names_list): Replace objfile parameter
14188         with dwarf2_per_objfile and adjust calls.
14189         (create_cus_from_debug_names): Likewise.
14190         (dwarf2_read_debug_names): Likewise.
14191         (mapped_debug_names::namei_to_name): Adjust call.
14192         (dw2_debug_names_iterator::next): Likewise.
14193         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14194         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14195         (dw2_debug_names_dump): Likewise.
14196         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14197         (dw2_debug_names_expand_symtabs_matching): Likewise.
14198         (dwarf2_initialize_objfile): Likewise.
14199         (dwarf2_build_psymtabs): Likewise.
14200         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14201         this_cu.
14202         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14203         (read_and_check_comp_unit_head): Likewise.
14204         (read_abbrev_offset): Likewise.
14205         (create_debug_type_hash_table): Likewise.
14206         (create_debug_types_hash_table): Likewise.
14207         (create_all_type_units): Replace objfile parameter with
14208         dwarf2_per_objfile.
14209         (add_type_unit): Add dwarf2_per_objfile parameter.
14210         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14211         with dwarf2_per_objfile.
14212         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14213         (lookup_dwp_signatured_type): Likewise.
14214         (lookup_signatured_type): Likewise.
14215         (read_cutu_die_from_dwo): Likewise.
14216         (init_tu_and_read_dwo_dies): Likewise.
14217         (init_cutu_and_read_dies): Likewise.
14218         (init_cutu_and_read_dies_no_follow): Likewise.
14219         (allocate_type_unit_groups_table): Add objfile parameter.
14220         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14221         (get_type_unit_group): Likewise.
14222         (process_psymtab_comp_unit): Update call.
14223         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14224         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14225         (print_tu_stats): Likewise.
14226         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14227         in void* parameter.
14228         (build_type_psymtabs): Change objfile parameter to
14229         dwarf2_per_objfile.
14230         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14231         passed in void* parameter.
14232         (process_skeletonless_type_units): Change objfile parameter to
14233         dwarf2_per_objfile.
14234         (set_partial_user): Likewise.
14235         (dwarf2_build_psymtabs_hard): Likewise.
14236         (read_comp_units_from_section): Likewise.
14237         (create_all_comp_units): Likewise.
14238         (scan_partial_symbols): Update calls.
14239         (add_partial_symbol): Likewise.
14240         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14241         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14242         (process_queue): Add dwarf2_per_objfile parameter.
14243         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14244         (compute_compunit_symtab_includes): Likewise.
14245         (process_cu_includes): Add dwarf2_per_objfile parameter.
14246         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14247         (process_full_type_unit): Likewise.
14248         (process_imported_unit_die): Update call.
14249         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14250         (read_file_scope): Likewise.
14251         (allocate_dwo_file_hash_table): Add objfile parameter.
14252         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14253         (create_cus_hash_table): Likewise.
14254         (create_dwp_hash_table): Likewise.
14255         (create_dwo_unit_in_dwp_v1): Likewise.
14256         (create_dwp_v2_section): Likewise.
14257         (create_dwo_unit_in_dwp_v2): Likewise.
14258         (lookup_dwo_unit_in_dwp): Likewise.
14259         (try_open_dwop_file): Likewise.
14260         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14261         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14262         cleanup to include a reference to dwarf2_per_objfile.
14263         (open_dwp_file): Add dwarf2_per_objfile parameter.
14264         (open_and_init_dwp_file): Likewise.
14265         (get_dwp_file): Likewise.
14266         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14267         (queue_and_load_all_dwo_tus): Update call.
14268         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14269         data.
14270         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14271         (dwarf2_ranges_process): Likewise.
14272         (dwarf2_get_pc_bounds): Likewise.
14273         (mark_common_block_symbol_computed): Likewise.
14274         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14275         (dwarf2_read_abbrevs): Update call.
14276         (read_partial_die): Use dwarf2_per_objfile from cu.
14277         (find_partial_die): Likewise.
14278         (fixup_partial_die): Likewise.
14279         (read_attribute_value): Likewise.
14280         (read_indirect_string_at_offset_from): Add objfile parameter.
14281         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14282         parameter.
14283         (read_indirect_string_from_dwz): Add objfile parameter.
14284         (read_indirect_string): Add objfile parameter.
14285         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14286         (read_addr_index): Use dwarf2_per_objfile from cu.
14287         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14288         call dw2_setup.
14289         (read_str_index): Use dwarf2_per_objfile from cu.
14290         (get_debug_line_section): Likewise.
14291         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14292         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14293         (new_symbol_full): Use dwarf2_per_objfile from cu.
14294         (build_error_marker_type): Likewise.
14295         (lookup_die_type): Likewise.
14296         (determine_prefix): Likewise.
14297         (follow_die_offset): Likewise.
14298         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14299         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14300         (dwarf2_fetch_die_type_sect_off): Likewise.
14301         (dwarf2_get_die_type): Likewise.
14302         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14303         (get_signatured_type): Likewise.
14304         (get_DW_AT_signature_type): Likewise.
14305         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14306         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14307         (cu_debug_loc_section): Likewise.
14308         (fill_in_loclist_baton): Likewise.
14309         (dwarf2_symbol_mark_computed): Likewise.
14310         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14311         dwarf2_per_objfile.
14312         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14313         parameter.
14314         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14315         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14316         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14317         (set_die_type): Use dwarf2_free_objfile from cu.
14318         (get_die_type_at_offset): Likewise.
14319         (dwarf2_per_objfile_free): Don't assign global variable.
14320         (debug_names) <constructor>: Add dwarf2_per_objfile
14321         parameter, update m_debugstrlookup construction.
14322         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14323         parameter.
14324         <m_dwarf2_per_objfile>: New field.
14325         <lookup>: Use m_dwarf2_per_objfile.
14326         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14327         (psyms_seen_size): Likewise.
14328         (write_gdbindex): Replace objfile parameter with
14329         dwarf2_per_objfile.
14330         (write_debug_names): Likewise.
14331         (write_psymtabs_to_index): Likewise.
14332         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14333         calls.
14334
14335 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14336
14337         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14338         <dwarf2_per_objfile>: New field.
14339         (struct dwarf2_per_cu_data) <objfile>: Remove.
14340         <dwarf2_per_objfile>: New field.
14341         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14342         of objfile.
14343         (create_signatured_type_table_from_index): Likewise.
14344         (create_debug_type_hash_table): Likewise.
14345         (fill_in_sig_entry_from_dwo_entry): Likewise.
14346         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14347         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14348         objfile.
14349         (create_partial_symtab): Access objfile through
14350         dwarf2_per_objfile.
14351         (process_psymtab_comp_unit_reader): Likewise.
14352         (read_comp_units_from_section): Likewise.
14353         (scan_partial_symbols): Likewise.
14354         (add_partial_symbol): Likewise.
14355         (add_partial_subprogram): Likewise.
14356         (peek_die_abbrev): Likewise.
14357         (fixup_go_packaging): Likewise.
14358         (process_full_comp_unit): Likewise.
14359         (process_full_type_unit): Likewise.
14360         (process_imported_unit_die): Likewise.
14361         (dwarf2_compute_name): Likewise.
14362         (dwarf2_physname): Likewise.
14363         (read_import_statement): Likewise.
14364         (create_cus_hash_table): Assign dwarf2_physname instead of
14365         objfile.
14366         (read_func_scope): Access objfile through dwarf2_per_objfile.
14367         (read_lexical_block_scope): Likewise.
14368         (read_call_site_scope): Likewise.
14369         (read_variable): Likewise.
14370         (dwarf2_rnglists_process): Likewise.
14371         (dwarf2_ranges_process): Likewise.
14372         (dwarf2_ranges_read): Likewise.
14373         (dwarf2_record_block_ranges): Likewise.
14374         (dwarf2_add_field): Likewise.
14375         (dwarf2_add_member_fn): Likewise.
14376         (read_structure_type): Likewise.
14377         (process_structure_scope): Likewise.
14378         (read_enumeration_type): Likewise.
14379         (read_array_type): Likewise.
14380         (read_common_block): Likewise.
14381         (read_namespace_type): Likewise.
14382         (read_namespace): Likewise.
14383         (read_module_type): Likewise.
14384         (read_tag_pointer_type): Likewise.
14385         (read_tag_ptr_to_member_type): Likewise.
14386         (read_tag_string_type): Likewise.
14387         (read_subroutine_type): Likewise.
14388         (read_typedef): Likewise.
14389         (read_base_type): Likewise.
14390         (attr_to_dynamic_prop): Likewise.
14391         (read_subrange_type): Likewise.
14392         (read_unspecified_type): Likewise.
14393         (load_partial_dies): Likewise.
14394         (read_partial_die): Likewise.
14395         (find_partial_die): Likewise.
14396         (guess_partial_die_structure_name): Likewise.
14397         (fixup_partial_die): Likewise.
14398         (read_attribute_value): Likewise.
14399         (read_addr_index_from_leb128): Likewise.
14400         (dwarf2_read_addr_index): Likewise.
14401         (dwarf2_string_attr): Likewise.
14402         (lnp_state_machine::check_line_address): Likewise.
14403         (dwarf_decode_lines_1): Likewise.
14404         (dwarf_decode_lines): Likewise.
14405         (dwarf2_start_symtab): Likewise.
14406         (var_decode_location): Likewise.
14407         (new_symbol_full): Likewise.
14408         (dwarf2_const_value_data): Likewise.
14409         (dwarf2_const_value_attr): Likewise.
14410         (dwarf2_const_value): Likewise.
14411         (die_type): Likewise.
14412         (die_containing_type): Likewise.
14413         (lookup_die_type): Likewise.
14414         (guess_full_die_structure_name): Likewise.
14415         (anonymous_struct_prefix): Likewise.
14416         (dwarf2_name): Likewise.
14417         (follow_die_ref_or_sig): Likewise.
14418         (follow_die_offset): Likewise.
14419         (follow_die_ref): Likewise.
14420         (dwarf2_fetch_die_loc_sect_off): Likewise.
14421         (dwarf2_fetch_constant_bytes): Likewise.
14422         (dwarf2_fetch_die_type_sect_off): Likewise.
14423         (dwarf2_get_die_type): Likewise.
14424         (follow_die_sig): Likewise.
14425         (decode_locdesc): Likewise.
14426         (dwarf2_per_cu_objfile): Likewise.
14427         (dwarf2_per_cu_text_offset): Likewise.
14428         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14429         objfile.
14430         (set_die_type): Access objfile through
14431         dwarf2_per_objfile.
14432
14433 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14434
14435         * valprint.c (converted_character_d): Remove typedef.
14436         (DEF_VEC_O (converted_character_d)): Remove.
14437         (count_next_character): Use std::vector.
14438         (print_converted_chars_to_obstack): Likewise.
14439         (generic_printstr): Likewise.
14440
14441 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14442
14443         * xml-support.h (struct gdb_xml_value): Add constructor.
14444         <value>: Change type to unique_xmalloc_ptr.
14445         (gdb_xml_value_s): Remove typedef.
14446         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14447         (gdb_xml_element_start_handler): Change parameter type to
14448         std::vector.
14449         (xml_find_attribute): Likewise.
14450         * xml-support.c (xml_find_attribute): Change parameter type to
14451         std::vector and adjust.
14452         (gdb_xml_values_cleanup): Remove.
14453         (gdb_xml_parser::start_element): Adjust to std::vector.
14454         (xinclude_start_include): Change paraeter type to std::vector
14455         and adjust.
14456         * btrace.c (check_xml_btrace_version): Likewise.
14457         (parse_xml_btrace_block): Likewise.
14458         (parse_xml_btrace_pt_config_cpu): Likewise.
14459         (parse_xml_btrace_pt): Likewise.
14460         (parse_xml_btrace_conf_bts): Likewise.
14461         (parse_xml_btrace_conf_pt): Likewise.
14462         * memory-map.c (memory_map_start_memory): Likewise.
14463         (memory_map_start_property): Likewise.
14464         * osdata.c (osdata_start_osdata): Likewise.
14465         (osdata_start_item): Likewise.
14466         (osdata_start_column): Likewise.
14467         * remote.c (start_thread): Likewise.
14468         * solib-aix.c (library_list_start_library): Likewise.
14469         (library_list_start_list): Likewise.
14470         * solib-svr4.c (library_list_start_library): Likewise.
14471         (svr4_library_list_start_list): Likewise.
14472         * solib-target.c (library_list_start_segment): Likewise.
14473         (library_list_start_section): Likewise.
14474         (library_list_start_library): Likewise.
14475         (library_list_start_list): Likewise.
14476         * tracepoint.c (traceframe_info_start_memory): Likewise.
14477         (traceframe_info_start_tvar): Likewise.
14478         * xml-syscall.c (syscall_start_syscall): Likewise.
14479         * xml-tdesc.c (tdesc_start_target): Likewise.
14480         (tdesc_start_feature): Likewise.
14481         (tdesc_start_reg): Likewise.
14482         (tdesc_start_union): Likewise.
14483         (tdesc_start_struct): Likewise.
14484         (tdesc_start_flags): Likewise.
14485         (tdesc_start_enum): Likewise.
14486         (tdesc_start_field): Likewise.
14487         (tdesc_start_enum_value): Likewise.
14488         (tdesc_start_vector): Likewise.
14489
14490 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14491
14492         * extension.h (struct xmethod_worker) <clone>: Remove.
14493         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14494         Remove.
14495         (python_xmethod_worker::clone): Remove.
14496         * valops.c (find_overload_match): Use std::move instead of
14497         clone.
14498
14499 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14500
14501         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14502         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14503         <free_xmethod_worker_data>: Remove.
14504         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14505         <get_xmethod_arg_types>: Remove.
14506         <get_xmethod_result_type>: Remove.
14507         <invoke_xmethod>: Remove.
14508         * extension.c (new_xmethod_worker): Remove.
14509         (clone_xmethod_worker): Remove.
14510         (get_matching_xmethod_workers): Return void, pass std::vector by
14511         pointer.
14512         (get_xmethod_arg_types): Rename to...
14513         (xmethod_worker::get_arg_types): ... this, and adjust.
14514         (get_xmethod_result_type): Rename to...
14515         (xmethod_worker::get_result_type): ... this, and adjust.
14516         (invoke_xmethod): Remove.
14517         (free_xmethod_worker): Remove.
14518         (free_xmethod_worker_vec): Remove.
14519         * extension.h (enum ext_lang_rc): Move here from
14520         extension-priv.h.
14521         (struct xmethod_worker): Add constructor and destructor.
14522         <data>: Remove.
14523         <value>: Remove.
14524         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14525         virtual pure methods.
14526         <get_arg_types, get_result_type>: New methods.
14527         (xmethod_worker_ptr): Remove typedef.
14528         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14529         (xmethod_worker_vec): Remove typedef.
14530         (xmethod_worker_up): New typedef.
14531         (invoke_xmethod): Remove.
14532         (clone_xmethod_worker): Remove.
14533         (free_xmethod_worker): Remove.
14534         (free_xmethod_worker_vec): Remove.
14535         (get_xmethod_arg_types): Remove.
14536         (get_xmethod_result_type): Remove.
14537         * valops.c (find_method_list): Use std::vector, don't use
14538         intermediate vector.
14539         (value_find_oload_method_list): Use std::vector.
14540         (find_overload_match): Use std::vector.
14541         (find_oload_champ): Use std::vector.
14542         * value.c (value_free): Use operator delete.
14543         (value_of_xmethod): Rename to...
14544         (value_from_xmethod): ... this.  Don't assign
14545         xmethod_worker::value, take rvalue-reference.
14546         (result_type_of_xmethod): Adjust.
14547         (call_xmethod): Adjust.
14548         * value.h: Include extension.h.
14549         (struct xmethod_worker): Don't forward-declare.
14550         (value_of_xmethod): Rename to...
14551         (value_from_xmethod): ... this, take rvalue-reference.
14552         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14553         (struct python_xmethod_worker): ... this, add constructor and
14554         destructor.
14555         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14556         (gdbpy_free_xmethod_worker_data): Rename to...
14557         (python_xmethod_worker::~python_xmethod_worker): ... this and
14558         adjust.
14559         (gdbpy_clone_xmethod_worker_data): Rename to...
14560         (python_xmethod_worker::clone): ... this and adjust.
14561         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14562         temporary vector.
14563         (gdbpy_get_xmethod_arg_types): Rename to...
14564         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14565         (gdbpy_get_xmethod_result_type): Rename to...
14566         (python_xmethod_worker::do_get_result_type): ... this and
14567         adjust.
14568         (gdbpy_invoke_xmethod): Rename to...
14569         (python_xmethod_worker::invoke): ... this and adjust.
14570         (new_python_xmethod_worker): Rename to...
14571         (python_xmethod_worker::python_xmethod_worker): ... this and
14572         adjust.
14573         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14574         Remove.
14575         (gdbpy_free_xmethod_worker_data): Remove.
14576         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14577         (gdbpy_get_xmethod_arg_types): Remove.
14578         (gdbpy_get_xmethod_result_type): Remove.
14579         (gdbpy_invoke_xmethod): Remove.
14580         * python/python.c (python_extension_ops): Remove obsolete
14581         callbacks.
14582
14583 2018-01-05  Pedro Alves  <palves@redhat.com>
14584
14585         PR gdb/18653
14586         * common/signals-state-save-restore.c
14587         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14588         find a custom handler preinstalled, instead of internal erroring.
14589         But only warn if !quiet.
14590         * common/signals-state-save-restore.h
14591         (save_original_signals_state): New parameter 'quiet'.
14592         * main.c (captured_main_1): Move save_original_signals_state call
14593         after option handling, and pass QUIET.
14594
14595 2018-01-05  Pedro Alves  <palves@redhat.com>
14596
14597         * spu-tdep.c (spu_catch_start): Pass
14598         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14599
14600 2018-01-05  Pedro Alves  <palves@redhat.com>
14601
14602         PR gdb/22670
14603         * ada-lang.c (literal_symbol_name_matcher): New function.
14604         (ada_get_symbol_name_matcher): Use it for
14605         symbol_name_match_type::SEARCH_NAME.
14606         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14607         it down instead of assuming symbol_name_match_type::FULL.
14608         * block.h (block_lookup_symbol): New parameter 'match_type'.
14609         * c-valprint.c (print_unpacked_pointer): Use
14610         lookup_symbol_search_name instead of lookup_symbol.
14611         * compile/compile-object-load.c (get_out_value_type): Pass down
14612         symbol_name_match_type::SEARCH_NAME.
14613         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14614         symbol_name_match_type::FULL.
14615         * cp-support.c (cp_get_symbol_name_matcher): Handle
14616         symbol_name_match_type::SEARCH_NAME.
14617         * infrun.c (insert_exception_resume_breakpoint): Use
14618         lookup_symbol_search_name.
14619         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14620         * psymtab.c (maintenance_check_psymtabs): Use
14621         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14622         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14623         SYMBOL_SEARCH_NAME.
14624         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14625         if symbol_name_match_type::SEARCH_NAME.
14626         (lookup_symbol_in_language): Pass down
14627         symbol_name_match_type::FULL.
14628         (lookup_symbol_search_name): New.
14629         (lookup_language_this): Pass down
14630         symbol_name_match_type::SEARCH_NAME.
14631         (lookup_symbol_aux, lookup_local_symbol): New parameter
14632         'match_type'.  Pass it down.
14633         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14634         (lookup_symbol_search_name): New declaration.
14635         (lookup_symbol_in_block): New 'match_type' parameter.
14636
14637 2018-01-05  Pedro Alves  <palves@redhat.com>
14638
14639         PR gdb/22670
14640         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14641         ada_lookup_symbol.
14642         (ada_lookup_symbol): Reimplement in terms of
14643         ada_lookup_symbol_list, bits factored out from
14644         ada_lookup_encoded_symbol.
14645
14646 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14647
14648         * ada-exp.y (write_object_renaming): When subscripting an array
14649         using a symbol as the index, pass the block in call to
14650         ada_lookup_encoded_symbol when looking that symbol up.
14651
14652 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14653
14654         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14655         TYPE_INDEX_TYPE.
14656
14657 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14658
14659         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14660         the case where VALUE_LVAL (val0) is not lval_memory.
14661
14662 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14663
14664         * ada-valprint.c (print_optional_low_bound): Handle
14665         character-indexed array printing like boolean-indexed array
14666         printing.
14667
14668 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14669
14670         * NEWS: Create a new section for the next release branch.
14671         Rename the section of the current branch, now that it has
14672         been cut.
14673
14674 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14675
14676         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14677         * version.in: Bump version to 8.1.50.DATE-git.
14678
14679 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14680
14681         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14682         Add field.
14683         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14684         Add field.
14685         (default_exception_support_info) <catch_handlers_sym>: Add field.
14686         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14687         (ada_exception_name_addr_1): Add "catch handlers" handling.
14688         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14689         Update all callers.
14690         (create_excep_cond_exprs) <ex>: Add parameter.
14691         (re_set_exception): Update create_excep_cond_exprs call.
14692         (print_it_exception, print_one_exception, print_mention_exception)
14693         (print_recreate_exception): Add "catch handler" handling.
14694         (allocate_location_catch_handlers, re_set_catch_handlers)
14695         (check_status_catch_handlers, print_it_catch_handlers)
14696         (print_one_catch_handlers, print_mention_catch_handlers)
14697         (print_recreate_catch_handlers): New function.
14698         (catch_handlers_breakpoint_ops): New variable.
14699         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14700         Add parameter.  Add "catch handler" handling.
14701         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14702         Add "catch handler" handling.
14703         (ada_exception_catchpoint_cond_string): Add "catch handler"
14704         handling.
14705         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14706         call.
14707         (catch_ada_handlers_command): New function.
14708         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14709         operations structure.
14710         (_initialize_ada_language): Add "catch handlers" command entry.
14711         * NEWS: Document "catch handlers" feature.
14712
14713 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14714
14715         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14716         account when creating the array type of the slice.
14717         (ada_value_slice): Likewise.
14718
14719 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14720
14721         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14722         New enum value.
14723         (create_array_type_with_stride): Add byte_stride_prop parameter.
14724         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14725         New parameter.  Update all callers in this file.
14726         (array_type_has_dynamic_stride): New function.
14727         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14728         of arrays with dynamic byte strides.
14729         * dwarf2read.c (read_array_type): Add support for dynamic
14730         DW_AT_byte_stride attributes.
14731
14732 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14733
14734         * dwarf2read.c (read_unspecified_type): Treat
14735         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14736
14737 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14738
14739         Update copyright year range in all GDB files.
14740
14741 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14742
14743         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14744         and gdb/testsuite/gdb.base/step-line.c.
14745
14746 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14747
14748         * copyright.py (main): Dump the contents of
14749         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14750         even if BY_HAND is empty.
14751
14752 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14753
14754         * top.c (print_gdb_version): Update Copyright year in version
14755         message.
14756
14757 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14758
14759         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14760
14761 For older changes see ChangeLog-2017.
14762 \f
14763 Local Variables:
14764 mode: change-log
14765 left-margin: 8
14766 fill-column: 74
14767 version-control: never
14768 coding: utf-8
14769 End: