Fix cli_interp::cli_uiout resource leak found by Coverity
[external/binutils.git] / gdb / ChangeLog
1 2018-10-19  Gary Benson <gbenson@redhat.com>
2
3         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
4
5 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
6
7         PR cli/23785
8         * cli/cli-dump.c (restore_binary_file): Check if "file" is
9         NULL.
10
11 2018-10-17  Paul Koning  <paul_koning@dell.com>
12
13         * charset.c (convert_between_encodings): Fix unsigned overflow.
14
15 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
16
17         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
18         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
19         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
20         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
21         New functions.
22         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
23         and fbsd_info_proc_mappings_header.
24         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
25         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
26         New.
27
28 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
29
30         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
31         Solaris Maintainer.
32
33 2018-10-15  Tom Tromey  <tom@tromey.com>
34
35         * tui/tui.c (strcat_to_buf): Remove casts.
36         * tui/tui-winsource.c (tui_show_source_line)
37         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
38         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
39         * tui/tui-windata.c (tui_first_data_item_displayed)
40         (tui_delete_data_content_windows, tui_erase_data_content)
41         (tui_display_all_data, tui_display_data_from)
42         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
43         * tui/tui-win.c (tui_set_win_height)
44         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
45         casts.
46         * tui/tui-win.c (tui_resize_all): Remove casts.
47         (tui_scroll_backward_command, tui_set_focus)
48         (tui_set_tab_width_command): Likewise.
49         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
50         * tui/tui-regs.c (tui_show_register_group): Remove cast.
51         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
52         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
53         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
54         Remove casts.
55
56 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
57
58         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
59         AArch64/ARM maintainer.
60
61 2018-10-11  Gary Benson <gbenson@redhat.com>
62
63         * interps.h (interp::m_name): Make private and mutable.
64         * interps.c (interp::~interp): Free m_name.
65
66 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
67             Simon Marchi <simark@simark.ca>
68
69         * README (`configure' options): Add documentation for new
70         "--enable-unit-tests" option.
71         * acinclude.m4: Include "selftest.m4".
72         * configure: Regenerate.
73         * configure.ac: Use "GDB_AC_SELFTEST".
74         * maint.c (maintenance_selftest): Update message informing
75         that selftests have been disabled.
76         (maintenance_info_selftests): Likewise.
77         * selftest.m4: New file.
78
79 2018-10-10  Gary Benson <gbenson@redhat.com>
80
81         * remote.c (remote_target::remote_send_printf): Add
82         missing va_end found by Coverity.
83
84 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
85
86         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
87
88 2018-10-09  Tom Tromey  <tom@tromey.com>
89
90         * configure: Rebuild.
91         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
92         * NEWS: Update --enable-ubsan documentation.
93
94 2018-10-09  Gary Benson <gbenson@redhat.com>
95
96         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
97         found by Coverity.
98
99 2018-10-08  Tom Tromey  <tom@tromey.com>
100
101         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
102         variable.
103         (riscv_fbsd_init_abi): Likewise.
104
105 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
106         * valops.c (value_struct_elt_for_reference): Rename local variable
107         to work around the shadowing a previous local warning.
108
109 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
110
111         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
112         * NEWS: Mention new FreeBSD/riscv native configuration.
113         * configure.host: Add riscv*-*-freebsd*.
114         * configure.nat: Likewise.
115         * riscv-fbsd-nat.c: New file.
116
117 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
118
119         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
120         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
121         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
122         * NEWS: Mention new FreeBSD/riscv target.
123         * configure.tgt: Add riscv*-*-freebsd*.
124         * riscv-fbsd-tdep.c: New file.
125         * riscv-fbsd-tdep.h: New file.
126
127 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
128
129         * regcache.h (struct regcache_map_entry): Note that this type can
130         be used with traditional frame caches.
131         * trad-frame.c (trad_frame_set_reg_regmap): New.
132         * trad-frame.h (trad_frame_set_reg_regmap): New.
133
134 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
135
136         PR c++/16841
137         * valops.c (get_virtual_base_offset): New function.
138         (value_struct_elt_for_reference): Use it to get virtual base offset
139         and add it in calculating class member address.
140
141 2018-10-08   John Darrington <john@darrington.wattle.id.au>
142
143     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
144       (check_producer): Check if the producer is codewarrior.
145       (producer_is_codewarrior): New function.
146       (lnp_state_machine::record_line): Ignore is_stmt flag for records
147        produced by codewarrior.
148       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
149
150 2018-10-06  Tom Tromey  <tom@tromey.com>
151
152         PR python/19399:
153         * python/py-inferior.c: Add "architecture" entry.
154         (infpy_architecture): New function.
155
156 2018-10-06  Tom Tromey  <tom@tromey.com>
157
158         PR python/21765:
159         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
160         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
161         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
162         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
163
164 2018-10-06  Tom Tromey  <tom@tromey.com>
165
166         PR build/17077:
167         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
168         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
169         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
170         #include.
171
172 2018-10-06  Tom Tromey  <tom@tromey.com>
173
174         * python/py-breakpoint.c (bppy_get_location): Handle a
175         bp_breakpoint without a location.
176
177 2018-10-06  Tom Tromey  <tom@tromey.com>
178
179         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
180         (_RegEx): Reformat help text.
181         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
182         (AnyCallerIs, AnyCallerMatches): Reformat help text.
183         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
184         text.
185         * python/lib/gdb/command/xmethods.py (InfoXMethod)
186         (EnableXMethod, DisableXMethod): Remove help indentation.
187         Capitalize meta-syntactic variables.
188         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
189         (EnableUnwinder, DisableUnwinder): Remove help indentation.
190         Capitalize meta-syntactic variables.
191         * python/lib/gdb/command/explore.py (ExploreCommand)
192         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
193         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
194         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
195         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
196         Remove help indentation.
197         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
198         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
199         (DisableFrameFilter, SetFrameFilterPriority)
200         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
201
202 2018-10-06  Tom Tromey  <tom@tromey.com>
203
204         PR tui/28819:
205         * tui/tui-io.c (gdb_wgetch): New function.
206         (tui_mld_getc, tui_getc): Use it.
207
208 2018-10-05  Tom Tromey  <tom@tromey.com>
209
210         * sol-thread.c (sol_thread_target::wait): Rename inner
211         "save_ptid".
212
213 2018-10-04  Tom Tromey  <tom@tromey.com>
214
215         * configure: Rebuild.
216         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
217
218 2018-10-04  Tom Tromey  <tom@tromey.com>
219
220         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
221         declaration of "block".
222
223 2018-10-04  Tom Tromey  <tom@tromey.com>
224
225         * common/filestuff.c (fdwalk): Remove inner declaration of
226         "result".
227
228 2018-10-04  Tom Tromey  <tom@tromey.com>
229
230         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
231         "structs_addr" and hoist declaration.
232
233 2018-10-04  Tom Tromey  <tom@tromey.com>
234
235         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
236         variable "size".
237
238 2018-10-04  Tom Tromey  <tom@tromey.com>
239
240         * mdebugread.c (parse_partial_symbols): Use std::string.
241
242 2018-10-04  Tom Tromey  <tom@tromey.com>
243
244         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
245         * p-valprint.c (pascal_val_print): Split inner "i" variable.
246         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
247         header.
248         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
249         more inner scope.
250         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
251         * varobj.c (varobj_update): Rename inner "newobj",
252         "type_changed".
253         * valprint.c (generic_emit_char): Rename inner "buf".
254         * valops.c (find_overload_match): Rename inner "temp".
255         (value_struct_elt_for_reference): Declare "v" in more inner
256         scope.
257         * v850-tdep.c (v850_push_dummy_call): Rename "len".
258         * unittests/array-view-selftests.c (run_tests): Rename inner
259         "vec".
260         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
261         header.
262         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
263         "tsv" in more inner scope.
264         (print_one_static_tracepoint_marker): Rename inner
265         "tuple_emitter".
266         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
267         (tic6x_push_dummy_call): Don't redeclare "addr".
268         * target-float.c: Declare "dto" lower.
269         * symtab.c (lookup_local_symbol): Rename inner "sym".
270         (find_pc_sect_line): Rename inner "pc".
271         * stack.c (print_frame): Don't redeclare "gdbarch".
272         (return_command): Rename inner "gdbarch".
273         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
274         "sp".
275         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
276         header.
277         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
278         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
279         scope.
280         * remote.c (remote_target::update_thread_list): Don't redeclare
281         "tp".
282         (remote_target::process_initial_stop_replies): Rename inner
283         "thread".
284         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
285         (remote_target::wait_as): Don't redeclare "stop_reply".
286         (remote_target::get_thread_local_address): Rename inner
287         "result".
288         (remote_target::get_tib_address): Likewise.
289
290         * regcache.c (cooked_read_test): Rename "regnum".
291         * record-btrace.c (cmd_record_btrace_start): Rename inner
292         "exception".
293         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
294         loop header.
295         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
296         header.
297         (ppu2spu_sniffer): Rename inner "buf".
298         * parse.c (operator_check_standard): Rename inner "type",
299         "objfile".
300         * p-valprint.c (pascal_val_print): Introduce new scope for
301         "low_bound", "high_bound".
302         * p-exp.y (yylex): Declare "i" in loop header.
303         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
304         Lower declaration of "s".
305         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
306         header.
307         (nios2_push_dummy_call): Rename "len".
308         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
309         "buf".
310         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
311         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
312         (linux_xfer_osdata_modules): Likewise.
313         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
314         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
315         (mips_o64_push_dummy_call): Likewise.
316         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
317         "op".
318         * mi/mi-main.c (list_available_thread_groups): Rename inner
319         "tuple_emitter".
320         (mi_cmd_data_read_memory): Rename inner "opts".
321         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
322         "tuple_emitter".
323         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
324         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
325         more inner scope.
326         (parse_partial_symbols): Rename inner "pst", "p", "name"
327         * main.c (captured_main_1): Rename inner "i"s.
328         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
329         "oso2".
330         * linux-tdep.c (linux_info_proc): Rename inner "filename".
331         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
332         * infrun.c (handle_no_resumed): Don't redeclare "thread".
333         (handle_signal_stop): Rename inner "gdbarch".
334         (handle_command): Declare "signum" in loop header.
335         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
336         "status".
337         (examine_prologue): Rename inner "sol" and "sof".
338         (ia64_extract_return_value): Rename inner "val".  Declare another
339         "val" in a more inner scope.
340         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
341         inner scope.
342         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
343         "except".
344         * findvar.c (default_read_var_value): Don't redeclare "addr".
345         * f-exp.y (yylex): Declare "i" in loop header.
346         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
347         Rename inner "type", "expect_type".
348         (evaluate_subexp_for_sizeof): Rename inner "pc".
349         * elfread.c (elf_symfile_read): Rename inner "abfd".
350         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
351         "bytes_read".
352         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
353         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
354         (dwarf_decode_line_header): Rename inner "lh".
355         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
356         "offset".  Declare "i" in loop header.
357         (disassemble_dwarf_expression): Rename inner "addr_size".
358         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
359         inner "result".
360         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
361         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
362         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
363         "inner_list_emitter".
364         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
365         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
366         declaration in a block.
367         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
368         * cp-valprint.c (cp_print_value_fields): Don't redeclare
369         "obstack_final_size".
370         * cp-support.c (inspect_type): Declare "i" in loop header.
371         * compile/compile.c (compile_instance::insert_symbol_error):
372         Rename inner "e".
373         * common/agent.c (agent_run_command): Remove inner "ret"
374         declaration.
375         * coffread.c (coff_symfile_read): Rename inner "name".
376         (coff_symfile_read): Rename inner "abfd".
377         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
378         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
379         "high".
380         * c-exp.y (lex_one_token): Move "len" declaration lower.
381         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
382         "gdbarch".
383         (create_exception_master_breakpoint): Likewise.  Don't redeclare
384         "b".
385         (watch_command_1): Declare "mark" later.
386         (clear_command): Don't shadow "a" or "b".
387         (delete_command): Rename inner "b".
388         (delete_trace_command): Likewise.
389         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
390         "op".
391         (arm_gdbarch_init): Remove inner "e_flags".
392         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
393         "offset" in inner blocks.
394
395 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
396
397         * dwarf-index-write.c (file_write): Don't write if the vector is
398         empty.
399
400 2018-10-05  Tom de Vries  <tdevries@suse.de>
401
402         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
403         PyArg_ParseTuple call.
404
405 2018-10-05  Tom de Vries  <tdevries@suse.de>
406
407         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
408         PyArg_ParseTuple call.
409
410 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
411
412         * psymtab.c (recursively_search_psymtabs): Reformat parameters
413         to avoid exceeding 80 characters per line limit.
414
415 2018-10-04  Tom Tromey  <tom@tromey.com>
416
417         * symfile.c (syms_from_objfile_1, finish_new_objfile)
418         (reread_symbols): Update.
419         * complaints.h (clear_complaints): Remove argument.
420         * complaints.c (enum complaint_series): Remove.
421         (series): Remove global.
422         (complaint_internal): Update.
423         (clear_complaints): Remove argument.
424
425 2018-10-04  Tom Tromey  <tom@tromey.com>
426
427         * symfile.c (symbol_file_add_with_addrs): Do not print "no
428         debugging symbols" message if there is a separate debug objfile.
429
430 2018-10-04  Tom Tromey  <tom@tromey.com>
431
432         PR cli/19551:
433         * symfile.c (symbol_file_add_with_addrs): Update output.
434         * psymtab.c (require_partial_symbols): Update output.
435
436 2018-10-04  Tom Tromey  <tom@tromey.com>
437
438         PR cli/22234:
439         * complaints.c: Emit \n.
440
441 2018-10-04  Tom Tromey  <tom@tromey.com>
442
443         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
444         (separate_debug_file_exists, find_separate_debug_file)
445         (add_symbol_file_command, reread_symbols, allocate_symtab)
446         (allocate_compunit_symtab): Use filtered printing, not
447         unfiltered.
448         * psymtab.c (require_partial_symbols, dump_psymtab)
449         (allocate_psymtab): Use filtered printing, not unfiltered.
450
451 2018-10-04  Tom Tromey  <tom@tromey.com>
452
453         * complaints.c (complaint_internal): Correctly check complaint
454         count.
455
456 2018-10-04  Tom Tromey  <tom@tromey.com>
457
458         * complaints.h (struct complaints): Remove declaration.
459         * complaints.c (clear_complaints): Remove an unused variable.
460
461 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
462
463         * MAINTAINERS (Write After Approval): Add self.
464
465 2018-10-03  Tom Tromey  <tom@tromey.com>
466
467         * guile/scm-value.c (gdbscm_value_to_string): Initialize
468         "buffer_contents".
469         * coffread.c (coff_symtab_read): Initialize "newobj".
470
471 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
472
473         * dwarf2read.c (read_func_scope): Remove struct keyword in
474         range-based for.
475
476 2018-10-03  Tom Tromey  <tom@tromey.com>
477
478         * README: Mention --enable-ubsan.
479         * NEWS: Mention --enable-ubsan.
480         * acinclude.m4: Include sanitize.m4.
481         * configure: Rebuild.
482         * configure.ac: Call AM_GDB_UBSAN.
483         * sanitize.m4: New file.
484
485 2018-10-03  Tom Tromey  <tom@tromey.com>
486
487         * expression.h (enum exp_opcode): Use uint8_t as base type.
488         * expprint.c (op_name): Handle invalid opcodes.
489
490 2018-10-03  Tom Tromey  <tom@tromey.com>
491
492         * parse.c (prefixify_expression): Add assert.
493         (parse_exp_in_context_1): Throw exception if the expression is
494         empty.
495
496 2018-10-03  Tom Tromey  <tom@tromey.com>
497
498         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
499
500 2018-10-03  Tom Tromey  <tom@tromey.com>
501
502         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
503
504 2018-10-03  Tom Tromey  <tom@tromey.com>
505
506         * dwarf2read.c (read_subrange_type): Make "negative_mask"
507         unsigned.
508
509 2018-10-03  Tom Tromey  <tom@tromey.com>
510
511         * findvar.c (extract_integer): Do work in an unsigned type.
512
513 2018-10-03  Tom Tromey  <tom@tromey.com>
514
515         * common/enum-flags.h (enum_flags::operator~): Add static assert.
516         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
517         base type.
518         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
519         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
520         type.
521         * c-lang.h (enum c_string_type_values): Use unsigned as base
522         type.
523         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
524
525 2018-10-03  Tom Tromey  <tom@tromey.com>
526
527         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
528         <~dwarf2_frame_state_reg_info>: Update.
529         <dwarf2_frame_state_reg_info>: Update.
530         <alloc_regs>: Add assertion.  Update.
531         <reg>: Now a std::vector.
532         <num_regs>: Remove.
533         <swap>: Update.
534         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
535         (execute_cfa_program_test, dwarf2_frame_cache): Update.
536
537 2018-10-03  Tom Tromey  <tom@tromey.com>
538
539         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
540
541 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
542
543         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
544
545 2018-10-02  Tom Tromey  <tom@tromey.com>
546
547         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
548
549 2018-10-02  John Darrington <john@darrington.wattle.id.au>
550
551         * NEWS: Mention changed commands.
552         * ser-uds.c: New file.
553         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
554         * configure: Regenerate.
555         * Makefile.in: Add new file.
556         * serial.c (serial_open): Check if filename is a socket
557           and lookup the appropriate interface accordingly.
558
559 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
560
561         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
562         define.
563         (AARCH64_EXTRA_MAGIC): Likewise.
564         (AARCH64_FPSIMD_MAGIC): Likewise.
565         (AARCH64_SVE_MAGIC): Likewise.
566         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
567         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
568         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
569         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
570         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
571         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
572         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
573         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
574         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
575         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
576         (read_aarch64_ctx): Add function.
577         (aarch64_linux_sigframe_init): Detect FP registers.
578
579 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
580
581         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
582         (AARCH64_D0_REGNUM): Likewise.
583         (AARCH64_S0_REGNUM): Likewise.
584         (AARCH64_H0_REGNUM): Likewise.
585         (AARCH64_B0_REGNUM): Likewise.
586         (AARCH64_SVE_V0_REGNUM): Likewise.
587         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
588         (AARCH64_D0_REGNUM): Likewise.
589         (AARCH64_S0_REGNUM): Likewise.
590         (AARCH64_H0_REGNUM): Likewise.
591         (AARCH64_B0_REGNUM): Likewise.
592         (AARCH64_SVE_V0_REGNUM): Likewise.
593
594 2018-10-01  Gary Benson <gbenson@redhat.com>
595
596         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
597         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
598         prfpregset_t instead of gdb_prfpregset_t.
599         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
600         * configure, config.in: Rebuild.
601
602 2018-10-01  Gary Benson <gbenson@redhat.com>
603
604         * common/gdb_proc_service.h: New file, factored out from...
605         * gdb_proc_service.h: Moved common code to the above file.
606         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
607
608 2018-10-01  Gary Benson <gbenson@redhat.com>
609
610         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
611         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
612
613 2018-10-01  Gary Benson <gbenson@redhat.com>
614
615         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
616         (AC_CHECK_HEADERS): Check for linux/elf.h.
617         * configure, config.in: Rebuild.
618         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
619         doesn't define elf_fpregset_t.
620
621 2018-10-01  Gary Benson <gbenson@redhat.com>
622
623         * gdb_proc_service.h: Whitespace change.
624
625 2018-10-01  Tom Tromey  <tom@tromey.com>
626
627         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
628         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
629         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
630
631 2018-10-01  Tom Tromey  <tom@tromey.com>
632
633         * README: Minor change.
634
635 2018-09-30  Pedro Alves  <palves@redhat.com>
636
637         * darwin-nat-info.c (darwin_debug_regions_recurse)
638         (info_mach_exceptions_command): Remove unused local variables.
639         * darwin-nat.c (darwin_decode_notify_message)
640         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
641         (darwin_stop_inferior, darwin_setup_exceptions)
642         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
643         (darwin_nat_target::attach, darwin_nat_target::detach)
644         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
645         local variables.
646         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
647         variables.
648
649 2018-09-29  Tom Tromey  <tom@tromey.com>
650
651         * README: Remove some leftover text.
652
653 2018-09-29  Tom Tromey  <tom@tromey.com>
654
655         * PROBLEMS: Rewrite.
656         * README: Update.
657
658 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
659
660         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
661         case with explicit breakpoint kind.
662         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
663         'additional_info' and related logic.
664         (riscv_debug_breakpoints): New variable.
665         (riscv_breakpoint_kind_from_pc): Use the length of the existing
666         instruction to determine the breakpoint kind.
667         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
668         flag.  Update description of 'set/show riscv
669         use-compressed-breakpoints' flag.
670
671 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
672
673         (NEWS): Mention changes to frame related commands.
674         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
675         (add_prefix_cmd_suppress_notification): New function.
676         (add_com_suppress_notification): Call
677         add_cmd_suppress_notification.
678         * command.h (add_cmd_suppress_notification): Declare.
679         (add_prefix_cmd_suppress_notification): Declare.
680         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
681         (parse_frame_specification): Moved from stack.c, with
682         simplification to handle a single argument.
683         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
684         switch to the selected frame.  Add a header comment.
685         * stack.c: Remove 'safe-ctype.h' include.
686         (find_frame_for_function): Add declaration.
687         (find_frame_for_address): New function.
688         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
689         (frame_selection_by_function_completer): New function.
690         (info_frame_command): Rename to...
691         (info_frame_command_core): ...this, and update parameter types.
692         (select_frame_command): Rename to...
693         (select_frame_command_core): ...this, and update parameter types.
694         (frame_command): Rename to...
695         (frame_command_core): ...this, and update parameter types.
696         (class frame_command_helper): New class to wrap implementations of
697         frame related sub-commands.
698         (frame_apply_cmd_list): New static global.
699         (frame_cmd_list): Make static.
700         (select_frame_cmd_list): New global for sub-commands.
701         (info_frame_cmd_list): New global for sub-commands.
702         (_initialize_stack): Register sub-commands for 'frame',
703         'select-frame', and 'info frame'.  Update 'frame apply' commands
704         to use frame_apply_cmd_list.  Move function local static
705         frame_apply_list to file static frame_apply_cmd_list for
706         consistency.
707         * stack.h (select_frame_command): Delete declarationn.
708         (select_frame_for_mi): Declare new function.
709
710 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
711
712         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
713         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
714         and NOP.
715
716 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
717
718         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
719
720 2018-09-26  Tom Tromey  <tom@tromey.com>
721
722         * valops.c (auto_abandon): Remove dead code.
723
724 2018-09-26  Tom Tromey  <tom@tromey.com>
725
726         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
727
728 2018-09-24  Tom Tromey  <tom@tromey.com>
729
730         * common/pathstuff.c (get_standard_cache_dir): Make
731         "xdg_cache_home" and "home" const.
732         * top.c (init_history): Make "tmpenv" const.
733         * main.c (get_init_files): Make "homedir" const.
734
735 2018-09-23  Tom Tromey  <tom@tromey.com>
736
737         PR python/18852:
738         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
739
740 2018-09-23  Tom Tromey  <tom@tromey.com>
741
742         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
743         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
744         * python/python-internal.h (gdbpy_handle_exception): Declare.
745         * python/py-utils.c (gdbpy_handle_exception): New function.
746
747 2018-09-23  Tom Tromey  <tom@tromey.com>
748
749         PR python/17284:
750         * python/py-type.c (typy_template_argument): Check for negative
751         argument number.
752
753 2018-09-23  Tom Tromey  <tom@tromey.com>
754
755         PR python/14062:
756         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
757
758 2018-09-23  Tom Tromey  <tom@tromey.com>
759
760         PR python/18170:
761         * python/py-value.c (valpy_int): Allow conversion from pointer
762         type.
763
764 2018-09-23  Tom Tromey  <tom@tromey.com>
765
766         PR python/20126:
767         * python/py-value.c (valpy_int): Respect type sign.
768
769 2018-09-23  Tom Tromey  <tom@tromey.com>
770
771         PR python/18352;
772         * python/py-value.c (valpy_float): Allow conversions from int or
773         char.
774         (valpy_int, valpy_long): Allow conversions from float.
775
776 2018-09-23  Tom Tromey  <tom@tromey.com>
777
778         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
779         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
780
781 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
782
783         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
784         __sighndlr.
785         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
786
787 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
788
789         * windows-nat.c (windows_nat_target::wait): Remove a spurious
790         target_terminal::ours().
791
792 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
793
794         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
795         of vl to ULONGEST.
796
797 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
798
799         * breakpoint.c (update_inserted_breakpoint_locations): Remove
800         redundant condition.
801
802 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
803
804         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
805
806         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
807         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
808         * sol-thread.c (ps_pdmodel): Don't guard definition.
809
810         * procfs.c: Fix formatting.
811
812         * procfs.c (sysset_t_alloc): Remove.
813         (create_procinfo): Use XNEW instead of sysset_t_alloc.
814         (procfs_debug_inferior): Likewise.
815         (procfs_set_exec_trap): Likewise.
816         (proc_set_traced_sysentry): Don't allocate argp dynamically.
817         (proc_set_traced_sysexit): Likewise.
818
819         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
820         (dead_procinfo): Likewise.
821         (proc_warn): Likewise.
822         (proc_error): Likewise.
823         (proc_get_LDT_entry): Likewise.
824         (do_attach): Likewise.
825         (procfs_target::pid_to_str): Likewise.
826         (iterate_over_mappings): Likewise.
827
828         * procfs.c (create_procinfo): Fix ARI warning.
829         (proc_get_status): Likewise.
830         (proc_stop_process): Likewise.
831         (proc_run_process): Likewise.
832         (proc_kill): Likewise.
833         (proc_get_LDT_entry): Likewise.
834         (procfs_find_LDT_entry): Likewise.
835         (proc_update_threads): Likewise.
836         (proc_iterate_over_threads): Likewise.
837         (do_attach): Likewise.
838         (procfs_xfer_memory): Likewise.
839         (invalidate_cache): Likewise.
840         (procfs_target::resume): Likewise.
841         (procfs_init_inferior): Likewise.
842         (procfs_set_exec_trap): Likewise.
843         (procfs_target::thread_alive): Likewise.
844         (procfs_target::pid_to_exec_file): Likewise.
845         (iterate_over_mappings): Likewise.
846         (procfs_target::make_corefile_notes): Likewise.
847         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
848
849         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
850         (procfs_find_LDT_entry): Likewise.
851         * sol-thread.c (ps_lgetLDT): Likewise.
852
853 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
854
855         PR tdep/17903
856         * procfs.c (procfs_target): Declare pid_to_exec_file.
857         (procfs_target::pid_to_exec_file): New.
858
859 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
860
861         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
862         renaming.
863         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
864         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
865
866 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
867
868         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
869         (supply_fpregset, fill_fpregset): Move ...
870         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
871         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
872         Remove references to ioctl-based procfs.
873         Include <sys/reg.h>.
874         Remove PR_MODEL_NATIVE guards.
875         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
876         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
877
878 2018-09-19  Xavier Roirand  <roirand@adacore.com>
879
880         PR gdb/20981:
881         * solib-darwin.c (darwin_get_dyld_bfd): New function.
882         (darwin_solib_get_all_image_info_addr_at_init): Update call.
883         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
884
885 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
886
887         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
888         (fbsd_print_sockaddr_in6): Likewise.
889
890 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
891             Chris January  <chris.january@arm.com>
892
893         * eval.c (skip_undetermined_arglist): Skip argument list helper.
894         (evaluate_subexp_standard): Return a dummy type when
895         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
896         OP_F77_UNDETERMINED_ARGLIST case.
897         * expression.h (enum noside): Update comment.
898
899 2018-09-19  George Vasick <george.vasick@oracle.com>
900
901         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
902
903 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
904             April Chin <april.chin@oracle.com>
905             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
906
907         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
908         uint_t lwpid_t.
909         (create_procinfo): Print pids in /proc without leading zeros.
910
911 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
912
913         * nios2-tdep.c (nios2_gcc_target_options): New.
914         (nios2_gdb_arch_init): Install new hook.
915
916 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
917
918         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
919         New file.
920         * update-gnulib.sh: Apply patch.
921         * configure: Re-generate.
922
923 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
924
925         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
926         description.  Make "info proc" command descriptions more
927         consistent.
928
929 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
930
931         * NEWS: Mention 'info proc files' command.
932
933 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
934
935         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
936         descriptors for IP_FILES and IP_ALL.
937
938 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
939
940         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
941         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
942         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
943         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
944         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
945         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
946         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
947         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
948         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
949         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
950         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
951         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
952         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
953         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
954         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
955         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
956         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
957         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
958         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
959         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
960         (struct fbsd_sockaddr_un): New types.
961         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
962         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
963         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
964         (fbsd_core_info_proc_files): New functions.
965         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
966         IP_ALL.
967         * fbsd-tdep.h (fbsd_info_proc_files_header)
968         (fbsd_info_proc_files_entry): New.
969
970 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
971
972         * defs.h (enum info_proc_what) [IP_FILES]: New value.
973         * infcmd.c (info_proc_cmd_files): New function.
974         (_initialize_infcmd): Register 'info proc files' command.
975
976 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
977
978         * gnulib/aclocal-m4-deps.mk: Re-generate.
979         * gnulib/aclocal.m4: Re-generate.
980         * gnulib/config.in: Re-generate.
981         * gnulib/configure: Re-generate.
982         * gnulib/import/Makefile.am: Re-generate.
983         * gnulib/import/Makefile.in: Re-generate.
984         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
985         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
986         * gnulib/import/arpa_inet.in.h: New file.
987         * gnulib/import/inet_ntop.c: New file.
988         * gnulib/import/m4/arpa_inet_h.m4: New file.
989         * gnulib/import/m4/inet_ntop.m4: New file.
990         * gnulib/import/m4/netinet_in_h.m4: New file.
991         * gnulib/import/m4/socklen.m4: New file.
992         * gnulib/import/m4/sockpfaf.m4: New file.
993         * gnulib/import/m4/stdalign.m4: New file.
994         * gnulib/import/m4/sys_uio_h.m4: New file.
995         * gnulib/import/netinet_in.in.h: New file.
996         * gnulib/import/stdalign.in.h: New file.
997         * gnulib/import/sys_socket.c: New file.
998         * gnulib/import/sys_socket.in.h: New file.
999         * gnulib/import/sys_uio.in.h: New file.
1000         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1001         module.
1002
1003 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1004
1005         * gnulib/aclocal-m4-deps.mk: New file.
1006         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1007         deterministically.
1008
1009 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1010
1011         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1012         KVE_PATH.
1013
1014 2018-09-18  Tom Tromey  <tom@tromey.com>
1015
1016         * compile/compile-object-load.c (struct
1017         link_hash_table_cleanup_data): Add constructor and destructor.
1018         Use DISABLE_COPY_AND_ASSIGN.
1019         (~link_hash_table_cleanup_data): Rename from
1020         link_hash_table_free.  Now a destructor.
1021         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1022
1023 2018-09-18  Tom Tromey  <tom@tromey.com>
1024
1025         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1026         * compile/compile-object-load.c (struct munmap_list): Move to
1027         header file.
1028         (munmap_list::add): Rename from munmap_list_add; rewrite.
1029         (munmap_list::~munmap_list): Rename from munmap_list_free.
1030         (munmap_listp_free_cleanup): Remove.
1031         (compile_object_load): Update.
1032         * compile/compile-object-load.h (struct munmap_list): Move from
1033         compile-object-load.c.  Rewrite.
1034
1035 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1036
1037         * aarch64-tdep.c (pass_in_v): Use register size.
1038         (aarch64_extract_return_value): Likewise.
1039         (aarch64_store_return_value): Likewise.
1040
1041 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1042
1043         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1044         rlim_t.
1045
1046 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1047
1048         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1049         Fix short help line.
1050
1051 2018-09-17  Tom Tromey  <tom@tromey.com>
1052
1053         PR python/20445:
1054         * configure: Rebuild.
1055         * configure.ac: Conditionally use -DNDEBUG for Python.
1056
1057 2018-09-17  Tom Tromey  <tom@tromey.com>
1058
1059         * configure: Rebuild.
1060         * configure.ac: Use gmp as a library dependency when checking for
1061         mpfr.
1062
1063 2018-09-17  Pedro Alves  <palves@redhat.com>
1064
1065         * python/py-inferior.c (find_inferior_object): Delete.
1066
1067 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1068
1069         * compile/compile-cplus-types.c
1070         (compile_cplus_instance::enter_scope): Don't use new_scope after
1071         std::move.
1072
1073 2018-09-17  Tom Tromey  <tom@tromey.com>
1074
1075         * common/pathstuff.c (get_standard_cache_dir): Use
1076         ~/Library/Caches on macOS.
1077         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1078
1079 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1080
1081         PR python/23669
1082         * breakpoint.c (commands_cmd_element): New.
1083         (_initialize_breakpoint): Assign commands_cmd_element.
1084         * breakpoint.h (commands_cmd_element): New.
1085         * cli/cli-script.c (while_cmd_element, if_command,
1086         define_cmd_element): New.
1087         (command_name_equals): Remove.
1088         (process_next_line): Compare commands by pointer, not by name.
1089         (_initialize_cli_script): Assign the various cmd_list_element
1090         variables.
1091         * compile/compile.c (compile_cmd_element): New.
1092         (_initialize_compile): Assign compile_cmd_element.
1093         * compile/compile.h (compile_cmd_element): New.
1094         * guile/guile.c (guile_cmd_element): New.
1095         (install_gdb_commands): Assign guile_cmd_element.
1096         * guile/guile.h (guile_cmd_element): New.
1097         * python/python.c (python_cmd_element): New.
1098         (_initialize_python): Assign python_cmd_element.
1099         * python/python.h (python_cmd_element): New.
1100         * tracepoint.c (while_stepping_cmd_element): New.
1101         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1102         * tracepoint.h (while_stepping_cmd_element): New.
1103
1104 2018-09-17  Tom Tromey  <tom@tromey.com>
1105
1106         * infrun.c (save_infcall_suspend_state): Return
1107         infcall_suspend_state_up.
1108         (save_infcall_control_state): Return infcall_control_state_up.
1109         * inferior.h (save_infcall_suspend_state)
1110         (save_infcall_control_state): Declare later.  Return unique
1111         pointers.
1112
1113 2018-09-17  Tom Tromey  <tom@tromey.com>
1114
1115         * infrun.c (struct stop_context): Declare constructor,
1116         destructor, "changed" method.
1117         (stop_context::stop_context): Rename from save_stop_context.
1118         (stop_context::~stop_context): Rename from
1119         release_stop_context_cleanup.
1120         (normal_stop): Update.
1121         (stop_context::changed): Rename from stop_context_changed.  Return
1122         bool.
1123
1124 2018-09-17  Tom Tromey  <tom@tromey.com>
1125
1126         * inferior.h (struct infcall_suspend_state_deleter): New.
1127         (infcall_suspend_state_up): New typedef.
1128         (struct infcall_control_state_deleter): New.
1129         (infcall_control_state_up): New typedef.
1130         (make_cleanup_restore_infcall_suspend_state)
1131         (make_cleanup_restore_infcall_control_state): Don't declare.
1132         * infcall.c (call_function_by_hand_dummy): Update.
1133         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1134         (make_cleanup_restore_infcall_suspend_state): Remove.
1135         (do_restore_infcall_control_state_cleanup)
1136         (make_cleanup_restore_infcall_control_state): Remove.
1137
1138 2018-09-17  Tom Tromey  <tom@tromey.com>
1139
1140         * gdbthread.h (struct thread_control_state): Add initializer.
1141         (class thread_info) <control>: Remove initializer.
1142         * inferior.h (struct inferior_control_state): Add initializer.
1143         (class inferior) <control>: Remove initializer.
1144         (exit_inferior_1): Update.
1145         * infrun.c (struct infcall_control_state): Add constructors.
1146         (save_infcall_control_state): Use new.
1147         (restore_infcall_control_state, discard_infcall_control_state):
1148         Use delete.
1149
1150 2018-09-17  Tom Tromey  <tom@tromey.com>
1151
1152         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1153         unique_ptr.
1154         <siginfo_data>: Now a unique_xmalloc_ptr.
1155         (save_infcall_suspend_state, restore_infcall_suspend_state)
1156         (discard_infcall_suspend_state)
1157         (get_infcall_suspend_state_regcache): Update.
1158
1159 2018-09-17  Tom Tromey  <tom@tromey.com>
1160
1161         * gdbthread.h (struct thread_suspend_state): Add initializers.
1162         (class thread_info) <suspend>: Remove initializer.
1163         * infrun.c (struct infcall_suspend_state): Add initializers.
1164         (save_infcall_suspend_state): Use new.
1165         (discard_infcall_suspend_state): Use delete.
1166
1167 2018-09-16  Tom Tromey  <tom@tromey.com>
1168
1169         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1170         Remove.
1171         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1172         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1173         (py_varobj_iter_new): Likewise.
1174         (py_varobj_get_iterator): Use gdbpy_ref.
1175
1176 2018-09-16  Tom Tromey  <tom@tromey.com>
1177
1178         * python/py-threadevent.c (py_get_event_thread): Simplify.
1179         * python/py-inferior.c (infpy_thread_from_thread_handle):
1180         Return immediately after calling thread_to_thread_object.  Use
1181         Py_RETURN_NONE.
1182         (thread_to_thread_object): Set the exception on a NULL return.
1183
1184 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1185
1186         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1187
1188 2018-09-16  Tom Tromey  <tom@tromey.com>
1189
1190         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1191         Remove.
1192
1193 2018-09-16  Tom Tromey  <tom@tromey.com>
1194
1195         * python/python-internal.h (thread_to_thread_object): Change
1196         return type.
1197         * python/py-inferior.c (thread_to_thread_object): Return a new
1198         reference.
1199         (infpy_thread_from_thread_handle): Update.
1200         * python/py-infthread.c (gdbpy_selected_thread): Update.
1201         * python/py-stopevent.c (create_stop_event_object): Update.
1202         * python/py-threadevent.c (py_get_event_thread): Return a new
1203         reference.
1204         (py_get_event_thread): Update.
1205         * python/py-event.h (py_get_event_thread): Change return type.
1206         * python/py-continueevent.c (create_continue_event_object):
1207         Update.
1208
1209 2018-09-16  Tom Tromey  <tom@tromey.com>
1210
1211         * python/py-progspace.c (pspy_get_objfiles): Update.
1212         * python/python-internal.h (objfile_to_objfile_object): Change
1213         return type.
1214         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1215         Update.
1216         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1217         Update.
1218         * python/python.c (gdbpy_get_current_objfile): Update.
1219         (gdbpy_objfiles): Update.
1220         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1221         Update.
1222         (objfile_to_objfile_object): Return a new reference.
1223         * python/py-symtab.c (stpy_get_objfile): Update.
1224         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1225         Update.
1226
1227 2018-09-16  Tom Tromey  <tom@tromey.com>
1228
1229         * python/py-inferior.c (infpy_get_progspace): Update.
1230         * python/python-internal.h (pspace_to_pspace_object): Change
1231         return type.
1232         * python/py-newobjfileevent.c
1233         (create_clear_objfiles_event_object): Update.
1234         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1235         Update.
1236         * python/python.c (gdbpy_get_current_progspace): Update.
1237         (gdbpy_progspaces): Update.
1238         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1239         reference.
1240         * python/py-objfile.c (objfpy_get_progspace): Update.
1241         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1242         Update.
1243
1244 2018-09-16  Tom Tromey  <tom@tromey.com>
1245
1246         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1247         (solib_name, block_for_pc, find_pc_line): New functions.
1248         (execute_unwinders): Update.
1249         * python/py-block.c (gdbpy_block_for_pc): Remove.
1250         * python/py-inferior.c (infpy_get_progspace): New function.
1251         (inferior_object_getset) <progspace>: Add.
1252         * python/py-progspace.c (pspy_objfiles): Rewrite.
1253         (pspy_solib_name, pspy_block_for_pc)
1254         (pspy_find_pc_line, pspy_is_valid): New functions.
1255         (progspace_object_methods): Add entries for solib_name,
1256         block_for_pc, find_pc_line, is_valid.
1257         * python/python-internal.h (gdbpy_block_for_pc)
1258         (build_objfiles_list): Don't declare.
1259         * python/python.c: Don't include solib.h.
1260         (gdbpy_solib_name, gdbpy_find_pc_line)
1261         (gdbpy_get_current_progspace, build_objfiles_list)
1262         (gdbpy_objfiles): Remove.
1263         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1264         solib_name, find_pc_line>: Remove entries.
1265
1266 2018-09-16  Tom Tromey  <tom@tromey.com>
1267
1268         * top.c (new_ui_command): Use GNU style for metasyntactic
1269         variables.
1270         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1271         variables.
1272         * maint.c (maintenance_translate_address): Remove "<>" around
1273         text.
1274         * interps.c (interpreter_exec_cmd): Use GNU style for
1275         metasyntactic variables.
1276         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1277         metasyntactic variables.
1278         * tracepoint.c (tfind_range_command): Use GNU style for
1279         metasyntactic variables.
1280         (tfind_outside_command): Likewise.
1281         (_initialize_tracepoint): Likewise.
1282         * remote.c (extended_remote_target::create_inferior): Use GNU
1283         style for metasyntactic variables.
1284         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1285         metasyntactic variables.
1286         (adi_assign_command): Likewise.
1287
1288 2018-09-16  Tom Tromey  <tom@tromey.com>
1289
1290         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1291         metasyntactic variables.  Print message if no disassembler options
1292         are available.
1293
1294 2018-09-15  Tom Tromey  <tom@tromey.com>
1295
1296         * infcmd.c (get_inferior_args): Return const char *.
1297         * inferior.h (get_inferior_args): Return type now const.
1298         * linux-tdep.c (linux_fill_prpsinfo): Update.
1299         * procfs.c (procfs_target::make_corefile_notes): Update.
1300
1301 2018-09-07  Tom Tromey  <tom@tromey.com>
1302
1303         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1304         inside the TRY.
1305
1306 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1307
1308         * nios2-tdep.c (nios2_type_align): New.
1309         (nios2_gdb_arch_init): Install type_align hook.
1310
1311 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1312
1313         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1314         type that is neither object file owned, nor gdbarch owned.
1315         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1316         gdbarch is non-NULL.
1317         (alloc_type_instance): Allocate non-objfile owned types on the
1318         gdbarch obstack.
1319         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1320         using TYPE_ALLOC to ensure memory is allocated on the correct
1321         obstack.
1322         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1323         obstack, or the gdbarch obstack.
1324         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1325
1326 2018-09-14  Tom Tromey  <tom@tromey.com>
1327
1328         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1329         block.
1330
1331 2018-09-14  Tom Tromey  <tom@tromey.com>
1332
1333         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1334
1335 2018-09-13  Tom Tromey  <tom@tromey.com>
1336
1337         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1338         static.
1339
1340 2018-09-13  Tom Tromey  <tom@tromey.com>
1341
1342         * exec.c (try_open_exec_file): Use std::string.
1343
1344 2018-09-13  Tom Tromey  <tom@tromey.com>
1345
1346         * utils.h (gdb_bfd_errmsg): Return std::string.
1347         * exec.c (exec_file_attach): Update.
1348         * compile/compile-object-load.c (compile_object_load): Update.
1349         * utils.c (gdb_bfd_errmsg): Return std::string.
1350
1351 2018-09-13  Tom Tromey  <tom@tromey.com>
1352
1353         * procfs.c (struct procinfo_deleter): New.
1354         (procinfo_up): New typedef.
1355         (do_destroy_procinfo_cleanup): Remove.
1356         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1357
1358 2018-09-13  Tom Tromey  <tom@tromey.com>
1359
1360         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1361
1362 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1363 2018-09-13  Tom Tromey  <tom@tromey.com>
1364
1365         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1366         (pspy_get_objfiles): New function.
1367         (progspace_object_methods): New.
1368         (pspace_object_type): Add tp_methods callback.
1369         * python/python-internal.h (build_objfiles_list): New
1370         declaration.
1371         * python/python.c (build_objfiles_list): New function.
1372         (gdbpy_objfiles): Implement using build_objfiles_list.
1373         * NEWS: Mention the Progspace.objfiles method.
1374
1375 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1376
1377         * python/py-inferior.c (infpy_get_progspace): New function.
1378         (inferior_object_getset): Add progspace property.
1379         * NEWS: Mention the new property.
1380
1381 2018-09-13  Tom Tromey  <tom@tromey.com>
1382
1383         PR rust/23650:
1384         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1385
1386 2018-09-13  Tom Tromey  <tom@tromey.com>
1387
1388         PR rust/23626:
1389         * rust-lang.c (rust_enum_variant): Now static.
1390         (rust_empty_enum_p): New function.
1391         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1392         Handle empty enum.
1393
1394 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1395
1396         * python/py-inferior.c (infpy_repr): New.
1397         (inferior_object_type): Register infpy_repr.
1398         * python/py-objfile.c (objfpy_repr): New.
1399         (objfile_object_type): Register objfpy_repr.
1400
1401 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1402
1403         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1404
1405 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1406
1407         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1408         typo.
1409
1410 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1411
1412         * common/common-utils.c: Don't include '<sys/stat.h>'.
1413         (is_regular_file): Move to...
1414         * common/filestuff.c (is_regular_file): ... here.
1415         * common/common-utils.h (is_regular_file): Move to...
1416         * common/filestuff.h (is_regular_file): ... here.
1417
1418 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1419
1420         * skip.c (debug_skip): New variable.
1421         (skiplist_entry::do_skip_file_p): Add debug output.
1422         (skiplist_entry::do_skip_gfile_p): Likewise.
1423         (skiplist_entry::skip_function_p): Likewise.
1424         (_initialize_step_skip): Create debug command.
1425         * NEWS: Mention set/show debug skip.
1426
1427 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1428
1429         * darwin-nat.c (should_disable_startup_with_shell):
1430         New function.
1431         (darwin_nat_target::create_inferior): Add call.
1432
1433 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1434
1435         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1436         inf_port, msg_state>: Initialize.
1437         (struct darwin_thread_info) <signaled, single_step>: Change
1438         type and initialize.
1439         (struct darwin_thread_info) <event>: Initialize.
1440
1441 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1442
1443         PR gdb/23555
1444         PR gdb/23558
1445         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1446         guesses.
1447
1448 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1449
1450         Revert:
1451         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1452
1453         PR gdb/23555
1454         PR gdb/23558
1455         * gnulib/aclocal.m4: Regenerate.
1456         * gnulib/config.in: Regenerate.
1457         * gnulib/configure: Regenerate.
1458         * gnulib/import/Makefile.am: Update.
1459         * gnulib/import/Makefile.in: Update.
1460         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1461         * gnulib/import/_Noreturn.h: ... this.
1462         * gnulib/import/alloca.in.h: Update.
1463         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1464         * gnulib/import/arg-nonnull.h: ... this.
1465         * gnulib/import/assure.h: Update.
1466         * gnulib/import/at-func.c: Update.
1467         * gnulib/import/basename-lgpl.c: Update.
1468         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1469         * gnulib/import/c++defs.h: ... this.
1470         * gnulib/import/canonicalize-lgpl.c: Update.
1471         * gnulib/import/cdefs.h: Update.
1472         * gnulib/import/chdir-long.c: Update.
1473         * gnulib/import/chdir-long.h: Update.
1474         * gnulib/import/cloexec.c: Update.
1475         * gnulib/import/cloexec.h: Update.
1476         * gnulib/import/close.c: Update.
1477         * gnulib/import/closedir.c: Update.
1478         * gnulib/import/config.charset: Update.
1479         * gnulib/import/dirent-private.h: Update.
1480         * gnulib/import/dirent.in.h: Update.
1481         * gnulib/import/dirfd.c: Update.
1482         * gnulib/import/dirname-lgpl.c: Update.
1483         * gnulib/import/dirname.h: Update.
1484         * gnulib/import/dosname.h: Update.
1485         * gnulib/import/dup-safer-flag.c: Update.
1486         * gnulib/import/dup-safer.c: Update.
1487         * gnulib/import/dup.c: Update.
1488         * gnulib/import/dup2.c: Update.
1489         * gnulib/import/errno.in.h: Update.
1490         * gnulib/import/error.c: Update.
1491         * gnulib/import/error.h: Update.
1492         * gnulib/import/exitfail.c: Update.
1493         * gnulib/import/exitfail.h: Update.
1494         * gnulib/import/extra/update-copyright: Update.
1495         * gnulib/import/fchdir.c: Update.
1496         * gnulib/import/fcntl.c: Update.
1497         * gnulib/import/fcntl.in.h: Update.
1498         * gnulib/import/fd-hook.c: Update.
1499         * gnulib/import/fd-hook.h: Update.
1500         * gnulib/import/fd-safer-flag.c: Update.
1501         * gnulib/import/fd-safer.c: Update.
1502         * gnulib/import/fdopendir.c: Update.
1503         * gnulib/import/filename.h: Update.
1504         * gnulib/import/filenamecat-lgpl.c: Update.
1505         * gnulib/import/filenamecat.h: Update.
1506         * gnulib/import/flexmember.h: Update.
1507         * gnulib/import/float+.h: Update.
1508         * gnulib/import/float.c: Update.
1509         * gnulib/import/float.in.h: Update.
1510         * gnulib/import/fnmatch.c: Update.
1511         * gnulib/import/fnmatch.in.h: Update.
1512         * gnulib/import/fnmatch_loop.c: Update.
1513         * gnulib/import/fpucw.h: Update.
1514         * gnulib/import/frexp.c: Update.
1515         * gnulib/import/frexpl.c: Update.
1516         * gnulib/import/fstat.c: Update.
1517         * gnulib/import/fstatat.c: Update.
1518         * gnulib/import/getcwd-lgpl.c: Update.
1519         * gnulib/import/getcwd.c: Update.
1520         * gnulib/import/getdtablesize.c: Update.
1521         * gnulib/import/getlogin_r.c: Update.
1522         * gnulib/import/getprogname.c: Update.
1523         * gnulib/import/getprogname.h: Update.
1524         * gnulib/import/gettext.h: Update.
1525         * gnulib/import/gettimeofday.c: Update.
1526         * gnulib/import/glob-libc.h: Update.
1527         * gnulib/import/glob.c: Update.
1528         * gnulib/import/glob.in.h: Update.
1529         * gnulib/import/glob_internal.h: Update.
1530         * gnulib/import/glob_pattern_p.c: Update.
1531         * gnulib/import/globfree.c: Update.
1532         * gnulib/import/hard-locale.c: Update.
1533         * gnulib/import/hard-locale.h: Update.
1534         * gnulib/import/intprops.h: Update.
1535         * gnulib/import/inttypes.in.h: Update.
1536         * gnulib/import/isnan.c: Update.
1537         * gnulib/import/isnand-nolibm.h: Update.
1538         * gnulib/import/isnand.c: Update.
1539         * gnulib/import/isnanl-nolibm.h: Update.
1540         * gnulib/import/isnanl.c: Update.
1541         * gnulib/import/itold.c: Update.
1542         * gnulib/import/libc-config.h: Update.
1543         * gnulib/import/limits.in.h: Update.
1544         * gnulib/import/localcharset.c: Update.
1545         * gnulib/import/localcharset.h: Update.
1546         * gnulib/import/localtime-buffer.c: Update.
1547         * gnulib/import/localtime-buffer.h: Update.
1548         * gnulib/import/lstat.c: Update.
1549         * gnulib/import/m4/00gnulib.m4: Update.
1550         * gnulib/import/m4/__inline.m4: Update.
1551         * gnulib/import/m4/absolute-header.m4: Update.
1552         * gnulib/import/m4/alloca.m4: Update.
1553         * gnulib/import/m4/builtin-expect.m4: Update.
1554         * gnulib/import/m4/canonicalize.m4: Update.
1555         * gnulib/import/m4/chdir-long.m4: Update.
1556         * gnulib/import/m4/close.m4: Update.
1557         * gnulib/import/m4/closedir.m4: Update.
1558         * gnulib/import/m4/configmake.m4: Update.
1559         * gnulib/import/m4/d-ino.m4: Update.
1560         * gnulib/import/m4/d-type.m4: Update.
1561         * gnulib/import/m4/dirent_h.m4: Update.
1562         * gnulib/import/m4/dirfd.m4: Update.
1563         * gnulib/import/m4/dirname.m4: Update.
1564         * gnulib/import/m4/double-slash-root.m4: Update.
1565         * gnulib/import/m4/dup.m4: Update.
1566         * gnulib/import/m4/dup2.m4: Update.
1567         * gnulib/import/m4/eealloc.m4: Update.
1568         * gnulib/import/m4/environ.m4: Update.
1569         * gnulib/import/m4/errno_h.m4: Update.
1570         * gnulib/import/m4/error.m4: Update.
1571         * gnulib/import/m4/exponentd.m4: Update.
1572         * gnulib/import/m4/exponentl.m4: Update.
1573         * gnulib/import/m4/extensions.m4: Update.
1574         * gnulib/import/m4/extern-inline.m4: Update.
1575         * gnulib/import/m4/fchdir.m4: Update.
1576         * gnulib/import/m4/fcntl-o.m4: Update.
1577         * gnulib/import/m4/fcntl.m4: Update.
1578         * gnulib/import/m4/fcntl_h.m4: Update.
1579         * gnulib/import/m4/fdopendir.m4: Update.
1580         * gnulib/import/m4/filenamecat.m4: Update.
1581         * gnulib/import/m4/flexmember.m4: Update.
1582         * gnulib/import/m4/float_h.m4: Update.
1583         * gnulib/import/m4/fnmatch.m4: Update.
1584         * gnulib/import/m4/fnmatch_h.m4: Update.
1585         * gnulib/import/m4/fpieee.m4: Update.
1586         * gnulib/import/m4/frexp.m4: Update.
1587         * gnulib/import/m4/frexpl.m4: Update.
1588         * gnulib/import/m4/fstat.m4: Update.
1589         * gnulib/import/m4/fstatat.m4: Update.
1590         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1591         * gnulib/import/m4/getcwd-path-max.m4: Update.
1592         * gnulib/import/m4/getcwd.m4: Update.
1593         * gnulib/import/m4/getdtablesize.m4: Update.
1594         * gnulib/import/m4/getlogin.m4: Update.
1595         * gnulib/import/m4/getlogin_r.m4: Update.
1596         * gnulib/import/m4/getpagesize.m4: Update.
1597         * gnulib/import/m4/getprogname.m4: Update.
1598         * gnulib/import/m4/gettimeofday.m4: Update.
1599         * gnulib/import/m4/glibc21.m4: Update.
1600         * gnulib/import/m4/glob.m4: Update.
1601         * gnulib/import/m4/glob_h.m4: Update.
1602         * gnulib/import/m4/gnulib-cache.m4: Update.
1603         * gnulib/import/m4/gnulib-common.m4: Update.
1604         * gnulib/import/m4/gnulib-comp.m4: Update.
1605         * gnulib/import/m4/gnulib-tool.m4: Update.
1606         * gnulib/import/m4/hard-locale.m4: Update.
1607         * gnulib/import/m4/include_next.m4: Update.
1608         * gnulib/import/m4/inttypes-pri.m4: Update.
1609         * gnulib/import/m4/inttypes.m4: Update.
1610         * gnulib/import/m4/isnand.m4: Update.
1611         * gnulib/import/m4/isnanl.m4: Update.
1612         * gnulib/import/m4/largefile.m4: Update.
1613         * gnulib/import/m4/limits-h.m4: Update.
1614         * gnulib/import/m4/localcharset.m4: Update.
1615         * gnulib/import/m4/locale-fr.m4: Update.
1616         * gnulib/import/m4/locale-ja.m4: Update.
1617         * gnulib/import/m4/locale-zh.m4: Update.
1618         * gnulib/import/m4/localtime-buffer.m4: Update.
1619         * gnulib/import/m4/longlong.m4: Update.
1620         * gnulib/import/m4/lstat.m4: Update.
1621         * gnulib/import/m4/malloc.m4: Update.
1622         * gnulib/import/m4/malloca.m4: Update.
1623         * gnulib/import/m4/math_h.m4: Update.
1624         * gnulib/import/m4/mbrtowc.m4: Update.
1625         * gnulib/import/m4/mbsinit.m4: Update.
1626         * gnulib/import/m4/mbsrtowcs.m4: Update.
1627         * gnulib/import/m4/mbstate_t.m4: Update.
1628         * gnulib/import/m4/memchr.m4: Update.
1629         * gnulib/import/m4/memmem.m4: Update.
1630         * gnulib/import/m4/mempcpy.m4: Update.
1631         * gnulib/import/m4/memrchr.m4: Update.
1632         * gnulib/import/m4/mkdir.m4: Update.
1633         * gnulib/import/m4/mkstemp.m4: Update.
1634         * gnulib/import/m4/mmap-anon.m4: Update.
1635         * gnulib/import/m4/mode_t.m4: Update.
1636         * gnulib/import/m4/msvc-inval.m4: Update.
1637         * gnulib/import/m4/msvc-nothrow.m4: Update.
1638         * gnulib/import/m4/multiarch.m4: Update.
1639         * gnulib/import/m4/nocrash.m4: Update.
1640         * gnulib/import/m4/off_t.m4: Update.
1641         * gnulib/import/m4/onceonly.m4: Update.
1642         * gnulib/import/m4/open-cloexec.m4: Update.
1643         * gnulib/import/m4/open.m4: Update.
1644         * gnulib/import/m4/openat.m4: Update.
1645         * gnulib/import/m4/opendir.m4: Update.
1646         * gnulib/import/m4/pathmax.m4: Update.
1647         * gnulib/import/m4/rawmemchr.m4: Update.
1648         * gnulib/import/m4/readdir.m4: Update.
1649         * gnulib/import/m4/readlink.m4: Update.
1650         * gnulib/import/m4/realloc.m4: Update.
1651         * gnulib/import/m4/rename.m4: Update.
1652         * gnulib/import/m4/rewinddir.m4: Update.
1653         * gnulib/import/m4/rmdir.m4: Update.
1654         * gnulib/import/m4/save-cwd.m4: Update.
1655         * gnulib/import/m4/secure_getenv.m4: Update.
1656         * gnulib/import/m4/setenv.m4: Update.
1657         * gnulib/import/m4/signal_h.m4: Update.
1658         * gnulib/import/m4/ssize_t.m4: Update.
1659         * gnulib/import/m4/stat-time.m4: Update.
1660         * gnulib/import/m4/stat.m4: Update.
1661         * gnulib/import/m4/std-gnu11.m4: Update.
1662         * gnulib/import/m4/stdbool.m4: Update.
1663         * gnulib/import/m4/stddef_h.m4: Update.
1664         * gnulib/import/m4/stdint.m4: Update.
1665         * gnulib/import/m4/stdio_h.m4: Update.
1666         * gnulib/import/m4/stdlib_h.m4: Update.
1667         * gnulib/import/m4/strchrnul.m4: Update.
1668         * gnulib/import/m4/strdup.m4: Update.
1669         * gnulib/import/m4/strerror.m4: Update.
1670         * gnulib/import/m4/string_h.m4: Update.
1671         * gnulib/import/m4/strstr.m4: Update.
1672         * gnulib/import/m4/strtok_r.m4: Update.
1673         * gnulib/import/m4/sys_socket_h.m4: Update.
1674         * gnulib/import/m4/sys_stat_h.m4: Update.
1675         * gnulib/import/m4/sys_time_h.m4: Update.
1676         * gnulib/import/m4/sys_types_h.m4: Update.
1677         * gnulib/import/m4/tempname.m4: Update.
1678         * gnulib/import/m4/time_h.m4: Update.
1679         * gnulib/import/m4/unistd-safer.m4: Update.
1680         * gnulib/import/m4/unistd_h.m4: Update.
1681         * gnulib/import/m4/warn-on-use.m4: Update.
1682         * gnulib/import/m4/wchar_h.m4: Update.
1683         * gnulib/import/m4/wchar_t.m4: Update.
1684         * gnulib/import/m4/wctype_h.m4: Update.
1685         * gnulib/import/m4/wint_t.m4: Update.
1686         * gnulib/import/malloc.c: Update.
1687         * gnulib/import/malloc/scratch_buffer.h: Update.
1688         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1689         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1690         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1691         * gnulib/import/malloca.c: Update.
1692         * gnulib/import/malloca.h: Update.
1693         * gnulib/import/malloca.valgrind: Update.
1694         * gnulib/import/math.in.h: Update.
1695         * gnulib/import/mbrtowc.c: Update.
1696         * gnulib/import/mbsinit.c: Update.
1697         * gnulib/import/mbsrtowcs-impl.h: Update.
1698         * gnulib/import/mbsrtowcs-state.c: Update.
1699         * gnulib/import/mbsrtowcs.c: Update.
1700         * gnulib/import/memchr.c: Update.
1701         * gnulib/import/memmem.c: Update.
1702         * gnulib/import/mempcpy.c: Update.
1703         * gnulib/import/memrchr.c: Update.
1704         * gnulib/import/mkdir.c: Update.
1705         * gnulib/import/mkstemp.c: Update.
1706         * gnulib/import/msvc-inval.c: Update.
1707         * gnulib/import/msvc-inval.h: Update.
1708         * gnulib/import/msvc-nothrow.c: Update.
1709         * gnulib/import/msvc-nothrow.h: Update.
1710         * gnulib/import/open.c: Update.
1711         * gnulib/import/openat-die.c: Update.
1712         * gnulib/import/openat-priv.h: Update.
1713         * gnulib/import/openat-proc.c: Update.
1714         * gnulib/import/openat.c: Update.
1715         * gnulib/import/openat.h: Update.
1716         * gnulib/import/opendir.c: Update.
1717         * gnulib/import/pathmax.h: Update.
1718         * gnulib/import/pipe-safer.c: Update.
1719         * gnulib/import/rawmemchr.c: Update.
1720         * gnulib/import/readdir.c: Update.
1721         * gnulib/import/readlink.c: Update.
1722         * gnulib/import/realloc.c: Update.
1723         * gnulib/import/ref-add.sin: Update.
1724         * gnulib/import/ref-del.sin: Update.
1725         * gnulib/import/rename.c: Update.
1726         * gnulib/import/rewinddir.c: Update.
1727         * gnulib/import/rmdir.c: Update.
1728         * gnulib/import/same-inode.h: Update.
1729         * gnulib/import/save-cwd.c: Update.
1730         * gnulib/import/save-cwd.h: Update.
1731         * gnulib/import/scratch_buffer.h: Update.
1732         * gnulib/import/secure_getenv.c: Update.
1733         * gnulib/import/setenv.c: Update.
1734         * gnulib/import/signal.in.h: Update.
1735         * gnulib/import/stat-time.c: Update.
1736         * gnulib/import/stat-time.h: Update.
1737         * gnulib/import/stat-w32.c: Update.
1738         * gnulib/import/stat-w32.h: Update.
1739         * gnulib/import/stat.c: Update.
1740         * gnulib/import/stdbool.in.h: Update.
1741         * gnulib/import/stddef.in.h: Update.
1742         * gnulib/import/stdint.in.h: Update.
1743         * gnulib/import/stdio.in.h: Update.
1744         * gnulib/import/stdlib.in.h: Update.
1745         * gnulib/import/str-two-way.h: Update.
1746         * gnulib/import/strchrnul.c: Update.
1747         * gnulib/import/strdup.c: Update.
1748         * gnulib/import/streq.h: Update.
1749         * gnulib/import/strerror-override.c: Update.
1750         * gnulib/import/strerror-override.h: Update.
1751         * gnulib/import/strerror.c: Update.
1752         * gnulib/import/string.in.h: Update.
1753         * gnulib/import/stripslash.c: Update.
1754         * gnulib/import/strnlen1.c: Update.
1755         * gnulib/import/strnlen1.h: Update.
1756         * gnulib/import/strstr.c: Update.
1757         * gnulib/import/strtok_r.c: Update.
1758         * gnulib/import/sys_stat.in.h: Update.
1759         * gnulib/import/sys_time.in.h: Update.
1760         * gnulib/import/sys_types.in.h: Update.
1761         * gnulib/import/tempname.c: Update.
1762         * gnulib/import/tempname.h: Update.
1763         * gnulib/import/time.in.h: Update.
1764         * gnulib/import/unistd--.h: Update.
1765         * gnulib/import/unistd-safer.h: Update.
1766         * gnulib/import/unistd.in.h: Update.
1767         * gnulib/import/unsetenv.c: Update.
1768         * gnulib/import/verify.h: Update.
1769         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1770         * gnulib/import/wchar.in.h: Update.
1771         * gnulib/import/wctype.in.h: Update.
1772         * gnulib/import/xalloc-oversized.h: Update.
1773         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1774         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1775
1776 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1777
1778         * record-btrace.c (get_thread_current_frame): Remove
1779         old_inferior_ptid.
1780
1781 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1782
1783         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1784         with check_tag to 1 if and only if the type is tagged and the
1785         component being searched cannot been found in the current
1786         view. Otherwise, always call ada_to_fixed_type with
1787         check_tag to 0.
1788
1789 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1790
1791         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1792         declaration.
1793         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1794         * ada-varobj.c (ada_varobj_get_number_of_children,
1795         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1796
1797 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1798
1799         * ada-valprint.c (ada_value_print): Use type instead of
1800         enclosing type.
1801
1802 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1803
1804         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1805         an array of access to unconstrained array.
1806
1807 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1808
1809         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1810         (ada_check_typedef): Use it.
1811
1812 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1813
1814         * ada-varobj.c (ada_varobj_describe_struct_child)
1815         (ada_varobj_describe_child): Handle union case like struct one.
1816
1817 2018-09-10  Tom Tromey  <tom@tromey.com>
1818
1819         PR python/18380:
1820         * python/python.c (_initialize_python): Make example in "python"
1821         help work in Python 3.
1822
1823 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1824
1825         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1826         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1827         $(EXEEXT) to the script, as it is not a program.
1828
1829 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1830
1831         * python/py-prettyprint.c (pretty_print_one_value): Return
1832         gdbpy_ref<>.
1833         (print_string_repr): Adjust.
1834         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1835         * python/python-internal.h (apply_varobj_pretty_printer): Return
1836         gdbpy_ref<>.
1837         * varobj.c (varobj_value_get_print_value): Adjust.
1838
1839 2018-09-08  Tom Tromey  <tom@tromey.com>
1840
1841         PR python/16047:
1842         * python/py-prettyprint.c (pretty_print_one_value): Check for
1843         to_string method.
1844
1845 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1846
1847         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1848         replace_operator_with_call.
1849
1850 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1851
1852         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1853
1854 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1855
1856         * ada-typeprint.c (print_range): Print the bounds using TYPE
1857         rather than its TYPE_TARGET_TYPE.
1858
1859 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1860
1861         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1862         call to ada_to_fixed_value_create.
1863
1864 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1865
1866         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1867
1868 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1869
1870         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1871         by calls to error.
1872
1873 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1874
1875         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1876         Move update of loop variable "fi".
1877
1878 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1879
1880         * ada-lang.c (value_assign_to_component): In the case of
1881         big-endian targets, extract the bits of the given VAL
1882         using an src_offset of zero if container is not a scalar.
1883
1884 2018-09-06  Simon Ser  <contact@emersion.fr>
1885
1886         PR gdb/23105
1887         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1888         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1889         * fbsd-tdep.c (fbsd_make_note_desc): New.
1890         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1891         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1892         * target.h (enum target_object) Add FreeBSD-specific
1893         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1894
1895 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1896
1897         * compile/compile-c.h (generate_c_for_variable_locations):
1898         Change reference to pointer.
1899         * compile/compile-c-support.c (compile_program) <compute>:
1900         Likewise.
1901         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1902         (generate_c_for_for_one_variable): Likewise
1903         (generate_c_for_variable_locations): Likewise
1904         * compile/compile-c-types.c (compile_c_instance::convert_type):
1905         Likewise
1906         * compile/compile-cplus-symbols.c (convert_one_symbol):
1907         std::move the scope passed to enter_scope.
1908         * compile/compile-cplus-types.c
1909         (compile_cplus_instance::enter_scope): Make parameter
1910         rvalue-reference.
1911         (compile_cplus_instance::new_scope): Change reference to
1912         pointer.
1913         (compile_cplus_instance::convert_type): Likewise
1914         (compile_cplus_convert_typedef): std::move the scope passed to
1915         enter_scope.
1916         (compile_cplus_convert_struct_or_union): Likewise.
1917         (compile_cplus_convert_enum): Likewise.
1918         (compile_cplus_convert_namespace): Likewise.
1919         * compile/compile-cplus.h (compile_cplus_instance)
1920         <enter_scope>: Make parameter rvalue-reference.
1921         * compile/compile-internal.h (compile_instance)
1922         <get_cached_type>: Likewise
1923         * compile/compile-loc2c.c (push): Likewise
1924         (pushf): Likewise
1925         (unary): Likewise
1926         (binary): Likewise
1927         (print_label): Likewise
1928         (pushf_register_address): Likewise
1929         (pushf_register): Likewise
1930         (do_compile_dwarf_expr_to_c): Likewise
1931         (compile_dwarf_expr_to_c): Likewise
1932         (compile_dwarf_bounds_to_c): Likewise
1933         * compile/compile.c (compile_instance::get_cached_type):
1934         Likewise
1935         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1936         (compile_dwarf_bounds_to_c): Likewise
1937         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1938         (dwarf2_compile_property_to_c): Likewise
1939         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1940         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1941         Likewise
1942
1943 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1944
1945         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1946         * tui/tui-data.c (init_content_element): Don't initialize it.
1947
1948 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1949
1950         * tui/tui-data.h (struct tui_win_info)
1951         <detail::opaque>: Remove.
1952         * tui/tui-data.c (init_win_info): Remove assignment.
1953
1954 2018-09-05  Tom Tromey  <tom@tromey.com>
1955
1956         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1957         -Wformat-nonliteral.
1958         * target-float.c (host_float_ops<T>::to_string)
1959         (host_float_ops<T>::from_string): Use
1960         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1961         * configure: Rebuild.
1962
1963 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         * printcmd.c (printf_c_string): Use
1966         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1967         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1968
1969 2018-09-05  Tom Tromey  <tom@tromey.com>
1970
1971         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1972
1973 2018-09-05  Tom de Vries  <tdevries@suse.de>
1974
1975         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1976         with resolve_abstract_p == true.
1977         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1978         defaulting to false. Propagate resolve_abstract_p to
1979         dwarf2_fetch_die_loc_sect_off.
1980         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1981         parameter, defaulting to false.
1982         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1983         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1984         parameter.
1985         * dwarf2read.h (struct die_info): Forward-declare.
1986         (die_info_ptr): New typedef.
1987         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1988
1989 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1990
1991         GDB 8.2 released.
1992
1993 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1994             Pedro Alves  <palves@redhat.com>
1995
1996         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1997         "aclocal-m4-deps.mk".  Include file here.
1998         $(srcdir)/aclocal.m4: Add "configure.ac".
1999         * gnulib/aclocal-m4-deps.mk: New file.
2000         * gnulib/update-gnulib.sh: Automatically update
2001         "aclocal-m4-deps.mk".
2002
2003 2018-09-04  Tom Tromey  <tom@tromey.com>
2004
2005         * configure: Rebuild.
2006         * configure.ac: Remove multi-ice code.
2007
2008 2018-09-04  Tom Tromey  <tom@tromey.com>
2009
2010         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2011         (ada-exp.o): Update.
2012
2013 2018-09-04  Tom Tromey  <tom@tromey.com>
2014
2015         * Makefile.in (printcmd.o, target-float.o): Remove.
2016         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2017
2018 2018-09-04  Tom Tromey  <tom@tromey.com>
2019
2020         * gnulib/Makefile.in: Remove obsolete comment.
2021         * Makefile.in: Remove obsolete comment.
2022
2023 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2024
2025         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2026         line with '+'.
2027
2028 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2029
2030         * riscv-tdep.c: Add 'prologue-value.h' include.
2031         (struct riscv_unwind_cache): New struct.
2032         (riscv_debug_unwinder): New global.
2033         (riscv_scan_prologue): Update arguments, capture register details
2034         from prologue scan.
2035         (riscv_skip_prologue): Reformat arguments line, move end of
2036         prologue calculation into riscv_scan_prologue.
2037         (riscv_frame_cache): Update return type, create
2038         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2039         details.
2040         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2041         (riscv_frame_prev_register): Use the trad_frame within the
2042         riscv_unwind_cache.
2043         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2044         flag.
2045
2046 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2047
2048         * trad-frame.h (trad_frame_set_realreg): Declare.
2049         (trad_frame_set_addr): Declare.
2050         * trad-frame.c (trad_frame_set_realreg): Define new function.
2051         (trad_frame_set_addr): Define new function.
2052         (trad_frame_set_reg_realreg): Use new function.
2053         (trad_frame_set_reg_addr): Use new function.
2054
2055 2018-09-01  Keith Seitz  <keiths@redhat.com>
2056
2057         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2058         pulongest instead of "%lld".
2059         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2060         ATTRIBUTE_UNUSED.
2061
2062 2018-08-31  Tom Tromey  <tom@tromey.com>
2063
2064         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2065         variant part type.
2066
2067 2018-08-31  Pedro Alves  <palves@redhat.com>
2068
2069         * gdbarch.h: Regenerate.
2070
2071 2018-08-31  Pedro Alves  <palves@redhat.com>
2072
2073         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2074         * target.h (Hardware watchpoint interfaces): Describe
2075         continuable/steppable/non-steppable watchpoints.
2076         * gdbarch.h, gdbarch.c: Regenerate.
2077
2078 2018-08-31  Pedro Alves  <palves@redhat.com>
2079
2080         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2081         Delete.
2082         * s390-linux-nat.c
2083         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2084         * target.h (target_ops::have_continuable_watchpoint): Delete.
2085         (target_have_continuable_watchpoint): Delete.
2086         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2087         * target-delegates.c: Regenerate.
2088
2089 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2090
2091         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2092         the files present in "gnulib/import/m4/".
2093
2094 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2095
2096         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2097         c.sw, c.swsp, and c.sdsp.
2098
2099 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2100
2101         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2102         (riscv_read_misa_reg): Don't cache value read into inferior data.
2103         (riscv_new_inferior_data): Delete.
2104         (riscv_inferior_data_cleanup): Delete.
2105         (riscv_inferior_data): Delete.
2106         (riscv_invalidate_inferior_data): Delete.
2107         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2108
2109 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2110
2111         * compile/compile-cplus-types.c
2112         (compile_cplus_instance::leave_scope): Take the address of scope
2113         object.
2114         (compile_cplus_instance::convert_qualified_base): Compare quals
2115         to 0.
2116
2117 2018-08-30  Keith Seitz  <keiths@redhat.com>
2118
2119         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2120         Use "%s" and host_address_to_string instead of "%p" in printf.
2121
2122 2018-08-29  Keith Seitz  <keiths@redhat.com>
2123
2124         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2125         and compile-cplus-types.c.
2126         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2127         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2128         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2129         Declare.
2130         * compile/compile-c-support.c: Include compile-cplus.h.
2131         (load_libcompile): Templatize.
2132         (get_compile_context): "New" function.
2133         (c_get_compile_context): Use get_compile_context.
2134         (cplus_get_compile_context): New function.
2135         (cplus_push_user_expression, cplus_pop_user_expression)
2136         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2137         (cplus_compute_program): Define new structs/functions.
2138         * compile/compile-cplus-symmbols.c: New file.
2139         * compile/compile-cplus-types.c: New file.
2140         * compile/compile-cplus.h: New file.
2141         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2142         Declare.
2143         * compile/compile-object-load.c (get_out_value_type): Use
2144         strncmp_iw when comparing symbol names.
2145         (compile_object_load): Add mst_bss and mst_data.
2146         * compile/compile.c (_initialize_compile): Remove
2147         -Wno-implicit-function-declaration from `compile_args'.
2148         * compile/gcc-cp-plugin.h: New file.
2149         * NEWS: Mention C++ compile support and new debug options.
2150
2151 2018-08-29  Keith Seitz  <keiths@redhat.com>
2152
2153         * linespec.c (collect_info::add_symbol): Make virtual.
2154         (struct symbol_searcher_collect_info): New struct.
2155         (symbol_searcher::find_all_symbols): New method.
2156         * symtab.h (class symbol_searcher): New class.
2157
2158 2018-08-29  Keith Seitz  <keiths@redhat.com>
2159
2160         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2161         Change to vector of block_symbol.  Update all users.
2162         (struct collect_info) <symbols>: Likewise.
2163         (collect_info::add_symbol): Take block_symbol as argument.
2164         Update all callers.
2165         (decode_compound_collector) <m_symbols>: Change type to vector
2166         of block_symbol.  Update all users.
2167         (decode_compound_collector::operator ()): Change parameter type
2168         to block_symbol.
2169         (find_method, find_function_symbols, find_linespec_symbols)
2170         (find_label_symbols_in_block, find_label_symbols): Change symbol
2171         vectors to block_symbol vectors.
2172         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2173         block_symbol.
2174
2175 2018-08-29  Keith Seitz  <keiths@redhat.com>
2176
2177         * linespec.c (symbolp): Remove typedef and VEC definitions.
2178         (bound_minimal_symbol_d): Likewise.
2179
2180 2018-08-29  Keith Seitz  <keiths@redhat.com>
2181
2182         * linespec.c (decode_compound_collector::decode_compound_collector):
2183         Remove initialization for `m_symtabs'.
2184         (decode_compound_collector::release_symbols): Change return type
2185         to std::vector.  Update all callers.
2186         (class decode_compound_collector) <m_symbols>: Change type to
2187         std::vector.
2188         (lookup_prefix_sym): Change return type to std::vector.  Update all
2189         callers.
2190         (compare_symbols): Remove.
2191         (std_compare_symbols): Rename to `compare_symbols'.
2192         (find_method): Change `sym_classes' parameter to std::vector.
2193         Update all callers.  Use std::sort to sort sym_classes.
2194         (find_linespec_symbols): Remove cleanup.
2195
2196 2018-08-29  Keith Seitz  <keiths@redhat.com>
2197
2198         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2199         std::vector.  Update all users.
2200         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2201         (struct collect_info) <minimal_symbols>: Likewise.
2202         (compare_msymbols): Return bool.  Change parameters to const
2203         bound_minimal_symbol references.
2204         (find_method, find_function_symbols, find_linespec_symbols): Change
2205         `minsyms' parameter to std::vector.  Update all callers.
2206
2207 2018-08-29  Keith Seitz  <keiths@redhat.com>
2208
2209         * linespec.c (struct linespec) <label_symbols>: Change type to
2210         std::vector.  Update all users.
2211         (find_label_symbols_in_block): Change `result' parameter to
2212         std::vector.  Update all callers.
2213         (find_label_symbols): Return std::vector.  Update all callers.
2214
2215 2018-08-29  Keith Seitz  <keiths@redhat.com>
2216
2217         * linespec.c (struct linespec) <function_symbols>: Change type to
2218         std::vector.  Update all users.
2219         (struct collect_info) <function_symbols>: Likewise.
2220         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2221         (std_compare_symbols): New function.
2222         (find_method, find_function_symbols, find_linespec_symbols)
2223         (find_label_symbols_in_block): Change `symbols' parameter to
2224         std::vector.  Update all callers.
2225         (find_label_symbols): Likewise for `function_symbols' and
2226         `label_funcs_ret'.
2227
2228 2018-08-29  Keith Seitz  <keiths@redhat.com>
2229
2230         * linespec.c (symtab_vector_up): Define.
2231         (struct linespec) <file_symtabs>: Change type to std::vector *.
2232         Update all uses.
2233         (struct collect_info) <file_symtabs>: Likewise.
2234         (collect_symtabs_from_filename): Return symtab_vector_up.
2235         Update all callers.
2236         (decode_objc): Remove cleanup.
2237         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2238         (symtab_collector::release_symtabs): Return symtab_vector_up.
2239         Update all callers.
2240         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2241         Update all users.
2242         (collect_symtabs_from_filename, symtabs_from_filename): Return
2243         symtab_vector_up.  Update all callers.
2244
2245 2018-08-29  Tom Tromey  <tom@tromey.com>
2246
2247         * csky-tdep.c (csky_analyze_prologue): Use
2248         core_addr_to_string_nz.
2249
2250 2018-08-29  Tom Tromey  <tom@tromey.com>
2251
2252         * windows-nat.c (struct xlate_exception) <them>: Change type to
2253         DWORD.
2254         (xlate): Fix formatting.  Remove last entry.
2255         (struct xlate_exception, xlate): Comment out.
2256         (windows_nat_target::resume): Use ranged for.
2257
2258 2018-08-29  Jim Wilson  <jimw@sifive.com>
2259
2260         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2261         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2262         of NT_PRFPREG.
2263         (riscv_linux_nat_target::store_registers): Likewise.
2264
2265 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2266
2267         PR gdb/23555
2268         PR gdb/23558
2269         * gnulib/aclocal.m4: Regenerate.
2270         * gnulib/config.in: Regenerate.
2271         * gnulib/configure: Regenerate.
2272         * gnulib/import/Makefile.am: Update.
2273         * gnulib/import/Makefile.in: Update.
2274         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2275         * gnulib/import/_Noreturn.h: ... this.
2276         * gnulib/import/alloca.in.h: Update.
2277         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2278         * gnulib/import/arg-nonnull.h: ... this.
2279         * gnulib/import/assure.h: Update.
2280         * gnulib/import/at-func.c: Update.
2281         * gnulib/import/basename-lgpl.c: Update.
2282         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2283         * gnulib/import/c++defs.h: ... this.
2284         * gnulib/import/canonicalize-lgpl.c: Update.
2285         * gnulib/import/cdefs.h: Update.
2286         * gnulib/import/chdir-long.c: Update.
2287         * gnulib/import/chdir-long.h: Update.
2288         * gnulib/import/cloexec.c: Update.
2289         * gnulib/import/cloexec.h: Update.
2290         * gnulib/import/close.c: Update.
2291         * gnulib/import/closedir.c: Update.
2292         * gnulib/import/config.charset: Update.
2293         * gnulib/import/dirent-private.h: Update.
2294         * gnulib/import/dirent.in.h: Update.
2295         * gnulib/import/dirfd.c: Update.
2296         * gnulib/import/dirname-lgpl.c: Update.
2297         * gnulib/import/dirname.h: Update.
2298         * gnulib/import/dosname.h: Update.
2299         * gnulib/import/dup-safer-flag.c: Update.
2300         * gnulib/import/dup-safer.c: Update.
2301         * gnulib/import/dup.c: Update.
2302         * gnulib/import/dup2.c: Update.
2303         * gnulib/import/errno.in.h: Update.
2304         * gnulib/import/error.c: Update.
2305         * gnulib/import/error.h: Update.
2306         * gnulib/import/exitfail.c: Update.
2307         * gnulib/import/exitfail.h: Update.
2308         * gnulib/import/extra/update-copyright: Update.
2309         * gnulib/import/fchdir.c: Update.
2310         * gnulib/import/fcntl.c: Update.
2311         * gnulib/import/fcntl.in.h: Update.
2312         * gnulib/import/fd-hook.c: Update.
2313         * gnulib/import/fd-hook.h: Update.
2314         * gnulib/import/fd-safer-flag.c: Update.
2315         * gnulib/import/fd-safer.c: Update.
2316         * gnulib/import/fdopendir.c: Update.
2317         * gnulib/import/filename.h: Update.
2318         * gnulib/import/filenamecat-lgpl.c: Update.
2319         * gnulib/import/filenamecat.h: Update.
2320         * gnulib/import/flexmember.h: Update.
2321         * gnulib/import/float+.h: Update.
2322         * gnulib/import/float.c: Update.
2323         * gnulib/import/float.in.h: Update.
2324         * gnulib/import/fnmatch.c: Update.
2325         * gnulib/import/fnmatch.in.h: Update.
2326         * gnulib/import/fnmatch_loop.c: Update.
2327         * gnulib/import/fpucw.h: Update.
2328         * gnulib/import/frexp.c: Update.
2329         * gnulib/import/frexpl.c: Update.
2330         * gnulib/import/fstat.c: Update.
2331         * gnulib/import/fstatat.c: Update.
2332         * gnulib/import/getcwd-lgpl.c: Update.
2333         * gnulib/import/getcwd.c: Update.
2334         * gnulib/import/getdtablesize.c: Update.
2335         * gnulib/import/getlogin_r.c: Update.
2336         * gnulib/import/getprogname.c: Update.
2337         * gnulib/import/getprogname.h: Update.
2338         * gnulib/import/gettext.h: Update.
2339         * gnulib/import/gettimeofday.c: Update.
2340         * gnulib/import/glob-libc.h: Update.
2341         * gnulib/import/glob.c: Update.
2342         * gnulib/import/glob.in.h: Update.
2343         * gnulib/import/glob_internal.h: Update.
2344         * gnulib/import/glob_pattern_p.c: Update.
2345         * gnulib/import/globfree.c: Update.
2346         * gnulib/import/hard-locale.c: Update.
2347         * gnulib/import/hard-locale.h: Update.
2348         * gnulib/import/intprops.h: Update.
2349         * gnulib/import/inttypes.in.h: Update.
2350         * gnulib/import/isnan.c: Update.
2351         * gnulib/import/isnand-nolibm.h: Update.
2352         * gnulib/import/isnand.c: Update.
2353         * gnulib/import/isnanl-nolibm.h: Update.
2354         * gnulib/import/isnanl.c: Update.
2355         * gnulib/import/itold.c: Update.
2356         * gnulib/import/libc-config.h: Update.
2357         * gnulib/import/limits.in.h: Update.
2358         * gnulib/import/localcharset.c: Update.
2359         * gnulib/import/localcharset.h: Update.
2360         * gnulib/import/localtime-buffer.c: Update.
2361         * gnulib/import/localtime-buffer.h: Update.
2362         * gnulib/import/lstat.c: Update.
2363         * gnulib/import/m4/00gnulib.m4: Update.
2364         * gnulib/import/m4/__inline.m4: Update.
2365         * gnulib/import/m4/absolute-header.m4: Update.
2366         * gnulib/import/m4/alloca.m4: Update.
2367         * gnulib/import/m4/builtin-expect.m4: Update.
2368         * gnulib/import/m4/canonicalize.m4: Update.
2369         * gnulib/import/m4/chdir-long.m4: Update.
2370         * gnulib/import/m4/close.m4: Update.
2371         * gnulib/import/m4/closedir.m4: Update.
2372         * gnulib/import/m4/configmake.m4: Update.
2373         * gnulib/import/m4/d-ino.m4: Update.
2374         * gnulib/import/m4/d-type.m4: Update.
2375         * gnulib/import/m4/dirent_h.m4: Update.
2376         * gnulib/import/m4/dirfd.m4: Update.
2377         * gnulib/import/m4/dirname.m4: Update.
2378         * gnulib/import/m4/double-slash-root.m4: Update.
2379         * gnulib/import/m4/dup.m4: Update.
2380         * gnulib/import/m4/dup2.m4: Update.
2381         * gnulib/import/m4/eealloc.m4: Update.
2382         * gnulib/import/m4/environ.m4: Update.
2383         * gnulib/import/m4/errno_h.m4: Update.
2384         * gnulib/import/m4/error.m4: Update.
2385         * gnulib/import/m4/exponentd.m4: Update.
2386         * gnulib/import/m4/exponentl.m4: Update.
2387         * gnulib/import/m4/extensions.m4: Update.
2388         * gnulib/import/m4/extern-inline.m4: Update.
2389         * gnulib/import/m4/fchdir.m4: Update.
2390         * gnulib/import/m4/fcntl-o.m4: Update.
2391         * gnulib/import/m4/fcntl.m4: Update.
2392         * gnulib/import/m4/fcntl_h.m4: Update.
2393         * gnulib/import/m4/fdopendir.m4: Update.
2394         * gnulib/import/m4/filenamecat.m4: Update.
2395         * gnulib/import/m4/flexmember.m4: Update.
2396         * gnulib/import/m4/float_h.m4: Update.
2397         * gnulib/import/m4/fnmatch.m4: Update.
2398         * gnulib/import/m4/fnmatch_h.m4: Update.
2399         * gnulib/import/m4/fpieee.m4: Update.
2400         * gnulib/import/m4/frexp.m4: Update.
2401         * gnulib/import/m4/frexpl.m4: Update.
2402         * gnulib/import/m4/fstat.m4: Update.
2403         * gnulib/import/m4/fstatat.m4: Update.
2404         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2405         * gnulib/import/m4/getcwd-path-max.m4: Update.
2406         * gnulib/import/m4/getcwd.m4: Update.
2407         * gnulib/import/m4/getdtablesize.m4: Update.
2408         * gnulib/import/m4/getlogin.m4: Update.
2409         * gnulib/import/m4/getlogin_r.m4: Update.
2410         * gnulib/import/m4/getpagesize.m4: Update.
2411         * gnulib/import/m4/getprogname.m4: Update.
2412         * gnulib/import/m4/gettimeofday.m4: Update.
2413         * gnulib/import/m4/glibc21.m4: Update.
2414         * gnulib/import/m4/glob.m4: Update.
2415         * gnulib/import/m4/glob_h.m4: Update.
2416         * gnulib/import/m4/gnulib-cache.m4: Update.
2417         * gnulib/import/m4/gnulib-common.m4: Update.
2418         * gnulib/import/m4/gnulib-comp.m4: Update.
2419         * gnulib/import/m4/gnulib-tool.m4: Update.
2420         * gnulib/import/m4/hard-locale.m4: Update.
2421         * gnulib/import/m4/include_next.m4: Update.
2422         * gnulib/import/m4/inttypes-pri.m4: Update.
2423         * gnulib/import/m4/inttypes.m4: Update.
2424         * gnulib/import/m4/isnand.m4: Update.
2425         * gnulib/import/m4/isnanl.m4: Update.
2426         * gnulib/import/m4/largefile.m4: Update.
2427         * gnulib/import/m4/limits-h.m4: Update.
2428         * gnulib/import/m4/localcharset.m4: Update.
2429         * gnulib/import/m4/locale-fr.m4: Update.
2430         * gnulib/import/m4/locale-ja.m4: Update.
2431         * gnulib/import/m4/locale-zh.m4: Update.
2432         * gnulib/import/m4/localtime-buffer.m4: Update.
2433         * gnulib/import/m4/longlong.m4: Update.
2434         * gnulib/import/m4/lstat.m4: Update.
2435         * gnulib/import/m4/malloc.m4: Update.
2436         * gnulib/import/m4/malloca.m4: Update.
2437         * gnulib/import/m4/math_h.m4: Update.
2438         * gnulib/import/m4/mbrtowc.m4: Update.
2439         * gnulib/import/m4/mbsinit.m4: Update.
2440         * gnulib/import/m4/mbsrtowcs.m4: Update.
2441         * gnulib/import/m4/mbstate_t.m4: Update.
2442         * gnulib/import/m4/memchr.m4: Update.
2443         * gnulib/import/m4/memmem.m4: Update.
2444         * gnulib/import/m4/mempcpy.m4: Update.
2445         * gnulib/import/m4/memrchr.m4: Update.
2446         * gnulib/import/m4/mkdir.m4: Update.
2447         * gnulib/import/m4/mkstemp.m4: Update.
2448         * gnulib/import/m4/mmap-anon.m4: Update.
2449         * gnulib/import/m4/mode_t.m4: Update.
2450         * gnulib/import/m4/msvc-inval.m4: Update.
2451         * gnulib/import/m4/msvc-nothrow.m4: Update.
2452         * gnulib/import/m4/multiarch.m4: Update.
2453         * gnulib/import/m4/nocrash.m4: Update.
2454         * gnulib/import/m4/off_t.m4: Update.
2455         * gnulib/import/m4/onceonly.m4: Update.
2456         * gnulib/import/m4/open-cloexec.m4: Update.
2457         * gnulib/import/m4/open.m4: Update.
2458         * gnulib/import/m4/openat.m4: Update.
2459         * gnulib/import/m4/opendir.m4: Update.
2460         * gnulib/import/m4/pathmax.m4: Update.
2461         * gnulib/import/m4/rawmemchr.m4: Update.
2462         * gnulib/import/m4/readdir.m4: Update.
2463         * gnulib/import/m4/readlink.m4: Update.
2464         * gnulib/import/m4/realloc.m4: Update.
2465         * gnulib/import/m4/rename.m4: Update.
2466         * gnulib/import/m4/rewinddir.m4: Update.
2467         * gnulib/import/m4/rmdir.m4: Update.
2468         * gnulib/import/m4/save-cwd.m4: Update.
2469         * gnulib/import/m4/secure_getenv.m4: Update.
2470         * gnulib/import/m4/setenv.m4: Update.
2471         * gnulib/import/m4/signal_h.m4: Update.
2472         * gnulib/import/m4/ssize_t.m4: Update.
2473         * gnulib/import/m4/stat-time.m4: Update.
2474         * gnulib/import/m4/stat.m4: Update.
2475         * gnulib/import/m4/std-gnu11.m4: Update.
2476         * gnulib/import/m4/stdbool.m4: Update.
2477         * gnulib/import/m4/stddef_h.m4: Update.
2478         * gnulib/import/m4/stdint.m4: Update.
2479         * gnulib/import/m4/stdio_h.m4: Update.
2480         * gnulib/import/m4/stdlib_h.m4: Update.
2481         * gnulib/import/m4/strchrnul.m4: Update.
2482         * gnulib/import/m4/strdup.m4: Update.
2483         * gnulib/import/m4/strerror.m4: Update.
2484         * gnulib/import/m4/string_h.m4: Update.
2485         * gnulib/import/m4/strstr.m4: Update.
2486         * gnulib/import/m4/strtok_r.m4: Update.
2487         * gnulib/import/m4/sys_socket_h.m4: Update.
2488         * gnulib/import/m4/sys_stat_h.m4: Update.
2489         * gnulib/import/m4/sys_time_h.m4: Update.
2490         * gnulib/import/m4/sys_types_h.m4: Update.
2491         * gnulib/import/m4/tempname.m4: Update.
2492         * gnulib/import/m4/time_h.m4: Update.
2493         * gnulib/import/m4/unistd-safer.m4: Update.
2494         * gnulib/import/m4/unistd_h.m4: Update.
2495         * gnulib/import/m4/warn-on-use.m4: Update.
2496         * gnulib/import/m4/wchar_h.m4: Update.
2497         * gnulib/import/m4/wchar_t.m4: Update.
2498         * gnulib/import/m4/wctype_h.m4: Update.
2499         * gnulib/import/m4/wint_t.m4: Update.
2500         * gnulib/import/malloc.c: Update.
2501         * gnulib/import/malloc/scratch_buffer.h: Update.
2502         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2503         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2504         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2505         * gnulib/import/malloca.c: Update.
2506         * gnulib/import/malloca.h: Update.
2507         * gnulib/import/malloca.valgrind: Update.
2508         * gnulib/import/math.in.h: Update.
2509         * gnulib/import/mbrtowc.c: Update.
2510         * gnulib/import/mbsinit.c: Update.
2511         * gnulib/import/mbsrtowcs-impl.h: Update.
2512         * gnulib/import/mbsrtowcs-state.c: Update.
2513         * gnulib/import/mbsrtowcs.c: Update.
2514         * gnulib/import/memchr.c: Update.
2515         * gnulib/import/memmem.c: Update.
2516         * gnulib/import/mempcpy.c: Update.
2517         * gnulib/import/memrchr.c: Update.
2518         * gnulib/import/mkdir.c: Update.
2519         * gnulib/import/mkstemp.c: Update.
2520         * gnulib/import/msvc-inval.c: Update.
2521         * gnulib/import/msvc-inval.h: Update.
2522         * gnulib/import/msvc-nothrow.c: Update.
2523         * gnulib/import/msvc-nothrow.h: Update.
2524         * gnulib/import/open.c: Update.
2525         * gnulib/import/openat-die.c: Update.
2526         * gnulib/import/openat-priv.h: Update.
2527         * gnulib/import/openat-proc.c: Update.
2528         * gnulib/import/openat.c: Update.
2529         * gnulib/import/openat.h: Update.
2530         * gnulib/import/opendir.c: Update.
2531         * gnulib/import/pathmax.h: Update.
2532         * gnulib/import/pipe-safer.c: Update.
2533         * gnulib/import/rawmemchr.c: Update.
2534         * gnulib/import/readdir.c: Update.
2535         * gnulib/import/readlink.c: Update.
2536         * gnulib/import/realloc.c: Update.
2537         * gnulib/import/ref-add.sin: Update.
2538         * gnulib/import/ref-del.sin: Update.
2539         * gnulib/import/rename.c: Update.
2540         * gnulib/import/rewinddir.c: Update.
2541         * gnulib/import/rmdir.c: Update.
2542         * gnulib/import/same-inode.h: Update.
2543         * gnulib/import/save-cwd.c: Update.
2544         * gnulib/import/save-cwd.h: Update.
2545         * gnulib/import/scratch_buffer.h: Update.
2546         * gnulib/import/secure_getenv.c: Update.
2547         * gnulib/import/setenv.c: Update.
2548         * gnulib/import/signal.in.h: Update.
2549         * gnulib/import/stat-time.c: Update.
2550         * gnulib/import/stat-time.h: Update.
2551         * gnulib/import/stat-w32.c: Update.
2552         * gnulib/import/stat-w32.h: Update.
2553         * gnulib/import/stat.c: Update.
2554         * gnulib/import/stdbool.in.h: Update.
2555         * gnulib/import/stddef.in.h: Update.
2556         * gnulib/import/stdint.in.h: Update.
2557         * gnulib/import/stdio.in.h: Update.
2558         * gnulib/import/stdlib.in.h: Update.
2559         * gnulib/import/str-two-way.h: Update.
2560         * gnulib/import/strchrnul.c: Update.
2561         * gnulib/import/strdup.c: Update.
2562         * gnulib/import/streq.h: Update.
2563         * gnulib/import/strerror-override.c: Update.
2564         * gnulib/import/strerror-override.h: Update.
2565         * gnulib/import/strerror.c: Update.
2566         * gnulib/import/string.in.h: Update.
2567         * gnulib/import/stripslash.c: Update.
2568         * gnulib/import/strnlen1.c: Update.
2569         * gnulib/import/strnlen1.h: Update.
2570         * gnulib/import/strstr.c: Update.
2571         * gnulib/import/strtok_r.c: Update.
2572         * gnulib/import/sys_stat.in.h: Update.
2573         * gnulib/import/sys_time.in.h: Update.
2574         * gnulib/import/sys_types.in.h: Update.
2575         * gnulib/import/tempname.c: Update.
2576         * gnulib/import/tempname.h: Update.
2577         * gnulib/import/time.in.h: Update.
2578         * gnulib/import/unistd--.h: Update.
2579         * gnulib/import/unistd-safer.h: Update.
2580         * gnulib/import/unistd.in.h: Update.
2581         * gnulib/import/unsetenv.c: Update.
2582         * gnulib/import/verify.h: Update.
2583         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2584         * gnulib/import/wchar.in.h: Update.
2585         * gnulib/import/wctype.in.h: Update.
2586         * gnulib/import/xalloc-oversized.h: Update.
2587         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2588         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2589
2590 2018-08-16  Gary Benson <gbenson@redhat.com>
2591
2592         PR gdb/13000:
2593         * gdb/main.c (captured_main_1): Exit with nonzero status
2594         in batch mode if the last command to be executed failed.
2595         * NEWS: Mention the above.
2596
2597 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2598
2599         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2600         end of warning message.
2601
2602 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2603
2604         PR gdb/22943:
2605         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2606         (aarch64_extract_return_value): Use
2607         aapcs_is_vfp_call_or_return_candidate.
2608         (aarch64_return_in_memory): Likewise.
2609         (aarch64_store_return_value): Likewise.
2610
2611 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2612
2613         * aarch64-tdep.c
2614         (aapcs_is_vfp_call_or_return_candidate): Make static
2615         (pass_in_v_or_stack): Remove function.
2616         (pass_in_v_vfp_candidate): New function.
2617         (aarch64_push_dummy_call): Check for float register candidates.
2618
2619 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2620
2621         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2622         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2623         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2624
2625 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2626
2627         PR build/23399
2628         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2629         (struct ipa_sym_addresses): Rename to...
2630         (struct ipa_sym_addresses_common): ... this.
2631         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2632
2633 2018-08-28  Tom Tromey  <tom@tromey.com>
2634
2635         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2636         (token_fifo): Now a std::vector.
2637         (yylex, c_parse): Update.
2638         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2639         (token_fifo): Now a std::vector.
2640         (yylex, d_parse): Update.
2641         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2642         (token_fifo): Now a std::vector.
2643         (yylex, go_parse): Update.
2644
2645 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2646
2647         * parser-defs.h (struct type_stack) <elements>: Change type to
2648         std::vector<union type_stack_elt>.
2649         <depth, size>: Remove.
2650         * parse.c (parse_exp_in_context_1): Adjust.
2651         (type_stack_reserve): Remove.
2652         (check_type_stack_depth): Remove.
2653         (insert_into_type_stack): Adjust to std::vector.
2654         (insert_type): Likewise.
2655         (push_type): Likewise.
2656         (push_type_int): Likewise.
2657         (insert_type_address_space): Likewise.
2658         (pop_type): Likewise.
2659         (pop_type_int): Likewise.
2660         (pop_typelist): Likewise.
2661         (pop_type_stack): Likewise.
2662         (append_type_stack): Likewise.
2663         (push_type_stack): Likewise.
2664         (get_type_stack): Likewise.
2665         (type_stack_cleanup): Likewise.
2666         (push_typelist): Likewise.
2667         (follow_types): Likewise.
2668         (_initialize_parse): Likewise.
2669
2670 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2671
2672         * NEWS: Mention csky target.
2673
2674 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2675             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2676             Don Breazeal  <donb@codesourcery.com>
2677
2678         * csky-linux-tdep.c: New file.
2679         * csky-tdep.c: Likewise.
2680         * csky-tdep.h: Likewise.
2681         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2682         csky-tdep.o.
2683         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2684         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2685         * configure.tgt: Add csky support.
2686
2687 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2688
2689         * python/py-framefilter.c (py_print_frame): Print frame architecture
2690         when printing on an MI output.
2691
2692 2018-08-27  Tom Tromey  <tom@tromey.com>
2693
2694         PR build/23087:
2695         * configure: Rebuild.
2696         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2697
2698 2018-08-27  Tom Tromey  <tom@tromey.com>
2699
2700         * aarch64-linux-tdep.c
2701         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2702         casts to int.
2703
2704 2018-08-27  Tom Tromey  <tom@tromey.com>
2705
2706         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2707         unsigned.
2708         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2709         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2710         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2711         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2712         unsigned.
2713
2714 2018-08-27  Tom Tromey  <tom@tromey.com>
2715
2716         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2717         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2718
2719 2018-08-27  Tom Tromey  <tom@tromey.com>
2720
2721         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2722         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2723         ULONGEST_MAX.
2724         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2725         ULONGEST_MAX.
2726         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2727         ULONGEST_MAX.
2728         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2729         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2730         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2731         ULONGEST_MAX.
2732         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2733         (ppc64_linux_sigaction_tramp_frame)
2734         (ppc32_linux_sighandler_tramp_frame)
2735         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2736         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2737         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2738         * mn10300-linux-tdep.c (am33_linux_sigframe)
2739         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2740         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2741         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2742         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2743         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2744         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2745         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2746         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2747         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2748         * microblaze-linux-tdep.c
2749         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2750         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2751         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2752         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2753         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2754         * common/common-types.h (ULONGEST_MAX): New define.
2755         (CORE_ADDR_MAX): Fix formatting.
2756         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2757         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2758         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2759         (arm_linux_rt_sigreturn_tramp_frame)
2760         (arm_eabi_linux_sigreturn_tramp_frame)
2761         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2762         (thumb2_eabi_linux_sigreturn_tramp_frame)
2763         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2764         (arm_linux_restart_syscall_tramp_frame)
2765         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2766         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2767         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2768         ULONGEST_MAX.
2769         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2770
2771 2018-08-27  Tom Tromey  <tom@tromey.com>
2772
2773         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2774         CORE_ADDR_MAX.
2775         * mips-tdep.c (mips_deal_with_atomic_sequence)
2776         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2777         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2778         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2779         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2780         CORE_ADDR_MAX.
2781         * aarch64-tdep.c (aarch64_software_single_step): Use
2782         CORE_ADDR_MAX.
2783
2784 2018-08-27  Tom Tromey  <tom@tromey.com>
2785
2786         * linespec.c (complete_linespec_component): Add cast to "char".
2787         * completer.c (completion_tracker::build_completion_result): Add
2788         cast to "char".
2789
2790 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2791
2792         * solist.h (struct solist, struct target_so_ops): Fix
2793         indentation.
2794
2795 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2796
2797         * ada-tasks.c (ada_task_info_s): Remove typedef.
2798         (DEF_VEC_O(ada_task_info_s)): Remove.
2799         (struct ada_tasks_inferior_data): Initialize fields.
2800         <task_list>: Make an std::vector.
2801         (get_ada_tasks_inferior_data): Allocate with new.
2802         (ada_get_task_number): Adjust.
2803         (get_task_number_from_id): Likewise.
2804         (valid_task_id): Likewise.
2805         (ada_get_task_info_from_ptid): Likewise.
2806         (iterate_over_live_ada_tasks): Likewise.
2807         (add_ada_task): Likewise.
2808         (read_known_tasks): Likewise.
2809         (ada_build_task_list): Likewise.
2810         (print_ada_task_info): Likewise.
2811         (info_task): Likewise.
2812         (task_command_1): Likewise.
2813
2814 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2815
2816         * ada-lang.c (add_angle_brackets): Return std::string.
2817
2818 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2819
2820         * python/py-threadevent.c (py_get_event_thread): Initialize
2821         pythread.
2822
2823 2018-08-24  Pedro Alves  <palves@redhat.com>
2824
2825         * python/py-bpevent.c (create_breakpoint_event_object): Use
2826         copy-initialization.
2827         * python/py-continueevent.c (emit_continue_event): Use
2828         copy-initialization.
2829         * python/py-exitedevent.c (create_exited_event_object): Return a
2830         gdbpy_ref<>.
2831         (emit_exited_event): Use copy-initialization.
2832         * python/py-inferior.c (python_new_inferior)
2833         (python_inferior_deleted, add_thread_object): Use
2834         copy-initialization.
2835         * python/py-infevents.c (create_inferior_call_event_object)
2836         (create_register_changed_event_object)
2837         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2838         (emit_inferior_call_event, emit_memory_changed_event)
2839         (emit_register_changed_event): Use copy-initialization.
2840         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2841         Return a gdbpy_ref<>.
2842         (emit_new_objfile_event): Use copy-initialization.
2843         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2844         (emit_clear_objfiles_event): Use copy-initialization.
2845         * python/py-signalevent.c (create_signal_event_object): Use
2846         copy-initialization.
2847         * python/py-threadevent.c (create_thread_event_object): Use
2848         copy-initialization.
2849
2850 2018-08-24  Pedro Alves  <palves@redhat.com>
2851             Simon Marchi  <simon.marchi@ericsson.com>
2852
2853         PR gdb/23379
2854         * python/py-continueevent.c: Include "gdbthread.h".
2855         (create_continue_event_object): Add intro comment.  Add 'ptid'
2856         parameter.  Use it to find thread to pass to
2857         create_thread_event_object.
2858         (emit_continue_event): Pass PTID down to
2859         create_continue_event_object.
2860         * python/py-event.h (py_get_event_thread): Declare.
2861         (create_thread_event_object): Remove default from 'thread'
2862         parameter.
2863         * python/py-stopevent.c (create_stop_event_object): Use
2864         py_get_event_thread.
2865         * python/py-threadevent.c (get_event_thread): Rename to ...
2866         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2867         and use it to find the thread.
2868         (create_thread_event_object): Assert that THREAD isn't null.
2869         Don't find the event thread here.
2870
2871 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2872
2873         * block.h (blockrange, blockranges): New struct declarations.
2874         (struct block): Add new field named `ranges'.
2875         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2876         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2877         macros for accessing ranges in struct block.
2878         (make_blockranges): New declaration.
2879         block.c (make_blockranges): New function.
2880         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2881         for block.
2882         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2883         * blockframe.c (cache_pc_function_block): New static global.
2884         (clear_pc_function_cache): Clear cache_pc_function_block.
2885         (find_pc_partial_function): Move comment to symtab.h.  Add
2886         support for non-contiguous blocks.
2887         * cli/cli-cmds.c (block.h): Include.
2888         (print_disassembly): Handle printing of non-contiguous blocks.
2889         (disassemble_current_function): Likewise.
2890         (disassemble_command): Likewise.
2891
2892         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2893         BLOCK_START.
2894         * blockframe.c (get_pc_function_start): Likewise.
2895         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2896         (gcc_symbol_address): Likewise.
2897         * compile/compile-object-run.c (compile_object_run): Likewise.
2898         * compile/compile.c (get_expr_block_and_pc): Likewise.
2899         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2900         (func_addr_to_tail_call_list): Likewise.
2901         * findvar.c (default_read_var_value): Likewise.
2902         * inline-frame.c (inline_frame_this_id): Likewise.
2903         (skip-inline_frames): Likewise.
2904         * infcmd.c (until_next_command): Likewise.
2905         * linespec.c (convert_linespec_to_sals): Likewise.
2906         * parse.c (parse_exp_in_context_1): Likewise.
2907         * printcmd.c (build_address_symbolic): likewise.
2908         (info_address_command): Likewise.
2909         symtab.c (find_function_start_sal): Likewise.
2910         (skip_prologue_sal): Likewise.
2911         (find_function_alias_target): Likewise.
2912         (find_gnu_ifunc): Likewise.
2913         * stack.c (find_frame_funname): Likewise.
2914         * symtab.c (fixup_symbol_section): Likewise.
2915         (find_function_start_sal): Likewise.
2916         (skip_prologue_sal): Likewsie.
2917         (find_function_alias_target): Likewise.
2918         (find_gnu_ifunc): Likewise.
2919         * tracepoint.c (info_scope_command): Likewise.
2920         * value.c (value_fn_field): Likewise.
2921
2922         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2923         in place of find_pc_partial_function.
2924         * blockframe.c (find_function_entry_range_from_pc): New function.
2925         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2926         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2927         for each range in a block.
2928
2929
2930 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2931
2932         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2933         incrementation.
2934
2935 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2936
2937         * solib-svr4.c (read_program_headers_from_bfd): Return
2938         gdb::optional<gdb::byte_vector>.
2939         (svr4_exec_displacement): Adjust.
2940
2941 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2942
2943         * solib-svr4.c (read_program_header): Return
2944         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2945         (find_program_interpreter): Return
2946         gdb::optional<gdb::byte_vector>.
2947         (scan_dyntag_auxv): Adjust.
2948         (enable_break): Adjust.
2949         (svr4_exec_displacement): Adjust.
2950
2951 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2952
2953         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2954         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2955
2956 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2957
2958         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2959         string_vprintf.
2960         * guile/scm-utils.c (gdbscm_printf): Likewise.
2961         * serial.c (serial_printf): Likewise.
2962         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2963
2964 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2965
2966         * stack.c (print_frame): Print frame architecture when printing on
2967         an MI output.
2968         * NEWS: Mention new "arch" attribute in frame output.
2969
2970 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2971
2972         * arch/aarch64.h (aarch64_regnum): Update comment.
2973
2974 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2975
2976         * NEWS: Add SVE to 8.2 section.
2977
2978 2018-08-21  Pedro Alves  <palves@redhat.com>
2979
2980         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2981         out from gdbscm_parse_function_args.
2982         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2983         gdbscm_parse_function_args_1.
2984
2985 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2986
2987         PR gdb/17816
2988         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2989         operator.
2990
2991 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2992
2993         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2994
2995 2018-08-19  Michael Spang  <spang@google.com>
2996
2997         PR gdb/11786
2998         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2999         for PT_TLS segments.
3000
3001 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3002
3003         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3004         dwarf_variable_value.
3005         * dwarf2-frame.c (class dwarf_expr_executor):
3006         Add override for dwarf_variable_value.
3007         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3008         (class symbol_needs_eval_context): Likewise.
3009         (indirect_synthetic_pointer): Add forward declaration.
3010         (sect_variable_value): New function.
3011         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3012         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3013         for DW_OP_GNU_variable_value.
3014
3015 2018-08-16  Tom Tromey  <tom@tromey.com>
3016
3017         * top.c (read_command_file): Update.
3018         (command_line_input): Remove "repeat" argument.
3019         * ada-lang.c (get_selections): Update.
3020         * linespec.c (decode_line_2): Update.
3021         * defs.h (command_line_input): Remove argument.
3022         * cli/cli-script.c (read_next_line): Update.
3023         * python/py-gdb-readline.c: Update.
3024
3025 2018-08-17  Tom Tromey  <tom@tromey.com>
3026
3027         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3028         command_line_input.
3029
3030 2018-08-15  Tom Tromey  <tom@tromey.com>
3031
3032         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3033
3034 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3035
3036         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3037         If used, use find_pc_partial_function to find address range
3038         to disassemble.
3039         * mi/mi-main.c (mi_cmd_list_features): Report
3040         "data-disassemble-a-option" feature.
3041         * NEWS: Mention new -data-disassemble option -a.
3042
3043 2018-08-13  Tom Tromey  <tom@tromey.com>
3044
3045         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3046
3047 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3048
3049         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3050         (aarch64_linux_collect_sve_regset): Likewise.
3051         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3052         * regcache.h (regcache_map_entry_size): New function.
3053
3054 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3055
3056         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3057         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3058         (SVE_HEADER_VL_LENGTH): Likewise.
3059         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3060         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3061         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3062         (SVE_HEADER_SIZE_OFFSET): Likewise.
3063         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3064         (SVE_HEADER_VL_OFFSET): Likewise.
3065         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3066         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3067         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3068         (SVE_HEADER_SIZE): Likewise.
3069         (aarch64_linux_core_read_vq): Add function.
3070         (aarch64_linux_core_read_description): Check for SVE section.
3071
3072 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3073
3074         * aarch64-fbsd-tdep.c
3075         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3076         collect_size.
3077         * aarch64-linux-tdep.c
3078         (aarch64_linux_iterate_over_regset_sections): Likewise.
3079         * alpha-linux-tdep.c
3080         (alpha_linux_iterate_over_regset_sections):
3081         * alpha-nbsd-tdep.c
3082         (alphanbsd_iterate_over_regset_sections): Likewise.
3083         * amd64-fbsd-tdep.c
3084         (amd64fbsd_iterate_over_regset_sections): Likewise.
3085         * amd64-linux-tdep.c
3086         (amd64_linux_iterate_over_regset_sections): Likewise.
3087         * arm-bsd-tdep.c
3088         (armbsd_iterate_over_regset_sections): Likewise.
3089         * arm-fbsd-tdep.c
3090         (arm_fbsd_iterate_over_regset_sections): Likewise.
3091         * arm-linux-tdep.c
3092         (arm_linux_iterate_over_regset_sections): Likewise.
3093         * corelow.c (get_core_registers_cb): Likewise.
3094         (core_target::fetch_registers): Likewise.
3095         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3096         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3097         * gdbarch.h (void): Regenerate.
3098         * gdbarch.sh: Add supply_size and collect_size.
3099         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3100         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3101         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3102         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3103         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3104         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3105         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3106         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3107         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3108         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3109         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3110         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3111         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3112         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3113         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3114         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3115         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3116         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3117         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3118         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3119         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3120         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3121         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3122         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3123         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3124         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3125         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3126         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3127         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3128         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3129
3130 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3131
3132         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3133         with string_printf.
3134
3135 2018-08-10  Keith Seitz  <keiths@redhat.com>
3136
3137         * compile/compile-c-support.c (add_code_header, add_code_footer):
3138         Move into policy class.
3139         (c_push_user_expression, pop_user_expression_nop)
3140         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3141         (compile_program): New host class.
3142         (c_compile_program): New typedef.
3143         (c_compute_porgram): Use c_compile_program.
3144
3145 2018-08-10  Keith Seitz  <keiths@redhat.com>
3146
3147         * compile/compile-internal.h (compile_instance::~compile_instance):
3148         Remove calls to htab_delete.
3149         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3150         * compile.c (compile_instance::compile_instance): Initialize
3151         htab unique pointers.
3152         (compile_instance::get_cached_type, compile_instance::insert_type)
3153         (compile_instance::error_symbol_once): Update for unique_ptr.
3154
3155 2018-08-10  Keith Seitz  <keiths@redhat.com>
3156
3157         * compile/compile-c-symbols.c (struct symbol_error)
3158         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3159         (compile_instance::insert_symbol_error)
3160         (compile_instance::error_symbol_once): Move to ...
3161         * compile/compile.c: ... here.
3162
3163 2018-08-10  Keith Seitz  <keiths@redhat.com>
3164
3165         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3166         instead of `new_compile_instance'.
3167         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3168         Update description.
3169         If the symbol error map is not initialized, create it.
3170         (generate_c_for_for_one_symbol): Do not check/initialize
3171         the symbol error map.
3172         * compile/compile-c-types.c (compile_c_instance): Make a class.
3173         Update all callers.
3174         (compile_instance::compile_instance): Initialize the type cache.
3175         (get_cached_type): New function.
3176         (insert_type): Update description.
3177         (compile_c_instance::m_default_cflags): Define.
3178         (convert_type): Update description.  Use get_cached_type.
3179         (delete_instance): Moved to destructor.
3180         (new_compile_instance): Moved to constructor.
3181         * compile/compile-c.h (compile_c_instance): Make class inheriting
3182         from compile_instance.
3183         <base>: Remove field.
3184         <type_map, symbol_err_map>: Move to base class.
3185         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3186         * compile/compile-internal.h (compile_instance): Make class.
3187         <type_map_t, symbol_err_map_t>: Define.
3188         <fe>: Rename to `m_gcc_fe'.
3189         <scope, block, gcc_target_options>: Add `m_' prefix.
3190         <m_type_map, m_symbol_err_map>: New fields, moved from
3191         compile_c_instance.
3192         <destroy>: Remove.
3193         (convert_type, new_compile_instance): Remove.
3194         * compile/compile.c (cleanup_compile_instance): Remove.
3195         (compile_to_object): Use unique_ptr to eliminate cleanups.
3196         (compile_instance::set_print_callback, compile_instance::version)
3197         (compile_instance::set_verbose)
3198         (compile_instance::set_driver_filename)
3199         (compile_instance::set_triplet_regexp)
3200         (compile_instance::set_arguments)
3201         (compile_instance::set_source_file)
3202         (compile_instance::compile): Define.
3203
3204 2018-08-10  Keith Seitz  <keiths@redhat.com>
3205
3206         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3207         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3208         gcc-c-fe.def to define C plugin.
3209         (delete_instance): Delete `c_plugin'.
3210         (new_compile_instance): Initialize `c_plugin'.
3211         * compile/compile-c.h: Include gcc_c_plugin.h.
3212         (struct compile_c_instance) <c_plugin>: New member.
3213         * gcc-c-plugin.h: New file.
3214         Update all callers with API change.
3215
3216 2018-08-10  Keith Seitz  <keiths@redhat.com>
3217
3218         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3219         (HFILES_NO_SRCDIR): ... to here.
3220         Add compile-internal.h and compile-c.h.
3221         * compile/compile-c-support.c: Include compile-c.h.
3222         * compile/compile-c-symbols.c: Include compile-c.h.
3223         (generate_c_for_variable_locations): Update comment.
3224         * compile/compile-c-types.c: Include compile-c.h.
3225         * compile/compile-c.h: New file -- moved C language declarations
3226         from other files here.
3227         * compile/compile-internal.h: Do not include hashtab.h or
3228         common/enum-flags.h.
3229         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3230         (gcc_convert_symbol, gcc_symbol_address)
3231         (generate_c_for_variable_locations, c_get_mode_for_size)
3232         (c_get_range_decl_name): Definitions moved to compile-c.h.
3233         * compile/compile-loc2c.c: Include compile-c.h.
3234
3235 2018-08-10  Keith Seitz  <keiths@redhat.com>
3236
3237         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3238         (c_symbol_substitution_name): ... this.
3239         Update all callers.
3240
3241 2018-08-10  Keith Seitz  <keiths@redhat.com>
3242
3243         * compile/compile-c-support.c (c_compute_program): Use
3244         unique_xmalloc_ptr to eliminate cleanup.
3245         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3246         Return a unique_xmalloc_ptr and eliminate cleanup.
3247         * compile/compile-internal.h (generate_c_for_variable_locations):
3248         Return unique_xmalloc_ptr and update description.
3249
3250 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3251
3252         * corelow.c (core_target::get_core_register_section): Rename
3253         min_size to section_min_size.
3254
3255 2018-08-09  Jim Wilson  <jimw@sifive.com>
3256
3257         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3258         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3259         * NEWS: Mention new GNU/Linux RISC-V target.
3260         * configure.host: Add riscv*-*-linux*.
3261         * configure.nat: Add riscv*.
3262         * configure.tgt: Add riscv*-*-linux*.
3263         * riscv-linux-nat.c: New file.
3264         * riscv-linux-tdep.c: New file.
3265
3266 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3267
3268         * infrun.c (resume): Make static, add forward declaration.
3269         (proceed): Update header comment.
3270         * infrun.h (resume): Delete declaration.
3271
3272 2018-08-09  Tom Tromey  <tom@tromey.com>
3273
3274         * riscv-tdep.h: Minor formatting fixes.
3275
3276 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3277
3278         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3279         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3280         (test_mkdir_recursive): Likewise.
3281         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3282
3283 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3284
3285         * valarith.c (value_subscripted_rvalue): If an array is not in
3286         memory, and we don't know the upper bound, then we can't know that
3287         the requested element exists or not.
3288
3289 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3290
3291         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3292         (target_options_to_string): Add comment.
3293
3294 2018-08-08  Tom Tromey  <tom@tromey.com>
3295
3296         * unittests/scoped_mmap-selftests.c: Check result of "write".
3297
3298 2018-08-08  Jim Wilson  <jimw@sifive.com>
3299
3300         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3301         (decode_register_index_short): New.
3302         (decode_j_type_insn, decode_cj_type_insn): New.
3303         (decode_b_type_insn, decode_cb_type_insn): New.
3304         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3305         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3306         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3307         is_c_sw_insn instead of is_sw_insn.
3308         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3309         (riscv_software_single_step): New.
3310         * riscv-tdep.h (riscv_software_single_step): Declare.
3311
3312         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3313         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3314
3315 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3316
3317         PR gdb/18050:
3318         * target.c (dispose_inferior): Don't dispose of inferiors that are
3319         already killed.
3320
3321 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3322
3323         * remote.c (remote_target::download_tracepoint): Change char* to
3324         const char*.
3325
3326 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3327
3328         * target.h (target_options_to_string): Return an std::string.
3329         * target.c (str_comma_list_concat_elem): Return void, use
3330         std::string.
3331         (do_option): Likewise.
3332         (target_options_to_string): Return an std::string.
3333         * linux-nat.c (linux_nat_target::wait): Adjust.
3334         * target-debug.h (target_debug_print_options): Adjust.
3335
3336 2018-08-07  Tom Tromey  <tom@tromey.com>
3337
3338         * Makefile.in (CPPFLAGS): New variable.
3339         (INTERNAL_CPPFLAGS): Use it.
3340
3341 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3342
3343         * NEWS: Mention the index cache.
3344
3345 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3346
3347         * common/pathstuff.h (get_standard_cache_dir): New.
3348         * common/pathstuff.c (get_standard_cache_dir): New.
3349         * build-id.h (build_id_to_string): New.
3350         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3351         DEBUG_STR_SUFFIX): Move to here.
3352         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3353         DEBUG_STR_SUFFIX): Move from there.
3354         (write_psymtabs_to_index): Make non-static, add basename
3355         parameter.  Write to temporary files, rename when done.
3356         (save_gdb_index_command): Adjust call to
3357         write_psymtabs_to_index.
3358         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3359         field.
3360         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3361         (get_gdb_index_contents_from_cache): New.
3362         (get_gdb_index_contents_from_cache_dwz): New.
3363         (dwarf2_initialize_objfile): Read index from cache.
3364         (dwarf2_build_psymtabs): Save to index.
3365         * dwarf-index-cache.h: New file.
3366         * dwarf-index-cache.c: New file.
3367         * dwarf-index-write.h: New file.
3368
3369 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3370
3371         * gnulib/aclocal.m4: Re-generate.
3372         * gnulib/config.in: Re-generate.
3373         * gnulib/configure: Re-generate.
3374         * gnulib/import/Makefile.am: Re-generate.
3375         * gnulib/import/Makefile.in: Re-generate.
3376         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3377         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3378         * gnulib/import/m4/mkdir.m4: New file.
3379         * gnulib/import/mkdir.c: New file.
3380         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3381         module.
3382
3383 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3384
3385         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3386         * common/scoped_mmap.c: New file.
3387         * common/scoped_mmap.h (destroy): New method.
3388         (~scoped_mmap, reset): Use destroy.
3389         (scoped_mmap): New move constructor.
3390         (mmap_file): New declaration.
3391         * unittests/scoped_mmap-selftests.c (test_normal,
3392         test_invalid_filename, run_tests): New functions.
3393         (_initialize_scoped_mmap_selftests): Register selftest.
3394
3395 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3396
3397         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3398         (read_gdb_index_from_buffer): ... this.  Remove section
3399         parameter, add buffer parameter.
3400         (get_gdb_index_contents_ftype,
3401         get_gdb_index_contents_dwz_ftype): New typedefs.
3402         (dwarf2_read_gdb_index): Add callback parameters to get the
3403         index contents.
3404         (get_gdb_index_contents_from_section): New.
3405         (dwarf2_initialize_objfile): Update call to
3406         dwarf2_read_gdb_index.
3407
3408 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3409
3410         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3411         (gdb_open_cloexec): Likewise.
3412         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3413         (commandline_from_pid): Likewise.
3414         (linux_xfer_osdata_threads): Likewise.
3415         (linux_xfer_osdata_fds): Likewise.
3416         * ada-lang.c (is_package_name): Likewise.
3417         * auxv.c (procfs_xfer_auxv): Likewise.
3418         * breakpoint.c (print_one_breakpoint_location): Use
3419         uiout::field_fmt.
3420         (print_one_catch_solib): Use string_printf.
3421         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3422         (add_pe_forwarded_sym): Likewise.
3423         * dwarf2read.c (create_type_unit_group): Likewise.
3424         (build_error_marker_type): Likewise.
3425         * infcall.c (get_function_name): Likewise.
3426         * valprint.c (print_converted_chars_to_obstack): Likewise.
3427         * xtensa-tdep.c (xtensa_register_type): Likewise.
3428
3429 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3430
3431         * remote.c (remote_target::download_tracepoint): Fix format
3432         string errors.
3433
3434 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3435
3436         * tracefile.c: Include common/byte-vector.h.
3437         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3438         with trace_regblock_size if needed.  Update uses of buf.
3439
3440 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3441
3442         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3443         std::vector<unsigned char>.
3444         * tracepoint.c (collection_list::collection_list): Remove
3445         m_regs_mask initializer from initializer list.  Resize
3446         m_regs_mask using the largest remote register number.
3447         (collection_list::add_remote_register): Remove size check on
3448         m_regs_mask.  Use at to access element.
3449         (collection_list::stringify): Change type of temp_buf to
3450         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3451         stringify the register mask.  Use pack_hex_byte for the register
3452         mask.
3453
3454 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3455
3456         * tracepoint.h (class collection_list) <add_register>: Remove.
3457         <add_remote_register, add_ax_registers, add_local_register>:
3458         Declare.
3459         <add_memrange>: Add scope parameter.
3460         * tracepoint.c (encode_actions_1): Likewise.
3461         (collection_list::add_register): Rename to ...
3462         (collection_list::add_remote_register): ... this.  Update
3463         comment.
3464         (collection_list::add_ax_registers, add_local_register): New
3465         methods.
3466         (collection_list::add_memrange): Add scope parameter.  Call
3467         add_local_register instead of add_register.
3468         (finalize_tracepoint_aexpr): New function.
3469         (collection_list::collect_symbol): Update calls to add_memrange.
3470         Call add_local_register instead of add_register.  Call
3471         add_ax_registers.  Call finalize_tracepoint_aexpr.
3472         (encode_actions_1): Get remote regnos for $reg action.  Call
3473         add_remote_register, add_ax_registers, and add_local_register.
3474         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3475         (validate_actionline): Call finalize_tracepoint_aexpr.
3476
3477 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3478
3479         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3480         Replace array buf with gdb::char_vector buf, of size
3481         get_remote_packet_size ().  Replace references to buf and
3482         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3483         and xsnprintf with snprintf.  Raise errors if the buffer is too
3484         small.
3485
3486 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3487
3488         * remote.c (remote_target::download_tracepoint): Fix the has_more
3489         predicate in the QTDP action list iteration.
3490
3491 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3492
3493         * remote.c (remote_target::download_tracepoint): Fix indentation
3494         in for block.
3495
3496 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3497
3498         * proc-api.c (_initialize_proc_api): Remove c, unused.
3499         * procfs.c (procfs_init_inferior): Remove signals, unused.
3500         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3501         unused.
3502
3503 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3504             Andrew Burgess  <andrew.burgess@embecosm.com>
3505
3506         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3507         'W_STOPCODE (0)' as this could be ambiguous.
3508
3509 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3510
3511         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3512         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3513         "ai_socktype").
3514
3515 2018-08-02  Tom Tromey  <tom@tromey.com>
3516
3517         PR symtab/16842.
3518         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3519         symbols.
3520         (process_structure_scope): Likewise.
3521
3522 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3523
3524         PR gdb/22629:
3525         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3526         kill inferior.
3527
3528 2018-08-02  Tom Tromey  <tom@tromey.com>
3529
3530         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3531         (darwin_suspend_inferior, darwin_resume_inferior)
3532         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3533         (darwin_check_new_threads): Check result of get_darwin_inferior.
3534
3535 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3536
3537         GDB 8.1.1 released.
3538
3539 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3540
3541         * varobj.c (varobj_get_path_expr_parent): Report an error if
3542         parent is a dynamic varobj.
3543
3544 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3545
3546         * gnulib/aclocal.m4: Re-generate.
3547         * gnulib/config.in: Re-generate.
3548         * gnulib/configure: Re-generate.
3549         * gnulib/import/Makefile.in: Re-generate.
3550         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3551         * gnulib/import/m4/onceonly.m4: Re-generate.
3552
3553 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3554
3555         * target-descriptions.c (struct xml_test_tdesc): New.
3556         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3557         (record_xml_tdesc): Update.
3558         (maintenance_check_xml_descriptions): Update.
3559         * target-descriptions.h (record_xml_tdesc): Update comment.
3560
3561 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3562
3563         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3564         checking array bounds are defined.
3565
3566 2018-07-30  Tom Tromey  <tom@tromey.com>
3567
3568         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3569         irreflexivity violation.
3570
3571 2018-07-30  Tom Tromey  <tom@tromey.com>
3572
3573         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3574         * value.c (unpack_long): Remove lint code.
3575         * valops.c (value_ind): Remove lint code.
3576         * valarith.c (value_x_binop, value_x_unop, value_equal)
3577         (value_pos): Remove lint code.
3578
3579 2018-07-28  Tom de Vries  <tdevries@suse.de>
3580
3581         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3582         with undefined upper bound as <optimized out>.
3583
3584 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3585
3586         * gcore.in: Rename variable "name" to "prefix".  Expand
3587         "usage" text.
3588
3589 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3590
3591         * windows-nat.c (windows_nat_target::create_inferior): Update to
3592         call close() in global namespace.
3593
3594 2018-07-26  Tom Tromey  <tom@tromey.com>
3595
3596         * dwarf-index-write.c (add_address_entry): Don't add objfile
3597         offsets.
3598         * dbxread.c (find_stab_function): Rename from
3599         find_stab_function_addr.  Return a bound_minimal_symbol.
3600         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3601         Don't add objfile offsets.
3602         (end_psymtab): Use raw_text_low, raw_text_high,
3603         MSYMBOL_VALUE_RAW_ADDRESS.
3604         (read_ofile_symtab): Update.
3605         (process_one_symbol): Update.
3606         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3607         offsets.
3608         (dw2_relocate): Remove.
3609         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3610         searching addrmap.
3611         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3612         Update.
3613         (process_psymtab_comp_unit_reader, add_partial_symbol)
3614         (add_partial_subprogram, dwarf2_ranges_read): Update.
3615         (load_partial_dies): Update.
3616         (add_address_entry): Don't add objfile offsets.
3617         (dwarf2_build_include_psymtabs): Update.
3618         (create_addrmap_from_aranges): Don't add objfile offsets.
3619         (dw2_find_pc_sect_compunit_symtab): Update.
3620         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3621         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3622         Update.
3623         (parse_partial_symbols): Don't add objfile offsets.  Use
3624         raw_text_low, raw_text_high.  Update.
3625         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3626         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3627         or call 'relocate' quick function.  Clear psymbol_map.
3628         * psympriv.h (struct partial_symbol) <address>: Add section
3629         offset.
3630         <set_unrelocated_address>: Rename from set_address.
3631         <raw_text_low, raw_text_high>: New methods.
3632         <text_low, text_high>: Add objfile parameter.
3633         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3634         set_unrelocated_address.
3635         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3636         (find_pc_psymbol): Update.
3637         (fixup_psymbol_section, relocate_psymtabs): Remove.
3638         (dump_psymtab, psym_functions): Update.
3639         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3640         parameter.
3641         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3642         (start_psymtab_common): Update.
3643         * symfile-debug.c (debug_qf_relocate): Remove.
3644         (debug_sym_quick_functions): Update.
3645         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3646         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3647         Update.
3648
3649 2018-07-26  Tom Tromey  <tromey@redhat.com>
3650
3651         * dbxread.c (end_psymtab): Use text_high_valid and
3652         text_low_valid.
3653         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3654         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3655         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3656         Update comment.
3657         <text_low_valid, text_high_valid>: New fields.
3658         <set_text_low, set_text_high>: Update.
3659         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3660
3661 2018-07-26  Tom Tromey  <tom@tromey.com>
3662
3663         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3664         Update.
3665         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3666         textlow and texthigh fields.
3667         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3668         Update.
3669         * mdebugread.c (parse_lines, parse_partial_symbols)
3670         (psymtab_to_symtab_1): Update.
3671         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3672         Rename fields.  Update comment.  Now private.
3673         <text_low, text_high, set_text_low, set_text_high>: New methods.
3674         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3675         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3676         (start_psymtab_common, maintenance_info_psymtabs)
3677         (maintenance_check_psymtabs): Update.
3678         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3679         texthigh fields.
3680         (scan_xcoff_symtab): Update.
3681
3682 2018-07-26  Tom Tromey  <tromey@redhat.com>
3683
3684         * psympriv.h (struct partial_symbol) <unrelocated_address,
3685         address, set_address>: New methods.
3686         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3687         (fixup_psymbol_section, relocate_psymtabs): Update.
3688         (print_partial_symbols): Add 'objfile' parameter.  Update.
3689         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3690         Update.
3691
3692 2018-07-26  Tom Tromey  <tom@tromey.com>
3693
3694         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3695         (debug_names::write_psymbols): Update.
3696         * psympriv.h (struct partial_symbol): Derive from
3697         general_symbol_info.
3698         <obj_section>: New method.
3699         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3700         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3701         (find_pc_sect_psymbol, fixup_psymbol_section)
3702         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3703         (print_partial_symbols, recursively_search_psymtabs)
3704         (compare_psymbols, psymbol_hash, psymbol_compare)
3705         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3706         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3707
3708 2018-07-26  Tom Tromey  <tromey@redhat.com>
3709
3710         * dbxread.c (end_psymtab): Remove dead code.
3711
3712 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3713
3714         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3715         DWARF unwinders are disabled.
3716         * dwarf2-frame.c: Add dwarf2read.h include.
3717         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3718         disabled.
3719         (dwarf2_frame_unwinders_enabled_p): Define.
3720         (show_dwarf_unwinders_enabled_p): New function.
3721         (_initialize_dwarf2_frame): Register switch to control DWARF
3722         unwinder use.
3723         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3724         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3725         (show_dwarf_cmdlist): Remove static keyword.
3726         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3727         (show_dwarf_cmdlist): Declare.
3728         * NEWS: Document new feature.
3729
3730 2018-07-26  Tom de Vries  <tdevries@suse.de>
3731
3732         PR breakpoints/23366
3733         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3734
3735 2018-07-26  Tom de Vries  <tdevries@suse.de>
3736
3737         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3738         DW_AT_count can't be translated to a dynamic prop.
3739
3740 2018-07-25  Tom de Vries  <tdevries@suse.de>
3741
3742         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3743         try/catch.
3744
3745 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3746
3747         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3748
3749 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3750
3751         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3752
3753 2018-07-24  Keith Seitz  <keiths@redhat.comt
3754
3755         PR symtab/23010
3756         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3757         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3758         instead of add_symbol_to_list.
3759         (read_file_scope): Call prepare_one_comp_unit before reading
3760         any other DIEs.
3761
3762 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3763
3764         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3765
3766 2018-07-24  Tom Tromey  <tom@tromey.com>
3767
3768         * utils.c (malloc, realloc, free): Don't declare.
3769         * configure, config.in: Rebuild.
3770         * configure.ac: Don't check for declarations of free, malloc, or
3771         realloc.
3772
3773 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3774
3775         * aarch64-linux-nat.c
3776         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3777         variable.
3778         * arm-linux-nat.c (fetch_regs): Likewise.
3779         (store_regs): Likewise.
3780         (fetch_vfp_regs): Likewise.
3781         (store_vfp_regs): Likewise.
3782         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3783         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3784         (arm_linux_nat_target::insert_watchpoint): Likewise.
3785         (arm_linux_nat_target::remove_watchpoint): Likewise.
3786         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3787         Likewise.
3788         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3789         Likewise.
3790         * ppc-linux-nat.c (fetch_register): Likewise.
3791         (fetch_all_gp_regs): Likewise.
3792         (fetch_ppc_registers): Likewise.
3793         (store_all_gp_regs): Likewise.
3794         (store_ppc_registers): Likewise.
3795         (hwdebug_insert_point): Likewise.
3796         (can_use_watchpoint_cond_accel): Likewise.
3797         * remote-sim.c (gdb_os_write_stdout): Likewise.
3798
3799 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3800             Tom Tromey  <tom@tromey.com>
3801
3802         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3803         test for it.
3804         * configure: Rebuild.
3805
3806 2018-07-22  Tom Tromey  <tom@tromey.com>
3807
3808         * regformats/regdat.sh: Define xmltarget_${name} inside
3809         #ifndef IN_PROCESS_AGENT.
3810
3811 2018-07-22  Tom Tromey  <tom@tromey.com>
3812
3813         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3814
3815 2018-07-22  Tom Tromey  <tom@tromey.com>
3816
3817         * symfile.c (reread_symbols): Notify iter, not objfile.
3818
3819 2018-07-22  Tom Tromey  <tom@tromey.com>
3820
3821         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3822         Use arch_ops.
3823         (ravenscar_thread_target::prepare_to_store): Likewise.
3824
3825 2018-07-22  Tom Tromey  <tom@tromey.com>
3826
3827         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3828         unused variable.  Call value_fetch_lazy when needed.
3829         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3830         Remove unused variable.  Call value_fetch_lazy when needed.
3831
3832 2018-07-22  Tom Tromey  <tom@tromey.com>
3833
3834         * m32c-tdep.c (mark_dma): Return void.
3835         (make_regs): Remove unused declarations.
3836
3837 2018-07-22  Tom Tromey  <tom@tromey.com>
3838
3839         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3840         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3841         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3842         bkscm_get_valid_block_smob_arg_unsafe for effect.
3843
3844 2018-07-22  Tom Tromey  <tom@tromey.com>
3845
3846         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3847         value_type.
3848
3849 2018-07-22  Tom Tromey  <tom@tromey.com>
3850
3851         * windows-nat.c (saved_context): Conditionally define.
3852         * remote.c (remote_target::remote_btrace_maybe_reopen):
3853         Conditionally declare "warned".
3854         * inflow.c (sigquit_ours): Conditionally define.
3855         (new_tty): Move "tty" declaration inside #if.
3856         * guile/guile.c (guile_datadir): Conditionally define.
3857         * charset.c (set_be_le_names): Move some declarations inside #if.
3858         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3859         #if.
3860         (parse_xml_btrace_conf): Likewise.
3861
3862 2018-07-22  Tom Tromey  <tom@tromey.com>
3863
3864         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3865
3866 2018-07-22  Tom Tromey  <tom@tromey.com>
3867
3868         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3869         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3870         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3871         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3872         * stack.c (frame_apply_level_command): Remove unused variable.
3873         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3874         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3875         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3876         unused variable.
3877         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3878         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3879         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3880         variable.
3881         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3882         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3883         variable.
3884         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3885         Remove unused variable.
3886         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3887         variable.
3888         * common/tdesc.c (print_xml_feature::visit): Remove unused
3889         variable.
3890         * compile/compile-object-load.c (store_regs): Remove unused
3891         variables.
3892         * complaints.c (clear_complaints): Remove unused variable.
3893         * corelow.c (core_target_open): Remove unused variable.
3894         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3895         variable.
3896         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3897         variable.
3898         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3899         variable.
3900         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3901         variable.
3902         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3903         variable.
3904         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3905         variable.
3906         * ia64-tdep.c (examine_prologue): Remove unused variable.
3907         * infcall.c (run_inferior_call): Remove unused variable.
3908         * inferior.c (exit_inferior): Remove unused variable.
3909         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3910         * linespec.c (decode_line_2): Remove unused variable.
3911         * linux-nat.c (super_close): Remove.
3912         * linux-tdep.c (linux_info_proc): Remove unused variable.
3913         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3914         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3915         Remove unused variable.
3916         * parse.c (find_minsym_type_and_address): Remove unused variable.
3917         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3918         variable.
3919         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3920         variable.
3921         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3922         variables.
3923         * record-btrace.c (record_btrace_target::store_registers): Remove
3924         unused variable.
3925         (cmd_show_record_btrace_cpu): Remove unused variable.
3926         * riscv-tdep.c (riscv_register_reggroup_p)
3927         (riscv_push_dummy_call, riscv_return_value): Remove unused
3928         variable.
3929         * rust-exp.y (literal): Remove unused variable.
3930         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3931         unused variable.
3932         <STRUCTOP_ANONYMOUS>: Likewise.
3933         * s390-linux-tdep.c (s390_linux_init_abi_31)
3934         (s390_linux_init_abi_64): Remove unused variable.
3935         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3936         (file_select_thread, net_windows_open, _initialize_ser_windows):
3937         Remove unused variables.
3938         * symtab.c (find_pc_sect_line): Remove unused variable.
3939         * target-memory.c (compute_garbled_blocks): Remove unused
3940         variable.
3941         (target_write_memory_blocks): Remove unused variable.
3942         * target.c (target_stack::unpush): Remove unused variables.
3943         * tracepoint.c (start_tracing, all_tracepoint_actions)
3944         (merge_uploaded_trace_state_variables)
3945         (print_one_static_tracepoint_marker): Remove unused variable.
3946         * unittests/basic_string_view/element_access/char/1.cc (test01):
3947         Remove unused variable.
3948         * windows-nat.c (windows_continue, windows_add_all_dlls)
3949         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3950         Remove unused variables.
3951
3952 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3953
3954         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3955         attr_profile in HAVE_ELF.
3956         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3957         HAVE_ELF.
3958
3959 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3960
3961         * frame.c (frame_register_unwind): Change parameter name.
3962         (frame_unwind_register): Likewise.
3963         (frame_unwind_register_value): Likewise.
3964         (frame_unwind_register_signed): Likewise.
3965         (frame_unwind_register_unsigned): Likewise.
3966         * frame.h (frame_register_unwind): Likewise.
3967         (frame_unwind_register): Likewise.
3968         (frame_unwind_register_value): Likewise.
3969         (frame_unwind_register_signed): Likewise.
3970         (frame_unwind_register_unsigned): Likewise.
3971         (frame_unwind_arch): Likewise.
3972
3973 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3974
3975         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3976         ISA maintenance.
3977
3978 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3979
3980         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3981         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3982         hand.
3983
3984 2018-07-20  Keith Seitz  <keiths@redhat.com>
3985
3986         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3987         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3988         m_compunit_symtab, m_language>: Add "m_" prefix.
3989         Update all uses.
3990         * buildsym.c: Update all uses.
3991
3992 2018-07-20  Tom Tromey  <tom@tromey.com>
3993
3994         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3995         * buildsym.h (record_line_ftype): Remove typedef.
3996
3997 2018-07-20  Tom Tromey  <tom@tromey.com>
3998
3999         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4000         (end_expandable_symtab): Likewise.
4001         (end_symtab_get_static_block): Likewise.
4002         (end_symtab_from_static_block): Likewise.
4003         * buildsym-legacy.c (augment_type_symtab): Remove.
4004         (end_expandable_symtab): Remove.
4005         (end_symtab_get_static_block): Remove.
4006         (end_symtab_from_static_block): Remove.
4007
4008 2018-07-20  Tom Tromey  <tom@tromey.com>
4009
4010         * dwarf2read.c: Include buildsym.h.
4011         (struct dwarf2_cu) <builder>: New method.
4012         (fixup_go_packaging): Update.
4013         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4014         use scoped_free_pendings.
4015         (using_directives): Add "cu" parameter, remove "language".
4016         (read_import_statement, setup_type_unit_groups, )
4017         (read_func_scope, read_lexical_block_scope)
4018         (dwarf2_record_block_ranges, read_namespace): Update.
4019         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4020         (lnp_state_machine::handle_end_sequence): Update.
4021         (class lnp_state_machine) <m_cu>: New member.
4022         <m_record_line_callback>: Remove.
4023         <m_currently_recording_lines>: New member.
4024         (lnp_state_machine::handle_set_file): Update.
4025         (noop_record_line): Remove.
4026         (dwarf_record_line_p): Add cu parameter.
4027         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4028         (lnp_state_machine::record_line)
4029         (lnp_state_machine::lnp_state_machine)
4030         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4031         (dwarf_decode_lines): Update.
4032         (dwarf2_start_subfile): Add cu parameter.
4033         (dwarf2_start_symtab, new_symbol): Update.
4034         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4035         Remove dwarf2_per_objfile parameter.
4036         (dwarf_decode_macros): Update.
4037
4038 2018-07-20  Tom Tromey  <tom@tromey.com>
4039
4040         * stabsread.c (define_symbol): Update.
4041         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4042         * dwarf2read.c (new_symbol): Update.
4043         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4044         * cp-namespace.c: Include buildsym.h.
4045         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4046         * buildsym-legacy.c (get_buildsym_compunit): New function.
4047
4048 2018-07-20  Tom Tromey  <tom@tromey.com>
4049
4050         * xcoffread.c: Include buildsym-legacy.h.
4051         * windows-nat.c: Include buildsym-legacy.h.
4052         * stabsread.c: Include buildsym-legacy.h.
4053         * mdebugread.c: Include buildsym-legacy.h.
4054         * buildsym-legacy.h: New file.
4055         * buildsym-legacy.c: New file, from buildsym.c.
4056         * go32-nat.c: Include buildsym-legacy.h.
4057         * dwarf2read.c: Include buildsym-legacy.h.
4058         * dbxread.c: Include buildsym-legacy.h.
4059         * cp-namespace.c: Include buildsym-legacy.h.
4060         * coffread.c: Include buildsym-legacy.h.
4061         * buildsym.h: Move some contents to buildsym-legacy.h.
4062         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4063         buildsym-legacy.c.
4064         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4065
4066 2018-07-20  Tom Tromey  <tom@tromey.com>
4067
4068         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4069         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4070         (buildsym_compunit::buildsym_compunit)
4071         (buildsym_compunit::~buildsym_compunit)
4072         (buildsym_compunit::get_macro_table): Define.
4073
4074 2018-07-20  Tom Tromey  <tom@tromey.com>
4075
4076         * buildsym.c (reset_symtab_globals): Remove.
4077         (buildsym_compunit::end_symtab_from_static_block): Update.
4078         (buildsym_compunit::augment_type_symtab): Update.
4079         (end_symtab_from_static_block): Call free_buildsym_compunit.
4080         (augment_type_symtab, end_symtab, end_expandable_symtab):
4081         Likewise.
4082
4083 2018-07-20  Tom Tromey  <tom@tromey.com>
4084
4085         * arch-utils.c: Do not include buildsym.h.
4086         * mipsread.c: Do not include buildsym.h.
4087         * machoread.c: Do not include buildsym.h.
4088         * elfread.c: Do not include buildsym.h.
4089
4090 2018-07-20  Tom Tromey  <tom@tromey.com>
4091
4092         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4093         initialization.
4094         (buildsym_compunit): Add new constructor.
4095         (struct buildsym_compunit) <get_last_source_file, finish_block,
4096         record_block_range, start_subfile, patch_subfile_names,
4097         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4098         set_last_source_start_addr, get_last_source_start_addr,
4099         get_local_using_directives, set_local_using_directives,
4100         get_global_using_directives, outermost_context_p,
4101         get_current_context_stack, get_context_stack_depth,
4102         get_current_subfile, get_local_symbols, get_file_symbols,
4103         get_global_symbols, record_debugformat, record_producer,
4104         push_context, pop_context, end_symtab_get_static_block,
4105         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4106         New public methods.
4107         <record_pending_block, finish_block_internal, make_blockvector,
4108         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4109         private methods.
4110         Update all users.
4111
4112 2018-05-22  Tom Tromey  <tom@tromey.com>
4113
4114         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4115         parameter.
4116         (finish_block_internal): Update.
4117
4118 2018-07-20  Tom Tromey  <tom@tromey.com>
4119
4120         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4121         parameter.
4122         (finish_block_internal): Update.
4123
4124 2018-07-20  Tom Tromey  <tom@tromey.com>
4125
4126         * buildsym.h (EXTERN): Don't define or undef.
4127         * buildsym.c (EXTERN): Don't define.
4128
4129 2018-07-20  Tom Tromey  <tom@tromey.com>
4130
4131         * buildsym.c: Remove TODO comment.
4132
4133 2018-07-20  Tom Tromey  <tom@tromey.com>
4134
4135         * coffread.c (coff_symtab_read): Update.
4136         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4137         (xcoff_new_init): Update.
4138         * mipsread.c (mipscoff_new_init): Update.
4139         * mdebugread.c (mdebug_build_psymtabs): Update.
4140         * elfread.c (elf_new_init): Update.
4141         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4142         Update.
4143         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4144         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4145         (stabsect_build_psymtabs): Update.
4146         * buildsym.h (buildsym_init): Don't declare.
4147         * buildsym.c: Update comment.
4148         (prepare_for_building): Remove.
4149         (start_symtab, restart_symtab): Update.
4150         (reset_symtab_globals): Update comment.
4151         (buildsym_init): Remove.
4152
4153 2018-07-20  Tom Tromey  <tom@tromey.com>
4154
4155         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4156         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4157         (read_enum_type, common_block_start, common_block_end)
4158         (cleanup_undefined_types_1, finish_global_stabs): Update.
4159         * mdebugread.c (psymtab_to_symtab_1): Update.
4160         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4161         (read_lexical_block_scope, new_symbol): Update.
4162         * dbxread.c (process_one_symbol): Update.
4163         * coffread.c (coff_symtab_read, process_coff_symbol)
4164         (coff_read_enum_type): Update.
4165         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4166         declare.
4167         (get_local_symbols, get_file_symbols, get_global_symbols): New
4168         functions.
4169         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4170         m_global_symbols.
4171         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4172         (~scoped_free_pendings): Update.
4173         (finish_block, prepare_for_building, reset_symtab_globals)
4174         (end_symtab_get_static_block, end_symtab_with_blockvector)
4175         (augment_type_symtab, push_context): Update.
4176         (get_local_symbols, get_file_symbols, get_global_symbols): New
4177         functions.
4178         (buildsym_init): Update.
4179
4180 2018-07-20  Tom Tromey  <tom@tromey.com>
4181
4182         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4183         (process_full_type_unit): Likewise.
4184         (dwarf2_start_symtab): Set list_in_scope.
4185
4186 2018-07-20  Tom Tromey  <tom@tromey.com>
4187
4188         * dwarf2read.c (process_psymtab_comp_unit_reader)
4189         (build_type_psymtabs_reader): Do not set list_in_scope.
4190
4191 2018-07-20  Tom Tromey  <tom@tromey.com>
4192
4193         * buildsym.c (free_pendings): Remove.
4194         (add_symbol_to_list, scoped_free_pendings)
4195         (finish_block_internal, buildsym_init): Update.
4196
4197 2018-07-20  Tom Tromey  <tom@tromey.com>
4198
4199         * xcoffread.c (read_xcoff_symtab): Update.
4200         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4201         Update.
4202         * dbxread.c (process_one_symbol): Update.
4203         * coffread.c (coff_symtab_read): Update.
4204         * buildsym.h (finish_block): Update.
4205         * buildsym.c (finish_block): Remove "listhead" argument.
4206         (end_symtab_get_static_block): Update.
4207
4208 2018-07-20  Tom Tromey  <tom@tromey.com>
4209
4210         * buildsym.h (class scoped_free_pendings): Remove constructor.
4211         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4212         method.
4213         <m_pending_block_obstack, m_pending_blocks>: New members.
4214         (pending_block_obstack, pending_blocks): Remove.
4215         (scoped_free_pendings::scoped_free_pendings): Default.
4216         (~scoped_free_pendings): Update.
4217         (free_pending_blocks): Remove.
4218         (finish_block_internal, record_pending_block, make_blockvector)
4219         (end_symtab_get_static_block, augment_type_symtab, push_context)
4220         (buildsym_init): Update.
4221
4222 2018-07-20  Tom Tromey  <tom@tromey.com>
4223
4224         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4225         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4226         members.
4227         (pending_addrmap, pending_addrmap_obstack)
4228         (pending_addrmap_interesting): Remove.
4229         (scoped_free_pendings, record_block_range, make_blockvector)
4230         (prepare_for_building, reset_symtab_globals, buildsym_init):
4231         Update.
4232
4233 2018-07-20  Tom Tromey  <tom@tromey.com>
4234
4235         * xcoffread.c (process_linenos): Update.
4236         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4237         * mdebugread.c (psymtab_to_symtab_1): Update.
4238         * dwarf2read.c (setup_type_unit_groups)
4239         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4240         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4241         * dbxread.c (process_one_symbol): Update.
4242         * coffread.c (coff_symtab_read, enter_linenos)
4243         (process_coff_symbol): Update.
4244         * buildsym.h (current_subfile): Don't declare.
4245         (get_current_subfile): Declare.
4246         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4247         member.
4248         (start_subfile, free_buildsym_compunit, push_subfile)
4249         (prepare_for_building, start_symtab): Update.
4250         (get_current_subfile): New function.
4251
4252 2018-07-20  Tom Tromey  <tom@tromey.com>
4253
4254         * coffread.c (coff_symtab_read): Update.
4255         * xcoffread.c (read_xcoff_symtab): Update.
4256         * dwarf2read.c (new_symbol): Update.
4257         (read_func_scope, read_lexical_block_scope): Update.
4258         * dbxread.c (process_one_symbol): Update.
4259         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4260         (outermost_context_p): Remove macro.
4261         (outermost_context_p, get_current_context_stack)
4262         (get_context_stack_depth): Declare.
4263         (pop_context): Return struct context_stack.
4264         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4265         member.
4266         (context_stack_size): Remove.
4267         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4268         (prepare_for_building, end_symtab_get_static_block)
4269         (augment_type_symtab, push_context): Update.
4270         (pop_context): Return struct context_stack.
4271         (outermost_context_p, get_current_context_stack)
4272         (get_context_stack_depth): New functions.
4273         (buildsym_init): Update.
4274
4275 2018-07-20  Tom Tromey  <tom@tromey.com>
4276
4277         * rust-exp.y: Now a pure parser.  Update all rules.
4278         (%union): Move earlier.
4279         (current_parser, work_obstack): Remove globals.
4280         (rust_parser, ~rust_parser): Update.
4281         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4282         lex_character, lex_number, lex_string, lex_identifier,
4283         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4284         convert_name, convert_params_to_expression,
4285         convert_ast_to_expression, ast_basic_type, ast_operation,
4286         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4287         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4288         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4289         ast_array_type, ast_slice_type, ast_reference_type,
4290         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4291         (rust_parse): Update.
4292         (rustyyerror, rustyylex): Add parser parameter.
4293         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4294         (rust_lex_stringish_test, rust_lex_test_sequence)
4295         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4296         (rust_lex_test_push_back, rust_lex_tests): Update.
4297
4298 2018-07-19  Pedro Alves  <palves@redhat.com>
4299
4300         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4301         gdb::unique_xmalloc_ptr.
4302         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4303         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4304         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4305         copy-initialization.
4306         * guile/scm-pretty-print.c (ppscm_print_children): Use
4307         gdb::unique_xmalloc_ptr instead of cleanups.
4308         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4309         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4310         gdb::unique_xmalloc_ptr.
4311         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4312         Adjust to use gdb::unique_xmalloc_ptr.
4313         * guile/scm-utils.c (extract_arg): Adjust.
4314         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4315         gdb::unique_xmalloc_ptr instead of a cleanup.
4316
4317 2018-07-19  Tom Tromey  <tom@tromey.com>
4318
4319         * utils.c (do_value_free_to_mark)
4320         (make_cleanup_value_free_to_mark): Remove.
4321         * utils.h (make_cleanup_value_free_to_mark): Remove.
4322
4323 2018-07-19  Pedro Alves  <palves@redhat.com>
4324
4325         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4326         forwarding reference.
4327
4328 2018-07-18  Pedro Alves  <palves@redhat.com>
4329
4330         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4331         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4332         cleanup.
4333
4334 2018-07-18  Pedro Alves  <palves@redhat.com>
4335
4336         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4337         exceptions.
4338         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4339         (gdbscm_wrap): New.
4340         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4341         directly instead of a cleanup.
4342         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4343         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4344         (vlscm_binop_gdbthrow): New, factored out from ...
4345         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4346         (vlscm_rich_compare): Use gdbscm_wrap.
4347         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4348         instead of a cleanup.
4349         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4350         cleanup.
4351         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4352         Use xfree directly instead of a cleanup.
4353         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4354         Adjust to use gdbscm_wrap and scoped_value_mark.
4355         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4356         (gdbscm_value_address, gdbscm_value_dereference)
4357         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4358         scoped_value_mark.
4359         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4360         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4361         scoped_value_mark.
4362         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4363         gdbscm_wrap and scoped_value_mark.
4364         (gdbscm_value_to_string): Use xfree directly instead of a
4365         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4366         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4367         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4368         scoped_value_mark.
4369         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4370         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4371         scoped_value_mark.
4372         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4373         gdbscm_wrap.
4374
4375 2018-07-18  Tom de Vries  <tdevries@suse.de>
4376
4377         * findvar.c (default_read_var_value): Also resolve dynamic type for
4378         LOC_OPTIMIZED_OUT vars.
4379
4380 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4381
4382         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4383         decoding.
4384
4385 2018-07-17  Tom Tromey  <tom@tromey.com>
4386
4387         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4388         (compute_enum_list, pascm_set_param_value_x)
4389         (gdbscm_parameter_value): Update.
4390         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4391         (gdbscm_scm_to_host_string): Update.
4392         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4393         Update.
4394         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4395         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4396         * guile/scm-string.c (gdbscm_scm_to_string): Return
4397         unique_xmalloc_ptr.
4398         (gdbscm_scm_to_host_string): Likewise.
4399
4400 2018-07-17  Tom Tromey  <tom@tromey.com>
4401
4402         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4403         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4404         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4405         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4406         unique_xmalloc_ptr.
4407
4408 2018-07-17  Tom Tromey  <tom@tromey.com>
4409
4410         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4411         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4412         Update.
4413         * guile/scm-cmd.c (cmdscm_function): Update.
4414         * guile/scm-pretty-print.c
4415         (ppscm_print_exception_unless_memory_error): Update.
4416         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4417         Return unique_xmalloc_ptr.
4418
4419 2018-07-17  Tom Tromey  <tom@tromey.com>
4420
4421         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4422         Use string_printf.
4423
4424 2018-07-17  Jim Wilson  <jimw@sifive.com>
4425
4426         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4427         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4428         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4429         unecessary braces after EF_RISCV_RVC test.  Delete call to
4430         set_gdbarch_decr_pc_after_break.
4431
4432         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4433         RISCV_LAST_FP_REGNUM + 1.
4434         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4435
4436 2018-07-17  Tom Tromey  <tom@tromey.com>
4437
4438         * configure.ac: Remove --disable-gdbcli.
4439         * configure: Rebuild.
4440         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4441         (SUBDIR_CLI_CFLAGS): Remove.
4442         (SFILES): Use SUBDIR_CLI_SRCS.
4443         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4444
4445 2018-07-17  Tom Tromey  <tom@tromey.com>
4446
4447         PR gdb/18624:
4448         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4449
4450 2018-07-16  Jim Wilson  <jimw@sifive.com>
4451
4452         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4453
4454 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4455
4456         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4457         variable.
4458         (libunwind_frame_sniffer): Likewise.
4459         (libunwind_frame_prev_register): Likewise.
4460         (libunwind_sigtramp_frame_sniffer): Likewise.
4461         * ia64-tdep.c (ia64_access_reg): Likewise.
4462         (ia64_access_rse_reg): Likewise.
4463         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4464         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4465
4466 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4467
4468         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4469
4470 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4471
4472         * remote-sim.c (gdbsim_target::close,
4473         gdbsim_target::mourn_inferior): Remove unused variables.
4474
4475 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4476
4477         * ia64-tdep.c (ktab_buf): New global.
4478         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4479         (get_kernel_table): Adjust.
4480
4481 2018-07-16  Tom Tromey  <tom@tromey.com>
4482
4483         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4484         * dwarf2read.c (using_directives, new_symbol): Use
4485         outermost_context_p.
4486         * dbxread.c (process_one_symbol): Use outermost_context_p.
4487         * coffread.c (coff_symtab_read): Use outermost_context_p.
4488
4489 2018-07-16  Tom Tromey  <tom@tromey.com>
4490
4491         * dwarf2read.c (using_directives, read_func_scope)
4492         (read_lexical_block_scope): Update.
4493         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4494         * buildsym.h (local_using_directives, global_using_directives):
4495         Don't declare.
4496         (get_local_using_directives, set_local_using_directives)
4497         (get_global_using_directives): Declare.
4498         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4499         m_global_using_directives>: New members.
4500         (finish_block_internal, prepare_for_building)
4501         (reset_symtab_globals, end_symtab_get_static_block)
4502         (push_context): Update.
4503         (get_local_using_directives, set_local_using_directives)
4504         (get_global_using_directives): New functions.
4505         (buildsym_init): Update.
4506
4507 2018-07-16  Tom Tromey  <tom@tromey.com>
4508
4509         * xcoffread.c (xcoff_initial_scan): Don't call
4510         free_pending_blocks.
4511         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4512         * buildsym.h (class scoped_free_pendings): Add constructor.
4513         (free_pending_blocks): Don't declare.
4514         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4515         (free_pending_blocks): Now static.
4516
4517 2018-07-16  Tom Tromey  <tom@tromey.com>
4518
4519         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4520         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4521         member.
4522         (struct subfile_stack): Remove.
4523         (subfile_stack): Remove.
4524         (push_subfile, pop_subfile, buildsym_init): Update.
4525
4526 2018-07-16  Tom Tromey  <tom@tromey.com>
4527
4528         * buildsym.c (push_subfile): Use gdb_assert.
4529         (pop_subfile): Use gdb_assert.
4530
4531 2018-07-16  Tom Tromey  <tom@tromey.com>
4532
4533         * buildsym.h (merge_symbol_lists): Remove.
4534         * buildsym.c (merge_symbol_lists): Remove.
4535
4536 2018-07-16  Tom Tromey  <tom@tromey.com>
4537
4538         * stabsread.c (scan_file_globals): Update comment.
4539         * stabsread.h (scan_file_globals): Move from buildsym.h.
4540         * buildsym.h (scan_file_globals): Move to stabsread.h.
4541
4542 2018-07-16  Tom Tromey  <tom@tromey.com>
4543
4544         * xcoffread.c (xcoff_new_init): Update.
4545         * mipsread.c (mipscoff_new_init): Update.
4546         * mdebugread.c (mdebug_build_psymtabs): Update.
4547         * elfread.c (elf_new_init): Update.
4548         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4549         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4550         * buildsym.h (buildsym_new_init): Don't declare.
4551         * buildsym.c (buildsym_new_init): Remove.
4552
4553 2018-07-16  Tom Tromey  <tom@tromey.com>
4554
4555         * stabsread.h (within_function): Move from buildsym.h.
4556         * stabsread.c (start_stabs): Clear within_function.
4557         * coffread.c (coff_start_symtab): Clear within_function.
4558         * buildsym.h (within_function): Move to stabsread.h.
4559         * buildsym.c (prepare_for_building): Update.
4560
4561 2018-07-16  Tom Tromey  <tom@tromey.com>
4562
4563         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4564         * dwarf2read.c (dwarf2_start_symtab): Don't set
4565         processing_gcc_compilation.
4566         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4567
4568 2018-07-16  Tom Tromey  <tom@tromey.com>
4569
4570         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4571         (next_symbol_text_func): Move from buildsym.h.
4572         * stabsread.c (hashname): Move from buildsym.c.
4573         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4574         (next_symbol_text_func, hashname): Move to stabsread.h.
4575         * buildsym.c: Don't include bcache.h
4576         (hashname): Move to stasbread.c.
4577
4578 2018-07-16  Tom Tromey  <tom@tromey.com>
4579
4580         * buildsym.h (context_stack_size): Don't declare.
4581         * buildsym.c (context_stack_size): New global.
4582
4583 2018-07-16  Tom Tromey  <tom@tromey.com>
4584
4585         * dbxread.c (processing_acc_compilation): New global.
4586         * buildsym.h (processing_acc_compilation): Don't declare.
4587
4588 2018-07-16  Tom Tromey  <tom@tromey.com>
4589
4590         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4591         * dbxread.c (read_ofile_symtab): Update.
4592         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4593         * buildsym.h (last_source_start_addr): Remove.
4594         (set_last_source_start_addr, get_last_source_start_addr):
4595         Declare.
4596         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4597         parameter.
4598         (struct buildsym_compunit) <m_last_source_start_addr>: New
4599         member.
4600         (prepare_for_building): Remove start_addr parameter.
4601         (start_symtab, restart_symtab, end_symtab_get_static_block)
4602         (end_symtab_with_blockvector): Update.
4603         (set_last_source_start_addr, get_last_source_start_addr): New
4604         functions.
4605
4606 2018-07-16  Tom Tromey  <tom@tromey.com>
4607
4608         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4609         member.
4610         (have_line_numbers): Remove.
4611         (record_line, prepare_for_building, end_symtab_get_static_block)
4612         (augment_type_symtab): Update.
4613
4614 2018-07-16  Tom Tromey  <tom@tromey.com>
4615
4616         * buildsym.c (~buildsym_compunit): Free the macro table.
4617         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4618         methods.
4619         <m_pending_macros>: New member.
4620         (pending_macros): Remove.
4621         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4622         (reset_symtab_globals, end_symtab_get_static_block)
4623         (end_symtab_with_blockvector, augment_type_symtab)
4624         (buildsym_init): Update.
4625
4626 2018-07-16  Tom Tromey  <tom@tromey.com>
4627
4628         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4629         parameter.
4630         (buildsym_compunit::set_last_source_file): New method.
4631         <m_last_source_file>: New member.
4632         (prepare_for_building): Remove "name" parameter.
4633         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4634         (last_source_file): Remove.
4635         (set_last_source_file, get_last_source_file): Update.
4636
4637 2018-07-16  Tom Tromey  <tom@tromey.com>
4638
4639         * buildsym.c (prepare_for_building): Add assert.
4640
4641 2018-07-16  Tom Tromey  <tom@tromey.com>
4642
4643         * buildsym.c (~buildsym_compunit): Update.
4644         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4645         (start_subfile, patch_subfile_names)
4646         (end_symtab_with_blockvector): Update.
4647
4648 2018-07-16  Tom Tromey  <tom@tromey.com>
4649
4650         * buildsym.c (struct buildsym_compunit): Add constructor,
4651         destructor, initializers.
4652         (start_buildsym_compunit): Remove.
4653         (free_buildsym_compunit): Use "delete".
4654         (start_symtab, restart_symtab): Use "new".
4655
4656 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4657
4658         * symfile.c (set_objfile_default_section_offset): Remove struct
4659         keyword.
4660
4661 2018-07-14  Stafford Horne  <shorne@gmail.com>
4662
4663         * (Responsible Maintainers): Add myself as or1k maintainer.
4664
4665 2018-07-13  Tom Tromey  <tom@tromey.com>
4666
4667         * symfile.c (set_objfile_default_section_offset): Use extra braces
4668         around initializer.
4669
4670 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4671
4672         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4673         non-branching basr.
4674
4675 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4676
4677         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4678         unittests/cli-utils-selftests.c
4679         * unittests/cli-utils-selftests.c: New file.
4680
4681 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4682
4683         * NEWS: Mention new commands. Mention change to 'thread apply'.
4684
4685 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4686
4687         * thread.c (thr_try_catch_cmd): New function.
4688         (thread_apply_all_command): Handle qcs flags.
4689         (thread_apply_command): Handle qcs flags.
4690         (taas_command): New function.
4691         (tfaas_command): New function.
4692         (_initialize_thread): Update to setup the new commands 'taas
4693         and 'tfaas'. Change doc string for 'thread apply'.
4694
4695 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4696
4697         * stack.c: (trailing_outermost_frame): New function, mostly
4698         extracted from backtrace_command_1.
4699         (leading_innermost_frame): New function.
4700         (backtrace_command_1): Update to call trailing_outermost_frame.
4701         (frame_apply_command_count): New function.
4702         (frame_apply_level_command): New function.
4703         (frame_apply_all_command): New function.
4704         (frame_apply_command): New function.
4705         (faas_command): New function.
4706         (frame_cmd_list): New variable.
4707         (_initialize_stack): Update to setup the new commands 'frame apply'
4708         and 'faas'.
4709
4710 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4711
4712         * cli-utils.c (number_or_range_parser::get_number): Only handle
4713         numbers or convenience var as numbers.
4714         (parse_flags): New function.
4715         (parse_flags_qcs): New function.
4716         (number_or_range_parser::finished): Ensure parsing end is detected
4717         before end of string.
4718         * cli-utils.h (parse_flags): New function.
4719         (parse_flags_qcs): New function.
4720         (number_or_range_parser): Remove m_finished bool.
4721         (number_or_range_parser::skip_range): Set m_in_range to false.
4722
4723 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4724
4725         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4726         on Windows.
4727
4728 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4729             Jan Kratochvil  <jan.kratochvil@redhat.com>
4730             Paul Fertser  <fercerpav@gmail.com>
4731             Tsutomu Seki  <sekiriki@gmail.com>
4732             Pedro Alves  <palves@redhat.com>
4733
4734         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4735         'unittests/parse-connection-spec-selftests.c'.
4736         (COMMON_SFILES): Add 'common/netstuff.c'.
4737         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4738         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4739         * common/netstuff.c: New file.
4740         * common/netstuff.h: New file.
4741         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4742         (wait_for_connect): Update comment.  New parameter
4743         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4744         Use 'sock' directly instead of 'scb->fd'.
4745         (try_connect): New function, with code from 'net_open'.
4746         (net_open): Rewrite main loop to deal with multiple
4747         sockets/addresses.  Handle IPv6-style hostnames; implement
4748         support for IPv6 connections.
4749         * unittests/parse-connection-spec-selftests.c: New file.
4750
4751 2018-07-11  Pedro Alves  <palves@redhat.com>
4752
4753         PR gdb/23377
4754         * remote.c (remote_target::remote_detach_pid): Call
4755         set_current_process.
4756
4757 2018-07-11  Pedro Alves  <palves@redhat.com>
4758
4759         * h8300-tdep.c (h8300_gdbarch_init): Remove
4760         set_gdbarch_ecoff_reg_to_regnum calls.
4761
4762 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4763
4764         PR c++/23373
4765         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4766         offsets/sizes for static members of a class/struct.
4767
4768 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4769
4770         * target-descriptions.c (tdesc_register_bitsize): Rename.
4771         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4772         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4773         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4774
4775 2018-07-10  Tom Tromey  <tom@tromey.com>
4776
4777         * breakpoint.c (moribund_locations): Now static and a
4778         std::vector.
4779         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4780         (build_bpstat_chain, update_global_location_list)
4781         (breakpoint_retire_moribund): Update.
4782         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4783         VEC.
4784
4785 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4786
4787         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4788         (riscv_register_reggroup_p): Use new function, remove unneeded
4789         parenthesis.
4790         (riscv_push_dummy_call): Extend assert to compare against xlen or
4791         flen based on register type.
4792
4793 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4794
4795         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4796
4797 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4798
4799         * remote.c (show_hardware_watchpoint_limit): New function.
4800         (show_hardware_watchpoint_length_limit): New function.
4801         (show_hardware_breakpoint_limit): New function.
4802         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4803         where appropriate, update help text.
4804
4805 2018-07-09  Tom Tromey  <tom@tromey.com>
4806
4807         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4808         (CLIBS): Don't mention NAT_CLIBS.
4809
4810 2018-07-09  Tom Tromey  <tom@tromey.com>
4811
4812         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4813         (LIBGDB_OBS, clean mostlyclean): Update.
4814         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4815
4816 2018-07-09  Tom Tromey  <tom@tromey.com>
4817
4818         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4819         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4820         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4821
4822 2018-07-09  Tom Tromey  <tom@tromey.com>
4823
4824         * Makefile.in (ALLDEPFILES): Remove exec.c.
4825         (COMMON_OBS): Remove exec.o.
4826         (COMMON_SFILES): Add exec.c.
4827
4828 2018-07-09  Tom Tromey  <tom@tromey.com>
4829
4830         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4831
4832 2018-07-09  Tom Tromey  <tom@tromey.com>
4833
4834         * Makefile.in (clean mostlyclean): Remove stamp-version.
4835         (version.c): Depend on stamp-version.
4836         (stamp-version): New rule, from version.c rule.
4837
4838 2018-07-09  Tom Tromey  <tom@tromey.com>
4839
4840         * Makefile.in (init.c): Depend on stamp-init.
4841         (stamp-init): New rule, from init.c rule.
4842         (clean mostlyclean): Remove stamp-init.
4843
4844 2018-07-09  Tom Tromey  <tom@tromey.com>
4845
4846         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4847         SUBDIR_GCC_COMPILE_SRCS.
4848
4849 2018-07-09  Tom Tromey  <tom@tromey.com>
4850
4851         * Makefile.in (init.c): Remove some unused sed rules.
4852
4853 2018-07-09  Tom Tromey  <tom@tromey.com>
4854
4855         * Makefile.in (TSOBS): Remove.
4856         (INIT_FILES): Update.
4857         (LIBGDB_OBS): Update.
4858         (COMMON_SFILES): Add inflow.c.
4859         (SFILES): Remove inflow.c.
4860
4861 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4862
4863         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4864
4865 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4866
4867         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4868         get_saveloc_name, is_signal_frame_name, step_name,
4869         init_remote_name, create_addr_space_name,
4870         destroy_addr_space_name, search_unwind_table_name,
4871         find_dyn_list_name): Constify.
4872
4873 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4874
4875         * darwin-nat.c (darwin_pthread_kill): New function.
4876         (darwin_resume_thread): Use darwin_pthread_kill.
4877
4878 2018-07-05  Tom de Vries  <tdevries@suse.de>
4879
4880         * macroexp.c (macro_buffer) <operator=>: New member function.
4881
4882 2018-07-04  Tom Tromey  <tom@tromey.com>
4883
4884         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4885
4886 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4887
4888         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4889         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4890         * maint.c: Likewise.
4891         * top.c: Likewise.
4892
4893 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4894
4895         * NEWS: Create a new section for the next release branch.
4896         Rename the section of the current branch, now that it has
4897         been cut.
4898
4899 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4900
4901         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4902         * version.in: Bump version to 8.2.50.DATE-git.
4903
4904 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4905             Pedro Alves  <palves@redhat.com>
4906
4907         * linux-nat.c (linux_init_ptrace): Rename to ...
4908         (linux_init_ptrace_procfs): ... this.  Call
4909         linux_proc_init_warnings.
4910         (linux_nat_target::post_attach)
4911         (linux_nat_target::post_startup_inferior): Adjust.
4912         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4913         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4914
4915 2018-07-04  Tom de Vries  <tdevries@suse.de>
4916
4917         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4918         check ...
4919         (read_comp_unit_head): ... here.
4920
4921 2018-07-03  Tom Tromey  <tom@tromey.com>
4922
4923         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4924         (stop_tracing, tstatus_command)
4925         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4926         (print_one_static_tracepoint_marker): Update.
4927         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4928         std::vector.
4929         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4930         VEC.
4931         (all_tracepoints, static_tracepoints_here): Return std::vector.
4932
4933 2018-07-03  Tom Tromey  <tom@tromey.com>
4934
4935         * common/ptid.c (ptid_equal): Remove.
4936         * common/ptid.h (ptid_equal): Don't declare.
4937         * ada-tasks.c: Update.
4938         * breakpoint.c: Update.
4939         * common/agent.c: Update.
4940         * corelow.c: Update.
4941         * darwin-nat-info.c: Update.
4942         * darwin-nat.c: Update.
4943         * dcache.c: Update.
4944         * dtrace-probe.c: Update.
4945         * dummy-frame.c: Update.
4946         * fbsd-nat.c: Update.
4947         * frame.c: Update.
4948         * gdbthread.h: Update.
4949         * gnu-nat.c: Update.
4950         * go32-nat.c: Update.
4951         * inf-loop.c: Update.
4952         * inf-ptrace.c: Update.
4953         * infcall.c: Update.
4954         * infcmd.c: Update.
4955         * inflow.c: Update.
4956         * infrun.c: Update.
4957         * linux-fork.c: Update.
4958         * linux-nat.c: Update.
4959         * linux-thread-db.c: Update.
4960         * mi/mi-cmd-var.c: Update.
4961         * mi/mi-interp.c: Update.
4962         * mi/mi-main.c: Update.
4963         * nto-procfs.c: Update.
4964         * ppc-linux-tdep.c: Update.
4965         * procfs.c: Update.
4966         * python/py-inferior.c: Update.
4967         * python/py-record-btrace.c: Update.
4968         * python/py-record.c: Update.
4969         * ravenscar-thread.c: Update.
4970         * regcache.c: Update.
4971         * remote-sim.c: Update.
4972         * remote.c: Update.
4973         * sol-thread.c: Update.
4974         * solib.c: Update.
4975         * target.c: Update.
4976         * tui/tui-stack.c: Update.
4977         * varobj.c: Update.
4978         * windows-nat.c: Update.
4979         * windows-tdep.c: Update.
4980
4981 2018-07-03  Tom Tromey  <tom@tromey.com>
4982
4983         * common/ptid.c (ptid_match): Remove.
4984         * common/ptid.h (ptid_match): Don't declare.
4985         * fbsd-nat.c: Update.
4986         * infcmd.c: Update.
4987         * infrun.c: Update.
4988         * linux-nat.c: Update.
4989         * record-btrace.c: Update.
4990         * regcache.c: Update.
4991         * remote.c: Update.
4992
4993 2018-07-03  Tom Tromey  <tom@tromey.com>
4994
4995         * common/ptid.c (ptid_tid_p): Remove.
4996         * common/ptid.h (ptid_tid_p): Don't declare.
4997         * sol-thread.c: Update.
4998
4999 2018-07-03  Tom Tromey  <tom@tromey.com>
5000
5001         * common/ptid.c (ptid_lwp_p): Remove.
5002         * common/ptid.h (ptid_lwp_p): Don't declare.
5003         * fbsd-nat.c: Update.
5004         * linux-nat.c: Update.
5005         * nat/linux-procfs.c: Update.
5006         * nat/x86-linux-dregs.c: Update.
5007         * sol-thread.c: Update.
5008
5009 2018-07-03  Tom Tromey  <tom@tromey.com>
5010
5011         * common/ptid.c (ptid_is_pid): Remove.
5012         * common/ptid.h (ptid_is_pid): Don't declare.
5013         * infrun.c: Update.
5014         * linux-nat.c: Update.
5015         * mi/mi-interp.c: Update.
5016         * remote.c: Update.
5017         * thread.c: Update.
5018
5019 2018-07-03  Tom Tromey  <tom@tromey.com>
5020
5021         * common/ptid.c (ptid_get_tid): Remove.
5022         * common/ptid.h (ptid_get_tid): Don't declare.
5023         * ada-tasks.c: Update.
5024         * aix-thread.c: Update.
5025         * bsd-uthread.c: Update.
5026         * darwin-nat.c: Update.
5027         * fbsd-nat.c: Update.
5028         * i386-darwin-nat.c: Update.
5029         * infrun.c: Update.
5030         * linux-tdep.c: Update.
5031         * nto-procfs.c: Update.
5032         * ppc-ravenscar-thread.c: Update.
5033         * python/py-infthread.c: Update.
5034         * ravenscar-thread.c: Update.
5035         * sol-thread.c: Update.
5036         * sparc-ravenscar-thread.c: Update.
5037         * windows-nat.c: Update.
5038
5039 2018-07-03  Tom Tromey  <tom@tromey.com>
5040
5041         * common/ptid.c (ptid_get_lwp): Remove.
5042         * common/ptid.h (ptid_get_lwp): Don't declare.
5043         * aarch64-linux-nat.c: Update.
5044         * ada-tasks.c: Update.
5045         * aix-thread.c: Update.
5046         * amd64-linux-nat.c: Update.
5047         * arm-linux-nat.c: Update.
5048         * corelow.c: Update.
5049         * fbsd-nat.c: Update.
5050         * fbsd-tdep.c: Update.
5051         * gnu-nat.c: Update.
5052         * i386-cygwin-tdep.c: Update.
5053         * i386-gnu-nat.c: Update.
5054         * i386-linux-nat.c: Update.
5055         * ia64-linux-nat.c: Update.
5056         * inf-ptrace.c: Update.
5057         * infrun.c: Update.
5058         * linux-fork.c: Update.
5059         * linux-nat.c: Update.
5060         * linux-tdep.c: Update.
5061         * linux-thread-db.c: Update.
5062         * mips-linux-nat.c: Update.
5063         * nat/aarch64-linux-hw-point.c: Update.
5064         * nat/aarch64-linux.c: Update.
5065         * nat/linux-btrace.c: Update.
5066         * nat/linux-osdata.c: Update.
5067         * nat/linux-procfs.c: Update.
5068         * nat/x86-linux-dregs.c: Update.
5069         * obsd-nat.c: Update.
5070         * ppc-fbsd-nat.c: Update.
5071         * ppc-linux-nat.c: Update.
5072         * procfs.c: Update.
5073         * python/py-infthread.c: Update.
5074         * ravenscar-thread.c: Update.
5075         * remote.c: Update.
5076         * s390-linux-nat.c: Update.
5077         * sol-thread.c: Update.
5078         * sol2-tdep.c: Update.
5079         * spu-linux-nat.c: Update.
5080         * x86-linux-nat.c: Update.
5081         * xtensa-linux-nat.c: Update.
5082
5083 2018-07-03  Tom Tromey  <tom@tromey.com>
5084
5085         * common/ptid.c (ptid_get_pid): Remove.
5086         * common/ptid.h (ptid_get_pid): Don't declare.
5087         * aarch64-linux-nat.c: Update.
5088         * ada-lang.c: Update.
5089         * aix-thread.c: Update.
5090         * alpha-bsd-nat.c: Update.
5091         * amd64-fbsd-nat.c: Update.
5092         * amd64-linux-nat.c: Update.
5093         * arm-linux-nat.c: Update.
5094         * arm-nbsd-nat.c: Update.
5095         * auxv.c: Update.
5096         * break-catch-syscall.c: Update.
5097         * breakpoint.c: Update.
5098         * bsd-uthread.c: Update.
5099         * corelow.c: Update.
5100         * ctf.c: Update.
5101         * darwin-nat.c: Update.
5102         * fbsd-nat.c: Update.
5103         * fbsd-tdep.c: Update.
5104         * gcore.c: Update.
5105         * gnu-nat.c: Update.
5106         * hppa-nbsd-nat.c: Update.
5107         * hppa-obsd-nat.c: Update.
5108         * i386-fbsd-nat.c: Update.
5109         * ia64-linux-nat.c: Update.
5110         * inf-ptrace.c: Update.
5111         * infcmd.c: Update.
5112         * inferior.c: Update.
5113         * inferior.h: Update.
5114         * inflow.c: Update.
5115         * infrun.c: Update.
5116         * linux-fork.c: Update.
5117         * linux-nat.c: Update.
5118         * linux-tdep.c: Update.
5119         * linux-thread-db.c: Update.
5120         * m68k-bsd-nat.c: Update.
5121         * mi/mi-interp.c: Update.
5122         * mi/mi-main.c: Update.
5123         * mips-linux-nat.c: Update.
5124         * mips-nbsd-nat.c: Update.
5125         * mips64-obsd-nat.c: Update.
5126         * nat/aarch64-linux-hw-point.c: Update.
5127         * nat/aarch64-linux.c: Update.
5128         * nat/linux-btrace.c: Update.
5129         * nat/linux-osdata.c: Update.
5130         * nat/linux-procfs.c: Update.
5131         * nat/x86-linux-dregs.c: Update.
5132         * nto-procfs.c: Update.
5133         * obsd-nat.c: Update.
5134         * ppc-linux-nat.c: Update.
5135         * ppc-nbsd-nat.c: Update.
5136         * ppc-obsd-nat.c: Update.
5137         * proc-service.c: Update.
5138         * procfs.c: Update.
5139         * python/py-inferior.c: Update.
5140         * python/py-infthread.c: Update.
5141         * ravenscar-thread.c: Update.
5142         * record.c: Update.
5143         * remote-sim.c: Update.
5144         * remote.c: Update.
5145         * rs6000-nat.c: Update.
5146         * s390-linux-nat.c: Update.
5147         * sh-nbsd-nat.c: Update.
5148         * sol-thread.c: Update.
5149         * sparc-nat.c: Update.
5150         * sparc64-tdep.c: Update.
5151         * spu-linux-nat.c: Update.
5152         * spu-tdep.c: Update.
5153         * target-debug.h: Update.
5154         * target.c: Update.
5155         * thread.c: Update.
5156         * tid-parse.c: Update.
5157         * tracefile-tfile.c: Update.
5158         * vax-bsd-nat.c: Update.
5159         * windows-nat.c: Update.
5160         * x86-linux-nat.c: Update.
5161         * x86-nat.c: Update.
5162
5163 2018-07-03  Tom Tromey  <tom@tromey.com>
5164
5165         * common/ptid.c (pid_to_ptid): Remove.
5166         * common/ptid.h (pid_to_ptid): Don't declare.
5167         * aix-thread.c: Update.
5168         * arm-linux-nat.c: Update.
5169         * common/ptid.c: Update.
5170         * common/ptid.h: Update.
5171         * corelow.c: Update.
5172         * ctf.c: Update.
5173         * darwin-nat.c: Update.
5174         * fbsd-nat.c: Update.
5175         * fork-child.c: Update.
5176         * gnu-nat.c: Update.
5177         * go32-nat.c: Update.
5178         * inf-ptrace.c: Update.
5179         * infcmd.c: Update.
5180         * inferior.c: Update.
5181         * infrun.c: Update.
5182         * linux-fork.c: Update.
5183         * linux-nat.c: Update.
5184         * nat/aarch64-linux-hw-point.c: Update.
5185         * nat/fork-inferior.c: Update.
5186         * nat/x86-linux-dregs.c: Update.
5187         * nto-procfs.c: Update.
5188         * obsd-nat.c: Update.
5189         * procfs.c: Update.
5190         * progspace.c: Update.
5191         * remote.c: Update.
5192         * rs6000-nat.c: Update.
5193         * s390-linux-nat.c: Update.
5194         * sol-thread.c: Update.
5195         * spu-linux-nat.c: Update.
5196         * target.c: Update.
5197         * top.c: Update.
5198         * tracefile-tfile.c: Update.
5199         * windows-nat.c: Update.
5200
5201 2018-07-03  Tom Tromey  <tom@tromey.com>
5202
5203         * common/ptid.h (ptid_build): Don't declare.
5204         * common/ptid.c (ptid_build): Remove.
5205         * aix-thread.c: Update.
5206         * bsd-kvm.c: Update.
5207         * bsd-uthread.c: Update.
5208         * common/agent.c: Update.
5209         * common/ptid.c: Update.
5210         * common/ptid.h: Update.
5211         * corelow.c: Update.
5212         * darwin-nat.c: Update.
5213         * fbsd-nat.c: Update.
5214         * gnu-nat.c: Update.
5215         * linux-fork.c: Update.
5216         * linux-nat.c: Update.
5217         * linux-thread-db.c: Update.
5218         * nat/linux-osdata.c: Update.
5219         * nat/linux-procfs.c: Update.
5220         * nto-procfs.c: Update.
5221         * obsd-nat.c: Update.
5222         * proc-service.c: Update.
5223         * procfs.c: Update.
5224         * ravenscar-thread.c: Update.
5225         * remote-sim.c: Update.
5226         * remote.c: Update.
5227         * sol-thread.c: Update.
5228         * target.c: Update.
5229         * windows-nat.c: Update.
5230
5231 2018-07-03  Tom Tromey  <tom@tromey.com>
5232
5233         * infrun.c (follow_exec): Use exit_inferior_silent.
5234         * inferior.c (exit_inferior_num_silent): Remove.
5235         * inferior.h (exit_inferior_num_silent): Don't declare.
5236
5237 2018-07-03  Tom Tromey  <tom@tromey.com>
5238
5239         PR cli/23340:
5240         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5241         inferior_ptid on error.
5242
5243 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5244             Simon Marchi  <simon.marchi@polymtl.ca>
5245
5246         PR tdep/8282
5247         * disasm.h (gdb_disassembler): Add
5248         `m_disassembler_options_holder'. member
5249         * disasm.c (get_all_disassembler_options): New function.
5250         (gdb_disassembler::gdb_disassembler): Use it.
5251         (gdb_buffered_insn_length_init_dis): Likewise.
5252         (gdb_buffered_insn_length): Adjust accordingly.
5253         (set_disassembler_options): Handle options with arguments.
5254         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5255         line if showing options with descriptions.
5256         (disassembler_options_completer): Adapt to using the
5257         `disasm_options_and_args_t' structure.
5258         * mips-tdep.c (mips_disassembler_options): New variable.
5259         (mips_disassembler_options_o32): Likewise.
5260         (mips_disassembler_options_n32): Likewise.
5261         (mips_disassembler_options_n64): Likewise.
5262         (gdb_print_insn_mips): Don't set `disassembler_options'.
5263         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5264         functions.
5265         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5266         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5267         `gdbarch_disassembler_options_implicit' and
5268         `gdbarch_valid_disassembler_options'.
5269         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5270         `disasm_options_and_args_t' structure.
5271         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5272         method.
5273         (valid_disassembler_options): Switch from `disasm_options_t' to
5274         the `disasm_options_and_args_t' structure.
5275         * NEWS: Document `set disassembler-options' support for the MIPS
5276         target.
5277         * gdbarch.h: Regenerate.
5278         * gdbarch.c: Regenerate.
5279
5280 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5281
5282         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5283
5284 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5285
5286         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5287         parameter in call to amd64_target_description.
5288         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5289         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5290         (amd64fbsd_init_abi): Likewise.
5291         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5292         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5293         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5294         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5295
5296 2018-06-29  Pedro Alves  <palves@redhat.com>
5297
5298         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5299         "segments" parameter.
5300         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5301         (_initialize_amd64_tdep): Update call to
5302         amd64_create_target_description.
5303         (amd64_target_description): Add "segments" parameter.  Adjust
5304         the implementation to use it.
5305         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5306         call to amd64_create_target_description.
5307         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5308         * gdb/arch/amd64.h (amd64_create_target_description): Add
5309         "segments" register.
5310         * gdb/arch/amd64.c (amd64_create_target_description): Add
5311         "segments" parameter.  Call create_feature_i386_64bit_segments
5312         only if SEGMENTS is true.
5313         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5314         call to amd64_create_target_description.
5315
5316 2018-06-29  Pedro Alves  <palves@redhat.com>
5317
5318         * thread.c (thread_target_id_str): New, factored out from ...
5319         (print_thread_info_1): ... here.  Use it to compute the max
5320         "Target Id" column width.
5321
5322 2018-06-29  Pedro Alves  <palves@redhat.com>
5323
5324         * remote.c (remote_target::extra_thread_info): Delete
5325         'display_buf' and 'n' locals.  from the cache, regardless of
5326         packet mechanims is in use.  Use cache for qThreadExtra and qP
5327         methods too.
5328
5329 2018-06-29  Pedro Alves  <palves@redhat.com>
5330
5331         * blockframe.c (find_pc_sect_containing_function): New function.
5332         * breakpoint.c (print_breakpoint_location): Don't call
5333         find_pc_sect_function.
5334         * linespec.c (create_sals_line_offset): Record the location's
5335         symbol in the sal.
5336         * linespec.c (convert_address_location_to_sals): Fill in sal's
5337         symbol with find_pc_sect_containing_function.
5338         * symtab.c (find_function_start_sal): Rename to ...
5339         (find_function_start_sal_1): ... this.
5340         (find_function_start_sal): Reimplement as wrapper around
5341         find_function_start_sal_1, and use
5342         find_pc_sect_containing_function to fill in the sal's symbol.
5343         (find_function_start_sal(symbol*, bool)): Adjust.
5344         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5345         comments.
5346         (find_pc_sect_containing_function): Declare.
5347
5348 2018-06-29  Pedro Alves  <palves@redhat.com>
5349
5350         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5351         true if the the location has no symbol.
5352
5353 2018-06-28  Tom Tromey  <tom@tromey.com>
5354
5355         * NEWS: Mention --enable-codesign.
5356         * silent-rules.mk (ECHO_SIGN): New variable.
5357         * configure.ac: Add --enable-codesign.
5358         * configure: Rebuild.
5359         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5360         (gdb$(EXEEXT)): Optionally invoke codesign.
5361
5362 2018-06-28  Pedro Alves  <palves@redhat.com>
5363
5364         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5365         comments.
5366         (switch_to_thread_no_regs): Adjust comment.
5367         * infcmd.c (stop_pc): Delete.
5368         (post_create_inferior, info_program_command): Replace references
5369         to stop_pc with references to thread_info->suspend.stop_pc.
5370         * inferior.h (stop_pc): Delete declaration.
5371         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5372         (handle_inferior_event_1, handle_signal_stop)
5373         (process_event_stop_test, keep_going_stepped_thread)
5374         (handle_step_into_function, handle_step_into_function_backward)
5375         (print_stop_location): Replace references to stop_pc with
5376         references to thread_info->suspend.stop_pc.
5377         (struct infcall_suspend_state) <stop_pc>: Delete field.
5378         (save_infcall_suspend_state, restore_infcall_suspend_state):
5379         Remove references to inf_stat->stop_pc.
5380         * linux-fork.c (fork_load_infrun_state): Likewise.
5381         * record-btrace.c (record_btrace_set_replay): Likewise.
5382         * record-full.c (record_full_goto_entry): Likewise.
5383         * remote.c (print_one_stopped_thread): Likewise.
5384         * target.c (target_resume): Extend comment.
5385         * thread.c (set_executing_thread): New.
5386         (set_executing): Use it.
5387         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5388         Remove references to stop_pc.
5389
5390 2018-06-28  Pedro Alves  <palves@redhat.com>
5391
5392         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5393         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5394
5395 2018-06-28  Tom Tromey  <tom@tromey.com>
5396
5397         * coffread.c (coff_symfile_finish): Update.
5398         * xcoffread.c (xcoff_symfile_finish): Update.
5399         * elfread.c (elf_symfile_finish): Update.
5400         * symfile.h (dwarf2_free_objfile): Don't declare.
5401         * dwarf2read.c (_initialize_dwarf2_read): Use
5402         register_objfile_data_with_cleanup.
5403         (dwarf2_free_objfile): Now static.  Change signature.
5404
5405 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5406
5407         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5408         option "-o" to add-symbol-file-load to add an offset to each
5409         section's load address.
5410         * symfile.c (set_objfile_default_section_offset): New function.
5411
5412 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5413
5414         * symfile.c (add_symbol_file_command): Make sure that sections
5415         with the same name are sorted in the same order.
5416
5417 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5418
5419         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5420         require the second argument.  If omitted, load sections at the
5421         addresses specified in the file.
5422
5423 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5424
5425         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5426         (_initialize_symfile): Add option "-o" to symbol-file to add an
5427         offset to each section of the symbol file.
5428
5429 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5430
5431         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5432
5433 2018-06-27  Tom Tromey  <tom@tromey.com>
5434
5435         * stack.c (_initialize_stack): Update "func" help text.
5436
5437 2018-06-27  Tom Tromey  <tom@tromey.com>
5438
5439         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5440         std::vector.
5441         (unwind_infopy_str, pyuw_create_unwind_info)
5442         (unwind_infopy_add_saved_register, pyuw_sniffer)
5443         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5444         Update.
5445         (struct saved_reg): Add constructor.
5446         <value>: Now a gdbpy_ref<>.
5447
5448 2018-06-27  Tom Tromey  <tom@tromey.com>
5449
5450         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5451
5452 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5453
5454         * gdb-gdb.py.in: Format using autopep8.
5455
5456 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5457
5458         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5459         (type_lookup_function): Recognize CORE_ADDR values.
5460
5461 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5462
5463         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5464         print tag_name.
5465
5466 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5467
5468         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5469         <__lt__>: Add.
5470
5471 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5472
5473         * gdb-gdb.py: Move to...
5474         * gdb-gdb.py.in: ... here.
5475         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5476         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5477         dependencies.
5478         (distclean): Remove gdb-gdb.py when cleaning.
5479         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5480         * configure: Re-generate.
5481
5482 2018-06-27  Pedro Alves  <palves@redhat.com>
5483
5484         * proc-service.c (get_ps_regcache): New.
5485         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5486         (ps_lsetfpregs): Use it.
5487
5488 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5489
5490         PR gdb/21695
5491         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5492         (dwarf_decode_lines_1): Adjust.
5493
5494 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5495
5496         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5497         override.
5498         <info_proc>: Likewise.
5499
5500 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5501
5502         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5503         to windows_fetch_one_register, and only handle the case of
5504         fetching one register.  Move the code that reloads the context
5505         and iterates over all registers if R is negative to...
5506         (windows_nat_target::fetch_registers): ... here.
5507         (do_windows_store_inferior_registers): Rename to
5508         windows_store_one_register, and only handle the case of storing
5509         one register.  Move the code that handles the case where r is
5510         negative to...
5511         (windows_nat_target::store_registers) ... here.
5512
5513 2018-06-26  Tom Tromey  <tom@tromey.com>
5514
5515         PR rust/22574:
5516         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5517         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5518         Update.
5519         (rust_internal_print_type): Add podata parameter.
5520         (rust_print_type): Update.
5521
5522 2018-06-26  Tom Tromey  <tom@tromey.com>
5523
5524         * typeprint.h (struct print_offset_data) <update, finish,
5525         maybe_print_hole>: New methods.
5526         <indentation>: New constant.
5527         * typeprint.c (print_offset_data::indentation): Define.
5528         (print_offset_data::maybe_print_hole, print_offset_data::update)
5529         (print_offset_data::finish): Move from c-typeprint.c and rename.
5530         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5531         (print_spaces_filtered_with_print_options): Update.
5532         (c_print_type_union_field_offset, maybe_print_hole)
5533         (c_print_type_struct_field_offset): Move to typeprint.c and
5534         rename.
5535         (c_type_print_base_struct_union): Update.
5536
5537 2018-06-25  Pedro Alves  <palves@redhat.com>
5538
5539         * gdbthread.h (thread_info_ref, delete_thread)
5540         (delete_thread_silent, first_thread_of_inferior)
5541         (any_thread_of_inferior, switch_to_thread)
5542         (enable_thread_stack_temporaries)
5543         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5544         (get_last_thread_stack_temporary)
5545         (value_in_thread_stack_temporaries, can_access_registers_thread):
5546         Spell out "struct thread_info" instead of just "thread_info".
5547         * inferior.h (notice_new_inferior): Likewise.
5548
5549 2018-06-25  Pedro Alves  <palves@redhat.com>
5550
5551         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5552         pass thread_info pointer to delete_thread.
5553         (windows_nat_target::detach): Pass inferior pointer to
5554         detach_inferior.
5555         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5556         delete_thread.
5557         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5558         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5559         and pass a thread_info pointer to delete_thread.
5560         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5561         pass thread_info pointer to delete_thread.
5562         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5563         delete_thread_silent call.
5564         * procfs.c (procfs_target::detach): Pass inferior pointer to
5565         detach_inferior.
5566         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5567         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5568         delete_thread_silent call.
5569         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5570         pass thread_info pointer to delete_thread.
5571         (windows_nat_target::detach): Pass inferior pointer to
5572         delete_inferior.
5573
5574 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5575
5576         * regcache.c (readable_regcache::read_part): Fix asserts.
5577         (reg_buffer::raw_collect_part): New function.
5578         (regcache::write_part): Fix asserts.
5579         (reg_buffer::raw_supply_part): New function.
5580         (regcache::transfer_regset_register): New helper function.
5581         (regcache::transfer_regset): Call new functions.
5582         (regcache_supply_regset): Use gdb_byte*.
5583         (regcache::supply_regset): Likewise.
5584         (regcache_collect_regset): Likewise.
5585         (regcache::collect_regset): Likewise.
5586         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5587         (reg_buffer::raw_supply_part): Likewise.
5588         (regcache::transfer_regset_register): Likewise.
5589         (regcache::transfer_regset): Use gdb_byte*.
5590
5591 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5592
5593         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5594
5595 2018-06-21  Pedro Alves  <palves@redhat.com>
5596
5597         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5598         instead of a ptid_t.  All callers adjusted.
5599         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5600         adjusted.
5601         (print_ada_task_info, display_current_task_id, task_command_1):
5602         Adjust.
5603         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5604         inferior_thread.
5605         (breakpoint_kind): Adjust.
5606         (remove_breakpoints_pid): Rename to ...
5607         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5608         pointer.  All callers adjusted.
5609         (bpstat_clear_actions): Use inferior_thread.
5610         (get_bpstat_thread): New.
5611         (bpstat_do_actions): Use it.
5612         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5613         to take a thread_info pointer.  All callers adjusted.
5614         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5615         (breakpoint_re_set_thread): Use inferior_thread.
5616         * breakpoint.h (struct inferior): Forward declare.
5617         (bpstat_stop_status): Update.
5618         (remove_breakpoints_pid): Delete.
5619         (remove_breakpoints_inf): New.
5620         * bsd-uthread.c (bsd_uthread_target::wait)
5621         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5622         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5623         (maint_btrace_packet_history_cmd)
5624         (maint_btrace_clear_packet_history_cmd): Adjust.
5625         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5626         inferior_thread.
5627         * cli/cli-interp.c: Include "inferior.h".
5628         * common/refcounted-object.h (struct
5629         refcounted_object_ref_policy): New.
5630         * compile/compile-object-load.c: Include gdbthread.h.
5631         (store_regs): Use inferior_thread.
5632         * corelow.c (core_target::close): Use current_inferior.
5633         (core_target_open): Adjust to use first_thread_of_inferior and use
5634         the current inferior.
5635         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5636         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5637         <thread>: ... this new field.  All references adjusted.
5638         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5639         Take a thread_info pointer instead of a ptid_t.
5640         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5641         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5642         thread_info pointer instead of a ptid_t.
5643         * elfread.c: Include "inferior.h".
5644         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5645         Use inferior_thread.
5646         * eval.c (evaluate_subexp): Likewise.
5647         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5648         inferior_thread.
5649         * gdb_proc_service.h (struct thread_info): Forward declare.
5650         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5651         <thread>: ... this new field.  All references adjusted.
5652         * gdbarch.h, gdbarch.c: Regenerate.
5653         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5654         'thread' parameter.  All implementations and callers adjusted.
5655         * gdbthread.h (thread_info) <set_running>: New method.
5656         (delete_thread, delete_thread_silent): Take a thread_info pointer
5657         instead of a ptid.
5658         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5659         (first_thread_of_process): Delete, replaced by ...
5660         (first_thread_of_inferior): ... this new function.  All callers
5661         adjusted.
5662         (any_live_thread_of_process): Delete, replaced by ...
5663         (any_live_thread_of_inferior): ... this new function.  All callers
5664         adjusted.
5665         (switch_to_thread, switch_to_no_thread): Declare.
5666         (is_executing): Delete.
5667         (enable_thread_stack_temporaries): Update comment.
5668         <enable_thread_stack_temporaries>: Take a thread_info pointer
5669         instead of a ptid_t.  Incref the thread.
5670         <~enable_thread_stack_temporaries>: Decref the thread.
5671         <m_ptid>: Delete
5672         <m_thr>: New.
5673         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5674         (get_last_thread_stack_temporary)
5675         (value_in_thread_stack_temporaries, can_access_registers_thread):
5676         Take a thread_info pointer instead of a ptid_t.  All callers
5677         adjusted.
5678         * infcall.c (get_call_return_value): Use inferior_thread.
5679         (run_inferior_call): Work with thread pointers instead of ptid_t.
5680         (call_function_by_hand_dummy): Work with thread pointers instead
5681         of ptid_t.  Use thread_info_ref.
5682         * infcmd.c (proceed_thread_callback): Access thread's state
5683         directly.
5684         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5685         access thread's state directly.
5686         (continue_command): Use inferior_thread.
5687         (info_program_command): Use find_thread_ptid and access thread
5688         state directly.
5689         (proceed_after_attach_callback): Use thread state directly.
5690         (notice_new_inferior): Take a thread_info pointer instead of a
5691         ptid_t.  All callers adjusted.
5692         (exit_inferior): Take an inferior pointer instead of a pid.  All
5693         callers adjusted.
5694         (exit_inferior_silent): New.
5695         (detach_inferior): Delete.
5696         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5697         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5698         (detach_inferior_command, kill_inferior_command): Use
5699         find_inferior_id instead of valid_gdb_inferior_id and
5700         gdb_inferior_id_to_pid.
5701         (inferior_command): Use inferior and thread pointers.
5702         * inferior.h (struct thread_info): Forward declare.
5703         (notice_new_inferior): Take a thread_info pointer instead of a
5704         ptid_t.  All callers adjusted.
5705         (detach_inferior): Delete declaration.
5706         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5707         instead of a pid.  All callers adjusted.
5708         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5709         (valid_gdb_inferior_id): Delete.
5710         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5711         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5712         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5713         ...
5714         <inf>: ... this new field.
5715         <step_ptid>: Delete, replaced by ...
5716         <step_thread>: ... this new field.
5717         (get_displaced_stepping_state): Take an inferior pointer instead
5718         of a pid.  All callers adjusted.
5719         (displaced_step_in_progress_any_inferior): Adjust.
5720         (displaced_step_in_progress_thread): Take a thread pointer instead
5721         of a ptid_t.  All callers adjusted.
5722         (displaced_step_in_progress, add_displaced_stepping_state): Take
5723         an inferior pointer instead of a pid.  All callers adjusted.
5724         (get_displaced_step_closure_by_addr): Adjust.
5725         (remove_displaced_stepping_state): Take an inferior pointer
5726         instead of a pid.  All callers adjusted.
5727         (displaced_step_prepare_throw, displaced_step_prepare)
5728         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5729         All callers adjusted.
5730         (start_step_over): Adjust.
5731         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5732         displaced step queue.
5733         (do_target_resume): Adjust.
5734         (fetch_inferior_event): Use inferior_thread.
5735         (context_switch, get_inferior_stop_soon): Take an
5736         execution_control_state pointer instead of a ptid_t.  All callers
5737         adjusted.
5738         (switch_to_thread_cleanup): Delete.
5739         (stop_all_threads): Use scoped_restore_current_thread.
5740         * inline-frame.c: Include "gdbthread.h".
5741         (inline_state) <inline_state>: Take a thread pointer instead of a
5742         ptid_t.  All callers adjusted.
5743         <ptid>: Delete, replaced by ...
5744         <thread>: ... this new field.
5745         (find_inline_frame_state): Take a thread pointer instead of a
5746         ptid_t.  All callers adjusted.
5747         (skip_inline_frames, step_into_inline_frame)
5748         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5749         pointer instead of a ptid_t.  All callers adjusted.
5750         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5751         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5752         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5753         pointers directly.
5754         * linux-nat.c (get_detach_signal): Likewise.
5755         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5756         (thread_db_notice_clone): Adjust.
5757         (thread_db_find_new_threads_silently)
5758         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5759         a thread pointer instead of a ptid_t.  All callers adjusted.
5760         * mi/mi-cmd-var.c: Include "inferior.h".
5761         (mi_cmd_var_update_iter): Update to use thread pointers.
5762         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5763         inferior directly.
5764         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5765         out to ...
5766         (mi_output_running): ... this new function.
5767         (mi_on_resume_1): Adjust to use it.
5768         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5769         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5770         directly.
5771         (interrupt_thread_callback): : Adjust to use thread and inferior
5772         pointers.
5773         * proc-service.c: Include "gdbthread.h".
5774         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5775         * progspace-and-thread.c: Include "inferior.h".
5776         * progspace.c: Include "inferior.h".
5777         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5778         hold a reference to an inferior_object.
5779         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5780         inferior_thread.
5781         * python/py-inferior.c (struct inferior_object): Give the type a
5782         tag name instead of a typedef.
5783         (python_on_normal_stop): No need to check if the current thread is
5784         listed.
5785         (inferior_to_inferior_object): Change return type to
5786         inferior_object.  All callers adjusted.
5787         (find_thread_object): Delete, bits factored out to ...
5788         (thread_to_thread_object): ... this new function.
5789         * python/py-infthread.c (create_thread_object): Use
5790         inferior_to_inferior_object.
5791         (thpy_is_stopped): Use thread pointer directly.
5792         (gdbpy_selected_thread): Use inferior_thread.
5793         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5794         field, replaced with ...
5795         <thread>: ... this new field.  All users adjusted.
5796         (btpy_insn_or_gap_new): Drop const.
5797         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5798         callers adjusted.
5799         * python/py-record.c: Include "gdbthread.h".
5800         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5801         a ptid_t.  All callers adjusted.
5802         (gdbpy_current_recording): Use inferior_thread.
5803         * python/py-record.h (recpy_record_object) <ptid>: Delete
5804         field, replaced with ...
5805         <thread>: ... this new field.  All users adjusted.
5806         (recpy_element_object) <ptid>: Delete
5807         field, replaced with ...
5808         <thread>: ... this new field.  All users adjusted.
5809         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5810         a ptid_t.  All callers adjusted.
5811         * python/py-threadevent.c: Include "gdbthread.h".
5812         (get_event_thread): Use thread_to_thread_object.
5813         * python/python-internal.h (struct inferior_object): Forward
5814         declare.
5815         (find_thread_object, find_inferior_object): Delete declarations.
5816         (thread_to_thread_object, inferior_to_inferior_object): New
5817         declarations.
5818         * record-btrace.c: Include "inferior.h".
5819         (require_btrace_thread): Use inferior_thread.
5820         (record_btrace_frame_sniffer)
5821         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5822         (get_thread_current_frame): Use scoped_restore_current_thread and
5823         switch_to_thread.
5824         (get_thread_current_frame): Use thread pointer directly.
5825         (record_btrace_replay_at_breakpoint): Use thread's inferior
5826         pointer directly.
5827         * record-full.c: Include "inferior.h".
5828         * regcache.c: Include "gdbthread.h".
5829         (get_thread_arch_regcache): Use the inferior's address space
5830         directly.
5831         (get_thread_regcache, registers_changed_thread): New.
5832         * regcache.h (get_thread_regcache(thread_info *thread)): New
5833         overload.
5834         (registers_changed_thread): New.
5835         (remote_target) <remote_detach_1>: Swap order of parameters.
5836         (remote_add_thread): <remote_add_thread>: Return the new thread.
5837         (get_remote_thread_info(ptid_t)): New overload.
5838         (remote_target::remote_notice_new_inferior): Use thread pointers
5839         directly.
5840         (remote_target::process_initial_stop_replies): Use
5841         thread_info::set_running.
5842         (remote_target::remote_detach_1, remote_target::detach)
5843         (extended_remote_target::detach): Adjust.
5844         * stack.c (frame_show_address): Use inferior_thread.
5845         * target-debug.h (target_debug_print_thread_info_pp): New.
5846         * target-delegates.c: Regenerate.
5847         * target.c (default_thread_address_space): Delete.
5848         (memory_xfer_partial_1): Use current_inferior.
5849         (target_detach): Use current_inferior.
5850         (target_thread_address_space): Delete.
5851         (generic_mourn_inferior): Use current_inferior.
5852         * target.h (struct target_ops) <thread_address_space>: Delete.
5853         (target_thread_address_space): Delete.
5854         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5855         pointers directly.
5856         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5857         thread pointer instead of a ptid_t.  Adjust all callers.
5858         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5859         (first_thread_of_process): Delete, replaced by ...
5860         (first_thread_of_inferior): ... this new function.  All callers
5861         adjusted.
5862         (any_thread_of_process): Rename to ...
5863         (any_thread_of_inferior): ... this, and take an inferior pointer.
5864         (any_live_thread_of_process): Rename to ...
5865         (any_live_thread_of_inferior): ... this, and take an inferior
5866         pointer.
5867         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5868         (value_in_thread_stack_temporaries)
5869         (get_last_thread_stack_temporary): Take a thread pointer instead
5870         of a ptid_t.  Adjust all callers.
5871         (thread_info::set_running): New.
5872         (validate_registers_access): Use inferior_thread.
5873         (can_access_registers_ptid): Rename to ...
5874         (can_access_registers_thread): ... this, and take a thread
5875         pointer.
5876         (print_thread_info_1): Adjust to compare thread pointers instead
5877         of ptids.
5878         (switch_to_no_thread, switch_to_thread): Make extern.
5879         (scoped_restore_current_thread::~scoped_restore_current_thread):
5880         Use m_thread pointer directly.
5881         (scoped_restore_current_thread::scoped_restore_current_thread):
5882         Use inferior_thread.
5883         (thread_command): Use thread pointer directly.
5884         (thread_num_make_value_helper): Use inferior_thread.
5885         * top.c (execute_command): Use inferior_thread.
5886         * tui/tui-interp.c: Include "inferior.h".
5887         * varobj.c (varobj_create): Use inferior_thread.
5888         (value_of_root_1): Use find_thread_global_id instead of
5889         global_thread_id_to_ptid.
5890
5891 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5892
5893         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5894         possible.
5895         (regcache::write_part): Likewise.
5896         (readable_regcache::cooked_read_part): Update comment.
5897         (readable_regcache::cooked_write_part): Likewise.
5898         * regcache.h: (readable_regcache::read_part): Likewise.
5899         (regcache::write_part): Likewise.
5900
5901 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5902             Dirk Schubert  <dirk.schubert@arm.com>
5903
5904         * aarch64-linux-nat.c (post_attach): New.
5905         (aarch64_linux_nat_target::post_attach): Override post_attach to
5906         record the number of hardware debug registers.
5907
5908 2018-06-20  Tom Tromey  <tom@tromey.com>
5909
5910         * python/py-param.c (add_setshow_generic): Make parameters const.
5911         (parmpy_init): Update.
5912
5913 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5914
5915         * regcache.h (regcache_cooked_read_ftype): Rename to...
5916         (register_read_ftype): ...this, change type to function_view.
5917         (class reg_buffer) <save>: Remove src parameter.
5918         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5919         parameter non-const in first overload.  Remove src parameter in
5920         second overload.
5921         * regcache.c (do_cooked_read): Remove.
5922         (readonly_detached_regcache::readonly_detached_regcache): Make
5923         parameter non-const, adjust call to other constructor.
5924         (reg_buffer::save): Remove src parameter.
5925         * frame.c (do_frame_register_read): Remove.
5926         (frame_save_as_regcache): Use lambda function.
5927         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5928         parameter to ppu2spu_data *.
5929         (ppu2spu_sniffer): Use lambda function.
5930
5931 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5932
5933         * record-full.c (record_full_target::insert_breakpoint): Remove
5934         "struct" keyword, add const.
5935
5936 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5937
5938         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5939         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5940         * configure.ac: Remove AC_PREREQ, add missing quoting.
5941         * gnulib/configure.ac: Modernize usage of
5942         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5943         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5944         (AUTOMAKE_VERSION): Bump to 1.15.1.
5945         * configure: Re-generate.
5946         * config.in: Re-generate.
5947         * aclocal.m4: Re-generate.
5948         * gnulib/aclocal.m4: Re-generate.
5949         * gnulib/config.in: Re-generate.
5950         * gnulib/configure: Re-generate.
5951         * gnulib/import/Makefile.in: Re-generate.
5952
5953 2018-06-19  Pedro Alves  <palves@redhat.com>
5954
5955         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5956         (lookup_minimal_symbol_by_pc_section): ... here with
5957         gdb_assert_not_reached added.
5958
5959 2018-06-19  Pedro Alves  <palves@redhat.com>
5960
5961         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5962         parameter with a block parameter.  Compare location's block symbol
5963         with the frame's block instead of addresses.
5964         (skip_inline_frames): Pass the current block instead of the
5965         frame's address.  Break out as soon as we determine the frame
5966         should not be skipped.
5967
5968 2018-06-18  Tom Tromey  <tom@tromey.com>
5969
5970         * solib-aix.c (solib_aix_get_section_offsets): Return
5971         unique_xmalloc_ptr.
5972         (solib_aix_solib_create_inferior_hook): Update.
5973
5974 2018-06-18  Tom Tromey  <tom@tromey.com>
5975
5976         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5977
5978 2018-06-18  Tom Tromey  <tom@tromey.com>
5979
5980         * solib-frv.c (frv_relocate_main_executable): Use
5981         unique_xmalloc_ptr.
5982         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5983         unique_xmalloc_ptr.
5984
5985 2018-06-18  Tom Tromey  <tom@tromey.com>
5986
5987         * objfiles.h (inhibit_section_map_updates): Update.
5988         (resume_section_map_updates, resume_section_map_updates_cleanup):
5989         Remove.
5990         * solib-svr4.c (svr4_handle_solib_event): Update.
5991         * objfiles.c (inhibit_section_map_updates): Return
5992         scoped_restore_tmpl<int>.
5993         (resume_section_map_updates, resume_section_map_updates_cleanup):
5994         Remove.
5995
5996 2018-06-18  Tom Tromey  <tom@tromey.com>
5997
5998         * valprint.h (read_string): Update.
5999         * valprint.c (read_string): Change type of "buffer".
6000         (val_print_string): Update.
6001         * python/py-value.c (valpy_string): Update.
6002         * language.h (struct language_defn) <la_get_string>: Change
6003         type of "buffer".
6004         (default_get_string, c_get_string): Update.
6005         * language.c (default_get_string): Change type of "buffer".
6006         * guile/scm-value.c (gdbscm_value_to_string): Update.
6007         * c-lang.c (c_get_string): Change type of "buffer".
6008
6009 2018-06-18  Tom Tromey  <tom@tromey.com>
6010
6011         * ser-mingw.c (struct pipe_state_destroyer): New.
6012         (pipe_state_up): New typedef.
6013         (cleanup_pipe_state): Remove.
6014         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6015
6016 2018-06-18  Tom Tromey  <tom@tromey.com>
6017
6018         * rust-lang.h (rust_yyerror): Don't declare.
6019         * rust-lang.c (rust_language_defn): Update.
6020         * rust-exp.y (yyerror): Now static.
6021         * parse.c (parse_exp_in_context_1): Update.
6022         * p-lang.h (p_yyerror): Don't declare.
6023         * p-lang.c (p_language_defn): Update.
6024         * p-exp.y (yyerror): Now static.
6025         * opencl-lang.c (opencl_language_defn): Update.
6026         * objc-lang.c (objc_language_defn): Update.
6027         * m2-lang.h (m2_yyerror): Don't declare.
6028         * m2-lang.c (m2_language_defn): Update.
6029         * m2-exp.y (yyerror): Now static.
6030         * language.h (struct language_defn) <la_error>: Remove.
6031         * language.c (unk_lang_error): Remove.
6032         (unknown_language_defn, auto_language_defn): Remove.
6033         * go-lang.h (go_yyerror): Don't declare.
6034         * go-lang.c (go_language_defn): Update.
6035         * go-exp.y (yyerror): Now static.
6036         * f-lang.h (f_yyerror): Don't declare.
6037         * f-lang.c (f_language_defn): Update.
6038         * f-exp.y (yyerror): Now static.
6039         * d-lang.h (d_yyerror): Don't declare.
6040         * d-lang.c (d_language_defn): Update.
6041         * d-exp.y (yyerror): Now static.
6042         * c-lang.h (c_yyerror): Don't declare.
6043         * c-lang.c (c_language_defn, cplus_language_defn)
6044         (asm_language_defn, minimal_language_defn): Update.
6045         * c-exp.y (yyerror): Now static.
6046         * ada-lang.h (ada_yyerror): Don't declare.
6047         * ada-lang.c (ada_language_defn): Update.
6048         * ada-exp.y (yyerror): Now static.
6049
6050 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6051
6052         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6053         (store_sveregs_to_thread): Likewise.
6054         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6055         (aarch64_linux_store_inferior_registers): Likewise.
6056         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6057         function.
6058         (aarch64_sve_regs_copy_to_regcache): Likewise.
6059         (aarch64_sve_regs_copy_from_regcache): Likewise.
6060         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6061         declaration.
6062         (aarch64_sve_regs_copy_to_regcache): Likewise.
6063         (aarch64_sve_regs_copy_from_regcache): Likewise.
6064         (sve_context): Structure from Linux headers.
6065         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6066         (SVE_SIG_ZREG_SIZE): Likewise.
6067         (SVE_SIG_PREG_SIZE): Likewise.
6068         (SVE_SIG_FFR_SIZE): Likewise.
6069         (SVE_SIG_REGS_OFFSET): Likewise.
6070         (SVE_SIG_ZREGS_OFFSET): Likewise.
6071         (SVE_SIG_ZREG_OFFSET): Likewise.
6072         (SVE_SIG_ZREGS_SIZE): Likewise.
6073         (SVE_SIG_PREGS_OFFSET): Likewise.
6074         (SVE_SIG_PREG_OFFSET): Likewise.
6075         (SVE_SIG_PREGS_SIZE): Likewise.
6076         (SVE_SIG_FFR_OFFSET): Likewise.
6077         (SVE_SIG_REGS_SIZE): Likewise.
6078         (SVE_SIG_CONTEXT_SIZE): Likewise.
6079         (SVE_PT_REGS_MASK): Likewise.
6080         (SVE_PT_REGS_FPSIMD): Likewise.
6081         (SVE_PT_REGS_SVE): Likewise.
6082         (SVE_PT_VL_INHERIT): Likewise.
6083         (SVE_PT_VL_ONEXEC): Likewise.
6084         (SVE_PT_REGS_OFFSET): Likewise.
6085         (SVE_PT_FPSIMD_OFFSET): Likewise.
6086         (SVE_PT_FPSIMD_SIZE): Likewise.
6087         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6088         (SVE_PT_SVE_PREG_SIZE): Likewise.
6089         (SVE_PT_SVE_FFR_SIZE): Likewise.
6090         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6091         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6092         (__SVE_SIG_TO_PT): Likewise.
6093         (SVE_PT_SVE_OFFSET): Likewise.
6094         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6095         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6096         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6097         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6098         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6099         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6100         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6101         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6102         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6103         (SVE_PT_SVE_SIZE): Likewise.
6104         (SVE_PT_SIZE): Likewise.
6105         (HAS_SVE_STATE): New define.
6106
6107 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6108
6109         * nat/aarch64-sve-linux-sigcontext.h: New file.
6110         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6111         new files.
6112         (SVE_VQ_MIN): Likewise.
6113         (SVE_VQ_MAX): Likewise.
6114         (SVE_VL_MIN): Likewise.
6115         (SVE_VL_MAX): Likewise.
6116         (SVE_NUM_ZREGS): Likewise.
6117         (SVE_NUM_PREGS): Likewise.
6118         (sve_vl_valid): Likewise.
6119         (struct user_sve_header): Likewise.
6120
6121 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6122             Richard Bunt <Richard.Bunt@arm.com>
6123
6124         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6125         was requested by GDB.
6126
6127 2018-06-15  Tom de Vries  <tdevries@suse.de>
6128
6129         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6130
6131 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6132
6133         * gnulib/update-gnulib.sh: Print expected versions of
6134         autoconf/aclocal.
6135
6136 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6137
6138         * arch-utils.c (default_type_align): Use type_length_units.
6139         * gdbtypes.c (type_align): Use type_length_units.
6140
6141 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6142
6143         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6144         of 'define' command.
6145
6146 2018-06-14  Tom de Vries  <tdevries@suse.de>
6147
6148         PR cli/22573
6149         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6150         get_no_prettyformat_print_options.
6151
6152 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6153
6154         * sparc-nat.h: Include target.h.
6155         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6156         <fetch_registers>: Remove this argument in function call.
6157         <store_registers>: Remove this argument in function call, remove
6158         extra semicolon.
6159         <low_forget_process>: Call sparc64_forget_process instead of
6160         sparc_forget_process.
6161
6162 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6163
6164         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6165         (procfs_target::make_corefile_notes): Adjust to new
6166         target_read_alloc return type.
6167
6168 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6169             Stephen Roberts  <stephen.roberts@arm.com>
6170
6171         PR gdb/22882
6172         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6173         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6174         Move should_notify_stop local into more inner scope.
6175
6176 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6177             Stephen Roberts  <stephen.roberts@arm.com>
6178
6179         PR gdb/22882
6180         * infrun.c (resume_1): Add call to mark_async_event_handler.
6181
6182 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6183
6184         * infrun.c (do_target_wait): Change old version of $pc printed.
6185
6186 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6187
6188         * dwarf2read.c (read_index_from_section): Rename to...
6189         (read_gdb_index_from_section): ... this, update all callers.
6190         (dwarf2_read_index): Rename to...
6191         (dwarf2_read_gdb_index): ... this, update all callers.
6192
6193 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6194
6195         * gdb/hppa-linux-nat.c
6196         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6197         hppa_linux_nat_target::fetch_registers.
6198
6199 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6200
6201         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6202         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6203         (AARCH64_DWARF_SVE_FFR): Likewise.
6204         (AARCH64_DWARF_SVE_P0): Likewise.
6205         (AARCH64_DWARF_SVE_Z0): Likewise.
6206
6207 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6208
6209         * common/common-regcache.h (raw_compare): New function.
6210         * regcache.c (regcache::raw_compare): Likewise.
6211         * regcache.h (regcache::raw_compare): New declaration.
6212
6213 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6214
6215         * common/common-regcache.h (reg_buffer_common): New structure.
6216         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6217         (reg_buffer::raw_supply): Likewise.
6218         (reg_buffer::raw_supply_integer): Likewise.
6219         (reg_buffer::raw_supply_zeroed): Likewise.
6220         (reg_buffer::raw_collect): Likewise.
6221         (reg_buffer::raw_collect_integer): Likewise.
6222         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6223         (reg_buffer::raw_supply): Likewise.
6224         (reg_buffer::raw_supply_integer): Likewise.
6225         (reg_buffer::raw_supply_zeroed): Likewise.
6226         (reg_buffer::raw_collect): Likewise.
6227         (reg_buffer::raw_collect_integer): Likewise.
6228
6229 2018-06-10  Tom Tromey  <tom@tromey.com>
6230
6231         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6232         (class remote_state) <stop_reply_queue>: Now std::vector.
6233         (remote_state::~remote_state)
6234         (remote_target::stop_reply_queue_length): Update.
6235         (struct queue_iter_param, remove_child_of_pending_fork)
6236         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6237         (check_pending_event_prevents_wildcard_vcont_callback)
6238         (remove_stop_reply_for_inferior)
6239         (remove_stop_reply_of_remote_state)
6240         (remote_notif_remove_once_on_match)
6241         (stop_reply_match_ptid_and_ws)
6242         (remote_kill_child_of_pending_fork): Remove.
6243         (remote_target::remove_new_fork_children)
6244         (remote_target::check_pending_events_prevent_wildcard_vcont)
6245         (remote_target::discard_pending_stop_replies)
6246         (remote_target::discard_pending_stop_replies_in_queue)
6247         (remote_target::remote_notif_remove_queued_reply)
6248         (remote_target::queued_stop_reply)
6249         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6250         (remote_target::wait, remote_target::kill_new_fork_children)
6251         (remote_target::async): Update.
6252
6253 2018-06-10  Tom Tromey  <tom@tromey.com>
6254
6255         * record-full.c (record_full_arch_list_cleanups): Remove.
6256         (record_full_message): Use try/catch.
6257         (record_full_wait_cleanups): Remove.
6258         (record_full_wait_1): Use try/catch.
6259         (record_full_restore): Likewise.
6260
6261 2018-06-10  Tom Tromey  <tom@tromey.com>
6262
6263         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6264         declare VEC.  Add constructor.
6265         <in_target_beneath>: Now bool.
6266         (record_full_breakpoints): Now a std::vector, static.
6267         (record_full_sync_record_breakpoints)
6268         (record_full_init_record_breakpoints)
6269         (record_full_target::insert_breakpoint)
6270         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6271
6272 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6273
6274         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6275         * serial.c (serial_interface_lookup): Remove struct keyword.
6276
6277 2018-06-10  Tom Tromey  <tom@tromey.com>
6278
6279         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6280         method.
6281         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6282         a method.
6283         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6284         method.
6285         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6286         "beneath" as a method.
6287         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6288         Use "beneath" as a method.
6289
6290 2018-06-10  Tom Tromey  <tom@tromey.com>
6291
6292         * tracefile.c (struct trace_file_writer_deleter): New.
6293         <operator()>: Rename from trace_file_writer_xfree.
6294         (trace_file_writer_up): New typedef.
6295         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6296
6297 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6298
6299         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6300         <m_registers, m_register_status>: Change type to
6301         std::unique_ptr.
6302         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6303         XCNEWVEC.
6304
6305 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6306
6307         * common/common-regcache.h (enum register_status): Add
6308         underlying type "signed char".
6309         * regcache.h (reg_buffer) <m_register_status>: Change type to
6310         register_status *.
6311         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6312         register_status instead of signed char.
6313         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6314         (reg_buffer::get_register_status): Remove cast.
6315         (readable_regcache::raw_read): Remove cast.
6316         (readable_regcache::cooked_read): Remove cast.
6317
6318 2018-06-09  Tom Tromey  <tom@tromey.com>
6319
6320         * source.c (reverse_search_command, forward_search_command): Use
6321         scoped_fd.
6322
6323 2018-06-09  Tom Tromey  <tom@tromey.com>
6324
6325         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6326         (serial_ops_list): Now static, std::vector.
6327         (serial_interface_lookup, serial_add_interface): Update.
6328
6329 2018-06-09  Tom Tromey  <tom@tromey.com>
6330
6331         * dwarf2read.c (process_cu_includes): Update.
6332         (process_full_comp_unit): Update.
6333         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6334         std::vector.
6335
6336 2018-06-08  Paul Koning  <paul_koning@dell.com>
6337
6338         PR gdb/23252
6339
6340         * python/python.c (do_start_initialization):
6341         Avoid call to internal Python API.
6342         (init__gdb_module): New function.
6343
6344 2018-06-08  Gary Benson <gbenson@redhat.com>
6345
6346         * linux-thread-db.c (valprint.h): New include.
6347         (struct check_thread_db_info): New structure.
6348         (check_thread_db_on_load, tdb_testinfo): New static globals.
6349         (check_thread_db, check_thread_db_callback): New functions.
6350         (try_thread_db_load_1): Run integrity checks if requested.
6351         (maintenance_check_libthread_db): New function.
6352         (_initialize_thread_db): Register "maint check libthread-db"
6353         and "maint set/show check-libthread-db".
6354         * NEWS: Mention the above new commands.
6355
6356 2018-06-08  Tom Tromey  <tom@tromey.com>
6357
6358         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6359         now a method.
6360
6361 2018-06-08  Tom Tromey  <tom@tromey.com>
6362
6363         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6364
6365 2018-06-08  Tom Tromey  <tom@tromey.com>
6366
6367         * common/btrace-common.h (struct btrace_data): Add constructor,
6368         destructor, move assignment operator.
6369         <empty, clear, fini>: New methods.
6370         <format>: Initialize.
6371         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6372         (btrace_data_empty): Don't declare.
6373         * common/btrace-common.c (btrace_data_init): Remove.
6374         (btrace_data::fini): Rename from btrace_data_fini.
6375         (btrace_data::empty): Rename from btrace_data_empty.
6376         (btrace_data::clear): Rename from btrace_data_clear.  Return
6377         bool.
6378         * btrace.h (make_cleanup_btrace_data): Don't declare.
6379         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6380         (parse_xml_btrace): Update.
6381         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6382         (maint_btrace_clear_packet_history_cmd): Update.
6383
6384 2018-06-07  Pedro Alves  <palves@redhat.com>
6385
6386         * target.h (target_ops) <beneath>: Now a method.  All references
6387         updated.
6388         (class target_stack): New.
6389         * target.c (g_target_stack): New.
6390         (g_current_top_target): Delete.
6391         (current_top_target): Get the top target out of g_target_stack.
6392         (target_stack::push, target_stack::unpush): New.
6393         (push_target, unpush_target): Reimplement.
6394         (target_is_pushed): Reimplement in terms of g_target_stack.
6395         (target_ops::beneath, target_stack::find_beneath): New.
6396
6397 2018-06-07  Pedro Alves  <palves@redhat.com>
6398
6399         * target.h (find_target_beneath): Delete declaration.
6400         * target.c (find_target_beneath): Delete definition.
6401         * aix-thread.c: All callers of find_target_beneath adjusted to
6402         call target_ops::beneath instead.
6403         * bsd-uthread.c: Likewise.
6404         * linux-thread-db.c: Likewise.
6405         * ravenscar-thread.c: Likewise.
6406         * sol-thread.c: Likewise.
6407         * spu-multiarch.c: Likewise.
6408
6409 2018-06-07  Pedro Alves  <palves@redhat.com>
6410
6411         * target.h (target_ops) <beneath>: Now a method.  All references
6412         updated.
6413         (target_ops) <m_beneath>: New.
6414         * target.c (target_ops::beneath): New.
6415         * corelow.c: Adjust all references to target_ops::beneath.
6416         * linux-thread-db.c: Likewise.
6417         * make-target-delegates: Likewise.
6418         * record-btrace.c: Likewise.
6419         * record-full.c: Likewise.
6420         * remote.c: Likewise.
6421         * target.c: Likewise.
6422         * target-delegates.c: Regenerate.
6423
6424 2018-06-07  Pedro Alves  <palves@redhat.com>
6425
6426         * target.h (target_stack): Delete.
6427         (current_top_target): Declare function.
6428         * target.c (target_stack): Delete.
6429         (g_current_top_target): New.
6430         (current_top_target): New function.
6431         * auxv.c: Use current_top_target instead of target_stack
6432         throughout.
6433         * avr-tdep.c: Likewise.
6434         * breakpoint.c: Likewise.
6435         * corefile.c: Likewise.
6436         * elfread.c: Likewise.
6437         * eval.c: Likewise.
6438         * exceptions.c: Likewise.
6439         * frame.c: Likewise.
6440         * gdbarch-selftests.c: Likewise.
6441         * gnu-v3-abi.c: Likewise.
6442         * ia64-tdep.c: Likewise.
6443         * ia64-vms-tdep.c: Likewise.
6444         * infcall.c: Likewise.
6445         * infcmd.c: Likewise.
6446         * infrun.c: Likewise.
6447         * linespec.c: Likewise.
6448         * linux-tdep.c: Likewise.
6449         * minsyms.c: Likewise.
6450         * ppc-linux-nat.c: Likewise.
6451         * ppc-linux-tdep.c: Likewise.
6452         * procfs.c: Likewise.
6453         * regcache.c: Likewise.
6454         * remote.c: Likewise.
6455         * rs6000-tdep.c: Likewise.
6456         * s390-linux-nat.c: Likewise.
6457         * s390-tdep.c: Likewise.
6458         * solib-aix.c: Likewise.
6459         * solib-darwin.c: Likewise.
6460         * solib-dsbt.c: Likewise.
6461         * solib-spu.c: Likewise.
6462         * solib-svr4.c: Likewise.
6463         * solib-target.c: Likewise.
6464         * sparc-tdep.c: Likewise.
6465         * sparc64-tdep.c: Likewise.
6466         * spu-tdep.c: Likewise.
6467         * symfile.c: Likewise.
6468         * symtab.c: Likewise.
6469         * target-descriptions.c: Likewise.
6470         * target-memory.c: Likewise.
6471         * target.c: Likewise.
6472         * target.h: Likewise.
6473         * tracefile-tfile.c: Likewise.
6474         * tracepoint.c: Likewise.
6475         * valops.c: Likewise.
6476         * valprint.c: Likewise.
6477         * value.c: Likewise.
6478         * windows-tdep.c: Likewise.
6479         * mi/mi-main.c: Likewise.
6480
6481 2018-06-07  Tom Tromey  <tom@tromey.com>
6482
6483         * valprint.h (build_address_symbolic): Declare.
6484         * printcmd.c (print_address_symbolic): Update.
6485         (build_address_symbolic): Change "name" and "filename" to
6486         std::string.
6487         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6488         Update.
6489         * defs.h (build_address_symbolic): Remove declaration.
6490
6491 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6492
6493         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6494         (aarch64_vnv_type): Add function.
6495         (aarch64_pseudo_register_name): Add V regs for SVE.
6496         (aarch64_pseudo_register_type): Likewise.
6497         (aarch64_pseudo_register_reggroup_p): Likewise.
6498         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6499         (aarch64_pseudo_read_value): Add V regs for SVE.
6500         (aarch64_pseudo_write_2): Use V0 offset for SVE
6501         (aarch64_pseudo_write): Add V regs for SVE.
6502         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6503
6504 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6505
6506         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6507         (sve_vl_from_vq): Likewise.
6508
6509 2018-06-05  Tom Tromey  <tom@tromey.com>
6510
6511         * cli/cli-cmds.c (show_version): Update.
6512         * top.c (print_gdb_version): Add "interactive" parameter.
6513         Update.
6514         * main.c (captured_main_1): Update.
6515         * top.h (print_gdb_version): Add "interactive" parameter and a
6516         comment.
6517
6518 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6519
6520         * common/enum-flags.h: Add trailing semicolon to example in
6521         comment.
6522
6523 2018-06-05  Tom Tromey  <tom@tromey.com>
6524
6525         PR cli/12326:
6526         * NEWS: Add entry about pager.
6527         * utils.c (pagination_disabled_for_command): New global.
6528         (prompt_for_continue): Allow "c" response to prompt.
6529         (reinitialize_more_filter): Clear
6530         pagination_disabled_for_command.
6531         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6532
6533 2018-06-04  Tom Tromey  <tom@tromey.com>
6534
6535         * ada-lang.h (ada_lookup_symbol_list): Update.
6536         * ada-lang.c (resolve_subexp): Update.
6537         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6538         parameter.
6539         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6540         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6541         results parameter to std::vector.
6542         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6543         Update.
6544         * ada-exp.y (block_lookup): Update.
6545         (select_possible_type_sym): Change type of syms.  Remove nsyms
6546         parameter.
6547         (write_var_or_type, write_name_assoc): Update.
6548
6549 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6550
6551         * windows-nat.c (windows_nat_target::xfer_partial): Return
6552         TARGET_XFER_E_IO if we need to delegate to the target beneath
6553         but BENEATH is NULL.
6554
6555 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6556
6557         * Makefile.in (config.status): Add configure.nat as a
6558         dependency.
6559
6560 2018-06-04  Tom Tromey  <tom@tromey.com>
6561
6562         * cp-name-parser.y (cpname_state): Add method declarations.
6563         (HANDLE_QUAL): Update.
6564         (cpname_state::d_grab, cpname_state::fill_comp)
6565         (cpname_state::make_operator, cpname_state::make_dtor)
6566         (cpname_state::make_builtin_type, cpname_state::make_name)
6567         (cpname_state::d_qualify, cpname_state::d_int_type)
6568         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6569         (%union): Move earlier.
6570
6571 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6572
6573         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6574
6575 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6576
6577         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6578         (aarch64_pseudo_write_1): Likewise.
6579         (aarch64_pseudo_read_value): Use helper.
6580         (aarch64_pseudo_write): Likewise.
6581
6582 2018-06-04  Pedro Alves  <palves@redhat.com>
6583
6584         * darwin-nat.c (darwin_ops): Delete.
6585         (darwin_attach_pid): Use get_native_target.
6586
6587 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6588
6589         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6590         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6591
6592 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6593
6594         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6595         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6596         (aarch64_gdbarch_init): Check for SVE.
6597         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6598
6599 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6600
6601         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6602         * aarch64-tdep.h (aarch64_read_description): Likewise.
6603         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6604         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6605         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6606         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6607         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6608
6609 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6610
6611         * value.c (value_fetch_lazy_bitfield): New.
6612         (value_fetch_lazy_memory): New.
6613         (value_fetch_lazy_register): New.
6614         (value_fetch_lazy): Factor out to smaller functions.
6615
6616 2018-06-01  Tom Tromey  <tom@tromey.com>
6617
6618         * cp-name-parser.y (backslashable, represented): Now const.
6619
6620 2018-06-01  Tom Tromey  <tom@tromey.com>
6621
6622         * cp-name-parser.y: Include parser-defs.h.
6623         (parser_fprintf): Remove declaration.
6624
6625 2018-06-01  Tom Tromey  <tom@tromey.com>
6626
6627         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6628         %parse-param.
6629         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6630         (global_result): Remove globals.
6631         (struct cpname_state): New.
6632         (yyparse): Don't declare.
6633         (yylex, yyerror): Move declarations after %union.
6634         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6635         (make_name): Add state parameter.
6636         Update all callers.
6637         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6638         parameter.
6639         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6640         Update.
6641         (yylex): Add lvalp, state parameters.
6642         (yyerror): Add state parameter.
6643         (cp_demangled_name_to_comp): Update.
6644
6645 2018-06-01  Tom Tromey  <tom@tromey.com>
6646
6647         * cp-name-parser.y (parser_fprintf): Declare.
6648         (GDB_YY_REMAP_PREFIX): Define.
6649         Include yy-remap.h.  Don't redefine yy* identifiers.
6650
6651 2018-06-01  Tom Tromey  <tom@tromey.com>
6652
6653         * python/py-type.c (typy_legacy_template_argument): Update.
6654         * cp-support.h (cp_demangled_name_to_comp): Update.
6655         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6656         parameter to be a "std::string *".
6657         (main): Update.
6658
6659 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6660
6661         * ada-lex.l: Include "diagnostics.h" instead of
6662         "common/diagnostics.h".
6663         * unittests/environ-selftests.c: Likewise.
6664         * common/diagnostics.h: Moved to ../include.
6665
6666 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6667
6668         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6669         to language_mode_manual while calling breakpoint_re_set_one.
6670
6671 2018-06-01  Tom Tromey  <tom@tromey.com>
6672
6673         * valops.c (value_cast_structs, destructor_name_p): Update.
6674         * symtab.c (gdb_mangle_name): Update.
6675         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6676         Update.
6677         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6678         (pascal_object_print_value_fields, pascal_object_print_value):
6679         Update.
6680         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6681         * linespec.c (find_methods): Update.
6682         * gdbtypes.h (type_name_no_tag): Remove.
6683         (type_name_or_error): Rename from type_name_no_tag_or_error.
6684         * gdbtypes.c (type_name_no_tag): Remove.
6685         (type_name_or_error): Rename from type_name_no_tag_or_error.
6686         (lookup_struct_elt_type, check_typedef): Update.
6687         * expprint.c (print_subexp_standard): Update.
6688         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6689         * d-namespace.c (d_lookup_nested_symbol): Update.
6690         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6691         (cp_print_class_member): Update.
6692         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6693         * completer.c (add_struct_fields): Update.
6694         * c-typeprint.c (cp_type_print_derivation_info)
6695         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6696         Update.
6697         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6698         (ada_prefer_type, ada_is_exception_sym): Update.
6699
6700 2018-06-01  Tom Tromey  <tom@tromey.com>
6701
6702         * valops.c (enum_constant_from_type, value_namespace_elt)
6703         (value_maybe_namespace_elt): Update.
6704         * valarith.c (find_size_for_pointer_math): Update.
6705         * target-descriptions.c (make_gdb_type): Update.
6706         * symmisc.c (print_symbol): Update.
6707         * stabsread.c (define_symbol, read_type)
6708         (complain_about_struct_wipeout, add_undefined_type)
6709         (cleanup_undefined_types_1): Update.
6710         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6711         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6712         (rust_internal_print_type, rust_composite_type)
6713         (rust_evaluate_funcall, rust_evaluate_subexp)
6714         (rust_inclusive_range_type_p): Update.
6715         * python/py-type.c (typy_get_tag): Update.
6716         * p-typeprint.c (pascal_type_print_base): Update.
6717         * mdebugread.c (parse_symbol, parse_type): Update.
6718         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6719         Update.
6720         * guile/scm-type.c (gdbscm_type_tag): Update.
6721         * go-lang.c (sixg_string_p): Update.
6722         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6723         Update.
6724         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6725         (TYPE_TAG_NAME): Remove.
6726         * gdbtypes.c (type_name_no_tag): Simplify.
6727         (check_typedef, check_types_equal, recursive_dump_type)
6728         (copy_type_recursive, arch_composite_type): Update.
6729         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6730         in summary mode when needed.
6731         * eval.c (evaluate_funcall): Update.
6732         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6733         (process_structure_scope, read_enumeration_type)
6734         (read_namespace_type, read_module_type, determine_prefix): Update.
6735         * cp-support.c (inspect_type): Update.
6736         * coffread.c (process_coff_symbol, decode_base_type): Update.
6737         * c-varobj.c (c_is_path_expr_parent): Update.
6738         * c-typeprint.c (c_type_print_base_struct_union): Update.
6739         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6740         summary when using C language.
6741         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6742         (gen_maybe_namespace_elt): Update.
6743         * ada-lang.c (ada_type_name): Simplify.
6744         (empty_record, ada_template_to_fixed_record_type_1)
6745         (template_to_static_fixed_type)
6746         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6747
6748 2018-06-01  Tom Tromey  <tom@tromey.com>
6749
6750         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6751         c_print_type.
6752         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6753         (c_print_type): Update.
6754         (c_print_type): New overload.
6755         (c_type_print_varspec_prefix, c_type_print_args)
6756         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6757         (c_type_print_base_struct_union, c_type_print_base_1)
6758         (cp_type_print_method_args): Add "language" parameter.
6759         (c_type_print_base): Update.
6760         * c-lang.h (c_print_type): Add new overload.
6761
6762 2018-06-01  Tom Tromey  <tom@tromey.com>
6763
6764         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6765         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6766
6767 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6768
6769         * aarch64-tdep.c (aarch64_sve_register_names): New const
6770         var.
6771         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6772         (AARCH64_SVE_Z_REGS_NUM): New define.
6773         (AARCH64_SVE_P_REGS_NUM): Likewise.
6774         (AARCH64_SVE_NUM_REGS): Likewise.
6775
6776 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6777
6778         * nat/linux-ptrace.h [__alpha__]
6779         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6780         definitions.
6781
6782 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6783
6784         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6785         the endianness selected.
6786         * NEWS: Document `set endian auto' mode operation update.
6787
6788 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6789
6790         * Makefile.in: Add new header.
6791         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6792         (sve_vl_from_vg): Likewise.
6793         (sve_vq_from_vl): Likewise.
6794         (sve_vl_from_vq): Likewise.
6795         (sve_vq_from_vg): Likewise.
6796         (sve_vg_from_vq): Likewise.
6797         * configure.nat: Add new c file.
6798         * nat/aarch64-sve-linux-ptrace.c: New file.
6799         * nat/aarch64-sve-linux-ptrace.h: New file.
6800
6801 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6802
6803         * aarch64-linux-nat.c (aarch64_linux_read_description):
6804         Add parmeter zero.
6805         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6806         Likewise.
6807         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6808         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6809         (aarch64_gdbarch_init): Add parmeter zero.
6810         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6811         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6812         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6813         parmeter.
6814         * doc/gdb.texinfo: Describe SVE feature
6815         * features/aarch64-sve.c: New file.
6816
6817 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6818
6819         PR gdb/23210
6820         * gdbarch.sh (significant_addr_bit): Default to zero when
6821         not set by target architecture.
6822         * gdbarch.c: Re-generated.
6823         * utils.c (address_significant): Update.
6824
6825 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6826
6827         * stack.c (func_command): Remove trailing newline in call to error.
6828
6829 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6830
6831         * regcache.h (regcache_raw_collect): Remove, update callers to
6832         use regcache::raw_collect.
6833         * regcache.c (regcache_raw_collect): Remove.
6834
6835 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6836
6837         * regcache.h (regcache_raw_supply): Remove, update callers to
6838         use detached_regcache::raw_supply.
6839         * regcache.c (regcache_raw_supply): Remove.
6840
6841 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6842
6843         * regcache.h (regcache_cooked_write_part): Remove, update
6844         callers to use regcache::cooked_write_part.
6845         * regcache.c (regcache_cooked_write_part): Remove.
6846
6847 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6848
6849         * regcache.h (regcache_cooked_read_part): Remove, update callers
6850         to use readable_regcache::cooked_read_part.
6851         * regcache.c (regcache_cooked_read_part): Remove.
6852
6853 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6854
6855         * regcache.h (regcache_cooked_read_value): Remove, update
6856         callers to use readable_regcache::cooked_read_value.
6857         * regcache.c (regcache_cooked_read_value): Remove.
6858
6859 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6860
6861         * regcache.h (regcache_cooked_write): Remove, update callers to
6862         use regcache::cooked_write.
6863         * regcache.c (regcache_cooked_write): Remove.
6864
6865 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6866
6867         * regcache.h (regcache_invalidate): Remove, update callers to
6868         use detached_regcache::invalidate instead.
6869         * regcache.c (regcache_invalidate): Remove.
6870
6871 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6872
6873         * regcache.h (regcache_raw_write_part): Remove, update callers
6874         to use regcache::raw_write_part instead.
6875         * regcache.c (regcache_raw_write_part): Remove.
6876
6877 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6878
6879         * regcache.h (regcache_raw_read_part): Remove, update callers to
6880         use readable_regcache::raw_read_part instead.
6881         * regcache.c (regcache_raw_read_part): Remove.
6882
6883 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6884
6885         * regcache.h (regcache_cooked_read): Remove, update callers to
6886         use readable_regcache::cooked_read instead.
6887         * regcache.c (regcache_cooked_read): Remove.
6888
6889 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6890
6891         * regcache.h (regcache_raw_write): Remove, update callers to use
6892         regcache::raw_write instead.
6893         * regcache.c (regcache_raw_write): Remove.
6894
6895 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6896
6897         * regcache.h (regcache_raw_read): Remove, update callers to use
6898         readable_regcache::raw_read instead.
6899         * regcache.c (regcache_raw_read): Remove.
6900
6901 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6902
6903         * regcache.h (regcache_raw_update): Remove, update callers to
6904         use readable_regcache::raw_update instead.
6905         * regcache.c (regcache_raw_update): Remove.
6906
6907 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6908
6909         * regcache.h (regcache_register_status): Remove, update callers
6910         to use reg_buffer::get_register_status directly instead.
6911         * regcache.c (regcache_register_status): Remove.
6912
6913 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6914
6915         * regcache.h (regcache_get_ptid): Remove, update all callers to
6916         call regcache::ptid instead.
6917         * regcache.c (regcache_get_ptid): Remove.
6918
6919 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6920
6921         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6922
6923 2018-05-30  Pedro Alves  <palves@redhat.com>
6924
6925         * common/common-exceptions.h (exception_rethrow): Use
6926         ATTRIBUTE_NORETURN.
6927
6928 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6929
6930         * breakpoint.c (print_solib_event, check_status_catch_solib):
6931         Remove struct keyword in range-based for loops.
6932         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6933         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6934         Likewise.
6935         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6936         Likewise.
6937         * symfile.c (addr_info_make_relative): Likewise.
6938         * thread.c (value_in_thread_stack_temporaries): Likewise.
6939
6940 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6941
6942         PR gdb/16841
6943         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6944         aggregate type to get its real type before accessing it.
6945
6946 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6947
6948         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6949         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6950         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6951         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6952         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6953         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6954         * printcmd.c (info_address_command): Likewise.
6955
6956 2018-05-29  Tom Tromey  <tom@tromey.com>
6957
6958         * windows-nat.c (handle_exception): Update fall-through comment.
6959
6960 2018-05-29  Tom Tromey  <tom@tromey.com>
6961
6962         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6963         (struct program_space) <added_solibs>: Now a std::vector.
6964         * breakpoint.c (print_solib_event): Update.
6965         (check_status_catch_solib): Update.
6966         * progspace.c (clear_program_space_solib_cache): Update.
6967         * solib.c (update_solib_list): Update.
6968
6969 2018-05-29  Tom Tromey  <tom@tromey.com>
6970
6971         * python/py-type.c (typy_richcompare): Update.
6972         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6973         * gdbtypes.h (types_deeply_equal): Return bool.
6974         (types_equal): Likewise.
6975         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6976         declare VEC.
6977         (check_types_equal): Change worklist to std::vector.  Return
6978         bool.
6979         (struct type_equality_entry): Add constructor.
6980         (compare_maybe_null_strings): Return bool.
6981         (check_types_worklist): Return bool.  Change worklist to
6982         std::vector.
6983         (types_deeply_equal): Use std::vector.
6984         (types_equal): Return bool.
6985         (compare_maybe_null_strings): Simplify.
6986
6987 2018-05-29  Tom Tromey  <tom@tromey.com>
6988
6989         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6990
6991 2018-05-29  Tom Tromey  <tom@tromey.com>
6992
6993         * objc-lang.h: Don't include cp-support.h.
6994         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6995         declare VEC.
6996
6997 2018-05-27  Tom Tromey  <tom@tromey.com>
6998
6999         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7000
7001 2018-05-25  Tom Tromey  <tom@tromey.com>
7002
7003         * value.c (value::location): Initialize.
7004
7005 2018-05-25  Tom Tromey  <tom@tromey.com>
7006
7007         * dbxread.c (init_bincl_list): Remove.
7008         (bincl_list): Now a std::vector.
7009         (bincls_allocated, next_bincl): Remove.
7010         (free_bincl_list, do_free_bincl_list_cleanup)
7011         (make_cleanup_free_bincl_list): Remove.
7012         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7013         unique_xmalloc_ptr.
7014         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7015         (struct header_file_location): Add constructor.
7016         (add_bincl_to_list): Remove.
7017
7018 2018-05-25  Tom Tromey  <tom@tromey.com>
7019
7020         * tui/tui.c (tui_enable): Update.
7021         * mi/mi-interp.c (mi_interp::init): Update.
7022         * interps.h (class interp) <name>: New method.
7023         <m_name>: Rename from name.
7024         (~scoped_restore_interp): Update.
7025         * interps.c (interp::interp): Update.
7026         (interp_add, interp_set, interp_lookup_existing)
7027         (current_interp_named_p): Update.
7028
7029 2018-05-25  Tom Tromey  <tom@tromey.com>
7030
7031         * interps.c (interp_name): Remove.
7032         * mi/mi-interp.c (mi_interp::init): Update.
7033         * interps.h (interp_name): Remove.
7034         (~scoped_restore_interp): Update.
7035         * tui/tui.c (tui_enable): Update.
7036
7037 2018-05-25  Tom Tromey  <tom@tromey.com>
7038
7039         * utils.c (fputs_maybe_filtered): Update.
7040         * linespec.c (decode_line_full): Update.
7041         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7042         (mi_print_breakpoint_for_event, mi_solib_loaded)
7043         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7044         (mi_user_selected_context_changed): Update.
7045         * mi/mi-main.c (mi_execute_command): Update.
7046         * cli/cli-script.c (execute_control_command): Update.
7047         * python/python.c (execute_gdb_command): Update.
7048         * solib.c (info_sharedlibrary_command): Update.
7049         * interps.c (interp_ui_out): Remove.
7050         * interps.h (interp_ui_out): Remove.
7051
7052 2018-05-25  Tom Tromey  <tom@tromey.com>
7053
7054         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7055         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7056         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7057
7058 2018-05-25  Tom Tromey  <tom@tromey.com>
7059
7060         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7061         * interps.c (interp_exec): Use scoped_restore.
7062
7063 2018-05-25  Tom Tromey  <tom@tromey.com>
7064
7065         * remote.c (remote_target::remote_file_get): Use
7066         gdb::byte_vector.
7067         (remote_target::remote_file_put): Likewise.
7068
7069 2018-05-25  Tom Tromey  <tom@tromey.com>
7070
7071         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7072         a std::string.
7073         (get_pe_section_index, add_pe_exported_sym): Update.
7074         (read_pe_exported_syms): Use gdb::def_vector.
7075
7076 2018-05-25  Tom Tromey  <tom@tromey.com>
7077
7078         * frame.c (remove_prev_frame): Remove.
7079         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7080
7081 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7082
7083         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7084         Remove prototypes.
7085         * mips-linux-nat.c (supply_fpregset): Always call
7086         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7087         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7088         `mips_fill_fpregset'.
7089         * mips-linux-tdep.c (mips_supply_fpregset)
7090         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7091         (mips_fill_fpregset_wrapper): Remove functions.
7092         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7093         (mips_linux_fpregset): Remove variable.
7094         (mips_linux_iterate_over_regset_sections): Use
7095         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7096         (mips_linux_o32_sigframe_init): Remove comment.
7097
7098 2018-05-25  Pedro Alves  <palves@redhat.com>
7099
7100         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7101         (struct readahead_cache, struct packet_reg, struct
7102         remote_arch_state, class remote_state): Move higher up in the
7103         file.
7104         (remote_target::m_remote_state): Now an object instead of a pointer.
7105         (remote_target::get_remote_state): Adjust.
7106
7107 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7108
7109         * stack.c (select_and_print_frame): Delete.
7110         (struct function_bounds): Move struct within function.
7111         (func_command): Most content moved into new function
7112         find_frame_for_function, use new function, print result, add
7113         function comment.
7114         (find_frame_for_function): New function, now returns a result.
7115
7116 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7117
7118         * stack.c (iterate_over_block_arg_vars): Fix comment.
7119         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7120
7121 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7122
7123         PR gdb/23203
7124         * frame.c
7125         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7126         Define.
7127         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7128         Define.
7129         * frame.h (class scoped_restore_selected_frame): New class.
7130         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7131         of any exception, use scoped_restore_selected_frame to restore the
7132         frame instead.
7133
7134 2018-05-24  Pedro Alves  <palves@redhat.com>
7135
7136         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7137         override.
7138
7139 2018-05-23  Tom Tromey  <tom@tromey.com>
7140
7141         * complaints.c (struct complaints): Remove.
7142         (symfile_complaint_book): Remove.
7143         (series): New global.
7144         (complaint_internal): Update.
7145         (clear_complaints): Update.
7146
7147 2018-05-23  Tom Tromey  <tom@tromey.com>
7148
7149         * complaints.c (counters): New global.
7150         (struct complain): Remove.
7151         (struct complaints) <root>: Remove.
7152         (complaint_sentinel): Remove.
7153         (symfile_complaint_book): Update.
7154         (find_complaint) Remove.
7155         (complaint_internal, clear_complaints): Update.
7156
7157 2018-05-23  Tom Tromey  <tom@tromey.com>
7158
7159         * complaints.c (struct complain) <file, line>: Remove.
7160         (find_complaint): Remove file, line parameters.
7161         (complaint_internal): Update.
7162
7163 2018-05-23  Tom Tromey  <tom@tromey.com>
7164
7165         * complaints.c (vcomplaint): Remove.
7166         (complaint_internal) Merge in contents of vcomplaint.
7167
7168 2018-05-23  Tom Tromey  <tom@tromey.com>
7169
7170         * complaints.c (struct complaints) <explanation>: Remove.
7171         (symfile_explanations): Remove.
7172         (symfile_complaint_book): Update.
7173         (vcomplaint): Update.
7174         (struct explanation): Remove.
7175
7176 2018-05-23  Tom Tromey  <tom@tromey.com>
7177
7178         * complaints.c (symfile_complaints): Remove.
7179         (complaint_internal): Remove "complaints" parameter.
7180         (clear_complaints, vcomplaint): Remove "c" parameter.
7181         (get_complaints): Remove.
7182         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7183         (dwarf2_debug_line_missing_file_complaint)
7184         (dwarf2_debug_line_missing_end_sequence_complaint)
7185         (dwarf2_complex_location_expr_complaint)
7186         (dwarf2_const_value_length_mismatch_complaint)
7187         (dwarf2_section_buffer_overflow_complaint)
7188         (dwarf2_macro_malformed_definition_complaint)
7189         (dwarf2_invalid_attrib_class_complaint)
7190         (create_addrmap_from_index, dw2_symtab_iter_next)
7191         (dw2_expand_marked_cus)
7192         (dw2_debug_names_iterator::find_vec_in_debug_names)
7193         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7194         (create_debug_type_hash_table, init_cutu_and_read_dies)
7195         (partial_die_parent_scope, add_partial_enumeration)
7196         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7197         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7198         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7199         (create_cus_hash_table, create_dwp_hash_table)
7200         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7201         (dwarf2_rnglists_process, dwarf2_ranges_process)
7202         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7203         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7204         (handle_struct_member_die, process_structure_scope)
7205         (read_array_type, read_common_block, read_module_type)
7206         (read_tag_pointer_type, read_typedef, read_base_type)
7207         (read_subrange_type, load_partial_dies, partial_die_info::read)
7208         (partial_die_info::read, partial_die_info::read)
7209         (partial_die_info::read, read_checked_initial_length_and_offset)
7210         (dwarf2_string_attr, read_formatted_entries)
7211         (dwarf_decode_line_header)
7212         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7213         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7214         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7215         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7216         (get_signatured_type, get_DW_AT_signature_type)
7217         (decode_locdesc, file_file_name, consume_improper_spaces)
7218         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7219         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7220         (dwarf2_symbol_mark_computed, set_die_type)
7221         (read_attribute_value): Update.
7222         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7223         Update.
7224         * dbxread.c (unknown_symtype_complaint)
7225         (lbrac_mismatch_complaint, repeated_header_complaint)
7226         (set_namestring, function_outside_compilation_unit_complaint)
7227         (read_dbx_symtab, process_one_symbol): Update.
7228         * gdbtypes.c (stub_noname_complaint): Update.
7229         * windows-nat.c (handle_unload_dll): Update.
7230         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7231         (decode_base_type): Update.
7232         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7233         (eb_complaint, record_include_begin, record_include_end)
7234         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7235         (process_xcoff_symbol, read_symbol)
7236         (function_outside_compilation_unit_complaint)
7237         (scan_xcoff_symtab): Update.
7238         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7239         * buildsym.c (finish_block_internal, make_blockvector)
7240         (end_symtab_get_static_block, augment_type_symtab): Update.
7241         * dtrace-probe.c (dtrace_process_dof)
7242         (dtrace_static_probe_ops::get_probes): Update.
7243         * complaints.h (struct complaint): Don't declare.
7244         (symfile_complaints): Remove.
7245         (complaint_internal): Remove "complaints" parameter.
7246         (complaint): Likewise.
7247         (clear_complaints): Likewise.
7248         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7249         (reread_symbols): Update.
7250         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7251         (dwarf2_frame_cache, decode_frame_entry): Update.
7252         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7253         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7254         (info_selectors_command): Update.
7255         * macrotab.c (macro_include, check_for_redefinition)
7256         (macro_undef): Update.
7257         * objfiles.c (filter_overlapping_sections): Update.
7258         * stabsread.c (invalid_cpp_abbrev_complaint)
7259         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7260         (define_symbol, error_type, read_type, rs6000_builtin_type)
7261         (stabs_method_name_from_physname, read_member_functions)
7262         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7263         (attach_fields_to_type, complain_about_struct_wipeout)
7264         (read_range_type, read_args, common_block_start)
7265         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7266         Update.
7267         * mdebugread.c (index_complaint, unknown_ext_complaint)
7268         (basic_type_complaint, bad_tag_guess_complaint)
7269         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7270         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7271         (parse_procedure, parse_lines)
7272         (function_outside_compilation_unit_complaint)
7273         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7274         (bad_tag_guess_complaint, reg_value_complaint): Update.
7275         * cp-support.c (demangled_name_complaint): Update.
7276         * macroscope.c (sal_macro_scope): Update.
7277         * dwarf-index-write.c (class debug_names): Update.
7278
7279 2018-05-23  Tom Tromey  <tom@tromey.com>
7280
7281         * complaints.c (clear_complaints): Remove "noisy" parameter.
7282         * complaints.h (clear_complaints): Update.
7283         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7284         (reread_symbols): Update.
7285
7286 2018-05-23  Tom Tromey  <tom@tromey.com>
7287
7288         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7289         SUBSEQUENT_MESSAGE.
7290         (vcomplaint, clear_complaints): Update.
7291         (symfile_explanations): Remove some messages.
7292
7293 2018-05-23  Tom Tromey  <tom@tromey.com>
7294
7295         * complaints.c (internal_complaint): Remove.
7296         * complaints.h (internal_complaint): Remove.
7297
7298 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7299
7300         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7301
7302 2018-05-22  Pedro Alves  <palves@redhat.com>
7303
7304         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7305         (remote_fileio_badfd, remote_fileio_return_errno)
7306         (remote_fileio_return_success, remote_fileio_func_open)
7307         (remote_fileio_func_open, remote_fileio_func_close)
7308         (remote_fileio_func_read, remote_fileio_func_write)
7309         (remote_fileio_func_lseek, remote_fileio_func_rename)
7310         (remote_fileio_func_unlink, remote_fileio_func_stat)
7311         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7312         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7313         remote_target parameter.
7314         (remote_fio_func_map) <func>: Add remote_target parameter.
7315         (do_remote_fileio_request, remote_fileio_request):
7316         * remote-fileio.h (remote_fileio_request):
7317         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7318         remote_target parameter.
7319         (remote_notif_process, handle_notification): Adjust to pass down
7320         the remote.
7321         (remote_notif_state_allocate): Add remote_target parameter.  Save
7322         it.
7323         * remote-notif.h (struct remote_target): Forward declare.
7324         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7325         remote_target parameter.
7326         (struct remote_notif_state) <remote>: New field.
7327         (remote_notif_ack, remote_notif_parse): Add remote_target
7328         parameter.
7329         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7330         remote_target parameter.
7331         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7332         (threads_listing_context, rmt_thread_action, protocol_feature)
7333         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7334         (packet_result, struct threads_listing_context, remote_state):
7335         Move definitions and declarations higher up.
7336         (remote_target) <~remote_target>: Declare.
7337         (remote_download_command_source, remote_file_put, remote_file_get)
7338         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7339         (remote_hostio_pread_vFile, remote_hostio_send_command)
7340         (remote_hostio_set_filesystem, remote_hostio_open)
7341         (remote_hostio_close, remote_hostio_unlink, remote_state)
7342         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7343         (get_memory_write_packet_size, get_memory_read_packet_size)
7344         (append_pending_thread_resumptions, remote_detach_1)
7345         (append_resumption, remote_resume_with_vcont)
7346         (add_current_inferior_and_thread, wait_ns, wait_as)
7347         (process_stop_reply, remote_notice_new_inferior)
7348         (process_initial_stop_replies, remote_add_thread)
7349         (btrace_sync_conf, remote_btrace_maybe_reopen)
7350         (remove_new_fork_children, kill_new_fork_children)
7351         (discard_pending_stop_replies, stop_reply_queue_length)
7352         (check_pending_events_prevent_wildcard_vcont)
7353         (discard_pending_stop_replies_in_queue, stop_reply)
7354         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7355         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7356         (remote_interrupt_as, remote_interrupt_ns)
7357         (remote_get_noisy_reply, remote_query_attached)
7358         (remote_add_inferior, remote_current_thread, get_current_thread)
7359         (set_thread, set_general_thread, set_continue_thread)
7360         (set_general_process, write_ptid)
7361         (remote_unpack_thread_info_response, remote_get_threadinfo)
7362         (parse_threadlist_response, remote_get_threadlist)
7363         (remote_threadlist_iterator, remote_get_threads_with_ql)
7364         (remote_get_threads_with_qxfer)
7365         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7366         (get_offsets, remote_check_symbols, remote_supported_packet)
7367         (remote_query_supported, remote_packet_size)
7368         (remote_serial_quit_handler, remote_detach_pid)
7369         (remote_vcont_probe, remote_resume_with_hc)
7370         (send_interrupt_sequence, interrupt_query)
7371         (remote_notif_get_pending_events, fetch_register_using_p)
7372         (send_g_packet, process_g_packet, fetch_registers_using_g)
7373         (store_register_using_P, store_registers_using_G)
7374         (set_remote_traceframe, check_binary_download)
7375         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7376         (remote_xfer_live_readonly_partial, remote_read_bytes)
7377         (remote_send_printf, remote_flash_write, readchar)
7378         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7379         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7380         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7381         (extended_remote_disable_randomization, extended_remote_run)
7382         (send_environment_packet, extended_remote_environment_support)
7383         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7384         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7385         (packet_command): Now methods of ...
7386         (remote_target): ... this class.
7387         (m_remote_state) <remote_target>: New field.
7388         (struct remote_state) <stop_reply_queue,
7389         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7390         fields.
7391         (remote_state::remote_state): Allocate stop_reply_queue.
7392         (remote_state): Delete global.
7393         (get_remote_state_raw): Delete.
7394         (remote_target::get_remote_state): Allocate m_remote_state on
7395         demand.
7396         (get_current_remote_target): New.
7397         (remote_ops, extended_remote_ops): Delete.
7398         (wait_forever_enabled_p, remote_async_inferior_event_token):
7399         Delete, moved to struct remote_state.
7400         (remote_target::close): Delete self.  Destruction bits split to
7401         ...
7402         (remote_target::~remote_target): ... this.
7403         (show_memory_packet_size): Adjust to use
7404         get_current_remote_target.
7405         (struct protocol_feature) <func>: Add remote_target parameter.
7406         All callers adjusted.
7407         (curr_quit_handler_target): New.
7408         (remote_serial_quit_handler): Reimplement.
7409         (remote_target::open_1): Adjust to use get_current_remote_target.
7410         Heap-allocate remote_target/extended_remote_target instances.
7411         (vcont_builder::vcont_builder): Add remote_target parameter, and
7412         save it in m_remote.  All callers adjusted.
7413         (vcont_builder::m_remote): New field.
7414         (vcont_builder::restart, vcont_builder::flush)
7415         (vcont_builder::push_action): Use it.
7416         (remote_target::commit_resume): Use it.
7417         (struct queue_iter_param) <remote>: New field.
7418         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7419         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7420         (check_pending_event_prevents_wildcard_vcont_callback)
7421         (remote_target::check_pending_events_prevent_wildcard_vcont)
7422         (remote_target::discard_pending_stop_replies)
7423         (remote_target::discard_pending_stop_replies_in_queue)
7424         (remote_target::remote_notif_remove_queued_reply): Fill in
7425         'remote' field.
7426         (remote_notif_get_pending_events): New.
7427         (remote_target::readchar, remote_target::remote_serial_write):
7428         Save/restore curr_quit_handler_target.
7429         (putpkt): New.
7430         (kill_new_fork_children): Fill in 'remote' field.
7431         (packet_command): Use get_current_remote_target, defer to
7432         remote_target method of same name.
7433         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7434         parameter, and save it in m_remote.  All callers adjusted.
7435         (scoped_remote_fd::release): Use m_remote.
7436         (scoped_remote_fd::m_remote): New field.
7437         (remote_file_put, remote_file_get, remote_file_delete): Use
7438         get_current_remote_target, defer to remote_target method of same
7439         name.
7440         (remote_btrace_reset): Add remote_state paremeter.  Update all
7441         callers.
7442         (remote_async_inferior_event_handler). Pass down 'data'.
7443         (remote_new_objfile): Use get_current_remote_target.
7444         (remote_target::vcont_r_supported): New.
7445         (set_range_stepping): Use get_current_remote_target and
7446         remote_target::vcont_r_supported.
7447         (_initialize_remote): Don't allocate 'remote_state' and
7448         'stop_reply_queue' globals.
7449         * remote.h (struct remote_target): Forward declare.
7450         (getpkt, putpkt, remote_notif_get_pending_events): Add
7451         'remote_target' parameter.
7452
7453 2018-05-22  Pedro Alves  <palves@redhat.com>
7454
7455         * remote.c (vcont_builder): Now a class.  Make all data members
7456         private.
7457         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7458         Declare methods.
7459         (vcont_builder_restart): Rename to ...
7460         (vcont_builder::restart): ... this.
7461         (vcont_builder_flush): Rename to ...
7462         (vcont_builder::flush): ... this.
7463         (vcont_builder_push_action): Rename to ...
7464         (vcont_builder::push_action): ... this.
7465         (remote_target::commit_resume): Adjust.
7466
7467 2018-05-22  Pedro Alves  <palves@redhat.com>
7468
7469         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7470         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7471         (get_fixed_memory_packet_size): New.
7472         (get_memory_packet_size): Use it.
7473         (set_memory_packet_size): Don't override the config size with
7474         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7475         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7476         Don't refer to get_memory_packet_size if not connected to a remote
7477         target.  Show "(default)" if configured size is 0.
7478
7479 2018-05-22  Pedro Alves  <palves@redhat.com>
7480
7481         * remote.c (remote_target::mourn_inferior): Move
7482         discard_pending_stop_replies call here from ...
7483         (_initialize_remote): ... here.
7484
7485 2018-05-22  Pedro Alves  <palves@redhat.com>
7486
7487         * remote.c (compare_section_command): Remove set_general_process
7488         call.
7489
7490 2018-05-22  Pedro Alves  <palves@redhat.com>
7491
7492         * remote.c (struct packet_reg, struct remote_arch_state):
7493         Move higher up in the file.
7494         (remote_state) <m_arch_states>: Store remote_arch_state values
7495         instead of remote_arch_state pointers.
7496         (remote_state::get_remote_arch_state): Adjust.
7497
7498 2018-05-22  Pedro Alves  <palves@redhat.com>
7499
7500         * remote.c: Include <unordered_map>.
7501         (remote_state): Now a class.
7502         (remote_state) <get_remote_arch_state>: Declare method.
7503         <get_remote_arch_state>: New field.
7504         (remote_arch_state) <remote_arch_state>: Declare ctor.
7505         <regs>: Now a unique_ptr.
7506         (remote_gdbarch_data_handle): Delete.
7507         (get_remote_arch_state): Delete.
7508         (remote_state::get_remote_arch_state): New.
7509         (get_remote_state): Adjust to call remote_state's
7510         get_remote_arch_state method.
7511         (init_remote_state): Delete, bits factored out to ...
7512         (remote_arch_state::remote_arch_state): ... this new method.
7513         (get_remote_packet_size, get_memory_packet_size)
7514         (process_g_packet, remote_target::fetch_registers)
7515         (remote_target::prepare_to_store, store_registers_using_G)
7516         (remote_target::store_registers, remote_target::get_trace_status):
7517         Adjust to call remote_state's method.
7518         (_initialize_remote): Remove reference to
7519         remote_gdbarch_data_handle.
7520
7521 2018-05-22  Pedro Alves  <palves@redhat.com>
7522
7523         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7524         pread>: New method declarations.
7525         (remote_target::open_1): Adjust.
7526         (readahead_cache_invalidate): Rename to ...
7527         (readahead_cache::invalidate): ... this, and adjust to be a class
7528         method.
7529         (readahead_cache_invalidate_fd): Rename to ...
7530         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7531         class method.
7532         (remote_hostio_pwrite): Adjust.
7533         (remote_hostio_pread_from_cache): Rename to ...
7534         (readahead_cache::pread): ... this, and adjust to be a class
7535         method.
7536         (remote_hostio_close): Adjust.
7537
7538 2018-05-22  Pedro Alves  <palves@redhat.com>
7539
7540         * remote.c (remote_hostio_close_cleanup): Delete.
7541         (class scoped_remote_fd): New.
7542         (remote_file_put, remote_file_get): Use it.
7543
7544 2018-05-22  Pedro Alves  <palves@redhat.com>
7545
7546         (struct vCont_action_support): Use bool and initialize all fields.
7547         (struct readahead_cache): Initialize all fields.
7548         (remote_state): Use bool and initialize all fields.
7549         (remote_state::remote_state, remote_state::~remote_state): New.
7550         (new_remote_state): Delete.
7551         (_initialize_remote): Use new to allocate remote_state.
7552
7553 2018-05-22  Pedro Alves  <palves@redhat.com>
7554             張俊芝  <zjz@zjz.name>
7555
7556         PR gdb/22973
7557         * c-exp.y: Include "c-support.h".
7558         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7559         of tolower.  Use c_ident_is_alpha to scan names.
7560         * c-lang.c: Include "c-support.h".
7561         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7562         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7563         * c-support.h: New file, with bits factored out from ...
7564         * cp-name-parser.y: ... this file.
7565         Include "c-support.h".
7566         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7567         c-support.h and renamed.
7568         (symbol_end, yylex): Adjust.
7569
7570 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7571
7572         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7573         parameter type to CORE_ADDR.
7574         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7575         parameter type in declaration to CORE_ADDR.
7576         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7577         target_auxv_search to get AT_HWCAP and use the result to get the
7578         target description.
7579         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7580         to CORE_ADDR. Remove the cast of the return value to unsigned
7581         long. Fix error predicate of target_auxv_search.
7582         (ppc_linux_nat_target::read_description): Change the type of the
7583         hwcap variable to CORE_ADDR.
7584
7585 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7586
7587         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7588         if the size of fpscr is larger than 32 bits.
7589
7590 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7591
7592         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7593         (ppc32_linux_vsxregmap): New global.
7594         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7595         regcache_supply_regset, and regcache_collect_regset.
7596         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7597         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7598         (fetch_vsx_register, store_vsx_register): Remove.
7599         (fetch_vsx_registers): Add regno parameter. Get regset using
7600         ppc_linux_vsxregset. Use regset to supply registers.
7601         (store_vsx_registers): Add regno parameter. Get regset using
7602         ppc_linux_vsxregset. Use regset to collect registers.
7603         (fetch_register): Call fetch_vsx_registers instead of
7604         fetch_vsx_register.
7605         (store_register): Call store_vsx_registers instead of
7606         store_vsx_register.
7607         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7608         new regno parameter.
7609         (store_ppc_registers): Call store_vsx_registers with -1 for the
7610         new regno parameter.
7611         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7612         (ppc_collect_vsxregset): Remove.
7613
7614 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7615
7616         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7617         offset fields.
7618         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7619         for vector register offset fields.
7620         (ppc64_fbsd_reg_offsets): Likewise.
7621         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7622         to vector register offset fields.
7623         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7624         to vector register offset fields.
7625         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7626         vector register offset fields.
7627         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7628         initializers for vector register offset fields.
7629         (rs6000_aix64_reg_offsets): Likewise.
7630         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7631         (ppc_supply_vrregset): Remove.
7632         (ppc_collect_vrregset): Remove.
7633         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7634         (ppc_linux_vrregset) : New function.
7635         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7636         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7637         (ppc32_linux_vrregset): Remove.
7638         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7639         and use result instead of ppc32_linux_vrregset.
7640         (ppc32_linux_reg_offsets): Remove initializers for vector register
7641         offset fields.
7642         (ppc64_linux_reg_offsets): Likewise.
7643         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7644         * ppc-linux-nat.c: Include regset.h.
7645         (gdb_vrregset_t): Adjust comment to account for little-endian
7646         mode.
7647         (supply_vrregset, fill_vrregset): Remove.
7648         (fetch_altivec_register, store_altivec_register): Remove.
7649         (fetch_altivec_registers): Add regno parameter. Get regset using
7650         ppc_linux_vrregset. Use regset to supply registers.
7651         (store_altivec_registers): Add regno parameter. Get regset using
7652         ppc_linux_vrregset. Use regset to collect registers.
7653         (fetch_register): Call fetch_altivec_registers instead of
7654         fetch_altivec_register.
7655         (store_register): Call store_altivec_registers instead of
7656         store_altivec_register.
7657         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7658         the new regno parameter.
7659         (store_ppc_registers): Call store_altivec_registers with -1 for
7660         the new regno parameter.
7661
7662 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7663
7664         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7665         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7666         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7667         (gdb_vrregset_t): Change array type size to
7668         PPC_LINUX_SIZEOF_VRREGSET.
7669         (gdb_vsxregset_t): Change array type size to
7670         PPC_LINUX_SIZEOF_VSXREGSET.
7671         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7672         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7673         PPC_LINUX_SIZEOF_VSXREGSET.
7674
7675 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7676
7677         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7678         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7679         nat/ppc-linux.c.
7680         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7681         ppc_linux_target_wordsize with tid.
7682         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7683         wordsize with tid.
7684         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7685         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7686         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7687         tid parameter. Remove static specifier.
7688         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7689         (ppc_linux_target_wordsize): New declaration.
7690
7691 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7692
7693         * arch/ppc-linux-common.c: New file.
7694         * arch/ppc-linux-common.h: New file.
7695         * arch/ppc-linux-tdesc.h: New file.
7696         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7697         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7698         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7699         arch/ppc-linux-tdesc.h.
7700         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7701         arch/ppc-linux-tdesc.h.
7702         (ppc_linux_nat_target::read_description): Remove target
7703         description matching code. Fill a ppc_linux_features struct and
7704         call ppc_linux_match_description with it. Move comment about ISA
7705         2.05 to ppc-linux-common.c.
7706         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7707         arch/ppc-linux-tdesc.h.
7708         (ppc_linux_core_read_description): Remove target description
7709         matching code. Fill a ppc_linux_features struct and call
7710         ppc_linux_match_description with it.
7711         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7712         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7713         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7714         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7715         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7716         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7717         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7718         (tdesc_powerpc_e500l): Remove.
7719
7720 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7721
7722         * ada-lang.c (catch_assert_command): Pass empty string instead
7723         of NULL for excep_string argument.
7724
7725 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7726
7727         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7728         the width of the requested register exceeds the width of the
7729         `ptrace' data type.
7730
7731 2018-05-21  Tom Tromey  <tom@tromey.com>
7732
7733         * printcmd.c (output_command): Remove.
7734         (output_command_const): Rename to output_command.
7735         * valprint.h (output_command): Rename from output_command_const.
7736         * tracepoint.c (trace_dump_actions): Call output_command.
7737
7738 2018-05-21  Tom Tromey  <tom@tromey.com>
7739
7740         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7741         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7742         * ada-lang.h (create_ada_exception_catchpoint): Update.
7743         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7744         std::string.
7745         (create_excep_cond_exprs, ~ada_catchpoint)
7746         (should_stop_exception, print_one_exception)
7747         (print_mention_exception, print_recreate_exception): Update.
7748         (ada_get_next_arg): Remove.
7749         (catch_ada_exception_command_split): Use std::string.  Change type
7750         of "excep_string", "cond_string".
7751         (catch_ada_exception_command): Update.
7752         (create_ada_exception_catchpoint): Change type of excep_string.
7753         (ada_exception_sal): Remove excep_string parameter.
7754         (~ada_catchpoint): Remove.
7755
7756 2018-05-21  Tom Tromey  <tom@tromey.com>
7757
7758         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7759         cleanup.
7760
7761 2018-05-21  Tom Tromey  <tom@tromey.com>
7762
7763         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7764         Return unique_xmalloc_ptr.
7765         (print_it_exception): Update.
7766
7767 2018-05-21  Tom Tromey  <tom@tromey.com>
7768
7769         * tracepoint.c (trace_dump_actions): Use std::string.
7770
7771 2018-05-21  Tom Tromey  <tom@tromey.com>
7772
7773         * symfile.c (reread_symbols): Use std::string for original_name.
7774
7775 2018-05-21  Tom Tromey  <tom@tromey.com>
7776
7777         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7778         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7779         constructor.
7780
7781 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7782
7783         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7784         instance to...
7785         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7786         * objfiles.c (get_objfile_bfd_data): Allocate
7787         objfile_per_bfd_storage with obstack_new when allocating on
7788         obstack.
7789
7790 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7791
7792         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7793         OBSTACK_ZALLOC.
7794         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7795         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7796         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7797         (add_pending): Likewise.
7798         (parse_symbol): Likewise.
7799         (parse_partial_symbols): Likewise.
7800         (psymtab_to_symtab_1): Likewise.
7801         (new_psymtab): Likewise.
7802         (elfmdebug_build_psymtabs): Likewise.
7803         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7804         * objfiles.c (get_objfile_bfd_data): Likewise.
7805         (objfile_register_static_link): Likewise.
7806         * psymtab.c (allocate_psymtab): Likewise.
7807         * stabsread.c (read_member_functions): Likewise.
7808         * xcoffread.c (xcoff_end_psymtab): Likewise.
7809
7810 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7811
7812         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7813         compiler supports std::is_trivially_constructible.
7814         * common/poison.h: Include obstack.h.
7815         (IsMallocable): Define to is_trivially_constructible if the
7816         compiler supports it, define to true_type otherwise.
7817         (xobnew): New.
7818         (XOBNEW): Redefine.
7819         (xobnewvec): New.
7820         (XOBNEWVEC): Redefine.
7821         * gdb_obstack.h (obstack_zalloc): New.
7822         (OBSTACK_ZALLOC): Redefine.
7823         (obstack_calloc): New.
7824         (OBSTACK_CALLOC): Redefine.
7825         (obstack_new): New.
7826         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7827         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7828         gdbarch.c.
7829         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7830         obstack_calloc/obstack_zalloc.
7831         (gdbarch_obstack_zalloc): Remove.
7832         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7833
7834 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7835
7836         * stack.c (backtrace_command_1): Remove useless variable int i.
7837
7838 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7839
7840         * stack.c (print_frame_info): Fix comment.
7841
7842 2018-05-18  Tom Tromey  <tom@tromey.com>
7843
7844         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7845         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7846         (~dwarf2_per_objfile): Update
7847         (dwarf2_get_dwz_file): Use new.
7848         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7849         unique_ptr.
7850
7851 2018-05-18  Tom Tromey  <tom@tromey.com>
7852
7853         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7854         unique_ptr.
7855         * dwarf2read.c (struct dwp_file): Add constructor and
7856         initializers.
7857         (open_and_init_dwp_file): Return a unique_ptr.
7858         (dwarf2_per_objfile, create_dwp_hash_table)
7859         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7860         (lookup_dwo_unit_in_dwp): Update.
7861         (open_and_init_dwp_file, get_dwp_file): Update.
7862
7863 2018-05-18  Tom Tromey  <tom@tromey.com>
7864
7865         * dwarf2read.c (dwarf2_per_objfile): Update.
7866         (struct mapped_index): Add initializers.
7867         (dwarf2_read_index): Use new.
7868         (dw2_symtab_iter_init): Update.
7869         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7870         unique_ptr.
7871
7872 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7873
7874         * dwarf2read.c (mapped_index) <total_size>: Remove.
7875
7876 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7877
7878         * unittests/format_pieces-selftests.c (test_format_specifier):
7879         Add ARI comments.
7880
7881 2018-05-18  Tom Tromey  <tom@tromey.com>
7882
7883         * c-typeprint.c (maybe_print_hole): New function.
7884         (c_print_type_struct_field_offset): Update.
7885         (c_type_print_base_struct_union): Call maybe_print_hole.
7886
7887 2018-05-17  Keith Seitz  <keiths@redhat.com>
7888
7889         * breakpoint.c (build_bpstat_chain): New function, moved from
7890         bpstat_stop_status.
7891         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7892         If no stop chain is passed, call build_bpstat_chain to build it.
7893         * breakpoint.h (build_bpstat_chain): Declare.
7894         (bpstat_stop_status): Move documentation here from breakpoint.c.
7895         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7896         build the stop chain and pass it to skip_inline_frames.
7897         Pass this stop chain to bpstat_stop_status.
7898         * inline-frame.c: Include breakpoint.h.
7899         (stopped_by_user_bp_inline_frame): New function.
7900         (skip_inline_frames): Add parameter `stop_chain'.
7901         Move documention to inline-frame.h.
7902         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7903         whether the frame should be elided.
7904         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7905         Add moved documentation and update for new parameter.
7906
7907 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7908
7909         PR cli/14975
7910         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7911         unittests/format_pieces-selftests.c.
7912         * common/format.h (format_piece) <operator==>: New.
7913         (format_pieces) <operator[]>: Remove.
7914         * common/format.c (format_pieces::format_pieces): Handle \e.
7915         * unittests/format_pieces-selftests.c: New.
7916
7917 2018-05-17  Tom Tromey  <tom@tromey.com>
7918
7919         PR symtab/23010:
7920         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7921         (dw2_instantiate_symtab): Add skip_partial parameter.
7922         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7923         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7924         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7925         (dw2_expand_symtabs_matching_one)
7926         (dw2_find_pc_sect_compunit_symtab)
7927         (dw2_debug_names_lookup_symbol)
7928         (dw2_debug_names_expand_symtabs_for_function): Update.
7929         (init_cutu_and_read_dies): Add skip_partial parameter.
7930         (process_psymtab_comp_unit, build_type_psymtabs_1)
7931         (process_skeletonless_type_unit, load_partial_comp_unit)
7932         (psymtab_to_symtab_1): Update.
7933         (load_full_comp_unit): Add skip_partial parameter.
7934         (process_imported_unit_die, dwarf2_read_addr_index)
7935         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7936         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7937         (read_signatured_type): Update.
7938
7939 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7940
7941         * value.c (release_value): Remove unused variable.
7942         (record_latest_value): Likewise.
7943         (access_value_history): Likewise.
7944         (preserve_values): Likewise.
7945
7946 2018-05-17  Tom Tromey  <tom@tromey.com>
7947
7948         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7949         Initialize.
7950
7951 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7952
7953         PR gdb/22286
7954         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7955         Also handle registers whose width is not a multiple of
7956         PTRACE_TYPE_RET.
7957         (linux_nat_trad_target::store_register): Likewise.
7958
7959 2018-05-16  Tom Tromey  <tom@tromey.com>
7960
7961         * gdbcore.h (core_bfd): Redefine.
7962         * corelow.c (core_target::close): Update.
7963         (core_target_open): Update.
7964         * progspace.h (struct program_space) <cbfd>: Now a
7965         gdb_bfd_ref_ptr.
7966
7967 2018-05-16  Tom Tromey  <tom@tromey.com>
7968
7969         PR cli/19551:
7970         * symfile-add-flags.h (enum symfile_add_flags)
7971         <SYMFILE_NOT_FILENAME>: New constant.
7972         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7973         objfile name from BFD.
7974         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7975         * minidebug.c (find_separate_debug_file_in_section): Put
7976         ".gnu_debugdata" into BFD's file name.
7977
7978 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7979
7980         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7981         Remove.
7982
7983 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7984
7985         PR binutils/21446
7986         * aarch64-tdep.c (aarch64_analyze_prologue,
7987         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7988         Indicate not interested in errors.
7989
7990 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7991
7992         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7993         Supply the MIPS_ZERO_REGNUM register.
7994
7995 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7996
7997         * mips-tdep.c (mask_address_var): Make variable static.
7998
7999 2018-05-14  Tom Tromey  <tom@tromey.com>
8000
8001         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8002
8003 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8004
8005         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8006         FXSAVE_ADDR for the mxcsr register.
8007
8008 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8009
8010         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8011
8012 2018-05-11  Pedro Alves  <palves@redhat.com>
8013
8014         * corelow.c (core_target) <core_target>: No longer inline.
8015         Initialize m_core_gdbarch, m_core_vec and build the section table
8016         here.
8017         <~core_target>: New.
8018         <core_gdbarch, get_core_register_section>: New methods.
8019         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8020         factored out from ...
8021         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8022         (core_ops): Delete.
8023         (sniff_core_bfd): Add gdbarch parameter.
8024         (core_close): Delete, merged into ...
8025         (core_target::close): ... here.  Delete self.
8026         (core_close_cleanup): Delete.
8027         (core_target_open): Allocate a core_target on the heap.  Use a
8028         unique_ptr instead of a cleanup.  Bits moved into the core_target
8029         ctor.  Adjust to use core_target methods instead of globals.
8030         (get_core_register_section): Rename to ...
8031         (core_target::get_core_register_section): ... this and adjust.
8032         (struct get_core_registers_cb_data): New.
8033         (get_core_registers_cb): Use it.  Use bool.
8034         (core_target::fetch_registers, core_target::files_info)
8035         (core_target::xfer_partial, core_target::read_description)
8036         (core_target::pid_to, core_target::thread_name): Adjust to
8037         reference class fields instead of globals.
8038         * target.h (struct target_ops_deleter, target_ops_up): New.
8039
8040 2018-05-11  Pedro Alves  <palves@redhat.com>
8041
8042         * corefile.c (core_file_command): Move to corelow.c.
8043         * corelow.c (the_core_target): Delete.
8044         (core_file_command): Moved from corefile.c.  Check exec_bfd
8045         instead of the_core_target.  Use target_detach instead of calling
8046         into the_core_target directly.
8047         (maybe_say_no_core_file_now): New.
8048         (core_target::detach): Use it.
8049         (_initialize_corelow): Remove references to the_core_target.
8050         * gdbcore.h (the_core_target): Delete.
8051
8052 2018-05-11  Tom Tromey  <tromey@redhat.com>
8053             Pedro Alves  <palves@redhat.com>
8054
8055         * corefile.c (core_bfd): Remove.
8056         * gdbcore.h (core_bfd): Now a macro.
8057         * progspace.h (struct program_space) <cbfd>: New field.
8058
8059 2018-05-11  Tom Tromey  <tom@tromey.com>
8060
8061         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8062         gdb::def_vector.
8063
8064 2018-05-10  Tom Tromey  <tom@tromey.com>
8065
8066         * configure: Rebuild.
8067         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8068
8069 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8070
8071         PR server/23158:
8072         * regformats/regdat.sh: Adjust script, following the addition
8073         of the new expedite_regs parameter to init_target_desc.
8074
8075 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8076     
8077         PR gdb/23127
8078         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8079         set_gdbarch_significant_addr_bit.
8080         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8081         set_gdbarch_significant_addr_bit.
8082         * utils.c (address_significant): Update to sign extend addr.
8083
8084 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8085
8086         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8087         (xtensa_linux_init_abi): Limit tdep->num_regs by
8088         tdep->num_nopriv_regs.
8089         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8090         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8091         not initialized.
8092
8093 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8094
8095         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8096
8097 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8098
8099         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8100         (I387_MXCSR_INIT_VAL): New constant.
8101         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8102         buffer if it was supplied by the inferior.
8103         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8104         (i387_xsave_get_clear_bv): New function.
8105         (i387_supply_xsave): Only read x87 control registers from the
8106         xsave buffer if the feature is enabled, and the state will have
8107         been written, otherwise, provide a suitable default.
8108         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8109         including x87 control registers.  Update control registers if they
8110         have changed from the default value, and mark features as enabled
8111         as required.
8112         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8113
8114 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8115
8116         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8117
8118 2018-05-07  Tom Tromey  <tom@tromey.com>
8119
8120         * configure: Rebuild.
8121         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8122
8123 2018-05-07  Tom Tromey  <tom@tromey.com>
8124
8125         PR tdep/20362:
8126         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8127         bit.  Use correct value for VDIV.
8128
8129 2018-05-04  Tom Tromey  <tom@tromey.com>
8130
8131         * configure: Rebuild.
8132         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8133
8134 2018-05-04  Tom Tromey  <tom@tromey.com>
8135
8136         * linux-record.c (record_linux_system_call) <case
8137         RECORD_SYS_RECVFROM>: Add "break".
8138
8139 2018-05-04  Tom Tromey  <tom@tromey.com>
8140
8141         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8142         Add missing "break".
8143         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8144         Add missing "break".
8145
8146 2018-05-04  Tom Tromey  <tom@tromey.com>
8147
8148         * rs6000-tdep.c (ppc_process_record_op4)
8149         (ppc_process_record_op63): Add fall-through comment.
8150
8151 2018-05-04  Tom Tromey  <tom@tromey.com>
8152
8153         * i386-tdep.c (i386_process_record): Add fall-through comment.
8154
8155 2018-05-04  Tom Tromey  <tom@tromey.com>
8156
8157         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8158         comment.
8159
8160 2018-05-04  Tom Tromey  <tom@tromey.com>
8161
8162         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8163         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8164         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8165         comment.
8166         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8167         comment.
8168         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8169         comment.
8170
8171 2018-05-04  Tom Tromey  <tom@tromey.com>
8172
8173         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8174
8175 2018-05-04  Tom Tromey  <tom@tromey.com>
8176
8177         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8178         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8179         * symfile.c (section_is_mapped): Fix fall-through comment.
8180         * stabsread.c (define_symbol, read_member_functions): Fix
8181         fall-through comment.
8182         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8183         comment.
8184         * remote.c (remote_wait_as): Fix fall-through comment.
8185         * p-exp.y (yylex): Fix fall-through comment.
8186         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8187         comment.
8188         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8189         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8190         * jv-exp.y (yylex): Fix fall-through comment.
8191         * go-exp.y (lex_one_token): Fix fall-through comment.
8192         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8193         fall-through comment.
8194         * f-exp.y (yylex): Fix fall-through comment.
8195         * dwarf2read.c (process_die): Fix fall-through comments.
8196         * dbxread.c (process_one_symbol): Fix fall-through comment.
8197         * d-exp.y (lex_one_token): Fix fall-through comment.
8198         * cp-name-parser.y (yylex): Fix fall-through comment.
8199         * coffread.c (coff_symtab_read): Fix fall-through comment.
8200         * c-exp.y (lex_one_token): Fix fall-through comment.
8201         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8202         comment.
8203         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8204         comment.
8205
8206 2018-05-04  Tom Tromey  <tom@tromey.com>
8207
8208         PR python/22730:
8209         * NEWS: Mention gdb.execute change.
8210         * gdbcmd.h (execute_control_command): Don't declare.
8211         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8212         execute_control_commands, execute_control_commands_to_string.
8213         * cli/cli-script.h (execute_control_commands)
8214         (execute_control_commands_to_string): Declare.
8215         (execute_control_command): Add from_tty parameter.
8216         * cli/cli-script.c (execute_control_commands)
8217         (execute_control_commands_to_string): New functions.
8218         (execute_user_command): Use execute_control_commands.
8219         (execute_control_command_1): Add "from_tty" parameter.  Update.
8220         (execute_control_command): Likewise.
8221
8222 2018-05-04  Tom Tromey  <tom@tromey.com>
8223
8224         PR python/22731:
8225         * NEWS: Mention that breakpoint commands are writable.
8226         * python/py-breakpoint.c (bppy_set_commands): New function.
8227         (breakpoint_object_getset) <"commands">: Use it.
8228
8229 2018-05-04  Tom Tromey  <tom@tromey.com>
8230
8231         * tracepoint.c (actions_command): Update.
8232         * mi/mi-cmd-break.c (mi_command_line_array)
8233         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8234         (mi_read_next_line): Remove.
8235         (mi_cmd_break_commands): Update.
8236         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8237         function_view.
8238         * cli/cli-script.c (get_command_line): Update.
8239         (process_next_line): Use function_view.  Constify.
8240         (recurse_read_control_structure, read_command_lines)
8241         (read_command_lines_1): Change argument types to function_view.
8242         (do_define_command, document_command): Update.
8243         * breakpoint.h (check_tracepoint_command): Don't declare.
8244         * breakpoint.c (check_tracepoint_command): Remove.
8245         (commands_command_1, create_tracepoint_from_upload): Update.
8246
8247 2018-05-04  Tom Tromey  <tom@tromey.com>
8248
8249         PR gdb/11750:
8250         * cli/cli-script.h (enum command_control_type) <define_control>:
8251         New constant.
8252         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8253         (build_command_line, execute_control_command_1)
8254         (process_next_line): Likewise.
8255         (do_define_command): New function, extracted from define_command.
8256         (define_command): Use it.
8257
8258 2018-05-04  Tom Tromey  <tom@tromey.com>
8259
8260         * tracepoint.c (actions_command): Update.
8261         * cli/cli-script.h (read_command_lines): Update.
8262         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8263         (MAX_TMPBUF): Remove define.
8264         (define_command): Use string_printf.
8265         (document_command): Likewise.
8266         * breakpoint.c (commands_command_1): Update.
8267
8268 2018-05-04  Tom Tromey  <tom@tromey.com>
8269
8270         * top.c (execute_command): Update.
8271         * cli/cli-script.h (print_command_lines): Now varargs.
8272         * cli/cli-script.c (print_command_lines): Now varargs.
8273         (execute_control_command_1) <case while_control, case if_control>:
8274         Update.
8275
8276 2018-05-04  Tom Tromey  <tom@tromey.com>
8277
8278         * tracepoint.c (all_tracepoint_actions): Rename from
8279         all_tracepoint_actions_and_cleanup.  Change return type.
8280         (actions_command, encode_actions_1, encode_actions)
8281         (trace_dump_actions, tdump_command): Update.
8282         * remote.c (remote_download_command_source): Update.
8283         * python/python.c (gdbpy_eval_from_control_command)
8284         (python_command, python_interactive_command): Update.
8285         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8286         * guile/guile.c (guile_command)
8287         (gdbscm_eval_from_control_command, guile_command): Update.
8288         * compile/compile.c (compile_code_command)
8289         (compile_print_command, compile_to_object): Update.
8290         * cli/cli-script.h (struct command_lines_deleter): New.
8291         (counted_command_line): New typedef.
8292         (struct command_line): Add constructor, destructor.
8293         <body_list>: Remove.
8294         <body_list_0, body_list_1>: New members.
8295         (command_line_up): Remove typedef.
8296         (read_command_lines, read_command_lines_1, get_command_line):
8297         Update.
8298         (copy_command_lines): Don't declare.
8299         * cli/cli-script.c (build_command_line): Use "new".
8300         (get_command_line): Return counted_command_line.
8301         (print_command_lines, execute_user_command)
8302         (execute_control_command_1, while_command, if_command): Update.
8303         (realloc_body_list): Remove.
8304         (process_next_line, recurse_read_control_structure): Update.
8305         (read_command_lines, read_command_lines_1): Return counted_command_line.
8306         (free_command_lines): Use "delete".
8307         (copy_command_lines): Remove.
8308         (define_command, document_command, show_user_1): Update.
8309         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8310         a counted_command_line.
8311         * breakpoint.h (counted_command_line): Remove typedef.
8312         (breakpoint_set_commands): Update.
8313         * breakpoint.c (check_no_tracepoint_commands)
8314         (validate_commands_for_breakpoint): Update.
8315         (breakpoint_set_commands): Change commands to be a
8316         counted_command_line.
8317         (commands_command_1, update_dprintf_command_list)
8318         (create_tracepoint_from_upload): Update.
8319
8320 2018-05-04  Tom Tromey  <tom@tromey.com>
8321
8322         * cli/cli-decode.h (cmd_list_element): New constructor.
8323         (~cmd_list_element): New destructor.
8324         (struct cmd_list_element): Add initializers.
8325         * cli/cli-decode.c (do_add_cmd): Use "new".
8326         (delete_cmd): Use "delete".
8327
8328 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8329             Pedro Alves <palves@redhat.com>
8330
8331         PR breakpoints/19806 and support for PR external/20207.
8332         * NEWS: Mention Aarch64 watchpoint improvements.
8333         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8334         watchpoints and PR external/20207 watchpoints.
8335         * nat/aarch64-linux-hw-point.c
8336         (kernel_supports_any_contiguous_range): New.
8337         (aarch64_watchpoint_offset): New.
8338         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8339         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8340         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8341         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8342         next_addr_orig_p.  Support PR external/20207 watchpoints.
8343         (aarch64_downgrade_regs): New.
8344         (aarch64_dr_state_insert_one_point): New parameters offset and
8345         addr_orig.
8346         (aarch64_dr_state_remove_one_point): Likewise.
8347         (aarch64_handle_breakpoint): Update caller.
8348         (aarch64_handle_aligned_watchpoint): Likewise.
8349         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8350         aligned_offset.
8351         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8352         aarch64_downgrade_regs.
8353         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8354         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8355         (DR_CONTROL_MASK): ... this.
8356         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8357         (unsigned int aarch64_watchpoint_offset): New prototype.
8358         (aarch64_linux_set_debug_regs): Remove const from state.
8359         * utils.c (align_up, align_down): Move to ...
8360         * common/common-utils.c (align_up, align_down): ... here.
8361         * utils.h (align_up, align_down): Move to ...
8362         * common/common-utils.h (align_up, align_down): ... here.
8363
8364 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8365
8366         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8367         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8368         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8369         Re-implement to match the ABI as summarized in GCC's
8370         gcc/config/sparc/sparc.c.  All callers updated.
8371         (sparc32_store_arguments): Remove assertion.
8372
8373 2018-05-04  Tom Tromey  <tom@tromey.com>
8374
8375         * printcmd.c: Don't include tui.h.
8376         (decode_format): Use skip_spaces.
8377
8378 2018-05-04  Tom Tromey  <tom@tromey.com>
8379
8380         PR gdb/22619:
8381         * printcmd.c (last_count): New global.
8382         (x_command): Use saved count when repeating.
8383
8384 2018-05-04  Tom Tromey  <tom@tromey.com>
8385
8386         * nto-procfs.c (do_closedir_cleanup): Remove.
8387         (procfs_pidlist): Use gdb_dir_up.
8388         * procfs.c (do_closedir_cleanup): Remove.
8389         (proc_update_threads): Use gdb_dir_up.
8390         * common/filestuff.h (struct gdb_dir_deleter): New.
8391         (gdb_dir_up): New typedef.
8392
8393 2018-05-04  Tom Tromey  <tom@tromey.com>
8394
8395         * ada-lang.c (print_mention_exception): Use std::string.
8396
8397 2018-05-04  Tom Tromey  <tom@tromey.com>
8398
8399         * ada-lang.c (create_excep_cond_exprs): Update.
8400         (ada_exception_catchpoint_cond_string): Use std::string.
8401
8402 2018-05-04  Tom Tromey  <tom@tromey.com>
8403
8404         * ada-lang.c (xget_renaming_scope): Return std::string.
8405         (old_renaming_is_invisible): Update.
8406
8407 2018-05-04  Tom Tromey  <tom@tromey.com>
8408
8409         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8410         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8411
8412 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8413
8414         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8415
8416 2018-05-04  Tom Tromey  <tom@tromey.com>
8417
8418         * remote.c (remote_query_supported_append): Change type.
8419         (remote_check_symbols): Update.
8420
8421 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8422
8423         PR gdb/11420
8424         * configure.ac: Prepend libpython.
8425         * python/python-config.py: Likewise.
8426         * configure: Regenerate.
8427
8428 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8429
8430         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8431
8432 2018-05-03  Pedro Alves  <palves@redhat.com>
8433
8434         * s390-linux-nat.c
8435         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8436         override.  Write 'true' instead of '1'.
8437         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8438         declaration.
8439
8440 2018-05-02  Pedro Alves  <palves@redhat.com>
8441
8442         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8443         add_inf_child_target.
8444         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8445         add_inf_child_target.
8446         * aix-thread.c (aix_thread_target_info): New.
8447         (aix_thread_target) <shortname, longname, doc>: Delete.
8448         <info>: New.
8449         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8450         add_inf_child_target.
8451         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8452         add_inf_child_target.
8453         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8454         add_inf_child_target.
8455         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8456         add_inf_child_target.
8457         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8458         add_inf_child_target.
8459         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8460         add_inf_child_target.
8461         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8462         add_inf_child_target.
8463         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8464         add_inf_child_target.
8465         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8466         add_inf_child_target.
8467         * bfd-target.c (target_bfd_target_info): New.
8468         (target_bfd) <shortname, longname, doc>: Delete.
8469         <info>: New.
8470         * bsd-kvm.c (bsd_kvm_target_info): New.
8471         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8472         <info>: New.
8473         (bsd_kvm_target::open): Rename to ...
8474         (bsd_kvm_target_open): ... this.  Adjust.
8475         * bsd-uthread.c (bsd_uthread_target_info): New.
8476         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8477         <info>: New.
8478         * corefile.c (core_file_command): Adjust.
8479         * corelow.c (core_target_info): New.
8480         (core_target) <shortname, longname, doc>: Delete.
8481         <info>: New.
8482         (core_target::open): Rename to ...
8483         (core_target_open): ... this.  Adjust.
8484         * ctf.c (ctf_target_info): New.
8485         (ctf_target) <shortname, longname, doc>: Delete.
8486         <info>: New.
8487         (ctf_target::open): Rename to ...
8488         (ctf_target_open): ... this.
8489         (_initialize_ctf): Adjust.
8490         * exec.c (exec_target_info): New.
8491         (exec_target) <shortname, longname, doc>: Delete.
8492         <info>: New.
8493         (exec_target::open): Rename to ...
8494         (exec_target_open): ... this.
8495         * gdbcore.h (core_target_open): Declare.
8496         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8497         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8498         add_inf_child_target.
8499         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8500         add_inf_child_target.
8501         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8502         add_inf_child_target.
8503         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8504         add_inf_child_target.
8505         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8506         add_inf_child_target.
8507         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8508         add_inf_child_target.
8509         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8510         add_inf_child_target.
8511         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8512         add_inf_child_target.
8513         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8514         add_inf_child_target.
8515         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8516         add_inf_child_target.
8517         * inf-child.c (inf_child_target_info): New.
8518         (inf_child_target::info): New.
8519         (inf_child_open_target): Remove 'target' parameter.  Use
8520         get_native_target instead.
8521         (inf_child_target::open): Delete.
8522         (add_inf_child_target): New.
8523         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8524         Delete.
8525         <info>: New.
8526         (add_inf_child_target): Declare.
8527         (inf_child_open_target): Declare.
8528         * linux-thread-db.c (thread_db_target_info): New.
8529         (thread_db_target) <shortname, longname, doc>: Delete.
8530         <info>: New.
8531         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8532         add_inf_child_target.
8533         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8534         add_inf_child_target.
8535         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8536         add_inf_child_target.
8537         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8538         add_inf_child_target.
8539         * make-target-delegates (print_class): Adjust.
8540         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8541         add_inf_child_target.
8542         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8543         add_inf_child_target.
8544         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8545         add_inf_child_target.
8546         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8547         add_inf_child_target.
8548         * nto-procfs.c (nto_native_target_info): New.
8549         (nto_procfs_target_native) <shortname, longname, doc>:
8550         Delete.
8551         <info>: New.
8552         (nto_procfs_target_info): New.
8553         (nto_procfs_target_procfs) <shortname, longname, doc>:
8554         Delete.
8555         <info>: New.
8556         (init_procfs_targets): Adjust.
8557         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8558         add_inf_child_target.
8559         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8560         add_inf_child_target.
8561         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8562         add_inf_child_target.
8563         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8564         add_inf_child_target.
8565         * ravenscar-thread.c (ravenscar_target_info): New.
8566         (ravenscar_thread_target) <shortname, longname, doc>:
8567         Delete.
8568         <info>: New.
8569         * record-btrace.c (record_btrace_target_info):
8570         (record_btrace_target) <shortname, longname, doc>: Delete.
8571         <info>: New.
8572         (record_btrace_target::open): Rename to ...
8573         (record_btrace_target_open): ... this.  Adjust.
8574         * record-full.c (record_longname, record_doc): New.
8575         (record_full_base_target) <shortname, longname, doc>: Delete.
8576         <info>: New.
8577         (record_full_target_info): New.
8578         (record_full_target): <shortname>: Delete.
8579         <info>: New.
8580         (record_full_core_open_1, record_full_open_1): Update comments.
8581         (record_full_base_target::open): Rename to ...
8582         (record_full_open): ... this.
8583         (cmd_record_full_restore): Update.
8584         (_initialize_record_full): Update.
8585         * remote-sim.c (remote_sim_target_info): New.
8586         (gdbsim_target) <shortname, longname, doc>: Delete.
8587         <info>: New.
8588         (gdbsim_target::open): Rename to ...
8589         (gdbsim_target_open): ... this.
8590         (_initialize_remote_sim): Adjust.
8591         * remote.c (remote_doc): New.
8592         (remote_target_info): New.
8593         (remote_target) <shortname, longname, doc>: Delete.
8594         <info>: New.
8595         (extended_remote_target_info): New.
8596         (extended_remote_target) <shortname, longname, doc>: Delete.
8597         <info>: New.
8598         (remote_target::open_1): Make static.  Adjust.
8599         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8600         * s390-linux-nat.c (_initialize_s390_nat): Use
8601         add_inf_child_target.
8602         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8603         add_inf_child_target.
8604         * sol-thread.c (thread_db_target_info): New.
8605         (sol_thread_target) <shortname, longname, doc>: Delete.
8606         <info>: New.
8607         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8608         add_inf_child_target.
8609         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8610         add_inf_child_target.
8611         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8612         add_inf_child_target.
8613         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8614         add_inf_child_target.
8615         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8616         add_inf_child_target.
8617         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8618         add_inf_child_target.
8619         * spu-linux-nat.c (_initialize_spu_nat): Use
8620         add_inf_child_target.
8621         * spu-multiarch.c (spu_multiarch_target_info): New.
8622         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8623         <info>: New.
8624         * target-delegates.c: Regenerate.
8625         * target.c: Include <unordered_map>.
8626         (target_ops_p): Delete.
8627         (DEF_VEC_P(target_ops_p)): Delete.
8628         (target_factories): New.
8629         (test_target_info): New.
8630         (test_target_ops::info): New.
8631         (open_target): Adjust to use target_factories.
8632         (add_target_with_completer): Rename to ...
8633         (add_target): ... this.  Change prototype.  Register target_info
8634         and open callback in target_factories.  Register target_info in
8635         command context instead of target_ops.
8636         (add_target): Delete old implementation.
8637         (add_deprecated_target_alias): Change prototype.  Adjust.
8638         (the_native_target): New.
8639         (set_native_target, get_native_target): New.
8640         (find_default_run_target): Use the_native_target.
8641         (find_attach_target, find_run_target): Simplify.
8642         (target_ops::open): Delete.
8643         (dummy_target_info): New.
8644         (dummy_target::shortname, dummy_target::longname)
8645         (dummy_target::doc): Delete.
8646         (dummy_target::info): New.
8647         (debug_target::shortname, debug_target::longname)
8648         (debug_target::doc): Delete.
8649         (debug_target::info): New.
8650         * target.h (struct target_info): New.
8651         (target_ops::~target_ops): Add comment.
8652         (target_ops::info): New.
8653         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8654         longer virtual.  Implement in terms of target_info.
8655         (set_native_target, get_native_target): Declare.
8656         (target_open_ftype): New.
8657         (add_target, add_target_with_completer)
8658         (add_deprecated_target_alias): Change prototype.
8659         (test_target) <shortname, longname, doc>: Delete.
8660         <info>: New.
8661         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8662         add_inf_child_target.
8663         * tracefile-tfile.c (tfile_target_info): New.
8664         (tfile_target) <shortname, longname, doc>: Delete.
8665         <info>: New.
8666         (tfile_target::open): Rename to ...
8667         (tfile_target_open): ... this.
8668         (_initialize_tracefile_tfile): Adjust.
8669         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8670         add_inf_child_target.
8671         * windows-nat.c (_initialize_windows_nat): Use
8672         add_inf_child_target.
8673         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8674         add_inf_child_target.
8675
8676 2018-05-02  Pedro Alves  <palves@redhat.com>
8677
8678         * linux-nat.h (linux_nat_target) <low_new_thread,
8679         low_delete_thread, low_new_fork, low_forget_process,
8680         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8681         New virtual methods.
8682         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8683         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8684         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8685         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8686         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8687         Delete.
8688         * linux-fork.c (delete_fork): Adjust to call low method.
8689         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8690         (linux_nat_new_fork, linux_nat_forget_process_hook)
8691         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8692         (linux_nat_status_is_event):
8693         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8694         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8695         to call low method.
8696         (sigtrap_is_event): Rename to ...
8697         (linux_nat_target::low_status_is_event): ... this.
8698         (linux_nat_set_status_is_event): Delete.
8699         (save_stop_reason, linux_nat_wait_1)
8700         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8701         low methods.
8702         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8703         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8704         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8705         (linux_nat_set_prepare_to_resume): Delete.
8706         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8707         low virtual methods.
8708         * amd64-linux-nat.c: Likewise.
8709         * arm-linux-nat.c: Likewise.
8710         * i386-linux-nat.c: Likewise.
8711         * ia64-linux-nat.c: Likewise.
8712         * mips-linux-nat.c: Likewise.
8713         * ppc-linux-nat.c: Likewise.
8714         * s390-linux-nat.c: Likewise.
8715         * sparc64-linux-nat.c: Likewise.
8716         * x86-linux-nat.c: Likewise.
8717         * x86-linux-nat.h: Include "nat/x86-linux.h".
8718         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8719         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8720         Override methods.
8721
8722 2018-05-02  Pedro Alves  <palves@redhat.com>
8723
8724         * target.h (target_ops)
8725         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8726         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8727         stopped_by_watchpoint, have_continuable_watchpoint,
8728         stopped_data_address, watchpoint_addr_within_range,
8729         can_accel_watchpoint_condition, can_run, thread_alive,
8730         has_all_memory, has_memory, has_stack, has_registers,
8731         has_execution, can_async_p, is_async_p, supports_non_stop,
8732         always_non_stop_p, can_execute_reverse, supports_multi_process,
8733         supports_enable_disable_tracepoint,
8734         supports_disable_randomization, supports_string_tracing,
8735         supports_evaluation_of_breakpoint_conditions,
8736         can_run_breakpoint_commands, filesystem_is_local,
8737         can_download_tracepoint, get_trace_state_variable_value,
8738         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8739         record_is_replaying, record_will_replay,
8740         augmented_libraries_svr4_read>: Adjust to return bool.
8741         * aarch64-linux-nat.c: All implementations adjusted.
8742         * aix-thread.c: All implementations adjusted.
8743         * arm-linux-nat.c: All implementations adjusted.
8744         * breakpoint.c: All implementations adjusted.
8745         * bsd-kvm.c: All implementations adjusted.
8746         * bsd-uthread.c: All implementations adjusted.
8747         * corelow.c: All implementations adjusted.
8748         * ctf.c: All implementations adjusted.
8749         * darwin-nat.c: All implementations adjusted.
8750         * darwin-nat.h: All implementations adjusted.
8751         * exec.c: All implementations adjusted.
8752         * fbsd-nat.c: All implementations adjusted.
8753         * fbsd-nat.h: All implementations adjusted.
8754         * gnu-nat.c: All implementations adjusted.
8755         * gnu-nat.h: All implementations adjusted.
8756         * go32-nat.c: All implementations adjusted.
8757         * ia64-linux-nat.c: All implementations adjusted.
8758         * inf-child.c: All implementations adjusted.
8759         * inf-child.h: All implementations adjusted.
8760         * inf-ptrace.c: All implementations adjusted.
8761         * inf-ptrace.h: All implementations adjusted.
8762         * linux-nat.c: All implementations adjusted.
8763         * linux-nat.h: All implementations adjusted.
8764         * mips-linux-nat.c: All implementations adjusted.
8765         * nto-procfs.c: All implementations adjusted.
8766         * ppc-linux-nat.c: All implementations adjusted.
8767         * procfs.c: All implementations adjusted.
8768         * ravenscar-thread.c: All implementations adjusted.
8769         * record-btrace.c: All implementations adjusted.
8770         * record-full.c: All implementations adjusted.
8771         * remote-sim.c: All implementations adjusted.
8772         * remote.c: All implementations adjusted.
8773         * s390-linux-nat.c: All implementations adjusted.
8774         * sol-thread.c: All implementations adjusted.
8775         * spu-multiarch.c: All implementations adjusted.
8776         * target-delegates.c: All implementations adjusted.
8777         * target.c: All implementations adjusted.
8778         * target.h: All implementations adjusted.
8779         * tracefile-tfile.c: All implementations adjusted.
8780         * tracefile.c: All implementations adjusted.
8781         * tracefile.h: All implementations adjusted.
8782         * windows-nat.c: All implementations adjusted.
8783         * x86-linux-nat.h: All implementations adjusted.
8784         * x86-nat.h: All implementations adjusted.
8785
8786 2018-05-02  Pedro Alves  <palves@redhat.com>
8787
8788         * make-target-delegates (scan_target_h): Don't trim lines here.
8789         Replace sequences of tabs and/or whitespace with a single
8790         whitespace.
8791         (top level, parsing methods): Trim each line before processing it
8792         here.
8793
8794 2018-05-02  Pedro Alves  <palves@redhat.com>
8795             John Baldwin  <jhb@freebsd.org>
8796
8797         * target.h (enum strata) <debug_stratum>: New.
8798         (struct target_ops) <all delegation methods>: Replace by C++
8799         virtual methods, and drop "to_" prefix.  All references updated
8800         throughout.
8801         <to_shortname, to_longname, to_doc, to_data,
8802         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8803         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8804         virtual methods.  All references updated throughout.
8805         <can_attach, supports_terminal_ours, can_create_inferior,
8806         get_thread_control_capabilities, attach_no_wait>: New
8807         virtual methods.
8808         <insert_breakpoint, remove_breakpoint>: Now
8809         TARGET_DEFAULT_NORETURN methods.
8810         <info_proc>: Now returns bool.
8811         <to_magic>: Delete.
8812         (OPS_MAGIC): Delete.
8813         (current_target): Delete.  All references replaced by references
8814         to ...
8815         (target_stack): ... this.  New.
8816         (target_shortname, target_longname): Adjust.
8817         (target_can_run): Now a function declaration.
8818         (default_child_has_all_memory, default_child_has_memory)
8819         (default_child_has_stack, default_child_has_registers)
8820         (default_child_has_execution): Remove target_ops parameter.
8821         (complete_target_initialization): Delete.
8822         (memory_breakpoint_target): New template class.
8823         (test_target_ops): Refactor as a C++ class with virtual methods.
8824         * make-target-delegates (NAME_PART): Tighten.
8825         (POINTER_PART, CP_SYMBOL): New.
8826         (SIMPLE_RETURN_PART): Reimplement.
8827         (VEC_RETURN_PART): Expect less.
8828         (RETURN_PART, VIRTUAL_PART): New.
8829         (METHOD): Adjust to C++ virtual methods.
8830         (scan_target_h): Remove reference to C99.
8831         (dname): Output "target_ops::" prefix.
8832         (write_function_header): Adjust to output a C++ class method.
8833         (write_declaration): New.
8834         (write_delegator): Adjust to output a C++ class method.
8835         (tdname): Output "dummy_target::" prefix.
8836         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8837         method.
8838         (tdefault_names, debug_names): Delete.
8839         (return_types, tdefaults, styles, argtypes_array): New.
8840         (top level): All methods are delegators.
8841         (print_class): New.
8842         (top level): Print dummy_target and debug_target classes.
8843         * target-delegates.c: Regenerate.
8844         * target-debug.h (target_debug_print_enum_info_proc_what)
8845         (target_debug_print_thread_control_capabilities)
8846         (target_debug_print_thread_info_p): New.
8847         * target.c (dummy_target): Delete.
8848         (the_dummy_target, the_debug_target): New.
8849         (target_stack): Now extern.
8850         (set_targetdebug): Push/unpush debug target.
8851         (default_child_has_all_memory, default_child_has_memory)
8852         (default_child_has_stack, default_child_has_registers)
8853         (default_child_has_execution): Remove target_ops parameter.
8854         (complete_target_initialization): Delete.
8855         (add_target_with_completer): No longer call
8856         complete_target_initialization.
8857         (target_supports_terminal_ours): Use regular delegation.
8858         (update_current_target): Delete.
8859         (push_target): No longer check magic number.  Don't call
8860         update_current_target.
8861         (unpush_target): Don't call update_current_target.
8862         (target_is_pushed): No longer check magic number.
8863         (target_require_runnable): Skip for all stratums over
8864         process_stratum.
8865         (target_ops::info_proc): New.
8866         (target_info_proc): Use find_target_at and
8867         find_default_run_target.
8868         (target_supports_disable_randomization): Use regular delegation.
8869         (target_get_osdata): Use find_target_at.
8870         (target_ops::open, target_ops::close, target_ops::can_attach)
8871         (target_ops::attach, target_ops::can_create_inferior)
8872         (target_ops::create_inferior, target_ops::can_run)
8873         (target_can_run): New.
8874         (default_fileio_target): Use regular delegation.
8875         (target_ops::fileio_open, target_ops::fileio_pwrite)
8876         (target_ops::fileio_pread, target_ops::fileio_fstat)
8877         (target_ops::fileio_close, target_ops::fileio_unlink)
8878         (target_ops::fileio_readlink): New.
8879         (target_fileio_open_1, target_fileio_unlink)
8880         (target_fileio_readlink): Always call the target method.  Handle
8881         FILEIO_ENOSYS.
8882         (return_zero, return_zero_has_execution): Delete.
8883         (init_dummy_target): Delete.
8884         (dummy_target::dummy_target, dummy_target::shortname)
8885         (dummy_target::longname, dummy_target::doc)
8886         (debug_target::debug_target, debug_target::shortname)
8887         (debug_target::longname, debug_target::doc): New.
8888         (target_supports_delete_record): Use regular delegation.
8889         (setup_target_debug): Delete.
8890         (maintenance_print_target_stack): Skip debug_stratum.
8891         (initialize_targets): Instantiate the_dummy_target and
8892         the_debug_target.
8893         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8894         use target_stack.
8895         (target_auxv_search, fprint_target_auxv): Adjust.
8896         (info_auxv_command): Adjust to use target_stack.
8897         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8898         * exceptions.c (print_flush): Handle a NULL target_stack.
8899         * regcache.c (target_ops_no_register): Refactor as class with
8900         virtual methods.
8901
8902         * exec.c (exec_target): New class.
8903         (exec_ops): Now an exec_target.
8904         (exec_open, exec_close_1, exec_get_section_table)
8905         (exec_xfer_partial, exec_files_info, exec_has_memory)
8906         (exec_make_note_section): Refactor as exec_target methods.
8907         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8908         Delete.
8909         (exec_target::find_memory_regions): New.
8910         (_initialize_exec): Don't call init_exec_ops.
8911         * gdbcore.h (exec_file_clear): Delete.
8912
8913         * corefile.c (core_target): Delete.
8914         (core_file_command): Adjust.
8915         * corelow.c (core_target): New class.
8916         (the_core_target): New.
8917         (core_close): Remove target_ops parameter.
8918         (core_close_cleanup): Adjust.
8919         (core_target::close): New.
8920         (core_open, core_detach, get_core_registers, core_files_info)
8921         (core_xfer_partial, core_thread_alive, core_read_description)
8922         (core_pid_to_str, core_thread_name, core_has_memory)
8923         (core_has_stack, core_has_registers, core_info_proc): Rework as
8924         core_target methods.
8925         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8926         (_initialize_corelow): Initialize the_core_target.
8927         * gdbcore.h (core_target): Delete.
8928         (the_core_target): New.
8929
8930         * ctf.c: (ctf_target): New class.
8931         (ctf_ops): Now a ctf_target.
8932         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8933         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8934         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8935         methods.
8936         (init_ctf_ops): Delete.
8937         (_initialize_ctf): Don't call it.
8938         * tracefile-tfile.c (tfile_target): New class.
8939         (tfile_ops): Now a tfile_target.
8940         (tfile_open, tfile_close, tfile_files_info)
8941         (tfile_get_tracepoint_status, tfile_trace_find)
8942         (tfile_fetch_registers, tfile_xfer_partial)
8943         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8944         Refactor as tfile_target methods.
8945         (tfile_xfer_partial_features): Remove target_ops parameter.
8946         (init_tfile_ops): Delete.
8947         (_initialize_tracefile_tfile): Don't call it.
8948         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8949         (tracefile_has_stack, tracefile_has_registers)
8950         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8951         tracefile_target methods.
8952         (init_tracefile_ops): Delete.
8953         (tracefile_target::tracefile_target): New.
8954         * tracefile.h: Include "target.h".
8955         (tracefile_target): New class.
8956         (init_tracefile_ops): Delete.
8957
8958         * spu-multiarch.c (spu_multiarch_target): New class.
8959         (spu_ops): Now a spu_multiarch_target.
8960         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8961         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8962         (spu_search_memory, spu_mourn_inferior): Refactor as
8963         spu_multiarch_target methods.
8964         (init_spu_ops): Delete.
8965         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8966         complete_target_initialization.
8967
8968         * ravenscar-thread.c (ravenscar_thread_target): New class.
8969         (ravenscar_ops): Now a ravenscar_thread_target.
8970         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8971         (ravenscar_thread_alive, ravenscar_pid_to_str)
8972         (ravenscar_fetch_registers, ravenscar_store_registers)
8973         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8974         (ravenscar_stopped_by_hw_breakpoint)
8975         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8976         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8977         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8978         methods.
8979         (init_ravenscar_thread_ops): Delete.
8980         (_initialize_ravenscar): Remove references to
8981         init_ravenscar_thread_ops and complete_target_initialization.
8982
8983         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8984         (bsd_uthread_target): New class.
8985         (bsd_uthread_ops): Now a bsd_uthread_target.
8986         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8987         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8988         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8989         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8990         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8991         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8992         (bsd_uthread_target): Delete function.
8993         (_initialize_bsd_uthread): Remove reference to
8994         complete_target_initialization.
8995
8996         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8997         (target_bfd): ... this new class.
8998         (target_bfd_xfer_partial, target_bfd_get_section_table)
8999         (target_bfd_close): Refactor as target_bfd methods.
9000         (target_bfd::~target_bfd): New.
9001         (target_bfd_reopen): Adjust.
9002         (target_bfd::close): New.
9003
9004         * record-btrace.c (record_btrace_target): New class.
9005         (record_btrace_ops): Now a record_btrace_target.
9006         (record_btrace_open, record_btrace_stop_recording)
9007         (record_btrace_disconnect, record_btrace_close)
9008         (record_btrace_async, record_btrace_info)
9009         (record_btrace_insn_history, record_btrace_insn_history_range)
9010         (record_btrace_insn_history_from, record_btrace_call_history)
9011         (record_btrace_call_history_range)
9012         (record_btrace_call_history_from, record_btrace_record_method)
9013         (record_btrace_is_replaying, record_btrace_will_replay)
9014         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9015         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9016         (record_btrace_store_registers, record_btrace_prepare_to_store)
9017         (record_btrace_to_get_unwinder)
9018         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9019         (record_btrace_commit_resume, record_btrace_wait)
9020         (record_btrace_stop, record_btrace_can_execute_reverse)
9021         (record_btrace_stopped_by_sw_breakpoint)
9022         (record_btrace_supports_stopped_by_sw_breakpoint)
9023         (record_btrace_stopped_by_hw_breakpoint)
9024         (record_btrace_supports_stopped_by_hw_breakpoint)
9025         (record_btrace_update_thread_list, record_btrace_thread_alive)
9026         (record_btrace_goto_begin, record_btrace_goto_end)
9027         (record_btrace_goto, record_btrace_stop_replaying_all)
9028         (record_btrace_execution_direction)
9029         (record_btrace_prepare_to_generate_core)
9030         (record_btrace_done_generating_core): Refactor as
9031         record_btrace_target methods.
9032         (init_record_btrace_ops): Delete.
9033         (_initialize_record_btrace): Remove reference to
9034         init_record_btrace_ops.
9035         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9036         the execution_direction global.
9037         (record_full_base_target, record_full_target)
9038         (record_full_core_target): New classes.
9039         (record_full_ops): Now a record_full_target.
9040         (record_full_core_ops): Now a record_full_core_target.
9041         (record_full_target::detach, record_full_target::disconnect)
9042         (record_full_core_target::disconnect)
9043         (record_full_target::mourn_inferior, record_full_target::kill):
9044         New.
9045         (record_full_open, record_full_close, record_full_async): Refactor
9046         as methods of the record_full_base_target class.
9047         (record_full_resume, record_full_commit_resume): Refactor
9048         as methods of the record_full_target class.
9049         (record_full_wait, record_full_stopped_by_watchpoint)
9050         (record_full_stopped_data_address)
9051         (record_full_stopped_by_sw_breakpoint)
9052         (record_full_supports_stopped_by_sw_breakpoint)
9053         (record_full_stopped_by_hw_breakpoint)
9054         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9055         methods of the record_full_base_target class.
9056         (record_full_store_registers, record_full_xfer_partial)
9057         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9058         Refactor as methods of the record_full_target class.
9059         (record_full_can_execute_reverse, record_full_get_bookmark)
9060         (record_full_goto_bookmark, record_full_execution_direction)
9061         (record_full_record_method, record_full_info, record_full_delete)
9062         (record_full_is_replaying, record_full_will_replay)
9063         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9064         (record_full_stop_replaying): Refactor as methods of the
9065         record_full_base_target class.
9066         (record_full_core_resume, record_full_core_kill)
9067         (record_full_core_fetch_registers)
9068         (record_full_core_prepare_to_store)
9069         (record_full_core_store_registers, record_full_core_xfer_partial)
9070         (record_full_core_insert_breakpoint)
9071         (record_full_core_remove_breakpoint)
9072         (record_full_core_has_execution): Refactor
9073         as methods of the record_full_core_target class.
9074         (record_full_base_target::supports_delete_record): New.
9075         (init_record_full_ops): Delete.
9076         (init_record_full_core_ops): Delete.
9077         (record_full_save): Refactor as method of the
9078         record_full_base_target class.
9079         (_initialize_record_full): Remove references to
9080         init_record_full_ops and init_record_full_core_ops.
9081
9082         * remote.c (remote_target, extended_remote_target): New classes.
9083         (remote_ops): Now a remote_target.
9084         (extended_remote_ops): Now an extended_remote_target.
9085         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9086         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9087         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9088         (remote_pass_signals, remote_set_syscall_catchpoint)
9089         (remote_program_signals, )
9090         (remote_thread_always_alive): Remove target_ops parameter.
9091         (remote_thread_alive, remote_thread_name)
9092         (remote_update_thread_list, remote_threads_extra_info)
9093         (remote_static_tracepoint_marker_at)
9094         (remote_static_tracepoint_markers_by_strid)
9095         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9096         (remote_open): Refactor as methods of remote_target.
9097         (extended_remote_open, extended_remote_detach)
9098         (extended_remote_attach, extended_remote_post_attach):
9099         (extended_remote_supports_disable_randomization)
9100         (extended_remote_create_inferior): : Refactor as method of
9101         extended_remote_target.
9102         (remote_set_permissions, remote_open_1, remote_detach)
9103         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9104         (remote_resume, remote_commit_resume, remote_stop)
9105         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9106         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9107         (remote_prepare_to_store, remote_store_registers)
9108         (remote_flash_erase, remote_flash_done, remote_files_info)
9109         (remote_kill, remote_mourn, remote_insert_breakpoint)
9110         (remote_remove_breakpoint, remote_insert_watchpoint)
9111         (remote_watchpoint_addr_within_range)
9112         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9113         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9114         (remote_supports_stopped_by_sw_breakpoint)
9115         (remote_stopped_by_hw_breakpoint)
9116         (remote_supports_stopped_by_hw_breakpoint)
9117         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9118         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9119         (remote_verify_memory): Refactor as methods of remote_target.
9120         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9121         parameter.
9122         (remote_xfer_partial, remote_get_memory_xfer_limit)
9123         (remote_search_memory, remote_rcmd, remote_memory_map)
9124         (remote_pid_to_str, remote_get_thread_local_address)
9125         (remote_get_tib_address, remote_read_description): Refactor as
9126         methods of remote_target.
9127         (remote_target::fileio_open, remote_target::fileio_pwrite)
9128         (remote_target::fileio_pread, remote_target::fileio_close): New.
9129         (remote_hostio_readlink, remote_hostio_fstat)
9130         (remote_filesystem_is_local, remote_can_execute_reverse)
9131         (remote_supports_non_stop, remote_supports_disable_randomization)
9132         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9133         (remote_supports_enable_disable_tracepoint)
9134         (remote_supports_string_tracing)
9135         (remote_can_run_breakpoint_commands, remote_trace_init)
9136         (remote_download_tracepoint, remote_can_download_tracepoint)
9137         (remote_download_trace_state_variable, remote_enable_tracepoint)
9138         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9139         (remote_trace_start, remote_get_trace_status)
9140         (remote_get_tracepoint_status, remote_trace_stop)
9141         (remote_trace_find, remote_get_trace_state_variable_value)
9142         (remote_save_trace_data, remote_get_raw_trace_data)
9143         (remote_set_disconnected_tracing, remote_core_of_thread)
9144         (remote_set_circular_trace_buffer, remote_traceframe_info)
9145         (remote_get_min_fast_tracepoint_insn_len)
9146         (remote_set_trace_buffer_size, remote_set_trace_notes)
9147         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9148         (remote_disable_btrace, remote_teardown_btrace)
9149         (remote_read_btrace, remote_btrace_conf)
9150         (remote_augmented_libraries_svr4_read, remote_load)
9151         (remote_pid_to_exec_file, remote_can_do_single_step)
9152         (remote_execution_direction, remote_thread_handle_to_thread_info):
9153         Refactor as methods of remote_target.
9154         (init_remote_ops, init_extended_remote_ops): Delete.
9155         (remote_can_async_p, remote_is_async_p, remote_async)
9156         (remote_thread_events, remote_upload_tracepoints)
9157         (remote_upload_trace_state_variables): Refactor as methods of
9158         remote_target.
9159         (_initialize_remote): Remove references to init_remote_ops and
9160         init_extended_remote_ops.
9161
9162         * remote-sim.c (gdbsim_target): New class.
9163         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9164         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9165         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9166         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9167         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9168         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9169         Refactor as methods of gdbsim_target.
9170         (gdbsim_ops): Now a gdbsim_target.
9171         (init_gdbsim_ops): Delete.
9172         (gdbsim_cntrl_c): Adjust.
9173         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9174
9175         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9176         (the_amd64_linux_nat_target): New.
9177         (amd64_linux_fetch_inferior_registers)
9178         (amd64_linux_store_inferior_registers): Refactor as methods of
9179         amd64_linux_nat_target.
9180         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9181         * i386-linux-nat.c: Don't include "linux-nat.h".
9182         (i386_linux_nat_target): New class.
9183         (the_i386_linux_nat_target): New.
9184         (i386_linux_fetch_inferior_registers)
9185         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9186         as methods of i386_linux_nat_target.
9187         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9188         * inf-child.c (inf_child_ops): Delete.
9189         (inf_child_fetch_inferior_registers)
9190         (inf_child_store_inferior_registers): Delete.
9191         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9192         methods of inf_child_target.
9193         (inf_child_target::supports_terminal_ours)
9194         (inf_child_target::terminal_init)
9195         (inf_child_target::terminal_inferior)
9196         (inf_child_target::terminal_ours_for_output)
9197         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9198         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9199         New.
9200         (inf_child_open, inf_child_disconnect, inf_child_close)
9201         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9202         (inf_child_post_startup_inferior, inf_child_can_run)
9203         (inf_child_pid_to_exec_file): Refactor as methods of
9204         inf_child_target.
9205         (inf_child_follow_fork): Delete.
9206         (inf_child_target::can_create_inferior)
9207         (inf_child_target::can_attach): New.
9208         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9209         (inf_child_target::has_stack, inf_child_target::has_registers)
9210         (inf_child_target::has_execution): New.
9211         (inf_child_fileio_open, inf_child_fileio_pwrite)
9212         (inf_child_fileio_pread, inf_child_fileio_fstat)
9213         (inf_child_fileio_close, inf_child_fileio_unlink)
9214         (inf_child_fileio_readlink, inf_child_use_agent)
9215         (inf_child_can_use_agent): Refactor as methods of
9216         inf_child_target.
9217         (return_zero, inf_child_target): Delete.
9218         (inf_child_target::inf_child_target): New.
9219         * inf-child.h: Include "target.h".
9220         (inf_child_target): Delete function prototype.
9221         (inf_child_target): New class.
9222         (inf_child_open_target, inf_child_mourn_inferior)
9223         (inf_child_maybe_unpush_target): Delete.
9224         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9225         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9226         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9227         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9228         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9229         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9230         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9231         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9232         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9233         methods of inf_ptrace_target.
9234         (inf_ptrace_target): Delete function.
9235         * inf-ptrace.h: Include "inf-child.h".
9236         (inf_ptrace_target): Delete function declaration.
9237         (inf_ptrace_target): New class.
9238         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9239         * linux-nat.c (linux_target): New.
9240         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9241         (linux_nat_target::~linux_nat_target): New.
9242         (linux_child_post_attach, linux_child_post_startup_inferior)
9243         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9244         (linux_child_remove_fork_catchpoint)
9245         (linux_child_insert_vfork_catchpoint)
9246         (linux_child_remove_vfork_catchpoint)
9247         (linux_child_insert_exec_catchpoint)
9248         (linux_child_remove_exec_catchpoint)
9249         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9250         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9251         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9252         (linux_nat_stopped_data_address)
9253         (linux_nat_stopped_by_sw_breakpoint)
9254         (linux_nat_supports_stopped_by_sw_breakpoint)
9255         (linux_nat_stopped_by_hw_breakpoint)
9256         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9257         (linux_nat_kill, linux_nat_mourn_inferior)
9258         (linux_nat_xfer_partial, linux_nat_thread_alive)
9259         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9260         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9261         (linux_child_static_tracepoint_markers_by_strid)
9262         (linux_nat_is_async_p, linux_nat_can_async_p)
9263         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9264         (linux_nat_supports_multi_process)
9265         (linux_nat_supports_disable_randomization, linux_nat_async)
9266         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9267         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9268         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9269         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9270         methods of linux_nat_target.
9271         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9272         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9273         parameter.
9274         (check_stopped_by_watchpoint): Adjust.
9275         (linux_xfer_partial): Delete.
9276         (linux_target_install_ops, linux_target, linux_nat_add_target):
9277         Delete.
9278         (linux_nat_target::linux_nat_target): New.
9279         * linux-nat.h: Include "inf-ptrace.h".
9280         (linux_nat_target): New.
9281         (linux_target, linux_target_install_ops, linux_nat_add_target):
9282         Delete function declarations.
9283         (linux_target): Declare global.
9284         * linux-thread-db.c (thread_db_target): New.
9285         (thread_db_target::thread_db_target): New.
9286         (thread_db_ops): Delete.
9287         (the_thread_db_target): New.
9288         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9289         (thread_db_update_thread_list, thread_db_pid_to_str)
9290         (thread_db_extra_thread_info)
9291         (thread_db_thread_handle_to_thread_info)
9292         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9293         (thread_db_resume): Refactor as methods of thread_db_target.
9294         (init_thread_db_ops): Delete.
9295         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9296         * x86-linux-nat.c: Don't include "linux-nat.h".
9297         (super_post_startup_inferior): Delete.
9298         (x86_linux_nat_target::~x86_linux_nat_target): New.
9299         (x86_linux_child_post_startup_inferior)
9300         (x86_linux_read_description, x86_linux_enable_btrace)
9301         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9302         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9303         methods of x86_linux_nat_target.
9304         (x86_linux_create_target): Delete.  Bits folded ...
9305         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9306         pointer.
9307         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9308         (x86_linux_nat_target): New class.
9309         (x86_linux_create_target): Delete.
9310         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9311         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9312         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9313         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9314         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9315         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9316         make extern.
9317         (x86_use_watchpoints): Delete.
9318         * x86-nat.h: Include "breakpoint.h" and "target.h".
9319         (x86_use_watchpoints): Delete.
9320         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9321         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9322         (x86_insert_watchpoint, x86_remove_watchpoint)
9323         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9324         (x86_stopped_by_hw_breakpoint): New declarations.
9325         (x86_nat_target): New template class.
9326
9327         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9328         (the_ppc_linux_nat_target): New.
9329         (ppc_linux_fetch_inferior_registers)
9330         (ppc_linux_can_use_hw_breakpoint)
9331         (ppc_linux_region_ok_for_hw_watchpoint)
9332         (ppc_linux_ranged_break_num_registers)
9333         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9334         (ppc_linux_insert_mask_watchpoint)
9335         (ppc_linux_remove_mask_watchpoint)
9336         (ppc_linux_can_accel_watchpoint_condition)
9337         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9338         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9339         (ppc_linux_watchpoint_addr_within_range)
9340         (ppc_linux_masked_watch_num_registers)
9341         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9342         (ppc_linux_read_description): Refactor as methods of
9343         ppc_linux_nat_target.
9344         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9345
9346         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9347         (procfs_target): New class.
9348         (the_procfs_target): New.
9349         (procfs_target): Delete function.
9350         (procfs_auxv_parse, procfs_attach, procfs_detach)
9351         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9352         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9353         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9354         (procfs_create_inferior, procfs_update_thread_list)
9355         (procfs_thread_alive, procfs_pid_to_str)
9356         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9357         (procfs_stopped_data_address, procfs_insert_watchpoint)
9358         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9359         (proc_find_memory_regions, procfs_info_proc)
9360         (procfs_make_note_section): Refactor as methods of procfs_target.
9361         (_initialize_procfs): Adjust.
9362         * sol-thread.c (sol_thread_target): New class.
9363         (sol_thread_ops): Now a sol_thread_target.
9364         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9365         (sol_thread_fetch_registers, sol_thread_store_registers)
9366         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9367         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9368         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9369         (init_sol_thread_ops): Delete.
9370         (_initialize_sol_thread): Adjust.  Remove references to
9371         init_sol_thread_ops and complete_target_initialization.
9372
9373         * windows-nat.c (windows_nat_target): New class.
9374         (windows_fetch_inferior_registers)
9375         (windows_store_inferior_registers, windows_resume, windows_wait)
9376         (windows_attach, windows_detach, windows_pid_to_exec_file)
9377         (windows_files_info, windows_create_inferior)
9378         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9379         (windows_close, windows_pid_to_str, windows_xfer_partial)
9380         (windows_get_tib_address, windows_get_ada_task_ptid)
9381         (windows_thread_name, windows_thread_alive): Refactor as
9382         windows_nat_target methods.
9383         (do_initial_windows_stuff): Adjust.
9384         (windows_target): Delete function.
9385         (_initialize_windows_nat): Adjust.
9386
9387         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9388         (darwin_mourn_inferior, darwin_kill_inferior)
9389         (darwin_create_inferior, darwin_attach, darwin_detach)
9390         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9391         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9392         (darwin_supports_multi_process): Refactor as darwin_nat_target
9393         methods.
9394         (darwin_resume_to, darwin_files_info): Delete.
9395         (_initialize_darwin_inferior): Rename to ...
9396         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9397         * darwin-nat.h: Include "inf-child.h".
9398         (darwin_nat_target): New class.
9399         (darwin_complete_target): Delete.
9400         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9401         (darwin_target): New.
9402         (i386_darwin_fetch_inferior_registers)
9403         (i386_darwin_store_inferior_registers): Refactor as methods of
9404         darwin_nat_target.
9405         (darwin_complete_target): Delete, with ...
9406         (_initialize_i386_darwin_nat): ... bits factored out here.
9407
9408         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9409         (the_alpha_linux_nat_target): New.
9410         (alpha_linux_register_u_offset): Refactor as
9411         alpha_linux_nat_target method.
9412         (_initialize_alpha_linux_nat): Adjust.
9413         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9414         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9415         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9416         methods of linux_nat_trad_target.
9417         (linux_trad_target): Delete.
9418         * linux-nat-trad.h (linux_trad_target): Delete function.
9419         (linux_nat_trad_target): New class.
9420         * mips-linux-nat.c (mips_linux_nat_target): New class.
9421         (super_fetch_registers, super_store_registers, super_close):
9422         Delete.
9423         (the_mips_linux_nat_target): New.
9424         (mips64_linux_regsets_fetch_registers)
9425         (mips64_linux_regsets_store_registers)
9426         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9427         (mips_linux_register_u_offset, mips_linux_read_description)
9428         (mips_linux_can_use_hw_breakpoint)
9429         (mips_linux_stopped_by_watchpoint)
9430         (mips_linux_stopped_data_address)
9431         (mips_linux_region_ok_for_hw_watchpoint)
9432         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9433         (mips_linux_close): Refactor as methods of mips_linux_nat.
9434         (_initialize_mips_linux_nat): Adjust to C++ification.
9435
9436         * aix-thread.c (aix_thread_target): New class.
9437         (aix_thread_ops): Now an aix_thread_target.
9438         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9439         (aix_thread_fetch_registers, aix_thread_store_registers)
9440         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9441         (aix_thread_thread_alive, aix_thread_pid_to_str)
9442         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9443         Refactor as methods of aix_thread_target.
9444         (init_aix_thread_ops): Delete.
9445         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9446         and complete_target_initialization.
9447         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9448         (rs6000_nat_target): New class.
9449         (the_rs6000_nat_target): New.
9450         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9451         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9452         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9453         (super_create_inferior): Delete.
9454         (_initialize_rs6000_nat): Adjust to C++ification.
9455
9456         * arm-linux-nat.c (arm_linux_nat_target): New class.
9457         (the_arm_linux_nat_target): New.
9458         (arm_linux_fetch_inferior_registers)
9459         (arm_linux_store_inferior_registers, arm_linux_read_description)
9460         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9461         (arm_linux_remove_hw_breakpoint)
9462         (arm_linux_region_ok_for_hw_watchpoint)
9463         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9464         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9465         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9466         arm_linux_nat_target.
9467         (_initialize_arm_linux_nat): Adjust to C++ification.
9468
9469         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9470         (the_aarch64_linux_nat_target): New.
9471         (aarch64_linux_fetch_inferior_registers)
9472         (aarch64_linux_store_inferior_registers)
9473         (aarch64_linux_child_post_startup_inferior)
9474         (aarch64_linux_read_description)
9475         (aarch64_linux_can_use_hw_breakpoint)
9476         (aarch64_linux_insert_hw_breakpoint)
9477         (aarch64_linux_remove_hw_breakpoint)
9478         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9479         (aarch64_linux_region_ok_for_hw_watchpoint)
9480         (aarch64_linux_stopped_data_address)
9481         (aarch64_linux_stopped_by_watchpoint)
9482         (aarch64_linux_watchpoint_addr_within_range)
9483         (aarch64_linux_can_do_single_step): Refactor as methods of
9484         aarch64_linux_nat_target.
9485         (super_post_startup_inferior): Delete.
9486         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9487
9488         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9489         (the_hppa_linux_nat_target): New.
9490         (hppa_linux_fetch_inferior_registers)
9491         (hppa_linux_store_inferior_registers): Refactor as methods of
9492         hppa_linux_nat_target.
9493         (_initialize_hppa_linux_nat): Adjust to C++ification.
9494
9495         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9496         (the_ia64_linux_nat_target): New.
9497         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9498         (ia64_linux_stopped_data_address)
9499         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9500         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9501         ia64_linux_nat_target methods.
9502         (super_xfer_partial): Delete.
9503         (_initialize_ia64_linux_nat): Adjust to C++ification.
9504
9505         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9506         (the_m32r_linux_nat_target): New.
9507         (m32r_linux_fetch_inferior_registers)
9508         (m32r_linux_store_inferior_registers): Refactor as
9509         m32r_linux_nat_target methods.
9510         (_initialize_m32r_linux_nat): Adjust to C++ification.
9511
9512         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9513         (the_m68k_linux_nat_target): New.
9514         (m68k_linux_fetch_inferior_registers)
9515         (m68k_linux_store_inferior_registers): Refactor as
9516         m68k_linux_nat_target methods.
9517         (_initialize_m68k_linux_nat): Adjust to C++ification.
9518
9519         * s390-linux-nat.c (s390_linux_nat_target): New class.
9520         (the_s390_linux_nat_target): New.
9521         (s390_linux_fetch_inferior_registers)
9522         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9523         (s390_insert_watchpoint, s390_remove_watchpoint)
9524         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9525         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9526         (s390_auxv_parse, s390_read_description): Refactor as methods of
9527         s390_linux_nat_target.
9528         (_initialize_s390_nat): Adjust to C++ification.
9529
9530         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9531         (the_sparc_linux_nat_target): New.
9532         (_initialize_sparc_linux_nat): Adjust to C++ification.
9533         * sparc-nat.c (sparc_fetch_inferior_registers)
9534         (sparc_store_inferior_registers): Remove target_ops parameter.
9535         * sparc-nat.h (sparc_fetch_inferior_registers)
9536         (sparc_store_inferior_registers): Remove target_ops parameter.
9537         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9538         (the_sparc64_linux_nat_target): New.
9539         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9540
9541         * spu-linux-nat.c (spu_linux_nat_target): New class.
9542         (the_spu_linux_nat_target): New.
9543         (spu_child_post_startup_inferior, spu_child_post_attach)
9544         (spu_child_wait, spu_fetch_inferior_registers)
9545         (spu_store_inferior_registers, spu_xfer_partial)
9546         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9547         methods.
9548         (_initialize_spu_nat): Adjust to C++ification.
9549
9550         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9551         (the_tilegx_linux_nat_target): New.
9552         (fetch_inferior_registers, store_inferior_registers):
9553         Refactor as methods.
9554         (_initialize_tile_linux_nat): Adjust to C++ification.
9555
9556         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9557         (the_xtensa_linux_nat_target): New.
9558         (xtensa_linux_fetch_inferior_registers)
9559         (xtensa_linux_store_inferior_registers): Refactor as
9560         xtensa_linux_nat_target methods.
9561         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9562
9563         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9564         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9565         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9566         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9567         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9568         (fbsd_stopped_by_sw_breakpoint)
9569         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9570         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9571         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9572         (fbsd_post_startup_inferior, fbsd_post_attach)
9573         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9574         (fbsd_set_syscall_catchpoint)
9575         (super_xfer_partial, super_resume, super_wait)
9576         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9577         (fbsd_handle_debug_trap): Remove target_ops parameter.
9578         (fbsd_nat_add_target): Delete.
9579         * fbsd-nat.h: Include "inf-ptrace.h".
9580         (fbsd_nat_add_target): Delete.
9581         (USE_SIGTRAP_SIGINFO): Define.
9582         (fbsd_nat_target): New class.
9583
9584         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9585         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9586         (amd64bsd_target): Delete.
9587         * amd64-bsd-nat.h: New file.
9588         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9589         "x86-bsd-nat.h".
9590         (amd64_fbsd_nat_target): New class.
9591         (the_amd64_fbsd_nat_target): New.
9592         (amd64fbsd_read_description): Refactor as method of
9593         amd64_fbsd_nat_target.
9594         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9595         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9596         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9597         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9598         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9599         (i386bsd_target): Delete.
9600         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9601         (i386bsd_fetch_inferior_registers)
9602         (i386bsd_store_inferior_registers): Declare.
9603         (i386_bsd_nat_target): New class.
9604         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9605         (the_i386_fbsd_nat_target): New.
9606         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9607         i386_fbsd_nat_target methods.
9608         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9609         (_initialize_i386fbsd_nat): Adjust to C++ification.
9610         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9611         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9612         (_initialize_x86_bsd_nat): Adjust to C++ification.
9613         * x86-bsd-nat.h: Include "x86-nat.h".
9614         (x86bsd_target): Delete declaration.
9615         (x86bsd_nat_target): New class.
9616
9617         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9618         (the_aarch64_fbsd_nat_target): New.
9619         (aarch64_fbsd_fetch_inferior_registers)
9620         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9621         aarch64_fbsd_nat_target.
9622         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9623         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9624         (the_alpha_bsd_nat_target): New.
9625         (alphabsd_fetch_inferior_registers)
9626         (alphabsd_store_inferior_registers): Refactor as
9627         alpha_bsd_nat_target methods.
9628         (_initialize_alphabsd_nat): Refactor as methods of
9629         alpha_bsd_nat_target.
9630         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9631         (the_amd64_nbsd_nat_target): New.
9632         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9633         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9634         (the_amd64_obsd_nat_target): New.
9635         (_initialize_amd64obsd_nat): Adjust to C++ification.
9636         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9637         (the_arm_fbsd_nat_target): New.
9638         (arm_fbsd_fetch_inferior_registers)
9639         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9640         (_initialize_arm_fbsd_nat): Refactor as methods of
9641         arm_fbsd_nat_target.
9642         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9643         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9644         (the_arm_netbsd_nat_target): New.
9645         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9646         arm_netbsd_nat_target.
9647         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9648         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9649         (the_hppa_nbsd_nat_target): New.
9650         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9651         hppa_nbsd_nat_target methods.
9652         (_initialize_hppanbsd_nat): Adjust to C++ification.
9653         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9654         (the_hppa_obsd_nat_target): New.
9655         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9656         methods of hppa_obsd_nat_target.
9657         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9658         add_target.
9659         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9660         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9661         add_target.
9662         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9663         (_initialize_i386obsd_nat): Use add_target.
9664         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9665         (the_m68k_bsd_nat_target): New.
9666         (m68kbsd_fetch_inferior_registers)
9667         (m68kbsd_store_inferior_registers): Refactor as methods of
9668         m68k_bsd_nat_target.
9669         (_initialize_m68kbsd_nat): Adjust to C++ification.
9670         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9671         (the_mips_fbsd_nat_target): New.
9672         (mips_fbsd_fetch_inferior_registers)
9673         (mips_fbsd_store_inferior_registers): Refactor as methods of
9674         mips_fbsd_nat_target.
9675         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9676         add_target.
9677         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9678         (the_mips_nbsd_nat_target): New.
9679         (mipsnbsd_fetch_inferior_registers)
9680         (mipsnbsd_store_inferior_registers): Refactor as methods of
9681         mips_nbsd_nat_target.
9682         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9683         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9684         (the_mips64_obsd_nat_target): New.
9685         (mips64obsd_fetch_inferior_registers)
9686         (mips64obsd_store_inferior_registers): Refactor as methods of
9687         mips64_obsd_nat_target.
9688         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9689         add_target.
9690         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9691         nbsd_nat_target.
9692         * nbsd-nat.h: Include "inf-ptrace.h".
9693         (nbsd_nat_target): New class.
9694         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9695         (obsd_wait): Refactor as methods of obsd_nat_target.
9696         (obsd_add_target): Delete.
9697         * obsd-nat.h: Include "inf-ptrace.h".
9698         (obsd_nat_target): New class.
9699         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9700         (the_ppc_fbsd_nat_target): New.
9701         (ppcfbsd_fetch_inferior_registers)
9702         (ppcfbsd_store_inferior_registers): Refactor as methods of
9703         ppc_fbsd_nat_target.
9704         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9705         add_target.
9706         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9707         (the_ppc_nbsd_nat_target): New.
9708         (ppcnbsd_fetch_inferior_registers)
9709         (ppcnbsd_store_inferior_registers): Refactor as methods of
9710         ppc_nbsd_nat_target.
9711         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9712         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9713         (the_ppc_obsd_nat_target): New.
9714         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9715         methods of ppc_obsd_nat_target.
9716         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9717         add_target.
9718         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9719         (the_sh_nbsd_nat_target): New.
9720         (shnbsd_fetch_inferior_registers)
9721         (shnbsd_store_inferior_registers): Refactor as methods of
9722         sh_nbsd_nat_target.
9723         (_initialize_shnbsd_nat): Adjust to C++ification.
9724         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9725         (inf_ptrace_xfer_partial): Delete.
9726         (sparc_xfer_partial, sparc_target): Delete.
9727         * sparc-nat.h (sparc_fetch_inferior_registers)
9728         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9729         (sparc_target): Delete function declaration.
9730         (sparc_target): New template class.
9731         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9732         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9733         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9734         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9735         add_target.
9736         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9737         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9738         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9739         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9740         add_target.
9741         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9742         (the_vax_bsd_nat_target): New.
9743         (vaxbsd_fetch_inferior_registers)
9744         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9745         methods.
9746         (_initialize_vaxbsd_nat): Adjust to C++ification.
9747
9748         * bsd-kvm.c (bsd_kvm_target): New class.
9749         (bsd_kvm_ops): Now a bsd_kvm_target.
9750         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9751         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9752         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9753         bsd_kvm_target.
9754         (bsd_kvm_return_one): Delete.
9755         (bsd_kvm_add_target): Adjust to C++ification.
9756
9757         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9758         (nto_procfs_target_procfs): New classes.
9759         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9760         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9761         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9762         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9763         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9764         (procfs_remove_hw_breakpoint, procfs_resume)
9765         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9766         (procfs_kill_inferior, procfs_store_registers)
9767         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9768         as methods of nto_procfs_target.
9769         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9770         (nto_native_ops): Delete.
9771         (procfs_open, procfs_native_open): Delete.
9772         (nto_native_ops): Now an nto_procfs_target_native.
9773         (init_procfs_targets): Adjust to C++ification.
9774         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9775         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9776         Refactor as methods of nto_procfs_target.
9777
9778         * go32-nat.c (go32_nat_target): New class.
9779         (the_go32_nat_target): New.
9780         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9781         (go32_store_registers, go32_xfer_partial, go32_files_info)
9782         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9783         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9784         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9785         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9786         (go32_target): Delete.
9787         (_initialize_go32_nat): Adjust to C++ification.
9788
9789         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9790         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9791         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9792         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9793         gnu_nat_target.
9794         (gnu_target): Delete.
9795         * gnu-nat.h (gnu_target): Delete.
9796         (gnu_nat_target): New class.
9797         * i386-gnu-nat.c (gnu_base_target): New.
9798         (i386_gnu_nat_target): New class.
9799         (the_i386_gnu_nat_target): New.
9800         (_initialize_i386gnu_nat): Adjust to C++ification.
9801
9802 2018-05-02  Pedro Alves  <palves@redhat.com>
9803
9804         * bfd-target.c (target_bfd_xclose): Rename to ...
9805         (target_bfd_close): ... this.
9806         (target_bfd_reopen): Adjust.
9807         * target.c (target_close): Remove references to to_xclose.
9808         * target.h (target_ops::to_xclose): Delete.
9809         (target_ops::to_close): Update comments.
9810
9811 2018-05-02  Pedro Alves  <palves@redhat.com>
9812
9813         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9814         "linux-nat.h".
9815         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9816         * inf-ptrace.c (inf_ptrace_register_u_offset)
9817         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9818         (inf_ptrace_store_register, inf_ptrace_store_registers)
9819         (inf_ptrace_trad_target): Move to ...
9820         * linux-nat-trad.c: ... this new file.
9821         * linux-nat-trad.h: New file.
9822         * linux-nat.c (linux_target_install_ops): Make extern.
9823         (linux_trad_target): Delete.
9824         * linux-nat.h (linux_trad_target): Delete declaration.
9825         (linux_target_install_ops): Declare.
9826         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9827         "linux-nat.h".
9828
9829 2018-05-02  Pedro Alves  <palves@redhat.com>
9830
9831         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9832         procfs_target/add_target here.
9833         * procfs.c (procfs_target): Make static.
9834         (_initialize_procfs): Call add_target here.
9835         * procfs.h (struct target_ops): Remove forward declaration.
9836         (procfs_target): Remove declaration.
9837         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9838
9839 2018-05-02  Pedro Alves  <palves@redhat.com>
9840
9841         * procfs.c (procfs_stopped_by_watchpoint)
9842         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9843         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9844         Forward declare.
9845         (procfs_use_watchpoints): Delete, move contents...
9846         (procfs_target): ... here.
9847         * procfs.h (procfs_use_watchpoints): Delete declaration.
9848         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9849         procfs_use_watchpoints.
9850         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9851         procfs_use_watchpoints.
9852
9853 2018-05-02  Tom Tromey  <tom@tromey.com>
9854
9855         PR python/20084:
9856         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9857         and var_zuinteger_unlimited.
9858         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9859         and PARAM_ZUINTEGER_UNLIMITED.
9860         (set_parameter_value): Handle var_zuinteger and
9861         var_zuinteger_unlimited.
9862         (add_setshow_generic): Likewise.
9863         (parmpy_init): Likewise.
9864
9865 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9866
9867         PR rust/23124
9868         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9869         pointer is not null before dereferencing it.
9870
9871 2018-04-30  Tom Tromey  <tom@tromey.com>
9872
9873         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9874         is_mi_like_p.
9875
9876 2018-04-30  Tom Tromey  <tom@tromey.com>
9877
9878         * breakpoint.c (mention): Remove use of is_mi_like_p.
9879         (print_mention_ranged_breakpoint): Likewise.
9880         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9881         of is_mi_like_p.
9882
9883 2018-04-30  Tom Tromey  <tom@tromey.com>
9884
9885         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9886
9887 2018-04-30  Tom Tromey  <tom@tromey.com>
9888
9889         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9890         (info_spu_event_command): Remove some uses of is_mi_like_p.
9891
9892 2018-04-30  Tom Tromey  <tom@tromey.com>
9893
9894         * python/py-framefilter.c (py_print_single_arg)
9895         (enumerate_locals, py_print_args, py_print_frame): Remove some
9896         uses of is_mi_like_p.
9897
9898 2018-04-30  Tom Tromey  <tom@tromey.com>
9899
9900         * ui-out.c: Update.
9901         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9902         * ui-out.h (ui_out::is_mi_like_p): Now const.
9903         (ui_out::do_is_mi_like_p): Now const.
9904         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9905
9906 2018-04-30  Tom Tromey  <tom@tromey.com>
9907
9908         * varobj.c (varobj_set_visualizer): Use new_reference.
9909         * python/python.c (gdbpy_decode_line): Use new_reference.
9910         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9911         new_reference.
9912
9913 2018-04-30  Tom Tromey  <tom@tromey.com>
9914
9915         * varobj.c (install_new_value): Use new_reference.
9916         * value.h (value_incref): Return void.  Swap intro comment with
9917         value_decref.
9918         * value.c (set_value_parent): Use new_reference.
9919         (value_incref): Return void.  Update intro comment.
9920         (release_value): Use new_reference.
9921         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9922
9923 2018-04-30  Tom Tromey  <tom@tromey.com>
9924
9925         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9926         * gdb_bfd.h (new_bfd_ref): Remove.
9927         (gdb_bfd_open): Update comment.
9928         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9929         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9930         (gdb_bfd_fdopenr): Use new_reference.
9931         * exec.c (exec_file_attach): Use new_reference.
9932
9933 2018-04-30  Tom Tromey  <tom@tromey.com>
9934
9935         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9936         method.
9937
9938 2018-04-30  Tom Tromey  <tom@tromey.com>
9939
9940         * jit.c (jit_read_code_entry): Use type_align.
9941         * i386-tdep.c (i386_gdbarch_init): Don't call
9942         set_gdbarch_long_long_align_bit.
9943         * gdbarch.sh: Remove long_long_align_bit.
9944         * gdbarch.c, gdbarch.h: Rebuild.
9945         * arc-tdep.c (arc_type_align): New function.
9946         (arc_gdbarch_init): Use arc_type_align.  Don't call
9947         set_gdbarch_long_long_align_bit.
9948
9949 2018-04-30  Tom Tromey  <tom@tromey.com>
9950
9951         * rust-lang.c (rust_type_alignment): Remove.
9952         (rust_composite_type): Use type_align.
9953
9954 2018-04-30  Tom Tromey  <tom@tromey.com>
9955
9956         * NEWS: Mention Type.align.
9957         * python/py-type.c (typy_get_alignof): New function.
9958         (type_object_getset): Add "alignof".
9959
9960 2018-04-30  Tom Tromey  <tom@tromey.com>
9961
9962         PR exp/17095:
9963         * NEWS: Update.
9964         * std-operator.def (UNOP_ALIGNOF): New operator.
9965         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9966         New.
9967         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9968         * c-lang.c (c_op_print_tab): Add alignof.
9969         * c-exp.y (ALIGNOF): New token.
9970         (exp): Add "ALIGNOF" production.
9971         (ident_tokens): Add _Alignof and alignof.
9972
9973 2018-04-30  Tom Tromey  <tom@tromey.com>
9974
9975         * i386-tdep.c (i386_type_align): New function.
9976         (i386_gdbarch_init): Update.
9977         * gdbarch.sh (type_align): New method.
9978         * gdbarch.c, gdbarch.h: Rebuild.
9979         * arch-utils.h (default_type_align): Declare.
9980         * arch-utils.c (default_type_align): New function.
9981         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9982         (struct type) <align_log2>: New field.
9983         <instance_flags>: Now a bitfield.
9984         (TYPE_RAW_ALIGN): New macro.
9985         (type_align, type_raw_align, set_type_align): Declare.
9986         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9987         functions.
9988         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9989         (get_alignment, maybe_set_alignment): New functions.
9990         (read_structure_type, read_enumeration_type, read_array_type)
9991         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9992         (read_subrange_type, read_base_type): Set type alignment.
9993
9994 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9995
9996         * dwarf2read.c (read_index_from_section): Use bool.
9997
9998 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9999
10000         PR gdb/22950
10001         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10002         with #ifdef.
10003
10004 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10005
10006         PR build/22873
10007         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10008         last step, and do it atomically.
10009
10010 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10011
10012         * compile/compile-c-types.c (convert_int, convert_float):
10013         Update for C FE v1.
10014
10015 2018-04-27  Tom Tromey  <tom@tromey.com>
10016
10017         PR rust/22545:
10018         * rust-lang.c (rust_inclusive_range_type_p): New function.
10019         (rust_range): Handle inclusive ranges.
10020         (rust_compute_range): Likewise.
10021         * rust-exp.y (struct rust_op) <inclusive>: New field.
10022         (DOTDOTEQ): New constant.
10023         (range_expr): Add "..=" productions.
10024         (operator_tokens): Add "..=" token.
10025         (ast_range): Add "inclusive" parameter.
10026         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10027         ranges.
10028         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10029         bounds values.
10030         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10031         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10032         Update comments.
10033         * expprint.c (print_subexp_standard): Handle new bounds values.
10034         (dump_subexp_body_standard): Likewise.
10035
10036 2018-04-27  Tom Tromey  <tom@tromey.com>
10037
10038         * configure: Rebuild.
10039         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10040         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10041         "OVERRIDE".
10042         (class symbol_needs_eval_context): Likewise.
10043         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10044         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10045         "virtual".
10046         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10047         "override".
10048         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10049         * aarch64-tdep.c (instruction_reader::read): Use "override".
10050         (instruction_reader_test::read): Likewise.
10051         * arm-tdep.c (instruction_reader::read): Use "override".
10052         (instruction_reader_thumb::read): Likewise.
10053
10054 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10055
10056         PR remote/9665
10057         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10058         instead of remote_send.
10059         (remote_send): Remove.
10060
10061 2018-04-26  Pedro Alves  <palves@redhat.com>
10062
10063         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10064         find_function_start_sal instead of find_pc_line.
10065
10066 2018-04-26  Pedro Alves  <palves@redhat.com>
10067
10068         * breakpoint.c (set_breakpoint_location_function): Handle
10069         mst_data_gnu_ifunc.
10070         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10071         * elfread.c (elf_symtab_read): Give data symbols with
10072         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10073         (elf_rel_plt_read): Update comment.
10074         * linespec.c (convert_linespec_to_sals): Handle
10075         mst_data_gnu_ifunc.
10076         (minsym_found): Handle mst_data_gnu_ifunc.
10077         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10078         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10079         * parse.c (find_minsym_type_and_address): Handle
10080         mst_data_gnu_ifunc.
10081         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10082         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10083         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10084         comment.
10085         <mst_data_gnu_ifunc>: New enumerator.
10086
10087 2018-04-26  Pedro Alves  <palves@redhat.com>
10088
10089         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10090         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10091         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10092         Handle it.
10093         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10094         (lookup_minimal_symbol_by_pc): Adjust.
10095         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10096         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10097         * minsyms.h (lookup_msym_prefer): New enum.
10098         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10099         parameter by a lookup_msym_prefer parameter.
10100
10101 2018-04-26  Pedro Alves  <palves@redhat.com>
10102
10103         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10104         ends in "@plt" instead of looking at the symbol's section.
10105
10106 2018-04-26  Pedro Alves  <palves@redhat.com>
10107
10108         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10109         all references.
10110         (find_pc_partial_function_gnu_ifunc): Rename to ...
10111         (find_pc_partial_function): ... this, and remove references to
10112         'is_gnu_ifunc_p'.
10113         (find_pc_partial_function): Delete old implementation.
10114         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10115
10116 2018-04-26  Pedro Alves  <palves@redhat.com>
10117
10118         * linespec.c (struct bound_minimal_symbol_search_key): New.
10119         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10120         skip first line if we found a GNU ifunc minimal symbol by name.
10121         (compare_msymbols): Change parameters to work with a destructured
10122         lhs minsym.
10123         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10124         functions.
10125
10126 2018-04-26  Pedro Alves  <palves@redhat.com>
10127
10128         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10129         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10130         address/name.
10131         (add_location_to_breakpoint): Store the minsym and the objfile in
10132         the breakpoint location.
10133         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10134         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10135         Record the minsym in the sal.
10136         * symtab.h (symtab_and_line) <msymbol>: New field.
10137
10138 2018-04-26  Pedro Alves  <palves@redhat.com>
10139
10140         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10141         unless we actually resolved the ifunc.
10142
10143 2018-04-26  Pedro Alves  <palves@redhat.com>
10144
10145         * c-exp.y (variable production): Prefer ifunc minsyms over
10146         regular function symbols.
10147         * symtab.c (find_gnu_ifunc): New function.
10148         * minsyms.h (lookup_msym_prefer): New enum.
10149         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10150         parameter by a lookup_msym_prefer parameter.
10151         * symtab.h (find_gnu_ifunc): New declaration.
10152
10153 2018-04-26  Pedro Alves  <palves@redhat.com>
10154
10155         * blockframe.c (find_gnu_ifunc_target_type): New function.
10156         (find_function_type): New.
10157         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10158         return a value with a memory address.
10159         (eval_call): For calls to GNU ifunc functions, try to find the
10160         type of the target function from the type that the resolver
10161         returns.
10162         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10163         symbols.
10164         * infcall.c (find_function_return_type): Delete.
10165         (find_function_addr): Add 'function_type' parameter.  For calls to
10166         GNU ifunc functions, try to find the type of the target function
10167         from the type that the resolver returns, and return it via
10168         FUNCTION_TYPE.
10169         (call_function_by_hand_dummy): Adjust to use the function type
10170         returned by find_function_addr.
10171         (find_function_addr): Add 'function_type' parameter and move
10172         description here.
10173         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10174         declarations.
10175
10176 2018-04-26  Pedro Alves  <palves@redhat.com>
10177
10178         * c-exp.y (variable production): Skip finding an alias for ifunc
10179         symbols.
10180
10181 2018-04-26  Pedro Alves  <palves@redhat.com>
10182
10183         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10184
10185 2018-04-25  Pedro Alves  <palves@redhat.com>
10186
10187         * infcmd.c (kill_command): Print the pid as string, not the whole
10188         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10189         message.
10190         * remote.c (remote_detach_1): Print the pid as string, not the
10191         whole thread's ptid.
10192
10193 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10194             Sergio Durigan Junior  <sergiodj@redhat.com>
10195             Pedro Alves  <palves@redhat.com>
10196
10197         * infcmd.c (kill_command): Print message when inferior has
10198         been killed.
10199         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10200         '1'.
10201         (add_inferior): Improve message printed when
10202         'print_inferior_events' is on.
10203         (exit_inferior): Remove message printed when
10204         'print_inferior_events' is on.
10205         (detach_inferior): Improve message printed when
10206         'print_inferior_events' is on.
10207         (initialize_inferiors): Use 'add_inferior_silent' to set
10208         'current_inferior_'.
10209         * inferior.h (print_inferior_events): Declare here as
10210         'extern'.
10211         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10212         '[Detaching...]' messages when 'print_inferior_events' is on.
10213         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10214         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10215         'Detaching after fork from child...', replace it by '... from
10216         parent...'.
10217         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10218         prefix/suffix when printing 'Detaching...' messages.  Print
10219         them when 'print_inferior_events' is on.
10220         * remote.c (remote_detach_1): Print message when detaching
10221         from inferior and '!is_fork_parent'.
10222
10223 2018-04-24  Tom Tromey  <tom@tromey.com>
10224
10225         * cli-out.h: Reindent.
10226
10227 2018-04-24  Tom Tromey  <tom@tromey.com>
10228
10229         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10230         (cli_ui_out::do_field_string): Use fputs_filtered.
10231         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10232
10233 2018-04-23  Tom Tromey  <tom@tromey.com>
10234
10235         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10236         gdb::unique_xmalloc_ptr.
10237
10238 2018-04-23  Tom Tromey  <tom@tromey.com>
10239
10240         * configure: Rebuild.
10241
10242 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10243
10244         PR gdb/23095
10245         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10246         prepare_for_testing.  Set normal_bp to r_debug_state if target
10247         is bsd.
10248
10249 2018-04-21  Pedro Alves  <palves@redhat.com>
10250             Rajendra SY  <rajendra.sy@gmail.com>
10251
10252         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10253         * remote.c (extended_remote_attach): In all-stop mode, mark the
10254         thread as executing.
10255
10256 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10257
10258         * thread.c (thread_apply_all_command): Fix comment.
10259         (thread_command): Fix comment.
10260
10261 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10262
10263         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10264         parameter.
10265         * features/aarch64-core.c (create_feature_aarch64_core):
10266         Regenerate.
10267         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10268         Likewise.
10269         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10270         Likewise.
10271         * features/i386/32bit-avx512.c
10272         (create_feature_i386_32bit_avx512): Likewise.
10273         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10274         Likewise.
10275         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10276         Likewise.
10277         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10278         Likewise.
10279         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10280         Likewise.
10281         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10282         Likewise.
10283         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10284         Likewise.
10285         * features/i386/64bit-avx512.c
10286         (create_feature_i386_64bit_avx512): Likewise.
10287         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10288         Likewise.
10289         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10290         Likewise.
10291         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10292         Likewise.
10293         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10294         Likewise.
10295         * features/i386/64bit-segments.c
10296         (create_feature_i386_64bit_segments): Likewise.
10297         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10298         Likewise.
10299         * features/i386/x32-core.c
10300         (create_feature_i386_x32_core): Likewise.
10301         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10302         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10303         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10304         * target-descriptions.c: In generated code, don't pass xml
10305         filename.
10306
10307 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10308
10309         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10310         (print_xml_feature::visit_post): Likewise.
10311         (print_xml_feature::visit): Likewise.
10312         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10313         (print_xml_feature): Add new class.
10314         * regformats/regdat.sh: Null xmltarget on feature targets.
10315         * target-descriptions.c (struct target_desc): Add xmltarget.
10316         (maintenance_check_tdesc_xml_convert): Add unittest function.
10317         (tdesc_get_features_xml): Add function to get xml.
10318         (maintenance_check_xml_descriptions): Test xml generation.
10319         * xml-tdesc.c (string_read_description_xml): Add function.
10320         * xml-tdesc.h (string_read_description_xml): Add declaration.
10321
10322 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10323
10324         * features/Makefile: Add feature marker to targets with new style
10325         target descriptions.
10326         * regformats/aarch64.dat: Regenerate.
10327         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10328         * regformats/i386/amd64-avx-linux.dat: Likewise.
10329         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10330         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10331         * regformats/i386/amd64-linux.dat: Likewise.
10332         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10333         * regformats/i386/amd64.dat: Likewise.
10334         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10335         * regformats/i386/i386-avx-linux.dat: Likewise.
10336         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10337         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10338         * regformats/i386/i386-linux.dat: Likewise.
10339         * regformats/i386/i386-mmx-linux.dat: Likewise.
10340         * regformats/i386/i386-mpx-linux.dat: Likewise.
10341         * regformats/i386/i386.dat: Likewise.
10342         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10343         * regformats/i386/x32-avx-linux.dat: Likewise.
10344         * regformats/i386/x32-linux.dat: Likewise.
10345         * regformats/tic6x-c62x-linux.dat: Likewise.
10346         * regformats/tic6x-c64x-linux.dat: Likewise.
10347         * regformats/tic6x-c64xp-linux.dat: Likewise.
10348         * regformats/regdat.sh: Parse feature marker.
10349
10350 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10351
10352         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10353         (tdesc_osabi_name): Likewise.
10354         * target-descriptions.c (tdesc_architecture_name): Add new
10355         function.
10356         (tdesc_osabi_name): Likewise.
10357
10358 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10359
10360         * common/tdesc.c (tdesc_predefined_type): Move to here.
10361         (tdesc_named_type): Likewise.
10362         (tdesc_create_vector): Likewise.
10363         (tdesc_create_struct): Likewise.
10364         (tdesc_set_struct_size): Likewise.
10365         (tdesc_create_union): Likewise.
10366         (tdesc_create_flags): Likewise.
10367         (tdesc_create_enum): Likewise.
10368         (tdesc_add_field): Likewise.
10369         (tdesc_add_typed_bitfield): Likewise.
10370         (tdesc_add_bitfield): Likewise.
10371         (tdesc_add_flag): Likewise.
10372         (tdesc_add_enum_value): Likewise.
10373         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10374         (struct tdesc_type_vector): Likewise.
10375         (struct tdesc_type_field): Likewise.
10376         (struct tdesc_type_with_fields): Likewise.
10377         (tdesc_create_enum): Add declaration.
10378         (tdesc_add_typed_bitfield): Likewise.
10379         (tdesc_add_enum_value): Likewise.
10380         * target-descriptions.c (tdesc_type_field): Move from here.
10381         (tdesc_type_builtin): Likewise.
10382         (tdesc_type_vector): Likewise.
10383         (tdesc_type_with_fields): Likewise.
10384         (tdesc_predefined_types): Likewise.
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         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10398         (tdesc_add_typed_bitfield): Likewise.
10399         (tdesc_add_enum_value): Likewise.
10400
10401 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10402
10403         * common/tdesc.c (tdesc_feature::accept): Move to here.
10404         (tdesc_feature::operator==): Likewise.
10405         (tdesc_create_reg): Likewise.
10406         * common/tdesc.h (tdesc_type_kind): Likewise.
10407         (struct tdesc_type): Likewise.
10408         (struct tdesc_feature): Likewise.
10409         * regformats/regdat.sh: Create a feature.
10410         * target-descriptions.c (tdesc_type_kind): Move from here.
10411         (tdesc_type): Likewise.
10412         (tdesc_type_up): Likewise.
10413         (tdesc_feature): Likewise.
10414         (tdesc_create_reg): Likewise.
10415
10416 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10417
10418         * Makefile.in: Add arch/tdesc.c
10419         * common/tdesc.c: New file.
10420         * common/tdesc.h (tdesc_element_visitor): Move to here.
10421         (tdesc_element): Likewise.
10422         (tdesc_reg): Likewise.
10423         (tdesc_reg_up): Likewise.
10424         * regformats/regdef.h (reg): Add offset to constructors.
10425         * target-descriptions.c (tdesc_element_visitor): Move from here.
10426         (tdesc_element): Likewise.
10427         (tdesc_reg): Likewise.
10428         (tdesc_reg_up): Likewise.
10429
10430 2018-04-17  Tom Tromey  <tom@tromey.com>
10431
10432         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10433         discriminant field.
10434
10435 2018-04-17  Tom Tromey  <tom@tromey.com>
10436
10437         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10438
10439 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10440
10441         * symtab.c (print_symbol_info): Skip printing filename and line
10442         number when `last' is NULL.
10443         (symtab_symbol_info): Use empty string instead of NULL for first
10444         invocation of print_symbol_info.
10445         (rbreak_command): Pass NULL to `last' parameter of
10446         print_symbol_info.
10447
10448 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10449
10450         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10451         instead of nullptr.
10452
10453 2018-04-16  Pedro Alves  <palves@redhat.com>
10454
10455         * MAINTAINERS (sh): Remove.
10456         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10457         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10458         (ALLDEPFILES): Remove sh64-tdep.c.
10459         * NEWS: Mentions that support for SH-5/SH64 is removed.
10460         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10461         (sh*-*-openbsd*): Ditto.
10462         (sh64-*-elf*): Remove.
10463         (sh*): Remove.
10464         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10465         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10466         * sh-tdep.c: No longer include "sh64-tdep.h".
10467         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10468         * sh64-tdep.c, sh64-tdep.h: Remove files.
10469
10470 2018-04-16  Pedro Alves  <palves@redhat.com>
10471
10472         * MAINTAINERS: Remove m88k.
10473         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10474         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10475         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10476         * NEWS: Mention that support for m88k was removed.
10477         * configure.host (m88*-*-*): Remove support.
10478         * configure.nat (m88k-*-*): Remove support.
10479         * configure.tgt (m88*-*-openbsd*): Remove.
10480         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10481
10482 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10483
10484         * configure.tgt (x86_tobjs): New variable.
10485         (amd64_tobjs, i386_tobjs): Use it.
10486
10487 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10488
10489         * symtab.c (print_symbol_info): Precede the symbol definition by
10490         the line number when available.
10491         * NEWS: Advertise this enhancement.
10492
10493 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10494
10495         * NEWS (New options): announce set/show record btrace cpu.
10496         * btrace.c: Include record-btrace.h.
10497         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10498         the vendor is unknown.
10499         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10500         Maybe overwrite the btrace configuration's cpu.
10501         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10502         (btrace_fetch): Add cpu parameter.  Update callers.
10503         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10504         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10505         errata workarounds if the vendor is unknown.
10506         * python/py-record-btrace.c: Include record-btrace.h.
10507         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10508         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10509         * record-btrace.c (record_btrace_cpu_state_kind): New.
10510         (record_btrace_cpu): New.
10511         (set_record_btrace_cpu_cmdlist): New.
10512         (record_btrace_get_cpu): New.
10513         (require_btrace_thread, record_btrace_info)
10514         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10515         (cmd_set_record_btrace_cpu_none): New.
10516         (cmd_set_record_btrace_cpu_auto): New.
10517         (cmd_set_record_btrace_cpu): New.
10518         (cmd_show_record_btrace_cpu): New.
10519         (_initialize_record_btrace): Initialize set/show record btrace cpu
10520         commands.
10521         * record-btrace.h (record_btrace_get_cpu): New.
10522
10523 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10524
10525         * record.c (set_record_command): Fix typo in message.
10526
10527 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10528
10529         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10530
10531 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10532
10533         * infrun.c (process_event_stop_test): Call
10534         gdbarch_in_indirect_branch_thunk.
10535         * gdbarch.sh (in_indirect_branch_thunk): New.
10536         * gdbarch.c: Regenerated.
10537         * gdbarch.h: Regenerated.
10538         * x86-tdep.h: New.
10539         * x86-tdep.c: New.
10540         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10541         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10542         (ALLDEPFILES): Add x86-tdep.c.
10543         * arch-utils.h (default_in_indirect_branch_thunk): New.
10544         * arch-utils.c (default_in_indirect_branch_thunk): New.
10545         * i386-tdep: Include x86-tdep.h.
10546         (i386_in_indirect_branch_thunk): New.
10547         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10548         function.
10549         * amd64-tdep: Include x86-tdep.h.
10550         (amd64_in_indirect_branch_thunk): New.
10551         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10552
10553 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10554
10555         PR gdb/23053
10556         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10557         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10558         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10559         regression.
10560
10561 2018-04-12  Tom Tromey  <tom@tromey.com>
10562
10563         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10564         (rust_evaluate_subexp): Likewise.
10565
10566 2018-04-12  Pedro Alves  <palves@redhat.com>
10567
10568         * procfs.c (procfs_detach): Make forward declaration's prototype
10569         match definition's protototype.
10570         (proc_get_LDT_entry): Remove stale do_cleanups call.
10571
10572 2018-04-12  Pedro Alves  <palves@redhat.com>
10573
10574         * target.h (target_ops::to_has_exited): Delete.
10575         (target_has_exited): Delete.
10576         * target-delegates.c: Regenerate.
10577
10578 2018-04-11  Pedro Alves  <palves@redhat.com>
10579
10580         * target.c (fileio_fh_t::t): Add comment.
10581         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10582         (target_fileio_close): Handle a NULL target.
10583         (invalidate_fileio_fh): New.
10584         (target_close): Call it.
10585         * remote.c (remote_hostio_send_command): No longer check whether
10586         remote_desc is open.
10587
10588 2018-04-11  Pedro Alves  <palves@redhat.com>
10589
10590         * target.c (fileio_fh_t): Make it a named struct instead of a
10591         typedef.
10592         (fileio_fh_t::is_closed): New method.
10593         (DEF_VEC_O (fileio_fh_t)): Remove.
10594         (fileio_fhandles): Now a std::vector.
10595         (is_closed_fileio_fh): Delete.
10596         (acquire_fileio_fd): Adjust.  Rename parameters.
10597         (release_fileio_fd): Adjust.
10598         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10599         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10600         (target_fileio_close): Adjust.
10601
10602 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10603
10604         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10605         index.
10606
10607 2018-04-10  Pedro Alves  <palves@redhat.com>
10608
10609         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10610         (scoped_finish_thread_state): New class.
10611         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10612         cleanup.
10613         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10614         (fetch_inferior_event, normal_stop): Likewise.
10615         * thread.c (finish_thread_state_cleanup): Delete.
10616
10617 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10618             Pedro Alves  <palves@redhat.com>
10619
10620         * value.c: Include "selftest.h" and "common/array-view.h".
10621         (struct range) <operator ==>: New.
10622         (test_ranges_contain): New.
10623         (check_ranges_vector): New.
10624         (test_insert_into_bit_range_vector): New.
10625         (_initialize_values): Register selftests.
10626         * common/array-view.h (operator==, operator!=): New.
10627
10628 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10629
10630         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10631         an iterator.
10632         * inline-frame.c: Include <algorithm>.
10633         (struct inline_state): Add constructor.
10634         (inline_state_s): Remove.
10635         (DEF_VEC_O(inline_state_s)): Remove.
10636         (inline_states): Change type to std::vector.
10637         (find_inline_frame_state): Adjust to std::vector.
10638         (allocate_inline_frame_state): Remove.
10639         (clear_inline_frame_state): Adjust to std::vector.
10640         (skip_inline_frames): Adjust to std::vector.
10641
10642 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10643
10644         * tracepoint.h (struct trace_state_variable): Add constructor.
10645         <name>: Change type to std::string.
10646         * tracepoint.c (tsv_s): Remove.
10647         (DEF_VEC_O(tsv_s)): Remove.
10648         (tvariables): Change to std::vector.
10649         (create_trace_state_variable): Adjust to std::vector.
10650         (find_trace_state_variable): Likewise.
10651         (find_trace_state_variable_by_number): Likewise.
10652         (delete_trace_state_variable): Likewise.
10653         (trace_variable_command): Adjust to std::string.
10654         (delete_trace_variable_command): Likewise.
10655         (tvariables_info_1): Adjust to std::vector.
10656         (save_trace_state_variables): Likewise.
10657         (start_tracing): Likewise.
10658         (merge_uploaded_trace_state_variables): Adjust to std::vector
10659         and std::string.
10660         * target.h (struct target_ops)
10661         <to_download_trace_state_variable>: Pass reference to
10662         trace_state_variable.
10663         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10664         * target-delegates.c: Re-generate.
10665         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10666         (mi_tsv_deleted): Likewise.
10667         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10668         * remote.c (remote_download_trace_state_variable): Change
10669         pointer to reference and adjust.
10670         * make-target-delegates (parse_argtypes): Handle references.
10671         (write_function_header): Likewise.
10672         (munge_type): Likewise.
10673
10674 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10675
10676         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10677         string_view-selftests.c.
10678         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10679         testsuite.
10680         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10681         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10682         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10683         * unittests/basic_string_view/element_access/char/1.cc:
10684         Likewise.
10685         * unittests/basic_string_view/element_access/char/empty.cc:
10686         Likewise.
10687         * unittests/basic_string_view/element_access/char/front_back.cc:
10688         Likewise.
10689         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10690         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10691         Likewise.
10692         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10693         Likewise.
10694         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10695         Likewise.
10696         * unittests/basic_string_view/operations/compare/char/1.cc:
10697         Likewise.
10698         * unittests/basic_string_view/operations/compare/char/13650.cc:
10699         Likewise.
10700         * unittests/basic_string_view/operations/copy/char/1.cc:
10701         Likewise.
10702         * unittests/basic_string_view/operations/data/char/1.cc:
10703         Likewise.
10704         * unittests/basic_string_view/operations/find/char/1.cc:
10705         Likewise.
10706         * unittests/basic_string_view/operations/find/char/2.cc:
10707         Likewise.
10708         * unittests/basic_string_view/operations/find/char/3.cc:
10709         Likewise.
10710         * unittests/basic_string_view/operations/find/char/4.cc:
10711         Likewise.
10712         * unittests/basic_string_view/operations/rfind/char/1.cc:
10713         Likewise.
10714         * unittests/basic_string_view/operations/rfind/char/2.cc:
10715         Likewise.
10716         * unittests/basic_string_view/operations/rfind/char/3.cc:
10717         Likewise.
10718         * unittests/basic_string_view/operations/substr/char/1.cc:
10719         Likewise.
10720         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10721         * unittests/string_view-selftests.c: New file.
10722
10723 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10724
10725         * unittests/basic_string_view/capacity/1.cc: New file.
10726         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10727         * unittests/basic_string_view/cons/char/1.cc: New file.
10728         * unittests/basic_string_view/cons/char/2.cc: New file.
10729         * unittests/basic_string_view/cons/char/3.cc: New file.
10730         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10731         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10732         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10733         * unittests/basic_string_view/element_access/char/1.cc: New file.
10734         * unittests/basic_string_view/element_access/char/2.cc: New file.
10735         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10736         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10737         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10738         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10739         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10740         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10741         * unittests/basic_string_view/include.cc: New file.
10742         * unittests/basic_string_view/inserters/char/1.cc: New file.
10743         * unittests/basic_string_view/inserters/char/2.cc: New file.
10744         * unittests/basic_string_view/inserters/char/3.cc: New file.
10745         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10746         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10747         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10748         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10749         * unittests/basic_string_view/literals/types.cc: New file.
10750         * unittests/basic_string_view/literals/values.cc: New file.
10751         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10752         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10753         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10754         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10755         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10756         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10757         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10758         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10759         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10760         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10761         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10762         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10763         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10764         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10765         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10766         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10767         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10768         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10769         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10770         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10771         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10772         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10773         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10774         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10775         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10776         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10777         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10778         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10779         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10780         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10781         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10782         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10783         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10784         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10785         * unittests/basic_string_view/operators/char/2.cc: New file.
10786         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10787         * unittests/basic_string_view/range_access/char/1.cc: New file.
10788         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10789         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10790         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10791         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10792         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10793         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10794         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10795         * unittests/basic_string_view/typedefs.cc: New file.
10796         * unittests/basic_string_view/types/1.cc: New file.
10797
10798 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10799
10800         * common/gdb_string_view.h: Remove libstdc++ implementation
10801         details, adjust to gdb reality.
10802         * common/gdb_string_view.tcc: Likewise.
10803         * cli/cli-script.c (struct string_view): Remove.
10804         (user_args) <m_args>: Change element type to gdb::string_view.
10805         (user_args::insert_args): Adjust.
10806
10807 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10808
10809         * common/gdb_string_view.h: New file.
10810         * common/gdb_string_view.tcc: New file.
10811
10812 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10813
10814         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10815         * configure: Re-generate.
10816
10817 2018-04-09  Pedro Alves  <palves@redhat.com>
10818
10819         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10820         (set_target_gdbarch): Call
10821         gdb::observers::architecture_changed.notify instead of
10822         observer_notify_architecture_changed.
10823
10824 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10825
10826         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10827         (do_restore_current_traceframe_cleanup): Remove.
10828         (restore_current_traceframe_cleanup_dtor): Remove.
10829         (make_cleanup_restore_current_traceframe): Remove.
10830         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10831         New.
10832         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10833         * infrun.c (fetch_inferior_event): Use
10834         scoped_restore_current_traceframe.
10835
10836 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10837
10838         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10839         Remove.
10840         <n_allocated_type_units>: Remove.
10841         <all_type_units>: Change to std::vector.
10842         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10843         to std::vector change.
10844         (dwarf2_per_objfile::get_cutu): Likewise.
10845         (dwarf2_per_objfile::get_tu): Likewise.
10846         (create_signatured_type_table_from_index): Likewise.
10847         (create_signatured_type_table_from_debug_names): Likewise.
10848         (dw2_symtab_iter_next): Likewise.
10849         (dw2_print_stats): Likewise.
10850         (dw2_expand_all_symtabs): Likewise.
10851         (dw2_expand_marked_cus): Likewise.
10852         (dw2_debug_names_iterator::next): Likewise.
10853         (dwarf2_initialize_objfile): Likewise.
10854         (add_signatured_type_cu_to_table): Likewise.
10855         (create_all_type_units): Likewise.
10856         (add_type_unit): Likewise.
10857         (struct tu_abbrev_offset): Add constructor.
10858         (build_type_psymtabs_1): Adjust to std::vector change.
10859         (print_tu_stats): Likewise.
10860         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10861         (write_debug_names): Likewise.
10862
10863 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10864
10865         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10866         Make an std::vector.
10867         <n_comp_units>: Remove.
10868         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10869         to std::vector change.
10870         (dwarf2_per_objfile::get_cutu): Likewise.
10871         (dwarf2_per_objfile::get_cu): Likewise.
10872         (create_cus_from_index): Likewise.
10873         (create_addrmap_from_index): Likewise.
10874         (create_addrmap_from_aranges): Likewise.
10875         (dwarf2_read_index): Likewise.
10876         (dw2_find_last_source_symtab): Likewise.
10877         (dw2_map_symtabs_matching_filename): Likewise.
10878         (dw2_symtab_iter_next): Likewise.
10879         (dw2_print_stats): Likewise.
10880         (dw2_expand_all_symtabs): Likewise.
10881         (dw2_expand_symtabs_with_fullname): Likewise.
10882         (dw2_expand_marked_cus): Likewise.
10883         (dw2_map_symbol_filenames): Likewise.
10884         (create_cus_from_debug_names): Likewise.
10885         (dwarf2_read_debug_names): Likewise.
10886         (dw2_debug_names_iterator::next): Likewise.
10887         (dwarf2_initialize_objfile): Likewise.
10888         (set_partial_user): Likewise.
10889         (dwarf2_build_psymtabs_hard): Likewise.
10890         (read_comp_units_from_section): Remove arguments, adjust to
10891         std::vector change.
10892         (create_all_comp_units): Adjust to std::vector and
10893         read_comp_units_from_section changes.
10894         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10895         change.
10896         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10897         (psyms_seen_size): Likewise.
10898         (write_gdbindex): Likewise.
10899         (write_debug_names): Likewise.
10900
10901 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10902
10903         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10904         with dwarf2_per_objfile.
10905         (create_cus_from_index): Likewise.
10906         (create_signatured_type_table_from_index): Likewise.
10907         (dwarf2_read_index): Likewise.
10908         (dwarf2_initialize_objfile): Likewise.
10909         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10910         per_cu rather than get_dwarf2_per_objfile.
10911
10912 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10913
10914         * dwarf2read.h (struct signatured_type): Forward declare.
10915         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10916         New methods.
10917         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10918         (dw2_get_cutu): ...this.
10919         (dwarf2_per_objfile::get_cu): Rename from...
10920         (dw2_get_cu): ...this.
10921         (dwarf2_per_objfile::get_tu): New.
10922         (create_addrmap_from_index): Adjust.
10923         (create_addrmap_from_aranges): Adjust.
10924         (dw2_find_last_source_symtab): Adjust.
10925         (dw2_map_symtabs_matching_filename): Adjust.
10926         (dw2_symtab_iter_next): Adjust.
10927         (dw2_print_stats): Adjust.
10928         (dw2_expand_all_symtabs): Adjust.
10929         (dw2_expand_symtabs_with_fullname): Adjust.
10930         (dw2_expand_marked_cus): Adjust.
10931         (dw_expand_symtabs_matching_file_matcher): Adjust.
10932         (dw2_map_symbol_filenames): Adjust.
10933         (dw2_debug_names_iterator::next): Adjust.
10934         (dwarf2_initialize_objfile): Adjust.
10935         (set_partial_user): Adjust.
10936         (dwarf2_build_psymtabs_hard): Adjust.
10937
10938 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10939
10940         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10941         Remove unused variables.
10942         (dw2_map_symtabs_matching_filename): Likewise.
10943         (dwarf2_record_block_ranges): Likewise.
10944         (dwarf2_read_addr_index): Likewise.
10945         (follow_die_offset): Likewise.
10946
10947 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10948
10949         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10950         to symbol_file_add_main.
10951
10952 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10953
10954         PR mi/22299
10955         * mi/mi-console.c (do_fputc_async_safe): New.
10956         (mi_console_file::write_async_safe): New.
10957         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10958         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10959         New.
10960         * ui-file.c (ui_file::putstrn): Adjust call to
10961         fputstrn_unfiltered.
10962         * utils.c (printchar): Replace do_fputs and do_fprintf
10963         parameters by do_fputc.
10964         (fputstr_filtered): Adjust call to printchar.
10965         (fputstr_unfiltered): Likewise.
10966         (fputstrn_filtered): Likewise.
10967         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10968         printchar.
10969         * utils.h (do_fputc_ftype): New typedef.
10970         (fputstrn_unfiltered): Add do_fputc parameter.
10971
10972 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10973
10974         * regformats/i386/i386-avx.dat: Remove.
10975
10976 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10977
10978         PR gdb/22979
10979         * amd64-tdep.c (amd64_none_init_abi): New function.
10980         (amd64_x32_none_init_abi): New function.
10981         (_initialize_amd64_tdep): Register handlers for x86-64 and
10982         x64_32 with GDB_OSABI_NONE.
10983         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10984         GDB_OSABI_NONE osabi.
10985
10986 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10987
10988         PR gdb/22980
10989         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10990         GDB_OSABI_NONE.
10991         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10992         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10993
10994 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10995
10996         * common/byte-vector.h (char_vector): New type.
10997         * target.h (target_read_alloc): Return
10998         gdb::optional<byte_vector>.
10999         (target_read_stralloc): Return gdb::optional<char_vector>.
11000         (target_get_osdata): Return gdb::optional<char_vector>.
11001         * target.c (target_read_alloc_1): Templatize.  Replacement
11002         manual memory management with vector.
11003         (target_read_alloc): Change return type, adjust.
11004         (target_read_stralloc): Change return type, adjust.
11005         (target_get_osdata): Change return type, adjust.
11006         * auxv.c (struct auxv_info) <length>: Remove.
11007         <data>: Change type to gdb::optional<byte_vector>.
11008         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11009         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11010         (target_auxv_search): Adjust.
11011         (fprint_target_auxv): Adjust.
11012         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11013         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11014         (linux_make_corefile_notes): Adjust.
11015         * osdata.c (get_osdata): Adjust.
11016         * remote.c (remote_get_threads_with_qxfer): Adjust.
11017         (remote_memory_map): Adjust.
11018         (remote_traceframe_info): Adjust.
11019         (btrace_read_config): Adjust.
11020         (remote_read_btrace): Adjust.
11021         (remote_pid_to_exec_file): Adjust.
11022         * solib-aix.c (solib_aix_get_library_list): Adjust.
11023         * solib-dsbt.c (decode_loadmap): Don't free buf.
11024         (dsbt_get_initial_loadmaps): Adjust.
11025         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11026         * solib-target.c (solib_target_current_sos): Adjust.
11027         * tracepoint.c (sdata_make_value): Adjust.
11028         * xml-support.c (xinclude_start_include): Adjust.
11029         (xml_fetch_content_from_file): Adjust.
11030         * xml-support.h (xml_fetch_another): Change return type.
11031         (xml_fetch_content_from_file): Change return type.
11032         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11033         * xml-tdesc.c (file_read_description_xml): Adjust.
11034         (fetch_available_features_from_target): Change return type.
11035         (target_fetch_description_xml): Adjust.
11036         (target_read_description_xml): Adjust.
11037
11038 2018-04-06  Tom Tromey  <tom@tromey.com>
11039
11040         * value.c (~value): Update.
11041         (struct value) <contents>: Now unique_xmalloc_ptr.
11042         (value_contents_bits_eq, allocate_value_contents)
11043         (value_contents_raw, value_contents_all_raw)
11044         (value_contents_for_printing, value_contents_for_printing_const)
11045         (set_value_enclosing_type): Update.
11046
11047 2018-04-06  Tom Tromey  <tom@tromey.com>
11048
11049         * value.c (range_s): Remove typedef, VEC.
11050         (struct range): Add operator<.
11051         (range_lessthan): Remove.
11052         (ranges_contain): Change type.
11053         (~value): Update.
11054         (struct value) <unavailable, optimized_out>: Now std::vector.
11055         (value_entirely_available)
11056         (value_entirely_covered_by_range_vector)
11057         (value_entirely_unavailable, value_entirely_optimized_out):
11058         Update.
11059         (insert_into_bit_range_vector): Change argument type.
11060         (find_first_range_overlap): Likewise.
11061         (struct ranges_and_idx, value_contents_bits_eq)
11062         (require_not_optimized_out, require_available): Update.
11063         (ranges_copy_adjusted): Change argument types.
11064         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11065
11066 2018-04-06  Tom Tromey  <tom@tromey.com>
11067
11068         * value.c (~value): Update.
11069         (struct value) <parent>: Now a value_ref_ptr.
11070         (value_parent, set_value_parent, value_address, value_copy):
11071         Update.
11072
11073 2018-04-06  Tom Tromey  <tom@tromey.com>
11074
11075         * value.c (struct value): Add constructor, destructor, and member
11076         initializers.
11077         (allocate_value_lazy, value_decref): Update.
11078
11079 2018-04-06  Tom Tromey  <tom@tromey.com>
11080
11081         * value.c (struct value) <released, next>: Remove.
11082         (all_values): Now a std::vector.
11083         (allocate_value_lazy): Update.
11084         (value_next): Remove.
11085         (value_mark, value_free_to_mark, release_value)
11086         (value_release_to_mark): Update.
11087
11088 2018-04-06  Tom Tromey  <tom@tromey.com>
11089
11090         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11091         (free_value_chain): Remove.
11092         * value.c (free_value_chain): Remove.
11093         (value_release_to_mark): Return a std::vector.
11094         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11095         std::vector.
11096         (check_condition): Update.
11097         * eval.c (fetch_subexp_value): Change "val_chain" to a
11098         std::vector.
11099         * breakpoint.c (update_watchpoint): Update.
11100         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11101
11102 2018-04-06  Tom Tromey  <tom@tromey.com>
11103
11104         * value.h (free_all_values): Remove.
11105         * value.c (free_all_values): Remove.
11106
11107 2018-04-06  Tom Tromey  <tom@tromey.com>
11108
11109         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11110         (value_history_chain, value_history_count): Remove.
11111         (value_history): New global.
11112         (record_latest_value, access_value_history, show_values)
11113         (preserve_values): Update.
11114
11115 2018-04-06  Tom Tromey  <tom@tromey.com>
11116
11117         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11118         * varobj.c (varobj_set_display_format, varobj_set_value)
11119         (install_default_visualizer, construct_visualizer)
11120         (install_new_value, ~varobj, varobj_get_value_type)
11121         (my_value_of_variable, varobj_editable_p): Update.
11122         * c-varobj.c (c_describe_child, c_value_of_variable)
11123         (cplus_number_of_children, cplus_describe_child): Update.
11124         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11125         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11126         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11127
11128 2018-04-06  Tom Tromey  <tom@tromey.com>
11129
11130         * printcmd.c (last_examine_address): Change type to
11131         value_ref_ptr.
11132         (do_examine, x_command): Update.
11133
11134 2018-04-06  Tom Tromey  <tom@tromey.com>
11135
11136         * value.c (release_value): Update.
11137         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11138         (struct bpstats) <val>: Now a value_ref_ptr.
11139         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11140         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11141         (~watchpoint, print_it_watchpoint, watch_command_1)
11142         (invalidate_bp_value_on_memory_change): Update.
11143
11144 2018-04-06  Tom Tromey  <tom@tromey.com>
11145
11146         * varobj.c (varobj_clear_saved_item)
11147         (update_dynamic_varobj_children, install_new_value, ~varobj):
11148         Update.
11149         * value.h (value_incref): Move declaration earlier.
11150         (value_decref): Rename from value_free.
11151         (struct value_ref_policy): New.
11152         (value_ref_ptr): New typedef.
11153         (struct value_deleter): Remove.
11154         (gdb_value_up): Remove typedef.
11155         (release_value): Change return type.
11156         (release_value_or_incref): Remove.
11157         * value.c (set_value_parent): Update.
11158         (value_incref): Change return type.
11159         (value_decref): Rename from value_free.
11160         (value_free_to_mark, free_all_values, free_value_chain): Update.
11161         (release_value): Return value_ref_ptr.
11162         (release_value_or_incref): Remove.
11163         (record_latest_value, set_internalvar, clear_internalvar):
11164         Update.
11165         * stack.c (info_frame_command): Don't call value_free.
11166         * python/py-value.c (valpy_dealloc, valpy_new)
11167         (value_to_value_object): Update.
11168         * printcmd.c (do_examine): Update.
11169         * opencl-lang.c (lval_func_free_closure): Update.
11170         * mi/mi-main.c (register_changed_p): Don't call value_free.
11171         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11172         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11173         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11174         value_free.
11175         * guile/scm-value.c (vlscm_free_value_smob)
11176         (vlscm_scm_from_value): Update.
11177         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11178         (frame_unwind_register_unsigned, get_frame_register_bytes)
11179         (put_frame_register_bytes): Don't call value_free.
11180         * findvar.c (address_from_register): Don't call value_free.
11181         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11182         * dwarf2loc.c (entry_data_value_free_closure)
11183         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11184         (dwarf2_evaluate_loc_desc_full): Update.
11185         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11186         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11187         (~watchpoint, watch_command_1)
11188         (invalidate_bp_value_on_memory_change): Update.
11189         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11190
11191 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11192
11193         PR gdb/23022
11194         * warning.m4: Add -Wno-error=deprecated-register.
11195         * configure: Re-generate.
11196
11197 2018-04-05  Tom Tromey  <tom@tromey.com>
11198
11199         * linespec.h: Remove include of "vec.h".
11200
11201 2018-04-05  Tom Tromey  <tom@tromey.com>
11202
11203         * linespec.c (typep): Remove typedef.
11204         (find_methods, find_superclass_methods): Take a std::vector.
11205         (find_method): Use std::vector.
11206
11207 2018-04-05  Tom Tromey  <tom@tromey.com>
11208
11209         * utils.c (compare_strings): Remove.
11210         * utils.h (compare_strings): Remove.
11211         * objc-lang.h (find_imps): Update.
11212         * objc-lang.c (find_methods): Take a std::vector.
11213         (uniquify_strings, find_imps): Likewise.
11214         * linespec.c (find_methods): Take a std::vector.
11215         (decode_objc): Use std::vector.
11216         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11217         a std::vector.
11218         (find_method, find_function_symbols): Use std::vector.
11219
11220 2018-04-05  Tom Tromey  <tom@tromey.com>
11221
11222         * completer.c (completion_tracker::completion_tracker): Remove
11223         cast.
11224         (completion_tracker::discard_completions): Likewise.
11225         * breakpoint.c (ambiguous_names_p): Remove cast.
11226         * ada-lang.c (_initialize_ada_language): Remove cast.
11227         * utils.h (streq): Update.
11228         (streq_hash): Add new declaration.
11229         * utils.c (streq): Return bool.
11230         (streq_hash): New function.
11231
11232 2018-04-05  Tom Tromey  <tom@tromey.com>
11233
11234         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11235         Remove a string copy.
11236
11237 2018-04-05  Tom Tromey  <tom@tromey.com>
11238
11239         * linespec.c (filter_results): Use std::vector.
11240         (decode_line_2, decode_line_full): Update.
11241
11242 2018-04-05  Tom Tromey  <tom@tromey.com>
11243
11244         * linespec.c (canonical_to_fullform): Return std::string.
11245         (filter_results): Update.
11246         (struct decode_line_2_item): Add constructor.
11247         <fullform, displayform>: Now std::string.
11248         (decode_line_2_compare_items): Now a std::sort comparator.
11249         (decode_line_2): Update.
11250
11251 2018-04-05  Tom Tromey  <tom@tromey.com>
11252
11253         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11254         (unexpected_linespec_error): Update.
11255         (linespec_parse_basic, parse_linespec): Update.
11256
11257 2018-04-05  Tom Tromey  <tom@tromey.com>
11258
11259         * linespec.c (linespec_parse_basic): Reindent.
11260
11261 2018-04-05  Tom Tromey  <tom@tromey.com>
11262
11263         * minsyms.h (iterate_over_minimal_symbols): Update.
11264         * minsyms.c (iterate_over_minimal_symbols): Take a
11265         gdb::function_view.
11266         * linespec.c (struct collect_minsyms): Remove.
11267         (compare_msyms): Now a std::sort comparator.
11268         (add_minsym): Add parameters.
11269         (search_minsyms_for_name): Update.  Use std::vector.
11270
11271 2018-04-03  Tom Tromey  <tom@tromey.com>
11272
11273         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11274         gdb::byte_vector.
11275
11276 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11277
11278         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11279
11280 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11281
11282         PR gdb/16959
11283         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11284         printing static type.
11285
11286 2018-04-01  Tom Tromey  <tom@tromey.com>
11287
11288         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11289         (rs6000_xfer_shared_libraries): Update.
11290
11291 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11292
11293         * common/gdb_vecs.h (char_ptr): Remove.
11294         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11295
11296 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11297
11298         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11299         with std::vector.
11300         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11301
11302 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11303
11304         * tracepoint.h (struct uploaded_tp): Initialize fields.
11305         <actions, step_actions, cmd_strings>: Change type to
11306         std::vector<char *>.
11307         * tracepoint.c (get_uploaded_tp): Allocate with new.
11308         (free_uploaded_tps): Free with delete.
11309         (parse_tracepoint_definition): Adjust to std::vector change.
11310         * breakpoint.c (read_uploaded_action): Likewise.
11311         (create_tracepoint_from_upload): Likewise.
11312         * ctf.c (ctf_write_uploaded_tp): Likewise.
11313         (SET_ARRAY_FIELD): Likewise.
11314         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11315
11316 2018-03-30  Tom Tromey  <tom@tromey.com>
11317
11318         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11319         std::unique_ptr.
11320         (svr4_keep_data_in_core): Update.
11321         (svr4_read_so_list): Update.
11322
11323 2018-03-30  Tom Tromey  <tom@tromey.com>
11324
11325         * windows-nat.c (handle_output_debug_string, handle_exception):
11326         Update.
11327         * target.h (target_read_string): Update.
11328         * target.c (target_read_string): Change "string" to
11329         unique_xmalloc_ptr.
11330         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11331         Update.
11332         * solib-frv.c (frv_current_sos): Update.
11333         * solib-dsbt.c (dsbt_current_sos): Update.
11334         * solib-darwin.c (darwin_current_sos): Update.
11335         * linux-thread-db.c (inferior_has_bug): Update.
11336         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11337         Update.  Remove alloca.
11338         * ada-lang.c (ada_main_name): Update.
11339
11340 2018-03-30  Tom Tromey  <tom@tromey.com>
11341
11342         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11343         (struct dwo_file_deleter): New.
11344         (dwo_file_up): New typedef.
11345         (open_and_init_dwo_file): Use dwo_file_up.
11346         (free_dwo_file_cleanup): Remove.
11347
11348 2018-03-30  Tom Tromey  <tom@tromey.com>
11349
11350         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11351         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11352
11353 2018-03-30  Tom Tromey  <tom@tromey.com>
11354
11355         * dwarf2read.c (class free_cached_comp_units): New class.
11356         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11357         (free_cached_comp_units): Remove function.
11358
11359 2018-03-30  Tom Tromey  <tom@tromey.com>
11360
11361         * utils.h (make_cleanup_unpush_target): Remove.
11362         * inf-ptrace.c (struct target_unpusher): New.
11363         (target_unpush_up) New typedef.
11364         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11365         target_unpush_up.
11366         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11367
11368 2018-03-27  Tom Tromey  <tom@tromey.com>
11369
11370         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11371
11372 2018-03-27  Pedro Alves  <palves@redhat.com>
11373             Tom Tromey  <tom@tromey.com>
11374
11375         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11376         destructor.  Now a class.
11377         (gdb_readline_wrapper_cleanup): Remove function.
11378         (gdb_readline_wrapper): Remove cleanups.
11379
11380 2018-03-27  Tom Tromey  <tom@tromey.com>
11381
11382         * typeprint.h (struct type_print_options) <local_typedefs,
11383         global_typedefs>: Remove "struct" keyword.
11384         (class typedef_hash_table): New class.
11385         (recursively_update_typedef_hash, add_template_parameters)
11386         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11387         (find_typedef_in_hash): Don't declare.
11388         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11389         (typedef_hash_table::recursively_update): Rename from
11390         recursively_update_typedef_hash.  Now a member.
11391         (typedef_hash_table::add_template_parameters): Rename from
11392         add_template_parameters.  Now a member.
11393         (typedef_hash_table::typedef_hash_table): Now a constructor;
11394         rename from create_typedef_hash.
11395         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11396         rename from free_typedef_hash.
11397         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11398         (do_free_global_table): Remove.
11399         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11400         from copy_type_recursive.
11401         (create_global_typedef_table): Remove.
11402         (typedef_hash_table::find_global_typedef): Now a member of
11403         typedef_hash_table.
11404         (typedef_hash_table::find_typedef): Rename from
11405         find_typedef_in_hash; now a member.
11406         (whatis_exp): Update.
11407         * extension.h (struct ext_lang_type_printers): Add constructor and
11408         destructor.
11409         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11410         declare.
11411         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11412         Now a constructor; rename from start_ext_lang_type_printers.
11413         (ext_lang_type_printers): Now a destructor; rename from
11414         free_ext_lang_type_printers.
11415         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11416         Update.
11417         (c_type_print_base_struct_union): Update.  Remove cleanups.
11418
11419 2018-03-27  Tom Tromey  <tom@tromey.com>
11420
11421         * dwarf-index-write.c: Include <cmath>.
11422
11423 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11424
11425         * NEWS: Add entry describing new "set|show varsize-limit" command.
11426         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11427         command.
11428         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11429         "set variable".
11430
11431 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11432
11433         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11434         dwarf-index-write.c
11435         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11436         * dwarf-index-common.c: New file.
11437         * dwarf-index-common.h: New file.
11438         * dwarf-index-write.c: New file.
11439         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11440         (struct dwarf2_section_info): Move from here.
11441         (dwarf2_section_info_def): Likewise.
11442         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11443         (offset_type): Likewise.
11444         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11445         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11446         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11447         (byte_swap): Likewise.
11448         (MAYBE_SWAP): Likewise.
11449         (dwarf2_per_cu_ptr): Likewise.
11450         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11451         (struct tu_stats): Likewise.
11452         (struct dwarf2_per_objfile): Likewise.
11453         (struct dwarf2_per_cu_data): Likewise.
11454         (struct signatured_type): Likewise.
11455         (sig_type_ptr): Likewise.
11456         (DEF_VEC_P (sig_type_ptr)): Likewise.
11457         (INDEX4_SUFFIX): Likewise.
11458         (INDEX5_SUFFIX): Likewise.
11459         (DEBUG_STR_SUFFIX): Likewise.
11460         (dwarf2_read_section): Make non-static.
11461         (mapped_index_string_hash): Move from here.
11462         (dwarf5_djb_hash): Likewise.
11463         (file_write): Likewise.
11464         (class data_buf): Likewise.
11465         (struct symtab_index_entry): Likewise.
11466         (struct mapped_symtab): Likewise.
11467         (find_slot): Likewise.
11468         (hash_expand): Likewise.
11469         (add_index_entry): Likewise.
11470         (uniquify_cu_indices): Likewise.
11471         (class c_str_view): Likewise.
11472         (class c_str_view_hasher): Likewise.
11473         (class vector_hasher): Likewise.
11474         (write_hash_table): Likewise.
11475         (psym_index_map): Likewise.
11476         (struct addrmap_index_data): Likewise.
11477         (add_address_entry): Likewise.
11478         (add_address_entry_worker): Likewise.
11479         (write_address_map): Likewise.
11480         (symbol_kind): Likewise.
11481         (write_psymbols): Likewise.
11482         (struct signatured_type_index_data): Likewise.
11483         (write_one_signatured_type): Likewise.
11484         (recursively_count_psymbols): Likewise.
11485         (recursively_write_psymbols): Likewise.
11486         (class debug_names): Likewise.
11487         (check_dwarf64_offsets): Likewise.
11488         (psyms_seen_size): Likewise.
11489         (write_gdbindex): Likewise.
11490         (write_debug_names): Likewise.
11491         (assert_file_size): Likewise.
11492         (write_psymtabs_to_index): Likewise.
11493         (save_gdb_index_command): Likewise.
11494         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11495         command.
11496         * dwarf2read.h: New file.
11497
11498 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11499
11500         PR gdb/22670
11501         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11502         symbol name if the CU's language stores symbol names in linkage
11503         format.
11504         * language.h (struct language_defn)
11505         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11506         all instances of this struct.
11507
11508 2018-03-26  Tom Tromey  <tom@tromey.com>
11509
11510         * stack.c (backtrace_command_1): Remove verbose code.
11511
11512 2018-03-26  Tom Tromey  <tom@tromey.com>
11513
11514         * python/py-framefilter.c (py_print_type): Don't catch
11515         exceptions.  Return void.
11516         (py_print_value): Likewise.
11517         (py_print_single_arg): Likewise.
11518         (enumerate_args): Don't catch exceptions.
11519         (py_print_args): Likewise.
11520         (py_print_frame): Likewise.
11521         (gdbpy_apply_frame_filter): Catch exceptions here.
11522
11523 2018-03-26  Tom Tromey  <tom@tromey.com>
11524
11525         * stack.c (_initialize_stack): Remove trailing newlines from help
11526         text.  Add "Usage" line to "backtrace" help.
11527
11528 2018-03-26  Tom Tromey  <tom@tromey.com>
11529
11530         PR python/16486:
11531         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11532
11533 2018-03-26  Tom Tromey  <tom@tromey.com>
11534
11535         * python/py-framefilter.c (py_print_single_arg): Return
11536         EXT_LANG_BT_ERROR from catch.
11537
11538 2018-03-26  Tom Tromey  <tom@tromey.com>
11539
11540         PR backtrace/15584:
11541         * stack.c (backtrace_command_1): Move some code into no-filters
11542         "if".
11543
11544 2018-03-26  Tom Tromey  <tom@tromey.com>
11545
11546         * python/py-framefilter.c (throw_quit_or_print_exception): New
11547         function.
11548         (gdbpy_apply_frame_filter): Use it.
11549
11550 2018-03-26  Tom Tromey  <tom@tromey.com>
11551
11552         PR cli/17716:
11553         * python/py-framefilter.c (py_print_type, py_print_value)
11554         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11555         RETURN_MASK_ERROR.
11556
11557 2018-03-26  Tom Tromey  <tom@tromey.com>
11558
11559         * python/py-framefilter.c (enumerate_args): Use
11560         gdb::unique_xmalloc_ptr.
11561
11562 2018-03-26  Tom Tromey  <tom@tromey.com>
11563
11564         * python/py-framefilter.c (py_print_frame): Return
11565         EXT_LANG_BT_OK.
11566         (gdbpy_apply_frame_filter): Update comment.
11567         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11568         Remove.
11569         <EXT_LANG_BT_NO_FILTERS>: Change value.
11570
11571 2018-03-26  Tom Tromey  <tom@tromey.com>
11572
11573         PR backtrace/15582:
11574         * stack.c (backtrace_command): Parse "hide" argument.
11575         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11576         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11577         constant.
11578
11579 2018-03-26  Tom Tromey  <tom@tromey.com>
11580
11581         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11582         add "flags".
11583         (backtrace_command): Remove "fulltrace", add "flags".
11584
11585 2018-03-26  Tom Tromey  <tom@tromey.com>
11586
11587         * stack.c (backtrace_command): Rewrite command line parsing.
11588
11589 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11590
11591         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11592
11593 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11594
11595         * filename-seen-cache.h: Add include guard.
11596
11597 2018-03-26  Keith Seitz  <keiths@redhat.com>
11598
11599         * symfile.c (place_section): Remove "struct" from section_addr_info
11600         in comment.
11601         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11602         "struct" keyword from section_addr_info.
11603
11604 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11605
11606         * regformats/regdef.h (reg): Add constructors.
11607
11608 2018-03-25  Pedro Alves  <palves@redhat.com>
11609
11610         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11611         if then/else bodies in var_func_name extraction.
11612
11613 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11614
11615         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11616         lookup_minimal_symbol() to find symbol entry.
11617         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11618
11619 2018-03-23  Keith Seitz  <keiths@redhat.com>
11620
11621         PR c++/22968
11622         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11623         nested type definitions for C++, too.
11624
11625 2018-03-23  Tom Tromey  <tom@tromey.com>
11626
11627         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11628         a typedef.
11629         (macho_register_oso): Remove.
11630         (macho_symtab_read): Take a std::vector.
11631         (oso_el_compare_name): Now a std::sort comparator.
11632         (macho_symfile_read_all_oso): Take a std::vector.
11633         (macho_symfile_read): Use std::vector.  Remove cleanups.
11634
11635 2018-03-22  Tom Tromey  <tom@tromey.com>
11636
11637         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11638         (record_full_goto_bookmark): Use std::string.
11639
11640 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11641
11642         PR tdep/18295
11643         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11644         a single mask.
11645
11646 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11647
11648         * rs6000-tdep.c (store_insn_p): New function.
11649         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11650         and cr_reg to their unshifted values. Use store_insn_p to
11651         match LR saves using either R1 or fdata->alloca_reg. Use
11652         store_insn_p to match CR saves. Set alloca_reg_offset
11653         when alloca_reg and framep are set. Remove lr_reg shift
11654         when assigning to fdata->lr_register.
11655
11656 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11657
11658         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11659         command line args instead of emitting a warning.
11660
11661 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11662
11663         * tracepoint.h (struct static_tracepoint_marker): Initialize
11664         fields, define default constructor, move constructor and move
11665         assignment, disable the rest.
11666         <str_id, extra>: Make std::string.
11667         (release_static_tracepoint_marker): Remove.
11668         (free_current_marker): Remove.
11669         * tracepoint.c (free_current_marker): Remove.
11670         (parse_static_tracepoint_marker_definition): Adjust to
11671         std::string, use new hex2str overload.
11672         (release_static_tracepoint_marker): Remove.
11673         (print_one_static_tracepoint_marker): Get marker by reference
11674         and adjust to std::string.
11675         (info_static_tracepoint_markers_command): Adjust to std::vector
11676         changes
11677         * target.h (static_tracepoint_marker_p): Remove typedef.
11678         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11679         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11680         bool.
11681         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11682         * target-debug.h
11683         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11684         (target_debug_print_std_vector_static_tracepoint_marker): New.
11685         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11686         to...
11687         (target_debug_print_static_tracepoint_marker_p): ... this.
11688         * target-delegates.c: Re-generate.
11689         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11690         Make std::string.
11691         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11692         (decode_static_tracepoint_spec): Adjust to std::vector.
11693         (tracepoint_print_one_detail): Adjust to std::string.
11694         (strace_marker_decode_location): Adjust to std::string.
11695         (update_static_tracepoint): Adjust to std::string, remove call
11696         to release_static_tracepoint_marker.
11697         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11698         Adjust to std::vector.
11699         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11700         (remote_static_tracepoint_markers_by_strid): Adjust to
11701         std::vector.
11702         * common/rsp-low.h (hex2str): New overload with explicit count
11703         of bytes.
11704         * common/rsp-low.c (hex2str): New overload with explicit count
11705         of bytes.
11706         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11707         (_initialize_rsp_low_selftests): Add test_hex2str test.
11708         * unittests/tracepoint-selftests.c
11709         (test_parse_static_tracepoint_marker_definition): Adjust to
11710         std::string.
11711
11712 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11713
11714         * tracepoint.c (parse_static_tracepoint_marker_definition):
11715         Consider case where the definition is followed by more
11716         definitions.
11717         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11718         tracepoint-selftests.c.
11719         * unittests/tracepoint-selftests.c: New.
11720
11721 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11722
11723         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11724         Carvalho.
11725
11726 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11727
11728         * symtab.c (find_pc_sect_line): fixed indentation.
11729
11730 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11731
11732         * symtab.c (find_pc_sect_line): now uses binary search.
11733
11734 2018-03-19  Tom Tromey  <tom@tromey.com>
11735
11736         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11737         "IDENT" production.
11738
11739 2018-03-19  Pedro Alves  <palves@redhat.com>
11740             Tom Tromey  <tom@tromey.com>
11741
11742         * unittests/observable-selftests.c: New file.
11743         * common/observable.h: New file.
11744         * observable.h: New file.
11745         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11746         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11747         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11748         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11749         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11750         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11751         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11752         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11753         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11754         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11755         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11756         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11757         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11758         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11759         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11760         tui/tui-interp.c, valops.c: Update all users.
11761         * tui/tui-hooks.c (tui_bp_created_observer)
11762         (tui_bp_deleted_observer, tui_bp_modified_observer)
11763         (tui_inferior_exit_observer, tui_before_prompt_observer)
11764         (tui_normal_stop_observer, tui_register_changed_observer):
11765         Remove.
11766         (tui_observers_token): New global.
11767         (attach_or_detach, tui_attach_detach_observers): New functions.
11768         (tui_install_hooks, tui_remove_hooks): Use
11769         tui_attach_detach_observers.
11770         * record-btrace.c (record_btrace_thread_observer): Remove.
11771         (record_btrace_thread_observer_token): New global.
11772         * observer.sh: Remove.
11773         * observer.c: Rename to observable.c.
11774         * observable.c (namespace gdb_observers): Define new objects.
11775         (observer_debug): Move into gdb_observers namespace.
11776         (struct observer, struct observer_list, xalloc_observer_list_node)
11777         (xfree_observer_list_node, generic_observer_attach)
11778         (generic_observer_detach, generic_observer_notify): Remove.
11779         (_initialize_observer): Update.
11780         Don't include observer.inc.
11781         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11782         (clean mostlyclean): Likewise.
11783         (observer.h, observer.inc): Remove targets.
11784         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11785         (COMMON_SFILES): Use observable.c, not observer.c.
11786         * .gitignore: Remove observer.h.
11787
11788 2018-03-18  Tom Tromey  <tom@tromey.com>
11789
11790         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11791         gdb::def_vector.
11792         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11793
11794 2018-03-17  Tom Tromey  <tom@tromey.com>
11795
11796         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11797
11798 2018-03-17  Tom Tromey  <tom@tromey.com>
11799
11800         * target.c (class scoped_target_fd): New.
11801         (target_fileio_close_cleanup): Remove.
11802         (target_fileio_read_alloc_1): Use scoped_target_fd.
11803
11804 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11805
11806         * silent-rules.mk: New.
11807         * Makefile.in: Include silent-rules.mk
11808         (srcdir, VPATH, top_srcdir): Move up.
11809         (COMPILE): Add ECHO_CXX.
11810         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11811         (init.c): Add ECHO_INIT_C.
11812         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11813         (version.c): Add ECHO_GEN.
11814         (printcmd.o): Add ECHO_CXX.
11815         (target-float.o): Add ECHO_CXX.
11816         (ada-exp.o): Add ECHO_CXX.
11817         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11818         (insight$(EXEEXT)): Add ECHO_CXXLD.
11819         * gnulib/configure.ac: Add AM_SILENT_RULES.
11820         * gnulib/aclocal.m4: Re-generate.
11821         * gnulib/configure: Re-generate.
11822         * gnulib/import/Makefile.in: Re-generate.
11823
11824 2018-03-16  Tom Tromey  <tom@tromey.com>
11825
11826         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11827         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11828         * utils.c (do_free_section_addr_info)
11829         (make_cleanup_free_section_addr_info): Remove.
11830         * symfile.h (struct other_sections): Add constructor.
11831         (struct section_addr_info): Remove.
11832         (section_addr_info): New typedef.
11833         (struct sym_fns) <sym_offsets>: Change type of parameter.
11834         (build_section_addr_info_from_objfile)
11835         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11836         (default_symfile_offsets, symbol_file_add)
11837         (symbol_file_add_from_bfd)
11838         (build_section_addr_info_from_section_table): Update.
11839         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11840         * symfile.c (alloc_section_addr_info): Remove.
11841         (build_section_addr_info_from_section_table): Change return type.
11842         Update.
11843         (build_section_addr_info_from_bfd)
11844         (build_section_addr_info_from_objfile): Likewise.
11845         (free_section_addr_info): Remove.
11846         (relative_addr_info_to_section_offsets): Change type of "addrs".
11847         (addrs_section_compar): Now a std::sort comparator.
11848         (addrs_section_sort): Change return type.
11849         (addr_info_make_relative): Change type of "addrs".  Update.
11850         (default_symfile_offsets, syms_from_objfile_1)
11851         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11852         (symbol_file_add_separate): Update.
11853         (symbol_file_add): Change type of "addrs".  Update.
11854         (add_symbol_file_command): Update.  Remove cleanups.
11855         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11856         cleanups.
11857         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11858         * solib.c (solib_read_symbols): Update.
11859         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11860         * machoread.c (macho_symfile_offsets): Update.
11861         * jit.c (jit_bfd_try_read_symtab): Update.
11862
11863 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11864
11865         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11866         unittests/utils-selftests.c.
11867         * unittests/utils-selftests.c: New file.
11868
11869 2018-03-14  Tom Tromey  <tom@tromey.com>
11870
11871         PR cli/14977:
11872         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11873         for NULL.
11874
11875 2018-03-14  Tom Tromey  <tom@tromey.com>
11876
11877         PR cli/19918:
11878         * printcmd.c (printf_pointer): Allow "-" in format.
11879
11880 2018-03-14  Tom Tromey  <tom@tromey.com>
11881
11882         * printcmd.c (_initialize_printcmd): Add usage to printf.
11883
11884 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11885
11886         * MAINTAINERS: Update my email address.
11887
11888 2018-03-13  Tom Tromey  <tom@tromey.com>
11889
11890         * machoread.c (macho_check_dsym): Change filenamep to a
11891         std::string*.
11892         (macho_symfile_read): Update.
11893         * symfile.c (load_command): Use std::string.
11894
11895 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11896
11897         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11898         to error message string.
11899         (riscv_register_name): Use xsnprintf instead of sprintf.
11900         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11901         internal_error.
11902         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11903         error.
11904         (riscv_push_dummy_call): Likewise.
11905
11906 2018-03-12  Tom Tromey  <tom@tromey.com>
11907
11908         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11909         Use gdb::byte_vector.
11910         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11911
11912 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11913
11914         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11915         parameter type to readable_regcache.
11916         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11917         the declaration.
11918
11919 2018-03-11  Tom Tromey  <tom@tromey.com>
11920
11921         * dwarf2read.c (struct nextfield): Add initializers.
11922         (struct nextfnfield): Remove.
11923         (struct fnfieldlist): Add initializers.  Remove "length" and
11924         "head", use std::vector.
11925         (struct decl_field_list): Remove.
11926         (struct field_info): Add initializers.
11927         <fields, baseclasses>: Now std::vector.
11928         <nbaseclasses, nfnfields, typedef_field_list_count,
11929         nested_types_list_count>: Remove.
11930         (dwarf2_add_field, dwarf2_add_type_defn)
11931         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11932         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11933         (process_structure_scope): Update.
11934
11935 2018-03-11  Tom Tromey  <tom@tromey.com>
11936
11937         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11938         for use by std::sort.
11939         (build_type_psymtabs_1): Use std::vector.
11940
11941 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11942
11943         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11944         and LIBMPFR in the printed configuration.
11945
11946 2018-03-08  Tom Tromey  <tom@tromey.com>
11947
11948         * source.c (get_filename_and_charpos): Use scoped_fd.
11949         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11950         (procfs_pidlist): Likewise.
11951         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11952         (iterate_over_mappings): Likewise.
11953
11954 2018-03-08  Tom Tromey  <tom@tromey.com>
11955
11956         * infcall.c (struct call_return_meta_info)
11957         <stack_temporaries_enabled>: Remove.
11958         (get_call_return_value, call_function_by_hand_dummy): Update.
11959         * thread.c (disable_thread_stack_temporaries): Remove.
11960         (enable_thread_stack_temporaries): Remove.
11961         (thread_stack_temporaries_enabled_p): Return bool.
11962         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11963         (get_last_thread_stack_temporary): Update.
11964         * eval.c (evaluate_subexp): Update.
11965         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11966         class, not a function.
11967         (value_ptr, value_vec): Remove typedefs.
11968         (class thread_info) <stack_temporaries_enabled>: Now bool.
11969         <stack_temporaries>: Now a std::vector.
11970         (thread_stack_temporaries_enabled_p)
11971         (value_in_thread_stack_temporaries): Return bool.
11972
11973 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11974
11975         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11976         (getpkt_or_notif_sane_1): Likewise.
11977
11978 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11979
11980         * build-id.c (build_id_to_debug_bfd): Use std::string.
11981
11982 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11983
11984         * build-id.c (find_separate_debug_file_by_buildid): Return
11985         std::string.
11986         * build-id.h (find_separate_debug_file_by_buildid): Return
11987         std::string.
11988         * coffread.c (coff_symfile_read): Adjust to std::string.
11989         * elfread.c (elf_symfile_read): Adjust to std::string.
11990         * symfile.c (separate_debug_file_exists): Change parameter to
11991         std::string.
11992         (find_separate_debug_file): Return std::string.
11993         (find_separate_debug_file_by_debuglink): Return std::string.
11994         * symfile.h (find_separate_debug_file_by_debuglink): Return
11995         std::string.
11996
11997 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11998
11999         * common/xml-utils.c (xml_escape_text): Move code to...
12000         (xml_escape_text_append): ... this new function.
12001         * common/xml-utils.h (xml_escape_text_append): New declaration.
12002         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12003         New function.
12004         (_initialize_xml_utils): register test_xml_escape_text_append as
12005         a selftest.
12006
12007 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12008
12009         * defs.h: Remove MAX_REGISTER_SIZE.
12010         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12011         asserts.
12012         * python/py-unwind.c (pyuw_sniffer): Likewise.
12013
12014 2018-03-07  Tom Tromey  <tom@tromey.com>
12015
12016         * linux-tdep.c (linux_info_proc): Update.
12017         * target.h (struct target_ops) <to_fileio_readlink>: Return
12018         optional<string>.
12019         (target_fileio_readlink): Return optional<string>.
12020         * remote.c (remote_hostio_readlink): Return optional<string>.
12021         * inf-child.c (inf_child_fileio_readlink): Return
12022         optional<string>.
12023         * target.c (target_fileio_readlink): Return optional<string>.
12024
12025 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12026
12027         * regcache.c (cooked_read_test): Add riscv to the list of
12028         architectures that have a save_reggroup.
12029
12030 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12031
12032         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12033         value is not a dynamic class object.
12034
12035 2018-03-06  Tom Tromey  <tom@tromey.com>
12036
12037         * rust-exp.y: Formatting fixes.
12038
12039 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12040
12041         * riscv-tdep.c (riscv_register_name): Remove target description
12042         support.
12043         (riscv_gdbarch_init): Remove target description check.
12044
12045 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12046
12047         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12048         comment.
12049         * riscv-tdep.h: Likewise.
12050
12051 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12052
12053         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12054         (riscv_pseudo_register_write): Delete.
12055         (riscv_gdbarch_init): Remove all use of pseudo registers.
12056
12057 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12058
12059         * record-btrace.c (btrace_print_lines): Replace cleanup
12060         parameter with RAII equivalents.
12061         (btrace_insn_history): Replace cleanup with RAII equivalents.
12062         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12063         make_cleanup_ui_out_tuple_begin_end): Remove.
12064         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12065         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12066         make_cleanup_ui_out_list_begin_end): Remove.
12067
12068 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12069
12070         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12071         parameter types to std::vector.  Use bool.
12072         (record_btrace_wait): Replace VEC(tp_t) with
12073         std::vector<thread_info *>.
12074         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12075
12076 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12077
12078         * record-btrace.c (record_btrace_disable_callback): Remove.
12079         (struct scoped_btrace_disable): New.
12080         (record_btrace_open): Use scoped_btrace_disable.
12081
12082 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12083
12084         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12085         reading values from registers.
12086
12087 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12088
12089         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12090         where appropriate.
12091
12092 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12093
12094         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12095         change parameter type.  Use GDB's print functions, and use
12096         core_addr_to_string where appropriate.
12097         (riscv_push_dummy_call): Use core_addr_to_string where
12098         appropriate, update call to riscv_print_arg_location, and reindent
12099         a few lines.
12100         (riscv_return_value): Update call to riscv_print_arg_location.
12101
12102 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12103             Tim Newsome <tim@sifive.com>
12104             Albert Ou <a0u@eecs.berkeley.edu>
12105             Darius Rad <darius@bluespec.com>
12106
12107         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12108         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12109         (ALLDEPFILES): Add riscv-tdep.c
12110         * configure.tgt: Add riscv support.
12111         * riscv-tdep.c: New file.
12112         * riscv-tdep.h: New file.
12113         * NEWS: Mention new target.
12114         * MAINTAINERS: Add entry for riscv.
12115
12116 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12117
12118         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12119         fields within aggregates.
12120
12121 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12122
12123         * record-btrace.c (btrace_print_lines): Change type of flags to
12124         gdb_disassembly_flags.
12125
12126 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12127
12128         * fbsd-nat.c: Include "inf-ptrace.h".
12129         (USE_SIGTRAP_SIGINFO): Conditionally define.
12130         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12131         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12132         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12133         function.
12134         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12135         Likewise.
12136         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12137         Likewise.
12138         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12139         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12140         "supports_stopped_by_hw_breakpoint" target methods.
12141
12142 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12143
12144         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12145         * fbsd-nat.c (debug_fbsd_nat): New variable.
12146         (show_fbsd_nat_debug): New function.
12147         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12148         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12149
12150 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12151
12152         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12153         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12154         prototype.
12155         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12156         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12157         method.
12158
12159 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12160
12161         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12162         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12163
12164 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12165
12166         * charset.c (struct charset_vector): New.
12167         (charsets): Change type to charset_vector.
12168         (find_charset_names): Adjust.
12169         (add_one): Adjust.
12170         (_initialize_charset): Adjust.
12171
12172 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12173
12174         * progspace.h (struct program_space) <deleted_solibs>: Change
12175         type to std::vector<std::string>.
12176         * progspace.c (clear_program_space_solib_cache): Adjust.
12177         * breakpoint.c (print_solib_event): Adjust.
12178         (check_status_catch_solib): Adjust.
12179         * solib.c (update_solib_list): Adjust.
12180         * ui-out.h (class ui_out) <field_string>: New overload.
12181         * ui-out.c (ui_out::field_string): New overload.
12182
12183 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12184
12185         * progspace.h (struct program_space): Add constructor and
12186         destructor, initialize fields.
12187         (add_program_space): Remove.
12188         * progspace.c (add_program_space): Rename to...
12189         (program_space::program_space): ... this.
12190         (release_program_space): Rename to...
12191         (program_space::~program_space): ... this.
12192         (delete_program_space): Use delete to delete program_space.
12193         (initialize_progspace): Use new to allocate program_space.
12194         * inferior.c (add_inferior_with_spaces): Likewise.
12195         (clone_inferior_command): Likewise.
12196         * infrun.c (follow_fork_inferior): Likewise.
12197         (handle_vfork_child_exec_or_exit): Likewise.
12198
12199 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12200
12201         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12202         (delim_string_to_char_ptr_vec): Return std::vector of
12203         gdb::unique_xmalloc_ptr.
12204         (dirnames_to_char_ptr_vec_append): Take std::vector of
12205         gdb::unique_xmalloc_ptr.
12206         (dirnames_to_char_ptr_vec): Return std::vector of
12207         gdb::unique_xmalloc_ptr.
12208         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12209         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12210         (delim_string_to_char_ptr_vec): Return an std::vector of
12211         gdb::unique_xmalloc_ptr, adjust the code.
12212         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12213         gdb::unique_xmalloc_ptr, adjust the code.
12214         (dirnames_to_char_ptr_vec): Return an std::vector of
12215         gdb::unique_xmalloc_ptr, adjust the code.
12216         * auto-load.c (auto_load_safe_path_vec): Change type to
12217         std::vector of gdb::unique_xmalloc_ptr.
12218         (auto_load_expand_dir_vars): Return an std::vector of
12219         gdb::unique_xmalloc_ptr, adjust the code.
12220         (auto_load_safe_path_vec_update): Adjust.
12221         (filename_is_in_auto_load_safe_path_vec): Adjust.
12222         (auto_load_objfile_script_1): Adjust.
12223         * build-id.c (build_id_to_debug_bfd): Adjust.
12224         * linux-thread-db.c (thread_db_load_search): Adjust.
12225         * source.c (add_path): Adjust.
12226         (openp): Adjust.
12227         * symfile.c (find_separate_debug_file): Adjust.
12228         * utils.c (do_free_char_ptr_vec): Remove.
12229         (make_cleanup_free_char_ptr_vec): Remove.
12230
12231 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12232
12233         PR gdb/22907
12234         * common/pathstuff.c: Conditionally include "<windows.h>".
12235
12236 2018-03-01  Georg Sauthoff  <mail@georg.so>
12237
12238         PR gdb/22888
12239         * gcore.in: Quote variables and switch interpreter to bash.
12240
12241 2018-03-01  Tom Tromey  <tom@tromey.com>
12242
12243         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12244         assertion.  Add assertion for discriminant_index.
12245         (quirk_rust_enum): Use correct base type name in univariant case.
12246
12247 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12248
12249         * record.c (get_call_history_modifiers): Return a
12250         record_print_flags.
12251         (cmd_record_call_history): Adjust.
12252         * record-btrace.c (record_btrace_call_history): Adjust.
12253         (record_btrace_call_history_range): Adjust.
12254         (record_btrace_call_history_from): Adjust.
12255         * target-debug.h (target_debug_print_record_print_flags): New.
12256         * target-delegates.c: Re-generate.
12257         * target.c (target_call_history): Change flags type.
12258         (target_call_history_from): Likewise.
12259         (target_call_history_range): Likewise.
12260         * target.h (struct target_ops) <target_call_history>: Likewise.
12261         (target_call_history_from): Likewise.
12262         (target_call_history_range): Likewise.
12263
12264 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12265             Simon Marchi  <simon.marchi@polymtl.ca>
12266
12267         * common/common-utils.c: Include "sys/stat.h".
12268         (is_regular_file): Move here from "source.c"; change return
12269         type to "bool".
12270         * common/common-utils.h (is_regular_file): New prototype.
12271         * common/pathstuff.c (contains_dir_separator): New function.
12272         * common/pathstuff.h (contains_dir_separator): New prototype.
12273         * source.c: Don't include "sys/stat.h".
12274         (is_regular_file): Move to "common/common-utils.c".
12275
12276 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12277
12278         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12279         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12280         * auto-load.c: Include "common/pathstuff.h".
12281         * common/common-def.h (current_directory): Move here.
12282         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12283         function.
12284         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12285         prototype.
12286         * common/pathstuff.c: New file.
12287         * common/pathstuff.h: New file.
12288         * compile/compile.c: Include "common/pathstuff.h".
12289         * defs.h (current_directory): Move to "common/common-defs.h".
12290         * dwarf2read.c: Include "common/pathstuff.h".
12291         * exec.c: Likewise.
12292         * guile/scm-safe-call.c: Likewise.
12293         * linux-thread-db.c: Likewise.
12294         * main.c: Likewise.
12295         * nto-tdep.c: Likewise.
12296         * objfiles.c: Likewise.
12297         * source.c: Likewise.
12298         * symtab.c: Likewise.
12299         * utils.c: Include "common/pathstuff.h".
12300         (gdb_realpath): Move to "common/pathstuff.c".
12301         (gdb_realpath_keepfile): Likewise.
12302         (gdb_abspath): Likewise.
12303         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12304         (gdb_realpath_keepfile): Likewise.
12305         (gdb_abspath): Likewise.
12306
12307 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12308
12309         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12310         wildcard process pid for super_resume for kernels with a
12311         specific bug.
12312
12313 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12314
12315         * compile/compile.c (get_args): Add additional comments
12316         explaining function.
12317
12318 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12319             Tom Tromey  <tom@tromey.com>
12320
12321         * target.h (memory_write_request_s): Remove typedef.  Don't define
12322         VEC.
12323         (target_write_memory_blocks): Change argument to std::vector.
12324         (struct memory_write_request): Add constructor.
12325         * target-memory.c (compare_block_starting_address): Return bool.
12326         Change argument types.
12327         (claim_memory): Change arguments to use std::vector.
12328         (split_regular_and_flash_blocks, blocks_to_erase)
12329         (compute_garbled_blocks): Likewise.
12330         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12331         (target_write_memory_blocks): Change argument to std::vector.
12332         * symfile.c (struct load_section_data): Add constructor and
12333         destructor.  Use std::vector for "requests".
12334         (struct load_progress_data): Add initializers.
12335         (load_section_callback): Update.  Use "new".
12336         (clear_memory_write_data): Remove.
12337         (generic_load): Update.
12338
12339 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12340
12341         * arch/aarch64.h: Use common/tdesc.h.
12342
12343 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12344
12345         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12346         architecture with a 64-bit ABI.
12347
12348 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12349
12350         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12351         ahead of target description loading.
12352
12353 2018-02-26  Tom Tromey  <tom@tromey.com>
12354
12355         * stack.c (backtrace_command_1): Update.
12356         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12357         of "flags".
12358         * python/py-framefilter.c (py_print_frame)
12359         (gdbpy_apply_frame_filter): Change type of "flags".
12360         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12361         of "flags".
12362         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12363         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12364         * extension.h (enum frame_filter_flag): Rename from
12365         frame_filter_flags.
12366         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12367         (apply_ext_lang_frame_filter): Change type of "flags".
12368         * extension.c (apply_ext_lang_frame_filter): Change type of
12369         "flags".
12370         * extension-priv.h (struct extension_language_ops)
12371         <apply_frame_filter>: Change type of "flags".
12372
12373 2018-02-26  Tom Tromey  <tom@tromey.com>
12374
12375         PR python/16497:
12376         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12377         off-by-one in py_end computation.
12378         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12379         PRINT_MORE_FRAMES.
12380         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12381         constant.
12382
12383 2018-02-26  Tom Tromey  <tom@tromey.com>
12384
12385         * dwarf2read.c (struct variant_field): New.
12386         (struct nextfield) <variant>: New field.
12387         (dwarf2_add_field): Handle DW_TAG_variant_part.
12388         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12389         discriminated union.
12390         (read_structure_type): Handle DW_TAG_variant_part.
12391         (handle_struct_member_die): New function, extracted from
12392         process_structure_scope.  Handle DW_TAG_variant.
12393         (process_structure_scope): Handle discriminated unions.  Call
12394         handle_struct_member_die.
12395
12396 2018-02-26  Tom Tromey  <tom@tromey.com>
12397
12398         * rust-lang.h (rust_last_path_segment): Declare.
12399         * rust-lang.c (rust_last_path_segment): Now public.  Change
12400         contract.
12401         (struct disr_info): Remove.
12402         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12403         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12404         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12405         (rust_enum_p, rust_enum_variant): New function.
12406         (rust_underscore_fields): Remove "offset" parameter.
12407         (rust_print_enum): New function.
12408         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12409         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12410         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12411         enums.
12412         (rust_internal_print_type): New function, from rust_print_type.
12413         Remove enum code.
12414         (rust_print_type): Call rust_internal_print_type.
12415         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12416         Update enum handling.
12417         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12418         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12419         (rust_union_quirks): New functions.
12420         (process_full_comp_unit, process_full_type_unit): Call
12421         rust_union_quirks.
12422         (process_structure_scope): Update rust_unions if necessary.
12423
12424 2018-02-26  Tom Tromey  <tom@tromey.com>
12425
12426         * value.h (value_union_variant): Declare.
12427         * valops.c (value_union_variant): New function.
12428         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12429         (struct discriminant_info): New.
12430         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12431         enumerator.
12432         (struct main_type) <flag_discriminated_union>: New field.
12433
12434 2018-02-26  Tom Tromey  <tom@tromey.com>
12435
12436         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12437         unittests/unpack-selftests.c.
12438         * unittests/unpack-selftests.c: New file.
12439         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12440
12441 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12442
12443         * dwarf2read.c (struct partial_die_info) <read>: New method.
12444         (read_partial_die): Remove the declaration.
12445         (load_partial_dies): Update.
12446         (partial_die_info::partial_die_info):
12447         (read_partial_die): Change it to partial_die_info::read.
12448
12449 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12450
12451         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12452         (fixup_partial_die): Remove declaration.
12453         (scan_partial_symbols): Update.
12454         (partial_die_parent_scope): Likewise.
12455         (partial_die_full_name): Likewise.
12456         (fixup_partial_die): Change it to partial_die_info::fixup.
12457
12458 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12459
12460         * dwarf2read.c (read_partial_die): Update the declaration.
12461         (load_partial_dies): Caller update.
12462         (read_partial_die): Remove one argument abbrev_len.
12463
12464 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12465
12466         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12467         assignment operator.
12468         (load_partial_dies): Use ctor and copy ctor.
12469         (read_partial_die): Update.
12470         (dwarf2_cu::find_partial_die): Use ctor.
12471
12472 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12473
12474         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12475         (find_partial_die_in_comp_unit): Change it to
12476         dwarf2_cu::find_partial_die.
12477         (find_partial_die): Update.
12478
12479 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12480
12481         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12482         is NULL.
12483
12484 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12485
12486         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12487
12488 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12489
12490         * arch/amd64.h: Use common/tdesc.h.
12491         * arch/i386.c: Likewise.
12492         * arch/i386.h: Likewise.
12493         * arch/tic6x.c: Likewise.
12494         * arch/tdesc.h: Move file from here...
12495         * common/tdesc.h: ...to here.
12496         * features/aarch64-core.c: Regenerate.
12497         * features/aarch64-fpu.c: Regenerate.
12498         * features/i386/32bit-avx.c: Regenerate.
12499         * features/i386/32bit-avx512.c: Regenerate.
12500         * features/i386/32bit-core.c: Regenerate.
12501         * features/i386/32bit-linux.c: Regenerate.
12502         * features/i386/32bit-mpx.c: Regenerate.
12503         * features/i386/32bit-pkeys.c: Regenerate.
12504         * features/i386/32bit-sse.c: Regenerate.
12505         * features/i386/64bit-avx.c: Regenerate.
12506         * features/i386/64bit-avx512.c: Regenerate.
12507         * features/i386/64bit-core.c: Regenerate.
12508         * features/i386/64bit-linux.c: Regenerate.
12509         * features/i386/64bit-mpx.c: Regenerate.
12510         * features/i386/64bit-pkeys.c: Regenerate.
12511         * features/i386/64bit-segments.c: Regenerate.
12512         * features/i386/64bit-sse.c: Regenerate.
12513         * features/i386/x32-core.c: Regenerate.
12514         * features/tic6x-c6xp.c: Regenerate.
12515         * features/tic6x-core.c: Regenerate.
12516         * features/tic6x-gp.c: Regenerate.
12517         * target-descriptions.c: Use common/tdesc.h.
12518         * target-descriptions.h: Likewise.
12519
12520 2018-02-24  Tom Tromey  <tom@tromey.com>
12521
12522         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12523         (try_thread_db_load_from_dir, thread_db_load_search): Use
12524         std::string.
12525         (info_auto_load_libthread_db_compare): Return bool.  Change
12526         argument types.
12527         (info_auto_load_libthread_db): Use std::vector, std::string.
12528         Remove cleanups.
12529
12530 2018-02-24  Tom Tromey  <tom@tromey.com>
12531
12532         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12533         std::string.
12534         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12535         std::string*.
12536         * gdbarch.c: Rebuild.
12537         * gdbarch.h: Rebuild.
12538         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12539         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12540         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12541         std::string*.
12542
12543 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12544
12545         * gdbtypes.h (sect_offset): Change type to uint64_t.
12546         (sect_offset_str): New function.
12547         * dwarf2read.c (create_addrmap_from_aranges): Use
12548         sect_offset_str.
12549         (error_check_comp_unit_head): Likewise.
12550         (create_debug_type_hash_table): Likewise.
12551         (read_cutu_die_from_dwo): Likewise.
12552         (init_cutu_and_read_dies): Likewise.
12553         (init_cutu_and_read_dies_no_follow): Likewise.
12554         (process_psymtab_comp_unit_reader): Likewise.
12555         (partial_die_parent_scope): Likewise.
12556         (peek_die_abbrev): Likewise.
12557         (process_queue): Likewise.
12558         (dwarf2_physname): Likewise.
12559         (read_namespace_alias): Likewise.
12560         (read_import_statement): Likewise.
12561         (create_dwo_cu_reader): Likewise.
12562         (create_cus_hash_table): Likewise.
12563         (lookup_dwo_cutu): Likewise.
12564         (inherit_abstract_dies): Likewise.
12565         (read_func_scope): Likewise.
12566         (read_call_site_scope): Likewise.
12567         (dwarf2_add_member_fn): Likewise.
12568         (read_common_block): Likewise.
12569         (read_module_type): Likewise.
12570         (read_typedef): Likewise.
12571         (read_subrange_type): Likewise.
12572         (load_partial_dies): Likewise.
12573         (read_partial_die): Likewise.
12574         (find_partial_die): Likewise.
12575         (read_str_index): Likewise.
12576         (dwarf2_string_attr): Likewise.
12577         (build_error_marker_type): Likewise.
12578         (lookup_die_type): Likewise.
12579         (dump_die_shallow): Likewise.
12580         (follow_die_ref): Likewise.
12581         (dwarf2_fetch_die_loc_sect_off): Likewise.
12582         (dwarf2_fetch_constant_bytes): Likewise.
12583         (follow_die_sig): Likewise.
12584         (get_signatured_type): Likewise.
12585         (get_DW_AT_signature_type): Likewise.
12586         (dwarf2_find_containing_comp_unit): Likewise.
12587         (set_die_type): Likewise.
12588
12589 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12590
12591         * arch/aarch64.c: Include "common-defs.h".
12592         * arch/amd64.c: Likewise.
12593         * arch/i386.c: Likewise.
12594
12595 2018-02-21  Tom Tromey  <tom@tromey.com>
12596
12597         * value.h: (extract_field_op): Update.
12598         * eval.c (extract_field_op): Return a const char *.
12599         * expression.h (parse_expression_for_completion): Update.
12600         * completer.c (complete_expression): Update.
12601         (add_struct_fields): Make fieldname const.
12602         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12603         (mark_completion_tag, parse_exp_in_context_1): Update.
12604         (parse_expression_for_completion): Change "name" to
12605         unique_xmalloc_ptr*.
12606
12607 2018-02-21  Tom Tromey  <tom@tromey.com>
12608
12609         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12610
12611 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12612
12613         * avr-tdep.c (avr_read_pc): Change parameter type to
12614         readable_regcache.
12615         * gdbarch.sh (read_pc): Likewise.
12616         * gdbarch.c: Re-generated.
12617         * gdbarch.h: Re-generated.
12618         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12619         readable_regcache.
12620         * ia64-tdep.c (ia64_read_pc): Likewise.
12621         * mips-tdep.c (mips_read_pc): Likewise.
12622         * spu-tdep.c (spu_read_pc): Likewise.
12623
12624 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12625
12626         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12627         * regcache-dump.c: New file.
12628         * regcache.c: Move register_dump to regcache-dump.c.
12629         (maintenance_print_registers): Likewise.
12630         (maintenance_print_raw_registers): Likewise.
12631         (maintenance_print_cooked_registers): Likewise.
12632         (maintenance_print_register_groups): Likewise.
12633         (maintenance_print_remote_registers): Likewise.
12634         (_initialize_regcache): Likewise.
12635         * regcache.h (register_dump): Moved from regcache.c.
12636
12637 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12638
12639         * regcache.c (regcache::regcache): Update.
12640         (regcache::invalidate): Move it to detached_regcache::invalidate.
12641         (get_thread_arch_aspace_regcache): Update.
12642         (regcache::raw_update): Update.
12643         (regcache::cooked_read): Remove some code.
12644         (regcache::cooked_read_value): Likewise.
12645         (regcache::raw_write): Remove assert on m_readonly_p.
12646         (regcache::raw_supply_integer): Move it to
12647         detached_regcache::raw_supply_integer.
12648         (regcache::raw_supply_zeroed): Likewise.
12649         * regcache.h (detached_regcache) <raw_supply_integer>: New
12650         declaration.
12651         <raw_supply_zeroed, invalidate>: Likewise.
12652         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12653         <invalidate>: Likewise.
12654         <m_readonly_p>: Removed.
12655
12656 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12657
12658         * infcmd.c (get_return_value): Let stop_regs point to
12659         get_current_regcache.
12660         * regcache.c (regcache::regcache): Remove.
12661         (register_dump_reg_buffer): New class.
12662         (regcache_print): Adjust.
12663         * regcache.h (regcache): Remove constructors.
12664
12665 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12666
12667         * regcache.c (class register_dump): New class.
12668         (register_dump_regcache, register_dump_none): New class.
12669         (register_dump_remote, register_dump_groups): New class.
12670         (regcache_print): Update.
12671         * regcache.h (regcache_dump_what): Move it to regcache.c.
12672         (regcache) <dump>: Remove.
12673
12674 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12675
12676         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12677          reg_buffer_rw *.
12678         (jit_unwind_reg_set_impl): Call raw_supply.
12679         (jit_frame_sniffer): Use reg_buffer_rw.
12680         * record-full.c (record_full_core_regbuf): Change its type.
12681         (record_full_core_open_1): Use reg_buffer_rw.
12682         (record_full_close): Likewise.
12683         (record_full_core_fetch_registers): Use regcache->raw_supply.
12684         (record_full_core_store_registers): Likewise.
12685         * regcache.c (regcache::get_register_status): Move it to
12686         reg_buffer.
12687         (regcache_raw_set_cached_value): Remove.
12688         (regcache::raw_set_cached_value): Remove.
12689         (regcache::raw_write): Call raw_supply.
12690         (regcache::raw_supply): Move it to reg_buffer_rw.
12691         * regcache.h (regcache_raw_set_cached_value): Remove.
12692         (reg_buffer_rw): New class.
12693
12694 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12695
12696         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12697         readonly_detached_regcache.
12698         (dummy_frame_prev_register): Use regcache->cooked_read.
12699         * frame.c (frame_save_as_regcache): Change return type.
12700         (frame_pop): Update.
12701         * frame.h (frame_save_as_regcache): Update declaration.
12702         * inferior.h (get_infcall_suspend_state_regcache): Update
12703         declaration.
12704         * infrun.c (infcall_suspend_state) <registers>: use
12705         readonly_detached_regcache.
12706         (save_infcall_suspend_state): Don't use regcache_dup.
12707         (get_infcall_suspend_state_regcache): Change return type.
12708         * linux-fork.c (struct fork_info) <savedregs>: Change to
12709         readonly_detached_regcache.
12710         <pc>: New field.
12711         (fork_save_infrun_state): Don't use regcache_dup.
12712         (info_checkpoints_command): Adjust.
12713         * mi/mi-main.c (register_changed_p): Update declaration.
12714         (mi_cmd_data_list_changed_registers): Use
12715         readonly_detached_regcache.
12716         (register_changed_p): Change parameter type to
12717         readonly_detached_regcache.
12718         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12719         readonly_detached_regcache.
12720         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12721         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12722         New.
12723         (regcache::save): Move it to reg_buffer.
12724         (regcache::restore): Change parameter type.
12725         (regcache_dup): Remove.
12726         * regcache.h (reg_buffer) <save>: New method.
12727         (readonly_detached_regcache): New class.
12728         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12729         readonly_detached_regcache.
12730         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12731
12732 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12733
12734         * frame.c (frame_save_as_regcache): Use regcache method save.
12735         (frame_pop): Use regcache method restore.
12736         * infrun.c (restore_infcall_suspend_state): Likewise.
12737         * linux-fork.c (fork_load_infrun_state): Likewise.
12738         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12739         save.
12740         * regcache.c (regcache_save): Remove.
12741         (regcache::restore): More asserts.
12742         (regcache_cpy): Remove.
12743         * regcache.h (regcache_save): Remove the declaration.
12744         (regcache::restore): Move from private to public.
12745         Remove the friend declaration of regcache_cpy.
12746         (regcache_cpy): Remove declaration.
12747
12748 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12749
12750         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12751         parameter type to 'readable_regcache *'.
12752         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12753         * arm-tdep.c (arm_neon_quad_read): Likewise.
12754         (arm_pseudo_read): Likewise.
12755         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12756         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12757         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12758         * gdbarch.c: Re-generated.
12759         * gdbarch.h: Re-generated.
12760         * gdbarch.sh (pseudo_register_read): Change parameter type to
12761         'readable_regcache *'.
12762         (pseudo_register_read_value): Likewise.
12763         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12764         (h8300_pseudo_register_read): Likewise.
12765         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12766         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12767         (i386_pseudo_register_read_into_value): Likewise.
12768         (i386_pseudo_register_read_value): Likewise.
12769         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12770         declaration.
12771         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12772         * m32c-tdep.c (m32c_raw_read): Likewise.
12773         (m32c_read_flg): Likewise.
12774         (m32c_banked_register): Likewise.
12775         (m32c_banked_read): Likewise.
12776         (m32c_sb_read): Likewise.
12777         (m32c_part_read): Likewise.
12778         (m32c_cat_read): Likewise.
12779         (m32c_r3r2r1r0_read): Likewise.
12780         (m32c_pseudo_register_read): Likewise.
12781         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12782         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12783         (mep_pseudo_cr64_read): Likewise.
12784         (mep_pseudo_register_read): Likewise.
12785         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12786         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12787         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12788         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12789         (regcache::cooked_read): Likewise.
12790         (regcache::cooked_read_value): Likewise.
12791         (regcache_cooked_read_signed):
12792         (regcache::cooked_read): Likewise.
12793         * regcache.h (readable_regcache): New class.
12794         (regcache): Inherit readable_regcache.  Move some methods to
12795         readable_regcache.
12796         * rl78-tdep.c (rl78_pseudo_register_read): Change
12797         parameter type to 'readable_regcache *'.
12798         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12799         (e500_pseudo_register_read): Change parameter type to
12800         'readable_regcache *'.
12801         (dfp_pseudo_register_read): Likewise.
12802         (vsx_pseudo_register_read): Likewise.
12803         (efpr_pseudo_register_read): Likewise.
12804         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12805         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12806         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12807         (sh64_pseudo_register_read): Likewise.
12808         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12809         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12810         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12811         (spu_pseudo_register_read): Likewise.
12812         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12813         (xtensa_pseudo_register_read): Likewise.
12814
12815 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12816
12817         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12818         (regcache::arch): Move it to reg_buffer::arch.
12819         (regcache::register_buffer): Likewise.
12820         (regcache::assert_regnum): Likewise.
12821         (regcache::num_raw_registers): Likewise.
12822         * regcache.h (reg_buffer): New class.
12823         (regcache): Inherit reg_buffer.
12824
12825 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12826
12827         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12828         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12829
12830 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12831
12832         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12833
12834 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12835
12836         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12837         (SFILES): Remove common/*.c files.
12838         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12839         * common/common.host: Add common reference.
12840         * configure.ac: Likewise.
12841         * configure: Regenerate.
12842
12843 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12844
12845         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12846         (block_initialize_namespace): Use new.
12847         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12848         (dwarf2_free_objfile): Use delete.
12849         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12850         (copy_type_recursive): Use new.
12851         * gdb_obstack.h (allocate_on_obstack): New.
12852
12853 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12854
12855         PR gdb/22849
12856         * inferior.c (exit_inferior_1): Reset inf->control.
12857
12858 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12859
12860         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12861         declaration.
12862
12863 2018-02-14  Pedro Alves  <palves@redhat.com>
12864
12865         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12866         frame_cleanup_after_sniffer on exception.
12867
12868 2018-02-14  Tom Tromey  <tom@tromey.com>
12869
12870         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12871         const.
12872         (solib_bfd_open): Make pathname const.
12873         * solib.c (solib_bfd_open): Make pathname const.
12874         * solib-spu.c (spu_bfd_fopen): Make name const.
12875         (spu_bfd_open): Make pathname const.
12876         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12877         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12878
12879 2018-02-14  Tom Tromey  <tom@tromey.com>
12880
12881         * symfile.c (symfile_bfd_open): Update.
12882         * source.h (openp, source_full_path_of, find_and_open_source):
12883         Change argument type to unique_xmalloc_ptr.
12884         * source.c (openp): Take a unique_xmalloc_ptr.
12885         (source_full_path_of, find_and_open_source): Likewise.
12886         (open_source_file, symtab_to_fullname): Update.
12887         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12888         unique_xmalloc_ptr.
12889         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12890         (exec_file_find): Update.
12891         * psymtab.c (psymtab_to_fullname): Update.
12892         * nto-tdep.h (nto_find_and_open_solib): Update.
12893         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12894         unique_xmalloc_ptr.
12895         * exec.c (exec_file_attach): Update.
12896         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12897         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12898
12899 2018-02-14  Tom Tromey  <tom@tromey.com>
12900
12901         * solib.c: Include source.h.
12902         * nto-tdep.c: Include source.h.
12903         * mi/mi-cmd-env.c: Include source.h.
12904         * infcmd.c: Include source.h.
12905         * exec.c: Include source.h.
12906         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12907         (add_path, directory_switch, source_path, init_source_path): Move
12908         declarations...
12909         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12910         (add_path, directory_switch, source_path, init_source_path):
12911         ...here.
12912
12913 2018-02-14  Tom Tromey  <tom@tromey.com>
12914
12915         * solist.h (exec_file_find, solib_find): Return
12916         unique_xmalloc_ptr.
12917         (solib_bfd_fopen): Take a const char *.
12918         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12919         (exec_file_find, solib_find): Likewise.
12920         (solib_bfd_fopen): Do not take ownership of "pathname".
12921         (solib_bfd_open): Use unique_xmalloc_ptr.
12922         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12923         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12924         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12925         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12926
12927 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12928
12929         * ada-lang.c (name_match_type_from_name): Remove reference to
12930         ada_name_for_lookup in function's documentation.
12931         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12932
12933 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12934
12935         * defs.h (enum openp_flags): New enum.
12936         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12937         Move to enum openp_flags.
12938         (openp_flags): New enum flags.
12939         (openp): Change parameter type to openp_flags.
12940         * source.c (openp): Change parameter type to openp_flags.
12941         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12942         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12943
12944 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12945
12946         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12947         per-command.
12948
12949 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12950
12951         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12952         into...
12953         (class dwarf2_queue_guard): ...the destructor of this new class.
12954         (dw2_do_instantiate_symtab): Create instance of the new class
12955         dwarf2_queue_guard, remove cleanup.
12956
12957 2018-02-09  Tom Tromey  <tom@tromey.com>
12958
12959         * source.c (find_source_lines): Don't reference past the end of
12960         the vector.
12961
12962 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12963
12964         * remote.c (remote_btrace_maybe_reopen): Change error message.
12965         * btrace.c (btrace_enable): Likewise.
12966         (parse_xml_btrace): Likewise.
12967         (parse_xml_btrace_conf): Likewise.
12968
12969 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12970
12971         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12972         (linux_enable_pt, linux_enable_bts): Call
12973         diagnose_perf_event_open_fail.
12974
12975 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12976
12977         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12978         Remove parameter and change return type.  Update callers.  Move it.
12979         (linux_enable_bts, linux_enable_pt): Improve error message.
12980         (linux_enable_pt): Remove zero buffer size check.
12981         (linux_enable_btrace): Improve error messages.  Remove NULL return
12982         check.
12983
12984 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12985
12986         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12987         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12988         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12989         (linux_supports_pt, linux_supports_btrace): Remove.
12990         (linux_enable_bts): Call cpu_supports_bts.
12991         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12992         * remote.c (remote_supports_btrace): Remove.
12993         (init_remote_ops): Remove remote_supports_btrace.
12994         * target-delegates.c: Regenerated.
12995         * target.c (target_supports_btrace): Remove.
12996         * target.h (target_ops) <to_supports_btrace>: Remove
12997         (target_supports_btrace): Remove.
12998         * x86-linux-nat.c (x86_linux_create_target): Remove
12999         linux_supports_btrace.
13000
13001 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13002
13003         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13004         btrace failed.
13005         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13006         exception and use message in own exception.
13007
13008 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13009
13010         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13011         (perf_event_pt_event_type): Use gdb_file_up.
13012         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13013         scoped_fd, and scoped_mmap.
13014
13015 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13016
13017         * common/scoped_mmap.h: New.
13018         * unittests/scoped_mmap-selftest.c: New.
13019         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13020         unittests/scoped_mmap-selftest.c.
13021
13022 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13023
13024         * common/scoped_fd.h: New.
13025         * unittests/scoped_fd-selftest.c: New.
13026         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13027         unittests/scoped_fd-selftest.c.
13028
13029 2018-02-09  Tom Tromey  <tom@tromey.com>
13030
13031         * auto-load.c (auto_load_section_scripts): Use
13032         gdb::unique_xmalloc_ptr.
13033
13034 2018-02-09  Tom Tromey  <tom@tromey.com>
13035
13036         * auto-load.c (execute_script_contents): Use std::string.
13037
13038 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13039
13040         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13041         Python function, rather than a new command.
13042
13043 2018-02-08  Tom Tromey  <tom@tromey.com>
13044
13045         * solib.c (solib_find_1): Use std::string.
13046         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13047
13048 2018-02-08  Tom Tromey  <tom@tromey.com>
13049
13050         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13051
13052 2018-02-08  Tom Tromey  <tom@tromey.com>
13053
13054         * source.c (find_source_lines): Use gdb::def_vector.
13055
13056 2018-02-08  Tom Tromey  <tom@tromey.com>
13057
13058         * macrocmd.c (struct temporary_macro_definition): New.
13059         (macro_define_command): Use temporary_macro_definition.  Remove
13060         cleanups.
13061         (free_macro_definition_ptr): Remove.
13062
13063 2018-02-08  Tom Tromey  <tom@tromey.com>
13064
13065         * macroexp.c (maybe_expand): Use std::string.
13066
13067 2018-02-08  Tom Tromey  <tom@tromey.com>
13068
13069         * macroexp.c (struct macro_buffer): Add initializers for some
13070         members.
13071         (init_buffer, init_shared_buffer, free_buffer)
13072         (free_buffer_return_text): Remove.
13073         (macro_buffer): New constructors.
13074         (~macro_buffer): New destructor.
13075         (macro_buffer::set_shared): New method.
13076         (macro_buffer::resize_buffer, macro_buffer::appendc)
13077         (macro_buffer::appendmem): Now methods, not free functions.
13078         (set_token, append_tokens_without_splicing, stringify)
13079         (macro_stringify): Update.
13080         (gather_arguments): Change return type.  Remove argc_p argument,
13081         add args_ptr argument.  Use std::vector.
13082         (substitute_args): Remove argc argument.  Accept std::vector.
13083         (expand): Update.  Use std::vector.
13084         (scan, macro_expand, macro_expand_next): Update.
13085
13086 2018-02-08  Tom Tromey  <tom@tromey.com>
13087
13088         * symtab.c (default_collect_symbol_completion_matches_break_on):
13089         Use unique_xmalloc_ptr.
13090         * macroscope.h: (sal_macro_scope, user_macro_scope)
13091         (default_macro_scope): Return unique_xmalloc_ptr.
13092         * macroscope.c (sal_macro_scope, user_macro_scope)
13093         (default_macro_scope): Return unique_xmalloc_ptr.
13094         * macroexp.h (macro_expand, macro_expand_once): Return
13095         unique_xmalloc_ptr.
13096         * macroexp.c (macro_expand, macro_expand_once): Return
13097         unique_xmalloc_ptr.
13098         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13099         (info_macro_command, info_macros_command): Use
13100         unique_xmalloc_ptr.
13101         * compile/compile-c-support.c (write_macro_definitions): Use
13102         unique_xmalloc_ptr.
13103         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13104
13105 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13106
13107         * value.c (value_static_field): Assign field type instead of
13108         containing type when returning an optimized out value.
13109
13110 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13111
13112         * ft32-tdep.c (ft32_read_pc): Remove.
13113         (ft32_write_pc): Remove.
13114         (ft32_gdbarch_init): Update.
13115         * m32r-tdep.c (m32r_read_pc): Remove.
13116         (m32r_gdbarch_init): Update.
13117         * mep-tdep.c (mep_read_pc): Remove.
13118         (mep_gdbarch_init): Update.
13119         * microblaze-tdep.c (microblaze_write_pc): Remove.
13120         (microblaze_gdbarch_init): Update.
13121         * mn10300-tdep.c (mn10300_read_pc): Remove.
13122         (mn10300_write_pc): Remove.
13123         (mn10300_gdbarch_init): Update.
13124         * moxie-tdep.c (moxie_read_pc): Remove.
13125         (moxie_write_pc): Remove.
13126         (moxie_gdbarch_init): Update.
13127
13128 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13129
13130         * expprint.c (print_subexp_standard): Handle
13131         OP_F77_UNDETERMINED_ARGLIST.
13132         (dump_subexp_body_standard): Likewise.
13133
13134 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13135
13136         * target-descriptions.c (tdesc_element_visitor) Add empty
13137         implementations.
13138         (tdesc_type): Move make_gdb_type from here.
13139         (tdesc_type_builtin): Likewise.
13140         (tdesc_type_vector): Likewise.
13141         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13142         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13143         (make_gdb_type_union): Likewise.
13144         (make_gdb_type_flags): Likewise.
13145         (make_gdb_type_enum): Likewise.
13146         (make_gdb_type): New function.
13147         (tdesc_register_type): Use static make_gdb_type.
13148
13149 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13150
13151         * infcmd.c (default_print_one_register_info): Align natural-format
13152         column values consistently one under another.
13153         (pad_to_column): New function.
13154
13155 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13156
13157         * dwarf2read.c (dwarf2_physname): Move commment.
13158
13159 2018-02-01  Leszek Swirski  <leszeks@google.com>
13160
13161         * varobj.c (varobj_formatted_print_options): Allow recursive
13162         pretty printing if pretty printing is enabled.
13163
13164 2018-02-01  Leszek Swirski  <leszeks@google.com>
13165
13166         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13167         names after a structop as a filename.
13168
13169 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13170
13171         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13172         (arm_record_coproc_data_proc): Likewise.
13173
13174 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13175
13176         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13177
13178 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13179
13180         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13181         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13182
13183 2018-01-31  Pedro Alves  <palves@redhat.com>
13184
13185         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13186         * inflow.c (child_terminal_save_inferior): Wrap reference to
13187         tcgetpgrp in HAVE_TERMIOS_H.
13188         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13189         _WIN32.
13190         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13191         always iterate over all inferiors.
13192         (gdbsim_cntrl_c): Adjust.
13193         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13194
13195 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13196
13197         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13198         index type is objfile-owned if the element type is as well.
13199
13200 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13201
13202         GDB 8.1 released.
13203
13204 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13205
13206         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13207         "features/s390x-linux64.c".
13208         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13209         s390_linux32 and s390x_linux64.
13210         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13211         default tdesc.
13212         * s390-tdep.c: Include "features/s390-linux32.c" and
13213         "features/s390x-linux64.c".
13214         (s390_tdesc_valid): Add check for tdesc_has_registers.
13215         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13216         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13217         tdesc_s390x_linux64.
13218         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13219         tdesc_s390x_linux64 to...
13220         * s390-tdep.h: ...here.
13221
13222 2018-01-30  Pedro Alves  <palves@redhat.com>
13223
13224         PR gdb/13211
13225         * config.in, configure: Regenerate.
13226         * configure.ac: Check for getpgid.
13227         * go32-nat.c (go32_pass_ctrlc): New.
13228         (go32_target): Install it.
13229         * inf-child.c (inf_child_target): Install
13230         child_terminal_save_inferior, child_pass_ctrlc and
13231         child_interrupt.
13232         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13233         (inf_ptrace_target): No longer install it.
13234         * infcmd.c (interrupt_target_1): Adjust.
13235         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13236         (child_interrupt): Declare.
13237         (inferior::terminal_state): New.
13238         * inflow.c (struct terminal_info): Update comments.
13239         (inferior_process_group): Delete.
13240         (terminal_is_ours): Delete.
13241         (gdb_tty_state): New.
13242         (child_terminal_init): Adjust.
13243         (is_gdb_terminal, sharing_input_terminal_1)
13244         (sharing_input_terminal): New functions.
13245         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13246         Set the process's actual process group in the foreground if
13247         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13248         mark terminal as the inferior's if not sharing GDB's terminal.
13249         Don't check attach_flag.
13250         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13251         pass down a target_terminal_state.
13252         (child_terminal_save_inferior): New, factored out from ...
13253         (child_terminal_ours_1): ... this.  Handle
13254         target_terminal_state::is_ours_for_output.
13255         (child_interrupt, child_pass_ctrlc): New.
13256         (inflow_inferior_exit): Clear the inferior's terminal_state.
13257         (copy_terminal_info): Copy the inferior's terminal state.
13258         (_initialize_inflow): Remove reference to terminal_is_ours.
13259         * inflow.h (inferior_process_group): Delete.
13260         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13261         * procfs.c (procfs_target): Don't install procfs_interrupt.
13262         (procfs_interrupt): Delete.
13263         * remote.c (remote_serial_quit_handler): Adjust.
13264         (remote_interrupt): Remove ptid parameter.  Adjust.
13265         * target-delegates.c: Regenerate.
13266         * target.c: Include "terminal.h".
13267         (target_terminal::terminal_state): Rename to ...
13268         (target_terminal::m_terminal_state): ... this.
13269         (target_terminal::init): Adjust.
13270         (target_terminal::inferior): Adjust to per-inferior
13271         terminal_state.
13272         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13273         (target_terminal::ours, target_terminal::ours_for_output): Use
13274         target_terminal_is_ours_kind.
13275         (target_interrupt): Remove ptid parameter.  Adjust.
13276         (default_target_pass_ctrlc): Adjust.
13277         * target.h (target_ops::to_terminal_save_inferior): New field.
13278         (target_ops::to_interrupt): Remove ptid_t parameter.
13279         (target_interrupt): Remove ptid_t parameter.  Update comment.
13280         (target_pass_ctrlc): Update comment.
13281         * target/target.h (target_terminal_state): New scoped enum,
13282         factored out of ...
13283         (target_terminal::terminal_state): ... here.
13284         (target_terminal::inferior): Update comments.
13285         (target_terminal::restore_inferior): New.
13286         (target_terminal::is_inferior, target_terminal::is_ours)
13287         (target_terminal::is_ours_for_output): Adjust.
13288         (target_terminal::scoped_restore_terminal_state): Adjust to
13289         rename, and call restore_inferior() instead of inferior().
13290         (target_terminal::scoped_restore_terminal_state::m_state): Change
13291         type.
13292         (target_terminal::terminal_state): Rename to ...
13293         (target_terminal::m_terminal_state): ... this and change type.
13294
13295 2018-01-30  Pedro Alves  <palves@redhat.com>
13296
13297         * linux-nat.c (wait_for_signal): New function.
13298         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13299         directly.
13300         (async_terminal_is_ours)
13301         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13302         (linux_nat_add_target): Don't override
13303         to_terminal_inferior/to_terminal_ours.
13304
13305 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13306
13307         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13308
13309 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13310
13311         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13312         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13313         dwarf2_per_objfile_free here.
13314         (dwarf2_per_objfile_free): Remove.
13315         (_initialize_dwarf2_read): Don't register
13316         dwarf2_per_objfile_free as a registry cleanup.
13317
13318 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13319
13320         Avoid compilation errors in MinGW native builds
13321
13322         The error is triggered by including python-internal.h, and the
13323         error message is:
13324
13325              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13326                       from build-gnulib/import/math.h:27,
13327                       from d:/usr/Python26/include/pyport.h:235,
13328                       from d:/usr/Python26/include/Python.h:58,
13329                       from python/python-internal.h:94,
13330                       from python/py-arch.c:24:
13331              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13332         using ::hypot;
13333                 ^~~~~
13334
13335         This happens because Python headers define 'hypot' to expand t
13336         '_hypot' in the Windows builds.
13337         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13338         'hypoth'.  This avoids a compilation error.
13339
13340 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13341
13342         * MAINTAINERS (Write After Approval): Fix ordering.
13343
13344 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13345
13346         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13347
13348 2018-01-26  Alan Modra  <amodra@gmail.com>
13349
13350         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13351         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13352         Remove nop.  Make const.  Comment.
13353         (powerpc32_plt_stub_so_2): New.
13354         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13355         Correct count.  Update uses.
13356         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13357         Move common code reading PLT entry word.  Correct
13358         powerpc32_plt_stub PLT address calculation.
13359         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13360         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13361         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13362         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13363         (ppc64_standard_linkage8): Likewise.
13364         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13365         Correct insns description.
13366         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13367
13368 2018-01-24  Pedro Alves  <palves@redhat.com>
13369
13370         GCC PR libstdc++/83906
13371         * gdbtypes.c (operator==(const dynamic_prop &,
13372         const dynamic_prop &)): New.
13373         (operator==(const range_bounds &, const range_bounds &)): New.
13374         (check_types_equal): Use them instead of memcmp.
13375         * gdbtypes.h (operator==(const dynamic_prop &,
13376         const dynamic_prop &)): Declare.
13377         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13378         (operator==(const range_bounds &, const range_bounds &)): Declare.
13379         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13380
13381 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13382
13383         * s390-linux-tdep.c (s390_record_address_mask)
13384         (s390_record_calc_disp_common, s390_record_calc_disp)
13385         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13386         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13387         (s390_process_record): Move to s390-tdep.c.
13388         (s390_linux_init_abi_any): Adjust.
13389         * s390-tdep.c (s390_record_address_mask)
13390         (s390_record_calc_disp_common, s390_record_calc_disp)
13391         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13392         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13393         (s390_process_record): Moved from s390-linux-tdep.c
13394         (s390_gdbarch_init): Adjust.
13395
13396 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13397
13398         * s390-linux-nat.c (s390-tdep.h): New include.
13399         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13400         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13401         (ALLDEPFILES): Add s390-tdep.c.
13402         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13403         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13404         * s390-tdep.h: ...this.  New file.
13405         * s390-linux-tdep.c (s390-tdep.h): New include.
13406         (_initialize_s390_tdep): Rename to...
13407         (_initialize_s390_linux_tdep): ...this and adjust.
13408         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13409         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13410         s390-tdep.h.
13411         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13412         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13413         (s390_is_partial_instruction, s390_software_single_step)
13414         (is_non_branch_ril, s390_displaced_step_copy_insn)
13415         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13416         (s390_prologue_data, s390_addr, s390_store, s390_load)
13417         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13418         (s390_register_call_saved, s390_guess_tracepoint_registers)
13419         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13420         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13421         (s390_pseudo_register_name, s390_pseudo_register_type)
13422         (s390_pseudo_register_read, s390_pseudo_register_write)
13423         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13424         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13425         (s390_addr_bits_remove, s390_address_class_type_flags)
13426         (s390_address_class_type_flags_to_name)
13427         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13428         (s390_function_arg_float, s390_function_arg_vector)
13429         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13430         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13431         (s390_frame_align, s390_register_return_value, s390_return_value)
13432         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13433         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13434         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13435         (s390_trad_frame_prev_register, s390_unwind_cache)
13436         (s390_prologue_frame_unwind_cache)
13437         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13438         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13439         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13440         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13441         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13442         (s390_frame_base_address, s390_local_base_address)
13443         (s390_frame_base, s390_gcc_target_options)
13444         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13445         (s390_validate_reg_range, s390_tdesc_valid)
13446         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13447         * s390-tdep.c: ...this.  New file.
13448
13449 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13450
13451         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13452         (s390_process_record, s390_gdbarch_tdep_alloc)
13453         (s390_linux_init_abi_any): Use/set new hook.
13454
13455 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13456
13457         * s390-linux-tdep.c (osabi.h): New include.
13458         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13459         (s390_linux_init_abi_any): New functions.
13460         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13461
13462 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13463
13464         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13465         tdesc_has_registers check
13466
13467 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13468
13469         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13470         (s390_validate_reg_range): New macro.
13471         (s390_gdbarch_init): Adjust.
13472
13473 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13474
13475         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13476         (s390_gdbarch_tdep_alloc): Adjust.
13477         (s390_gdbarch_init): Adjust.
13478
13479 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13480
13481         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13482         <have_tdb>: Change type to bool.
13483         (s390_gdbarch_tdep_alloc): Adjust.
13484         (s390_gdbarch_init): Adjust.
13485
13486 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13487
13488         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13489         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13490         (s390_gdbarch_tdep_alloc): New function.
13491         (s390_gdbarch_init): Allocate tdep at start and use its fields
13492         instead of separate variables.
13493
13494 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13495
13496         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13497         when looking for cached gdbarch and add comment for remaining.
13498
13499 2018-01-22  Pedro Alves  <palves@redhat.com>
13500             Sergio Durigan Junior  <sergiodj@redhat.com>
13501
13502         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13503         case.
13504
13505 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13506
13507         * MAINTAINERS: Update my company e-mail address.
13508
13509 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13510
13511         * regcache.c (cooked_write_test): New function.
13512         (_initialize_regcache): Register the test.
13513
13514 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13515
13516         * ia64-tdep.c (ia64_pseudo_register_read): Call
13517         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13518         * m32c-tdep.c (m32c_cat_read): Likewise.
13519         (m32c_r3r2r1r0_read): Likewise.
13520         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13521         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13522
13523 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13524
13525         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13526         method raw_read instead of regcache_raw_read.
13527         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13528         * arm-tdep.c (arm_neon_quad_read): Likewise.
13529         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13530         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13531         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13532         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13533         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13534         (i386_pseudo_register_read_into_value): Likewise.
13535         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13536         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13537         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13538         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13539         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13540         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13541         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13542         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13543         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13544
13545 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13546
13547         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13548         * configure.tgt: Remove target mt.
13549         * mt-tdep.c: Remove.
13550         * regcache.c (cooked_read_test): Remove the check for mt.
13551
13552 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13553
13554         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13555         instead of gdbarch_pseudo_register_read_value.
13556
13557 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13558
13559         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13560         language is Ada.
13561
13562 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13563
13564         * linespec.c (create_sals_line_offset): Remove code that preserved
13565         the symtab_and_line's line number.
13566
13567 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13568
13569         * varobj.c (varobj_create): Don't set valid_block when creating a
13570         floating varobj.
13571
13572 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13573
13574         * varobj.c (varobj_create): Remove out of date comment.
13575
13576 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13577
13578         PR mi/20395
13579         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13580         updating innermost block.
13581         * parse.c (innermost_block_tracker::update): Take extra type
13582         parameter, and check types match before updating innermost block.
13583         (write_dollar_variable): Update innermost block for registers.
13584         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13585         (innermost_block_tracker::innermost_block_tracker): Initialise
13586         m_types member.
13587         (innermost_block_tracker::reset): Take type parameter.
13588         (innermost_block_tracker::update): Take type parameter, and pass
13589         type through as needed.
13590         (innermost_block_tracker::m_types): New member.
13591         * varobj.c (varobj_create): Pass type when reseting innermost
13592         block.
13593
13594 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13595
13596         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13597         * ada-lang.c (resolve_subexp): Likewise.
13598         * breakpoint.c (set_breakpoint_condition) Likewise.
13599         (watch_command_1) Likewise.
13600         * c-exp.y (variable): Likewise.
13601         * d-exp.y (PrimaryExpression): Likewise.
13602         * f-exp.y (variable): Likewise.
13603         * go-exp.y (variable): Likewise.
13604         * m2-exp.y (variable): Likewise.
13605         * objfiles.c (objfile::~objfile): Likewise.
13606         * p-exp.y (variable): Likewise.
13607         * parse.c (innermost_block): Change type.
13608         * parser-defs.h (class innermost_block_tracker): New.
13609         (innermost_block): Change to innermost_block_tracker.
13610         * printcmd.c (display_command): Switch to innermost_block API.
13611         (do_one_display): Likewise.
13612         * rust-exp.y (do_one_display): Likewise.
13613         * symfile.c (clear_symtab_users): Likewise.
13614         * varobj.c (varobj_create): Switch to innermost_block API, replace
13615         use of innermost_block with block stored on varobj object.
13616
13617 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13618
13619         * expression.h (innermost_block): Remove declaration.
13620         * varobj.c: Add 'parser-defs.h' include.
13621
13622 2018-01-19  Tom Tromey  <tom@tromey.com>
13623
13624         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13625         symbols in the static and global blocks.
13626
13627 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13628
13629         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13630         gdb_ptrace.h, and move including gdb_wait.h ...
13631         * nat/linux-ptrace.h: ... to here.
13632
13633 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13634
13635         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13636         inf_ptrace_detach_success.
13637         (inf_ptrace_detach_success): Add inferior parameter, use it
13638         instead of inferior_ptid, pass it to detach_inferior.
13639         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13640         parameter.
13641         * inferior.c (detach_inferior): Add overload that takes an
13642         inferior object.
13643         * inferior.h (detach_inferior): Likewise.
13644         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13645         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13646         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13647
13648 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13649
13650         * target.h (struct target_ops) <to_detach>: Add inferior
13651         parameter.
13652         (target_detach): Likewise.
13653         * target.c (dispose_inferior): Pass inferior down.
13654         (target_detach): Pass inferior down.  Assert that it is equal to
13655         the current inferior.
13656         * aix-thread.c (aix_thread_detach): Pass inferior down.
13657         * corefile.c (core_file_command): Pass current_inferior() down.
13658         * corelow.c (core_detach): Add inferior parameter.
13659         * darwin-nat.c (darwin_detach): Likewise.
13660         * gnu-nat.c (gnu_detach): Likewise.
13661         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13662         * infcmd.c (detach_command): Pass current_inferior() down to
13663         target_detach.
13664         * infrun.c (follow_fork_inferior): Pass parent_inf to
13665         target_detach.
13666         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13667         target_detach.
13668         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13669         * linux-thread-db.c (thread_db_detach): Likewise.
13670         * nto-procfs.c (procfs_detach): Likewise.
13671         * procfs.c (procfs_detach): Likewise.
13672         * record.c (record_detach): Likewise.
13673         * record.h (struct inferior): Forward-declare.
13674         (record_detach): Add inferior parameter.
13675         * remote-sim.c (gdbsim_detach): Likewise.
13676         * remote.c (remote_detach_1): Likewise.
13677         (remote_detach): Likewise.
13678         (extended_remote_detach): Likewise.
13679         * sol-thread.c (sol_thread_detach): Likewise.
13680         * target-debug.h (target_debug_print_inferior_p): New macro.
13681         * target-delegates.c: Re-generate.
13682         * top.c (kill_or_detach): Pass inferior down to target_detach.
13683         * windows-nat.c (windows_detach): Add inferior parameter.
13684
13685 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13686
13687         * target.h (struct target_ops) <to_detach>: Remove args
13688         parameter.
13689         (target_detach): Likewise.
13690         * target.c (dispose_inferior): Adjust.
13691         (target_detach): Remove args parameter, adjust.
13692         * aix-thread.c (aix_thread_detach): Adjust.
13693         * corefile.c (core_file_command): Adjust.
13694         * corelow.c (core_detach): Adjust.
13695         * darwin-nat.c (darwin_detach): Adjust.
13696         * gnu-nat.c (gnu_detach): Adjust.
13697         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13698         * infcmd.c (detach_command): Adjust
13699         * infrun.c (follow_fork_inferior): Adjust.
13700         (handle_vfork_child_exec_or_exit): Adjust.
13701         * linux-fork.c (linux_fork_detach): Remove args parameter.
13702         * linux-fork.h (linux_fork_detach): Likewise.
13703         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13704         * linux-thread-db.c (thread_db_detach): Likewise.
13705         * nto-procfs.c (procfs_detach): Likewise.
13706         * procfs.c (procfs_detach): Likewise.
13707         (do_detach): Remove signo parameter.
13708         * record.c (record_detach): Remove args parameter.
13709         * record.h (record_detach): Likewise.
13710         * remote-sim.c (gdbsim_detach): Likewise.
13711         * remote.c (remote_detach_1): Likewise.
13712         (remote_detach): Likewise.
13713         (extended_remote_detach): Likewise.
13714         * sol-thread.c (sol_thread_detach): Likewise.
13715         * target-delegates.c: Re-generate.
13716         * top.c (struct qt_args) <args>: Remove field.
13717         (kill_or_detach): Don't pass args.
13718         (quit_force): Don't set args.
13719         * windows-nat.c (windows_detach): Remove args parameter.
13720
13721 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13722
13723         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13724         (arm_linux_init_abi): Install it.
13725
13726 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13727
13728         * osabi.c (gdb_osabi_names): Extend the regexp for
13729         arm-linux-gnueabihf.
13730
13731 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13732
13733         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13734         m_abbrevs.
13735         (abbrev_table::add_abbrev): Update.
13736         (abbrev_table::lookup_abbrev): Update.
13737
13738 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13739
13740         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13741
13742 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13743
13744         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13745         to "std::string".
13746
13747 2018-01-17  Tom Tromey  <tom@tromey.com>
13748
13749         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13750
13751 2018-01-17  Tom Tromey  <tom@tromey.com>
13752
13753         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13754         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13755         (create_array_type_with_stride): Update.
13756         * dwarf2read.c (set_die_type): Update.
13757
13758 2018-01-17  Tom Tromey  <tom@tromey.com>
13759
13760         * dwarf2read.c (delayed_method_info): Remove typedef.
13761         (dwarf2_cu::method_info): Now a std::vector.
13762         (add_to_method_list): Update.
13763         (free_delayed_list): Remove.
13764         (compute_delayed_physnames): Update.
13765         (process_full_comp_unit, process_full_type_unit): Clear the method
13766         list.  Remove cleanups.
13767         (psymtab_include_file_name): Add name_holder parameter.  Use
13768         unique_xmalloc_ptr.
13769         (dwarf_decode_lines): Update.
13770
13771 2018-01-17  Tom Tromey  <tom@tromey.com>
13772             Simon Marchi  <simon.marchi@ericsson.com>
13773
13774         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13775         (dwarf2_per_objfile::free_cached_comp_units)
13776         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13777         (init_cutu_and_read_dies_no_follow): Update.
13778         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13779         (dwarf2_cu::~dwarf2_cu): New.
13780         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13781         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13782
13783 2018-01-17  Tom Tromey  <tom@tromey.com>
13784             Simon Marchi  <simon.marchi@ericsson.com>
13785
13786         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13787         (struct die_reader_specs) <abbrev_table>: New member.
13788         (struct abbrev_table): Add constructor.
13789         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13790         <abbrev_obstack>: Now an auto_obstack.
13791         (abbrev_table_up): New typedef.
13792         (init_cu_die_reader): Add abbrev_table parameter.
13793         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13794         Add result_dwo_abbrev_table.
13795         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13796         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13797         Update.
13798         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13799         parameter.
13800         (skip_children): Update.
13801         (abbrev_table::alloc_abbrev): Rename from
13802         abbrev_table_alloc_abbrev.
13803         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13804         (abbrev_table::lookup_abbrev): Rename from
13805         abbrev_table_lookup_abbrev.
13806         (abbrev_table_read_table): Return abbrev_table_up.
13807         (abbrev_table_free, abbrev_table_free_cleanup)
13808         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13809         (load_partial_dies): Update.
13810
13811 2018-01-17  Tom Tromey  <tom@tromey.com>
13812
13813         * dwarf2read.c (dwarf2_compute_name): Update comment.
13814         (read_func_scope, read_variable): Update.
13815         (new_symbol): Remove.
13816         (new_symbol_full): Rename to new_symbol.
13817
13818 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13819
13820         PR gdb/16577
13821         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13822         a warning instead of throwing an error, set section size to 0 and return
13823         NULL.
13824         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13825
13826 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13827
13828         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13829         std::string.
13830         (linux_ptrace_attach_fail_reason_string): Likewise.
13831         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13832         Likewise.
13833         (linux_ptrace_attach_fail_reason_string): Likewise.
13834         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13835
13836 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13837
13838         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13839
13840 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13841
13842         PR gdb/21559
13843         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13844         checking for fs_base/gs_base fields in struct user_regs_struct.
13845         * configure: Regenerate.
13846
13847 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13848
13849         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13850         function.
13851         (aarch64_linux_init_abi): Install it to gdbarch hook
13852         gcc_target_options.
13853
13854 2018-01-15  Pedro Alves  <palves@redhat.com>
13855
13856         * common/signals-state-save-restore.c
13857         (save_original_signals_state): Fix typos.
13858
13859 2017-01-12  Tom Tromey  <tom@tromey.com>
13860             Sergio Durigan Junior  <sergiodj@redhat.com>
13861
13862         * Makefile.in (install-only): Install gdb-add-index.
13863
13864 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13865
13866         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13867
13868 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13869
13870         * infrun.c (keep_going_pass_signal): Clear step-over info when
13871         insert_breakpoints fails.
13872
13873 2018-01-11  Pedro Alves  <palves@redhat.com>
13874
13875         PR gdb/22583
13876         * infrun.c (resume): Rename to ...
13877         (resume_1): ... this.
13878         (resume): Reimplement as wrapper around resume_1.
13879
13880 2018-01-11  Pedro Alves  <palves@redhat.com>
13881
13882         PR remote/22597
13883         * remote.c (remote_parse_stop_reply): Default to the last-set
13884         general thread instead of to 'magic_null_ptid'.
13885
13886 2018-01-10  Pedro Alves  <palves@redhat.com>
13887
13888         * language.h (language_get_symbol_name_matcher): Rename ...
13889         (get_symbol_name_matcher): ... this.
13890         * language.c (language_get_symbol_name_matcher): Ditto.
13891         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13892         callers adjusted.
13893
13894 2018-01-10  Pedro Alves  <palves@redhat.com>
13895
13896         PR gdb/22670
13897         * dwarf2read.c
13898         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13899         Adjust to use language_get_symbol_name_matcher instead of
13900         language_defn::la_get_symbol_name_matcher.
13901         * language.c (language_get_symbol_name_matcher): If in Ada mode
13902         and the lookup name is a verbatim match, return Ada's matcher.
13903         * language.h (language_get_symbol_name_matcher): Adjust comment.
13904         (ada_lookup_name_info::verbatim_p):: New method.
13905
13906 2018-01-10  Pedro Alves  <palves@redhat.com>
13907
13908         PR gdb/22670
13909         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13910         minsym's language is language_auto or language_cplus, pass down
13911         language_ada instead.
13912         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13913
13914 2018-01-10  Pedro Alves  <palves@redhat.com>
13915
13916         PR gdb/22670
13917         * minsyms.c (linkage_name_str): New function.
13918         (iterate_over_minimal_symbols): Use it.
13919
13920 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13921
13922         * NEWS: Document that 'info proc' now works on FreeBSD.
13923
13924 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13925
13926         * configure.ac: Check for kinfo_getfile in libutil.
13927         * configure: Regenerate.
13928         * config.in: Regenerate.
13929         * fbsd-nat.c: Include "fbsd-tdep.h".
13930         (fbsd_fetch_cmdline): New.
13931         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13932         rather than calling error.
13933         (fbsd_info_proc): New.
13934         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13935         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13936         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13937
13938 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13939
13940         * fbsd-nat.c (struct free_deleter): Remove.
13941         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13942
13943 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13944
13945         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13946         NULL for an empty pathname.
13947
13948 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13949
13950         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13951         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13952         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13953         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13954         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13955         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13956         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13957         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13958         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13959         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13960         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13961         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13962         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13963         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13964         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13965
13966 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13967
13968         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13969         (gnu_xfer_auxv): New function.
13970         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13971         TARGET_OBJECT_AUXV.
13972
13973 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13974             Simon Marchi  <simon.marchi@ericsson.com>
13975
13976         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13977         common/selftest.c.
13978         (COMMON_OBS): Remove selftest.o.
13979         * configure.ac: Append selftest-arch.c and common/selftest.c to
13980         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13981         * configure: Re-generated.
13982         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13983         GDB_SELF_TEST.
13984         (maintenance_info_selftests): Likewise.
13985
13986 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13987
13988         * ada-valprint.c (val_print_packed_array_elements): Use
13989         proper number of elements when printing an array indexed
13990         by an enumeration type.
13991
13992 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13993
13994         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13995         (dw2_get_file_names_reader): Adjust.
13996         (lookup_dwo_signatured_type): Adjust.
13997         (lookup_dwp_signatured_type): Adjust.
13998         (lookup_signatured_type): Adjust.
13999         (create_type_unit_group): Adjust.
14000         (get_type_unit_group): Adjust.
14001         (process_psymtab_comp_unit_reader): Adjust.
14002         (build_type_psymtabs_reader): Adjust.
14003         (scan_partial_symbols): Adjust.
14004         (add_partial_symbol): Adjust.
14005         (add_partial_subprogram): Adjust.
14006         (peek_die_abbrev): Adjust.
14007         (fixup_go_packaging): Adjust.
14008         (process_imported_unit_die): Adjust.
14009         (dwarf2_compute_name): Adjust.
14010         (dwarf2_physname): Adjust.
14011         (read_import_statement): Adjust.
14012         (handle_DW_AT_stmt_list): Adjust.
14013         (read_file_scope): Adjust.
14014         (read_func_scope): Adjust.
14015         (read_lexical_block_scope): Adjust.
14016         (read_call_site_scope): Adjust.
14017         (read_variable): Adjust.
14018         (dwarf2_rnglists_process): Adjust.
14019         (dwarf2_ranges_process): Adjust.
14020         (dwarf2_ranges_read): Adjust.
14021         (dwarf2_get_pc_bounds): Adjust.
14022         (dwarf2_record_block_ranges): Adjust.
14023         (dwarf2_add_field): Adjust.
14024         (dwarf2_add_member_fn): Adjust.
14025         (read_structure_type): Adjust.
14026         (process_structure_scope): Adjust.
14027         (read_enumeration_type): Adjust.
14028         (read_array_type): Adjust.
14029         (mark_common_block_symbol_computed): Adjust.
14030         (read_common_block): Adjust.
14031         (read_namespace_type): Adjust.
14032         (read_namespace): Adjust.
14033         (read_module_type): Adjust.
14034         (read_tag_pointer_type): Adjust.
14035         (read_tag_ptr_to_member_type): Adjust.
14036         (read_tag_string_type): Adjust.
14037         (read_subroutine_type): Adjust.
14038         (read_typedef): Adjust.
14039         (read_base_type): Adjust.
14040         (attr_to_dynamic_prop): Adjust.
14041         (read_subrange_type): Adjust.
14042         (read_unspecified_type): Adjust.
14043         (dwarf2_read_abbrevs): Adjust.
14044         (load_partial_dies): Adjust.
14045         (read_partial_die): Adjust.
14046         (find_partial_die): Adjust.
14047         (guess_partial_die_structure_name): Adjust.
14048         (fixup_partial_die): Adjust.
14049         (read_attribute_value): Adjust.
14050         (read_addr_index): Adjust.
14051         (read_addr_index_from_leb128): Adjust.
14052         (read_str_index): Adjust.
14053         (dwarf2_string_attr): Adjust.
14054         (get_debug_line_section): Adjust.
14055         (dwarf_decode_line_header): Adjust.
14056         (lnp_state_machine::check_line_address): Adjust.
14057         (dwarf_decode_lines_1): Adjust.
14058         (dwarf_decode_lines): Adjust.
14059         (dwarf2_start_symtab): Adjust.
14060         (var_decode_location): Adjust.
14061         (new_symbol_full): Adjust.
14062         (dwarf2_const_value_data): Adjust.
14063         (dwarf2_const_value_attr): Adjust.
14064         (dwarf2_const_value): Adjust.
14065         (die_type): Adjust.
14066         (die_containing_type): Adjust.
14067         (build_error_marker_type): Adjust.
14068         (lookup_die_type): Adjust.
14069         (guess_full_die_structure_name): Adjust.
14070         (anonymous_struct_prefix): Adjust.
14071         (determine_prefix): Adjust.
14072         (dwarf2_name): Adjust.
14073         (follow_die_ref_or_sig): Adjust.
14074         (follow_die_offset): Adjust.
14075         (follow_die_ref): Adjust.
14076         (follow_die_sig_1): Adjust.
14077         (follow_die_sig): Adjust.
14078         (get_signatured_type): Adjust.
14079         (get_DW_AT_signature_type): Adjust.
14080         (decode_locdesc): Adjust.
14081         (dwarf_decode_macros): Adjust.
14082         (cu_debug_loc_section): Adjust.
14083         (fill_in_loclist_baton): Adjust.
14084         (dwarf2_symbol_mark_computed): Adjust.
14085         (init_one_comp_unit): Don't assign
14086         dwarf2_cu::dwarf2_per_objfile.
14087         (set_die_type): Adjust.
14088
14089 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14090
14091         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14092         <dwarf2_per_objfile>: New field.
14093         (dwarf2_per_objfile): Remove global.
14094         (get_dwarf2_per_objfile): New function.
14095         (set_dwarf2_per_objfile): New function.
14096         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14097         dwarf2_per_objfile.
14098         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14099         (read_abbrev_offset): Likewise.
14100         (read_indirect_string): Likewise.
14101         (read_indirect_line_string): Likewise.
14102         (read_indirect_string_at_offset): Likewise.
14103         (read_indirect_string_from_dwz): Likewise.
14104         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14105         dwarf2_per_objfile.
14106         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14107         (create_all_comp_units): Change objfile parameter to
14108         dwarf2_per_objfile.
14109         (create_all_type_units): Likewise.
14110         (process_queue): Add dwarf2_per_objfile parameter.
14111         (read_and_check_comp_unit_head): Likewise.
14112         (lookup_dwo_unit_in_dwp): Likewise.
14113         (get_dwp_file): Likewise.
14114         (process_cu_includes): Likewise.
14115         (struct free_dwo_file_cleanup_data): New struct.
14116         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14117         set_dwarf2_per_objfile.
14118         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14119         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14120         context, adjust calls.
14121         (dw2_instantiate_symtab): Likewise.
14122         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14123         (dw2_get_cu): Likewise.
14124         (create_cu_from_index_list): Change objfile parameter to
14125         dwarf2_per_objfile.
14126         (create_cus_from_index_list): Get dwarf2_per_objfile from
14127         context, adjust calls.
14128         (create_cus_from_index): Likewise.
14129         (create_signatured_type_table_from_index): Change objfile
14130         parameter to dwarf2_per_objfile.
14131         (create_signatured_type_table_from_debug_names): Change objfile
14132         parameter to dwarf2_per_objfile.
14133         (create_addrmap_from_index): Likewise.
14134         (create_addrmap_from_aranges): Likewise.
14135         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14136         (dw2_setup): Remove.
14137         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14138         context.
14139         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14140         get_dwarf2_per_objfile.
14141         (dw2_forget_cached_source_info): Likewise.
14142         (dw2_map_symtabs_matching_filename): Likewise.
14143         (struct dw2_symtab_iterator) <index>: Remove.
14144         <dwarf2_per_objfile>: New field.
14145         (dw2_symtab_iter_init): Replace index parameter with
14146         dwarf2_per_objfile.
14147         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14148         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14149         (dw2_print_stats): Likewise.
14150         (dw2_dump): Likewise.
14151         (dw2_expand_symtabs_for_function): Likewise.
14152         (dw2_expand_all_symtabs): Likewise.
14153         (dw2_expand_symtabs_with_fullname): Likewise.
14154         (dw2_expand_marked_cus): Replace index and objfile parameters
14155         with dwarf2_per_objfile.
14156         (dw_expand_symtabs_matching_file_matcher): Add
14157         dwarf2_per_objfile parameter and adjust calls.
14158         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14159         adjust calls.
14160         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14161         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14162         adjust calls.
14163         (create_cus_from_debug_names_list): Replace objfile parameter
14164         with dwarf2_per_objfile and adjust calls.
14165         (create_cus_from_debug_names): Likewise.
14166         (dwarf2_read_debug_names): Likewise.
14167         (mapped_debug_names::namei_to_name): Adjust call.
14168         (dw2_debug_names_iterator::next): Likewise.
14169         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14170         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14171         (dw2_debug_names_dump): Likewise.
14172         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14173         (dw2_debug_names_expand_symtabs_matching): Likewise.
14174         (dwarf2_initialize_objfile): Likewise.
14175         (dwarf2_build_psymtabs): Likewise.
14176         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14177         this_cu.
14178         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14179         (read_and_check_comp_unit_head): Likewise.
14180         (read_abbrev_offset): Likewise.
14181         (create_debug_type_hash_table): Likewise.
14182         (create_debug_types_hash_table): Likewise.
14183         (create_all_type_units): Replace objfile parameter with
14184         dwarf2_per_objfile.
14185         (add_type_unit): Add dwarf2_per_objfile parameter.
14186         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14187         with dwarf2_per_objfile.
14188         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14189         (lookup_dwp_signatured_type): Likewise.
14190         (lookup_signatured_type): Likewise.
14191         (read_cutu_die_from_dwo): Likewise.
14192         (init_tu_and_read_dwo_dies): Likewise.
14193         (init_cutu_and_read_dies): Likewise.
14194         (init_cutu_and_read_dies_no_follow): Likewise.
14195         (allocate_type_unit_groups_table): Add objfile parameter.
14196         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14197         (get_type_unit_group): Likewise.
14198         (process_psymtab_comp_unit): Update call.
14199         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14200         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14201         (print_tu_stats): Likewise.
14202         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14203         in void* parameter.
14204         (build_type_psymtabs): Change objfile parameter to
14205         dwarf2_per_objfile.
14206         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14207         passed in void* parameter.
14208         (process_skeletonless_type_units): Change objfile parameter to
14209         dwarf2_per_objfile.
14210         (set_partial_user): Likewise.
14211         (dwarf2_build_psymtabs_hard): Likewise.
14212         (read_comp_units_from_section): Likewise.
14213         (create_all_comp_units): Likewise.
14214         (scan_partial_symbols): Update calls.
14215         (add_partial_symbol): Likewise.
14216         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14217         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14218         (process_queue): Add dwarf2_per_objfile parameter.
14219         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14220         (compute_compunit_symtab_includes): Likewise.
14221         (process_cu_includes): Add dwarf2_per_objfile parameter.
14222         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14223         (process_full_type_unit): Likewise.
14224         (process_imported_unit_die): Update call.
14225         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14226         (read_file_scope): Likewise.
14227         (allocate_dwo_file_hash_table): Add objfile parameter.
14228         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14229         (create_cus_hash_table): Likewise.
14230         (create_dwp_hash_table): Likewise.
14231         (create_dwo_unit_in_dwp_v1): Likewise.
14232         (create_dwp_v2_section): Likewise.
14233         (create_dwo_unit_in_dwp_v2): Likewise.
14234         (lookup_dwo_unit_in_dwp): Likewise.
14235         (try_open_dwop_file): Likewise.
14236         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14237         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14238         cleanup to include a reference to dwarf2_per_objfile.
14239         (open_dwp_file): Add dwarf2_per_objfile parameter.
14240         (open_and_init_dwp_file): Likewise.
14241         (get_dwp_file): Likewise.
14242         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14243         (queue_and_load_all_dwo_tus): Update call.
14244         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14245         data.
14246         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14247         (dwarf2_ranges_process): Likewise.
14248         (dwarf2_get_pc_bounds): Likewise.
14249         (mark_common_block_symbol_computed): Likewise.
14250         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14251         (dwarf2_read_abbrevs): Update call.
14252         (read_partial_die): Use dwarf2_per_objfile from cu.
14253         (find_partial_die): Likewise.
14254         (fixup_partial_die): Likewise.
14255         (read_attribute_value): Likewise.
14256         (read_indirect_string_at_offset_from): Add objfile parameter.
14257         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14258         parameter.
14259         (read_indirect_string_from_dwz): Add objfile parameter.
14260         (read_indirect_string): Add objfile parameter.
14261         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14262         (read_addr_index): Use dwarf2_per_objfile from cu.
14263         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14264         call dw2_setup.
14265         (read_str_index): Use dwarf2_per_objfile from cu.
14266         (get_debug_line_section): Likewise.
14267         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14268         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14269         (new_symbol_full): Use dwarf2_per_objfile from cu.
14270         (build_error_marker_type): Likewise.
14271         (lookup_die_type): Likewise.
14272         (determine_prefix): Likewise.
14273         (follow_die_offset): Likewise.
14274         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14275         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14276         (dwarf2_fetch_die_type_sect_off): Likewise.
14277         (dwarf2_get_die_type): Likewise.
14278         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14279         (get_signatured_type): Likewise.
14280         (get_DW_AT_signature_type): Likewise.
14281         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14282         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14283         (cu_debug_loc_section): Likewise.
14284         (fill_in_loclist_baton): Likewise.
14285         (dwarf2_symbol_mark_computed): Likewise.
14286         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14287         dwarf2_per_objfile.
14288         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14289         parameter.
14290         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14291         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14292         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14293         (set_die_type): Use dwarf2_free_objfile from cu.
14294         (get_die_type_at_offset): Likewise.
14295         (dwarf2_per_objfile_free): Don't assign global variable.
14296         (debug_names) <constructor>: Add dwarf2_per_objfile
14297         parameter, update m_debugstrlookup construction.
14298         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14299         parameter.
14300         <m_dwarf2_per_objfile>: New field.
14301         <lookup>: Use m_dwarf2_per_objfile.
14302         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14303         (psyms_seen_size): Likewise.
14304         (write_gdbindex): Replace objfile parameter with
14305         dwarf2_per_objfile.
14306         (write_debug_names): Likewise.
14307         (write_psymtabs_to_index): Likewise.
14308         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14309         calls.
14310
14311 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14312
14313         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14314         <dwarf2_per_objfile>: New field.
14315         (struct dwarf2_per_cu_data) <objfile>: Remove.
14316         <dwarf2_per_objfile>: New field.
14317         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14318         of objfile.
14319         (create_signatured_type_table_from_index): Likewise.
14320         (create_debug_type_hash_table): Likewise.
14321         (fill_in_sig_entry_from_dwo_entry): Likewise.
14322         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14323         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14324         objfile.
14325         (create_partial_symtab): Access objfile through
14326         dwarf2_per_objfile.
14327         (process_psymtab_comp_unit_reader): Likewise.
14328         (read_comp_units_from_section): Likewise.
14329         (scan_partial_symbols): Likewise.
14330         (add_partial_symbol): Likewise.
14331         (add_partial_subprogram): Likewise.
14332         (peek_die_abbrev): Likewise.
14333         (fixup_go_packaging): Likewise.
14334         (process_full_comp_unit): Likewise.
14335         (process_full_type_unit): Likewise.
14336         (process_imported_unit_die): Likewise.
14337         (dwarf2_compute_name): Likewise.
14338         (dwarf2_physname): Likewise.
14339         (read_import_statement): Likewise.
14340         (create_cus_hash_table): Assign dwarf2_physname instead of
14341         objfile.
14342         (read_func_scope): Access objfile through dwarf2_per_objfile.
14343         (read_lexical_block_scope): Likewise.
14344         (read_call_site_scope): Likewise.
14345         (read_variable): Likewise.
14346         (dwarf2_rnglists_process): Likewise.
14347         (dwarf2_ranges_process): Likewise.
14348         (dwarf2_ranges_read): Likewise.
14349         (dwarf2_record_block_ranges): Likewise.
14350         (dwarf2_add_field): Likewise.
14351         (dwarf2_add_member_fn): Likewise.
14352         (read_structure_type): Likewise.
14353         (process_structure_scope): Likewise.
14354         (read_enumeration_type): Likewise.
14355         (read_array_type): Likewise.
14356         (read_common_block): Likewise.
14357         (read_namespace_type): Likewise.
14358         (read_namespace): Likewise.
14359         (read_module_type): Likewise.
14360         (read_tag_pointer_type): Likewise.
14361         (read_tag_ptr_to_member_type): Likewise.
14362         (read_tag_string_type): Likewise.
14363         (read_subroutine_type): Likewise.
14364         (read_typedef): Likewise.
14365         (read_base_type): Likewise.
14366         (attr_to_dynamic_prop): Likewise.
14367         (read_subrange_type): Likewise.
14368         (read_unspecified_type): Likewise.
14369         (load_partial_dies): Likewise.
14370         (read_partial_die): Likewise.
14371         (find_partial_die): Likewise.
14372         (guess_partial_die_structure_name): Likewise.
14373         (fixup_partial_die): Likewise.
14374         (read_attribute_value): Likewise.
14375         (read_addr_index_from_leb128): Likewise.
14376         (dwarf2_read_addr_index): Likewise.
14377         (dwarf2_string_attr): Likewise.
14378         (lnp_state_machine::check_line_address): Likewise.
14379         (dwarf_decode_lines_1): Likewise.
14380         (dwarf_decode_lines): Likewise.
14381         (dwarf2_start_symtab): Likewise.
14382         (var_decode_location): Likewise.
14383         (new_symbol_full): Likewise.
14384         (dwarf2_const_value_data): Likewise.
14385         (dwarf2_const_value_attr): Likewise.
14386         (dwarf2_const_value): Likewise.
14387         (die_type): Likewise.
14388         (die_containing_type): Likewise.
14389         (lookup_die_type): Likewise.
14390         (guess_full_die_structure_name): Likewise.
14391         (anonymous_struct_prefix): Likewise.
14392         (dwarf2_name): Likewise.
14393         (follow_die_ref_or_sig): Likewise.
14394         (follow_die_offset): Likewise.
14395         (follow_die_ref): Likewise.
14396         (dwarf2_fetch_die_loc_sect_off): Likewise.
14397         (dwarf2_fetch_constant_bytes): Likewise.
14398         (dwarf2_fetch_die_type_sect_off): Likewise.
14399         (dwarf2_get_die_type): Likewise.
14400         (follow_die_sig): Likewise.
14401         (decode_locdesc): Likewise.
14402         (dwarf2_per_cu_objfile): Likewise.
14403         (dwarf2_per_cu_text_offset): Likewise.
14404         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14405         objfile.
14406         (set_die_type): Access objfile through
14407         dwarf2_per_objfile.
14408
14409 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14410
14411         * valprint.c (converted_character_d): Remove typedef.
14412         (DEF_VEC_O (converted_character_d)): Remove.
14413         (count_next_character): Use std::vector.
14414         (print_converted_chars_to_obstack): Likewise.
14415         (generic_printstr): Likewise.
14416
14417 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14418
14419         * xml-support.h (struct gdb_xml_value): Add constructor.
14420         <value>: Change type to unique_xmalloc_ptr.
14421         (gdb_xml_value_s): Remove typedef.
14422         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14423         (gdb_xml_element_start_handler): Change parameter type to
14424         std::vector.
14425         (xml_find_attribute): Likewise.
14426         * xml-support.c (xml_find_attribute): Change parameter type to
14427         std::vector and adjust.
14428         (gdb_xml_values_cleanup): Remove.
14429         (gdb_xml_parser::start_element): Adjust to std::vector.
14430         (xinclude_start_include): Change paraeter type to std::vector
14431         and adjust.
14432         * btrace.c (check_xml_btrace_version): Likewise.
14433         (parse_xml_btrace_block): Likewise.
14434         (parse_xml_btrace_pt_config_cpu): Likewise.
14435         (parse_xml_btrace_pt): Likewise.
14436         (parse_xml_btrace_conf_bts): Likewise.
14437         (parse_xml_btrace_conf_pt): Likewise.
14438         * memory-map.c (memory_map_start_memory): Likewise.
14439         (memory_map_start_property): Likewise.
14440         * osdata.c (osdata_start_osdata): Likewise.
14441         (osdata_start_item): Likewise.
14442         (osdata_start_column): Likewise.
14443         * remote.c (start_thread): Likewise.
14444         * solib-aix.c (library_list_start_library): Likewise.
14445         (library_list_start_list): Likewise.
14446         * solib-svr4.c (library_list_start_library): Likewise.
14447         (svr4_library_list_start_list): Likewise.
14448         * solib-target.c (library_list_start_segment): Likewise.
14449         (library_list_start_section): Likewise.
14450         (library_list_start_library): Likewise.
14451         (library_list_start_list): Likewise.
14452         * tracepoint.c (traceframe_info_start_memory): Likewise.
14453         (traceframe_info_start_tvar): Likewise.
14454         * xml-syscall.c (syscall_start_syscall): Likewise.
14455         * xml-tdesc.c (tdesc_start_target): Likewise.
14456         (tdesc_start_feature): Likewise.
14457         (tdesc_start_reg): Likewise.
14458         (tdesc_start_union): Likewise.
14459         (tdesc_start_struct): Likewise.
14460         (tdesc_start_flags): Likewise.
14461         (tdesc_start_enum): Likewise.
14462         (tdesc_start_field): Likewise.
14463         (tdesc_start_enum_value): Likewise.
14464         (tdesc_start_vector): Likewise.
14465
14466 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14467
14468         * extension.h (struct xmethod_worker) <clone>: Remove.
14469         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14470         Remove.
14471         (python_xmethod_worker::clone): Remove.
14472         * valops.c (find_overload_match): Use std::move instead of
14473         clone.
14474
14475 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14476
14477         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14478         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14479         <free_xmethod_worker_data>: Remove.
14480         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14481         <get_xmethod_arg_types>: Remove.
14482         <get_xmethod_result_type>: Remove.
14483         <invoke_xmethod>: Remove.
14484         * extension.c (new_xmethod_worker): Remove.
14485         (clone_xmethod_worker): Remove.
14486         (get_matching_xmethod_workers): Return void, pass std::vector by
14487         pointer.
14488         (get_xmethod_arg_types): Rename to...
14489         (xmethod_worker::get_arg_types): ... this, and adjust.
14490         (get_xmethod_result_type): Rename to...
14491         (xmethod_worker::get_result_type): ... this, and adjust.
14492         (invoke_xmethod): Remove.
14493         (free_xmethod_worker): Remove.
14494         (free_xmethod_worker_vec): Remove.
14495         * extension.h (enum ext_lang_rc): Move here from
14496         extension-priv.h.
14497         (struct xmethod_worker): Add constructor and destructor.
14498         <data>: Remove.
14499         <value>: Remove.
14500         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14501         virtual pure methods.
14502         <get_arg_types, get_result_type>: New methods.
14503         (xmethod_worker_ptr): Remove typedef.
14504         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14505         (xmethod_worker_vec): Remove typedef.
14506         (xmethod_worker_up): New typedef.
14507         (invoke_xmethod): Remove.
14508         (clone_xmethod_worker): Remove.
14509         (free_xmethod_worker): Remove.
14510         (free_xmethod_worker_vec): Remove.
14511         (get_xmethod_arg_types): Remove.
14512         (get_xmethod_result_type): Remove.
14513         * valops.c (find_method_list): Use std::vector, don't use
14514         intermediate vector.
14515         (value_find_oload_method_list): Use std::vector.
14516         (find_overload_match): Use std::vector.
14517         (find_oload_champ): Use std::vector.
14518         * value.c (value_free): Use operator delete.
14519         (value_of_xmethod): Rename to...
14520         (value_from_xmethod): ... this.  Don't assign
14521         xmethod_worker::value, take rvalue-reference.
14522         (result_type_of_xmethod): Adjust.
14523         (call_xmethod): Adjust.
14524         * value.h: Include extension.h.
14525         (struct xmethod_worker): Don't forward-declare.
14526         (value_of_xmethod): Rename to...
14527         (value_from_xmethod): ... this, take rvalue-reference.
14528         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14529         (struct python_xmethod_worker): ... this, add constructor and
14530         destructor.
14531         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14532         (gdbpy_free_xmethod_worker_data): Rename to...
14533         (python_xmethod_worker::~python_xmethod_worker): ... this and
14534         adjust.
14535         (gdbpy_clone_xmethod_worker_data): Rename to...
14536         (python_xmethod_worker::clone): ... this and adjust.
14537         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14538         temporary vector.
14539         (gdbpy_get_xmethod_arg_types): Rename to...
14540         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14541         (gdbpy_get_xmethod_result_type): Rename to...
14542         (python_xmethod_worker::do_get_result_type): ... this and
14543         adjust.
14544         (gdbpy_invoke_xmethod): Rename to...
14545         (python_xmethod_worker::invoke): ... this and adjust.
14546         (new_python_xmethod_worker): Rename to...
14547         (python_xmethod_worker::python_xmethod_worker): ... this and
14548         adjust.
14549         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14550         Remove.
14551         (gdbpy_free_xmethod_worker_data): Remove.
14552         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14553         (gdbpy_get_xmethod_arg_types): Remove.
14554         (gdbpy_get_xmethod_result_type): Remove.
14555         (gdbpy_invoke_xmethod): Remove.
14556         * python/python.c (python_extension_ops): Remove obsolete
14557         callbacks.
14558
14559 2018-01-05  Pedro Alves  <palves@redhat.com>
14560
14561         PR gdb/18653
14562         * common/signals-state-save-restore.c
14563         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14564         find a custom handler preinstalled, instead of internal erroring.
14565         But only warn if !quiet.
14566         * common/signals-state-save-restore.h
14567         (save_original_signals_state): New parameter 'quiet'.
14568         * main.c (captured_main_1): Move save_original_signals_state call
14569         after option handling, and pass QUIET.
14570
14571 2018-01-05  Pedro Alves  <palves@redhat.com>
14572
14573         * spu-tdep.c (spu_catch_start): Pass
14574         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14575
14576 2018-01-05  Pedro Alves  <palves@redhat.com>
14577
14578         PR gdb/22670
14579         * ada-lang.c (literal_symbol_name_matcher): New function.
14580         (ada_get_symbol_name_matcher): Use it for
14581         symbol_name_match_type::SEARCH_NAME.
14582         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14583         it down instead of assuming symbol_name_match_type::FULL.
14584         * block.h (block_lookup_symbol): New parameter 'match_type'.
14585         * c-valprint.c (print_unpacked_pointer): Use
14586         lookup_symbol_search_name instead of lookup_symbol.
14587         * compile/compile-object-load.c (get_out_value_type): Pass down
14588         symbol_name_match_type::SEARCH_NAME.
14589         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14590         symbol_name_match_type::FULL.
14591         * cp-support.c (cp_get_symbol_name_matcher): Handle
14592         symbol_name_match_type::SEARCH_NAME.
14593         * infrun.c (insert_exception_resume_breakpoint): Use
14594         lookup_symbol_search_name.
14595         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14596         * psymtab.c (maintenance_check_psymtabs): Use
14597         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14598         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14599         SYMBOL_SEARCH_NAME.
14600         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14601         if symbol_name_match_type::SEARCH_NAME.
14602         (lookup_symbol_in_language): Pass down
14603         symbol_name_match_type::FULL.
14604         (lookup_symbol_search_name): New.
14605         (lookup_language_this): Pass down
14606         symbol_name_match_type::SEARCH_NAME.
14607         (lookup_symbol_aux, lookup_local_symbol): New parameter
14608         'match_type'.  Pass it down.
14609         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14610         (lookup_symbol_search_name): New declaration.
14611         (lookup_symbol_in_block): New 'match_type' parameter.
14612
14613 2018-01-05  Pedro Alves  <palves@redhat.com>
14614
14615         PR gdb/22670
14616         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14617         ada_lookup_symbol.
14618         (ada_lookup_symbol): Reimplement in terms of
14619         ada_lookup_symbol_list, bits factored out from
14620         ada_lookup_encoded_symbol.
14621
14622 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14623
14624         * ada-exp.y (write_object_renaming): When subscripting an array
14625         using a symbol as the index, pass the block in call to
14626         ada_lookup_encoded_symbol when looking that symbol up.
14627
14628 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14629
14630         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14631         TYPE_INDEX_TYPE.
14632
14633 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14634
14635         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14636         the case where VALUE_LVAL (val0) is not lval_memory.
14637
14638 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14639
14640         * ada-valprint.c (print_optional_low_bound): Handle
14641         character-indexed array printing like boolean-indexed array
14642         printing.
14643
14644 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14645
14646         * NEWS: Create a new section for the next release branch.
14647         Rename the section of the current branch, now that it has
14648         been cut.
14649
14650 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14651
14652         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14653         * version.in: Bump version to 8.1.50.DATE-git.
14654
14655 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14656
14657         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14658         Add field.
14659         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14660         Add field.
14661         (default_exception_support_info) <catch_handlers_sym>: Add field.
14662         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14663         (ada_exception_name_addr_1): Add "catch handlers" handling.
14664         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14665         Update all callers.
14666         (create_excep_cond_exprs) <ex>: Add parameter.
14667         (re_set_exception): Update create_excep_cond_exprs call.
14668         (print_it_exception, print_one_exception, print_mention_exception)
14669         (print_recreate_exception): Add "catch handler" handling.
14670         (allocate_location_catch_handlers, re_set_catch_handlers)
14671         (check_status_catch_handlers, print_it_catch_handlers)
14672         (print_one_catch_handlers, print_mention_catch_handlers)
14673         (print_recreate_catch_handlers): New function.
14674         (catch_handlers_breakpoint_ops): New variable.
14675         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14676         Add parameter.  Add "catch handler" handling.
14677         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14678         Add "catch handler" handling.
14679         (ada_exception_catchpoint_cond_string): Add "catch handler"
14680         handling.
14681         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14682         call.
14683         (catch_ada_handlers_command): New function.
14684         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14685         operations structure.
14686         (_initialize_ada_language): Add "catch handlers" command entry.
14687         * NEWS: Document "catch handlers" feature.
14688
14689 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14690
14691         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14692         account when creating the array type of the slice.
14693         (ada_value_slice): Likewise.
14694
14695 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14696
14697         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14698         New enum value.
14699         (create_array_type_with_stride): Add byte_stride_prop parameter.
14700         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14701         New parameter.  Update all callers in this file.
14702         (array_type_has_dynamic_stride): New function.
14703         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14704         of arrays with dynamic byte strides.
14705         * dwarf2read.c (read_array_type): Add support for dynamic
14706         DW_AT_byte_stride attributes.
14707
14708 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14709
14710         * dwarf2read.c (read_unspecified_type): Treat
14711         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14712
14713 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14714
14715         Update copyright year range in all GDB files.
14716
14717 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14718
14719         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14720         and gdb/testsuite/gdb.base/step-line.c.
14721
14722 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14723
14724         * copyright.py (main): Dump the contents of
14725         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14726         even if BY_HAND is empty.
14727
14728 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14729
14730         * top.c (print_gdb_version): Update Copyright year in version
14731         message.
14732
14733 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14734
14735         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14736
14737 For older changes see ChangeLog-2017.
14738 \f
14739 Local Variables:
14740 mode: change-log
14741 left-margin: 8
14742 fill-column: 74
14743 version-control: never
14744 coding: utf-8
14745 End: