Fix -Wshadow=local warning in sol_thread_target::wait
[external/binutils.git] / gdb / ChangeLog
1 2018-10-05  Tom Tromey  <tom@tromey.com>
2
3         * sol-thread.c (sol_thread_target::wait): Rename inner
4         "save_ptid".
5
6 2018-10-04  Tom Tromey  <tom@tromey.com>
7
8         * configure: Rebuild.
9         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
10
11 2018-10-04  Tom Tromey  <tom@tromey.com>
12
13         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
14         declaration of "block".
15
16 2018-10-04  Tom Tromey  <tom@tromey.com>
17
18         * common/filestuff.c (fdwalk): Remove inner declaration of
19         "result".
20
21 2018-10-04  Tom Tromey  <tom@tromey.com>
22
23         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
24         "structs_addr" and hoist declaration.
25
26 2018-10-04  Tom Tromey  <tom@tromey.com>
27
28         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
29         variable "size".
30
31 2018-10-04  Tom Tromey  <tom@tromey.com>
32
33         * mdebugread.c (parse_partial_symbols): Use std::string.
34
35 2018-10-04  Tom Tromey  <tom@tromey.com>
36
37         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
38         * p-valprint.c (pascal_val_print): Split inner "i" variable.
39         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
40         header.
41         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
42         more inner scope.
43         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
44         * varobj.c (varobj_update): Rename inner "newobj",
45         "type_changed".
46         * valprint.c (generic_emit_char): Rename inner "buf".
47         * valops.c (find_overload_match): Rename inner "temp".
48         (value_struct_elt_for_reference): Declare "v" in more inner
49         scope.
50         * v850-tdep.c (v850_push_dummy_call): Rename "len".
51         * unittests/array-view-selftests.c (run_tests): Rename inner
52         "vec".
53         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
54         header.
55         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
56         "tsv" in more inner scope.
57         (print_one_static_tracepoint_marker): Rename inner
58         "tuple_emitter".
59         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
60         (tic6x_push_dummy_call): Don't redeclare "addr".
61         * target-float.c: Declare "dto" lower.
62         * symtab.c (lookup_local_symbol): Rename inner "sym".
63         (find_pc_sect_line): Rename inner "pc".
64         * stack.c (print_frame): Don't redeclare "gdbarch".
65         (return_command): Rename inner "gdbarch".
66         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
67         "sp".
68         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
69         header.
70         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
71         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
72         scope.
73         * remote.c (remote_target::update_thread_list): Don't redeclare
74         "tp".
75         (remote_target::process_initial_stop_replies): Rename inner
76         "thread".
77         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
78         (remote_target::wait_as): Don't redeclare "stop_reply".
79         (remote_target::get_thread_local_address): Rename inner
80         "result".
81         (remote_target::get_tib_address): Likewise.
82
83         * regcache.c (cooked_read_test): Rename "regnum".
84         * record-btrace.c (cmd_record_btrace_start): Rename inner
85         "exception".
86         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
87         loop header.
88         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
89         header.
90         (ppu2spu_sniffer): Rename inner "buf".
91         * parse.c (operator_check_standard): Rename inner "type",
92         "objfile".
93         * p-valprint.c (pascal_val_print): Introduce new scope for
94         "low_bound", "high_bound".
95         * p-exp.y (yylex): Declare "i" in loop header.
96         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
97         Lower declaration of "s".
98         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
99         header.
100         (nios2_push_dummy_call): Rename "len".
101         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
102         "buf".
103         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
104         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
105         (linux_xfer_osdata_modules): Likewise.
106         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
107         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
108         (mips_o64_push_dummy_call): Likewise.
109         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
110         "op".
111         * mi/mi-main.c (list_available_thread_groups): Rename inner
112         "tuple_emitter".
113         (mi_cmd_data_read_memory): Rename inner "opts".
114         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
115         "tuple_emitter".
116         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
117         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
118         more inner scope.
119         (parse_partial_symbols): Rename inner "pst", "p", "name"
120         * main.c (captured_main_1): Rename inner "i"s.
121         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
122         "oso2".
123         * linux-tdep.c (linux_info_proc): Rename inner "filename".
124         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
125         * infrun.c (handle_no_resumed): Don't redeclare "thread".
126         (handle_signal_stop): Rename inner "gdbarch".
127         (handle_command): Declare "signum" in loop header.
128         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
129         "status".
130         (examine_prologue): Rename inner "sol" and "sof".
131         (ia64_extract_return_value): Rename inner "val".  Declare another
132         "val" in a more inner scope.
133         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
134         inner scope.
135         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
136         "except".
137         * findvar.c (default_read_var_value): Don't redeclare "addr".
138         * f-exp.y (yylex): Declare "i" in loop header.
139         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
140         Rename inner "type", "expect_type".
141         (evaluate_subexp_for_sizeof): Rename inner "pc".
142         * elfread.c (elf_symfile_read): Rename inner "abfd".
143         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
144         "bytes_read".
145         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
146         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
147         (dwarf_decode_line_header): Rename inner "lh".
148         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
149         "offset".  Declare "i" in loop header.
150         (disassemble_dwarf_expression): Rename inner "addr_size".
151         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
152         inner "result".
153         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
154         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
155         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
156         "inner_list_emitter".
157         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
158         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
159         declaration in a block.
160         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
161         * cp-valprint.c (cp_print_value_fields): Don't redeclare
162         "obstack_final_size".
163         * cp-support.c (inspect_type): Declare "i" in loop header.
164         * compile/compile.c (compile_instance::insert_symbol_error):
165         Rename inner "e".
166         * common/agent.c (agent_run_command): Remove inner "ret"
167         declaration.
168         * coffread.c (coff_symfile_read): Rename inner "name".
169         (coff_symfile_read): Rename inner "abfd".
170         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
171         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
172         "high".
173         * c-exp.y (lex_one_token): Move "len" declaration lower.
174         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
175         "gdbarch".
176         (create_exception_master_breakpoint): Likewise.  Don't redeclare
177         "b".
178         (watch_command_1): Declare "mark" later.
179         (clear_command): Don't shadow "a" or "b".
180         (delete_command): Rename inner "b".
181         (delete_trace_command): Likewise.
182         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
183         "op".
184         (arm_gdbarch_init): Remove inner "e_flags".
185         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
186         "offset" in inner blocks.
187
188 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
189
190         * dwarf-index-write.c (file_write): Don't write if the vector is
191         empty.
192
193 2018-10-05  Tom de Vries  <tdevries@suse.de>
194
195         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
196         PyArg_ParseTuple call.
197
198 2018-10-05  Tom de Vries  <tdevries@suse.de>
199
200         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
201         PyArg_ParseTuple call.
202
203 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
204
205         * psymtab.c (recursively_search_psymtabs): Reformat parameters
206         to avoid exceeding 80 characters per line limit.
207
208 2018-10-04  Tom Tromey  <tom@tromey.com>
209
210         * symfile.c (syms_from_objfile_1, finish_new_objfile)
211         (reread_symbols): Update.
212         * complaints.h (clear_complaints): Remove argument.
213         * complaints.c (enum complaint_series): Remove.
214         (series): Remove global.
215         (complaint_internal): Update.
216         (clear_complaints): Remove argument.
217
218 2018-10-04  Tom Tromey  <tom@tromey.com>
219
220         * symfile.c (symbol_file_add_with_addrs): Do not print "no
221         debugging symbols" message if there is a separate debug objfile.
222
223 2018-10-04  Tom Tromey  <tom@tromey.com>
224
225         PR cli/19551:
226         * symfile.c (symbol_file_add_with_addrs): Update output.
227         * psymtab.c (require_partial_symbols): Update output.
228
229 2018-10-04  Tom Tromey  <tom@tromey.com>
230
231         PR cli/22234:
232         * complaints.c: Emit \n.
233
234 2018-10-04  Tom Tromey  <tom@tromey.com>
235
236         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
237         (separate_debug_file_exists, find_separate_debug_file)
238         (add_symbol_file_command, reread_symbols, allocate_symtab)
239         (allocate_compunit_symtab): Use filtered printing, not
240         unfiltered.
241         * psymtab.c (require_partial_symbols, dump_psymtab)
242         (allocate_psymtab): Use filtered printing, not unfiltered.
243
244 2018-10-04  Tom Tromey  <tom@tromey.com>
245
246         * complaints.c (complaint_internal): Correctly check complaint
247         count.
248
249 2018-10-04  Tom Tromey  <tom@tromey.com>
250
251         * complaints.h (struct complaints): Remove declaration.
252         * complaints.c (clear_complaints): Remove an unused variable.
253
254 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
255
256         * MAINTAINERS (Write After Approval): Add self.
257
258 2018-10-03  Tom Tromey  <tom@tromey.com>
259
260         * guile/scm-value.c (gdbscm_value_to_string): Initialize
261         "buffer_contents".
262         * coffread.c (coff_symtab_read): Initialize "newobj".
263
264 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
265
266         * dwarf2read.c (read_func_scope): Remove struct keyword in
267         range-based for.
268
269 2018-10-03  Tom Tromey  <tom@tromey.com>
270
271         * README: Mention --enable-ubsan.
272         * NEWS: Mention --enable-ubsan.
273         * acinclude.m4: Include sanitize.m4.
274         * configure: Rebuild.
275         * configure.ac: Call AM_GDB_UBSAN.
276         * sanitize.m4: New file.
277
278 2018-10-03  Tom Tromey  <tom@tromey.com>
279
280         * expression.h (enum exp_opcode): Use uint8_t as base type.
281         * expprint.c (op_name): Handle invalid opcodes.
282
283 2018-10-03  Tom Tromey  <tom@tromey.com>
284
285         * parse.c (prefixify_expression): Add assert.
286         (parse_exp_in_context_1): Throw exception if the expression is
287         empty.
288
289 2018-10-03  Tom Tromey  <tom@tromey.com>
290
291         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
292
293 2018-10-03  Tom Tromey  <tom@tromey.com>
294
295         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
296
297 2018-10-03  Tom Tromey  <tom@tromey.com>
298
299         * dwarf2read.c (read_subrange_type): Make "negative_mask"
300         unsigned.
301
302 2018-10-03  Tom Tromey  <tom@tromey.com>
303
304         * findvar.c (extract_integer): Do work in an unsigned type.
305
306 2018-10-03  Tom Tromey  <tom@tromey.com>
307
308         * common/enum-flags.h (enum_flags::operator~): Add static assert.
309         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
310         base type.
311         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
312         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
313         type.
314         * c-lang.h (enum c_string_type_values): Use unsigned as base
315         type.
316         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
317
318 2018-10-03  Tom Tromey  <tom@tromey.com>
319
320         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
321         <~dwarf2_frame_state_reg_info>: Update.
322         <dwarf2_frame_state_reg_info>: Update.
323         <alloc_regs>: Add assertion.  Update.
324         <reg>: Now a std::vector.
325         <num_regs>: Remove.
326         <swap>: Update.
327         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
328         (execute_cfa_program_test, dwarf2_frame_cache): Update.
329
330 2018-10-03  Tom Tromey  <tom@tromey.com>
331
332         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
333
334 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
335
336         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
337
338 2018-10-02  Tom Tromey  <tom@tromey.com>
339
340         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
341
342 2018-10-02  John Darrington <john@darrington.wattle.id.au>
343
344         * NEWS: Mention changed commands.
345         * ser-uds.c: New file.
346         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
347         * configure: Regenerate.
348         * Makefile.in: Add new file.
349         * serial.c (serial_open): Check if filename is a socket
350           and lookup the appropriate interface accordingly.
351
352 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
353
354         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
355         define.
356         (AARCH64_EXTRA_MAGIC): Likewise.
357         (AARCH64_FPSIMD_MAGIC): Likewise.
358         (AARCH64_SVE_MAGIC): Likewise.
359         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
360         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
361         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
362         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
363         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
364         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
365         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
366         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
367         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
368         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
369         (read_aarch64_ctx): Add function.
370         (aarch64_linux_sigframe_init): Detect FP registers.
371
372 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
373
374         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
375         (AARCH64_D0_REGNUM): Likewise.
376         (AARCH64_S0_REGNUM): Likewise.
377         (AARCH64_H0_REGNUM): Likewise.
378         (AARCH64_B0_REGNUM): Likewise.
379         (AARCH64_SVE_V0_REGNUM): Likewise.
380         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
381         (AARCH64_D0_REGNUM): Likewise.
382         (AARCH64_S0_REGNUM): Likewise.
383         (AARCH64_H0_REGNUM): Likewise.
384         (AARCH64_B0_REGNUM): Likewise.
385         (AARCH64_SVE_V0_REGNUM): Likewise.
386
387 2018-10-01  Gary Benson <gbenson@redhat.com>
388
389         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
390         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
391         prfpregset_t instead of gdb_prfpregset_t.
392         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
393         * configure, config.in: Rebuild.
394
395 2018-10-01  Gary Benson <gbenson@redhat.com>
396
397         * common/gdb_proc_service.h: New file, factored out from...
398         * gdb_proc_service.h: Moved common code to the above file.
399         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
400
401 2018-10-01  Gary Benson <gbenson@redhat.com>
402
403         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
404         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
405
406 2018-10-01  Gary Benson <gbenson@redhat.com>
407
408         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
409         (AC_CHECK_HEADERS): Check for linux/elf.h.
410         * configure, config.in: Rebuild.
411         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
412         doesn't define elf_fpregset_t.
413
414 2018-10-01  Gary Benson <gbenson@redhat.com>
415
416         * gdb_proc_service.h: Whitespace change.
417
418 2018-10-01  Tom Tromey  <tom@tromey.com>
419
420         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
421         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
422         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
423
424 2018-10-01  Tom Tromey  <tom@tromey.com>
425
426         * README: Minor change.
427
428 2018-09-30  Pedro Alves  <palves@redhat.com>
429
430         * darwin-nat-info.c (darwin_debug_regions_recurse)
431         (info_mach_exceptions_command): Remove unused local variables.
432         * darwin-nat.c (darwin_decode_notify_message)
433         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
434         (darwin_stop_inferior, darwin_setup_exceptions)
435         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
436         (darwin_nat_target::attach, darwin_nat_target::detach)
437         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
438         local variables.
439         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
440         variables.
441
442 2018-09-29  Tom Tromey  <tom@tromey.com>
443
444         * README: Remove some leftover text.
445
446 2018-09-29  Tom Tromey  <tom@tromey.com>
447
448         * PROBLEMS: Rewrite.
449         * README: Update.
450
451 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
452
453         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
454         case with explicit breakpoint kind.
455         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
456         'additional_info' and related logic.
457         (riscv_debug_breakpoints): New variable.
458         (riscv_breakpoint_kind_from_pc): Use the length of the existing
459         instruction to determine the breakpoint kind.
460         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
461         flag.  Update description of 'set/show riscv
462         use-compressed-breakpoints' flag.
463
464 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
465
466         (NEWS): Mention changes to frame related commands.
467         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
468         (add_prefix_cmd_suppress_notification): New function.
469         (add_com_suppress_notification): Call
470         add_cmd_suppress_notification.
471         * command.h (add_cmd_suppress_notification): Declare.
472         (add_prefix_cmd_suppress_notification): Declare.
473         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
474         (parse_frame_specification): Moved from stack.c, with
475         simplification to handle a single argument.
476         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
477         switch to the selected frame.  Add a header comment.
478         * stack.c: Remove 'safe-ctype.h' include.
479         (find_frame_for_function): Add declaration.
480         (find_frame_for_address): New function.
481         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
482         (frame_selection_by_function_completer): New function.
483         (info_frame_command): Rename to...
484         (info_frame_command_core): ...this, and update parameter types.
485         (select_frame_command): Rename to...
486         (select_frame_command_core): ...this, and update parameter types.
487         (frame_command): Rename to...
488         (frame_command_core): ...this, and update parameter types.
489         (class frame_command_helper): New class to wrap implementations of
490         frame related sub-commands.
491         (frame_apply_cmd_list): New static global.
492         (frame_cmd_list): Make static.
493         (select_frame_cmd_list): New global for sub-commands.
494         (info_frame_cmd_list): New global for sub-commands.
495         (_initialize_stack): Register sub-commands for 'frame',
496         'select-frame', and 'info frame'.  Update 'frame apply' commands
497         to use frame_apply_cmd_list.  Move function local static
498         frame_apply_list to file static frame_apply_cmd_list for
499         consistency.
500         * stack.h (select_frame_command): Delete declarationn.
501         (select_frame_for_mi): Declare new function.
502
503 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
504
505         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
506         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
507         and NOP.
508
509 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
510
511         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
512
513 2018-09-26  Tom Tromey  <tom@tromey.com>
514
515         * valops.c (auto_abandon): Remove dead code.
516
517 2018-09-26  Tom Tromey  <tom@tromey.com>
518
519         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
520
521 2018-09-24  Tom Tromey  <tom@tromey.com>
522
523         * common/pathstuff.c (get_standard_cache_dir): Make
524         "xdg_cache_home" and "home" const.
525         * top.c (init_history): Make "tmpenv" const.
526         * main.c (get_init_files): Make "homedir" const.
527
528 2018-09-23  Tom Tromey  <tom@tromey.com>
529
530         PR python/18852:
531         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
532
533 2018-09-23  Tom Tromey  <tom@tromey.com>
534
535         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
536         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
537         * python/python-internal.h (gdbpy_handle_exception): Declare.
538         * python/py-utils.c (gdbpy_handle_exception): New function.
539
540 2018-09-23  Tom Tromey  <tom@tromey.com>
541
542         PR python/17284:
543         * python/py-type.c (typy_template_argument): Check for negative
544         argument number.
545
546 2018-09-23  Tom Tromey  <tom@tromey.com>
547
548         PR python/14062:
549         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
550
551 2018-09-23  Tom Tromey  <tom@tromey.com>
552
553         PR python/18170:
554         * python/py-value.c (valpy_int): Allow conversion from pointer
555         type.
556
557 2018-09-23  Tom Tromey  <tom@tromey.com>
558
559         PR python/20126:
560         * python/py-value.c (valpy_int): Respect type sign.
561
562 2018-09-23  Tom Tromey  <tom@tromey.com>
563
564         PR python/18352;
565         * python/py-value.c (valpy_float): Allow conversions from int or
566         char.
567         (valpy_int, valpy_long): Allow conversions from float.
568
569 2018-09-23  Tom Tromey  <tom@tromey.com>
570
571         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
572         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
573
574 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
575
576         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
577         __sighndlr.
578         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
579
580 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
581
582         * windows-nat.c (windows_nat_target::wait): Remove a spurious
583         target_terminal::ours().
584
585 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
586
587         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
588         of vl to ULONGEST.
589
590 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
591
592         * breakpoint.c (update_inserted_breakpoint_locations): Remove
593         redundant condition.
594
595 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
596
597         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
598
599         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
600         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
601         * sol-thread.c (ps_pdmodel): Don't guard definition.
602
603         * procfs.c: Fix formatting.
604
605         * procfs.c (sysset_t_alloc): Remove.
606         (create_procinfo): Use XNEW instead of sysset_t_alloc.
607         (procfs_debug_inferior): Likewise.
608         (procfs_set_exec_trap): Likewise.
609         (proc_set_traced_sysentry): Don't allocate argp dynamically.
610         (proc_set_traced_sysexit): Likewise.
611
612         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
613         (dead_procinfo): Likewise.
614         (proc_warn): Likewise.
615         (proc_error): Likewise.
616         (proc_get_LDT_entry): Likewise.
617         (do_attach): Likewise.
618         (procfs_target::pid_to_str): Likewise.
619         (iterate_over_mappings): Likewise.
620
621         * procfs.c (create_procinfo): Fix ARI warning.
622         (proc_get_status): Likewise.
623         (proc_stop_process): Likewise.
624         (proc_run_process): Likewise.
625         (proc_kill): Likewise.
626         (proc_get_LDT_entry): Likewise.
627         (procfs_find_LDT_entry): Likewise.
628         (proc_update_threads): Likewise.
629         (proc_iterate_over_threads): Likewise.
630         (do_attach): Likewise.
631         (procfs_xfer_memory): Likewise.
632         (invalidate_cache): Likewise.
633         (procfs_target::resume): Likewise.
634         (procfs_init_inferior): Likewise.
635         (procfs_set_exec_trap): Likewise.
636         (procfs_target::thread_alive): Likewise.
637         (procfs_target::pid_to_exec_file): Likewise.
638         (iterate_over_mappings): Likewise.
639         (procfs_target::make_corefile_notes): Likewise.
640         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
641
642         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
643         (procfs_find_LDT_entry): Likewise.
644         * sol-thread.c (ps_lgetLDT): Likewise.
645
646 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
647
648         PR tdep/17903
649         * procfs.c (procfs_target): Declare pid_to_exec_file.
650         (procfs_target::pid_to_exec_file): New.
651
652 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
653
654         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
655         renaming.
656         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
657         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
658
659 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
660
661         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
662         (supply_fpregset, fill_fpregset): Move ...
663         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
664         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
665         Remove references to ioctl-based procfs.
666         Include <sys/reg.h>.
667         Remove PR_MODEL_NATIVE guards.
668         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
669         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
670
671 2018-09-19  Xavier Roirand  <roirand@adacore.com>
672
673         PR gdb/20981:
674         * solib-darwin.c (darwin_get_dyld_bfd): New function.
675         (darwin_solib_get_all_image_info_addr_at_init): Update call.
676         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
677
678 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
679
680         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
681         (fbsd_print_sockaddr_in6): Likewise.
682
683 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
684             Chris January  <chris.january@arm.com>
685
686         * eval.c (skip_undetermined_arglist): Skip argument list helper.
687         (evaluate_subexp_standard): Return a dummy type when
688         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
689         OP_F77_UNDETERMINED_ARGLIST case.
690         * expression.h (enum noside): Update comment.
691
692 2018-09-19  George Vasick <george.vasick@oracle.com>
693
694         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
695
696 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
697             April Chin <april.chin@oracle.com>
698             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
699
700         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
701         uint_t lwpid_t.
702         (create_procinfo): Print pids in /proc without leading zeros.
703
704 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
705
706         * nios2-tdep.c (nios2_gcc_target_options): New.
707         (nios2_gdb_arch_init): Install new hook.
708
709 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
710
711         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
712         New file.
713         * update-gnulib.sh: Apply patch.
714         * configure: Re-generate.
715
716 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
717
718         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
719         description.  Make "info proc" command descriptions more
720         consistent.
721
722 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
723
724         * NEWS: Mention 'info proc files' command.
725
726 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
727
728         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
729         descriptors for IP_FILES and IP_ALL.
730
731 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
732
733         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
734         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
735         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
736         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
737         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
738         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
739         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
740         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
741         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
742         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
743         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
744         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
745         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
746         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
747         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
748         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
749         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
750         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
751         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
752         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
753         (struct fbsd_sockaddr_un): New types.
754         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
755         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
756         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
757         (fbsd_core_info_proc_files): New functions.
758         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
759         IP_ALL.
760         * fbsd-tdep.h (fbsd_info_proc_files_header)
761         (fbsd_info_proc_files_entry): New.
762
763 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
764
765         * defs.h (enum info_proc_what) [IP_FILES]: New value.
766         * infcmd.c (info_proc_cmd_files): New function.
767         (_initialize_infcmd): Register 'info proc files' command.
768
769 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
770
771         * gnulib/aclocal-m4-deps.mk: Re-generate.
772         * gnulib/aclocal.m4: Re-generate.
773         * gnulib/config.in: Re-generate.
774         * gnulib/configure: Re-generate.
775         * gnulib/import/Makefile.am: Re-generate.
776         * gnulib/import/Makefile.in: Re-generate.
777         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
778         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
779         * gnulib/import/arpa_inet.in.h: New file.
780         * gnulib/import/inet_ntop.c: New file.
781         * gnulib/import/m4/arpa_inet_h.m4: New file.
782         * gnulib/import/m4/inet_ntop.m4: New file.
783         * gnulib/import/m4/netinet_in_h.m4: New file.
784         * gnulib/import/m4/socklen.m4: New file.
785         * gnulib/import/m4/sockpfaf.m4: New file.
786         * gnulib/import/m4/stdalign.m4: New file.
787         * gnulib/import/m4/sys_uio_h.m4: New file.
788         * gnulib/import/netinet_in.in.h: New file.
789         * gnulib/import/stdalign.in.h: New file.
790         * gnulib/import/sys_socket.c: New file.
791         * gnulib/import/sys_socket.in.h: New file.
792         * gnulib/import/sys_uio.in.h: New file.
793         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
794         module.
795
796 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
797
798         * gnulib/aclocal-m4-deps.mk: New file.
799         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
800         deterministically.
801
802 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
803
804         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
805         KVE_PATH.
806
807 2018-09-18  Tom Tromey  <tom@tromey.com>
808
809         * compile/compile-object-load.c (struct
810         link_hash_table_cleanup_data): Add constructor and destructor.
811         Use DISABLE_COPY_AND_ASSIGN.
812         (~link_hash_table_cleanup_data): Rename from
813         link_hash_table_free.  Now a destructor.
814         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
815
816 2018-09-18  Tom Tromey  <tom@tromey.com>
817
818         * compile/compile-object-run.c (do_module_cleanup): Use delete.
819         * compile/compile-object-load.c (struct munmap_list): Move to
820         header file.
821         (munmap_list::add): Rename from munmap_list_add; rewrite.
822         (munmap_list::~munmap_list): Rename from munmap_list_free.
823         (munmap_listp_free_cleanup): Remove.
824         (compile_object_load): Update.
825         * compile/compile-object-load.h (struct munmap_list): Move from
826         compile-object-load.c.  Rewrite.
827
828 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
829
830         * aarch64-tdep.c (pass_in_v): Use register size.
831         (aarch64_extract_return_value): Likewise.
832         (aarch64_store_return_value): Likewise.
833
834 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
835
836         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
837         rlim_t.
838
839 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
840
841         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
842         Fix short help line.
843
844 2018-09-17  Tom Tromey  <tom@tromey.com>
845
846         PR python/20445:
847         * configure: Rebuild.
848         * configure.ac: Conditionally use -DNDEBUG for Python.
849
850 2018-09-17  Tom Tromey  <tom@tromey.com>
851
852         * configure: Rebuild.
853         * configure.ac: Use gmp as a library dependency when checking for
854         mpfr.
855
856 2018-09-17  Pedro Alves  <palves@redhat.com>
857
858         * python/py-inferior.c (find_inferior_object): Delete.
859
860 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
861
862         * compile/compile-cplus-types.c
863         (compile_cplus_instance::enter_scope): Don't use new_scope after
864         std::move.
865
866 2018-09-17  Tom Tromey  <tom@tromey.com>
867
868         * common/pathstuff.c (get_standard_cache_dir): Use
869         ~/Library/Caches on macOS.
870         * common/pathstuff.h (get_standard_cache_dir): Update comment.
871
872 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
873
874         PR python/23669
875         * breakpoint.c (commands_cmd_element): New.
876         (_initialize_breakpoint): Assign commands_cmd_element.
877         * breakpoint.h (commands_cmd_element): New.
878         * cli/cli-script.c (while_cmd_element, if_command,
879         define_cmd_element): New.
880         (command_name_equals): Remove.
881         (process_next_line): Compare commands by pointer, not by name.
882         (_initialize_cli_script): Assign the various cmd_list_element
883         variables.
884         * compile/compile.c (compile_cmd_element): New.
885         (_initialize_compile): Assign compile_cmd_element.
886         * compile/compile.h (compile_cmd_element): New.
887         * guile/guile.c (guile_cmd_element): New.
888         (install_gdb_commands): Assign guile_cmd_element.
889         * guile/guile.h (guile_cmd_element): New.
890         * python/python.c (python_cmd_element): New.
891         (_initialize_python): Assign python_cmd_element.
892         * python/python.h (python_cmd_element): New.
893         * tracepoint.c (while_stepping_cmd_element): New.
894         (_initialize_tracepoint): Assign while_stepping_cmd_element.
895         * tracepoint.h (while_stepping_cmd_element): New.
896
897 2018-09-17  Tom Tromey  <tom@tromey.com>
898
899         * infrun.c (save_infcall_suspend_state): Return
900         infcall_suspend_state_up.
901         (save_infcall_control_state): Return infcall_control_state_up.
902         * inferior.h (save_infcall_suspend_state)
903         (save_infcall_control_state): Declare later.  Return unique
904         pointers.
905
906 2018-09-17  Tom Tromey  <tom@tromey.com>
907
908         * infrun.c (struct stop_context): Declare constructor,
909         destructor, "changed" method.
910         (stop_context::stop_context): Rename from save_stop_context.
911         (stop_context::~stop_context): Rename from
912         release_stop_context_cleanup.
913         (normal_stop): Update.
914         (stop_context::changed): Rename from stop_context_changed.  Return
915         bool.
916
917 2018-09-17  Tom Tromey  <tom@tromey.com>
918
919         * inferior.h (struct infcall_suspend_state_deleter): New.
920         (infcall_suspend_state_up): New typedef.
921         (struct infcall_control_state_deleter): New.
922         (infcall_control_state_up): New typedef.
923         (make_cleanup_restore_infcall_suspend_state)
924         (make_cleanup_restore_infcall_control_state): Don't declare.
925         * infcall.c (call_function_by_hand_dummy): Update.
926         * infrun.c (do_restore_infcall_suspend_state_cleanup)
927         (make_cleanup_restore_infcall_suspend_state): Remove.
928         (do_restore_infcall_control_state_cleanup)
929         (make_cleanup_restore_infcall_control_state): Remove.
930
931 2018-09-17  Tom Tromey  <tom@tromey.com>
932
933         * gdbthread.h (struct thread_control_state): Add initializer.
934         (class thread_info) <control>: Remove initializer.
935         * inferior.h (struct inferior_control_state): Add initializer.
936         (class inferior) <control>: Remove initializer.
937         (exit_inferior_1): Update.
938         * infrun.c (struct infcall_control_state): Add constructors.
939         (save_infcall_control_state): Use new.
940         (restore_infcall_control_state, discard_infcall_control_state):
941         Use delete.
942
943 2018-09-17  Tom Tromey  <tom@tromey.com>
944
945         * infrun.c (struct infcall_suspend_state) <registers>: Now a
946         unique_ptr.
947         <siginfo_data>: Now a unique_xmalloc_ptr.
948         (save_infcall_suspend_state, restore_infcall_suspend_state)
949         (discard_infcall_suspend_state)
950         (get_infcall_suspend_state_regcache): Update.
951
952 2018-09-17  Tom Tromey  <tom@tromey.com>
953
954         * gdbthread.h (struct thread_suspend_state): Add initializers.
955         (class thread_info) <suspend>: Remove initializer.
956         * infrun.c (struct infcall_suspend_state): Add initializers.
957         (save_infcall_suspend_state): Use new.
958         (discard_infcall_suspend_state): Use delete.
959
960 2018-09-16  Tom Tromey  <tom@tromey.com>
961
962         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
963         Remove.
964         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
965         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
966         (py_varobj_iter_new): Likewise.
967         (py_varobj_get_iterator): Use gdbpy_ref.
968
969 2018-09-16  Tom Tromey  <tom@tromey.com>
970
971         * python/py-threadevent.c (py_get_event_thread): Simplify.
972         * python/py-inferior.c (infpy_thread_from_thread_handle):
973         Return immediately after calling thread_to_thread_object.  Use
974         Py_RETURN_NONE.
975         (thread_to_thread_object): Set the exception on a NULL return.
976
977 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
978
979         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
980
981 2018-09-16  Tom Tromey  <tom@tromey.com>
982
983         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
984         Remove.
985
986 2018-09-16  Tom Tromey  <tom@tromey.com>
987
988         * python/python-internal.h (thread_to_thread_object): Change
989         return type.
990         * python/py-inferior.c (thread_to_thread_object): Return a new
991         reference.
992         (infpy_thread_from_thread_handle): Update.
993         * python/py-infthread.c (gdbpy_selected_thread): Update.
994         * python/py-stopevent.c (create_stop_event_object): Update.
995         * python/py-threadevent.c (py_get_event_thread): Return a new
996         reference.
997         (py_get_event_thread): Update.
998         * python/py-event.h (py_get_event_thread): Change return type.
999         * python/py-continueevent.c (create_continue_event_object):
1000         Update.
1001
1002 2018-09-16  Tom Tromey  <tom@tromey.com>
1003
1004         * python/py-progspace.c (pspy_get_objfiles): Update.
1005         * python/python-internal.h (objfile_to_objfile_object): Change
1006         return type.
1007         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1008         Update.
1009         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1010         Update.
1011         * python/python.c (gdbpy_get_current_objfile): Update.
1012         (gdbpy_objfiles): Update.
1013         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1014         Update.
1015         (objfile_to_objfile_object): Return a new reference.
1016         * python/py-symtab.c (stpy_get_objfile): Update.
1017         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1018         Update.
1019
1020 2018-09-16  Tom Tromey  <tom@tromey.com>
1021
1022         * python/py-inferior.c (infpy_get_progspace): Update.
1023         * python/python-internal.h (pspace_to_pspace_object): Change
1024         return type.
1025         * python/py-newobjfileevent.c
1026         (create_clear_objfiles_event_object): Update.
1027         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1028         Update.
1029         * python/python.c (gdbpy_get_current_progspace): Update.
1030         (gdbpy_progspaces): Update.
1031         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1032         reference.
1033         * python/py-objfile.c (objfpy_get_progspace): Update.
1034         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1035         Update.
1036
1037 2018-09-16  Tom Tromey  <tom@tromey.com>
1038
1039         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1040         (solib_name, block_for_pc, find_pc_line): New functions.
1041         (execute_unwinders): Update.
1042         * python/py-block.c (gdbpy_block_for_pc): Remove.
1043         * python/py-inferior.c (infpy_get_progspace): New function.
1044         (inferior_object_getset) <progspace>: Add.
1045         * python/py-progspace.c (pspy_objfiles): Rewrite.
1046         (pspy_solib_name, pspy_block_for_pc)
1047         (pspy_find_pc_line, pspy_is_valid): New functions.
1048         (progspace_object_methods): Add entries for solib_name,
1049         block_for_pc, find_pc_line, is_valid.
1050         * python/python-internal.h (gdbpy_block_for_pc)
1051         (build_objfiles_list): Don't declare.
1052         * python/python.c: Don't include solib.h.
1053         (gdbpy_solib_name, gdbpy_find_pc_line)
1054         (gdbpy_get_current_progspace, build_objfiles_list)
1055         (gdbpy_objfiles): Remove.
1056         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1057         solib_name, find_pc_line>: Remove entries.
1058
1059 2018-09-16  Tom Tromey  <tom@tromey.com>
1060
1061         * top.c (new_ui_command): Use GNU style for metasyntactic
1062         variables.
1063         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1064         variables.
1065         * maint.c (maintenance_translate_address): Remove "<>" around
1066         text.
1067         * interps.c (interpreter_exec_cmd): Use GNU style for
1068         metasyntactic variables.
1069         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1070         metasyntactic variables.
1071         * tracepoint.c (tfind_range_command): Use GNU style for
1072         metasyntactic variables.
1073         (tfind_outside_command): Likewise.
1074         (_initialize_tracepoint): Likewise.
1075         * remote.c (extended_remote_target::create_inferior): Use GNU
1076         style for metasyntactic variables.
1077         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1078         metasyntactic variables.
1079         (adi_assign_command): Likewise.
1080
1081 2018-09-16  Tom Tromey  <tom@tromey.com>
1082
1083         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1084         metasyntactic variables.  Print message if no disassembler options
1085         are available.
1086
1087 2018-09-15  Tom Tromey  <tom@tromey.com>
1088
1089         * infcmd.c (get_inferior_args): Return const char *.
1090         * inferior.h (get_inferior_args): Return type now const.
1091         * linux-tdep.c (linux_fill_prpsinfo): Update.
1092         * procfs.c (procfs_target::make_corefile_notes): Update.
1093
1094 2018-09-07  Tom Tromey  <tom@tromey.com>
1095
1096         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1097         inside the TRY.
1098
1099 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1100
1101         * nios2-tdep.c (nios2_type_align): New.
1102         (nios2_gdb_arch_init): Install type_align hook.
1103
1104 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1105
1106         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1107         type that is neither object file owned, nor gdbarch owned.
1108         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1109         gdbarch is non-NULL.
1110         (alloc_type_instance): Allocate non-objfile owned types on the
1111         gdbarch obstack.
1112         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1113         using TYPE_ALLOC to ensure memory is allocated on the correct
1114         obstack.
1115         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1116         obstack, or the gdbarch obstack.
1117         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1118
1119 2018-09-14  Tom Tromey  <tom@tromey.com>
1120
1121         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1122         block.
1123
1124 2018-09-14  Tom Tromey  <tom@tromey.com>
1125
1126         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1127
1128 2018-09-13  Tom Tromey  <tom@tromey.com>
1129
1130         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1131         static.
1132
1133 2018-09-13  Tom Tromey  <tom@tromey.com>
1134
1135         * exec.c (try_open_exec_file): Use std::string.
1136
1137 2018-09-13  Tom Tromey  <tom@tromey.com>
1138
1139         * utils.h (gdb_bfd_errmsg): Return std::string.
1140         * exec.c (exec_file_attach): Update.
1141         * compile/compile-object-load.c (compile_object_load): Update.
1142         * utils.c (gdb_bfd_errmsg): Return std::string.
1143
1144 2018-09-13  Tom Tromey  <tom@tromey.com>
1145
1146         * procfs.c (struct procinfo_deleter): New.
1147         (procinfo_up): New typedef.
1148         (do_destroy_procinfo_cleanup): Remove.
1149         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1150
1151 2018-09-13  Tom Tromey  <tom@tromey.com>
1152
1153         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1154
1155 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1156 2018-09-13  Tom Tromey  <tom@tromey.com>
1157
1158         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1159         (pspy_get_objfiles): New function.
1160         (progspace_object_methods): New.
1161         (pspace_object_type): Add tp_methods callback.
1162         * python/python-internal.h (build_objfiles_list): New
1163         declaration.
1164         * python/python.c (build_objfiles_list): New function.
1165         (gdbpy_objfiles): Implement using build_objfiles_list.
1166         * NEWS: Mention the Progspace.objfiles method.
1167
1168 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1169
1170         * python/py-inferior.c (infpy_get_progspace): New function.
1171         (inferior_object_getset): Add progspace property.
1172         * NEWS: Mention the new property.
1173
1174 2018-09-13  Tom Tromey  <tom@tromey.com>
1175
1176         PR rust/23650:
1177         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1178
1179 2018-09-13  Tom Tromey  <tom@tromey.com>
1180
1181         PR rust/23626:
1182         * rust-lang.c (rust_enum_variant): Now static.
1183         (rust_empty_enum_p): New function.
1184         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1185         Handle empty enum.
1186
1187 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1188
1189         * python/py-inferior.c (infpy_repr): New.
1190         (inferior_object_type): Register infpy_repr.
1191         * python/py-objfile.c (objfpy_repr): New.
1192         (objfile_object_type): Register objfpy_repr.
1193
1194 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1195
1196         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1197
1198 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1199
1200         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1201         typo.
1202
1203 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1204
1205         * common/common-utils.c: Don't include '<sys/stat.h>'.
1206         (is_regular_file): Move to...
1207         * common/filestuff.c (is_regular_file): ... here.
1208         * common/common-utils.h (is_regular_file): Move to...
1209         * common/filestuff.h (is_regular_file): ... here.
1210
1211 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1212
1213         * skip.c (debug_skip): New variable.
1214         (skiplist_entry::do_skip_file_p): Add debug output.
1215         (skiplist_entry::do_skip_gfile_p): Likewise.
1216         (skiplist_entry::skip_function_p): Likewise.
1217         (_initialize_step_skip): Create debug command.
1218         * NEWS: Mention set/show debug skip.
1219
1220 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1221
1222         * darwin-nat.c (should_disable_startup_with_shell):
1223         New function.
1224         (darwin_nat_target::create_inferior): Add call.
1225
1226 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1227
1228         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1229         inf_port, msg_state>: Initialize.
1230         (struct darwin_thread_info) <signaled, single_step>: Change
1231         type and initialize.
1232         (struct darwin_thread_info) <event>: Initialize.
1233
1234 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1235
1236         PR gdb/23555
1237         PR gdb/23558
1238         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1239         guesses.
1240
1241 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1242
1243         Revert:
1244         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1245
1246         PR gdb/23555
1247         PR gdb/23558
1248         * gnulib/aclocal.m4: Regenerate.
1249         * gnulib/config.in: Regenerate.
1250         * gnulib/configure: Regenerate.
1251         * gnulib/import/Makefile.am: Update.
1252         * gnulib/import/Makefile.in: Update.
1253         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1254         * gnulib/import/_Noreturn.h: ... this.
1255         * gnulib/import/alloca.in.h: Update.
1256         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1257         * gnulib/import/arg-nonnull.h: ... this.
1258         * gnulib/import/assure.h: Update.
1259         * gnulib/import/at-func.c: Update.
1260         * gnulib/import/basename-lgpl.c: Update.
1261         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1262         * gnulib/import/c++defs.h: ... this.
1263         * gnulib/import/canonicalize-lgpl.c: Update.
1264         * gnulib/import/cdefs.h: Update.
1265         * gnulib/import/chdir-long.c: Update.
1266         * gnulib/import/chdir-long.h: Update.
1267         * gnulib/import/cloexec.c: Update.
1268         * gnulib/import/cloexec.h: Update.
1269         * gnulib/import/close.c: Update.
1270         * gnulib/import/closedir.c: Update.
1271         * gnulib/import/config.charset: Update.
1272         * gnulib/import/dirent-private.h: Update.
1273         * gnulib/import/dirent.in.h: Update.
1274         * gnulib/import/dirfd.c: Update.
1275         * gnulib/import/dirname-lgpl.c: Update.
1276         * gnulib/import/dirname.h: Update.
1277         * gnulib/import/dosname.h: Update.
1278         * gnulib/import/dup-safer-flag.c: Update.
1279         * gnulib/import/dup-safer.c: Update.
1280         * gnulib/import/dup.c: Update.
1281         * gnulib/import/dup2.c: Update.
1282         * gnulib/import/errno.in.h: Update.
1283         * gnulib/import/error.c: Update.
1284         * gnulib/import/error.h: Update.
1285         * gnulib/import/exitfail.c: Update.
1286         * gnulib/import/exitfail.h: Update.
1287         * gnulib/import/extra/update-copyright: Update.
1288         * gnulib/import/fchdir.c: Update.
1289         * gnulib/import/fcntl.c: Update.
1290         * gnulib/import/fcntl.in.h: Update.
1291         * gnulib/import/fd-hook.c: Update.
1292         * gnulib/import/fd-hook.h: Update.
1293         * gnulib/import/fd-safer-flag.c: Update.
1294         * gnulib/import/fd-safer.c: Update.
1295         * gnulib/import/fdopendir.c: Update.
1296         * gnulib/import/filename.h: Update.
1297         * gnulib/import/filenamecat-lgpl.c: Update.
1298         * gnulib/import/filenamecat.h: Update.
1299         * gnulib/import/flexmember.h: Update.
1300         * gnulib/import/float+.h: Update.
1301         * gnulib/import/float.c: Update.
1302         * gnulib/import/float.in.h: Update.
1303         * gnulib/import/fnmatch.c: Update.
1304         * gnulib/import/fnmatch.in.h: Update.
1305         * gnulib/import/fnmatch_loop.c: Update.
1306         * gnulib/import/fpucw.h: Update.
1307         * gnulib/import/frexp.c: Update.
1308         * gnulib/import/frexpl.c: Update.
1309         * gnulib/import/fstat.c: Update.
1310         * gnulib/import/fstatat.c: Update.
1311         * gnulib/import/getcwd-lgpl.c: Update.
1312         * gnulib/import/getcwd.c: Update.
1313         * gnulib/import/getdtablesize.c: Update.
1314         * gnulib/import/getlogin_r.c: Update.
1315         * gnulib/import/getprogname.c: Update.
1316         * gnulib/import/getprogname.h: Update.
1317         * gnulib/import/gettext.h: Update.
1318         * gnulib/import/gettimeofday.c: Update.
1319         * gnulib/import/glob-libc.h: Update.
1320         * gnulib/import/glob.c: Update.
1321         * gnulib/import/glob.in.h: Update.
1322         * gnulib/import/glob_internal.h: Update.
1323         * gnulib/import/glob_pattern_p.c: Update.
1324         * gnulib/import/globfree.c: Update.
1325         * gnulib/import/hard-locale.c: Update.
1326         * gnulib/import/hard-locale.h: Update.
1327         * gnulib/import/intprops.h: Update.
1328         * gnulib/import/inttypes.in.h: Update.
1329         * gnulib/import/isnan.c: Update.
1330         * gnulib/import/isnand-nolibm.h: Update.
1331         * gnulib/import/isnand.c: Update.
1332         * gnulib/import/isnanl-nolibm.h: Update.
1333         * gnulib/import/isnanl.c: Update.
1334         * gnulib/import/itold.c: Update.
1335         * gnulib/import/libc-config.h: Update.
1336         * gnulib/import/limits.in.h: Update.
1337         * gnulib/import/localcharset.c: Update.
1338         * gnulib/import/localcharset.h: Update.
1339         * gnulib/import/localtime-buffer.c: Update.
1340         * gnulib/import/localtime-buffer.h: Update.
1341         * gnulib/import/lstat.c: Update.
1342         * gnulib/import/m4/00gnulib.m4: Update.
1343         * gnulib/import/m4/__inline.m4: Update.
1344         * gnulib/import/m4/absolute-header.m4: Update.
1345         * gnulib/import/m4/alloca.m4: Update.
1346         * gnulib/import/m4/builtin-expect.m4: Update.
1347         * gnulib/import/m4/canonicalize.m4: Update.
1348         * gnulib/import/m4/chdir-long.m4: Update.
1349         * gnulib/import/m4/close.m4: Update.
1350         * gnulib/import/m4/closedir.m4: Update.
1351         * gnulib/import/m4/configmake.m4: Update.
1352         * gnulib/import/m4/d-ino.m4: Update.
1353         * gnulib/import/m4/d-type.m4: Update.
1354         * gnulib/import/m4/dirent_h.m4: Update.
1355         * gnulib/import/m4/dirfd.m4: Update.
1356         * gnulib/import/m4/dirname.m4: Update.
1357         * gnulib/import/m4/double-slash-root.m4: Update.
1358         * gnulib/import/m4/dup.m4: Update.
1359         * gnulib/import/m4/dup2.m4: Update.
1360         * gnulib/import/m4/eealloc.m4: Update.
1361         * gnulib/import/m4/environ.m4: Update.
1362         * gnulib/import/m4/errno_h.m4: Update.
1363         * gnulib/import/m4/error.m4: Update.
1364         * gnulib/import/m4/exponentd.m4: Update.
1365         * gnulib/import/m4/exponentl.m4: Update.
1366         * gnulib/import/m4/extensions.m4: Update.
1367         * gnulib/import/m4/extern-inline.m4: Update.
1368         * gnulib/import/m4/fchdir.m4: Update.
1369         * gnulib/import/m4/fcntl-o.m4: Update.
1370         * gnulib/import/m4/fcntl.m4: Update.
1371         * gnulib/import/m4/fcntl_h.m4: Update.
1372         * gnulib/import/m4/fdopendir.m4: Update.
1373         * gnulib/import/m4/filenamecat.m4: Update.
1374         * gnulib/import/m4/flexmember.m4: Update.
1375         * gnulib/import/m4/float_h.m4: Update.
1376         * gnulib/import/m4/fnmatch.m4: Update.
1377         * gnulib/import/m4/fnmatch_h.m4: Update.
1378         * gnulib/import/m4/fpieee.m4: Update.
1379         * gnulib/import/m4/frexp.m4: Update.
1380         * gnulib/import/m4/frexpl.m4: Update.
1381         * gnulib/import/m4/fstat.m4: Update.
1382         * gnulib/import/m4/fstatat.m4: Update.
1383         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1384         * gnulib/import/m4/getcwd-path-max.m4: Update.
1385         * gnulib/import/m4/getcwd.m4: Update.
1386         * gnulib/import/m4/getdtablesize.m4: Update.
1387         * gnulib/import/m4/getlogin.m4: Update.
1388         * gnulib/import/m4/getlogin_r.m4: Update.
1389         * gnulib/import/m4/getpagesize.m4: Update.
1390         * gnulib/import/m4/getprogname.m4: Update.
1391         * gnulib/import/m4/gettimeofday.m4: Update.
1392         * gnulib/import/m4/glibc21.m4: Update.
1393         * gnulib/import/m4/glob.m4: Update.
1394         * gnulib/import/m4/glob_h.m4: Update.
1395         * gnulib/import/m4/gnulib-cache.m4: Update.
1396         * gnulib/import/m4/gnulib-common.m4: Update.
1397         * gnulib/import/m4/gnulib-comp.m4: Update.
1398         * gnulib/import/m4/gnulib-tool.m4: Update.
1399         * gnulib/import/m4/hard-locale.m4: Update.
1400         * gnulib/import/m4/include_next.m4: Update.
1401         * gnulib/import/m4/inttypes-pri.m4: Update.
1402         * gnulib/import/m4/inttypes.m4: Update.
1403         * gnulib/import/m4/isnand.m4: Update.
1404         * gnulib/import/m4/isnanl.m4: Update.
1405         * gnulib/import/m4/largefile.m4: Update.
1406         * gnulib/import/m4/limits-h.m4: Update.
1407         * gnulib/import/m4/localcharset.m4: Update.
1408         * gnulib/import/m4/locale-fr.m4: Update.
1409         * gnulib/import/m4/locale-ja.m4: Update.
1410         * gnulib/import/m4/locale-zh.m4: Update.
1411         * gnulib/import/m4/localtime-buffer.m4: Update.
1412         * gnulib/import/m4/longlong.m4: Update.
1413         * gnulib/import/m4/lstat.m4: Update.
1414         * gnulib/import/m4/malloc.m4: Update.
1415         * gnulib/import/m4/malloca.m4: Update.
1416         * gnulib/import/m4/math_h.m4: Update.
1417         * gnulib/import/m4/mbrtowc.m4: Update.
1418         * gnulib/import/m4/mbsinit.m4: Update.
1419         * gnulib/import/m4/mbsrtowcs.m4: Update.
1420         * gnulib/import/m4/mbstate_t.m4: Update.
1421         * gnulib/import/m4/memchr.m4: Update.
1422         * gnulib/import/m4/memmem.m4: Update.
1423         * gnulib/import/m4/mempcpy.m4: Update.
1424         * gnulib/import/m4/memrchr.m4: Update.
1425         * gnulib/import/m4/mkdir.m4: Update.
1426         * gnulib/import/m4/mkstemp.m4: Update.
1427         * gnulib/import/m4/mmap-anon.m4: Update.
1428         * gnulib/import/m4/mode_t.m4: Update.
1429         * gnulib/import/m4/msvc-inval.m4: Update.
1430         * gnulib/import/m4/msvc-nothrow.m4: Update.
1431         * gnulib/import/m4/multiarch.m4: Update.
1432         * gnulib/import/m4/nocrash.m4: Update.
1433         * gnulib/import/m4/off_t.m4: Update.
1434         * gnulib/import/m4/onceonly.m4: Update.
1435         * gnulib/import/m4/open-cloexec.m4: Update.
1436         * gnulib/import/m4/open.m4: Update.
1437         * gnulib/import/m4/openat.m4: Update.
1438         * gnulib/import/m4/opendir.m4: Update.
1439         * gnulib/import/m4/pathmax.m4: Update.
1440         * gnulib/import/m4/rawmemchr.m4: Update.
1441         * gnulib/import/m4/readdir.m4: Update.
1442         * gnulib/import/m4/readlink.m4: Update.
1443         * gnulib/import/m4/realloc.m4: Update.
1444         * gnulib/import/m4/rename.m4: Update.
1445         * gnulib/import/m4/rewinddir.m4: Update.
1446         * gnulib/import/m4/rmdir.m4: Update.
1447         * gnulib/import/m4/save-cwd.m4: Update.
1448         * gnulib/import/m4/secure_getenv.m4: Update.
1449         * gnulib/import/m4/setenv.m4: Update.
1450         * gnulib/import/m4/signal_h.m4: Update.
1451         * gnulib/import/m4/ssize_t.m4: Update.
1452         * gnulib/import/m4/stat-time.m4: Update.
1453         * gnulib/import/m4/stat.m4: Update.
1454         * gnulib/import/m4/std-gnu11.m4: Update.
1455         * gnulib/import/m4/stdbool.m4: Update.
1456         * gnulib/import/m4/stddef_h.m4: Update.
1457         * gnulib/import/m4/stdint.m4: Update.
1458         * gnulib/import/m4/stdio_h.m4: Update.
1459         * gnulib/import/m4/stdlib_h.m4: Update.
1460         * gnulib/import/m4/strchrnul.m4: Update.
1461         * gnulib/import/m4/strdup.m4: Update.
1462         * gnulib/import/m4/strerror.m4: Update.
1463         * gnulib/import/m4/string_h.m4: Update.
1464         * gnulib/import/m4/strstr.m4: Update.
1465         * gnulib/import/m4/strtok_r.m4: Update.
1466         * gnulib/import/m4/sys_socket_h.m4: Update.
1467         * gnulib/import/m4/sys_stat_h.m4: Update.
1468         * gnulib/import/m4/sys_time_h.m4: Update.
1469         * gnulib/import/m4/sys_types_h.m4: Update.
1470         * gnulib/import/m4/tempname.m4: Update.
1471         * gnulib/import/m4/time_h.m4: Update.
1472         * gnulib/import/m4/unistd-safer.m4: Update.
1473         * gnulib/import/m4/unistd_h.m4: Update.
1474         * gnulib/import/m4/warn-on-use.m4: Update.
1475         * gnulib/import/m4/wchar_h.m4: Update.
1476         * gnulib/import/m4/wchar_t.m4: Update.
1477         * gnulib/import/m4/wctype_h.m4: Update.
1478         * gnulib/import/m4/wint_t.m4: Update.
1479         * gnulib/import/malloc.c: Update.
1480         * gnulib/import/malloc/scratch_buffer.h: Update.
1481         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1482         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1483         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1484         * gnulib/import/malloca.c: Update.
1485         * gnulib/import/malloca.h: Update.
1486         * gnulib/import/malloca.valgrind: Update.
1487         * gnulib/import/math.in.h: Update.
1488         * gnulib/import/mbrtowc.c: Update.
1489         * gnulib/import/mbsinit.c: Update.
1490         * gnulib/import/mbsrtowcs-impl.h: Update.
1491         * gnulib/import/mbsrtowcs-state.c: Update.
1492         * gnulib/import/mbsrtowcs.c: Update.
1493         * gnulib/import/memchr.c: Update.
1494         * gnulib/import/memmem.c: Update.
1495         * gnulib/import/mempcpy.c: Update.
1496         * gnulib/import/memrchr.c: Update.
1497         * gnulib/import/mkdir.c: Update.
1498         * gnulib/import/mkstemp.c: Update.
1499         * gnulib/import/msvc-inval.c: Update.
1500         * gnulib/import/msvc-inval.h: Update.
1501         * gnulib/import/msvc-nothrow.c: Update.
1502         * gnulib/import/msvc-nothrow.h: Update.
1503         * gnulib/import/open.c: Update.
1504         * gnulib/import/openat-die.c: Update.
1505         * gnulib/import/openat-priv.h: Update.
1506         * gnulib/import/openat-proc.c: Update.
1507         * gnulib/import/openat.c: Update.
1508         * gnulib/import/openat.h: Update.
1509         * gnulib/import/opendir.c: Update.
1510         * gnulib/import/pathmax.h: Update.
1511         * gnulib/import/pipe-safer.c: Update.
1512         * gnulib/import/rawmemchr.c: Update.
1513         * gnulib/import/readdir.c: Update.
1514         * gnulib/import/readlink.c: Update.
1515         * gnulib/import/realloc.c: Update.
1516         * gnulib/import/ref-add.sin: Update.
1517         * gnulib/import/ref-del.sin: Update.
1518         * gnulib/import/rename.c: Update.
1519         * gnulib/import/rewinddir.c: Update.
1520         * gnulib/import/rmdir.c: Update.
1521         * gnulib/import/same-inode.h: Update.
1522         * gnulib/import/save-cwd.c: Update.
1523         * gnulib/import/save-cwd.h: Update.
1524         * gnulib/import/scratch_buffer.h: Update.
1525         * gnulib/import/secure_getenv.c: Update.
1526         * gnulib/import/setenv.c: Update.
1527         * gnulib/import/signal.in.h: Update.
1528         * gnulib/import/stat-time.c: Update.
1529         * gnulib/import/stat-time.h: Update.
1530         * gnulib/import/stat-w32.c: Update.
1531         * gnulib/import/stat-w32.h: Update.
1532         * gnulib/import/stat.c: Update.
1533         * gnulib/import/stdbool.in.h: Update.
1534         * gnulib/import/stddef.in.h: Update.
1535         * gnulib/import/stdint.in.h: Update.
1536         * gnulib/import/stdio.in.h: Update.
1537         * gnulib/import/stdlib.in.h: Update.
1538         * gnulib/import/str-two-way.h: Update.
1539         * gnulib/import/strchrnul.c: Update.
1540         * gnulib/import/strdup.c: Update.
1541         * gnulib/import/streq.h: Update.
1542         * gnulib/import/strerror-override.c: Update.
1543         * gnulib/import/strerror-override.h: Update.
1544         * gnulib/import/strerror.c: Update.
1545         * gnulib/import/string.in.h: Update.
1546         * gnulib/import/stripslash.c: Update.
1547         * gnulib/import/strnlen1.c: Update.
1548         * gnulib/import/strnlen1.h: Update.
1549         * gnulib/import/strstr.c: Update.
1550         * gnulib/import/strtok_r.c: Update.
1551         * gnulib/import/sys_stat.in.h: Update.
1552         * gnulib/import/sys_time.in.h: Update.
1553         * gnulib/import/sys_types.in.h: Update.
1554         * gnulib/import/tempname.c: Update.
1555         * gnulib/import/tempname.h: Update.
1556         * gnulib/import/time.in.h: Update.
1557         * gnulib/import/unistd--.h: Update.
1558         * gnulib/import/unistd-safer.h: Update.
1559         * gnulib/import/unistd.in.h: Update.
1560         * gnulib/import/unsetenv.c: Update.
1561         * gnulib/import/verify.h: Update.
1562         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1563         * gnulib/import/wchar.in.h: Update.
1564         * gnulib/import/wctype.in.h: Update.
1565         * gnulib/import/xalloc-oversized.h: Update.
1566         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1567         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1568
1569 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1570
1571         * record-btrace.c (get_thread_current_frame): Remove
1572         old_inferior_ptid.
1573
1574 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1575
1576         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1577         with check_tag to 1 if and only if the type is tagged and the
1578         component being searched cannot been found in the current
1579         view. Otherwise, always call ada_to_fixed_type with
1580         check_tag to 0.
1581
1582 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1583
1584         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1585         declaration.
1586         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1587         * ada-varobj.c (ada_varobj_get_number_of_children,
1588         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1589
1590 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1591
1592         * ada-valprint.c (ada_value_print): Use type instead of
1593         enclosing type.
1594
1595 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1596
1597         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1598         an array of access to unconstrained array.
1599
1600 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1601
1602         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1603         (ada_check_typedef): Use it.
1604
1605 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1606
1607         * ada-varobj.c (ada_varobj_describe_struct_child)
1608         (ada_varobj_describe_child): Handle union case like struct one.
1609
1610 2018-09-10  Tom Tromey  <tom@tromey.com>
1611
1612         PR python/18380:
1613         * python/python.c (_initialize_python): Make example in "python"
1614         help work in Python 3.
1615
1616 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1617
1618         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1619         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1620         $(EXEEXT) to the script, as it is not a program.
1621
1622 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1623
1624         * python/py-prettyprint.c (pretty_print_one_value): Return
1625         gdbpy_ref<>.
1626         (print_string_repr): Adjust.
1627         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1628         * python/python-internal.h (apply_varobj_pretty_printer): Return
1629         gdbpy_ref<>.
1630         * varobj.c (varobj_value_get_print_value): Adjust.
1631
1632 2018-09-08  Tom Tromey  <tom@tromey.com>
1633
1634         PR python/16047:
1635         * python/py-prettyprint.c (pretty_print_one_value): Check for
1636         to_string method.
1637
1638 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1639
1640         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1641         replace_operator_with_call.
1642
1643 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1644
1645         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1646
1647 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1648
1649         * ada-typeprint.c (print_range): Print the bounds using TYPE
1650         rather than its TYPE_TARGET_TYPE.
1651
1652 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1653
1654         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1655         call to ada_to_fixed_value_create.
1656
1657 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1658
1659         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1660
1661 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1662
1663         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1664         by calls to error.
1665
1666 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1667
1668         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1669         Move update of loop variable "fi".
1670
1671 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1672
1673         * ada-lang.c (value_assign_to_component): In the case of
1674         big-endian targets, extract the bits of the given VAL
1675         using an src_offset of zero if container is not a scalar.
1676
1677 2018-09-06  Simon Ser  <contact@emersion.fr>
1678
1679         PR gdb/23105
1680         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1681         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1682         * fbsd-tdep.c (fbsd_make_note_desc): New.
1683         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1684         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1685         * target.h (enum target_object) Add FreeBSD-specific
1686         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1687
1688 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1689
1690         * compile/compile-c.h (generate_c_for_variable_locations):
1691         Change reference to pointer.
1692         * compile/compile-c-support.c (compile_program) <compute>:
1693         Likewise.
1694         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1695         (generate_c_for_for_one_variable): Likewise
1696         (generate_c_for_variable_locations): Likewise
1697         * compile/compile-c-types.c (compile_c_instance::convert_type):
1698         Likewise
1699         * compile/compile-cplus-symbols.c (convert_one_symbol):
1700         std::move the scope passed to enter_scope.
1701         * compile/compile-cplus-types.c
1702         (compile_cplus_instance::enter_scope): Make parameter
1703         rvalue-reference.
1704         (compile_cplus_instance::new_scope): Change reference to
1705         pointer.
1706         (compile_cplus_instance::convert_type): Likewise
1707         (compile_cplus_convert_typedef): std::move the scope passed to
1708         enter_scope.
1709         (compile_cplus_convert_struct_or_union): Likewise.
1710         (compile_cplus_convert_enum): Likewise.
1711         (compile_cplus_convert_namespace): Likewise.
1712         * compile/compile-cplus.h (compile_cplus_instance)
1713         <enter_scope>: Make parameter rvalue-reference.
1714         * compile/compile-internal.h (compile_instance)
1715         <get_cached_type>: Likewise
1716         * compile/compile-loc2c.c (push): Likewise
1717         (pushf): Likewise
1718         (unary): Likewise
1719         (binary): Likewise
1720         (print_label): Likewise
1721         (pushf_register_address): Likewise
1722         (pushf_register): Likewise
1723         (do_compile_dwarf_expr_to_c): Likewise
1724         (compile_dwarf_expr_to_c): Likewise
1725         (compile_dwarf_bounds_to_c): Likewise
1726         * compile/compile.c (compile_instance::get_cached_type):
1727         Likewise
1728         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1729         (compile_dwarf_bounds_to_c): Likewise
1730         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1731         (dwarf2_compile_property_to_c): Likewise
1732         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1733         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1734         Likewise
1735
1736 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1737
1738         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1739         * tui/tui-data.c (init_content_element): Don't initialize it.
1740
1741 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1742
1743         * tui/tui-data.h (struct tui_win_info)
1744         <detail::opaque>: Remove.
1745         * tui/tui-data.c (init_win_info): Remove assignment.
1746
1747 2018-09-05  Tom Tromey  <tom@tromey.com>
1748
1749         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1750         -Wformat-nonliteral.
1751         * target-float.c (host_float_ops<T>::to_string)
1752         (host_float_ops<T>::from_string): Use
1753         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1754         * configure: Rebuild.
1755
1756 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1757
1758         * printcmd.c (printf_c_string): Use
1759         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1760         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1761
1762 2018-09-05  Tom Tromey  <tom@tromey.com>
1763
1764         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1765
1766 2018-09-05  Tom de Vries  <tdevries@suse.de>
1767
1768         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1769         with resolve_abstract_p == true.
1770         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1771         defaulting to false. Propagate resolve_abstract_p to
1772         dwarf2_fetch_die_loc_sect_off.
1773         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1774         parameter, defaulting to false.
1775         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1776         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1777         parameter.
1778         * dwarf2read.h (struct die_info): Forward-declare.
1779         (die_info_ptr): New typedef.
1780         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1781
1782 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1783
1784         GDB 8.2 released.
1785
1786 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1787             Pedro Alves  <palves@redhat.com>
1788
1789         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1790         "aclocal-m4-deps.mk".  Include file here.
1791         $(srcdir)/aclocal.m4: Add "configure.ac".
1792         * gnulib/aclocal-m4-deps.mk: New file.
1793         * gnulib/update-gnulib.sh: Automatically update
1794         "aclocal-m4-deps.mk".
1795
1796 2018-09-04  Tom Tromey  <tom@tromey.com>
1797
1798         * configure: Rebuild.
1799         * configure.ac: Remove multi-ice code.
1800
1801 2018-09-04  Tom Tromey  <tom@tromey.com>
1802
1803         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1804         (ada-exp.o): Update.
1805
1806 2018-09-04  Tom Tromey  <tom@tromey.com>
1807
1808         * Makefile.in (printcmd.o, target-float.o): Remove.
1809         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1810
1811 2018-09-04  Tom Tromey  <tom@tromey.com>
1812
1813         * gnulib/Makefile.in: Remove obsolete comment.
1814         * Makefile.in: Remove obsolete comment.
1815
1816 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1817
1818         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1819         line with '+'.
1820
1821 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1822
1823         * riscv-tdep.c: Add 'prologue-value.h' include.
1824         (struct riscv_unwind_cache): New struct.
1825         (riscv_debug_unwinder): New global.
1826         (riscv_scan_prologue): Update arguments, capture register details
1827         from prologue scan.
1828         (riscv_skip_prologue): Reformat arguments line, move end of
1829         prologue calculation into riscv_scan_prologue.
1830         (riscv_frame_cache): Update return type, create
1831         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1832         details.
1833         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1834         (riscv_frame_prev_register): Use the trad_frame within the
1835         riscv_unwind_cache.
1836         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1837         flag.
1838
1839 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1840
1841         * trad-frame.h (trad_frame_set_realreg): Declare.
1842         (trad_frame_set_addr): Declare.
1843         * trad-frame.c (trad_frame_set_realreg): Define new function.
1844         (trad_frame_set_addr): Define new function.
1845         (trad_frame_set_reg_realreg): Use new function.
1846         (trad_frame_set_reg_addr): Use new function.
1847
1848 2018-09-01  Keith Seitz  <keiths@redhat.com>
1849
1850         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1851         pulongest instead of "%lld".
1852         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1853         ATTRIBUTE_UNUSED.
1854
1855 2018-08-31  Tom Tromey  <tom@tromey.com>
1856
1857         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1858         variant part type.
1859
1860 2018-08-31  Pedro Alves  <palves@redhat.com>
1861
1862         * gdbarch.h: Regenerate.
1863
1864 2018-08-31  Pedro Alves  <palves@redhat.com>
1865
1866         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1867         * target.h (Hardware watchpoint interfaces): Describe
1868         continuable/steppable/non-steppable watchpoints.
1869         * gdbarch.h, gdbarch.c: Regenerate.
1870
1871 2018-08-31  Pedro Alves  <palves@redhat.com>
1872
1873         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1874         Delete.
1875         * s390-linux-nat.c
1876         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1877         * target.h (target_ops::have_continuable_watchpoint): Delete.
1878         (target_have_continuable_watchpoint): Delete.
1879         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1880         * target-delegates.c: Regenerate.
1881
1882 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1883
1884         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1885         the files present in "gnulib/import/m4/".
1886
1887 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1888
1889         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1890         c.sw, c.swsp, and c.sdsp.
1891
1892 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1893
1894         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1895         (riscv_read_misa_reg): Don't cache value read into inferior data.
1896         (riscv_new_inferior_data): Delete.
1897         (riscv_inferior_data_cleanup): Delete.
1898         (riscv_inferior_data): Delete.
1899         (riscv_invalidate_inferior_data): Delete.
1900         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1901
1902 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1903
1904         * compile/compile-cplus-types.c
1905         (compile_cplus_instance::leave_scope): Take the address of scope
1906         object.
1907         (compile_cplus_instance::convert_qualified_base): Compare quals
1908         to 0.
1909
1910 2018-08-30  Keith Seitz  <keiths@redhat.com>
1911
1912         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1913         Use "%s" and host_address_to_string instead of "%p" in printf.
1914
1915 2018-08-29  Keith Seitz  <keiths@redhat.com>
1916
1917         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1918         and compile-cplus-types.c.
1919         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1920         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1921         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1922         Declare.
1923         * compile/compile-c-support.c: Include compile-cplus.h.
1924         (load_libcompile): Templatize.
1925         (get_compile_context): "New" function.
1926         (c_get_compile_context): Use get_compile_context.
1927         (cplus_get_compile_context): New function.
1928         (cplus_push_user_expression, cplus_pop_user_expression)
1929         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1930         (cplus_compute_program): Define new structs/functions.
1931         * compile/compile-cplus-symmbols.c: New file.
1932         * compile/compile-cplus-types.c: New file.
1933         * compile/compile-cplus.h: New file.
1934         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1935         Declare.
1936         * compile/compile-object-load.c (get_out_value_type): Use
1937         strncmp_iw when comparing symbol names.
1938         (compile_object_load): Add mst_bss and mst_data.
1939         * compile/compile.c (_initialize_compile): Remove
1940         -Wno-implicit-function-declaration from `compile_args'.
1941         * compile/gcc-cp-plugin.h: New file.
1942         * NEWS: Mention C++ compile support and new debug options.
1943
1944 2018-08-29  Keith Seitz  <keiths@redhat.com>
1945
1946         * linespec.c (collect_info::add_symbol): Make virtual.
1947         (struct symbol_searcher_collect_info): New struct.
1948         (symbol_searcher::find_all_symbols): New method.
1949         * symtab.h (class symbol_searcher): New class.
1950
1951 2018-08-29  Keith Seitz  <keiths@redhat.com>
1952
1953         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1954         Change to vector of block_symbol.  Update all users.
1955         (struct collect_info) <symbols>: Likewise.
1956         (collect_info::add_symbol): Take block_symbol as argument.
1957         Update all callers.
1958         (decode_compound_collector) <m_symbols>: Change type to vector
1959         of block_symbol.  Update all users.
1960         (decode_compound_collector::operator ()): Change parameter type
1961         to block_symbol.
1962         (find_method, find_function_symbols, find_linespec_symbols)
1963         (find_label_symbols_in_block, find_label_symbols): Change symbol
1964         vectors to block_symbol vectors.
1965         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1966         block_symbol.
1967
1968 2018-08-29  Keith Seitz  <keiths@redhat.com>
1969
1970         * linespec.c (symbolp): Remove typedef and VEC definitions.
1971         (bound_minimal_symbol_d): Likewise.
1972
1973 2018-08-29  Keith Seitz  <keiths@redhat.com>
1974
1975         * linespec.c (decode_compound_collector::decode_compound_collector):
1976         Remove initialization for `m_symtabs'.
1977         (decode_compound_collector::release_symbols): Change return type
1978         to std::vector.  Update all callers.
1979         (class decode_compound_collector) <m_symbols>: Change type to
1980         std::vector.
1981         (lookup_prefix_sym): Change return type to std::vector.  Update all
1982         callers.
1983         (compare_symbols): Remove.
1984         (std_compare_symbols): Rename to `compare_symbols'.
1985         (find_method): Change `sym_classes' parameter to std::vector.
1986         Update all callers.  Use std::sort to sort sym_classes.
1987         (find_linespec_symbols): Remove cleanup.
1988
1989 2018-08-29  Keith Seitz  <keiths@redhat.com>
1990
1991         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1992         std::vector.  Update all users.
1993         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1994         (struct collect_info) <minimal_symbols>: Likewise.
1995         (compare_msymbols): Return bool.  Change parameters to const
1996         bound_minimal_symbol references.
1997         (find_method, find_function_symbols, find_linespec_symbols): Change
1998         `minsyms' parameter to std::vector.  Update all callers.
1999
2000 2018-08-29  Keith Seitz  <keiths@redhat.com>
2001
2002         * linespec.c (struct linespec) <label_symbols>: Change type to
2003         std::vector.  Update all users.
2004         (find_label_symbols_in_block): Change `result' parameter to
2005         std::vector.  Update all callers.
2006         (find_label_symbols): Return std::vector.  Update all callers.
2007
2008 2018-08-29  Keith Seitz  <keiths@redhat.com>
2009
2010         * linespec.c (struct linespec) <function_symbols>: Change type to
2011         std::vector.  Update all users.
2012         (struct collect_info) <function_symbols>: Likewise.
2013         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2014         (std_compare_symbols): New function.
2015         (find_method, find_function_symbols, find_linespec_symbols)
2016         (find_label_symbols_in_block): Change `symbols' parameter to
2017         std::vector.  Update all callers.
2018         (find_label_symbols): Likewise for `function_symbols' and
2019         `label_funcs_ret'.
2020
2021 2018-08-29  Keith Seitz  <keiths@redhat.com>
2022
2023         * linespec.c (symtab_vector_up): Define.
2024         (struct linespec) <file_symtabs>: Change type to std::vector *.
2025         Update all uses.
2026         (struct collect_info) <file_symtabs>: Likewise.
2027         (collect_symtabs_from_filename): Return symtab_vector_up.
2028         Update all callers.
2029         (decode_objc): Remove cleanup.
2030         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2031         (symtab_collector::release_symtabs): Return symtab_vector_up.
2032         Update all callers.
2033         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2034         Update all users.
2035         (collect_symtabs_from_filename, symtabs_from_filename): Return
2036         symtab_vector_up.  Update all callers.
2037
2038 2018-08-29  Tom Tromey  <tom@tromey.com>
2039
2040         * csky-tdep.c (csky_analyze_prologue): Use
2041         core_addr_to_string_nz.
2042
2043 2018-08-29  Tom Tromey  <tom@tromey.com>
2044
2045         * windows-nat.c (struct xlate_exception) <them>: Change type to
2046         DWORD.
2047         (xlate): Fix formatting.  Remove last entry.
2048         (struct xlate_exception, xlate): Comment out.
2049         (windows_nat_target::resume): Use ranged for.
2050
2051 2018-08-29  Jim Wilson  <jimw@sifive.com>
2052
2053         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2054         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2055         of NT_PRFPREG.
2056         (riscv_linux_nat_target::store_registers): Likewise.
2057
2058 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2059
2060         PR gdb/23555
2061         PR gdb/23558
2062         * gnulib/aclocal.m4: Regenerate.
2063         * gnulib/config.in: Regenerate.
2064         * gnulib/configure: Regenerate.
2065         * gnulib/import/Makefile.am: Update.
2066         * gnulib/import/Makefile.in: Update.
2067         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2068         * gnulib/import/_Noreturn.h: ... this.
2069         * gnulib/import/alloca.in.h: Update.
2070         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2071         * gnulib/import/arg-nonnull.h: ... this.
2072         * gnulib/import/assure.h: Update.
2073         * gnulib/import/at-func.c: Update.
2074         * gnulib/import/basename-lgpl.c: Update.
2075         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2076         * gnulib/import/c++defs.h: ... this.
2077         * gnulib/import/canonicalize-lgpl.c: Update.
2078         * gnulib/import/cdefs.h: Update.
2079         * gnulib/import/chdir-long.c: Update.
2080         * gnulib/import/chdir-long.h: Update.
2081         * gnulib/import/cloexec.c: Update.
2082         * gnulib/import/cloexec.h: Update.
2083         * gnulib/import/close.c: Update.
2084         * gnulib/import/closedir.c: Update.
2085         * gnulib/import/config.charset: Update.
2086         * gnulib/import/dirent-private.h: Update.
2087         * gnulib/import/dirent.in.h: Update.
2088         * gnulib/import/dirfd.c: Update.
2089         * gnulib/import/dirname-lgpl.c: Update.
2090         * gnulib/import/dirname.h: Update.
2091         * gnulib/import/dosname.h: Update.
2092         * gnulib/import/dup-safer-flag.c: Update.
2093         * gnulib/import/dup-safer.c: Update.
2094         * gnulib/import/dup.c: Update.
2095         * gnulib/import/dup2.c: Update.
2096         * gnulib/import/errno.in.h: Update.
2097         * gnulib/import/error.c: Update.
2098         * gnulib/import/error.h: Update.
2099         * gnulib/import/exitfail.c: Update.
2100         * gnulib/import/exitfail.h: Update.
2101         * gnulib/import/extra/update-copyright: Update.
2102         * gnulib/import/fchdir.c: Update.
2103         * gnulib/import/fcntl.c: Update.
2104         * gnulib/import/fcntl.in.h: Update.
2105         * gnulib/import/fd-hook.c: Update.
2106         * gnulib/import/fd-hook.h: Update.
2107         * gnulib/import/fd-safer-flag.c: Update.
2108         * gnulib/import/fd-safer.c: Update.
2109         * gnulib/import/fdopendir.c: Update.
2110         * gnulib/import/filename.h: Update.
2111         * gnulib/import/filenamecat-lgpl.c: Update.
2112         * gnulib/import/filenamecat.h: Update.
2113         * gnulib/import/flexmember.h: Update.
2114         * gnulib/import/float+.h: Update.
2115         * gnulib/import/float.c: Update.
2116         * gnulib/import/float.in.h: Update.
2117         * gnulib/import/fnmatch.c: Update.
2118         * gnulib/import/fnmatch.in.h: Update.
2119         * gnulib/import/fnmatch_loop.c: Update.
2120         * gnulib/import/fpucw.h: Update.
2121         * gnulib/import/frexp.c: Update.
2122         * gnulib/import/frexpl.c: Update.
2123         * gnulib/import/fstat.c: Update.
2124         * gnulib/import/fstatat.c: Update.
2125         * gnulib/import/getcwd-lgpl.c: Update.
2126         * gnulib/import/getcwd.c: Update.
2127         * gnulib/import/getdtablesize.c: Update.
2128         * gnulib/import/getlogin_r.c: Update.
2129         * gnulib/import/getprogname.c: Update.
2130         * gnulib/import/getprogname.h: Update.
2131         * gnulib/import/gettext.h: Update.
2132         * gnulib/import/gettimeofday.c: Update.
2133         * gnulib/import/glob-libc.h: Update.
2134         * gnulib/import/glob.c: Update.
2135         * gnulib/import/glob.in.h: Update.
2136         * gnulib/import/glob_internal.h: Update.
2137         * gnulib/import/glob_pattern_p.c: Update.
2138         * gnulib/import/globfree.c: Update.
2139         * gnulib/import/hard-locale.c: Update.
2140         * gnulib/import/hard-locale.h: Update.
2141         * gnulib/import/intprops.h: Update.
2142         * gnulib/import/inttypes.in.h: Update.
2143         * gnulib/import/isnan.c: Update.
2144         * gnulib/import/isnand-nolibm.h: Update.
2145         * gnulib/import/isnand.c: Update.
2146         * gnulib/import/isnanl-nolibm.h: Update.
2147         * gnulib/import/isnanl.c: Update.
2148         * gnulib/import/itold.c: Update.
2149         * gnulib/import/libc-config.h: Update.
2150         * gnulib/import/limits.in.h: Update.
2151         * gnulib/import/localcharset.c: Update.
2152         * gnulib/import/localcharset.h: Update.
2153         * gnulib/import/localtime-buffer.c: Update.
2154         * gnulib/import/localtime-buffer.h: Update.
2155         * gnulib/import/lstat.c: Update.
2156         * gnulib/import/m4/00gnulib.m4: Update.
2157         * gnulib/import/m4/__inline.m4: Update.
2158         * gnulib/import/m4/absolute-header.m4: Update.
2159         * gnulib/import/m4/alloca.m4: Update.
2160         * gnulib/import/m4/builtin-expect.m4: Update.
2161         * gnulib/import/m4/canonicalize.m4: Update.
2162         * gnulib/import/m4/chdir-long.m4: Update.
2163         * gnulib/import/m4/close.m4: Update.
2164         * gnulib/import/m4/closedir.m4: Update.
2165         * gnulib/import/m4/configmake.m4: Update.
2166         * gnulib/import/m4/d-ino.m4: Update.
2167         * gnulib/import/m4/d-type.m4: Update.
2168         * gnulib/import/m4/dirent_h.m4: Update.
2169         * gnulib/import/m4/dirfd.m4: Update.
2170         * gnulib/import/m4/dirname.m4: Update.
2171         * gnulib/import/m4/double-slash-root.m4: Update.
2172         * gnulib/import/m4/dup.m4: Update.
2173         * gnulib/import/m4/dup2.m4: Update.
2174         * gnulib/import/m4/eealloc.m4: Update.
2175         * gnulib/import/m4/environ.m4: Update.
2176         * gnulib/import/m4/errno_h.m4: Update.
2177         * gnulib/import/m4/error.m4: Update.
2178         * gnulib/import/m4/exponentd.m4: Update.
2179         * gnulib/import/m4/exponentl.m4: Update.
2180         * gnulib/import/m4/extensions.m4: Update.
2181         * gnulib/import/m4/extern-inline.m4: Update.
2182         * gnulib/import/m4/fchdir.m4: Update.
2183         * gnulib/import/m4/fcntl-o.m4: Update.
2184         * gnulib/import/m4/fcntl.m4: Update.
2185         * gnulib/import/m4/fcntl_h.m4: Update.
2186         * gnulib/import/m4/fdopendir.m4: Update.
2187         * gnulib/import/m4/filenamecat.m4: Update.
2188         * gnulib/import/m4/flexmember.m4: Update.
2189         * gnulib/import/m4/float_h.m4: Update.
2190         * gnulib/import/m4/fnmatch.m4: Update.
2191         * gnulib/import/m4/fnmatch_h.m4: Update.
2192         * gnulib/import/m4/fpieee.m4: Update.
2193         * gnulib/import/m4/frexp.m4: Update.
2194         * gnulib/import/m4/frexpl.m4: Update.
2195         * gnulib/import/m4/fstat.m4: Update.
2196         * gnulib/import/m4/fstatat.m4: Update.
2197         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2198         * gnulib/import/m4/getcwd-path-max.m4: Update.
2199         * gnulib/import/m4/getcwd.m4: Update.
2200         * gnulib/import/m4/getdtablesize.m4: Update.
2201         * gnulib/import/m4/getlogin.m4: Update.
2202         * gnulib/import/m4/getlogin_r.m4: Update.
2203         * gnulib/import/m4/getpagesize.m4: Update.
2204         * gnulib/import/m4/getprogname.m4: Update.
2205         * gnulib/import/m4/gettimeofday.m4: Update.
2206         * gnulib/import/m4/glibc21.m4: Update.
2207         * gnulib/import/m4/glob.m4: Update.
2208         * gnulib/import/m4/glob_h.m4: Update.
2209         * gnulib/import/m4/gnulib-cache.m4: Update.
2210         * gnulib/import/m4/gnulib-common.m4: Update.
2211         * gnulib/import/m4/gnulib-comp.m4: Update.
2212         * gnulib/import/m4/gnulib-tool.m4: Update.
2213         * gnulib/import/m4/hard-locale.m4: Update.
2214         * gnulib/import/m4/include_next.m4: Update.
2215         * gnulib/import/m4/inttypes-pri.m4: Update.
2216         * gnulib/import/m4/inttypes.m4: Update.
2217         * gnulib/import/m4/isnand.m4: Update.
2218         * gnulib/import/m4/isnanl.m4: Update.
2219         * gnulib/import/m4/largefile.m4: Update.
2220         * gnulib/import/m4/limits-h.m4: Update.
2221         * gnulib/import/m4/localcharset.m4: Update.
2222         * gnulib/import/m4/locale-fr.m4: Update.
2223         * gnulib/import/m4/locale-ja.m4: Update.
2224         * gnulib/import/m4/locale-zh.m4: Update.
2225         * gnulib/import/m4/localtime-buffer.m4: Update.
2226         * gnulib/import/m4/longlong.m4: Update.
2227         * gnulib/import/m4/lstat.m4: Update.
2228         * gnulib/import/m4/malloc.m4: Update.
2229         * gnulib/import/m4/malloca.m4: Update.
2230         * gnulib/import/m4/math_h.m4: Update.
2231         * gnulib/import/m4/mbrtowc.m4: Update.
2232         * gnulib/import/m4/mbsinit.m4: Update.
2233         * gnulib/import/m4/mbsrtowcs.m4: Update.
2234         * gnulib/import/m4/mbstate_t.m4: Update.
2235         * gnulib/import/m4/memchr.m4: Update.
2236         * gnulib/import/m4/memmem.m4: Update.
2237         * gnulib/import/m4/mempcpy.m4: Update.
2238         * gnulib/import/m4/memrchr.m4: Update.
2239         * gnulib/import/m4/mkdir.m4: Update.
2240         * gnulib/import/m4/mkstemp.m4: Update.
2241         * gnulib/import/m4/mmap-anon.m4: Update.
2242         * gnulib/import/m4/mode_t.m4: Update.
2243         * gnulib/import/m4/msvc-inval.m4: Update.
2244         * gnulib/import/m4/msvc-nothrow.m4: Update.
2245         * gnulib/import/m4/multiarch.m4: Update.
2246         * gnulib/import/m4/nocrash.m4: Update.
2247         * gnulib/import/m4/off_t.m4: Update.
2248         * gnulib/import/m4/onceonly.m4: Update.
2249         * gnulib/import/m4/open-cloexec.m4: Update.
2250         * gnulib/import/m4/open.m4: Update.
2251         * gnulib/import/m4/openat.m4: Update.
2252         * gnulib/import/m4/opendir.m4: Update.
2253         * gnulib/import/m4/pathmax.m4: Update.
2254         * gnulib/import/m4/rawmemchr.m4: Update.
2255         * gnulib/import/m4/readdir.m4: Update.
2256         * gnulib/import/m4/readlink.m4: Update.
2257         * gnulib/import/m4/realloc.m4: Update.
2258         * gnulib/import/m4/rename.m4: Update.
2259         * gnulib/import/m4/rewinddir.m4: Update.
2260         * gnulib/import/m4/rmdir.m4: Update.
2261         * gnulib/import/m4/save-cwd.m4: Update.
2262         * gnulib/import/m4/secure_getenv.m4: Update.
2263         * gnulib/import/m4/setenv.m4: Update.
2264         * gnulib/import/m4/signal_h.m4: Update.
2265         * gnulib/import/m4/ssize_t.m4: Update.
2266         * gnulib/import/m4/stat-time.m4: Update.
2267         * gnulib/import/m4/stat.m4: Update.
2268         * gnulib/import/m4/std-gnu11.m4: Update.
2269         * gnulib/import/m4/stdbool.m4: Update.
2270         * gnulib/import/m4/stddef_h.m4: Update.
2271         * gnulib/import/m4/stdint.m4: Update.
2272         * gnulib/import/m4/stdio_h.m4: Update.
2273         * gnulib/import/m4/stdlib_h.m4: Update.
2274         * gnulib/import/m4/strchrnul.m4: Update.
2275         * gnulib/import/m4/strdup.m4: Update.
2276         * gnulib/import/m4/strerror.m4: Update.
2277         * gnulib/import/m4/string_h.m4: Update.
2278         * gnulib/import/m4/strstr.m4: Update.
2279         * gnulib/import/m4/strtok_r.m4: Update.
2280         * gnulib/import/m4/sys_socket_h.m4: Update.
2281         * gnulib/import/m4/sys_stat_h.m4: Update.
2282         * gnulib/import/m4/sys_time_h.m4: Update.
2283         * gnulib/import/m4/sys_types_h.m4: Update.
2284         * gnulib/import/m4/tempname.m4: Update.
2285         * gnulib/import/m4/time_h.m4: Update.
2286         * gnulib/import/m4/unistd-safer.m4: Update.
2287         * gnulib/import/m4/unistd_h.m4: Update.
2288         * gnulib/import/m4/warn-on-use.m4: Update.
2289         * gnulib/import/m4/wchar_h.m4: Update.
2290         * gnulib/import/m4/wchar_t.m4: Update.
2291         * gnulib/import/m4/wctype_h.m4: Update.
2292         * gnulib/import/m4/wint_t.m4: Update.
2293         * gnulib/import/malloc.c: Update.
2294         * gnulib/import/malloc/scratch_buffer.h: Update.
2295         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2296         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2297         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2298         * gnulib/import/malloca.c: Update.
2299         * gnulib/import/malloca.h: Update.
2300         * gnulib/import/malloca.valgrind: Update.
2301         * gnulib/import/math.in.h: Update.
2302         * gnulib/import/mbrtowc.c: Update.
2303         * gnulib/import/mbsinit.c: Update.
2304         * gnulib/import/mbsrtowcs-impl.h: Update.
2305         * gnulib/import/mbsrtowcs-state.c: Update.
2306         * gnulib/import/mbsrtowcs.c: Update.
2307         * gnulib/import/memchr.c: Update.
2308         * gnulib/import/memmem.c: Update.
2309         * gnulib/import/mempcpy.c: Update.
2310         * gnulib/import/memrchr.c: Update.
2311         * gnulib/import/mkdir.c: Update.
2312         * gnulib/import/mkstemp.c: Update.
2313         * gnulib/import/msvc-inval.c: Update.
2314         * gnulib/import/msvc-inval.h: Update.
2315         * gnulib/import/msvc-nothrow.c: Update.
2316         * gnulib/import/msvc-nothrow.h: Update.
2317         * gnulib/import/open.c: Update.
2318         * gnulib/import/openat-die.c: Update.
2319         * gnulib/import/openat-priv.h: Update.
2320         * gnulib/import/openat-proc.c: Update.
2321         * gnulib/import/openat.c: Update.
2322         * gnulib/import/openat.h: Update.
2323         * gnulib/import/opendir.c: Update.
2324         * gnulib/import/pathmax.h: Update.
2325         * gnulib/import/pipe-safer.c: Update.
2326         * gnulib/import/rawmemchr.c: Update.
2327         * gnulib/import/readdir.c: Update.
2328         * gnulib/import/readlink.c: Update.
2329         * gnulib/import/realloc.c: Update.
2330         * gnulib/import/ref-add.sin: Update.
2331         * gnulib/import/ref-del.sin: Update.
2332         * gnulib/import/rename.c: Update.
2333         * gnulib/import/rewinddir.c: Update.
2334         * gnulib/import/rmdir.c: Update.
2335         * gnulib/import/same-inode.h: Update.
2336         * gnulib/import/save-cwd.c: Update.
2337         * gnulib/import/save-cwd.h: Update.
2338         * gnulib/import/scratch_buffer.h: Update.
2339         * gnulib/import/secure_getenv.c: Update.
2340         * gnulib/import/setenv.c: Update.
2341         * gnulib/import/signal.in.h: Update.
2342         * gnulib/import/stat-time.c: Update.
2343         * gnulib/import/stat-time.h: Update.
2344         * gnulib/import/stat-w32.c: Update.
2345         * gnulib/import/stat-w32.h: Update.
2346         * gnulib/import/stat.c: Update.
2347         * gnulib/import/stdbool.in.h: Update.
2348         * gnulib/import/stddef.in.h: Update.
2349         * gnulib/import/stdint.in.h: Update.
2350         * gnulib/import/stdio.in.h: Update.
2351         * gnulib/import/stdlib.in.h: Update.
2352         * gnulib/import/str-two-way.h: Update.
2353         * gnulib/import/strchrnul.c: Update.
2354         * gnulib/import/strdup.c: Update.
2355         * gnulib/import/streq.h: Update.
2356         * gnulib/import/strerror-override.c: Update.
2357         * gnulib/import/strerror-override.h: Update.
2358         * gnulib/import/strerror.c: Update.
2359         * gnulib/import/string.in.h: Update.
2360         * gnulib/import/stripslash.c: Update.
2361         * gnulib/import/strnlen1.c: Update.
2362         * gnulib/import/strnlen1.h: Update.
2363         * gnulib/import/strstr.c: Update.
2364         * gnulib/import/strtok_r.c: Update.
2365         * gnulib/import/sys_stat.in.h: Update.
2366         * gnulib/import/sys_time.in.h: Update.
2367         * gnulib/import/sys_types.in.h: Update.
2368         * gnulib/import/tempname.c: Update.
2369         * gnulib/import/tempname.h: Update.
2370         * gnulib/import/time.in.h: Update.
2371         * gnulib/import/unistd--.h: Update.
2372         * gnulib/import/unistd-safer.h: Update.
2373         * gnulib/import/unistd.in.h: Update.
2374         * gnulib/import/unsetenv.c: Update.
2375         * gnulib/import/verify.h: Update.
2376         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2377         * gnulib/import/wchar.in.h: Update.
2378         * gnulib/import/wctype.in.h: Update.
2379         * gnulib/import/xalloc-oversized.h: Update.
2380         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2381         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2382
2383 2018-08-16  Gary Benson <gbenson@redhat.com>
2384
2385         PR gdb/13000:
2386         * gdb/main.c (captured_main_1): Exit with nonzero status
2387         in batch mode if the last command to be executed failed.
2388         * NEWS: Mention the above.
2389
2390 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2391
2392         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2393         end of warning message.
2394
2395 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2396
2397         PR gdb/22943:
2398         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2399         (aarch64_extract_return_value): Use
2400         aapcs_is_vfp_call_or_return_candidate.
2401         (aarch64_return_in_memory): Likewise.
2402         (aarch64_store_return_value): Likewise.
2403
2404 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2405
2406         * aarch64-tdep.c
2407         (aapcs_is_vfp_call_or_return_candidate): Make static
2408         (pass_in_v_or_stack): Remove function.
2409         (pass_in_v_vfp_candidate): New function.
2410         (aarch64_push_dummy_call): Check for float register candidates.
2411
2412 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2413
2414         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2415         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2416         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2417
2418 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2419
2420         PR build/23399
2421         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2422         (struct ipa_sym_addresses): Rename to...
2423         (struct ipa_sym_addresses_common): ... this.
2424         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2425
2426 2018-08-28  Tom Tromey  <tom@tromey.com>
2427
2428         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2429         (token_fifo): Now a std::vector.
2430         (yylex, c_parse): Update.
2431         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2432         (token_fifo): Now a std::vector.
2433         (yylex, d_parse): Update.
2434         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2435         (token_fifo): Now a std::vector.
2436         (yylex, go_parse): Update.
2437
2438 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2439
2440         * parser-defs.h (struct type_stack) <elements>: Change type to
2441         std::vector<union type_stack_elt>.
2442         <depth, size>: Remove.
2443         * parse.c (parse_exp_in_context_1): Adjust.
2444         (type_stack_reserve): Remove.
2445         (check_type_stack_depth): Remove.
2446         (insert_into_type_stack): Adjust to std::vector.
2447         (insert_type): Likewise.
2448         (push_type): Likewise.
2449         (push_type_int): Likewise.
2450         (insert_type_address_space): Likewise.
2451         (pop_type): Likewise.
2452         (pop_type_int): Likewise.
2453         (pop_typelist): Likewise.
2454         (pop_type_stack): Likewise.
2455         (append_type_stack): Likewise.
2456         (push_type_stack): Likewise.
2457         (get_type_stack): Likewise.
2458         (type_stack_cleanup): Likewise.
2459         (push_typelist): Likewise.
2460         (follow_types): Likewise.
2461         (_initialize_parse): Likewise.
2462
2463 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2464
2465         * NEWS: Mention csky target.
2466
2467 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2468             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2469             Don Breazeal  <donb@codesourcery.com>
2470
2471         * csky-linux-tdep.c: New file.
2472         * csky-tdep.c: Likewise.
2473         * csky-tdep.h: Likewise.
2474         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2475         csky-tdep.o.
2476         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2477         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2478         * configure.tgt: Add csky support.
2479
2480 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2481
2482         * python/py-framefilter.c (py_print_frame): Print frame architecture
2483         when printing on an MI output.
2484
2485 2018-08-27  Tom Tromey  <tom@tromey.com>
2486
2487         PR build/23087:
2488         * configure: Rebuild.
2489         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2490
2491 2018-08-27  Tom Tromey  <tom@tromey.com>
2492
2493         * aarch64-linux-tdep.c
2494         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2495         casts to int.
2496
2497 2018-08-27  Tom Tromey  <tom@tromey.com>
2498
2499         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2500         unsigned.
2501         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2502         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2503         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2504         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2505         unsigned.
2506
2507 2018-08-27  Tom Tromey  <tom@tromey.com>
2508
2509         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2510         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2511
2512 2018-08-27  Tom Tromey  <tom@tromey.com>
2513
2514         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2515         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2516         ULONGEST_MAX.
2517         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2518         ULONGEST_MAX.
2519         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2520         ULONGEST_MAX.
2521         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2522         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2523         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2524         ULONGEST_MAX.
2525         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2526         (ppc64_linux_sigaction_tramp_frame)
2527         (ppc32_linux_sighandler_tramp_frame)
2528         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2529         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2530         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2531         * mn10300-linux-tdep.c (am33_linux_sigframe)
2532         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2533         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2534         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2535         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2536         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2537         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2538         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2539         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2540         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2541         * microblaze-linux-tdep.c
2542         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2543         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2544         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2545         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2546         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2547         * common/common-types.h (ULONGEST_MAX): New define.
2548         (CORE_ADDR_MAX): Fix formatting.
2549         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2550         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2551         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2552         (arm_linux_rt_sigreturn_tramp_frame)
2553         (arm_eabi_linux_sigreturn_tramp_frame)
2554         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2555         (thumb2_eabi_linux_sigreturn_tramp_frame)
2556         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2557         (arm_linux_restart_syscall_tramp_frame)
2558         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2559         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2560         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2561         ULONGEST_MAX.
2562         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2563
2564 2018-08-27  Tom Tromey  <tom@tromey.com>
2565
2566         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2567         CORE_ADDR_MAX.
2568         * mips-tdep.c (mips_deal_with_atomic_sequence)
2569         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2570         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2571         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2572         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2573         CORE_ADDR_MAX.
2574         * aarch64-tdep.c (aarch64_software_single_step): Use
2575         CORE_ADDR_MAX.
2576
2577 2018-08-27  Tom Tromey  <tom@tromey.com>
2578
2579         * linespec.c (complete_linespec_component): Add cast to "char".
2580         * completer.c (completion_tracker::build_completion_result): Add
2581         cast to "char".
2582
2583 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2584
2585         * solist.h (struct solist, struct target_so_ops): Fix
2586         indentation.
2587
2588 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2589
2590         * ada-tasks.c (ada_task_info_s): Remove typedef.
2591         (DEF_VEC_O(ada_task_info_s)): Remove.
2592         (struct ada_tasks_inferior_data): Initialize fields.
2593         <task_list>: Make an std::vector.
2594         (get_ada_tasks_inferior_data): Allocate with new.
2595         (ada_get_task_number): Adjust.
2596         (get_task_number_from_id): Likewise.
2597         (valid_task_id): Likewise.
2598         (ada_get_task_info_from_ptid): Likewise.
2599         (iterate_over_live_ada_tasks): Likewise.
2600         (add_ada_task): Likewise.
2601         (read_known_tasks): Likewise.
2602         (ada_build_task_list): Likewise.
2603         (print_ada_task_info): Likewise.
2604         (info_task): Likewise.
2605         (task_command_1): Likewise.
2606
2607 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2608
2609         * ada-lang.c (add_angle_brackets): Return std::string.
2610
2611 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2612
2613         * python/py-threadevent.c (py_get_event_thread): Initialize
2614         pythread.
2615
2616 2018-08-24  Pedro Alves  <palves@redhat.com>
2617
2618         * python/py-bpevent.c (create_breakpoint_event_object): Use
2619         copy-initialization.
2620         * python/py-continueevent.c (emit_continue_event): Use
2621         copy-initialization.
2622         * python/py-exitedevent.c (create_exited_event_object): Return a
2623         gdbpy_ref<>.
2624         (emit_exited_event): Use copy-initialization.
2625         * python/py-inferior.c (python_new_inferior)
2626         (python_inferior_deleted, add_thread_object): Use
2627         copy-initialization.
2628         * python/py-infevents.c (create_inferior_call_event_object)
2629         (create_register_changed_event_object)
2630         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2631         (emit_inferior_call_event, emit_memory_changed_event)
2632         (emit_register_changed_event): Use copy-initialization.
2633         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2634         Return a gdbpy_ref<>.
2635         (emit_new_objfile_event): Use copy-initialization.
2636         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2637         (emit_clear_objfiles_event): Use copy-initialization.
2638         * python/py-signalevent.c (create_signal_event_object): Use
2639         copy-initialization.
2640         * python/py-threadevent.c (create_thread_event_object): Use
2641         copy-initialization.
2642
2643 2018-08-24  Pedro Alves  <palves@redhat.com>
2644             Simon Marchi  <simon.marchi@ericsson.com>
2645
2646         PR gdb/23379
2647         * python/py-continueevent.c: Include "gdbthread.h".
2648         (create_continue_event_object): Add intro comment.  Add 'ptid'
2649         parameter.  Use it to find thread to pass to
2650         create_thread_event_object.
2651         (emit_continue_event): Pass PTID down to
2652         create_continue_event_object.
2653         * python/py-event.h (py_get_event_thread): Declare.
2654         (create_thread_event_object): Remove default from 'thread'
2655         parameter.
2656         * python/py-stopevent.c (create_stop_event_object): Use
2657         py_get_event_thread.
2658         * python/py-threadevent.c (get_event_thread): Rename to ...
2659         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2660         and use it to find the thread.
2661         (create_thread_event_object): Assert that THREAD isn't null.
2662         Don't find the event thread here.
2663
2664 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2665
2666         * block.h (blockrange, blockranges): New struct declarations.
2667         (struct block): Add new field named `ranges'.
2668         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2669         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2670         macros for accessing ranges in struct block.
2671         (make_blockranges): New declaration.
2672         block.c (make_blockranges): New function.
2673         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2674         for block.
2675         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2676         * blockframe.c (cache_pc_function_block): New static global.
2677         (clear_pc_function_cache): Clear cache_pc_function_block.
2678         (find_pc_partial_function): Move comment to symtab.h.  Add
2679         support for non-contiguous blocks.
2680         * cli/cli-cmds.c (block.h): Include.
2681         (print_disassembly): Handle printing of non-contiguous blocks.
2682         (disassemble_current_function): Likewise.
2683         (disassemble_command): Likewise.
2684
2685         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2686         BLOCK_START.
2687         * blockframe.c (get_pc_function_start): Likewise.
2688         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2689         (gcc_symbol_address): Likewise.
2690         * compile/compile-object-run.c (compile_object_run): Likewise.
2691         * compile/compile.c (get_expr_block_and_pc): Likewise.
2692         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2693         (func_addr_to_tail_call_list): Likewise.
2694         * findvar.c (default_read_var_value): Likewise.
2695         * inline-frame.c (inline_frame_this_id): Likewise.
2696         (skip-inline_frames): Likewise.
2697         * infcmd.c (until_next_command): Likewise.
2698         * linespec.c (convert_linespec_to_sals): Likewise.
2699         * parse.c (parse_exp_in_context_1): Likewise.
2700         * printcmd.c (build_address_symbolic): likewise.
2701         (info_address_command): Likewise.
2702         symtab.c (find_function_start_sal): Likewise.
2703         (skip_prologue_sal): Likewise.
2704         (find_function_alias_target): Likewise.
2705         (find_gnu_ifunc): Likewise.
2706         * stack.c (find_frame_funname): Likewise.
2707         * symtab.c (fixup_symbol_section): Likewise.
2708         (find_function_start_sal): Likewise.
2709         (skip_prologue_sal): Likewsie.
2710         (find_function_alias_target): Likewise.
2711         (find_gnu_ifunc): Likewise.
2712         * tracepoint.c (info_scope_command): Likewise.
2713         * value.c (value_fn_field): Likewise.
2714
2715         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2716         in place of find_pc_partial_function.
2717         * blockframe.c (find_function_entry_range_from_pc): New function.
2718         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2719         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2720         for each range in a block.
2721
2722
2723 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2724
2725         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2726         incrementation.
2727
2728 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2729
2730         * solib-svr4.c (read_program_headers_from_bfd): Return
2731         gdb::optional<gdb::byte_vector>.
2732         (svr4_exec_displacement): Adjust.
2733
2734 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2735
2736         * solib-svr4.c (read_program_header): Return
2737         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2738         (find_program_interpreter): Return
2739         gdb::optional<gdb::byte_vector>.
2740         (scan_dyntag_auxv): Adjust.
2741         (enable_break): Adjust.
2742         (svr4_exec_displacement): Adjust.
2743
2744 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2745
2746         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2747         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2748
2749 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2750
2751         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2752         string_vprintf.
2753         * guile/scm-utils.c (gdbscm_printf): Likewise.
2754         * serial.c (serial_printf): Likewise.
2755         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2756
2757 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2758
2759         * stack.c (print_frame): Print frame architecture when printing on
2760         an MI output.
2761         * NEWS: Mention new "arch" attribute in frame output.
2762
2763 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2764
2765         * arch/aarch64.h (aarch64_regnum): Update comment.
2766
2767 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2768
2769         * NEWS: Add SVE to 8.2 section.
2770
2771 2018-08-21  Pedro Alves  <palves@redhat.com>
2772
2773         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2774         out from gdbscm_parse_function_args.
2775         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2776         gdbscm_parse_function_args_1.
2777
2778 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2779
2780         PR gdb/17816
2781         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2782         operator.
2783
2784 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2785
2786         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2787
2788 2018-08-19  Michael Spang  <spang@google.com>
2789
2790         PR gdb/11786
2791         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2792         for PT_TLS segments.
2793
2794 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2795
2796         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2797         dwarf_variable_value.
2798         * dwarf2-frame.c (class dwarf_expr_executor):
2799         Add override for dwarf_variable_value.
2800         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2801         (class symbol_needs_eval_context): Likewise.
2802         (indirect_synthetic_pointer): Add forward declaration.
2803         (sect_variable_value): New function.
2804         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2805         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2806         for DW_OP_GNU_variable_value.
2807
2808 2018-08-16  Tom Tromey  <tom@tromey.com>
2809
2810         * top.c (read_command_file): Update.
2811         (command_line_input): Remove "repeat" argument.
2812         * ada-lang.c (get_selections): Update.
2813         * linespec.c (decode_line_2): Update.
2814         * defs.h (command_line_input): Remove argument.
2815         * cli/cli-script.c (read_next_line): Update.
2816         * python/py-gdb-readline.c: Update.
2817
2818 2018-08-17  Tom Tromey  <tom@tromey.com>
2819
2820         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2821         command_line_input.
2822
2823 2018-08-15  Tom Tromey  <tom@tromey.com>
2824
2825         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2826
2827 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2828
2829         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2830         If used, use find_pc_partial_function to find address range
2831         to disassemble.
2832         * mi/mi-main.c (mi_cmd_list_features): Report
2833         "data-disassemble-a-option" feature.
2834         * NEWS: Mention new -data-disassemble option -a.
2835
2836 2018-08-13  Tom Tromey  <tom@tromey.com>
2837
2838         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2839
2840 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2841
2842         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2843         (aarch64_linux_collect_sve_regset): Likewise.
2844         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2845         * regcache.h (regcache_map_entry_size): New function.
2846
2847 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2848
2849         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2850         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2851         (SVE_HEADER_VL_LENGTH): Likewise.
2852         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2853         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2854         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2855         (SVE_HEADER_SIZE_OFFSET): Likewise.
2856         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2857         (SVE_HEADER_VL_OFFSET): Likewise.
2858         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2859         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2860         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2861         (SVE_HEADER_SIZE): Likewise.
2862         (aarch64_linux_core_read_vq): Add function.
2863         (aarch64_linux_core_read_description): Check for SVE section.
2864
2865 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2866
2867         * aarch64-fbsd-tdep.c
2868         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2869         collect_size.
2870         * aarch64-linux-tdep.c
2871         (aarch64_linux_iterate_over_regset_sections): Likewise.
2872         * alpha-linux-tdep.c
2873         (alpha_linux_iterate_over_regset_sections):
2874         * alpha-nbsd-tdep.c
2875         (alphanbsd_iterate_over_regset_sections): Likewise.
2876         * amd64-fbsd-tdep.c
2877         (amd64fbsd_iterate_over_regset_sections): Likewise.
2878         * amd64-linux-tdep.c
2879         (amd64_linux_iterate_over_regset_sections): Likewise.
2880         * arm-bsd-tdep.c
2881         (armbsd_iterate_over_regset_sections): Likewise.
2882         * arm-fbsd-tdep.c
2883         (arm_fbsd_iterate_over_regset_sections): Likewise.
2884         * arm-linux-tdep.c
2885         (arm_linux_iterate_over_regset_sections): Likewise.
2886         * corelow.c (get_core_registers_cb): Likewise.
2887         (core_target::fetch_registers): Likewise.
2888         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2889         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2890         * gdbarch.h (void): Regenerate.
2891         * gdbarch.sh: Add supply_size and collect_size.
2892         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2893         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2894         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2895         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2896         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2897         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2898         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2899         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2900         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2901         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2902         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2903         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2904         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2905         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2906         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2907         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2908         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2909         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2910         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2911         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2912         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2913         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2914         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2915         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2916         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2917         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2918         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2919         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2920         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2921         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2922
2923 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2924
2925         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2926         with string_printf.
2927
2928 2018-08-10  Keith Seitz  <keiths@redhat.com>
2929
2930         * compile/compile-c-support.c (add_code_header, add_code_footer):
2931         Move into policy class.
2932         (c_push_user_expression, pop_user_expression_nop)
2933         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2934         (compile_program): New host class.
2935         (c_compile_program): New typedef.
2936         (c_compute_porgram): Use c_compile_program.
2937
2938 2018-08-10  Keith Seitz  <keiths@redhat.com>
2939
2940         * compile/compile-internal.h (compile_instance::~compile_instance):
2941         Remove calls to htab_delete.
2942         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2943         * compile.c (compile_instance::compile_instance): Initialize
2944         htab unique pointers.
2945         (compile_instance::get_cached_type, compile_instance::insert_type)
2946         (compile_instance::error_symbol_once): Update for unique_ptr.
2947
2948 2018-08-10  Keith Seitz  <keiths@redhat.com>
2949
2950         * compile/compile-c-symbols.c (struct symbol_error)
2951         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2952         (compile_instance::insert_symbol_error)
2953         (compile_instance::error_symbol_once): Move to ...
2954         * compile/compile.c: ... here.
2955
2956 2018-08-10  Keith Seitz  <keiths@redhat.com>
2957
2958         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2959         instead of `new_compile_instance'.
2960         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2961         Update description.
2962         If the symbol error map is not initialized, create it.
2963         (generate_c_for_for_one_symbol): Do not check/initialize
2964         the symbol error map.
2965         * compile/compile-c-types.c (compile_c_instance): Make a class.
2966         Update all callers.
2967         (compile_instance::compile_instance): Initialize the type cache.
2968         (get_cached_type): New function.
2969         (insert_type): Update description.
2970         (compile_c_instance::m_default_cflags): Define.
2971         (convert_type): Update description.  Use get_cached_type.
2972         (delete_instance): Moved to destructor.
2973         (new_compile_instance): Moved to constructor.
2974         * compile/compile-c.h (compile_c_instance): Make class inheriting
2975         from compile_instance.
2976         <base>: Remove field.
2977         <type_map, symbol_err_map>: Move to base class.
2978         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2979         * compile/compile-internal.h (compile_instance): Make class.
2980         <type_map_t, symbol_err_map_t>: Define.
2981         <fe>: Rename to `m_gcc_fe'.
2982         <scope, block, gcc_target_options>: Add `m_' prefix.
2983         <m_type_map, m_symbol_err_map>: New fields, moved from
2984         compile_c_instance.
2985         <destroy>: Remove.
2986         (convert_type, new_compile_instance): Remove.
2987         * compile/compile.c (cleanup_compile_instance): Remove.
2988         (compile_to_object): Use unique_ptr to eliminate cleanups.
2989         (compile_instance::set_print_callback, compile_instance::version)
2990         (compile_instance::set_verbose)
2991         (compile_instance::set_driver_filename)
2992         (compile_instance::set_triplet_regexp)
2993         (compile_instance::set_arguments)
2994         (compile_instance::set_source_file)
2995         (compile_instance::compile): Define.
2996
2997 2018-08-10  Keith Seitz  <keiths@redhat.com>
2998
2999         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3000         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3001         gcc-c-fe.def to define C plugin.
3002         (delete_instance): Delete `c_plugin'.
3003         (new_compile_instance): Initialize `c_plugin'.
3004         * compile/compile-c.h: Include gcc_c_plugin.h.
3005         (struct compile_c_instance) <c_plugin>: New member.
3006         * gcc-c-plugin.h: New file.
3007         Update all callers with API change.
3008
3009 2018-08-10  Keith Seitz  <keiths@redhat.com>
3010
3011         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3012         (HFILES_NO_SRCDIR): ... to here.
3013         Add compile-internal.h and compile-c.h.
3014         * compile/compile-c-support.c: Include compile-c.h.
3015         * compile/compile-c-symbols.c: Include compile-c.h.
3016         (generate_c_for_variable_locations): Update comment.
3017         * compile/compile-c-types.c: Include compile-c.h.
3018         * compile/compile-c.h: New file -- moved C language declarations
3019         from other files here.
3020         * compile/compile-internal.h: Do not include hashtab.h or
3021         common/enum-flags.h.
3022         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3023         (gcc_convert_symbol, gcc_symbol_address)
3024         (generate_c_for_variable_locations, c_get_mode_for_size)
3025         (c_get_range_decl_name): Definitions moved to compile-c.h.
3026         * compile/compile-loc2c.c: Include compile-c.h.
3027
3028 2018-08-10  Keith Seitz  <keiths@redhat.com>
3029
3030         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3031         (c_symbol_substitution_name): ... this.
3032         Update all callers.
3033
3034 2018-08-10  Keith Seitz  <keiths@redhat.com>
3035
3036         * compile/compile-c-support.c (c_compute_program): Use
3037         unique_xmalloc_ptr to eliminate cleanup.
3038         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3039         Return a unique_xmalloc_ptr and eliminate cleanup.
3040         * compile/compile-internal.h (generate_c_for_variable_locations):
3041         Return unique_xmalloc_ptr and update description.
3042
3043 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3044
3045         * corelow.c (core_target::get_core_register_section): Rename
3046         min_size to section_min_size.
3047
3048 2018-08-09  Jim Wilson  <jimw@sifive.com>
3049
3050         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3051         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3052         * NEWS: Mention new GNU/Linux RISC-V target.
3053         * configure.host: Add riscv*-*-linux*.
3054         * configure.nat: Add riscv*.
3055         * configure.tgt: Add riscv*-*-linux*.
3056         * riscv-linux-nat.c: New file.
3057         * riscv-linux-tdep.c: New file.
3058
3059 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3060
3061         * infrun.c (resume): Make static, add forward declaration.
3062         (proceed): Update header comment.
3063         * infrun.h (resume): Delete declaration.
3064
3065 2018-08-09  Tom Tromey  <tom@tromey.com>
3066
3067         * riscv-tdep.h: Minor formatting fixes.
3068
3069 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3070
3071         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3072         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3073         (test_mkdir_recursive): Likewise.
3074         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3075
3076 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3077
3078         * valarith.c (value_subscripted_rvalue): If an array is not in
3079         memory, and we don't know the upper bound, then we can't know that
3080         the requested element exists or not.
3081
3082 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3083
3084         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3085         (target_options_to_string): Add comment.
3086
3087 2018-08-08  Tom Tromey  <tom@tromey.com>
3088
3089         * unittests/scoped_mmap-selftests.c: Check result of "write".
3090
3091 2018-08-08  Jim Wilson  <jimw@sifive.com>
3092
3093         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3094         (decode_register_index_short): New.
3095         (decode_j_type_insn, decode_cj_type_insn): New.
3096         (decode_b_type_insn, decode_cb_type_insn): New.
3097         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3098         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3099         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3100         is_c_sw_insn instead of is_sw_insn.
3101         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3102         (riscv_software_single_step): New.
3103         * riscv-tdep.h (riscv_software_single_step): Declare.
3104
3105         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3106         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3107
3108 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3109
3110         PR gdb/18050:
3111         * target.c (dispose_inferior): Don't dispose of inferiors that are
3112         already killed.
3113
3114 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3115
3116         * remote.c (remote_target::download_tracepoint): Change char* to
3117         const char*.
3118
3119 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3120
3121         * target.h (target_options_to_string): Return an std::string.
3122         * target.c (str_comma_list_concat_elem): Return void, use
3123         std::string.
3124         (do_option): Likewise.
3125         (target_options_to_string): Return an std::string.
3126         * linux-nat.c (linux_nat_target::wait): Adjust.
3127         * target-debug.h (target_debug_print_options): Adjust.
3128
3129 2018-08-07  Tom Tromey  <tom@tromey.com>
3130
3131         * Makefile.in (CPPFLAGS): New variable.
3132         (INTERNAL_CPPFLAGS): Use it.
3133
3134 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3135
3136         * NEWS: Mention the index cache.
3137
3138 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3139
3140         * common/pathstuff.h (get_standard_cache_dir): New.
3141         * common/pathstuff.c (get_standard_cache_dir): New.
3142         * build-id.h (build_id_to_string): New.
3143         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3144         DEBUG_STR_SUFFIX): Move to here.
3145         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3146         DEBUG_STR_SUFFIX): Move from there.
3147         (write_psymtabs_to_index): Make non-static, add basename
3148         parameter.  Write to temporary files, rename when done.
3149         (save_gdb_index_command): Adjust call to
3150         write_psymtabs_to_index.
3151         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3152         field.
3153         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3154         (get_gdb_index_contents_from_cache): New.
3155         (get_gdb_index_contents_from_cache_dwz): New.
3156         (dwarf2_initialize_objfile): Read index from cache.
3157         (dwarf2_build_psymtabs): Save to index.
3158         * dwarf-index-cache.h: New file.
3159         * dwarf-index-cache.c: New file.
3160         * dwarf-index-write.h: New file.
3161
3162 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3163
3164         * gnulib/aclocal.m4: Re-generate.
3165         * gnulib/config.in: Re-generate.
3166         * gnulib/configure: Re-generate.
3167         * gnulib/import/Makefile.am: Re-generate.
3168         * gnulib/import/Makefile.in: Re-generate.
3169         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3170         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3171         * gnulib/import/m4/mkdir.m4: New file.
3172         * gnulib/import/mkdir.c: New file.
3173         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3174         module.
3175
3176 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3177
3178         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3179         * common/scoped_mmap.c: New file.
3180         * common/scoped_mmap.h (destroy): New method.
3181         (~scoped_mmap, reset): Use destroy.
3182         (scoped_mmap): New move constructor.
3183         (mmap_file): New declaration.
3184         * unittests/scoped_mmap-selftests.c (test_normal,
3185         test_invalid_filename, run_tests): New functions.
3186         (_initialize_scoped_mmap_selftests): Register selftest.
3187
3188 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3189
3190         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3191         (read_gdb_index_from_buffer): ... this.  Remove section
3192         parameter, add buffer parameter.
3193         (get_gdb_index_contents_ftype,
3194         get_gdb_index_contents_dwz_ftype): New typedefs.
3195         (dwarf2_read_gdb_index): Add callback parameters to get the
3196         index contents.
3197         (get_gdb_index_contents_from_section): New.
3198         (dwarf2_initialize_objfile): Update call to
3199         dwarf2_read_gdb_index.
3200
3201 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3202
3203         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3204         (gdb_open_cloexec): Likewise.
3205         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3206         (commandline_from_pid): Likewise.
3207         (linux_xfer_osdata_threads): Likewise.
3208         (linux_xfer_osdata_fds): Likewise.
3209         * ada-lang.c (is_package_name): Likewise.
3210         * auxv.c (procfs_xfer_auxv): Likewise.
3211         * breakpoint.c (print_one_breakpoint_location): Use
3212         uiout::field_fmt.
3213         (print_one_catch_solib): Use string_printf.
3214         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3215         (add_pe_forwarded_sym): Likewise.
3216         * dwarf2read.c (create_type_unit_group): Likewise.
3217         (build_error_marker_type): Likewise.
3218         * infcall.c (get_function_name): Likewise.
3219         * valprint.c (print_converted_chars_to_obstack): Likewise.
3220         * xtensa-tdep.c (xtensa_register_type): Likewise.
3221
3222 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3223
3224         * remote.c (remote_target::download_tracepoint): Fix format
3225         string errors.
3226
3227 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3228
3229         * tracefile.c: Include common/byte-vector.h.
3230         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3231         with trace_regblock_size if needed.  Update uses of buf.
3232
3233 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3234
3235         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3236         std::vector<unsigned char>.
3237         * tracepoint.c (collection_list::collection_list): Remove
3238         m_regs_mask initializer from initializer list.  Resize
3239         m_regs_mask using the largest remote register number.
3240         (collection_list::add_remote_register): Remove size check on
3241         m_regs_mask.  Use at to access element.
3242         (collection_list::stringify): Change type of temp_buf to
3243         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3244         stringify the register mask.  Use pack_hex_byte for the register
3245         mask.
3246
3247 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3248
3249         * tracepoint.h (class collection_list) <add_register>: Remove.
3250         <add_remote_register, add_ax_registers, add_local_register>:
3251         Declare.
3252         <add_memrange>: Add scope parameter.
3253         * tracepoint.c (encode_actions_1): Likewise.
3254         (collection_list::add_register): Rename to ...
3255         (collection_list::add_remote_register): ... this.  Update
3256         comment.
3257         (collection_list::add_ax_registers, add_local_register): New
3258         methods.
3259         (collection_list::add_memrange): Add scope parameter.  Call
3260         add_local_register instead of add_register.
3261         (finalize_tracepoint_aexpr): New function.
3262         (collection_list::collect_symbol): Update calls to add_memrange.
3263         Call add_local_register instead of add_register.  Call
3264         add_ax_registers.  Call finalize_tracepoint_aexpr.
3265         (encode_actions_1): Get remote regnos for $reg action.  Call
3266         add_remote_register, add_ax_registers, and add_local_register.
3267         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3268         (validate_actionline): Call finalize_tracepoint_aexpr.
3269
3270 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3271
3272         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3273         Replace array buf with gdb::char_vector buf, of size
3274         get_remote_packet_size ().  Replace references to buf and
3275         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3276         and xsnprintf with snprintf.  Raise errors if the buffer is too
3277         small.
3278
3279 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3280
3281         * remote.c (remote_target::download_tracepoint): Fix the has_more
3282         predicate in the QTDP action list iteration.
3283
3284 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3285
3286         * remote.c (remote_target::download_tracepoint): Fix indentation
3287         in for block.
3288
3289 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3290
3291         * proc-api.c (_initialize_proc_api): Remove c, unused.
3292         * procfs.c (procfs_init_inferior): Remove signals, unused.
3293         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3294         unused.
3295
3296 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3297             Andrew Burgess  <andrew.burgess@embecosm.com>
3298
3299         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3300         'W_STOPCODE (0)' as this could be ambiguous.
3301
3302 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3303
3304         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3305         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3306         "ai_socktype").
3307
3308 2018-08-02  Tom Tromey  <tom@tromey.com>
3309
3310         PR symtab/16842.
3311         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3312         symbols.
3313         (process_structure_scope): Likewise.
3314
3315 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3316
3317         PR gdb/22629:
3318         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3319         kill inferior.
3320
3321 2018-08-02  Tom Tromey  <tom@tromey.com>
3322
3323         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3324         (darwin_suspend_inferior, darwin_resume_inferior)
3325         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3326         (darwin_check_new_threads): Check result of get_darwin_inferior.
3327
3328 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3329
3330         GDB 8.1.1 released.
3331
3332 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3333
3334         * varobj.c (varobj_get_path_expr_parent): Report an error if
3335         parent is a dynamic varobj.
3336
3337 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3338
3339         * gnulib/aclocal.m4: Re-generate.
3340         * gnulib/config.in: Re-generate.
3341         * gnulib/configure: Re-generate.
3342         * gnulib/import/Makefile.in: Re-generate.
3343         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3344         * gnulib/import/m4/onceonly.m4: Re-generate.
3345
3346 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3347
3348         * target-descriptions.c (struct xml_test_tdesc): New.
3349         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3350         (record_xml_tdesc): Update.
3351         (maintenance_check_xml_descriptions): Update.
3352         * target-descriptions.h (record_xml_tdesc): Update comment.
3353
3354 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3355
3356         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3357         checking array bounds are defined.
3358
3359 2018-07-30  Tom Tromey  <tom@tromey.com>
3360
3361         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3362         irreflexivity violation.
3363
3364 2018-07-30  Tom Tromey  <tom@tromey.com>
3365
3366         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3367         * value.c (unpack_long): Remove lint code.
3368         * valops.c (value_ind): Remove lint code.
3369         * valarith.c (value_x_binop, value_x_unop, value_equal)
3370         (value_pos): Remove lint code.
3371
3372 2018-07-28  Tom de Vries  <tdevries@suse.de>
3373
3374         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3375         with undefined upper bound as <optimized out>.
3376
3377 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3378
3379         * gcore.in: Rename variable "name" to "prefix".  Expand
3380         "usage" text.
3381
3382 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3383
3384         * windows-nat.c (windows_nat_target::create_inferior): Update to
3385         call close() in global namespace.
3386
3387 2018-07-26  Tom Tromey  <tom@tromey.com>
3388
3389         * dwarf-index-write.c (add_address_entry): Don't add objfile
3390         offsets.
3391         * dbxread.c (find_stab_function): Rename from
3392         find_stab_function_addr.  Return a bound_minimal_symbol.
3393         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3394         Don't add objfile offsets.
3395         (end_psymtab): Use raw_text_low, raw_text_high,
3396         MSYMBOL_VALUE_RAW_ADDRESS.
3397         (read_ofile_symtab): Update.
3398         (process_one_symbol): Update.
3399         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3400         offsets.
3401         (dw2_relocate): Remove.
3402         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3403         searching addrmap.
3404         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3405         Update.
3406         (process_psymtab_comp_unit_reader, add_partial_symbol)
3407         (add_partial_subprogram, dwarf2_ranges_read): Update.
3408         (load_partial_dies): Update.
3409         (add_address_entry): Don't add objfile offsets.
3410         (dwarf2_build_include_psymtabs): Update.
3411         (create_addrmap_from_aranges): Don't add objfile offsets.
3412         (dw2_find_pc_sect_compunit_symtab): Update.
3413         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3414         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3415         Update.
3416         (parse_partial_symbols): Don't add objfile offsets.  Use
3417         raw_text_low, raw_text_high.  Update.
3418         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3419         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3420         or call 'relocate' quick function.  Clear psymbol_map.
3421         * psympriv.h (struct partial_symbol) <address>: Add section
3422         offset.
3423         <set_unrelocated_address>: Rename from set_address.
3424         <raw_text_low, raw_text_high>: New methods.
3425         <text_low, text_high>: Add objfile parameter.
3426         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3427         set_unrelocated_address.
3428         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3429         (find_pc_psymbol): Update.
3430         (fixup_psymbol_section, relocate_psymtabs): Remove.
3431         (dump_psymtab, psym_functions): Update.
3432         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3433         parameter.
3434         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3435         (start_psymtab_common): Update.
3436         * symfile-debug.c (debug_qf_relocate): Remove.
3437         (debug_sym_quick_functions): Update.
3438         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3439         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3440         Update.
3441
3442 2018-07-26  Tom Tromey  <tromey@redhat.com>
3443
3444         * dbxread.c (end_psymtab): Use text_high_valid and
3445         text_low_valid.
3446         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3447         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3448         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3449         Update comment.
3450         <text_low_valid, text_high_valid>: New fields.
3451         <set_text_low, set_text_high>: Update.
3452         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3453
3454 2018-07-26  Tom Tromey  <tom@tromey.com>
3455
3456         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3457         Update.
3458         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3459         textlow and texthigh fields.
3460         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3461         Update.
3462         * mdebugread.c (parse_lines, parse_partial_symbols)
3463         (psymtab_to_symtab_1): Update.
3464         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3465         Rename fields.  Update comment.  Now private.
3466         <text_low, text_high, set_text_low, set_text_high>: New methods.
3467         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3468         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3469         (start_psymtab_common, maintenance_info_psymtabs)
3470         (maintenance_check_psymtabs): Update.
3471         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3472         texthigh fields.
3473         (scan_xcoff_symtab): Update.
3474
3475 2018-07-26  Tom Tromey  <tromey@redhat.com>
3476
3477         * psympriv.h (struct partial_symbol) <unrelocated_address,
3478         address, set_address>: New methods.
3479         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3480         (fixup_psymbol_section, relocate_psymtabs): Update.
3481         (print_partial_symbols): Add 'objfile' parameter.  Update.
3482         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3483         Update.
3484
3485 2018-07-26  Tom Tromey  <tom@tromey.com>
3486
3487         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3488         (debug_names::write_psymbols): Update.
3489         * psympriv.h (struct partial_symbol): Derive from
3490         general_symbol_info.
3491         <obj_section>: New method.
3492         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3493         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3494         (find_pc_sect_psymbol, fixup_psymbol_section)
3495         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3496         (print_partial_symbols, recursively_search_psymtabs)
3497         (compare_psymbols, psymbol_hash, psymbol_compare)
3498         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3499         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3500
3501 2018-07-26  Tom Tromey  <tromey@redhat.com>
3502
3503         * dbxread.c (end_psymtab): Remove dead code.
3504
3505 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3506
3507         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3508         DWARF unwinders are disabled.
3509         * dwarf2-frame.c: Add dwarf2read.h include.
3510         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3511         disabled.
3512         (dwarf2_frame_unwinders_enabled_p): Define.
3513         (show_dwarf_unwinders_enabled_p): New function.
3514         (_initialize_dwarf2_frame): Register switch to control DWARF
3515         unwinder use.
3516         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3517         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3518         (show_dwarf_cmdlist): Remove static keyword.
3519         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3520         (show_dwarf_cmdlist): Declare.
3521         * NEWS: Document new feature.
3522
3523 2018-07-26  Tom de Vries  <tdevries@suse.de>
3524
3525         PR breakpoints/23366
3526         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3527
3528 2018-07-26  Tom de Vries  <tdevries@suse.de>
3529
3530         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3531         DW_AT_count can't be translated to a dynamic prop.
3532
3533 2018-07-25  Tom de Vries  <tdevries@suse.de>
3534
3535         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3536         try/catch.
3537
3538 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3539
3540         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3541
3542 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3543
3544         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3545
3546 2018-07-24  Keith Seitz  <keiths@redhat.comt
3547
3548         PR symtab/23010
3549         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3550         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3551         instead of add_symbol_to_list.
3552         (read_file_scope): Call prepare_one_comp_unit before reading
3553         any other DIEs.
3554
3555 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3556
3557         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3558
3559 2018-07-24  Tom Tromey  <tom@tromey.com>
3560
3561         * utils.c (malloc, realloc, free): Don't declare.
3562         * configure, config.in: Rebuild.
3563         * configure.ac: Don't check for declarations of free, malloc, or
3564         realloc.
3565
3566 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3567
3568         * aarch64-linux-nat.c
3569         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3570         variable.
3571         * arm-linux-nat.c (fetch_regs): Likewise.
3572         (store_regs): Likewise.
3573         (fetch_vfp_regs): Likewise.
3574         (store_vfp_regs): Likewise.
3575         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3576         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3577         (arm_linux_nat_target::insert_watchpoint): Likewise.
3578         (arm_linux_nat_target::remove_watchpoint): Likewise.
3579         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3580         Likewise.
3581         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3582         Likewise.
3583         * ppc-linux-nat.c (fetch_register): Likewise.
3584         (fetch_all_gp_regs): Likewise.
3585         (fetch_ppc_registers): Likewise.
3586         (store_all_gp_regs): Likewise.
3587         (store_ppc_registers): Likewise.
3588         (hwdebug_insert_point): Likewise.
3589         (can_use_watchpoint_cond_accel): Likewise.
3590         * remote-sim.c (gdb_os_write_stdout): Likewise.
3591
3592 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3593             Tom Tromey  <tom@tromey.com>
3594
3595         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3596         test for it.
3597         * configure: Rebuild.
3598
3599 2018-07-22  Tom Tromey  <tom@tromey.com>
3600
3601         * regformats/regdat.sh: Define xmltarget_${name} inside
3602         #ifndef IN_PROCESS_AGENT.
3603
3604 2018-07-22  Tom Tromey  <tom@tromey.com>
3605
3606         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3607
3608 2018-07-22  Tom Tromey  <tom@tromey.com>
3609
3610         * symfile.c (reread_symbols): Notify iter, not objfile.
3611
3612 2018-07-22  Tom Tromey  <tom@tromey.com>
3613
3614         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3615         Use arch_ops.
3616         (ravenscar_thread_target::prepare_to_store): Likewise.
3617
3618 2018-07-22  Tom Tromey  <tom@tromey.com>
3619
3620         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3621         unused variable.  Call value_fetch_lazy when needed.
3622         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3623         Remove unused variable.  Call value_fetch_lazy when needed.
3624
3625 2018-07-22  Tom Tromey  <tom@tromey.com>
3626
3627         * m32c-tdep.c (mark_dma): Return void.
3628         (make_regs): Remove unused declarations.
3629
3630 2018-07-22  Tom Tromey  <tom@tromey.com>
3631
3632         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3633         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3634         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3635         bkscm_get_valid_block_smob_arg_unsafe for effect.
3636
3637 2018-07-22  Tom Tromey  <tom@tromey.com>
3638
3639         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3640         value_type.
3641
3642 2018-07-22  Tom Tromey  <tom@tromey.com>
3643
3644         * windows-nat.c (saved_context): Conditionally define.
3645         * remote.c (remote_target::remote_btrace_maybe_reopen):
3646         Conditionally declare "warned".
3647         * inflow.c (sigquit_ours): Conditionally define.
3648         (new_tty): Move "tty" declaration inside #if.
3649         * guile/guile.c (guile_datadir): Conditionally define.
3650         * charset.c (set_be_le_names): Move some declarations inside #if.
3651         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3652         #if.
3653         (parse_xml_btrace_conf): Likewise.
3654
3655 2018-07-22  Tom Tromey  <tom@tromey.com>
3656
3657         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3658
3659 2018-07-22  Tom Tromey  <tom@tromey.com>
3660
3661         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3662         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3663         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3664         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3665         * stack.c (frame_apply_level_command): Remove unused variable.
3666         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3667         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3668         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3669         unused variable.
3670         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3671         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3672         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3673         variable.
3674         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3675         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3676         variable.
3677         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3678         Remove unused variable.
3679         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3680         variable.
3681         * common/tdesc.c (print_xml_feature::visit): Remove unused
3682         variable.
3683         * compile/compile-object-load.c (store_regs): Remove unused
3684         variables.
3685         * complaints.c (clear_complaints): Remove unused variable.
3686         * corelow.c (core_target_open): Remove unused variable.
3687         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3688         variable.
3689         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3690         variable.
3691         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3692         variable.
3693         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3694         variable.
3695         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3696         variable.
3697         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3698         variable.
3699         * ia64-tdep.c (examine_prologue): Remove unused variable.
3700         * infcall.c (run_inferior_call): Remove unused variable.
3701         * inferior.c (exit_inferior): Remove unused variable.
3702         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3703         * linespec.c (decode_line_2): Remove unused variable.
3704         * linux-nat.c (super_close): Remove.
3705         * linux-tdep.c (linux_info_proc): Remove unused variable.
3706         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3707         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3708         Remove unused variable.
3709         * parse.c (find_minsym_type_and_address): Remove unused variable.
3710         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3711         variable.
3712         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3713         variable.
3714         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3715         variables.
3716         * record-btrace.c (record_btrace_target::store_registers): Remove
3717         unused variable.
3718         (cmd_show_record_btrace_cpu): Remove unused variable.
3719         * riscv-tdep.c (riscv_register_reggroup_p)
3720         (riscv_push_dummy_call, riscv_return_value): Remove unused
3721         variable.
3722         * rust-exp.y (literal): Remove unused variable.
3723         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3724         unused variable.
3725         <STRUCTOP_ANONYMOUS>: Likewise.
3726         * s390-linux-tdep.c (s390_linux_init_abi_31)
3727         (s390_linux_init_abi_64): Remove unused variable.
3728         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3729         (file_select_thread, net_windows_open, _initialize_ser_windows):
3730         Remove unused variables.
3731         * symtab.c (find_pc_sect_line): Remove unused variable.
3732         * target-memory.c (compute_garbled_blocks): Remove unused
3733         variable.
3734         (target_write_memory_blocks): Remove unused variable.
3735         * target.c (target_stack::unpush): Remove unused variables.
3736         * tracepoint.c (start_tracing, all_tracepoint_actions)
3737         (merge_uploaded_trace_state_variables)
3738         (print_one_static_tracepoint_marker): Remove unused variable.
3739         * unittests/basic_string_view/element_access/char/1.cc (test01):
3740         Remove unused variable.
3741         * windows-nat.c (windows_continue, windows_add_all_dlls)
3742         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3743         Remove unused variables.
3744
3745 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3746
3747         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3748         attr_profile in HAVE_ELF.
3749         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3750         HAVE_ELF.
3751
3752 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3753
3754         * frame.c (frame_register_unwind): Change parameter name.
3755         (frame_unwind_register): Likewise.
3756         (frame_unwind_register_value): Likewise.
3757         (frame_unwind_register_signed): Likewise.
3758         (frame_unwind_register_unsigned): Likewise.
3759         * frame.h (frame_register_unwind): Likewise.
3760         (frame_unwind_register): Likewise.
3761         (frame_unwind_register_value): Likewise.
3762         (frame_unwind_register_signed): Likewise.
3763         (frame_unwind_register_unsigned): Likewise.
3764         (frame_unwind_arch): Likewise.
3765
3766 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3767
3768         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3769         ISA maintenance.
3770
3771 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3772
3773         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3774         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3775         hand.
3776
3777 2018-07-20  Keith Seitz  <keiths@redhat.com>
3778
3779         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3780         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3781         m_compunit_symtab, m_language>: Add "m_" prefix.
3782         Update all uses.
3783         * buildsym.c: Update all uses.
3784
3785 2018-07-20  Tom Tromey  <tom@tromey.com>
3786
3787         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3788         * buildsym.h (record_line_ftype): Remove typedef.
3789
3790 2018-07-20  Tom Tromey  <tom@tromey.com>
3791
3792         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3793         (end_expandable_symtab): Likewise.
3794         (end_symtab_get_static_block): Likewise.
3795         (end_symtab_from_static_block): Likewise.
3796         * buildsym-legacy.c (augment_type_symtab): Remove.
3797         (end_expandable_symtab): Remove.
3798         (end_symtab_get_static_block): Remove.
3799         (end_symtab_from_static_block): Remove.
3800
3801 2018-07-20  Tom Tromey  <tom@tromey.com>
3802
3803         * dwarf2read.c: Include buildsym.h.
3804         (struct dwarf2_cu) <builder>: New method.
3805         (fixup_go_packaging): Update.
3806         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3807         use scoped_free_pendings.
3808         (using_directives): Add "cu" parameter, remove "language".
3809         (read_import_statement, setup_type_unit_groups, )
3810         (read_func_scope, read_lexical_block_scope)
3811         (dwarf2_record_block_ranges, read_namespace): Update.
3812         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3813         (lnp_state_machine::handle_end_sequence): Update.
3814         (class lnp_state_machine) <m_cu>: New member.
3815         <m_record_line_callback>: Remove.
3816         <m_currently_recording_lines>: New member.
3817         (lnp_state_machine::handle_set_file): Update.
3818         (noop_record_line): Remove.
3819         (dwarf_record_line_p): Add cu parameter.
3820         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3821         (lnp_state_machine::record_line)
3822         (lnp_state_machine::lnp_state_machine)
3823         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3824         (dwarf_decode_lines): Update.
3825         (dwarf2_start_subfile): Add cu parameter.
3826         (dwarf2_start_symtab, new_symbol): Update.
3827         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3828         Remove dwarf2_per_objfile parameter.
3829         (dwarf_decode_macros): Update.
3830
3831 2018-07-20  Tom Tromey  <tom@tromey.com>
3832
3833         * stabsread.c (define_symbol): Update.
3834         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3835         * dwarf2read.c (new_symbol): Update.
3836         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3837         * cp-namespace.c: Include buildsym.h.
3838         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3839         * buildsym-legacy.c (get_buildsym_compunit): New function.
3840
3841 2018-07-20  Tom Tromey  <tom@tromey.com>
3842
3843         * xcoffread.c: Include buildsym-legacy.h.
3844         * windows-nat.c: Include buildsym-legacy.h.
3845         * stabsread.c: Include buildsym-legacy.h.
3846         * mdebugread.c: Include buildsym-legacy.h.
3847         * buildsym-legacy.h: New file.
3848         * buildsym-legacy.c: New file, from buildsym.c.
3849         * go32-nat.c: Include buildsym-legacy.h.
3850         * dwarf2read.c: Include buildsym-legacy.h.
3851         * dbxread.c: Include buildsym-legacy.h.
3852         * cp-namespace.c: Include buildsym-legacy.h.
3853         * coffread.c: Include buildsym-legacy.h.
3854         * buildsym.h: Move some contents to buildsym-legacy.h.
3855         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3856         buildsym-legacy.c.
3857         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3858
3859 2018-07-20  Tom Tromey  <tom@tromey.com>
3860
3861         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3862         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3863         (buildsym_compunit::buildsym_compunit)
3864         (buildsym_compunit::~buildsym_compunit)
3865         (buildsym_compunit::get_macro_table): Define.
3866
3867 2018-07-20  Tom Tromey  <tom@tromey.com>
3868
3869         * buildsym.c (reset_symtab_globals): Remove.
3870         (buildsym_compunit::end_symtab_from_static_block): Update.
3871         (buildsym_compunit::augment_type_symtab): Update.
3872         (end_symtab_from_static_block): Call free_buildsym_compunit.
3873         (augment_type_symtab, end_symtab, end_expandable_symtab):
3874         Likewise.
3875
3876 2018-07-20  Tom Tromey  <tom@tromey.com>
3877
3878         * arch-utils.c: Do not include buildsym.h.
3879         * mipsread.c: Do not include buildsym.h.
3880         * machoread.c: Do not include buildsym.h.
3881         * elfread.c: Do not include buildsym.h.
3882
3883 2018-07-20  Tom Tromey  <tom@tromey.com>
3884
3885         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3886         initialization.
3887         (buildsym_compunit): Add new constructor.
3888         (struct buildsym_compunit) <get_last_source_file, finish_block,
3889         record_block_range, start_subfile, patch_subfile_names,
3890         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3891         set_last_source_start_addr, get_last_source_start_addr,
3892         get_local_using_directives, set_local_using_directives,
3893         get_global_using_directives, outermost_context_p,
3894         get_current_context_stack, get_context_stack_depth,
3895         get_current_subfile, get_local_symbols, get_file_symbols,
3896         get_global_symbols, record_debugformat, record_producer,
3897         push_context, pop_context, end_symtab_get_static_block,
3898         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3899         New public methods.
3900         <record_pending_block, finish_block_internal, make_blockvector,
3901         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3902         private methods.
3903         Update all users.
3904
3905 2018-05-22  Tom Tromey  <tom@tromey.com>
3906
3907         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3908         parameter.
3909         (finish_block_internal): Update.
3910
3911 2018-07-20  Tom Tromey  <tom@tromey.com>
3912
3913         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3914         parameter.
3915         (finish_block_internal): Update.
3916
3917 2018-07-20  Tom Tromey  <tom@tromey.com>
3918
3919         * buildsym.h (EXTERN): Don't define or undef.
3920         * buildsym.c (EXTERN): Don't define.
3921
3922 2018-07-20  Tom Tromey  <tom@tromey.com>
3923
3924         * buildsym.c: Remove TODO comment.
3925
3926 2018-07-20  Tom Tromey  <tom@tromey.com>
3927
3928         * coffread.c (coff_symtab_read): Update.
3929         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3930         (xcoff_new_init): Update.
3931         * mipsread.c (mipscoff_new_init): Update.
3932         * mdebugread.c (mdebug_build_psymtabs): Update.
3933         * elfread.c (elf_new_init): Update.
3934         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3935         Update.
3936         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3937         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3938         (stabsect_build_psymtabs): Update.
3939         * buildsym.h (buildsym_init): Don't declare.
3940         * buildsym.c: Update comment.
3941         (prepare_for_building): Remove.
3942         (start_symtab, restart_symtab): Update.
3943         (reset_symtab_globals): Update comment.
3944         (buildsym_init): Remove.
3945
3946 2018-07-20  Tom Tromey  <tom@tromey.com>
3947
3948         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3949         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3950         (read_enum_type, common_block_start, common_block_end)
3951         (cleanup_undefined_types_1, finish_global_stabs): Update.
3952         * mdebugread.c (psymtab_to_symtab_1): Update.
3953         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3954         (read_lexical_block_scope, new_symbol): Update.
3955         * dbxread.c (process_one_symbol): Update.
3956         * coffread.c (coff_symtab_read, process_coff_symbol)
3957         (coff_read_enum_type): Update.
3958         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3959         declare.
3960         (get_local_symbols, get_file_symbols, get_global_symbols): New
3961         functions.
3962         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3963         m_global_symbols.
3964         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3965         (~scoped_free_pendings): Update.
3966         (finish_block, prepare_for_building, reset_symtab_globals)
3967         (end_symtab_get_static_block, end_symtab_with_blockvector)
3968         (augment_type_symtab, push_context): Update.
3969         (get_local_symbols, get_file_symbols, get_global_symbols): New
3970         functions.
3971         (buildsym_init): Update.
3972
3973 2018-07-20  Tom Tromey  <tom@tromey.com>
3974
3975         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3976         (process_full_type_unit): Likewise.
3977         (dwarf2_start_symtab): Set list_in_scope.
3978
3979 2018-07-20  Tom Tromey  <tom@tromey.com>
3980
3981         * dwarf2read.c (process_psymtab_comp_unit_reader)
3982         (build_type_psymtabs_reader): Do not set list_in_scope.
3983
3984 2018-07-20  Tom Tromey  <tom@tromey.com>
3985
3986         * buildsym.c (free_pendings): Remove.
3987         (add_symbol_to_list, scoped_free_pendings)
3988         (finish_block_internal, buildsym_init): Update.
3989
3990 2018-07-20  Tom Tromey  <tom@tromey.com>
3991
3992         * xcoffread.c (read_xcoff_symtab): Update.
3993         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3994         Update.
3995         * dbxread.c (process_one_symbol): Update.
3996         * coffread.c (coff_symtab_read): Update.
3997         * buildsym.h (finish_block): Update.
3998         * buildsym.c (finish_block): Remove "listhead" argument.
3999         (end_symtab_get_static_block): Update.
4000
4001 2018-07-20  Tom Tromey  <tom@tromey.com>
4002
4003         * buildsym.h (class scoped_free_pendings): Remove constructor.
4004         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4005         method.
4006         <m_pending_block_obstack, m_pending_blocks>: New members.
4007         (pending_block_obstack, pending_blocks): Remove.
4008         (scoped_free_pendings::scoped_free_pendings): Default.
4009         (~scoped_free_pendings): Update.
4010         (free_pending_blocks): Remove.
4011         (finish_block_internal, record_pending_block, make_blockvector)
4012         (end_symtab_get_static_block, augment_type_symtab, push_context)
4013         (buildsym_init): Update.
4014
4015 2018-07-20  Tom Tromey  <tom@tromey.com>
4016
4017         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4018         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4019         members.
4020         (pending_addrmap, pending_addrmap_obstack)
4021         (pending_addrmap_interesting): Remove.
4022         (scoped_free_pendings, record_block_range, make_blockvector)
4023         (prepare_for_building, reset_symtab_globals, buildsym_init):
4024         Update.
4025
4026 2018-07-20  Tom Tromey  <tom@tromey.com>
4027
4028         * xcoffread.c (process_linenos): Update.
4029         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4030         * mdebugread.c (psymtab_to_symtab_1): Update.
4031         * dwarf2read.c (setup_type_unit_groups)
4032         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4033         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4034         * dbxread.c (process_one_symbol): Update.
4035         * coffread.c (coff_symtab_read, enter_linenos)
4036         (process_coff_symbol): Update.
4037         * buildsym.h (current_subfile): Don't declare.
4038         (get_current_subfile): Declare.
4039         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4040         member.
4041         (start_subfile, free_buildsym_compunit, push_subfile)
4042         (prepare_for_building, start_symtab): Update.
4043         (get_current_subfile): New function.
4044
4045 2018-07-20  Tom Tromey  <tom@tromey.com>
4046
4047         * coffread.c (coff_symtab_read): Update.
4048         * xcoffread.c (read_xcoff_symtab): Update.
4049         * dwarf2read.c (new_symbol): Update.
4050         (read_func_scope, read_lexical_block_scope): Update.
4051         * dbxread.c (process_one_symbol): Update.
4052         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4053         (outermost_context_p): Remove macro.
4054         (outermost_context_p, get_current_context_stack)
4055         (get_context_stack_depth): Declare.
4056         (pop_context): Return struct context_stack.
4057         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4058         member.
4059         (context_stack_size): Remove.
4060         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4061         (prepare_for_building, end_symtab_get_static_block)
4062         (augment_type_symtab, push_context): Update.
4063         (pop_context): Return struct context_stack.
4064         (outermost_context_p, get_current_context_stack)
4065         (get_context_stack_depth): New functions.
4066         (buildsym_init): Update.
4067
4068 2018-07-20  Tom Tromey  <tom@tromey.com>
4069
4070         * rust-exp.y: Now a pure parser.  Update all rules.
4071         (%union): Move earlier.
4072         (current_parser, work_obstack): Remove globals.
4073         (rust_parser, ~rust_parser): Update.
4074         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4075         lex_character, lex_number, lex_string, lex_identifier,
4076         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4077         convert_name, convert_params_to_expression,
4078         convert_ast_to_expression, ast_basic_type, ast_operation,
4079         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4080         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4081         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4082         ast_array_type, ast_slice_type, ast_reference_type,
4083         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4084         (rust_parse): Update.
4085         (rustyyerror, rustyylex): Add parser parameter.
4086         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4087         (rust_lex_stringish_test, rust_lex_test_sequence)
4088         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4089         (rust_lex_test_push_back, rust_lex_tests): Update.
4090
4091 2018-07-19  Pedro Alves  <palves@redhat.com>
4092
4093         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4094         gdb::unique_xmalloc_ptr.
4095         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4096         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4097         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4098         copy-initialization.
4099         * guile/scm-pretty-print.c (ppscm_print_children): Use
4100         gdb::unique_xmalloc_ptr instead of cleanups.
4101         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4102         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4103         gdb::unique_xmalloc_ptr.
4104         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4105         Adjust to use gdb::unique_xmalloc_ptr.
4106         * guile/scm-utils.c (extract_arg): Adjust.
4107         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4108         gdb::unique_xmalloc_ptr instead of a cleanup.
4109
4110 2018-07-19  Tom Tromey  <tom@tromey.com>
4111
4112         * utils.c (do_value_free_to_mark)
4113         (make_cleanup_value_free_to_mark): Remove.
4114         * utils.h (make_cleanup_value_free_to_mark): Remove.
4115
4116 2018-07-19  Pedro Alves  <palves@redhat.com>
4117
4118         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4119         forwarding reference.
4120
4121 2018-07-18  Pedro Alves  <palves@redhat.com>
4122
4123         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4124         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4125         cleanup.
4126
4127 2018-07-18  Pedro Alves  <palves@redhat.com>
4128
4129         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4130         exceptions.
4131         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4132         (gdbscm_wrap): New.
4133         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4134         directly instead of a cleanup.
4135         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4136         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4137         (vlscm_binop_gdbthrow): New, factored out from ...
4138         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4139         (vlscm_rich_compare): Use gdbscm_wrap.
4140         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4141         instead of a cleanup.
4142         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4143         cleanup.
4144         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4145         Use xfree directly instead of a cleanup.
4146         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4147         Adjust to use gdbscm_wrap and scoped_value_mark.
4148         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4149         (gdbscm_value_address, gdbscm_value_dereference)
4150         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4151         scoped_value_mark.
4152         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4153         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4154         scoped_value_mark.
4155         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4156         gdbscm_wrap and scoped_value_mark.
4157         (gdbscm_value_to_string): Use xfree directly instead of a
4158         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4159         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4160         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4161         scoped_value_mark.
4162         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4163         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4164         scoped_value_mark.
4165         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4166         gdbscm_wrap.
4167
4168 2018-07-18  Tom de Vries  <tdevries@suse.de>
4169
4170         * findvar.c (default_read_var_value): Also resolve dynamic type for
4171         LOC_OPTIMIZED_OUT vars.
4172
4173 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4174
4175         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4176         decoding.
4177
4178 2018-07-17  Tom Tromey  <tom@tromey.com>
4179
4180         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4181         (compute_enum_list, pascm_set_param_value_x)
4182         (gdbscm_parameter_value): Update.
4183         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4184         (gdbscm_scm_to_host_string): Update.
4185         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4186         Update.
4187         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4188         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4189         * guile/scm-string.c (gdbscm_scm_to_string): Return
4190         unique_xmalloc_ptr.
4191         (gdbscm_scm_to_host_string): Likewise.
4192
4193 2018-07-17  Tom Tromey  <tom@tromey.com>
4194
4195         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4196         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4197         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4198         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4199         unique_xmalloc_ptr.
4200
4201 2018-07-17  Tom Tromey  <tom@tromey.com>
4202
4203         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4204         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4205         Update.
4206         * guile/scm-cmd.c (cmdscm_function): Update.
4207         * guile/scm-pretty-print.c
4208         (ppscm_print_exception_unless_memory_error): Update.
4209         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4210         Return unique_xmalloc_ptr.
4211
4212 2018-07-17  Tom Tromey  <tom@tromey.com>
4213
4214         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4215         Use string_printf.
4216
4217 2018-07-17  Jim Wilson  <jimw@sifive.com>
4218
4219         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4220         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4221         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4222         unecessary braces after EF_RISCV_RVC test.  Delete call to
4223         set_gdbarch_decr_pc_after_break.
4224
4225         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4226         RISCV_LAST_FP_REGNUM + 1.
4227         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4228
4229 2018-07-17  Tom Tromey  <tom@tromey.com>
4230
4231         * configure.ac: Remove --disable-gdbcli.
4232         * configure: Rebuild.
4233         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4234         (SUBDIR_CLI_CFLAGS): Remove.
4235         (SFILES): Use SUBDIR_CLI_SRCS.
4236         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4237
4238 2018-07-17  Tom Tromey  <tom@tromey.com>
4239
4240         PR gdb/18624:
4241         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4242
4243 2018-07-16  Jim Wilson  <jimw@sifive.com>
4244
4245         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4246
4247 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4248
4249         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4250         variable.
4251         (libunwind_frame_sniffer): Likewise.
4252         (libunwind_frame_prev_register): Likewise.
4253         (libunwind_sigtramp_frame_sniffer): Likewise.
4254         * ia64-tdep.c (ia64_access_reg): Likewise.
4255         (ia64_access_rse_reg): Likewise.
4256         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4257         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4258
4259 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4260
4261         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4262
4263 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4264
4265         * remote-sim.c (gdbsim_target::close,
4266         gdbsim_target::mourn_inferior): Remove unused variables.
4267
4268 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4269
4270         * ia64-tdep.c (ktab_buf): New global.
4271         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4272         (get_kernel_table): Adjust.
4273
4274 2018-07-16  Tom Tromey  <tom@tromey.com>
4275
4276         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4277         * dwarf2read.c (using_directives, new_symbol): Use
4278         outermost_context_p.
4279         * dbxread.c (process_one_symbol): Use outermost_context_p.
4280         * coffread.c (coff_symtab_read): Use outermost_context_p.
4281
4282 2018-07-16  Tom Tromey  <tom@tromey.com>
4283
4284         * dwarf2read.c (using_directives, read_func_scope)
4285         (read_lexical_block_scope): Update.
4286         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4287         * buildsym.h (local_using_directives, global_using_directives):
4288         Don't declare.
4289         (get_local_using_directives, set_local_using_directives)
4290         (get_global_using_directives): Declare.
4291         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4292         m_global_using_directives>: New members.
4293         (finish_block_internal, prepare_for_building)
4294         (reset_symtab_globals, end_symtab_get_static_block)
4295         (push_context): Update.
4296         (get_local_using_directives, set_local_using_directives)
4297         (get_global_using_directives): New functions.
4298         (buildsym_init): Update.
4299
4300 2018-07-16  Tom Tromey  <tom@tromey.com>
4301
4302         * xcoffread.c (xcoff_initial_scan): Don't call
4303         free_pending_blocks.
4304         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4305         * buildsym.h (class scoped_free_pendings): Add constructor.
4306         (free_pending_blocks): Don't declare.
4307         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4308         (free_pending_blocks): Now static.
4309
4310 2018-07-16  Tom Tromey  <tom@tromey.com>
4311
4312         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4313         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4314         member.
4315         (struct subfile_stack): Remove.
4316         (subfile_stack): Remove.
4317         (push_subfile, pop_subfile, buildsym_init): Update.
4318
4319 2018-07-16  Tom Tromey  <tom@tromey.com>
4320
4321         * buildsym.c (push_subfile): Use gdb_assert.
4322         (pop_subfile): Use gdb_assert.
4323
4324 2018-07-16  Tom Tromey  <tom@tromey.com>
4325
4326         * buildsym.h (merge_symbol_lists): Remove.
4327         * buildsym.c (merge_symbol_lists): Remove.
4328
4329 2018-07-16  Tom Tromey  <tom@tromey.com>
4330
4331         * stabsread.c (scan_file_globals): Update comment.
4332         * stabsread.h (scan_file_globals): Move from buildsym.h.
4333         * buildsym.h (scan_file_globals): Move to stabsread.h.
4334
4335 2018-07-16  Tom Tromey  <tom@tromey.com>
4336
4337         * xcoffread.c (xcoff_new_init): Update.
4338         * mipsread.c (mipscoff_new_init): Update.
4339         * mdebugread.c (mdebug_build_psymtabs): Update.
4340         * elfread.c (elf_new_init): Update.
4341         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4342         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4343         * buildsym.h (buildsym_new_init): Don't declare.
4344         * buildsym.c (buildsym_new_init): Remove.
4345
4346 2018-07-16  Tom Tromey  <tom@tromey.com>
4347
4348         * stabsread.h (within_function): Move from buildsym.h.
4349         * stabsread.c (start_stabs): Clear within_function.
4350         * coffread.c (coff_start_symtab): Clear within_function.
4351         * buildsym.h (within_function): Move to stabsread.h.
4352         * buildsym.c (prepare_for_building): Update.
4353
4354 2018-07-16  Tom Tromey  <tom@tromey.com>
4355
4356         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4357         * dwarf2read.c (dwarf2_start_symtab): Don't set
4358         processing_gcc_compilation.
4359         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4360
4361 2018-07-16  Tom Tromey  <tom@tromey.com>
4362
4363         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4364         (next_symbol_text_func): Move from buildsym.h.
4365         * stabsread.c (hashname): Move from buildsym.c.
4366         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4367         (next_symbol_text_func, hashname): Move to stabsread.h.
4368         * buildsym.c: Don't include bcache.h
4369         (hashname): Move to stasbread.c.
4370
4371 2018-07-16  Tom Tromey  <tom@tromey.com>
4372
4373         * buildsym.h (context_stack_size): Don't declare.
4374         * buildsym.c (context_stack_size): New global.
4375
4376 2018-07-16  Tom Tromey  <tom@tromey.com>
4377
4378         * dbxread.c (processing_acc_compilation): New global.
4379         * buildsym.h (processing_acc_compilation): Don't declare.
4380
4381 2018-07-16  Tom Tromey  <tom@tromey.com>
4382
4383         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4384         * dbxread.c (read_ofile_symtab): Update.
4385         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4386         * buildsym.h (last_source_start_addr): Remove.
4387         (set_last_source_start_addr, get_last_source_start_addr):
4388         Declare.
4389         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4390         parameter.
4391         (struct buildsym_compunit) <m_last_source_start_addr>: New
4392         member.
4393         (prepare_for_building): Remove start_addr parameter.
4394         (start_symtab, restart_symtab, end_symtab_get_static_block)
4395         (end_symtab_with_blockvector): Update.
4396         (set_last_source_start_addr, get_last_source_start_addr): New
4397         functions.
4398
4399 2018-07-16  Tom Tromey  <tom@tromey.com>
4400
4401         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4402         member.
4403         (have_line_numbers): Remove.
4404         (record_line, prepare_for_building, end_symtab_get_static_block)
4405         (augment_type_symtab): Update.
4406
4407 2018-07-16  Tom Tromey  <tom@tromey.com>
4408
4409         * buildsym.c (~buildsym_compunit): Free the macro table.
4410         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4411         methods.
4412         <m_pending_macros>: New member.
4413         (pending_macros): Remove.
4414         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4415         (reset_symtab_globals, end_symtab_get_static_block)
4416         (end_symtab_with_blockvector, augment_type_symtab)
4417         (buildsym_init): Update.
4418
4419 2018-07-16  Tom Tromey  <tom@tromey.com>
4420
4421         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4422         parameter.
4423         (buildsym_compunit::set_last_source_file): New method.
4424         <m_last_source_file>: New member.
4425         (prepare_for_building): Remove "name" parameter.
4426         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4427         (last_source_file): Remove.
4428         (set_last_source_file, get_last_source_file): Update.
4429
4430 2018-07-16  Tom Tromey  <tom@tromey.com>
4431
4432         * buildsym.c (prepare_for_building): Add assert.
4433
4434 2018-07-16  Tom Tromey  <tom@tromey.com>
4435
4436         * buildsym.c (~buildsym_compunit): Update.
4437         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4438         (start_subfile, patch_subfile_names)
4439         (end_symtab_with_blockvector): Update.
4440
4441 2018-07-16  Tom Tromey  <tom@tromey.com>
4442
4443         * buildsym.c (struct buildsym_compunit): Add constructor,
4444         destructor, initializers.
4445         (start_buildsym_compunit): Remove.
4446         (free_buildsym_compunit): Use "delete".
4447         (start_symtab, restart_symtab): Use "new".
4448
4449 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4450
4451         * symfile.c (set_objfile_default_section_offset): Remove struct
4452         keyword.
4453
4454 2018-07-14  Stafford Horne  <shorne@gmail.com>
4455
4456         * (Responsible Maintainers): Add myself as or1k maintainer.
4457
4458 2018-07-13  Tom Tromey  <tom@tromey.com>
4459
4460         * symfile.c (set_objfile_default_section_offset): Use extra braces
4461         around initializer.
4462
4463 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4464
4465         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4466         non-branching basr.
4467
4468 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4469
4470         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4471         unittests/cli-utils-selftests.c
4472         * unittests/cli-utils-selftests.c: New file.
4473
4474 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4475
4476         * NEWS: Mention new commands. Mention change to 'thread apply'.
4477
4478 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4479
4480         * thread.c (thr_try_catch_cmd): New function.
4481         (thread_apply_all_command): Handle qcs flags.
4482         (thread_apply_command): Handle qcs flags.
4483         (taas_command): New function.
4484         (tfaas_command): New function.
4485         (_initialize_thread): Update to setup the new commands 'taas
4486         and 'tfaas'. Change doc string for 'thread apply'.
4487
4488 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4489
4490         * stack.c: (trailing_outermost_frame): New function, mostly
4491         extracted from backtrace_command_1.
4492         (leading_innermost_frame): New function.
4493         (backtrace_command_1): Update to call trailing_outermost_frame.
4494         (frame_apply_command_count): New function.
4495         (frame_apply_level_command): New function.
4496         (frame_apply_all_command): New function.
4497         (frame_apply_command): New function.
4498         (faas_command): New function.
4499         (frame_cmd_list): New variable.
4500         (_initialize_stack): Update to setup the new commands 'frame apply'
4501         and 'faas'.
4502
4503 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4504
4505         * cli-utils.c (number_or_range_parser::get_number): Only handle
4506         numbers or convenience var as numbers.
4507         (parse_flags): New function.
4508         (parse_flags_qcs): New function.
4509         (number_or_range_parser::finished): Ensure parsing end is detected
4510         before end of string.
4511         * cli-utils.h (parse_flags): New function.
4512         (parse_flags_qcs): New function.
4513         (number_or_range_parser): Remove m_finished bool.
4514         (number_or_range_parser::skip_range): Set m_in_range to false.
4515
4516 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4517
4518         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4519         on Windows.
4520
4521 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4522             Jan Kratochvil  <jan.kratochvil@redhat.com>
4523             Paul Fertser  <fercerpav@gmail.com>
4524             Tsutomu Seki  <sekiriki@gmail.com>
4525             Pedro Alves  <palves@redhat.com>
4526
4527         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4528         'unittests/parse-connection-spec-selftests.c'.
4529         (COMMON_SFILES): Add 'common/netstuff.c'.
4530         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4531         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4532         * common/netstuff.c: New file.
4533         * common/netstuff.h: New file.
4534         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4535         (wait_for_connect): Update comment.  New parameter
4536         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4537         Use 'sock' directly instead of 'scb->fd'.
4538         (try_connect): New function, with code from 'net_open'.
4539         (net_open): Rewrite main loop to deal with multiple
4540         sockets/addresses.  Handle IPv6-style hostnames; implement
4541         support for IPv6 connections.
4542         * unittests/parse-connection-spec-selftests.c: New file.
4543
4544 2018-07-11  Pedro Alves  <palves@redhat.com>
4545
4546         PR gdb/23377
4547         * remote.c (remote_target::remote_detach_pid): Call
4548         set_current_process.
4549
4550 2018-07-11  Pedro Alves  <palves@redhat.com>
4551
4552         * h8300-tdep.c (h8300_gdbarch_init): Remove
4553         set_gdbarch_ecoff_reg_to_regnum calls.
4554
4555 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4556
4557         PR c++/23373
4558         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4559         offsets/sizes for static members of a class/struct.
4560
4561 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4562
4563         * target-descriptions.c (tdesc_register_bitsize): Rename.
4564         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4565         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4566         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4567
4568 2018-07-10  Tom Tromey  <tom@tromey.com>
4569
4570         * breakpoint.c (moribund_locations): Now static and a
4571         std::vector.
4572         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4573         (build_bpstat_chain, update_global_location_list)
4574         (breakpoint_retire_moribund): Update.
4575         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4576         VEC.
4577
4578 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4579
4580         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4581         (riscv_register_reggroup_p): Use new function, remove unneeded
4582         parenthesis.
4583         (riscv_push_dummy_call): Extend assert to compare against xlen or
4584         flen based on register type.
4585
4586 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4587
4588         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4589
4590 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4591
4592         * remote.c (show_hardware_watchpoint_limit): New function.
4593         (show_hardware_watchpoint_length_limit): New function.
4594         (show_hardware_breakpoint_limit): New function.
4595         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4596         where appropriate, update help text.
4597
4598 2018-07-09  Tom Tromey  <tom@tromey.com>
4599
4600         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4601         (CLIBS): Don't mention NAT_CLIBS.
4602
4603 2018-07-09  Tom Tromey  <tom@tromey.com>
4604
4605         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4606         (LIBGDB_OBS, clean mostlyclean): Update.
4607         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4608
4609 2018-07-09  Tom Tromey  <tom@tromey.com>
4610
4611         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4612         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4613         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4614
4615 2018-07-09  Tom Tromey  <tom@tromey.com>
4616
4617         * Makefile.in (ALLDEPFILES): Remove exec.c.
4618         (COMMON_OBS): Remove exec.o.
4619         (COMMON_SFILES): Add exec.c.
4620
4621 2018-07-09  Tom Tromey  <tom@tromey.com>
4622
4623         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4624
4625 2018-07-09  Tom Tromey  <tom@tromey.com>
4626
4627         * Makefile.in (clean mostlyclean): Remove stamp-version.
4628         (version.c): Depend on stamp-version.
4629         (stamp-version): New rule, from version.c rule.
4630
4631 2018-07-09  Tom Tromey  <tom@tromey.com>
4632
4633         * Makefile.in (init.c): Depend on stamp-init.
4634         (stamp-init): New rule, from init.c rule.
4635         (clean mostlyclean): Remove stamp-init.
4636
4637 2018-07-09  Tom Tromey  <tom@tromey.com>
4638
4639         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4640         SUBDIR_GCC_COMPILE_SRCS.
4641
4642 2018-07-09  Tom Tromey  <tom@tromey.com>
4643
4644         * Makefile.in (init.c): Remove some unused sed rules.
4645
4646 2018-07-09  Tom Tromey  <tom@tromey.com>
4647
4648         * Makefile.in (TSOBS): Remove.
4649         (INIT_FILES): Update.
4650         (LIBGDB_OBS): Update.
4651         (COMMON_SFILES): Add inflow.c.
4652         (SFILES): Remove inflow.c.
4653
4654 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4655
4656         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4657
4658 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4659
4660         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4661         get_saveloc_name, is_signal_frame_name, step_name,
4662         init_remote_name, create_addr_space_name,
4663         destroy_addr_space_name, search_unwind_table_name,
4664         find_dyn_list_name): Constify.
4665
4666 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4667
4668         * darwin-nat.c (darwin_pthread_kill): New function.
4669         (darwin_resume_thread): Use darwin_pthread_kill.
4670
4671 2018-07-05  Tom de Vries  <tdevries@suse.de>
4672
4673         * macroexp.c (macro_buffer) <operator=>: New member function.
4674
4675 2018-07-04  Tom Tromey  <tom@tromey.com>
4676
4677         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4678
4679 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4680
4681         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4682         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4683         * maint.c: Likewise.
4684         * top.c: Likewise.
4685
4686 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4687
4688         * NEWS: Create a new section for the next release branch.
4689         Rename the section of the current branch, now that it has
4690         been cut.
4691
4692 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4693
4694         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4695         * version.in: Bump version to 8.2.50.DATE-git.
4696
4697 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4698             Pedro Alves  <palves@redhat.com>
4699
4700         * linux-nat.c (linux_init_ptrace): Rename to ...
4701         (linux_init_ptrace_procfs): ... this.  Call
4702         linux_proc_init_warnings.
4703         (linux_nat_target::post_attach)
4704         (linux_nat_target::post_startup_inferior): Adjust.
4705         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4706         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4707
4708 2018-07-04  Tom de Vries  <tdevries@suse.de>
4709
4710         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4711         check ...
4712         (read_comp_unit_head): ... here.
4713
4714 2018-07-03  Tom Tromey  <tom@tromey.com>
4715
4716         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4717         (stop_tracing, tstatus_command)
4718         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4719         (print_one_static_tracepoint_marker): Update.
4720         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4721         std::vector.
4722         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4723         VEC.
4724         (all_tracepoints, static_tracepoints_here): Return std::vector.
4725
4726 2018-07-03  Tom Tromey  <tom@tromey.com>
4727
4728         * common/ptid.c (ptid_equal): Remove.
4729         * common/ptid.h (ptid_equal): Don't declare.
4730         * ada-tasks.c: Update.
4731         * breakpoint.c: Update.
4732         * common/agent.c: Update.
4733         * corelow.c: Update.
4734         * darwin-nat-info.c: Update.
4735         * darwin-nat.c: Update.
4736         * dcache.c: Update.
4737         * dtrace-probe.c: Update.
4738         * dummy-frame.c: Update.
4739         * fbsd-nat.c: Update.
4740         * frame.c: Update.
4741         * gdbthread.h: Update.
4742         * gnu-nat.c: Update.
4743         * go32-nat.c: Update.
4744         * inf-loop.c: Update.
4745         * inf-ptrace.c: Update.
4746         * infcall.c: Update.
4747         * infcmd.c: Update.
4748         * inflow.c: Update.
4749         * infrun.c: Update.
4750         * linux-fork.c: Update.
4751         * linux-nat.c: Update.
4752         * linux-thread-db.c: Update.
4753         * mi/mi-cmd-var.c: Update.
4754         * mi/mi-interp.c: Update.
4755         * mi/mi-main.c: Update.
4756         * nto-procfs.c: Update.
4757         * ppc-linux-tdep.c: Update.
4758         * procfs.c: Update.
4759         * python/py-inferior.c: Update.
4760         * python/py-record-btrace.c: Update.
4761         * python/py-record.c: Update.
4762         * ravenscar-thread.c: Update.
4763         * regcache.c: Update.
4764         * remote-sim.c: Update.
4765         * remote.c: Update.
4766         * sol-thread.c: Update.
4767         * solib.c: Update.
4768         * target.c: Update.
4769         * tui/tui-stack.c: Update.
4770         * varobj.c: Update.
4771         * windows-nat.c: Update.
4772         * windows-tdep.c: Update.
4773
4774 2018-07-03  Tom Tromey  <tom@tromey.com>
4775
4776         * common/ptid.c (ptid_match): Remove.
4777         * common/ptid.h (ptid_match): Don't declare.
4778         * fbsd-nat.c: Update.
4779         * infcmd.c: Update.
4780         * infrun.c: Update.
4781         * linux-nat.c: Update.
4782         * record-btrace.c: Update.
4783         * regcache.c: Update.
4784         * remote.c: Update.
4785
4786 2018-07-03  Tom Tromey  <tom@tromey.com>
4787
4788         * common/ptid.c (ptid_tid_p): Remove.
4789         * common/ptid.h (ptid_tid_p): Don't declare.
4790         * sol-thread.c: Update.
4791
4792 2018-07-03  Tom Tromey  <tom@tromey.com>
4793
4794         * common/ptid.c (ptid_lwp_p): Remove.
4795         * common/ptid.h (ptid_lwp_p): Don't declare.
4796         * fbsd-nat.c: Update.
4797         * linux-nat.c: Update.
4798         * nat/linux-procfs.c: Update.
4799         * nat/x86-linux-dregs.c: Update.
4800         * sol-thread.c: Update.
4801
4802 2018-07-03  Tom Tromey  <tom@tromey.com>
4803
4804         * common/ptid.c (ptid_is_pid): Remove.
4805         * common/ptid.h (ptid_is_pid): Don't declare.
4806         * infrun.c: Update.
4807         * linux-nat.c: Update.
4808         * mi/mi-interp.c: Update.
4809         * remote.c: Update.
4810         * thread.c: Update.
4811
4812 2018-07-03  Tom Tromey  <tom@tromey.com>
4813
4814         * common/ptid.c (ptid_get_tid): Remove.
4815         * common/ptid.h (ptid_get_tid): Don't declare.
4816         * ada-tasks.c: Update.
4817         * aix-thread.c: Update.
4818         * bsd-uthread.c: Update.
4819         * darwin-nat.c: Update.
4820         * fbsd-nat.c: Update.
4821         * i386-darwin-nat.c: Update.
4822         * infrun.c: Update.
4823         * linux-tdep.c: Update.
4824         * nto-procfs.c: Update.
4825         * ppc-ravenscar-thread.c: Update.
4826         * python/py-infthread.c: Update.
4827         * ravenscar-thread.c: Update.
4828         * sol-thread.c: Update.
4829         * sparc-ravenscar-thread.c: Update.
4830         * windows-nat.c: Update.
4831
4832 2018-07-03  Tom Tromey  <tom@tromey.com>
4833
4834         * common/ptid.c (ptid_get_lwp): Remove.
4835         * common/ptid.h (ptid_get_lwp): Don't declare.
4836         * aarch64-linux-nat.c: Update.
4837         * ada-tasks.c: Update.
4838         * aix-thread.c: Update.
4839         * amd64-linux-nat.c: Update.
4840         * arm-linux-nat.c: Update.
4841         * corelow.c: Update.
4842         * fbsd-nat.c: Update.
4843         * fbsd-tdep.c: Update.
4844         * gnu-nat.c: Update.
4845         * i386-cygwin-tdep.c: Update.
4846         * i386-gnu-nat.c: Update.
4847         * i386-linux-nat.c: Update.
4848         * ia64-linux-nat.c: Update.
4849         * inf-ptrace.c: Update.
4850         * infrun.c: Update.
4851         * linux-fork.c: Update.
4852         * linux-nat.c: Update.
4853         * linux-tdep.c: Update.
4854         * linux-thread-db.c: Update.
4855         * mips-linux-nat.c: Update.
4856         * nat/aarch64-linux-hw-point.c: Update.
4857         * nat/aarch64-linux.c: Update.
4858         * nat/linux-btrace.c: Update.
4859         * nat/linux-osdata.c: Update.
4860         * nat/linux-procfs.c: Update.
4861         * nat/x86-linux-dregs.c: Update.
4862         * obsd-nat.c: Update.
4863         * ppc-fbsd-nat.c: Update.
4864         * ppc-linux-nat.c: Update.
4865         * procfs.c: Update.
4866         * python/py-infthread.c: Update.
4867         * ravenscar-thread.c: Update.
4868         * remote.c: Update.
4869         * s390-linux-nat.c: Update.
4870         * sol-thread.c: Update.
4871         * sol2-tdep.c: Update.
4872         * spu-linux-nat.c: Update.
4873         * x86-linux-nat.c: Update.
4874         * xtensa-linux-nat.c: Update.
4875
4876 2018-07-03  Tom Tromey  <tom@tromey.com>
4877
4878         * common/ptid.c (ptid_get_pid): Remove.
4879         * common/ptid.h (ptid_get_pid): Don't declare.
4880         * aarch64-linux-nat.c: Update.
4881         * ada-lang.c: Update.
4882         * aix-thread.c: Update.
4883         * alpha-bsd-nat.c: Update.
4884         * amd64-fbsd-nat.c: Update.
4885         * amd64-linux-nat.c: Update.
4886         * arm-linux-nat.c: Update.
4887         * arm-nbsd-nat.c: Update.
4888         * auxv.c: Update.
4889         * break-catch-syscall.c: Update.
4890         * breakpoint.c: Update.
4891         * bsd-uthread.c: Update.
4892         * corelow.c: Update.
4893         * ctf.c: Update.
4894         * darwin-nat.c: Update.
4895         * fbsd-nat.c: Update.
4896         * fbsd-tdep.c: Update.
4897         * gcore.c: Update.
4898         * gnu-nat.c: Update.
4899         * hppa-nbsd-nat.c: Update.
4900         * hppa-obsd-nat.c: Update.
4901         * i386-fbsd-nat.c: Update.
4902         * ia64-linux-nat.c: Update.
4903         * inf-ptrace.c: Update.
4904         * infcmd.c: Update.
4905         * inferior.c: Update.
4906         * inferior.h: Update.
4907         * inflow.c: Update.
4908         * infrun.c: Update.
4909         * linux-fork.c: Update.
4910         * linux-nat.c: Update.
4911         * linux-tdep.c: Update.
4912         * linux-thread-db.c: Update.
4913         * m68k-bsd-nat.c: Update.
4914         * mi/mi-interp.c: Update.
4915         * mi/mi-main.c: Update.
4916         * mips-linux-nat.c: Update.
4917         * mips-nbsd-nat.c: Update.
4918         * mips64-obsd-nat.c: Update.
4919         * nat/aarch64-linux-hw-point.c: Update.
4920         * nat/aarch64-linux.c: Update.
4921         * nat/linux-btrace.c: Update.
4922         * nat/linux-osdata.c: Update.
4923         * nat/linux-procfs.c: Update.
4924         * nat/x86-linux-dregs.c: Update.
4925         * nto-procfs.c: Update.
4926         * obsd-nat.c: Update.
4927         * ppc-linux-nat.c: Update.
4928         * ppc-nbsd-nat.c: Update.
4929         * ppc-obsd-nat.c: Update.
4930         * proc-service.c: Update.
4931         * procfs.c: Update.
4932         * python/py-inferior.c: Update.
4933         * python/py-infthread.c: Update.
4934         * ravenscar-thread.c: Update.
4935         * record.c: Update.
4936         * remote-sim.c: Update.
4937         * remote.c: Update.
4938         * rs6000-nat.c: Update.
4939         * s390-linux-nat.c: Update.
4940         * sh-nbsd-nat.c: Update.
4941         * sol-thread.c: Update.
4942         * sparc-nat.c: Update.
4943         * sparc64-tdep.c: Update.
4944         * spu-linux-nat.c: Update.
4945         * spu-tdep.c: Update.
4946         * target-debug.h: Update.
4947         * target.c: Update.
4948         * thread.c: Update.
4949         * tid-parse.c: Update.
4950         * tracefile-tfile.c: Update.
4951         * vax-bsd-nat.c: Update.
4952         * windows-nat.c: Update.
4953         * x86-linux-nat.c: Update.
4954         * x86-nat.c: Update.
4955
4956 2018-07-03  Tom Tromey  <tom@tromey.com>
4957
4958         * common/ptid.c (pid_to_ptid): Remove.
4959         * common/ptid.h (pid_to_ptid): Don't declare.
4960         * aix-thread.c: Update.
4961         * arm-linux-nat.c: Update.
4962         * common/ptid.c: Update.
4963         * common/ptid.h: Update.
4964         * corelow.c: Update.
4965         * ctf.c: Update.
4966         * darwin-nat.c: Update.
4967         * fbsd-nat.c: Update.
4968         * fork-child.c: Update.
4969         * gnu-nat.c: Update.
4970         * go32-nat.c: Update.
4971         * inf-ptrace.c: Update.
4972         * infcmd.c: Update.
4973         * inferior.c: Update.
4974         * infrun.c: Update.
4975         * linux-fork.c: Update.
4976         * linux-nat.c: Update.
4977         * nat/aarch64-linux-hw-point.c: Update.
4978         * nat/fork-inferior.c: Update.
4979         * nat/x86-linux-dregs.c: Update.
4980         * nto-procfs.c: Update.
4981         * obsd-nat.c: Update.
4982         * procfs.c: Update.
4983         * progspace.c: Update.
4984         * remote.c: Update.
4985         * rs6000-nat.c: Update.
4986         * s390-linux-nat.c: Update.
4987         * sol-thread.c: Update.
4988         * spu-linux-nat.c: Update.
4989         * target.c: Update.
4990         * top.c: Update.
4991         * tracefile-tfile.c: Update.
4992         * windows-nat.c: Update.
4993
4994 2018-07-03  Tom Tromey  <tom@tromey.com>
4995
4996         * common/ptid.h (ptid_build): Don't declare.
4997         * common/ptid.c (ptid_build): Remove.
4998         * aix-thread.c: Update.
4999         * bsd-kvm.c: Update.
5000         * bsd-uthread.c: Update.
5001         * common/agent.c: Update.
5002         * common/ptid.c: Update.
5003         * common/ptid.h: Update.
5004         * corelow.c: Update.
5005         * darwin-nat.c: Update.
5006         * fbsd-nat.c: Update.
5007         * gnu-nat.c: Update.
5008         * linux-fork.c: Update.
5009         * linux-nat.c: Update.
5010         * linux-thread-db.c: Update.
5011         * nat/linux-osdata.c: Update.
5012         * nat/linux-procfs.c: Update.
5013         * nto-procfs.c: Update.
5014         * obsd-nat.c: Update.
5015         * proc-service.c: Update.
5016         * procfs.c: Update.
5017         * ravenscar-thread.c: Update.
5018         * remote-sim.c: Update.
5019         * remote.c: Update.
5020         * sol-thread.c: Update.
5021         * target.c: Update.
5022         * windows-nat.c: Update.
5023
5024 2018-07-03  Tom Tromey  <tom@tromey.com>
5025
5026         * infrun.c (follow_exec): Use exit_inferior_silent.
5027         * inferior.c (exit_inferior_num_silent): Remove.
5028         * inferior.h (exit_inferior_num_silent): Don't declare.
5029
5030 2018-07-03  Tom Tromey  <tom@tromey.com>
5031
5032         PR cli/23340:
5033         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5034         inferior_ptid on error.
5035
5036 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5037             Simon Marchi  <simon.marchi@polymtl.ca>
5038
5039         PR tdep/8282
5040         * disasm.h (gdb_disassembler): Add
5041         `m_disassembler_options_holder'. member
5042         * disasm.c (get_all_disassembler_options): New function.
5043         (gdb_disassembler::gdb_disassembler): Use it.
5044         (gdb_buffered_insn_length_init_dis): Likewise.
5045         (gdb_buffered_insn_length): Adjust accordingly.
5046         (set_disassembler_options): Handle options with arguments.
5047         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5048         line if showing options with descriptions.
5049         (disassembler_options_completer): Adapt to using the
5050         `disasm_options_and_args_t' structure.
5051         * mips-tdep.c (mips_disassembler_options): New variable.
5052         (mips_disassembler_options_o32): Likewise.
5053         (mips_disassembler_options_n32): Likewise.
5054         (mips_disassembler_options_n64): Likewise.
5055         (gdb_print_insn_mips): Don't set `disassembler_options'.
5056         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5057         functions.
5058         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5059         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5060         `gdbarch_disassembler_options_implicit' and
5061         `gdbarch_valid_disassembler_options'.
5062         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5063         `disasm_options_and_args_t' structure.
5064         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5065         method.
5066         (valid_disassembler_options): Switch from `disasm_options_t' to
5067         the `disasm_options_and_args_t' structure.
5068         * NEWS: Document `set disassembler-options' support for the MIPS
5069         target.
5070         * gdbarch.h: Regenerate.
5071         * gdbarch.c: Regenerate.
5072
5073 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5074
5075         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5076
5077 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5078
5079         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5080         parameter in call to amd64_target_description.
5081         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5082         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5083         (amd64fbsd_init_abi): Likewise.
5084         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5085         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5086         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5087         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5088
5089 2018-06-29  Pedro Alves  <palves@redhat.com>
5090
5091         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5092         "segments" parameter.
5093         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5094         (_initialize_amd64_tdep): Update call to
5095         amd64_create_target_description.
5096         (amd64_target_description): Add "segments" parameter.  Adjust
5097         the implementation to use it.
5098         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5099         call to amd64_create_target_description.
5100         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5101         * gdb/arch/amd64.h (amd64_create_target_description): Add
5102         "segments" register.
5103         * gdb/arch/amd64.c (amd64_create_target_description): Add
5104         "segments" parameter.  Call create_feature_i386_64bit_segments
5105         only if SEGMENTS is true.
5106         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5107         call to amd64_create_target_description.
5108
5109 2018-06-29  Pedro Alves  <palves@redhat.com>
5110
5111         * thread.c (thread_target_id_str): New, factored out from ...
5112         (print_thread_info_1): ... here.  Use it to compute the max
5113         "Target Id" column width.
5114
5115 2018-06-29  Pedro Alves  <palves@redhat.com>
5116
5117         * remote.c (remote_target::extra_thread_info): Delete
5118         'display_buf' and 'n' locals.  from the cache, regardless of
5119         packet mechanims is in use.  Use cache for qThreadExtra and qP
5120         methods too.
5121
5122 2018-06-29  Pedro Alves  <palves@redhat.com>
5123
5124         * blockframe.c (find_pc_sect_containing_function): New function.
5125         * breakpoint.c (print_breakpoint_location): Don't call
5126         find_pc_sect_function.
5127         * linespec.c (create_sals_line_offset): Record the location's
5128         symbol in the sal.
5129         * linespec.c (convert_address_location_to_sals): Fill in sal's
5130         symbol with find_pc_sect_containing_function.
5131         * symtab.c (find_function_start_sal): Rename to ...
5132         (find_function_start_sal_1): ... this.
5133         (find_function_start_sal): Reimplement as wrapper around
5134         find_function_start_sal_1, and use
5135         find_pc_sect_containing_function to fill in the sal's symbol.
5136         (find_function_start_sal(symbol*, bool)): Adjust.
5137         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5138         comments.
5139         (find_pc_sect_containing_function): Declare.
5140
5141 2018-06-29  Pedro Alves  <palves@redhat.com>
5142
5143         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5144         true if the the location has no symbol.
5145
5146 2018-06-28  Tom Tromey  <tom@tromey.com>
5147
5148         * NEWS: Mention --enable-codesign.
5149         * silent-rules.mk (ECHO_SIGN): New variable.
5150         * configure.ac: Add --enable-codesign.
5151         * configure: Rebuild.
5152         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5153         (gdb$(EXEEXT)): Optionally invoke codesign.
5154
5155 2018-06-28  Pedro Alves  <palves@redhat.com>
5156
5157         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5158         comments.
5159         (switch_to_thread_no_regs): Adjust comment.
5160         * infcmd.c (stop_pc): Delete.
5161         (post_create_inferior, info_program_command): Replace references
5162         to stop_pc with references to thread_info->suspend.stop_pc.
5163         * inferior.h (stop_pc): Delete declaration.
5164         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5165         (handle_inferior_event_1, handle_signal_stop)
5166         (process_event_stop_test, keep_going_stepped_thread)
5167         (handle_step_into_function, handle_step_into_function_backward)
5168         (print_stop_location): Replace references to stop_pc with
5169         references to thread_info->suspend.stop_pc.
5170         (struct infcall_suspend_state) <stop_pc>: Delete field.
5171         (save_infcall_suspend_state, restore_infcall_suspend_state):
5172         Remove references to inf_stat->stop_pc.
5173         * linux-fork.c (fork_load_infrun_state): Likewise.
5174         * record-btrace.c (record_btrace_set_replay): Likewise.
5175         * record-full.c (record_full_goto_entry): Likewise.
5176         * remote.c (print_one_stopped_thread): Likewise.
5177         * target.c (target_resume): Extend comment.
5178         * thread.c (set_executing_thread): New.
5179         (set_executing): Use it.
5180         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5181         Remove references to stop_pc.
5182
5183 2018-06-28  Pedro Alves  <palves@redhat.com>
5184
5185         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5186         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5187
5188 2018-06-28  Tom Tromey  <tom@tromey.com>
5189
5190         * coffread.c (coff_symfile_finish): Update.
5191         * xcoffread.c (xcoff_symfile_finish): Update.
5192         * elfread.c (elf_symfile_finish): Update.
5193         * symfile.h (dwarf2_free_objfile): Don't declare.
5194         * dwarf2read.c (_initialize_dwarf2_read): Use
5195         register_objfile_data_with_cleanup.
5196         (dwarf2_free_objfile): Now static.  Change signature.
5197
5198 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5199
5200         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5201         option "-o" to add-symbol-file-load to add an offset to each
5202         section's load address.
5203         * symfile.c (set_objfile_default_section_offset): New function.
5204
5205 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5206
5207         * symfile.c (add_symbol_file_command): Make sure that sections
5208         with the same name are sorted in the same order.
5209
5210 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5211
5212         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5213         require the second argument.  If omitted, load sections at the
5214         addresses specified in the file.
5215
5216 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5217
5218         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5219         (_initialize_symfile): Add option "-o" to symbol-file to add an
5220         offset to each section of the symbol file.
5221
5222 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5223
5224         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5225
5226 2018-06-27  Tom Tromey  <tom@tromey.com>
5227
5228         * stack.c (_initialize_stack): Update "func" help text.
5229
5230 2018-06-27  Tom Tromey  <tom@tromey.com>
5231
5232         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5233         std::vector.
5234         (unwind_infopy_str, pyuw_create_unwind_info)
5235         (unwind_infopy_add_saved_register, pyuw_sniffer)
5236         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5237         Update.
5238         (struct saved_reg): Add constructor.
5239         <value>: Now a gdbpy_ref<>.
5240
5241 2018-06-27  Tom Tromey  <tom@tromey.com>
5242
5243         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5244
5245 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5246
5247         * gdb-gdb.py.in: Format using autopep8.
5248
5249 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5250
5251         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5252         (type_lookup_function): Recognize CORE_ADDR values.
5253
5254 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5255
5256         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5257         print tag_name.
5258
5259 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5260
5261         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5262         <__lt__>: Add.
5263
5264 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5265
5266         * gdb-gdb.py: Move to...
5267         * gdb-gdb.py.in: ... here.
5268         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5269         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5270         dependencies.
5271         (distclean): Remove gdb-gdb.py when cleaning.
5272         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5273         * configure: Re-generate.
5274
5275 2018-06-27  Pedro Alves  <palves@redhat.com>
5276
5277         * proc-service.c (get_ps_regcache): New.
5278         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5279         (ps_lsetfpregs): Use it.
5280
5281 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5282
5283         PR gdb/21695
5284         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5285         (dwarf_decode_lines_1): Adjust.
5286
5287 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5288
5289         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5290         override.
5291         <info_proc>: Likewise.
5292
5293 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5294
5295         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5296         to windows_fetch_one_register, and only handle the case of
5297         fetching one register.  Move the code that reloads the context
5298         and iterates over all registers if R is negative to...
5299         (windows_nat_target::fetch_registers): ... here.
5300         (do_windows_store_inferior_registers): Rename to
5301         windows_store_one_register, and only handle the case of storing
5302         one register.  Move the code that handles the case where r is
5303         negative to...
5304         (windows_nat_target::store_registers) ... here.
5305
5306 2018-06-26  Tom Tromey  <tom@tromey.com>
5307
5308         PR rust/22574:
5309         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5310         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5311         Update.
5312         (rust_internal_print_type): Add podata parameter.
5313         (rust_print_type): Update.
5314
5315 2018-06-26  Tom Tromey  <tom@tromey.com>
5316
5317         * typeprint.h (struct print_offset_data) <update, finish,
5318         maybe_print_hole>: New methods.
5319         <indentation>: New constant.
5320         * typeprint.c (print_offset_data::indentation): Define.
5321         (print_offset_data::maybe_print_hole, print_offset_data::update)
5322         (print_offset_data::finish): Move from c-typeprint.c and rename.
5323         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5324         (print_spaces_filtered_with_print_options): Update.
5325         (c_print_type_union_field_offset, maybe_print_hole)
5326         (c_print_type_struct_field_offset): Move to typeprint.c and
5327         rename.
5328         (c_type_print_base_struct_union): Update.
5329
5330 2018-06-25  Pedro Alves  <palves@redhat.com>
5331
5332         * gdbthread.h (thread_info_ref, delete_thread)
5333         (delete_thread_silent, first_thread_of_inferior)
5334         (any_thread_of_inferior, switch_to_thread)
5335         (enable_thread_stack_temporaries)
5336         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5337         (get_last_thread_stack_temporary)
5338         (value_in_thread_stack_temporaries, can_access_registers_thread):
5339         Spell out "struct thread_info" instead of just "thread_info".
5340         * inferior.h (notice_new_inferior): Likewise.
5341
5342 2018-06-25  Pedro Alves  <palves@redhat.com>
5343
5344         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5345         pass thread_info pointer to delete_thread.
5346         (windows_nat_target::detach): Pass inferior pointer to
5347         detach_inferior.
5348         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5349         delete_thread.
5350         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5351         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5352         and pass a thread_info pointer to delete_thread.
5353         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5354         pass thread_info pointer to delete_thread.
5355         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5356         delete_thread_silent call.
5357         * procfs.c (procfs_target::detach): Pass inferior pointer to
5358         detach_inferior.
5359         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5360         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5361         delete_thread_silent call.
5362         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5363         pass thread_info pointer to delete_thread.
5364         (windows_nat_target::detach): Pass inferior pointer to
5365         delete_inferior.
5366
5367 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5368
5369         * regcache.c (readable_regcache::read_part): Fix asserts.
5370         (reg_buffer::raw_collect_part): New function.
5371         (regcache::write_part): Fix asserts.
5372         (reg_buffer::raw_supply_part): New function.
5373         (regcache::transfer_regset_register): New helper function.
5374         (regcache::transfer_regset): Call new functions.
5375         (regcache_supply_regset): Use gdb_byte*.
5376         (regcache::supply_regset): Likewise.
5377         (regcache_collect_regset): Likewise.
5378         (regcache::collect_regset): Likewise.
5379         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5380         (reg_buffer::raw_supply_part): Likewise.
5381         (regcache::transfer_regset_register): Likewise.
5382         (regcache::transfer_regset): Use gdb_byte*.
5383
5384 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5385
5386         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5387
5388 2018-06-21  Pedro Alves  <palves@redhat.com>
5389
5390         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5391         instead of a ptid_t.  All callers adjusted.
5392         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5393         adjusted.
5394         (print_ada_task_info, display_current_task_id, task_command_1):
5395         Adjust.
5396         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5397         inferior_thread.
5398         (breakpoint_kind): Adjust.
5399         (remove_breakpoints_pid): Rename to ...
5400         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5401         pointer.  All callers adjusted.
5402         (bpstat_clear_actions): Use inferior_thread.
5403         (get_bpstat_thread): New.
5404         (bpstat_do_actions): Use it.
5405         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5406         to take a thread_info pointer.  All callers adjusted.
5407         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5408         (breakpoint_re_set_thread): Use inferior_thread.
5409         * breakpoint.h (struct inferior): Forward declare.
5410         (bpstat_stop_status): Update.
5411         (remove_breakpoints_pid): Delete.
5412         (remove_breakpoints_inf): New.
5413         * bsd-uthread.c (bsd_uthread_target::wait)
5414         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5415         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5416         (maint_btrace_packet_history_cmd)
5417         (maint_btrace_clear_packet_history_cmd): Adjust.
5418         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5419         inferior_thread.
5420         * cli/cli-interp.c: Include "inferior.h".
5421         * common/refcounted-object.h (struct
5422         refcounted_object_ref_policy): New.
5423         * compile/compile-object-load.c: Include gdbthread.h.
5424         (store_regs): Use inferior_thread.
5425         * corelow.c (core_target::close): Use current_inferior.
5426         (core_target_open): Adjust to use first_thread_of_inferior and use
5427         the current inferior.
5428         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5429         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5430         <thread>: ... this new field.  All references adjusted.
5431         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5432         Take a thread_info pointer instead of a ptid_t.
5433         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5434         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5435         thread_info pointer instead of a ptid_t.
5436         * elfread.c: Include "inferior.h".
5437         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5438         Use inferior_thread.
5439         * eval.c (evaluate_subexp): Likewise.
5440         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5441         inferior_thread.
5442         * gdb_proc_service.h (struct thread_info): Forward declare.
5443         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5444         <thread>: ... this new field.  All references adjusted.
5445         * gdbarch.h, gdbarch.c: Regenerate.
5446         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5447         'thread' parameter.  All implementations and callers adjusted.
5448         * gdbthread.h (thread_info) <set_running>: New method.
5449         (delete_thread, delete_thread_silent): Take a thread_info pointer
5450         instead of a ptid.
5451         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5452         (first_thread_of_process): Delete, replaced by ...
5453         (first_thread_of_inferior): ... this new function.  All callers
5454         adjusted.
5455         (any_live_thread_of_process): Delete, replaced by ...
5456         (any_live_thread_of_inferior): ... this new function.  All callers
5457         adjusted.
5458         (switch_to_thread, switch_to_no_thread): Declare.
5459         (is_executing): Delete.
5460         (enable_thread_stack_temporaries): Update comment.
5461         <enable_thread_stack_temporaries>: Take a thread_info pointer
5462         instead of a ptid_t.  Incref the thread.
5463         <~enable_thread_stack_temporaries>: Decref the thread.
5464         <m_ptid>: Delete
5465         <m_thr>: New.
5466         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5467         (get_last_thread_stack_temporary)
5468         (value_in_thread_stack_temporaries, can_access_registers_thread):
5469         Take a thread_info pointer instead of a ptid_t.  All callers
5470         adjusted.
5471         * infcall.c (get_call_return_value): Use inferior_thread.
5472         (run_inferior_call): Work with thread pointers instead of ptid_t.
5473         (call_function_by_hand_dummy): Work with thread pointers instead
5474         of ptid_t.  Use thread_info_ref.
5475         * infcmd.c (proceed_thread_callback): Access thread's state
5476         directly.
5477         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5478         access thread's state directly.
5479         (continue_command): Use inferior_thread.
5480         (info_program_command): Use find_thread_ptid and access thread
5481         state directly.
5482         (proceed_after_attach_callback): Use thread state directly.
5483         (notice_new_inferior): Take a thread_info pointer instead of a
5484         ptid_t.  All callers adjusted.
5485         (exit_inferior): Take an inferior pointer instead of a pid.  All
5486         callers adjusted.
5487         (exit_inferior_silent): New.
5488         (detach_inferior): Delete.
5489         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5490         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5491         (detach_inferior_command, kill_inferior_command): Use
5492         find_inferior_id instead of valid_gdb_inferior_id and
5493         gdb_inferior_id_to_pid.
5494         (inferior_command): Use inferior and thread pointers.
5495         * inferior.h (struct thread_info): Forward declare.
5496         (notice_new_inferior): Take a thread_info pointer instead of a
5497         ptid_t.  All callers adjusted.
5498         (detach_inferior): Delete declaration.
5499         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5500         instead of a pid.  All callers adjusted.
5501         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5502         (valid_gdb_inferior_id): Delete.
5503         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5504         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5505         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5506         ...
5507         <inf>: ... this new field.
5508         <step_ptid>: Delete, replaced by ...
5509         <step_thread>: ... this new field.
5510         (get_displaced_stepping_state): Take an inferior pointer instead
5511         of a pid.  All callers adjusted.
5512         (displaced_step_in_progress_any_inferior): Adjust.
5513         (displaced_step_in_progress_thread): Take a thread pointer instead
5514         of a ptid_t.  All callers adjusted.
5515         (displaced_step_in_progress, add_displaced_stepping_state): Take
5516         an inferior pointer instead of a pid.  All callers adjusted.
5517         (get_displaced_step_closure_by_addr): Adjust.
5518         (remove_displaced_stepping_state): Take an inferior pointer
5519         instead of a pid.  All callers adjusted.
5520         (displaced_step_prepare_throw, displaced_step_prepare)
5521         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5522         All callers adjusted.
5523         (start_step_over): Adjust.
5524         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5525         displaced step queue.
5526         (do_target_resume): Adjust.
5527         (fetch_inferior_event): Use inferior_thread.
5528         (context_switch, get_inferior_stop_soon): Take an
5529         execution_control_state pointer instead of a ptid_t.  All callers
5530         adjusted.
5531         (switch_to_thread_cleanup): Delete.
5532         (stop_all_threads): Use scoped_restore_current_thread.
5533         * inline-frame.c: Include "gdbthread.h".
5534         (inline_state) <inline_state>: Take a thread pointer instead of a
5535         ptid_t.  All callers adjusted.
5536         <ptid>: Delete, replaced by ...
5537         <thread>: ... this new field.
5538         (find_inline_frame_state): Take a thread pointer instead of a
5539         ptid_t.  All callers adjusted.
5540         (skip_inline_frames, step_into_inline_frame)
5541         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5542         pointer instead of a ptid_t.  All callers adjusted.
5543         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5544         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5545         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5546         pointers directly.
5547         * linux-nat.c (get_detach_signal): Likewise.
5548         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5549         (thread_db_notice_clone): Adjust.
5550         (thread_db_find_new_threads_silently)
5551         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5552         a thread pointer instead of a ptid_t.  All callers adjusted.
5553         * mi/mi-cmd-var.c: Include "inferior.h".
5554         (mi_cmd_var_update_iter): Update to use thread pointers.
5555         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5556         inferior directly.
5557         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5558         out to ...
5559         (mi_output_running): ... this new function.
5560         (mi_on_resume_1): Adjust to use it.
5561         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5562         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5563         directly.
5564         (interrupt_thread_callback): : Adjust to use thread and inferior
5565         pointers.
5566         * proc-service.c: Include "gdbthread.h".
5567         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5568         * progspace-and-thread.c: Include "inferior.h".
5569         * progspace.c: Include "inferior.h".
5570         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5571         hold a reference to an inferior_object.
5572         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5573         inferior_thread.
5574         * python/py-inferior.c (struct inferior_object): Give the type a
5575         tag name instead of a typedef.
5576         (python_on_normal_stop): No need to check if the current thread is
5577         listed.
5578         (inferior_to_inferior_object): Change return type to
5579         inferior_object.  All callers adjusted.
5580         (find_thread_object): Delete, bits factored out to ...
5581         (thread_to_thread_object): ... this new function.
5582         * python/py-infthread.c (create_thread_object): Use
5583         inferior_to_inferior_object.
5584         (thpy_is_stopped): Use thread pointer directly.
5585         (gdbpy_selected_thread): Use inferior_thread.
5586         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5587         field, replaced with ...
5588         <thread>: ... this new field.  All users adjusted.
5589         (btpy_insn_or_gap_new): Drop const.
5590         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5591         callers adjusted.
5592         * python/py-record.c: Include "gdbthread.h".
5593         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5594         a ptid_t.  All callers adjusted.
5595         (gdbpy_current_recording): Use inferior_thread.
5596         * python/py-record.h (recpy_record_object) <ptid>: Delete
5597         field, replaced with ...
5598         <thread>: ... this new field.  All users adjusted.
5599         (recpy_element_object) <ptid>: Delete
5600         field, replaced with ...
5601         <thread>: ... this new field.  All users adjusted.
5602         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5603         a ptid_t.  All callers adjusted.
5604         * python/py-threadevent.c: Include "gdbthread.h".
5605         (get_event_thread): Use thread_to_thread_object.
5606         * python/python-internal.h (struct inferior_object): Forward
5607         declare.
5608         (find_thread_object, find_inferior_object): Delete declarations.
5609         (thread_to_thread_object, inferior_to_inferior_object): New
5610         declarations.
5611         * record-btrace.c: Include "inferior.h".
5612         (require_btrace_thread): Use inferior_thread.
5613         (record_btrace_frame_sniffer)
5614         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5615         (get_thread_current_frame): Use scoped_restore_current_thread and
5616         switch_to_thread.
5617         (get_thread_current_frame): Use thread pointer directly.
5618         (record_btrace_replay_at_breakpoint): Use thread's inferior
5619         pointer directly.
5620         * record-full.c: Include "inferior.h".
5621         * regcache.c: Include "gdbthread.h".
5622         (get_thread_arch_regcache): Use the inferior's address space
5623         directly.
5624         (get_thread_regcache, registers_changed_thread): New.
5625         * regcache.h (get_thread_regcache(thread_info *thread)): New
5626         overload.
5627         (registers_changed_thread): New.
5628         (remote_target) <remote_detach_1>: Swap order of parameters.
5629         (remote_add_thread): <remote_add_thread>: Return the new thread.
5630         (get_remote_thread_info(ptid_t)): New overload.
5631         (remote_target::remote_notice_new_inferior): Use thread pointers
5632         directly.
5633         (remote_target::process_initial_stop_replies): Use
5634         thread_info::set_running.
5635         (remote_target::remote_detach_1, remote_target::detach)
5636         (extended_remote_target::detach): Adjust.
5637         * stack.c (frame_show_address): Use inferior_thread.
5638         * target-debug.h (target_debug_print_thread_info_pp): New.
5639         * target-delegates.c: Regenerate.
5640         * target.c (default_thread_address_space): Delete.
5641         (memory_xfer_partial_1): Use current_inferior.
5642         (target_detach): Use current_inferior.
5643         (target_thread_address_space): Delete.
5644         (generic_mourn_inferior): Use current_inferior.
5645         * target.h (struct target_ops) <thread_address_space>: Delete.
5646         (target_thread_address_space): Delete.
5647         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5648         pointers directly.
5649         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5650         thread pointer instead of a ptid_t.  Adjust all callers.
5651         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5652         (first_thread_of_process): Delete, replaced by ...
5653         (first_thread_of_inferior): ... this new function.  All callers
5654         adjusted.
5655         (any_thread_of_process): Rename to ...
5656         (any_thread_of_inferior): ... this, and take an inferior pointer.
5657         (any_live_thread_of_process): Rename to ...
5658         (any_live_thread_of_inferior): ... this, and take an inferior
5659         pointer.
5660         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5661         (value_in_thread_stack_temporaries)
5662         (get_last_thread_stack_temporary): Take a thread pointer instead
5663         of a ptid_t.  Adjust all callers.
5664         (thread_info::set_running): New.
5665         (validate_registers_access): Use inferior_thread.
5666         (can_access_registers_ptid): Rename to ...
5667         (can_access_registers_thread): ... this, and take a thread
5668         pointer.
5669         (print_thread_info_1): Adjust to compare thread pointers instead
5670         of ptids.
5671         (switch_to_no_thread, switch_to_thread): Make extern.
5672         (scoped_restore_current_thread::~scoped_restore_current_thread):
5673         Use m_thread pointer directly.
5674         (scoped_restore_current_thread::scoped_restore_current_thread):
5675         Use inferior_thread.
5676         (thread_command): Use thread pointer directly.
5677         (thread_num_make_value_helper): Use inferior_thread.
5678         * top.c (execute_command): Use inferior_thread.
5679         * tui/tui-interp.c: Include "inferior.h".
5680         * varobj.c (varobj_create): Use inferior_thread.
5681         (value_of_root_1): Use find_thread_global_id instead of
5682         global_thread_id_to_ptid.
5683
5684 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5685
5686         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5687         possible.
5688         (regcache::write_part): Likewise.
5689         (readable_regcache::cooked_read_part): Update comment.
5690         (readable_regcache::cooked_write_part): Likewise.
5691         * regcache.h: (readable_regcache::read_part): Likewise.
5692         (regcache::write_part): Likewise.
5693
5694 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5695             Dirk Schubert  <dirk.schubert@arm.com>
5696
5697         * aarch64-linux-nat.c (post_attach): New.
5698         (aarch64_linux_nat_target::post_attach): Override post_attach to
5699         record the number of hardware debug registers.
5700
5701 2018-06-20  Tom Tromey  <tom@tromey.com>
5702
5703         * python/py-param.c (add_setshow_generic): Make parameters const.
5704         (parmpy_init): Update.
5705
5706 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5707
5708         * regcache.h (regcache_cooked_read_ftype): Rename to...
5709         (register_read_ftype): ...this, change type to function_view.
5710         (class reg_buffer) <save>: Remove src parameter.
5711         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5712         parameter non-const in first overload.  Remove src parameter in
5713         second overload.
5714         * regcache.c (do_cooked_read): Remove.
5715         (readonly_detached_regcache::readonly_detached_regcache): Make
5716         parameter non-const, adjust call to other constructor.
5717         (reg_buffer::save): Remove src parameter.
5718         * frame.c (do_frame_register_read): Remove.
5719         (frame_save_as_regcache): Use lambda function.
5720         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5721         parameter to ppu2spu_data *.
5722         (ppu2spu_sniffer): Use lambda function.
5723
5724 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5725
5726         * record-full.c (record_full_target::insert_breakpoint): Remove
5727         "struct" keyword, add const.
5728
5729 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5730
5731         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5732         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5733         * configure.ac: Remove AC_PREREQ, add missing quoting.
5734         * gnulib/configure.ac: Modernize usage of
5735         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5736         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5737         (AUTOMAKE_VERSION): Bump to 1.15.1.
5738         * configure: Re-generate.
5739         * config.in: Re-generate.
5740         * aclocal.m4: Re-generate.
5741         * gnulib/aclocal.m4: Re-generate.
5742         * gnulib/config.in: Re-generate.
5743         * gnulib/configure: Re-generate.
5744         * gnulib/import/Makefile.in: Re-generate.
5745
5746 2018-06-19  Pedro Alves  <palves@redhat.com>
5747
5748         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5749         (lookup_minimal_symbol_by_pc_section): ... here with
5750         gdb_assert_not_reached added.
5751
5752 2018-06-19  Pedro Alves  <palves@redhat.com>
5753
5754         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5755         parameter with a block parameter.  Compare location's block symbol
5756         with the frame's block instead of addresses.
5757         (skip_inline_frames): Pass the current block instead of the
5758         frame's address.  Break out as soon as we determine the frame
5759         should not be skipped.
5760
5761 2018-06-18  Tom Tromey  <tom@tromey.com>
5762
5763         * solib-aix.c (solib_aix_get_section_offsets): Return
5764         unique_xmalloc_ptr.
5765         (solib_aix_solib_create_inferior_hook): Update.
5766
5767 2018-06-18  Tom Tromey  <tom@tromey.com>
5768
5769         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5770
5771 2018-06-18  Tom Tromey  <tom@tromey.com>
5772
5773         * solib-frv.c (frv_relocate_main_executable): Use
5774         unique_xmalloc_ptr.
5775         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5776         unique_xmalloc_ptr.
5777
5778 2018-06-18  Tom Tromey  <tom@tromey.com>
5779
5780         * objfiles.h (inhibit_section_map_updates): Update.
5781         (resume_section_map_updates, resume_section_map_updates_cleanup):
5782         Remove.
5783         * solib-svr4.c (svr4_handle_solib_event): Update.
5784         * objfiles.c (inhibit_section_map_updates): Return
5785         scoped_restore_tmpl<int>.
5786         (resume_section_map_updates, resume_section_map_updates_cleanup):
5787         Remove.
5788
5789 2018-06-18  Tom Tromey  <tom@tromey.com>
5790
5791         * valprint.h (read_string): Update.
5792         * valprint.c (read_string): Change type of "buffer".
5793         (val_print_string): Update.
5794         * python/py-value.c (valpy_string): Update.
5795         * language.h (struct language_defn) <la_get_string>: Change
5796         type of "buffer".
5797         (default_get_string, c_get_string): Update.
5798         * language.c (default_get_string): Change type of "buffer".
5799         * guile/scm-value.c (gdbscm_value_to_string): Update.
5800         * c-lang.c (c_get_string): Change type of "buffer".
5801
5802 2018-06-18  Tom Tromey  <tom@tromey.com>
5803
5804         * ser-mingw.c (struct pipe_state_destroyer): New.
5805         (pipe_state_up): New typedef.
5806         (cleanup_pipe_state): Remove.
5807         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5808
5809 2018-06-18  Tom Tromey  <tom@tromey.com>
5810
5811         * rust-lang.h (rust_yyerror): Don't declare.
5812         * rust-lang.c (rust_language_defn): Update.
5813         * rust-exp.y (yyerror): Now static.
5814         * parse.c (parse_exp_in_context_1): Update.
5815         * p-lang.h (p_yyerror): Don't declare.
5816         * p-lang.c (p_language_defn): Update.
5817         * p-exp.y (yyerror): Now static.
5818         * opencl-lang.c (opencl_language_defn): Update.
5819         * objc-lang.c (objc_language_defn): Update.
5820         * m2-lang.h (m2_yyerror): Don't declare.
5821         * m2-lang.c (m2_language_defn): Update.
5822         * m2-exp.y (yyerror): Now static.
5823         * language.h (struct language_defn) <la_error>: Remove.
5824         * language.c (unk_lang_error): Remove.
5825         (unknown_language_defn, auto_language_defn): Remove.
5826         * go-lang.h (go_yyerror): Don't declare.
5827         * go-lang.c (go_language_defn): Update.
5828         * go-exp.y (yyerror): Now static.
5829         * f-lang.h (f_yyerror): Don't declare.
5830         * f-lang.c (f_language_defn): Update.
5831         * f-exp.y (yyerror): Now static.
5832         * d-lang.h (d_yyerror): Don't declare.
5833         * d-lang.c (d_language_defn): Update.
5834         * d-exp.y (yyerror): Now static.
5835         * c-lang.h (c_yyerror): Don't declare.
5836         * c-lang.c (c_language_defn, cplus_language_defn)
5837         (asm_language_defn, minimal_language_defn): Update.
5838         * c-exp.y (yyerror): Now static.
5839         * ada-lang.h (ada_yyerror): Don't declare.
5840         * ada-lang.c (ada_language_defn): Update.
5841         * ada-exp.y (yyerror): Now static.
5842
5843 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5844
5845         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5846         (store_sveregs_to_thread): Likewise.
5847         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5848         (aarch64_linux_store_inferior_registers): Likewise.
5849         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5850         function.
5851         (aarch64_sve_regs_copy_to_regcache): Likewise.
5852         (aarch64_sve_regs_copy_from_regcache): Likewise.
5853         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5854         declaration.
5855         (aarch64_sve_regs_copy_to_regcache): Likewise.
5856         (aarch64_sve_regs_copy_from_regcache): Likewise.
5857         (sve_context): Structure from Linux headers.
5858         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5859         (SVE_SIG_ZREG_SIZE): Likewise.
5860         (SVE_SIG_PREG_SIZE): Likewise.
5861         (SVE_SIG_FFR_SIZE): Likewise.
5862         (SVE_SIG_REGS_OFFSET): Likewise.
5863         (SVE_SIG_ZREGS_OFFSET): Likewise.
5864         (SVE_SIG_ZREG_OFFSET): Likewise.
5865         (SVE_SIG_ZREGS_SIZE): Likewise.
5866         (SVE_SIG_PREGS_OFFSET): Likewise.
5867         (SVE_SIG_PREG_OFFSET): Likewise.
5868         (SVE_SIG_PREGS_SIZE): Likewise.
5869         (SVE_SIG_FFR_OFFSET): Likewise.
5870         (SVE_SIG_REGS_SIZE): Likewise.
5871         (SVE_SIG_CONTEXT_SIZE): Likewise.
5872         (SVE_PT_REGS_MASK): Likewise.
5873         (SVE_PT_REGS_FPSIMD): Likewise.
5874         (SVE_PT_REGS_SVE): Likewise.
5875         (SVE_PT_VL_INHERIT): Likewise.
5876         (SVE_PT_VL_ONEXEC): Likewise.
5877         (SVE_PT_REGS_OFFSET): Likewise.
5878         (SVE_PT_FPSIMD_OFFSET): Likewise.
5879         (SVE_PT_FPSIMD_SIZE): Likewise.
5880         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5881         (SVE_PT_SVE_PREG_SIZE): Likewise.
5882         (SVE_PT_SVE_FFR_SIZE): Likewise.
5883         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5884         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5885         (__SVE_SIG_TO_PT): Likewise.
5886         (SVE_PT_SVE_OFFSET): Likewise.
5887         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5888         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5889         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5890         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5891         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5892         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5893         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5894         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5895         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5896         (SVE_PT_SVE_SIZE): Likewise.
5897         (SVE_PT_SIZE): Likewise.
5898         (HAS_SVE_STATE): New define.
5899
5900 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5901
5902         * nat/aarch64-sve-linux-sigcontext.h: New file.
5903         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5904         new files.
5905         (SVE_VQ_MIN): Likewise.
5906         (SVE_VQ_MAX): Likewise.
5907         (SVE_VL_MIN): Likewise.
5908         (SVE_VL_MAX): Likewise.
5909         (SVE_NUM_ZREGS): Likewise.
5910         (SVE_NUM_PREGS): Likewise.
5911         (sve_vl_valid): Likewise.
5912         (struct user_sve_header): Likewise.
5913
5914 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5915             Richard Bunt <Richard.Bunt@arm.com>
5916
5917         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5918         was requested by GDB.
5919
5920 2018-06-15  Tom de Vries  <tdevries@suse.de>
5921
5922         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5923
5924 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5925
5926         * gnulib/update-gnulib.sh: Print expected versions of
5927         autoconf/aclocal.
5928
5929 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5930
5931         * arch-utils.c (default_type_align): Use type_length_units.
5932         * gdbtypes.c (type_align): Use type_length_units.
5933
5934 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5935
5936         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5937         of 'define' command.
5938
5939 2018-06-14  Tom de Vries  <tdevries@suse.de>
5940
5941         PR cli/22573
5942         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5943         get_no_prettyformat_print_options.
5944
5945 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5946
5947         * sparc-nat.h: Include target.h.
5948         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5949         <fetch_registers>: Remove this argument in function call.
5950         <store_registers>: Remove this argument in function call, remove
5951         extra semicolon.
5952         <low_forget_process>: Call sparc64_forget_process instead of
5953         sparc_forget_process.
5954
5955 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5956
5957         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5958         (procfs_target::make_corefile_notes): Adjust to new
5959         target_read_alloc return type.
5960
5961 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5962             Stephen Roberts  <stephen.roberts@arm.com>
5963
5964         PR gdb/22882
5965         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5966         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5967         Move should_notify_stop local into more inner scope.
5968
5969 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5970             Stephen Roberts  <stephen.roberts@arm.com>
5971
5972         PR gdb/22882
5973         * infrun.c (resume_1): Add call to mark_async_event_handler.
5974
5975 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5976
5977         * infrun.c (do_target_wait): Change old version of $pc printed.
5978
5979 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5980
5981         * dwarf2read.c (read_index_from_section): Rename to...
5982         (read_gdb_index_from_section): ... this, update all callers.
5983         (dwarf2_read_index): Rename to...
5984         (dwarf2_read_gdb_index): ... this, update all callers.
5985
5986 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5987
5988         * gdb/hppa-linux-nat.c
5989         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5990         hppa_linux_nat_target::fetch_registers.
5991
5992 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5993
5994         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5995         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5996         (AARCH64_DWARF_SVE_FFR): Likewise.
5997         (AARCH64_DWARF_SVE_P0): Likewise.
5998         (AARCH64_DWARF_SVE_Z0): Likewise.
5999
6000 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6001
6002         * common/common-regcache.h (raw_compare): New function.
6003         * regcache.c (regcache::raw_compare): Likewise.
6004         * regcache.h (regcache::raw_compare): New declaration.
6005
6006 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6007
6008         * common/common-regcache.h (reg_buffer_common): New structure.
6009         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6010         (reg_buffer::raw_supply): Likewise.
6011         (reg_buffer::raw_supply_integer): Likewise.
6012         (reg_buffer::raw_supply_zeroed): Likewise.
6013         (reg_buffer::raw_collect): Likewise.
6014         (reg_buffer::raw_collect_integer): Likewise.
6015         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6016         (reg_buffer::raw_supply): Likewise.
6017         (reg_buffer::raw_supply_integer): Likewise.
6018         (reg_buffer::raw_supply_zeroed): Likewise.
6019         (reg_buffer::raw_collect): Likewise.
6020         (reg_buffer::raw_collect_integer): Likewise.
6021
6022 2018-06-10  Tom Tromey  <tom@tromey.com>
6023
6024         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6025         (class remote_state) <stop_reply_queue>: Now std::vector.
6026         (remote_state::~remote_state)
6027         (remote_target::stop_reply_queue_length): Update.
6028         (struct queue_iter_param, remove_child_of_pending_fork)
6029         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6030         (check_pending_event_prevents_wildcard_vcont_callback)
6031         (remove_stop_reply_for_inferior)
6032         (remove_stop_reply_of_remote_state)
6033         (remote_notif_remove_once_on_match)
6034         (stop_reply_match_ptid_and_ws)
6035         (remote_kill_child_of_pending_fork): Remove.
6036         (remote_target::remove_new_fork_children)
6037         (remote_target::check_pending_events_prevent_wildcard_vcont)
6038         (remote_target::discard_pending_stop_replies)
6039         (remote_target::discard_pending_stop_replies_in_queue)
6040         (remote_target::remote_notif_remove_queued_reply)
6041         (remote_target::queued_stop_reply)
6042         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6043         (remote_target::wait, remote_target::kill_new_fork_children)
6044         (remote_target::async): Update.
6045
6046 2018-06-10  Tom Tromey  <tom@tromey.com>
6047
6048         * record-full.c (record_full_arch_list_cleanups): Remove.
6049         (record_full_message): Use try/catch.
6050         (record_full_wait_cleanups): Remove.
6051         (record_full_wait_1): Use try/catch.
6052         (record_full_restore): Likewise.
6053
6054 2018-06-10  Tom Tromey  <tom@tromey.com>
6055
6056         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6057         declare VEC.  Add constructor.
6058         <in_target_beneath>: Now bool.
6059         (record_full_breakpoints): Now a std::vector, static.
6060         (record_full_sync_record_breakpoints)
6061         (record_full_init_record_breakpoints)
6062         (record_full_target::insert_breakpoint)
6063         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6064
6065 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6066
6067         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6068         * serial.c (serial_interface_lookup): Remove struct keyword.
6069
6070 2018-06-10  Tom Tromey  <tom@tromey.com>
6071
6072         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6073         method.
6074         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6075         a method.
6076         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6077         method.
6078         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6079         "beneath" as a method.
6080         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6081         Use "beneath" as a method.
6082
6083 2018-06-10  Tom Tromey  <tom@tromey.com>
6084
6085         * tracefile.c (struct trace_file_writer_deleter): New.
6086         <operator()>: Rename from trace_file_writer_xfree.
6087         (trace_file_writer_up): New typedef.
6088         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6089
6090 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6091
6092         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6093         <m_registers, m_register_status>: Change type to
6094         std::unique_ptr.
6095         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6096         XCNEWVEC.
6097
6098 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6099
6100         * common/common-regcache.h (enum register_status): Add
6101         underlying type "signed char".
6102         * regcache.h (reg_buffer) <m_register_status>: Change type to
6103         register_status *.
6104         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6105         register_status instead of signed char.
6106         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6107         (reg_buffer::get_register_status): Remove cast.
6108         (readable_regcache::raw_read): Remove cast.
6109         (readable_regcache::cooked_read): Remove cast.
6110
6111 2018-06-09  Tom Tromey  <tom@tromey.com>
6112
6113         * source.c (reverse_search_command, forward_search_command): Use
6114         scoped_fd.
6115
6116 2018-06-09  Tom Tromey  <tom@tromey.com>
6117
6118         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6119         (serial_ops_list): Now static, std::vector.
6120         (serial_interface_lookup, serial_add_interface): Update.
6121
6122 2018-06-09  Tom Tromey  <tom@tromey.com>
6123
6124         * dwarf2read.c (process_cu_includes): Update.
6125         (process_full_comp_unit): Update.
6126         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6127         std::vector.
6128
6129 2018-06-08  Paul Koning  <paul_koning@dell.com>
6130
6131         PR gdb/23252
6132
6133         * python/python.c (do_start_initialization):
6134         Avoid call to internal Python API.
6135         (init__gdb_module): New function.
6136
6137 2018-06-08  Gary Benson <gbenson@redhat.com>
6138
6139         * linux-thread-db.c (valprint.h): New include.
6140         (struct check_thread_db_info): New structure.
6141         (check_thread_db_on_load, tdb_testinfo): New static globals.
6142         (check_thread_db, check_thread_db_callback): New functions.
6143         (try_thread_db_load_1): Run integrity checks if requested.
6144         (maintenance_check_libthread_db): New function.
6145         (_initialize_thread_db): Register "maint check libthread-db"
6146         and "maint set/show check-libthread-db".
6147         * NEWS: Mention the above new commands.
6148
6149 2018-06-08  Tom Tromey  <tom@tromey.com>
6150
6151         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6152         now a method.
6153
6154 2018-06-08  Tom Tromey  <tom@tromey.com>
6155
6156         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6157
6158 2018-06-08  Tom Tromey  <tom@tromey.com>
6159
6160         * common/btrace-common.h (struct btrace_data): Add constructor,
6161         destructor, move assignment operator.
6162         <empty, clear, fini>: New methods.
6163         <format>: Initialize.
6164         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6165         (btrace_data_empty): Don't declare.
6166         * common/btrace-common.c (btrace_data_init): Remove.
6167         (btrace_data::fini): Rename from btrace_data_fini.
6168         (btrace_data::empty): Rename from btrace_data_empty.
6169         (btrace_data::clear): Rename from btrace_data_clear.  Return
6170         bool.
6171         * btrace.h (make_cleanup_btrace_data): Don't declare.
6172         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6173         (parse_xml_btrace): Update.
6174         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6175         (maint_btrace_clear_packet_history_cmd): Update.
6176
6177 2018-06-07  Pedro Alves  <palves@redhat.com>
6178
6179         * target.h (target_ops) <beneath>: Now a method.  All references
6180         updated.
6181         (class target_stack): New.
6182         * target.c (g_target_stack): New.
6183         (g_current_top_target): Delete.
6184         (current_top_target): Get the top target out of g_target_stack.
6185         (target_stack::push, target_stack::unpush): New.
6186         (push_target, unpush_target): Reimplement.
6187         (target_is_pushed): Reimplement in terms of g_target_stack.
6188         (target_ops::beneath, target_stack::find_beneath): New.
6189
6190 2018-06-07  Pedro Alves  <palves@redhat.com>
6191
6192         * target.h (find_target_beneath): Delete declaration.
6193         * target.c (find_target_beneath): Delete definition.
6194         * aix-thread.c: All callers of find_target_beneath adjusted to
6195         call target_ops::beneath instead.
6196         * bsd-uthread.c: Likewise.
6197         * linux-thread-db.c: Likewise.
6198         * ravenscar-thread.c: Likewise.
6199         * sol-thread.c: Likewise.
6200         * spu-multiarch.c: Likewise.
6201
6202 2018-06-07  Pedro Alves  <palves@redhat.com>
6203
6204         * target.h (target_ops) <beneath>: Now a method.  All references
6205         updated.
6206         (target_ops) <m_beneath>: New.
6207         * target.c (target_ops::beneath): New.
6208         * corelow.c: Adjust all references to target_ops::beneath.
6209         * linux-thread-db.c: Likewise.
6210         * make-target-delegates: Likewise.
6211         * record-btrace.c: Likewise.
6212         * record-full.c: Likewise.
6213         * remote.c: Likewise.
6214         * target.c: Likewise.
6215         * target-delegates.c: Regenerate.
6216
6217 2018-06-07  Pedro Alves  <palves@redhat.com>
6218
6219         * target.h (target_stack): Delete.
6220         (current_top_target): Declare function.
6221         * target.c (target_stack): Delete.
6222         (g_current_top_target): New.
6223         (current_top_target): New function.
6224         * auxv.c: Use current_top_target instead of target_stack
6225         throughout.
6226         * avr-tdep.c: Likewise.
6227         * breakpoint.c: Likewise.
6228         * corefile.c: Likewise.
6229         * elfread.c: Likewise.
6230         * eval.c: Likewise.
6231         * exceptions.c: Likewise.
6232         * frame.c: Likewise.
6233         * gdbarch-selftests.c: Likewise.
6234         * gnu-v3-abi.c: Likewise.
6235         * ia64-tdep.c: Likewise.
6236         * ia64-vms-tdep.c: Likewise.
6237         * infcall.c: Likewise.
6238         * infcmd.c: Likewise.
6239         * infrun.c: Likewise.
6240         * linespec.c: Likewise.
6241         * linux-tdep.c: Likewise.
6242         * minsyms.c: Likewise.
6243         * ppc-linux-nat.c: Likewise.
6244         * ppc-linux-tdep.c: Likewise.
6245         * procfs.c: Likewise.
6246         * regcache.c: Likewise.
6247         * remote.c: Likewise.
6248         * rs6000-tdep.c: Likewise.
6249         * s390-linux-nat.c: Likewise.
6250         * s390-tdep.c: Likewise.
6251         * solib-aix.c: Likewise.
6252         * solib-darwin.c: Likewise.
6253         * solib-dsbt.c: Likewise.
6254         * solib-spu.c: Likewise.
6255         * solib-svr4.c: Likewise.
6256         * solib-target.c: Likewise.
6257         * sparc-tdep.c: Likewise.
6258         * sparc64-tdep.c: Likewise.
6259         * spu-tdep.c: Likewise.
6260         * symfile.c: Likewise.
6261         * symtab.c: Likewise.
6262         * target-descriptions.c: Likewise.
6263         * target-memory.c: Likewise.
6264         * target.c: Likewise.
6265         * target.h: Likewise.
6266         * tracefile-tfile.c: Likewise.
6267         * tracepoint.c: Likewise.
6268         * valops.c: Likewise.
6269         * valprint.c: Likewise.
6270         * value.c: Likewise.
6271         * windows-tdep.c: Likewise.
6272         * mi/mi-main.c: Likewise.
6273
6274 2018-06-07  Tom Tromey  <tom@tromey.com>
6275
6276         * valprint.h (build_address_symbolic): Declare.
6277         * printcmd.c (print_address_symbolic): Update.
6278         (build_address_symbolic): Change "name" and "filename" to
6279         std::string.
6280         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6281         Update.
6282         * defs.h (build_address_symbolic): Remove declaration.
6283
6284 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6285
6286         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6287         (aarch64_vnv_type): Add function.
6288         (aarch64_pseudo_register_name): Add V regs for SVE.
6289         (aarch64_pseudo_register_type): Likewise.
6290         (aarch64_pseudo_register_reggroup_p): Likewise.
6291         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6292         (aarch64_pseudo_read_value): Add V regs for SVE.
6293         (aarch64_pseudo_write_2): Use V0 offset for SVE
6294         (aarch64_pseudo_write): Add V regs for SVE.
6295         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6296
6297 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6298
6299         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6300         (sve_vl_from_vq): Likewise.
6301
6302 2018-06-05  Tom Tromey  <tom@tromey.com>
6303
6304         * cli/cli-cmds.c (show_version): Update.
6305         * top.c (print_gdb_version): Add "interactive" parameter.
6306         Update.
6307         * main.c (captured_main_1): Update.
6308         * top.h (print_gdb_version): Add "interactive" parameter and a
6309         comment.
6310
6311 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6312
6313         * common/enum-flags.h: Add trailing semicolon to example in
6314         comment.
6315
6316 2018-06-05  Tom Tromey  <tom@tromey.com>
6317
6318         PR cli/12326:
6319         * NEWS: Add entry about pager.
6320         * utils.c (pagination_disabled_for_command): New global.
6321         (prompt_for_continue): Allow "c" response to prompt.
6322         (reinitialize_more_filter): Clear
6323         pagination_disabled_for_command.
6324         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6325
6326 2018-06-04  Tom Tromey  <tom@tromey.com>
6327
6328         * ada-lang.h (ada_lookup_symbol_list): Update.
6329         * ada-lang.c (resolve_subexp): Update.
6330         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6331         parameter.
6332         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6333         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6334         results parameter to std::vector.
6335         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6336         Update.
6337         * ada-exp.y (block_lookup): Update.
6338         (select_possible_type_sym): Change type of syms.  Remove nsyms
6339         parameter.
6340         (write_var_or_type, write_name_assoc): Update.
6341
6342 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6343
6344         * windows-nat.c (windows_nat_target::xfer_partial): Return
6345         TARGET_XFER_E_IO if we need to delegate to the target beneath
6346         but BENEATH is NULL.
6347
6348 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6349
6350         * Makefile.in (config.status): Add configure.nat as a
6351         dependency.
6352
6353 2018-06-04  Tom Tromey  <tom@tromey.com>
6354
6355         * cp-name-parser.y (cpname_state): Add method declarations.
6356         (HANDLE_QUAL): Update.
6357         (cpname_state::d_grab, cpname_state::fill_comp)
6358         (cpname_state::make_operator, cpname_state::make_dtor)
6359         (cpname_state::make_builtin_type, cpname_state::make_name)
6360         (cpname_state::d_qualify, cpname_state::d_int_type)
6361         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6362         (%union): Move earlier.
6363
6364 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6365
6366         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6367
6368 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6369
6370         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6371         (aarch64_pseudo_write_1): Likewise.
6372         (aarch64_pseudo_read_value): Use helper.
6373         (aarch64_pseudo_write): Likewise.
6374
6375 2018-06-04  Pedro Alves  <palves@redhat.com>
6376
6377         * darwin-nat.c (darwin_ops): Delete.
6378         (darwin_attach_pid): Use get_native_target.
6379
6380 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6381
6382         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6383         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6384
6385 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6386
6387         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6388         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6389         (aarch64_gdbarch_init): Check for SVE.
6390         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6391
6392 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6393
6394         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6395         * aarch64-tdep.h (aarch64_read_description): Likewise.
6396         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6397         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6398         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6399         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6400         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6401
6402 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6403
6404         * value.c (value_fetch_lazy_bitfield): New.
6405         (value_fetch_lazy_memory): New.
6406         (value_fetch_lazy_register): New.
6407         (value_fetch_lazy): Factor out to smaller functions.
6408
6409 2018-06-01  Tom Tromey  <tom@tromey.com>
6410
6411         * cp-name-parser.y (backslashable, represented): Now const.
6412
6413 2018-06-01  Tom Tromey  <tom@tromey.com>
6414
6415         * cp-name-parser.y: Include parser-defs.h.
6416         (parser_fprintf): Remove declaration.
6417
6418 2018-06-01  Tom Tromey  <tom@tromey.com>
6419
6420         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6421         %parse-param.
6422         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6423         (global_result): Remove globals.
6424         (struct cpname_state): New.
6425         (yyparse): Don't declare.
6426         (yylex, yyerror): Move declarations after %union.
6427         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6428         (make_name): Add state parameter.
6429         Update all callers.
6430         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6431         parameter.
6432         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6433         Update.
6434         (yylex): Add lvalp, state parameters.
6435         (yyerror): Add state parameter.
6436         (cp_demangled_name_to_comp): Update.
6437
6438 2018-06-01  Tom Tromey  <tom@tromey.com>
6439
6440         * cp-name-parser.y (parser_fprintf): Declare.
6441         (GDB_YY_REMAP_PREFIX): Define.
6442         Include yy-remap.h.  Don't redefine yy* identifiers.
6443
6444 2018-06-01  Tom Tromey  <tom@tromey.com>
6445
6446         * python/py-type.c (typy_legacy_template_argument): Update.
6447         * cp-support.h (cp_demangled_name_to_comp): Update.
6448         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6449         parameter to be a "std::string *".
6450         (main): Update.
6451
6452 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6453
6454         * ada-lex.l: Include "diagnostics.h" instead of
6455         "common/diagnostics.h".
6456         * unittests/environ-selftests.c: Likewise.
6457         * common/diagnostics.h: Moved to ../include.
6458
6459 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6460
6461         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6462         to language_mode_manual while calling breakpoint_re_set_one.
6463
6464 2018-06-01  Tom Tromey  <tom@tromey.com>
6465
6466         * valops.c (value_cast_structs, destructor_name_p): Update.
6467         * symtab.c (gdb_mangle_name): Update.
6468         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6469         Update.
6470         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6471         (pascal_object_print_value_fields, pascal_object_print_value):
6472         Update.
6473         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6474         * linespec.c (find_methods): Update.
6475         * gdbtypes.h (type_name_no_tag): Remove.
6476         (type_name_or_error): Rename from type_name_no_tag_or_error.
6477         * gdbtypes.c (type_name_no_tag): Remove.
6478         (type_name_or_error): Rename from type_name_no_tag_or_error.
6479         (lookup_struct_elt_type, check_typedef): Update.
6480         * expprint.c (print_subexp_standard): Update.
6481         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6482         * d-namespace.c (d_lookup_nested_symbol): Update.
6483         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6484         (cp_print_class_member): Update.
6485         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6486         * completer.c (add_struct_fields): Update.
6487         * c-typeprint.c (cp_type_print_derivation_info)
6488         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6489         Update.
6490         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6491         (ada_prefer_type, ada_is_exception_sym): Update.
6492
6493 2018-06-01  Tom Tromey  <tom@tromey.com>
6494
6495         * valops.c (enum_constant_from_type, value_namespace_elt)
6496         (value_maybe_namespace_elt): Update.
6497         * valarith.c (find_size_for_pointer_math): Update.
6498         * target-descriptions.c (make_gdb_type): Update.
6499         * symmisc.c (print_symbol): Update.
6500         * stabsread.c (define_symbol, read_type)
6501         (complain_about_struct_wipeout, add_undefined_type)
6502         (cleanup_undefined_types_1): Update.
6503         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6504         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6505         (rust_internal_print_type, rust_composite_type)
6506         (rust_evaluate_funcall, rust_evaluate_subexp)
6507         (rust_inclusive_range_type_p): Update.
6508         * python/py-type.c (typy_get_tag): Update.
6509         * p-typeprint.c (pascal_type_print_base): Update.
6510         * mdebugread.c (parse_symbol, parse_type): Update.
6511         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6512         Update.
6513         * guile/scm-type.c (gdbscm_type_tag): Update.
6514         * go-lang.c (sixg_string_p): Update.
6515         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6516         Update.
6517         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6518         (TYPE_TAG_NAME): Remove.
6519         * gdbtypes.c (type_name_no_tag): Simplify.
6520         (check_typedef, check_types_equal, recursive_dump_type)
6521         (copy_type_recursive, arch_composite_type): Update.
6522         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6523         in summary mode when needed.
6524         * eval.c (evaluate_funcall): Update.
6525         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6526         (process_structure_scope, read_enumeration_type)
6527         (read_namespace_type, read_module_type, determine_prefix): Update.
6528         * cp-support.c (inspect_type): Update.
6529         * coffread.c (process_coff_symbol, decode_base_type): Update.
6530         * c-varobj.c (c_is_path_expr_parent): Update.
6531         * c-typeprint.c (c_type_print_base_struct_union): Update.
6532         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6533         summary when using C language.
6534         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6535         (gen_maybe_namespace_elt): Update.
6536         * ada-lang.c (ada_type_name): Simplify.
6537         (empty_record, ada_template_to_fixed_record_type_1)
6538         (template_to_static_fixed_type)
6539         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6540
6541 2018-06-01  Tom Tromey  <tom@tromey.com>
6542
6543         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6544         c_print_type.
6545         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6546         (c_print_type): Update.
6547         (c_print_type): New overload.
6548         (c_type_print_varspec_prefix, c_type_print_args)
6549         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6550         (c_type_print_base_struct_union, c_type_print_base_1)
6551         (cp_type_print_method_args): Add "language" parameter.
6552         (c_type_print_base): Update.
6553         * c-lang.h (c_print_type): Add new overload.
6554
6555 2018-06-01  Tom Tromey  <tom@tromey.com>
6556
6557         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6558         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6559
6560 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6561
6562         * aarch64-tdep.c (aarch64_sve_register_names): New const
6563         var.
6564         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6565         (AARCH64_SVE_Z_REGS_NUM): New define.
6566         (AARCH64_SVE_P_REGS_NUM): Likewise.
6567         (AARCH64_SVE_NUM_REGS): Likewise.
6568
6569 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6570
6571         * nat/linux-ptrace.h [__alpha__]
6572         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6573         definitions.
6574
6575 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6576
6577         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6578         the endianness selected.
6579         * NEWS: Document `set endian auto' mode operation update.
6580
6581 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6582
6583         * Makefile.in: Add new header.
6584         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6585         (sve_vl_from_vg): Likewise.
6586         (sve_vq_from_vl): Likewise.
6587         (sve_vl_from_vq): Likewise.
6588         (sve_vq_from_vg): Likewise.
6589         (sve_vg_from_vq): Likewise.
6590         * configure.nat: Add new c file.
6591         * nat/aarch64-sve-linux-ptrace.c: New file.
6592         * nat/aarch64-sve-linux-ptrace.h: New file.
6593
6594 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6595
6596         * aarch64-linux-nat.c (aarch64_linux_read_description):
6597         Add parmeter zero.
6598         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6599         Likewise.
6600         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6601         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6602         (aarch64_gdbarch_init): Add parmeter zero.
6603         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6604         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6605         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6606         parmeter.
6607         * doc/gdb.texinfo: Describe SVE feature
6608         * features/aarch64-sve.c: New file.
6609
6610 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6611
6612         PR gdb/23210
6613         * gdbarch.sh (significant_addr_bit): Default to zero when
6614         not set by target architecture.
6615         * gdbarch.c: Re-generated.
6616         * utils.c (address_significant): Update.
6617
6618 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6619
6620         * stack.c (func_command): Remove trailing newline in call to error.
6621
6622 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6623
6624         * regcache.h (regcache_raw_collect): Remove, update callers to
6625         use regcache::raw_collect.
6626         * regcache.c (regcache_raw_collect): Remove.
6627
6628 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6629
6630         * regcache.h (regcache_raw_supply): Remove, update callers to
6631         use detached_regcache::raw_supply.
6632         * regcache.c (regcache_raw_supply): Remove.
6633
6634 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6635
6636         * regcache.h (regcache_cooked_write_part): Remove, update
6637         callers to use regcache::cooked_write_part.
6638         * regcache.c (regcache_cooked_write_part): Remove.
6639
6640 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6641
6642         * regcache.h (regcache_cooked_read_part): Remove, update callers
6643         to use readable_regcache::cooked_read_part.
6644         * regcache.c (regcache_cooked_read_part): Remove.
6645
6646 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6647
6648         * regcache.h (regcache_cooked_read_value): Remove, update
6649         callers to use readable_regcache::cooked_read_value.
6650         * regcache.c (regcache_cooked_read_value): Remove.
6651
6652 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6653
6654         * regcache.h (regcache_cooked_write): Remove, update callers to
6655         use regcache::cooked_write.
6656         * regcache.c (regcache_cooked_write): Remove.
6657
6658 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6659
6660         * regcache.h (regcache_invalidate): Remove, update callers to
6661         use detached_regcache::invalidate instead.
6662         * regcache.c (regcache_invalidate): Remove.
6663
6664 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6665
6666         * regcache.h (regcache_raw_write_part): Remove, update callers
6667         to use regcache::raw_write_part instead.
6668         * regcache.c (regcache_raw_write_part): Remove.
6669
6670 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6671
6672         * regcache.h (regcache_raw_read_part): Remove, update callers to
6673         use readable_regcache::raw_read_part instead.
6674         * regcache.c (regcache_raw_read_part): Remove.
6675
6676 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6677
6678         * regcache.h (regcache_cooked_read): Remove, update callers to
6679         use readable_regcache::cooked_read instead.
6680         * regcache.c (regcache_cooked_read): Remove.
6681
6682 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6683
6684         * regcache.h (regcache_raw_write): Remove, update callers to use
6685         regcache::raw_write instead.
6686         * regcache.c (regcache_raw_write): Remove.
6687
6688 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6689
6690         * regcache.h (regcache_raw_read): Remove, update callers to use
6691         readable_regcache::raw_read instead.
6692         * regcache.c (regcache_raw_read): Remove.
6693
6694 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6695
6696         * regcache.h (regcache_raw_update): Remove, update callers to
6697         use readable_regcache::raw_update instead.
6698         * regcache.c (regcache_raw_update): Remove.
6699
6700 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6701
6702         * regcache.h (regcache_register_status): Remove, update callers
6703         to use reg_buffer::get_register_status directly instead.
6704         * regcache.c (regcache_register_status): Remove.
6705
6706 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6707
6708         * regcache.h (regcache_get_ptid): Remove, update all callers to
6709         call regcache::ptid instead.
6710         * regcache.c (regcache_get_ptid): Remove.
6711
6712 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6713
6714         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6715
6716 2018-05-30  Pedro Alves  <palves@redhat.com>
6717
6718         * common/common-exceptions.h (exception_rethrow): Use
6719         ATTRIBUTE_NORETURN.
6720
6721 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6722
6723         * breakpoint.c (print_solib_event, check_status_catch_solib):
6724         Remove struct keyword in range-based for loops.
6725         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6726         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6727         Likewise.
6728         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6729         Likewise.
6730         * symfile.c (addr_info_make_relative): Likewise.
6731         * thread.c (value_in_thread_stack_temporaries): Likewise.
6732
6733 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6734
6735         PR gdb/16841
6736         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6737         aggregate type to get its real type before accessing it.
6738
6739 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6740
6741         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6742         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6743         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6744         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6745         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6746         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6747         * printcmd.c (info_address_command): Likewise.
6748
6749 2018-05-29  Tom Tromey  <tom@tromey.com>
6750
6751         * windows-nat.c (handle_exception): Update fall-through comment.
6752
6753 2018-05-29  Tom Tromey  <tom@tromey.com>
6754
6755         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6756         (struct program_space) <added_solibs>: Now a std::vector.
6757         * breakpoint.c (print_solib_event): Update.
6758         (check_status_catch_solib): Update.
6759         * progspace.c (clear_program_space_solib_cache): Update.
6760         * solib.c (update_solib_list): Update.
6761
6762 2018-05-29  Tom Tromey  <tom@tromey.com>
6763
6764         * python/py-type.c (typy_richcompare): Update.
6765         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6766         * gdbtypes.h (types_deeply_equal): Return bool.
6767         (types_equal): Likewise.
6768         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6769         declare VEC.
6770         (check_types_equal): Change worklist to std::vector.  Return
6771         bool.
6772         (struct type_equality_entry): Add constructor.
6773         (compare_maybe_null_strings): Return bool.
6774         (check_types_worklist): Return bool.  Change worklist to
6775         std::vector.
6776         (types_deeply_equal): Use std::vector.
6777         (types_equal): Return bool.
6778         (compare_maybe_null_strings): Simplify.
6779
6780 2018-05-29  Tom Tromey  <tom@tromey.com>
6781
6782         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6783
6784 2018-05-29  Tom Tromey  <tom@tromey.com>
6785
6786         * objc-lang.h: Don't include cp-support.h.
6787         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6788         declare VEC.
6789
6790 2018-05-27  Tom Tromey  <tom@tromey.com>
6791
6792         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6793
6794 2018-05-25  Tom Tromey  <tom@tromey.com>
6795
6796         * value.c (value::location): Initialize.
6797
6798 2018-05-25  Tom Tromey  <tom@tromey.com>
6799
6800         * dbxread.c (init_bincl_list): Remove.
6801         (bincl_list): Now a std::vector.
6802         (bincls_allocated, next_bincl): Remove.
6803         (free_bincl_list, do_free_bincl_list_cleanup)
6804         (make_cleanup_free_bincl_list): Remove.
6805         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6806         unique_xmalloc_ptr.
6807         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6808         (struct header_file_location): Add constructor.
6809         (add_bincl_to_list): Remove.
6810
6811 2018-05-25  Tom Tromey  <tom@tromey.com>
6812
6813         * tui/tui.c (tui_enable): Update.
6814         * mi/mi-interp.c (mi_interp::init): Update.
6815         * interps.h (class interp) <name>: New method.
6816         <m_name>: Rename from name.
6817         (~scoped_restore_interp): Update.
6818         * interps.c (interp::interp): Update.
6819         (interp_add, interp_set, interp_lookup_existing)
6820         (current_interp_named_p): Update.
6821
6822 2018-05-25  Tom Tromey  <tom@tromey.com>
6823
6824         * interps.c (interp_name): Remove.
6825         * mi/mi-interp.c (mi_interp::init): Update.
6826         * interps.h (interp_name): Remove.
6827         (~scoped_restore_interp): Update.
6828         * tui/tui.c (tui_enable): Update.
6829
6830 2018-05-25  Tom Tromey  <tom@tromey.com>
6831
6832         * utils.c (fputs_maybe_filtered): Update.
6833         * linespec.c (decode_line_full): Update.
6834         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6835         (mi_print_breakpoint_for_event, mi_solib_loaded)
6836         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6837         (mi_user_selected_context_changed): Update.
6838         * mi/mi-main.c (mi_execute_command): Update.
6839         * cli/cli-script.c (execute_control_command): Update.
6840         * python/python.c (execute_gdb_command): Update.
6841         * solib.c (info_sharedlibrary_command): Update.
6842         * interps.c (interp_ui_out): Remove.
6843         * interps.h (interp_ui_out): Remove.
6844
6845 2018-05-25  Tom Tromey  <tom@tromey.com>
6846
6847         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6848         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6849         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6850
6851 2018-05-25  Tom Tromey  <tom@tromey.com>
6852
6853         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6854         * interps.c (interp_exec): Use scoped_restore.
6855
6856 2018-05-25  Tom Tromey  <tom@tromey.com>
6857
6858         * remote.c (remote_target::remote_file_get): Use
6859         gdb::byte_vector.
6860         (remote_target::remote_file_put): Likewise.
6861
6862 2018-05-25  Tom Tromey  <tom@tromey.com>
6863
6864         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6865         a std::string.
6866         (get_pe_section_index, add_pe_exported_sym): Update.
6867         (read_pe_exported_syms): Use gdb::def_vector.
6868
6869 2018-05-25  Tom Tromey  <tom@tromey.com>
6870
6871         * frame.c (remove_prev_frame): Remove.
6872         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6873
6874 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6875
6876         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6877         Remove prototypes.
6878         * mips-linux-nat.c (supply_fpregset): Always call
6879         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6880         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6881         `mips_fill_fpregset'.
6882         * mips-linux-tdep.c (mips_supply_fpregset)
6883         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6884         (mips_fill_fpregset_wrapper): Remove functions.
6885         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6886         (mips_linux_fpregset): Remove variable.
6887         (mips_linux_iterate_over_regset_sections): Use
6888         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6889         (mips_linux_o32_sigframe_init): Remove comment.
6890
6891 2018-05-25  Pedro Alves  <palves@redhat.com>
6892
6893         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6894         (struct readahead_cache, struct packet_reg, struct
6895         remote_arch_state, class remote_state): Move higher up in the
6896         file.
6897         (remote_target::m_remote_state): Now an object instead of a pointer.
6898         (remote_target::get_remote_state): Adjust.
6899
6900 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6901
6902         * stack.c (select_and_print_frame): Delete.
6903         (struct function_bounds): Move struct within function.
6904         (func_command): Most content moved into new function
6905         find_frame_for_function, use new function, print result, add
6906         function comment.
6907         (find_frame_for_function): New function, now returns a result.
6908
6909 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6910
6911         * stack.c (iterate_over_block_arg_vars): Fix comment.
6912         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6913
6914 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6915
6916         PR gdb/23203
6917         * frame.c
6918         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6919         Define.
6920         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6921         Define.
6922         * frame.h (class scoped_restore_selected_frame): New class.
6923         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6924         of any exception, use scoped_restore_selected_frame to restore the
6925         frame instead.
6926
6927 2018-05-24  Pedro Alves  <palves@redhat.com>
6928
6929         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6930         override.
6931
6932 2018-05-23  Tom Tromey  <tom@tromey.com>
6933
6934         * complaints.c (struct complaints): Remove.
6935         (symfile_complaint_book): Remove.
6936         (series): New global.
6937         (complaint_internal): Update.
6938         (clear_complaints): Update.
6939
6940 2018-05-23  Tom Tromey  <tom@tromey.com>
6941
6942         * complaints.c (counters): New global.
6943         (struct complain): Remove.
6944         (struct complaints) <root>: Remove.
6945         (complaint_sentinel): Remove.
6946         (symfile_complaint_book): Update.
6947         (find_complaint) Remove.
6948         (complaint_internal, clear_complaints): Update.
6949
6950 2018-05-23  Tom Tromey  <tom@tromey.com>
6951
6952         * complaints.c (struct complain) <file, line>: Remove.
6953         (find_complaint): Remove file, line parameters.
6954         (complaint_internal): Update.
6955
6956 2018-05-23  Tom Tromey  <tom@tromey.com>
6957
6958         * complaints.c (vcomplaint): Remove.
6959         (complaint_internal) Merge in contents of vcomplaint.
6960
6961 2018-05-23  Tom Tromey  <tom@tromey.com>
6962
6963         * complaints.c (struct complaints) <explanation>: Remove.
6964         (symfile_explanations): Remove.
6965         (symfile_complaint_book): Update.
6966         (vcomplaint): Update.
6967         (struct explanation): Remove.
6968
6969 2018-05-23  Tom Tromey  <tom@tromey.com>
6970
6971         * complaints.c (symfile_complaints): Remove.
6972         (complaint_internal): Remove "complaints" parameter.
6973         (clear_complaints, vcomplaint): Remove "c" parameter.
6974         (get_complaints): Remove.
6975         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6976         (dwarf2_debug_line_missing_file_complaint)
6977         (dwarf2_debug_line_missing_end_sequence_complaint)
6978         (dwarf2_complex_location_expr_complaint)
6979         (dwarf2_const_value_length_mismatch_complaint)
6980         (dwarf2_section_buffer_overflow_complaint)
6981         (dwarf2_macro_malformed_definition_complaint)
6982         (dwarf2_invalid_attrib_class_complaint)
6983         (create_addrmap_from_index, dw2_symtab_iter_next)
6984         (dw2_expand_marked_cus)
6985         (dw2_debug_names_iterator::find_vec_in_debug_names)
6986         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6987         (create_debug_type_hash_table, init_cutu_and_read_dies)
6988         (partial_die_parent_scope, add_partial_enumeration)
6989         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6990         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6991         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6992         (create_cus_hash_table, create_dwp_hash_table)
6993         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6994         (dwarf2_rnglists_process, dwarf2_ranges_process)
6995         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6996         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6997         (handle_struct_member_die, process_structure_scope)
6998         (read_array_type, read_common_block, read_module_type)
6999         (read_tag_pointer_type, read_typedef, read_base_type)
7000         (read_subrange_type, load_partial_dies, partial_die_info::read)
7001         (partial_die_info::read, partial_die_info::read)
7002         (partial_die_info::read, read_checked_initial_length_and_offset)
7003         (dwarf2_string_attr, read_formatted_entries)
7004         (dwarf_decode_line_header)
7005         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7006         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7007         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7008         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7009         (get_signatured_type, get_DW_AT_signature_type)
7010         (decode_locdesc, file_file_name, consume_improper_spaces)
7011         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7012         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7013         (dwarf2_symbol_mark_computed, set_die_type)
7014         (read_attribute_value): Update.
7015         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7016         Update.
7017         * dbxread.c (unknown_symtype_complaint)
7018         (lbrac_mismatch_complaint, repeated_header_complaint)
7019         (set_namestring, function_outside_compilation_unit_complaint)
7020         (read_dbx_symtab, process_one_symbol): Update.
7021         * gdbtypes.c (stub_noname_complaint): Update.
7022         * windows-nat.c (handle_unload_dll): Update.
7023         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7024         (decode_base_type): Update.
7025         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7026         (eb_complaint, record_include_begin, record_include_end)
7027         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7028         (process_xcoff_symbol, read_symbol)
7029         (function_outside_compilation_unit_complaint)
7030         (scan_xcoff_symtab): Update.
7031         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7032         * buildsym.c (finish_block_internal, make_blockvector)
7033         (end_symtab_get_static_block, augment_type_symtab): Update.
7034         * dtrace-probe.c (dtrace_process_dof)
7035         (dtrace_static_probe_ops::get_probes): Update.
7036         * complaints.h (struct complaint): Don't declare.
7037         (symfile_complaints): Remove.
7038         (complaint_internal): Remove "complaints" parameter.
7039         (complaint): Likewise.
7040         (clear_complaints): Likewise.
7041         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7042         (reread_symbols): Update.
7043         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7044         (dwarf2_frame_cache, decode_frame_entry): Update.
7045         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7046         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7047         (info_selectors_command): Update.
7048         * macrotab.c (macro_include, check_for_redefinition)
7049         (macro_undef): Update.
7050         * objfiles.c (filter_overlapping_sections): Update.
7051         * stabsread.c (invalid_cpp_abbrev_complaint)
7052         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7053         (define_symbol, error_type, read_type, rs6000_builtin_type)
7054         (stabs_method_name_from_physname, read_member_functions)
7055         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7056         (attach_fields_to_type, complain_about_struct_wipeout)
7057         (read_range_type, read_args, common_block_start)
7058         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7059         Update.
7060         * mdebugread.c (index_complaint, unknown_ext_complaint)
7061         (basic_type_complaint, bad_tag_guess_complaint)
7062         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7063         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7064         (parse_procedure, parse_lines)
7065         (function_outside_compilation_unit_complaint)
7066         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7067         (bad_tag_guess_complaint, reg_value_complaint): Update.
7068         * cp-support.c (demangled_name_complaint): Update.
7069         * macroscope.c (sal_macro_scope): Update.
7070         * dwarf-index-write.c (class debug_names): Update.
7071
7072 2018-05-23  Tom Tromey  <tom@tromey.com>
7073
7074         * complaints.c (clear_complaints): Remove "noisy" parameter.
7075         * complaints.h (clear_complaints): Update.
7076         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7077         (reread_symbols): Update.
7078
7079 2018-05-23  Tom Tromey  <tom@tromey.com>
7080
7081         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7082         SUBSEQUENT_MESSAGE.
7083         (vcomplaint, clear_complaints): Update.
7084         (symfile_explanations): Remove some messages.
7085
7086 2018-05-23  Tom Tromey  <tom@tromey.com>
7087
7088         * complaints.c (internal_complaint): Remove.
7089         * complaints.h (internal_complaint): Remove.
7090
7091 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7092
7093         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7094
7095 2018-05-22  Pedro Alves  <palves@redhat.com>
7096
7097         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7098         (remote_fileio_badfd, remote_fileio_return_errno)
7099         (remote_fileio_return_success, remote_fileio_func_open)
7100         (remote_fileio_func_open, remote_fileio_func_close)
7101         (remote_fileio_func_read, remote_fileio_func_write)
7102         (remote_fileio_func_lseek, remote_fileio_func_rename)
7103         (remote_fileio_func_unlink, remote_fileio_func_stat)
7104         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7105         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7106         remote_target parameter.
7107         (remote_fio_func_map) <func>: Add remote_target parameter.
7108         (do_remote_fileio_request, remote_fileio_request):
7109         * remote-fileio.h (remote_fileio_request):
7110         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7111         remote_target parameter.
7112         (remote_notif_process, handle_notification): Adjust to pass down
7113         the remote.
7114         (remote_notif_state_allocate): Add remote_target parameter.  Save
7115         it.
7116         * remote-notif.h (struct remote_target): Forward declare.
7117         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7118         remote_target parameter.
7119         (struct remote_notif_state) <remote>: New field.
7120         (remote_notif_ack, remote_notif_parse): Add remote_target
7121         parameter.
7122         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7123         remote_target parameter.
7124         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7125         (threads_listing_context, rmt_thread_action, protocol_feature)
7126         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7127         (packet_result, struct threads_listing_context, remote_state):
7128         Move definitions and declarations higher up.
7129         (remote_target) <~remote_target>: Declare.
7130         (remote_download_command_source, remote_file_put, remote_file_get)
7131         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7132         (remote_hostio_pread_vFile, remote_hostio_send_command)
7133         (remote_hostio_set_filesystem, remote_hostio_open)
7134         (remote_hostio_close, remote_hostio_unlink, remote_state)
7135         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7136         (get_memory_write_packet_size, get_memory_read_packet_size)
7137         (append_pending_thread_resumptions, remote_detach_1)
7138         (append_resumption, remote_resume_with_vcont)
7139         (add_current_inferior_and_thread, wait_ns, wait_as)
7140         (process_stop_reply, remote_notice_new_inferior)
7141         (process_initial_stop_replies, remote_add_thread)
7142         (btrace_sync_conf, remote_btrace_maybe_reopen)
7143         (remove_new_fork_children, kill_new_fork_children)
7144         (discard_pending_stop_replies, stop_reply_queue_length)
7145         (check_pending_events_prevent_wildcard_vcont)
7146         (discard_pending_stop_replies_in_queue, stop_reply)
7147         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7148         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7149         (remote_interrupt_as, remote_interrupt_ns)
7150         (remote_get_noisy_reply, remote_query_attached)
7151         (remote_add_inferior, remote_current_thread, get_current_thread)
7152         (set_thread, set_general_thread, set_continue_thread)
7153         (set_general_process, write_ptid)
7154         (remote_unpack_thread_info_response, remote_get_threadinfo)
7155         (parse_threadlist_response, remote_get_threadlist)
7156         (remote_threadlist_iterator, remote_get_threads_with_ql)
7157         (remote_get_threads_with_qxfer)
7158         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7159         (get_offsets, remote_check_symbols, remote_supported_packet)
7160         (remote_query_supported, remote_packet_size)
7161         (remote_serial_quit_handler, remote_detach_pid)
7162         (remote_vcont_probe, remote_resume_with_hc)
7163         (send_interrupt_sequence, interrupt_query)
7164         (remote_notif_get_pending_events, fetch_register_using_p)
7165         (send_g_packet, process_g_packet, fetch_registers_using_g)
7166         (store_register_using_P, store_registers_using_G)
7167         (set_remote_traceframe, check_binary_download)
7168         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7169         (remote_xfer_live_readonly_partial, remote_read_bytes)
7170         (remote_send_printf, remote_flash_write, readchar)
7171         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7172         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7173         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7174         (extended_remote_disable_randomization, extended_remote_run)
7175         (send_environment_packet, extended_remote_environment_support)
7176         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7177         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7178         (packet_command): Now methods of ...
7179         (remote_target): ... this class.
7180         (m_remote_state) <remote_target>: New field.
7181         (struct remote_state) <stop_reply_queue,
7182         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7183         fields.
7184         (remote_state::remote_state): Allocate stop_reply_queue.
7185         (remote_state): Delete global.
7186         (get_remote_state_raw): Delete.
7187         (remote_target::get_remote_state): Allocate m_remote_state on
7188         demand.
7189         (get_current_remote_target): New.
7190         (remote_ops, extended_remote_ops): Delete.
7191         (wait_forever_enabled_p, remote_async_inferior_event_token):
7192         Delete, moved to struct remote_state.
7193         (remote_target::close): Delete self.  Destruction bits split to
7194         ...
7195         (remote_target::~remote_target): ... this.
7196         (show_memory_packet_size): Adjust to use
7197         get_current_remote_target.
7198         (struct protocol_feature) <func>: Add remote_target parameter.
7199         All callers adjusted.
7200         (curr_quit_handler_target): New.
7201         (remote_serial_quit_handler): Reimplement.
7202         (remote_target::open_1): Adjust to use get_current_remote_target.
7203         Heap-allocate remote_target/extended_remote_target instances.
7204         (vcont_builder::vcont_builder): Add remote_target parameter, and
7205         save it in m_remote.  All callers adjusted.
7206         (vcont_builder::m_remote): New field.
7207         (vcont_builder::restart, vcont_builder::flush)
7208         (vcont_builder::push_action): Use it.
7209         (remote_target::commit_resume): Use it.
7210         (struct queue_iter_param) <remote>: New field.
7211         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7212         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7213         (check_pending_event_prevents_wildcard_vcont_callback)
7214         (remote_target::check_pending_events_prevent_wildcard_vcont)
7215         (remote_target::discard_pending_stop_replies)
7216         (remote_target::discard_pending_stop_replies_in_queue)
7217         (remote_target::remote_notif_remove_queued_reply): Fill in
7218         'remote' field.
7219         (remote_notif_get_pending_events): New.
7220         (remote_target::readchar, remote_target::remote_serial_write):
7221         Save/restore curr_quit_handler_target.
7222         (putpkt): New.
7223         (kill_new_fork_children): Fill in 'remote' field.
7224         (packet_command): Use get_current_remote_target, defer to
7225         remote_target method of same name.
7226         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7227         parameter, and save it in m_remote.  All callers adjusted.
7228         (scoped_remote_fd::release): Use m_remote.
7229         (scoped_remote_fd::m_remote): New field.
7230         (remote_file_put, remote_file_get, remote_file_delete): Use
7231         get_current_remote_target, defer to remote_target method of same
7232         name.
7233         (remote_btrace_reset): Add remote_state paremeter.  Update all
7234         callers.
7235         (remote_async_inferior_event_handler). Pass down 'data'.
7236         (remote_new_objfile): Use get_current_remote_target.
7237         (remote_target::vcont_r_supported): New.
7238         (set_range_stepping): Use get_current_remote_target and
7239         remote_target::vcont_r_supported.
7240         (_initialize_remote): Don't allocate 'remote_state' and
7241         'stop_reply_queue' globals.
7242         * remote.h (struct remote_target): Forward declare.
7243         (getpkt, putpkt, remote_notif_get_pending_events): Add
7244         'remote_target' parameter.
7245
7246 2018-05-22  Pedro Alves  <palves@redhat.com>
7247
7248         * remote.c (vcont_builder): Now a class.  Make all data members
7249         private.
7250         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7251         Declare methods.
7252         (vcont_builder_restart): Rename to ...
7253         (vcont_builder::restart): ... this.
7254         (vcont_builder_flush): Rename to ...
7255         (vcont_builder::flush): ... this.
7256         (vcont_builder_push_action): Rename to ...
7257         (vcont_builder::push_action): ... this.
7258         (remote_target::commit_resume): Adjust.
7259
7260 2018-05-22  Pedro Alves  <palves@redhat.com>
7261
7262         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7263         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7264         (get_fixed_memory_packet_size): New.
7265         (get_memory_packet_size): Use it.
7266         (set_memory_packet_size): Don't override the config size with
7267         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7268         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7269         Don't refer to get_memory_packet_size if not connected to a remote
7270         target.  Show "(default)" if configured size is 0.
7271
7272 2018-05-22  Pedro Alves  <palves@redhat.com>
7273
7274         * remote.c (remote_target::mourn_inferior): Move
7275         discard_pending_stop_replies call here from ...
7276         (_initialize_remote): ... here.
7277
7278 2018-05-22  Pedro Alves  <palves@redhat.com>
7279
7280         * remote.c (compare_section_command): Remove set_general_process
7281         call.
7282
7283 2018-05-22  Pedro Alves  <palves@redhat.com>
7284
7285         * remote.c (struct packet_reg, struct remote_arch_state):
7286         Move higher up in the file.
7287         (remote_state) <m_arch_states>: Store remote_arch_state values
7288         instead of remote_arch_state pointers.
7289         (remote_state::get_remote_arch_state): Adjust.
7290
7291 2018-05-22  Pedro Alves  <palves@redhat.com>
7292
7293         * remote.c: Include <unordered_map>.
7294         (remote_state): Now a class.
7295         (remote_state) <get_remote_arch_state>: Declare method.
7296         <get_remote_arch_state>: New field.
7297         (remote_arch_state) <remote_arch_state>: Declare ctor.
7298         <regs>: Now a unique_ptr.
7299         (remote_gdbarch_data_handle): Delete.
7300         (get_remote_arch_state): Delete.
7301         (remote_state::get_remote_arch_state): New.
7302         (get_remote_state): Adjust to call remote_state's
7303         get_remote_arch_state method.
7304         (init_remote_state): Delete, bits factored out to ...
7305         (remote_arch_state::remote_arch_state): ... this new method.
7306         (get_remote_packet_size, get_memory_packet_size)
7307         (process_g_packet, remote_target::fetch_registers)
7308         (remote_target::prepare_to_store, store_registers_using_G)
7309         (remote_target::store_registers, remote_target::get_trace_status):
7310         Adjust to call remote_state's method.
7311         (_initialize_remote): Remove reference to
7312         remote_gdbarch_data_handle.
7313
7314 2018-05-22  Pedro Alves  <palves@redhat.com>
7315
7316         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7317         pread>: New method declarations.
7318         (remote_target::open_1): Adjust.
7319         (readahead_cache_invalidate): Rename to ...
7320         (readahead_cache::invalidate): ... this, and adjust to be a class
7321         method.
7322         (readahead_cache_invalidate_fd): Rename to ...
7323         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7324         class method.
7325         (remote_hostio_pwrite): Adjust.
7326         (remote_hostio_pread_from_cache): Rename to ...
7327         (readahead_cache::pread): ... this, and adjust to be a class
7328         method.
7329         (remote_hostio_close): Adjust.
7330
7331 2018-05-22  Pedro Alves  <palves@redhat.com>
7332
7333         * remote.c (remote_hostio_close_cleanup): Delete.
7334         (class scoped_remote_fd): New.
7335         (remote_file_put, remote_file_get): Use it.
7336
7337 2018-05-22  Pedro Alves  <palves@redhat.com>
7338
7339         (struct vCont_action_support): Use bool and initialize all fields.
7340         (struct readahead_cache): Initialize all fields.
7341         (remote_state): Use bool and initialize all fields.
7342         (remote_state::remote_state, remote_state::~remote_state): New.
7343         (new_remote_state): Delete.
7344         (_initialize_remote): Use new to allocate remote_state.
7345
7346 2018-05-22  Pedro Alves  <palves@redhat.com>
7347             張俊芝  <zjz@zjz.name>
7348
7349         PR gdb/22973
7350         * c-exp.y: Include "c-support.h".
7351         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7352         of tolower.  Use c_ident_is_alpha to scan names.
7353         * c-lang.c: Include "c-support.h".
7354         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7355         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7356         * c-support.h: New file, with bits factored out from ...
7357         * cp-name-parser.y: ... this file.
7358         Include "c-support.h".
7359         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7360         c-support.h and renamed.
7361         (symbol_end, yylex): Adjust.
7362
7363 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7364
7365         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7366         parameter type to CORE_ADDR.
7367         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7368         parameter type in declaration to CORE_ADDR.
7369         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7370         target_auxv_search to get AT_HWCAP and use the result to get the
7371         target description.
7372         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7373         to CORE_ADDR. Remove the cast of the return value to unsigned
7374         long. Fix error predicate of target_auxv_search.
7375         (ppc_linux_nat_target::read_description): Change the type of the
7376         hwcap variable to CORE_ADDR.
7377
7378 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7379
7380         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7381         if the size of fpscr is larger than 32 bits.
7382
7383 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7384
7385         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7386         (ppc32_linux_vsxregmap): New global.
7387         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7388         regcache_supply_regset, and regcache_collect_regset.
7389         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7390         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7391         (fetch_vsx_register, store_vsx_register): Remove.
7392         (fetch_vsx_registers): Add regno parameter. Get regset using
7393         ppc_linux_vsxregset. Use regset to supply registers.
7394         (store_vsx_registers): Add regno parameter. Get regset using
7395         ppc_linux_vsxregset. Use regset to collect registers.
7396         (fetch_register): Call fetch_vsx_registers instead of
7397         fetch_vsx_register.
7398         (store_register): Call store_vsx_registers instead of
7399         store_vsx_register.
7400         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7401         new regno parameter.
7402         (store_ppc_registers): Call store_vsx_registers with -1 for the
7403         new regno parameter.
7404         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7405         (ppc_collect_vsxregset): Remove.
7406
7407 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7408
7409         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7410         offset fields.
7411         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7412         for vector register offset fields.
7413         (ppc64_fbsd_reg_offsets): Likewise.
7414         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7415         to vector register offset fields.
7416         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7417         to vector register offset fields.
7418         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7419         vector register offset fields.
7420         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7421         initializers for vector register offset fields.
7422         (rs6000_aix64_reg_offsets): Likewise.
7423         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7424         (ppc_supply_vrregset): Remove.
7425         (ppc_collect_vrregset): Remove.
7426         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7427         (ppc_linux_vrregset) : New function.
7428         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7429         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7430         (ppc32_linux_vrregset): Remove.
7431         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7432         and use result instead of ppc32_linux_vrregset.
7433         (ppc32_linux_reg_offsets): Remove initializers for vector register
7434         offset fields.
7435         (ppc64_linux_reg_offsets): Likewise.
7436         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7437         * ppc-linux-nat.c: Include regset.h.
7438         (gdb_vrregset_t): Adjust comment to account for little-endian
7439         mode.
7440         (supply_vrregset, fill_vrregset): Remove.
7441         (fetch_altivec_register, store_altivec_register): Remove.
7442         (fetch_altivec_registers): Add regno parameter. Get regset using
7443         ppc_linux_vrregset. Use regset to supply registers.
7444         (store_altivec_registers): Add regno parameter. Get regset using
7445         ppc_linux_vrregset. Use regset to collect registers.
7446         (fetch_register): Call fetch_altivec_registers instead of
7447         fetch_altivec_register.
7448         (store_register): Call store_altivec_registers instead of
7449         store_altivec_register.
7450         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7451         the new regno parameter.
7452         (store_ppc_registers): Call store_altivec_registers with -1 for
7453         the new regno parameter.
7454
7455 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7456
7457         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7458         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7459         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7460         (gdb_vrregset_t): Change array type size to
7461         PPC_LINUX_SIZEOF_VRREGSET.
7462         (gdb_vsxregset_t): Change array type size to
7463         PPC_LINUX_SIZEOF_VSXREGSET.
7464         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7465         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7466         PPC_LINUX_SIZEOF_VSXREGSET.
7467
7468 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7469
7470         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7471         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7472         nat/ppc-linux.c.
7473         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7474         ppc_linux_target_wordsize with tid.
7475         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7476         wordsize with tid.
7477         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7478         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7479         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7480         tid parameter. Remove static specifier.
7481         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7482         (ppc_linux_target_wordsize): New declaration.
7483
7484 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7485
7486         * arch/ppc-linux-common.c: New file.
7487         * arch/ppc-linux-common.h: New file.
7488         * arch/ppc-linux-tdesc.h: New file.
7489         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7490         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7491         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7492         arch/ppc-linux-tdesc.h.
7493         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7494         arch/ppc-linux-tdesc.h.
7495         (ppc_linux_nat_target::read_description): Remove target
7496         description matching code. Fill a ppc_linux_features struct and
7497         call ppc_linux_match_description with it. Move comment about ISA
7498         2.05 to ppc-linux-common.c.
7499         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7500         arch/ppc-linux-tdesc.h.
7501         (ppc_linux_core_read_description): Remove target description
7502         matching code. Fill a ppc_linux_features struct and call
7503         ppc_linux_match_description with it.
7504         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7505         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7506         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7507         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7508         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7509         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7510         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7511         (tdesc_powerpc_e500l): Remove.
7512
7513 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7514
7515         * ada-lang.c (catch_assert_command): Pass empty string instead
7516         of NULL for excep_string argument.
7517
7518 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7519
7520         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7521         the width of the requested register exceeds the width of the
7522         `ptrace' data type.
7523
7524 2018-05-21  Tom Tromey  <tom@tromey.com>
7525
7526         * printcmd.c (output_command): Remove.
7527         (output_command_const): Rename to output_command.
7528         * valprint.h (output_command): Rename from output_command_const.
7529         * tracepoint.c (trace_dump_actions): Call output_command.
7530
7531 2018-05-21  Tom Tromey  <tom@tromey.com>
7532
7533         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7534         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7535         * ada-lang.h (create_ada_exception_catchpoint): Update.
7536         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7537         std::string.
7538         (create_excep_cond_exprs, ~ada_catchpoint)
7539         (should_stop_exception, print_one_exception)
7540         (print_mention_exception, print_recreate_exception): Update.
7541         (ada_get_next_arg): Remove.
7542         (catch_ada_exception_command_split): Use std::string.  Change type
7543         of "excep_string", "cond_string".
7544         (catch_ada_exception_command): Update.
7545         (create_ada_exception_catchpoint): Change type of excep_string.
7546         (ada_exception_sal): Remove excep_string parameter.
7547         (~ada_catchpoint): Remove.
7548
7549 2018-05-21  Tom Tromey  <tom@tromey.com>
7550
7551         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7552         cleanup.
7553
7554 2018-05-21  Tom Tromey  <tom@tromey.com>
7555
7556         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7557         Return unique_xmalloc_ptr.
7558         (print_it_exception): Update.
7559
7560 2018-05-21  Tom Tromey  <tom@tromey.com>
7561
7562         * tracepoint.c (trace_dump_actions): Use std::string.
7563
7564 2018-05-21  Tom Tromey  <tom@tromey.com>
7565
7566         * symfile.c (reread_symbols): Use std::string for original_name.
7567
7568 2018-05-21  Tom Tromey  <tom@tromey.com>
7569
7570         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7571         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7572         constructor.
7573
7574 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7575
7576         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7577         instance to...
7578         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7579         * objfiles.c (get_objfile_bfd_data): Allocate
7580         objfile_per_bfd_storage with obstack_new when allocating on
7581         obstack.
7582
7583 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7584
7585         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7586         OBSTACK_ZALLOC.
7587         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7588         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7589         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7590         (add_pending): Likewise.
7591         (parse_symbol): Likewise.
7592         (parse_partial_symbols): Likewise.
7593         (psymtab_to_symtab_1): Likewise.
7594         (new_psymtab): Likewise.
7595         (elfmdebug_build_psymtabs): Likewise.
7596         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7597         * objfiles.c (get_objfile_bfd_data): Likewise.
7598         (objfile_register_static_link): Likewise.
7599         * psymtab.c (allocate_psymtab): Likewise.
7600         * stabsread.c (read_member_functions): Likewise.
7601         * xcoffread.c (xcoff_end_psymtab): Likewise.
7602
7603 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7604
7605         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7606         compiler supports std::is_trivially_constructible.
7607         * common/poison.h: Include obstack.h.
7608         (IsMallocable): Define to is_trivially_constructible if the
7609         compiler supports it, define to true_type otherwise.
7610         (xobnew): New.
7611         (XOBNEW): Redefine.
7612         (xobnewvec): New.
7613         (XOBNEWVEC): Redefine.
7614         * gdb_obstack.h (obstack_zalloc): New.
7615         (OBSTACK_ZALLOC): Redefine.
7616         (obstack_calloc): New.
7617         (OBSTACK_CALLOC): Redefine.
7618         (obstack_new): New.
7619         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7620         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7621         gdbarch.c.
7622         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7623         obstack_calloc/obstack_zalloc.
7624         (gdbarch_obstack_zalloc): Remove.
7625         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7626
7627 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7628
7629         * stack.c (backtrace_command_1): Remove useless variable int i.
7630
7631 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7632
7633         * stack.c (print_frame_info): Fix comment.
7634
7635 2018-05-18  Tom Tromey  <tom@tromey.com>
7636
7637         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7638         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7639         (~dwarf2_per_objfile): Update
7640         (dwarf2_get_dwz_file): Use new.
7641         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7642         unique_ptr.
7643
7644 2018-05-18  Tom Tromey  <tom@tromey.com>
7645
7646         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7647         unique_ptr.
7648         * dwarf2read.c (struct dwp_file): Add constructor and
7649         initializers.
7650         (open_and_init_dwp_file): Return a unique_ptr.
7651         (dwarf2_per_objfile, create_dwp_hash_table)
7652         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7653         (lookup_dwo_unit_in_dwp): Update.
7654         (open_and_init_dwp_file, get_dwp_file): Update.
7655
7656 2018-05-18  Tom Tromey  <tom@tromey.com>
7657
7658         * dwarf2read.c (dwarf2_per_objfile): Update.
7659         (struct mapped_index): Add initializers.
7660         (dwarf2_read_index): Use new.
7661         (dw2_symtab_iter_init): Update.
7662         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7663         unique_ptr.
7664
7665 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7666
7667         * dwarf2read.c (mapped_index) <total_size>: Remove.
7668
7669 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7670
7671         * unittests/format_pieces-selftests.c (test_format_specifier):
7672         Add ARI comments.
7673
7674 2018-05-18  Tom Tromey  <tom@tromey.com>
7675
7676         * c-typeprint.c (maybe_print_hole): New function.
7677         (c_print_type_struct_field_offset): Update.
7678         (c_type_print_base_struct_union): Call maybe_print_hole.
7679
7680 2018-05-17  Keith Seitz  <keiths@redhat.com>
7681
7682         * breakpoint.c (build_bpstat_chain): New function, moved from
7683         bpstat_stop_status.
7684         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7685         If no stop chain is passed, call build_bpstat_chain to build it.
7686         * breakpoint.h (build_bpstat_chain): Declare.
7687         (bpstat_stop_status): Move documentation here from breakpoint.c.
7688         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7689         build the stop chain and pass it to skip_inline_frames.
7690         Pass this stop chain to bpstat_stop_status.
7691         * inline-frame.c: Include breakpoint.h.
7692         (stopped_by_user_bp_inline_frame): New function.
7693         (skip_inline_frames): Add parameter `stop_chain'.
7694         Move documention to inline-frame.h.
7695         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7696         whether the frame should be elided.
7697         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7698         Add moved documentation and update for new parameter.
7699
7700 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7701
7702         PR cli/14975
7703         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7704         unittests/format_pieces-selftests.c.
7705         * common/format.h (format_piece) <operator==>: New.
7706         (format_pieces) <operator[]>: Remove.
7707         * common/format.c (format_pieces::format_pieces): Handle \e.
7708         * unittests/format_pieces-selftests.c: New.
7709
7710 2018-05-17  Tom Tromey  <tom@tromey.com>
7711
7712         PR symtab/23010:
7713         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7714         (dw2_instantiate_symtab): Add skip_partial parameter.
7715         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7716         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7717         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7718         (dw2_expand_symtabs_matching_one)
7719         (dw2_find_pc_sect_compunit_symtab)
7720         (dw2_debug_names_lookup_symbol)
7721         (dw2_debug_names_expand_symtabs_for_function): Update.
7722         (init_cutu_and_read_dies): Add skip_partial parameter.
7723         (process_psymtab_comp_unit, build_type_psymtabs_1)
7724         (process_skeletonless_type_unit, load_partial_comp_unit)
7725         (psymtab_to_symtab_1): Update.
7726         (load_full_comp_unit): Add skip_partial parameter.
7727         (process_imported_unit_die, dwarf2_read_addr_index)
7728         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7729         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7730         (read_signatured_type): Update.
7731
7732 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7733
7734         * value.c (release_value): Remove unused variable.
7735         (record_latest_value): Likewise.
7736         (access_value_history): Likewise.
7737         (preserve_values): Likewise.
7738
7739 2018-05-17  Tom Tromey  <tom@tromey.com>
7740
7741         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7742         Initialize.
7743
7744 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7745
7746         PR gdb/22286
7747         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7748         Also handle registers whose width is not a multiple of
7749         PTRACE_TYPE_RET.
7750         (linux_nat_trad_target::store_register): Likewise.
7751
7752 2018-05-16  Tom Tromey  <tom@tromey.com>
7753
7754         * gdbcore.h (core_bfd): Redefine.
7755         * corelow.c (core_target::close): Update.
7756         (core_target_open): Update.
7757         * progspace.h (struct program_space) <cbfd>: Now a
7758         gdb_bfd_ref_ptr.
7759
7760 2018-05-16  Tom Tromey  <tom@tromey.com>
7761
7762         PR cli/19551:
7763         * symfile-add-flags.h (enum symfile_add_flags)
7764         <SYMFILE_NOT_FILENAME>: New constant.
7765         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7766         objfile name from BFD.
7767         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7768         * minidebug.c (find_separate_debug_file_in_section): Put
7769         ".gnu_debugdata" into BFD's file name.
7770
7771 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7772
7773         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7774         Remove.
7775
7776 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7777
7778         PR binutils/21446
7779         * aarch64-tdep.c (aarch64_analyze_prologue,
7780         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7781         Indicate not interested in errors.
7782
7783 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7784
7785         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7786         Supply the MIPS_ZERO_REGNUM register.
7787
7788 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7789
7790         * mips-tdep.c (mask_address_var): Make variable static.
7791
7792 2018-05-14  Tom Tromey  <tom@tromey.com>
7793
7794         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7795
7796 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7797
7798         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7799         FXSAVE_ADDR for the mxcsr register.
7800
7801 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7802
7803         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7804
7805 2018-05-11  Pedro Alves  <palves@redhat.com>
7806
7807         * corelow.c (core_target) <core_target>: No longer inline.
7808         Initialize m_core_gdbarch, m_core_vec and build the section table
7809         here.
7810         <~core_target>: New.
7811         <core_gdbarch, get_core_register_section>: New methods.
7812         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7813         factored out from ...
7814         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7815         (core_ops): Delete.
7816         (sniff_core_bfd): Add gdbarch parameter.
7817         (core_close): Delete, merged into ...
7818         (core_target::close): ... here.  Delete self.
7819         (core_close_cleanup): Delete.
7820         (core_target_open): Allocate a core_target on the heap.  Use a
7821         unique_ptr instead of a cleanup.  Bits moved into the core_target
7822         ctor.  Adjust to use core_target methods instead of globals.
7823         (get_core_register_section): Rename to ...
7824         (core_target::get_core_register_section): ... this and adjust.
7825         (struct get_core_registers_cb_data): New.
7826         (get_core_registers_cb): Use it.  Use bool.
7827         (core_target::fetch_registers, core_target::files_info)
7828         (core_target::xfer_partial, core_target::read_description)
7829         (core_target::pid_to, core_target::thread_name): Adjust to
7830         reference class fields instead of globals.
7831         * target.h (struct target_ops_deleter, target_ops_up): New.
7832
7833 2018-05-11  Pedro Alves  <palves@redhat.com>
7834
7835         * corefile.c (core_file_command): Move to corelow.c.
7836         * corelow.c (the_core_target): Delete.
7837         (core_file_command): Moved from corefile.c.  Check exec_bfd
7838         instead of the_core_target.  Use target_detach instead of calling
7839         into the_core_target directly.
7840         (maybe_say_no_core_file_now): New.
7841         (core_target::detach): Use it.
7842         (_initialize_corelow): Remove references to the_core_target.
7843         * gdbcore.h (the_core_target): Delete.
7844
7845 2018-05-11  Tom Tromey  <tromey@redhat.com>
7846             Pedro Alves  <palves@redhat.com>
7847
7848         * corefile.c (core_bfd): Remove.
7849         * gdbcore.h (core_bfd): Now a macro.
7850         * progspace.h (struct program_space) <cbfd>: New field.
7851
7852 2018-05-11  Tom Tromey  <tom@tromey.com>
7853
7854         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7855         gdb::def_vector.
7856
7857 2018-05-10  Tom Tromey  <tom@tromey.com>
7858
7859         * configure: Rebuild.
7860         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7861
7862 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7863
7864         PR server/23158:
7865         * regformats/regdat.sh: Adjust script, following the addition
7866         of the new expedite_regs parameter to init_target_desc.
7867
7868 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7869     
7870         PR gdb/23127
7871         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7872         set_gdbarch_significant_addr_bit.
7873         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7874         set_gdbarch_significant_addr_bit.
7875         * utils.c (address_significant): Update to sign extend addr.
7876
7877 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7878
7879         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7880         (xtensa_linux_init_abi): Limit tdep->num_regs by
7881         tdep->num_nopriv_regs.
7882         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7883         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7884         not initialized.
7885
7886 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7887
7888         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7889
7890 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7891
7892         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7893         (I387_MXCSR_INIT_VAL): New constant.
7894         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7895         buffer if it was supplied by the inferior.
7896         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7897         (i387_xsave_get_clear_bv): New function.
7898         (i387_supply_xsave): Only read x87 control registers from the
7899         xsave buffer if the feature is enabled, and the state will have
7900         been written, otherwise, provide a suitable default.
7901         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7902         including x87 control registers.  Update control registers if they
7903         have changed from the default value, and mark features as enabled
7904         as required.
7905         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7906
7907 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7908
7909         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7910
7911 2018-05-07  Tom Tromey  <tom@tromey.com>
7912
7913         * configure: Rebuild.
7914         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7915
7916 2018-05-07  Tom Tromey  <tom@tromey.com>
7917
7918         PR tdep/20362:
7919         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7920         bit.  Use correct value for VDIV.
7921
7922 2018-05-04  Tom Tromey  <tom@tromey.com>
7923
7924         * configure: Rebuild.
7925         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7926
7927 2018-05-04  Tom Tromey  <tom@tromey.com>
7928
7929         * linux-record.c (record_linux_system_call) <case
7930         RECORD_SYS_RECVFROM>: Add "break".
7931
7932 2018-05-04  Tom Tromey  <tom@tromey.com>
7933
7934         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7935         Add missing "break".
7936         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7937         Add missing "break".
7938
7939 2018-05-04  Tom Tromey  <tom@tromey.com>
7940
7941         * rs6000-tdep.c (ppc_process_record_op4)
7942         (ppc_process_record_op63): Add fall-through comment.
7943
7944 2018-05-04  Tom Tromey  <tom@tromey.com>
7945
7946         * i386-tdep.c (i386_process_record): Add fall-through comment.
7947
7948 2018-05-04  Tom Tromey  <tom@tromey.com>
7949
7950         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7951         comment.
7952
7953 2018-05-04  Tom Tromey  <tom@tromey.com>
7954
7955         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7956         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7957         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7958         comment.
7959         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7960         comment.
7961         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7962         comment.
7963
7964 2018-05-04  Tom Tromey  <tom@tromey.com>
7965
7966         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7967
7968 2018-05-04  Tom Tromey  <tom@tromey.com>
7969
7970         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7971         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7972         * symfile.c (section_is_mapped): Fix fall-through comment.
7973         * stabsread.c (define_symbol, read_member_functions): Fix
7974         fall-through comment.
7975         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7976         comment.
7977         * remote.c (remote_wait_as): Fix fall-through comment.
7978         * p-exp.y (yylex): Fix fall-through comment.
7979         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7980         comment.
7981         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7982         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7983         * jv-exp.y (yylex): Fix fall-through comment.
7984         * go-exp.y (lex_one_token): Fix fall-through comment.
7985         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7986         fall-through comment.
7987         * f-exp.y (yylex): Fix fall-through comment.
7988         * dwarf2read.c (process_die): Fix fall-through comments.
7989         * dbxread.c (process_one_symbol): Fix fall-through comment.
7990         * d-exp.y (lex_one_token): Fix fall-through comment.
7991         * cp-name-parser.y (yylex): Fix fall-through comment.
7992         * coffread.c (coff_symtab_read): Fix fall-through comment.
7993         * c-exp.y (lex_one_token): Fix fall-through comment.
7994         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7995         comment.
7996         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7997         comment.
7998
7999 2018-05-04  Tom Tromey  <tom@tromey.com>
8000
8001         PR python/22730:
8002         * NEWS: Mention gdb.execute change.
8003         * gdbcmd.h (execute_control_command): Don't declare.
8004         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8005         execute_control_commands, execute_control_commands_to_string.
8006         * cli/cli-script.h (execute_control_commands)
8007         (execute_control_commands_to_string): Declare.
8008         (execute_control_command): Add from_tty parameter.
8009         * cli/cli-script.c (execute_control_commands)
8010         (execute_control_commands_to_string): New functions.
8011         (execute_user_command): Use execute_control_commands.
8012         (execute_control_command_1): Add "from_tty" parameter.  Update.
8013         (execute_control_command): Likewise.
8014
8015 2018-05-04  Tom Tromey  <tom@tromey.com>
8016
8017         PR python/22731:
8018         * NEWS: Mention that breakpoint commands are writable.
8019         * python/py-breakpoint.c (bppy_set_commands): New function.
8020         (breakpoint_object_getset) <"commands">: Use it.
8021
8022 2018-05-04  Tom Tromey  <tom@tromey.com>
8023
8024         * tracepoint.c (actions_command): Update.
8025         * mi/mi-cmd-break.c (mi_command_line_array)
8026         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8027         (mi_read_next_line): Remove.
8028         (mi_cmd_break_commands): Update.
8029         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8030         function_view.
8031         * cli/cli-script.c (get_command_line): Update.
8032         (process_next_line): Use function_view.  Constify.
8033         (recurse_read_control_structure, read_command_lines)
8034         (read_command_lines_1): Change argument types to function_view.
8035         (do_define_command, document_command): Update.
8036         * breakpoint.h (check_tracepoint_command): Don't declare.
8037         * breakpoint.c (check_tracepoint_command): Remove.
8038         (commands_command_1, create_tracepoint_from_upload): Update.
8039
8040 2018-05-04  Tom Tromey  <tom@tromey.com>
8041
8042         PR gdb/11750:
8043         * cli/cli-script.h (enum command_control_type) <define_control>:
8044         New constant.
8045         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8046         (build_command_line, execute_control_command_1)
8047         (process_next_line): Likewise.
8048         (do_define_command): New function, extracted from define_command.
8049         (define_command): Use it.
8050
8051 2018-05-04  Tom Tromey  <tom@tromey.com>
8052
8053         * tracepoint.c (actions_command): Update.
8054         * cli/cli-script.h (read_command_lines): Update.
8055         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8056         (MAX_TMPBUF): Remove define.
8057         (define_command): Use string_printf.
8058         (document_command): Likewise.
8059         * breakpoint.c (commands_command_1): Update.
8060
8061 2018-05-04  Tom Tromey  <tom@tromey.com>
8062
8063         * top.c (execute_command): Update.
8064         * cli/cli-script.h (print_command_lines): Now varargs.
8065         * cli/cli-script.c (print_command_lines): Now varargs.
8066         (execute_control_command_1) <case while_control, case if_control>:
8067         Update.
8068
8069 2018-05-04  Tom Tromey  <tom@tromey.com>
8070
8071         * tracepoint.c (all_tracepoint_actions): Rename from
8072         all_tracepoint_actions_and_cleanup.  Change return type.
8073         (actions_command, encode_actions_1, encode_actions)
8074         (trace_dump_actions, tdump_command): Update.
8075         * remote.c (remote_download_command_source): Update.
8076         * python/python.c (gdbpy_eval_from_control_command)
8077         (python_command, python_interactive_command): Update.
8078         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8079         * guile/guile.c (guile_command)
8080         (gdbscm_eval_from_control_command, guile_command): Update.
8081         * compile/compile.c (compile_code_command)
8082         (compile_print_command, compile_to_object): Update.
8083         * cli/cli-script.h (struct command_lines_deleter): New.
8084         (counted_command_line): New typedef.
8085         (struct command_line): Add constructor, destructor.
8086         <body_list>: Remove.
8087         <body_list_0, body_list_1>: New members.
8088         (command_line_up): Remove typedef.
8089         (read_command_lines, read_command_lines_1, get_command_line):
8090         Update.
8091         (copy_command_lines): Don't declare.
8092         * cli/cli-script.c (build_command_line): Use "new".
8093         (get_command_line): Return counted_command_line.
8094         (print_command_lines, execute_user_command)
8095         (execute_control_command_1, while_command, if_command): Update.
8096         (realloc_body_list): Remove.
8097         (process_next_line, recurse_read_control_structure): Update.
8098         (read_command_lines, read_command_lines_1): Return counted_command_line.
8099         (free_command_lines): Use "delete".
8100         (copy_command_lines): Remove.
8101         (define_command, document_command, show_user_1): Update.
8102         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8103         a counted_command_line.
8104         * breakpoint.h (counted_command_line): Remove typedef.
8105         (breakpoint_set_commands): Update.
8106         * breakpoint.c (check_no_tracepoint_commands)
8107         (validate_commands_for_breakpoint): Update.
8108         (breakpoint_set_commands): Change commands to be a
8109         counted_command_line.
8110         (commands_command_1, update_dprintf_command_list)
8111         (create_tracepoint_from_upload): Update.
8112
8113 2018-05-04  Tom Tromey  <tom@tromey.com>
8114
8115         * cli/cli-decode.h (cmd_list_element): New constructor.
8116         (~cmd_list_element): New destructor.
8117         (struct cmd_list_element): Add initializers.
8118         * cli/cli-decode.c (do_add_cmd): Use "new".
8119         (delete_cmd): Use "delete".
8120
8121 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8122             Pedro Alves <palves@redhat.com>
8123
8124         PR breakpoints/19806 and support for PR external/20207.
8125         * NEWS: Mention Aarch64 watchpoint improvements.
8126         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8127         watchpoints and PR external/20207 watchpoints.
8128         * nat/aarch64-linux-hw-point.c
8129         (kernel_supports_any_contiguous_range): New.
8130         (aarch64_watchpoint_offset): New.
8131         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8132         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8133         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8134         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8135         next_addr_orig_p.  Support PR external/20207 watchpoints.
8136         (aarch64_downgrade_regs): New.
8137         (aarch64_dr_state_insert_one_point): New parameters offset and
8138         addr_orig.
8139         (aarch64_dr_state_remove_one_point): Likewise.
8140         (aarch64_handle_breakpoint): Update caller.
8141         (aarch64_handle_aligned_watchpoint): Likewise.
8142         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8143         aligned_offset.
8144         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8145         aarch64_downgrade_regs.
8146         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8147         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8148         (DR_CONTROL_MASK): ... this.
8149         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8150         (unsigned int aarch64_watchpoint_offset): New prototype.
8151         (aarch64_linux_set_debug_regs): Remove const from state.
8152         * utils.c (align_up, align_down): Move to ...
8153         * common/common-utils.c (align_up, align_down): ... here.
8154         * utils.h (align_up, align_down): Move to ...
8155         * common/common-utils.h (align_up, align_down): ... here.
8156
8157 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8158
8159         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8160         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8161         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8162         Re-implement to match the ABI as summarized in GCC's
8163         gcc/config/sparc/sparc.c.  All callers updated.
8164         (sparc32_store_arguments): Remove assertion.
8165
8166 2018-05-04  Tom Tromey  <tom@tromey.com>
8167
8168         * printcmd.c: Don't include tui.h.
8169         (decode_format): Use skip_spaces.
8170
8171 2018-05-04  Tom Tromey  <tom@tromey.com>
8172
8173         PR gdb/22619:
8174         * printcmd.c (last_count): New global.
8175         (x_command): Use saved count when repeating.
8176
8177 2018-05-04  Tom Tromey  <tom@tromey.com>
8178
8179         * nto-procfs.c (do_closedir_cleanup): Remove.
8180         (procfs_pidlist): Use gdb_dir_up.
8181         * procfs.c (do_closedir_cleanup): Remove.
8182         (proc_update_threads): Use gdb_dir_up.
8183         * common/filestuff.h (struct gdb_dir_deleter): New.
8184         (gdb_dir_up): New typedef.
8185
8186 2018-05-04  Tom Tromey  <tom@tromey.com>
8187
8188         * ada-lang.c (print_mention_exception): Use std::string.
8189
8190 2018-05-04  Tom Tromey  <tom@tromey.com>
8191
8192         * ada-lang.c (create_excep_cond_exprs): Update.
8193         (ada_exception_catchpoint_cond_string): Use std::string.
8194
8195 2018-05-04  Tom Tromey  <tom@tromey.com>
8196
8197         * ada-lang.c (xget_renaming_scope): Return std::string.
8198         (old_renaming_is_invisible): Update.
8199
8200 2018-05-04  Tom Tromey  <tom@tromey.com>
8201
8202         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8203         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8204
8205 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8206
8207         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8208
8209 2018-05-04  Tom Tromey  <tom@tromey.com>
8210
8211         * remote.c (remote_query_supported_append): Change type.
8212         (remote_check_symbols): Update.
8213
8214 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8215
8216         PR gdb/11420
8217         * configure.ac: Prepend libpython.
8218         * python/python-config.py: Likewise.
8219         * configure: Regenerate.
8220
8221 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8222
8223         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8224
8225 2018-05-03  Pedro Alves  <palves@redhat.com>
8226
8227         * s390-linux-nat.c
8228         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8229         override.  Write 'true' instead of '1'.
8230         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8231         declaration.
8232
8233 2018-05-02  Pedro Alves  <palves@redhat.com>
8234
8235         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8236         add_inf_child_target.
8237         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8238         add_inf_child_target.
8239         * aix-thread.c (aix_thread_target_info): New.
8240         (aix_thread_target) <shortname, longname, doc>: Delete.
8241         <info>: New.
8242         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8243         add_inf_child_target.
8244         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8245         add_inf_child_target.
8246         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8247         add_inf_child_target.
8248         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8249         add_inf_child_target.
8250         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8251         add_inf_child_target.
8252         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8253         add_inf_child_target.
8254         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8255         add_inf_child_target.
8256         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8257         add_inf_child_target.
8258         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8259         add_inf_child_target.
8260         * bfd-target.c (target_bfd_target_info): New.
8261         (target_bfd) <shortname, longname, doc>: Delete.
8262         <info>: New.
8263         * bsd-kvm.c (bsd_kvm_target_info): New.
8264         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8265         <info>: New.
8266         (bsd_kvm_target::open): Rename to ...
8267         (bsd_kvm_target_open): ... this.  Adjust.
8268         * bsd-uthread.c (bsd_uthread_target_info): New.
8269         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8270         <info>: New.
8271         * corefile.c (core_file_command): Adjust.
8272         * corelow.c (core_target_info): New.
8273         (core_target) <shortname, longname, doc>: Delete.
8274         <info>: New.
8275         (core_target::open): Rename to ...
8276         (core_target_open): ... this.  Adjust.
8277         * ctf.c (ctf_target_info): New.
8278         (ctf_target) <shortname, longname, doc>: Delete.
8279         <info>: New.
8280         (ctf_target::open): Rename to ...
8281         (ctf_target_open): ... this.
8282         (_initialize_ctf): Adjust.
8283         * exec.c (exec_target_info): New.
8284         (exec_target) <shortname, longname, doc>: Delete.
8285         <info>: New.
8286         (exec_target::open): Rename to ...
8287         (exec_target_open): ... this.
8288         * gdbcore.h (core_target_open): Declare.
8289         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8290         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8291         add_inf_child_target.
8292         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8293         add_inf_child_target.
8294         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8295         add_inf_child_target.
8296         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8297         add_inf_child_target.
8298         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8299         add_inf_child_target.
8300         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8301         add_inf_child_target.
8302         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8303         add_inf_child_target.
8304         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8305         add_inf_child_target.
8306         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8307         add_inf_child_target.
8308         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8309         add_inf_child_target.
8310         * inf-child.c (inf_child_target_info): New.
8311         (inf_child_target::info): New.
8312         (inf_child_open_target): Remove 'target' parameter.  Use
8313         get_native_target instead.
8314         (inf_child_target::open): Delete.
8315         (add_inf_child_target): New.
8316         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8317         Delete.
8318         <info>: New.
8319         (add_inf_child_target): Declare.
8320         (inf_child_open_target): Declare.
8321         * linux-thread-db.c (thread_db_target_info): New.
8322         (thread_db_target) <shortname, longname, doc>: Delete.
8323         <info>: New.
8324         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8325         add_inf_child_target.
8326         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8327         add_inf_child_target.
8328         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8329         add_inf_child_target.
8330         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8331         add_inf_child_target.
8332         * make-target-delegates (print_class): Adjust.
8333         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8334         add_inf_child_target.
8335         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8336         add_inf_child_target.
8337         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8338         add_inf_child_target.
8339         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8340         add_inf_child_target.
8341         * nto-procfs.c (nto_native_target_info): New.
8342         (nto_procfs_target_native) <shortname, longname, doc>:
8343         Delete.
8344         <info>: New.
8345         (nto_procfs_target_info): New.
8346         (nto_procfs_target_procfs) <shortname, longname, doc>:
8347         Delete.
8348         <info>: New.
8349         (init_procfs_targets): Adjust.
8350         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8351         add_inf_child_target.
8352         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8353         add_inf_child_target.
8354         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8355         add_inf_child_target.
8356         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8357         add_inf_child_target.
8358         * ravenscar-thread.c (ravenscar_target_info): New.
8359         (ravenscar_thread_target) <shortname, longname, doc>:
8360         Delete.
8361         <info>: New.
8362         * record-btrace.c (record_btrace_target_info):
8363         (record_btrace_target) <shortname, longname, doc>: Delete.
8364         <info>: New.
8365         (record_btrace_target::open): Rename to ...
8366         (record_btrace_target_open): ... this.  Adjust.
8367         * record-full.c (record_longname, record_doc): New.
8368         (record_full_base_target) <shortname, longname, doc>: Delete.
8369         <info>: New.
8370         (record_full_target_info): New.
8371         (record_full_target): <shortname>: Delete.
8372         <info>: New.
8373         (record_full_core_open_1, record_full_open_1): Update comments.
8374         (record_full_base_target::open): Rename to ...
8375         (record_full_open): ... this.
8376         (cmd_record_full_restore): Update.
8377         (_initialize_record_full): Update.
8378         * remote-sim.c (remote_sim_target_info): New.
8379         (gdbsim_target) <shortname, longname, doc>: Delete.
8380         <info>: New.
8381         (gdbsim_target::open): Rename to ...
8382         (gdbsim_target_open): ... this.
8383         (_initialize_remote_sim): Adjust.
8384         * remote.c (remote_doc): New.
8385         (remote_target_info): New.
8386         (remote_target) <shortname, longname, doc>: Delete.
8387         <info>: New.
8388         (extended_remote_target_info): New.
8389         (extended_remote_target) <shortname, longname, doc>: Delete.
8390         <info>: New.
8391         (remote_target::open_1): Make static.  Adjust.
8392         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8393         * s390-linux-nat.c (_initialize_s390_nat): Use
8394         add_inf_child_target.
8395         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8396         add_inf_child_target.
8397         * sol-thread.c (thread_db_target_info): New.
8398         (sol_thread_target) <shortname, longname, doc>: Delete.
8399         <info>: New.
8400         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8401         add_inf_child_target.
8402         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8403         add_inf_child_target.
8404         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8405         add_inf_child_target.
8406         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8407         add_inf_child_target.
8408         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8409         add_inf_child_target.
8410         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8411         add_inf_child_target.
8412         * spu-linux-nat.c (_initialize_spu_nat): Use
8413         add_inf_child_target.
8414         * spu-multiarch.c (spu_multiarch_target_info): New.
8415         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8416         <info>: New.
8417         * target-delegates.c: Regenerate.
8418         * target.c: Include <unordered_map>.
8419         (target_ops_p): Delete.
8420         (DEF_VEC_P(target_ops_p)): Delete.
8421         (target_factories): New.
8422         (test_target_info): New.
8423         (test_target_ops::info): New.
8424         (open_target): Adjust to use target_factories.
8425         (add_target_with_completer): Rename to ...
8426         (add_target): ... this.  Change prototype.  Register target_info
8427         and open callback in target_factories.  Register target_info in
8428         command context instead of target_ops.
8429         (add_target): Delete old implementation.
8430         (add_deprecated_target_alias): Change prototype.  Adjust.
8431         (the_native_target): New.
8432         (set_native_target, get_native_target): New.
8433         (find_default_run_target): Use the_native_target.
8434         (find_attach_target, find_run_target): Simplify.
8435         (target_ops::open): Delete.
8436         (dummy_target_info): New.
8437         (dummy_target::shortname, dummy_target::longname)
8438         (dummy_target::doc): Delete.
8439         (dummy_target::info): New.
8440         (debug_target::shortname, debug_target::longname)
8441         (debug_target::doc): Delete.
8442         (debug_target::info): New.
8443         * target.h (struct target_info): New.
8444         (target_ops::~target_ops): Add comment.
8445         (target_ops::info): New.
8446         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8447         longer virtual.  Implement in terms of target_info.
8448         (set_native_target, get_native_target): Declare.
8449         (target_open_ftype): New.
8450         (add_target, add_target_with_completer)
8451         (add_deprecated_target_alias): Change prototype.
8452         (test_target) <shortname, longname, doc>: Delete.
8453         <info>: New.
8454         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8455         add_inf_child_target.
8456         * tracefile-tfile.c (tfile_target_info): New.
8457         (tfile_target) <shortname, longname, doc>: Delete.
8458         <info>: New.
8459         (tfile_target::open): Rename to ...
8460         (tfile_target_open): ... this.
8461         (_initialize_tracefile_tfile): Adjust.
8462         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8463         add_inf_child_target.
8464         * windows-nat.c (_initialize_windows_nat): Use
8465         add_inf_child_target.
8466         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8467         add_inf_child_target.
8468
8469 2018-05-02  Pedro Alves  <palves@redhat.com>
8470
8471         * linux-nat.h (linux_nat_target) <low_new_thread,
8472         low_delete_thread, low_new_fork, low_forget_process,
8473         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8474         New virtual methods.
8475         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8476         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8477         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8478         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8479         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8480         Delete.
8481         * linux-fork.c (delete_fork): Adjust to call low method.
8482         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8483         (linux_nat_new_fork, linux_nat_forget_process_hook)
8484         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8485         (linux_nat_status_is_event):
8486         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8487         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8488         to call low method.
8489         (sigtrap_is_event): Rename to ...
8490         (linux_nat_target::low_status_is_event): ... this.
8491         (linux_nat_set_status_is_event): Delete.
8492         (save_stop_reason, linux_nat_wait_1)
8493         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8494         low methods.
8495         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8496         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8497         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8498         (linux_nat_set_prepare_to_resume): Delete.
8499         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8500         low virtual methods.
8501         * amd64-linux-nat.c: Likewise.
8502         * arm-linux-nat.c: Likewise.
8503         * i386-linux-nat.c: Likewise.
8504         * ia64-linux-nat.c: Likewise.
8505         * mips-linux-nat.c: Likewise.
8506         * ppc-linux-nat.c: Likewise.
8507         * s390-linux-nat.c: Likewise.
8508         * sparc64-linux-nat.c: Likewise.
8509         * x86-linux-nat.c: Likewise.
8510         * x86-linux-nat.h: Include "nat/x86-linux.h".
8511         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8512         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8513         Override methods.
8514
8515 2018-05-02  Pedro Alves  <palves@redhat.com>
8516
8517         * target.h (target_ops)
8518         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8519         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8520         stopped_by_watchpoint, have_continuable_watchpoint,
8521         stopped_data_address, watchpoint_addr_within_range,
8522         can_accel_watchpoint_condition, can_run, thread_alive,
8523         has_all_memory, has_memory, has_stack, has_registers,
8524         has_execution, can_async_p, is_async_p, supports_non_stop,
8525         always_non_stop_p, can_execute_reverse, supports_multi_process,
8526         supports_enable_disable_tracepoint,
8527         supports_disable_randomization, supports_string_tracing,
8528         supports_evaluation_of_breakpoint_conditions,
8529         can_run_breakpoint_commands, filesystem_is_local,
8530         can_download_tracepoint, get_trace_state_variable_value,
8531         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8532         record_is_replaying, record_will_replay,
8533         augmented_libraries_svr4_read>: Adjust to return bool.
8534         * aarch64-linux-nat.c: All implementations adjusted.
8535         * aix-thread.c: All implementations adjusted.
8536         * arm-linux-nat.c: All implementations adjusted.
8537         * breakpoint.c: All implementations adjusted.
8538         * bsd-kvm.c: All implementations adjusted.
8539         * bsd-uthread.c: All implementations adjusted.
8540         * corelow.c: All implementations adjusted.
8541         * ctf.c: All implementations adjusted.
8542         * darwin-nat.c: All implementations adjusted.
8543         * darwin-nat.h: All implementations adjusted.
8544         * exec.c: All implementations adjusted.
8545         * fbsd-nat.c: All implementations adjusted.
8546         * fbsd-nat.h: All implementations adjusted.
8547         * gnu-nat.c: All implementations adjusted.
8548         * gnu-nat.h: All implementations adjusted.
8549         * go32-nat.c: All implementations adjusted.
8550         * ia64-linux-nat.c: All implementations adjusted.
8551         * inf-child.c: All implementations adjusted.
8552         * inf-child.h: All implementations adjusted.
8553         * inf-ptrace.c: All implementations adjusted.
8554         * inf-ptrace.h: All implementations adjusted.
8555         * linux-nat.c: All implementations adjusted.
8556         * linux-nat.h: All implementations adjusted.
8557         * mips-linux-nat.c: All implementations adjusted.
8558         * nto-procfs.c: All implementations adjusted.
8559         * ppc-linux-nat.c: All implementations adjusted.
8560         * procfs.c: All implementations adjusted.
8561         * ravenscar-thread.c: All implementations adjusted.
8562         * record-btrace.c: All implementations adjusted.
8563         * record-full.c: All implementations adjusted.
8564         * remote-sim.c: All implementations adjusted.
8565         * remote.c: All implementations adjusted.
8566         * s390-linux-nat.c: All implementations adjusted.
8567         * sol-thread.c: All implementations adjusted.
8568         * spu-multiarch.c: All implementations adjusted.
8569         * target-delegates.c: All implementations adjusted.
8570         * target.c: All implementations adjusted.
8571         * target.h: All implementations adjusted.
8572         * tracefile-tfile.c: All implementations adjusted.
8573         * tracefile.c: All implementations adjusted.
8574         * tracefile.h: All implementations adjusted.
8575         * windows-nat.c: All implementations adjusted.
8576         * x86-linux-nat.h: All implementations adjusted.
8577         * x86-nat.h: All implementations adjusted.
8578
8579 2018-05-02  Pedro Alves  <palves@redhat.com>
8580
8581         * make-target-delegates (scan_target_h): Don't trim lines here.
8582         Replace sequences of tabs and/or whitespace with a single
8583         whitespace.
8584         (top level, parsing methods): Trim each line before processing it
8585         here.
8586
8587 2018-05-02  Pedro Alves  <palves@redhat.com>
8588             John Baldwin  <jhb@freebsd.org>
8589
8590         * target.h (enum strata) <debug_stratum>: New.
8591         (struct target_ops) <all delegation methods>: Replace by C++
8592         virtual methods, and drop "to_" prefix.  All references updated
8593         throughout.
8594         <to_shortname, to_longname, to_doc, to_data,
8595         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8596         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8597         virtual methods.  All references updated throughout.
8598         <can_attach, supports_terminal_ours, can_create_inferior,
8599         get_thread_control_capabilities, attach_no_wait>: New
8600         virtual methods.
8601         <insert_breakpoint, remove_breakpoint>: Now
8602         TARGET_DEFAULT_NORETURN methods.
8603         <info_proc>: Now returns bool.
8604         <to_magic>: Delete.
8605         (OPS_MAGIC): Delete.
8606         (current_target): Delete.  All references replaced by references
8607         to ...
8608         (target_stack): ... this.  New.
8609         (target_shortname, target_longname): Adjust.
8610         (target_can_run): Now a function declaration.
8611         (default_child_has_all_memory, default_child_has_memory)
8612         (default_child_has_stack, default_child_has_registers)
8613         (default_child_has_execution): Remove target_ops parameter.
8614         (complete_target_initialization): Delete.
8615         (memory_breakpoint_target): New template class.
8616         (test_target_ops): Refactor as a C++ class with virtual methods.
8617         * make-target-delegates (NAME_PART): Tighten.
8618         (POINTER_PART, CP_SYMBOL): New.
8619         (SIMPLE_RETURN_PART): Reimplement.
8620         (VEC_RETURN_PART): Expect less.
8621         (RETURN_PART, VIRTUAL_PART): New.
8622         (METHOD): Adjust to C++ virtual methods.
8623         (scan_target_h): Remove reference to C99.
8624         (dname): Output "target_ops::" prefix.
8625         (write_function_header): Adjust to output a C++ class method.
8626         (write_declaration): New.
8627         (write_delegator): Adjust to output a C++ class method.
8628         (tdname): Output "dummy_target::" prefix.
8629         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8630         method.
8631         (tdefault_names, debug_names): Delete.
8632         (return_types, tdefaults, styles, argtypes_array): New.
8633         (top level): All methods are delegators.
8634         (print_class): New.
8635         (top level): Print dummy_target and debug_target classes.
8636         * target-delegates.c: Regenerate.
8637         * target-debug.h (target_debug_print_enum_info_proc_what)
8638         (target_debug_print_thread_control_capabilities)
8639         (target_debug_print_thread_info_p): New.
8640         * target.c (dummy_target): Delete.
8641         (the_dummy_target, the_debug_target): New.
8642         (target_stack): Now extern.
8643         (set_targetdebug): Push/unpush debug target.
8644         (default_child_has_all_memory, default_child_has_memory)
8645         (default_child_has_stack, default_child_has_registers)
8646         (default_child_has_execution): Remove target_ops parameter.
8647         (complete_target_initialization): Delete.
8648         (add_target_with_completer): No longer call
8649         complete_target_initialization.
8650         (target_supports_terminal_ours): Use regular delegation.
8651         (update_current_target): Delete.
8652         (push_target): No longer check magic number.  Don't call
8653         update_current_target.
8654         (unpush_target): Don't call update_current_target.
8655         (target_is_pushed): No longer check magic number.
8656         (target_require_runnable): Skip for all stratums over
8657         process_stratum.
8658         (target_ops::info_proc): New.
8659         (target_info_proc): Use find_target_at and
8660         find_default_run_target.
8661         (target_supports_disable_randomization): Use regular delegation.
8662         (target_get_osdata): Use find_target_at.
8663         (target_ops::open, target_ops::close, target_ops::can_attach)
8664         (target_ops::attach, target_ops::can_create_inferior)
8665         (target_ops::create_inferior, target_ops::can_run)
8666         (target_can_run): New.
8667         (default_fileio_target): Use regular delegation.
8668         (target_ops::fileio_open, target_ops::fileio_pwrite)
8669         (target_ops::fileio_pread, target_ops::fileio_fstat)
8670         (target_ops::fileio_close, target_ops::fileio_unlink)
8671         (target_ops::fileio_readlink): New.
8672         (target_fileio_open_1, target_fileio_unlink)
8673         (target_fileio_readlink): Always call the target method.  Handle
8674         FILEIO_ENOSYS.
8675         (return_zero, return_zero_has_execution): Delete.
8676         (init_dummy_target): Delete.
8677         (dummy_target::dummy_target, dummy_target::shortname)
8678         (dummy_target::longname, dummy_target::doc)
8679         (debug_target::debug_target, debug_target::shortname)
8680         (debug_target::longname, debug_target::doc): New.
8681         (target_supports_delete_record): Use regular delegation.
8682         (setup_target_debug): Delete.
8683         (maintenance_print_target_stack): Skip debug_stratum.
8684         (initialize_targets): Instantiate the_dummy_target and
8685         the_debug_target.
8686         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8687         use target_stack.
8688         (target_auxv_search, fprint_target_auxv): Adjust.
8689         (info_auxv_command): Adjust to use target_stack.
8690         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8691         * exceptions.c (print_flush): Handle a NULL target_stack.
8692         * regcache.c (target_ops_no_register): Refactor as class with
8693         virtual methods.
8694
8695         * exec.c (exec_target): New class.
8696         (exec_ops): Now an exec_target.
8697         (exec_open, exec_close_1, exec_get_section_table)
8698         (exec_xfer_partial, exec_files_info, exec_has_memory)
8699         (exec_make_note_section): Refactor as exec_target methods.
8700         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8701         Delete.
8702         (exec_target::find_memory_regions): New.
8703         (_initialize_exec): Don't call init_exec_ops.
8704         * gdbcore.h (exec_file_clear): Delete.
8705
8706         * corefile.c (core_target): Delete.
8707         (core_file_command): Adjust.
8708         * corelow.c (core_target): New class.
8709         (the_core_target): New.
8710         (core_close): Remove target_ops parameter.
8711         (core_close_cleanup): Adjust.
8712         (core_target::close): New.
8713         (core_open, core_detach, get_core_registers, core_files_info)
8714         (core_xfer_partial, core_thread_alive, core_read_description)
8715         (core_pid_to_str, core_thread_name, core_has_memory)
8716         (core_has_stack, core_has_registers, core_info_proc): Rework as
8717         core_target methods.
8718         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8719         (_initialize_corelow): Initialize the_core_target.
8720         * gdbcore.h (core_target): Delete.
8721         (the_core_target): New.
8722
8723         * ctf.c: (ctf_target): New class.
8724         (ctf_ops): Now a ctf_target.
8725         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8726         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8727         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8728         methods.
8729         (init_ctf_ops): Delete.
8730         (_initialize_ctf): Don't call it.
8731         * tracefile-tfile.c (tfile_target): New class.
8732         (tfile_ops): Now a tfile_target.
8733         (tfile_open, tfile_close, tfile_files_info)
8734         (tfile_get_tracepoint_status, tfile_trace_find)
8735         (tfile_fetch_registers, tfile_xfer_partial)
8736         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8737         Refactor as tfile_target methods.
8738         (tfile_xfer_partial_features): Remove target_ops parameter.
8739         (init_tfile_ops): Delete.
8740         (_initialize_tracefile_tfile): Don't call it.
8741         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8742         (tracefile_has_stack, tracefile_has_registers)
8743         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8744         tracefile_target methods.
8745         (init_tracefile_ops): Delete.
8746         (tracefile_target::tracefile_target): New.
8747         * tracefile.h: Include "target.h".
8748         (tracefile_target): New class.
8749         (init_tracefile_ops): Delete.
8750
8751         * spu-multiarch.c (spu_multiarch_target): New class.
8752         (spu_ops): Now a spu_multiarch_target.
8753         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8754         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8755         (spu_search_memory, spu_mourn_inferior): Refactor as
8756         spu_multiarch_target methods.
8757         (init_spu_ops): Delete.
8758         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8759         complete_target_initialization.
8760
8761         * ravenscar-thread.c (ravenscar_thread_target): New class.
8762         (ravenscar_ops): Now a ravenscar_thread_target.
8763         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8764         (ravenscar_thread_alive, ravenscar_pid_to_str)
8765         (ravenscar_fetch_registers, ravenscar_store_registers)
8766         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8767         (ravenscar_stopped_by_hw_breakpoint)
8768         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8769         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8770         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8771         methods.
8772         (init_ravenscar_thread_ops): Delete.
8773         (_initialize_ravenscar): Remove references to
8774         init_ravenscar_thread_ops and complete_target_initialization.
8775
8776         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8777         (bsd_uthread_target): New class.
8778         (bsd_uthread_ops): Now a bsd_uthread_target.
8779         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8780         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8781         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8782         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8783         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8784         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8785         (bsd_uthread_target): Delete function.
8786         (_initialize_bsd_uthread): Remove reference to
8787         complete_target_initialization.
8788
8789         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8790         (target_bfd): ... this new class.
8791         (target_bfd_xfer_partial, target_bfd_get_section_table)
8792         (target_bfd_close): Refactor as target_bfd methods.
8793         (target_bfd::~target_bfd): New.
8794         (target_bfd_reopen): Adjust.
8795         (target_bfd::close): New.
8796
8797         * record-btrace.c (record_btrace_target): New class.
8798         (record_btrace_ops): Now a record_btrace_target.
8799         (record_btrace_open, record_btrace_stop_recording)
8800         (record_btrace_disconnect, record_btrace_close)
8801         (record_btrace_async, record_btrace_info)
8802         (record_btrace_insn_history, record_btrace_insn_history_range)
8803         (record_btrace_insn_history_from, record_btrace_call_history)
8804         (record_btrace_call_history_range)
8805         (record_btrace_call_history_from, record_btrace_record_method)
8806         (record_btrace_is_replaying, record_btrace_will_replay)
8807         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8808         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8809         (record_btrace_store_registers, record_btrace_prepare_to_store)
8810         (record_btrace_to_get_unwinder)
8811         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8812         (record_btrace_commit_resume, record_btrace_wait)
8813         (record_btrace_stop, record_btrace_can_execute_reverse)
8814         (record_btrace_stopped_by_sw_breakpoint)
8815         (record_btrace_supports_stopped_by_sw_breakpoint)
8816         (record_btrace_stopped_by_hw_breakpoint)
8817         (record_btrace_supports_stopped_by_hw_breakpoint)
8818         (record_btrace_update_thread_list, record_btrace_thread_alive)
8819         (record_btrace_goto_begin, record_btrace_goto_end)
8820         (record_btrace_goto, record_btrace_stop_replaying_all)
8821         (record_btrace_execution_direction)
8822         (record_btrace_prepare_to_generate_core)
8823         (record_btrace_done_generating_core): Refactor as
8824         record_btrace_target methods.
8825         (init_record_btrace_ops): Delete.
8826         (_initialize_record_btrace): Remove reference to
8827         init_record_btrace_ops.
8828         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8829         the execution_direction global.
8830         (record_full_base_target, record_full_target)
8831         (record_full_core_target): New classes.
8832         (record_full_ops): Now a record_full_target.
8833         (record_full_core_ops): Now a record_full_core_target.
8834         (record_full_target::detach, record_full_target::disconnect)
8835         (record_full_core_target::disconnect)
8836         (record_full_target::mourn_inferior, record_full_target::kill):
8837         New.
8838         (record_full_open, record_full_close, record_full_async): Refactor
8839         as methods of the record_full_base_target class.
8840         (record_full_resume, record_full_commit_resume): Refactor
8841         as methods of the record_full_target class.
8842         (record_full_wait, record_full_stopped_by_watchpoint)
8843         (record_full_stopped_data_address)
8844         (record_full_stopped_by_sw_breakpoint)
8845         (record_full_supports_stopped_by_sw_breakpoint)
8846         (record_full_stopped_by_hw_breakpoint)
8847         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8848         methods of the record_full_base_target class.
8849         (record_full_store_registers, record_full_xfer_partial)
8850         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8851         Refactor as methods of the record_full_target class.
8852         (record_full_can_execute_reverse, record_full_get_bookmark)
8853         (record_full_goto_bookmark, record_full_execution_direction)
8854         (record_full_record_method, record_full_info, record_full_delete)
8855         (record_full_is_replaying, record_full_will_replay)
8856         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8857         (record_full_stop_replaying): Refactor as methods of the
8858         record_full_base_target class.
8859         (record_full_core_resume, record_full_core_kill)
8860         (record_full_core_fetch_registers)
8861         (record_full_core_prepare_to_store)
8862         (record_full_core_store_registers, record_full_core_xfer_partial)
8863         (record_full_core_insert_breakpoint)
8864         (record_full_core_remove_breakpoint)
8865         (record_full_core_has_execution): Refactor
8866         as methods of the record_full_core_target class.
8867         (record_full_base_target::supports_delete_record): New.
8868         (init_record_full_ops): Delete.
8869         (init_record_full_core_ops): Delete.
8870         (record_full_save): Refactor as method of the
8871         record_full_base_target class.
8872         (_initialize_record_full): Remove references to
8873         init_record_full_ops and init_record_full_core_ops.
8874
8875         * remote.c (remote_target, extended_remote_target): New classes.
8876         (remote_ops): Now a remote_target.
8877         (extended_remote_ops): Now an extended_remote_target.
8878         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8879         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8880         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8881         (remote_pass_signals, remote_set_syscall_catchpoint)
8882         (remote_program_signals, )
8883         (remote_thread_always_alive): Remove target_ops parameter.
8884         (remote_thread_alive, remote_thread_name)
8885         (remote_update_thread_list, remote_threads_extra_info)
8886         (remote_static_tracepoint_marker_at)
8887         (remote_static_tracepoint_markers_by_strid)
8888         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8889         (remote_open): Refactor as methods of remote_target.
8890         (extended_remote_open, extended_remote_detach)
8891         (extended_remote_attach, extended_remote_post_attach):
8892         (extended_remote_supports_disable_randomization)
8893         (extended_remote_create_inferior): : Refactor as method of
8894         extended_remote_target.
8895         (remote_set_permissions, remote_open_1, remote_detach)
8896         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8897         (remote_resume, remote_commit_resume, remote_stop)
8898         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8899         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8900         (remote_prepare_to_store, remote_store_registers)
8901         (remote_flash_erase, remote_flash_done, remote_files_info)
8902         (remote_kill, remote_mourn, remote_insert_breakpoint)
8903         (remote_remove_breakpoint, remote_insert_watchpoint)
8904         (remote_watchpoint_addr_within_range)
8905         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8906         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8907         (remote_supports_stopped_by_sw_breakpoint)
8908         (remote_stopped_by_hw_breakpoint)
8909         (remote_supports_stopped_by_hw_breakpoint)
8910         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8911         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8912         (remote_verify_memory): Refactor as methods of remote_target.
8913         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8914         parameter.
8915         (remote_xfer_partial, remote_get_memory_xfer_limit)
8916         (remote_search_memory, remote_rcmd, remote_memory_map)
8917         (remote_pid_to_str, remote_get_thread_local_address)
8918         (remote_get_tib_address, remote_read_description): Refactor as
8919         methods of remote_target.
8920         (remote_target::fileio_open, remote_target::fileio_pwrite)
8921         (remote_target::fileio_pread, remote_target::fileio_close): New.
8922         (remote_hostio_readlink, remote_hostio_fstat)
8923         (remote_filesystem_is_local, remote_can_execute_reverse)
8924         (remote_supports_non_stop, remote_supports_disable_randomization)
8925         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8926         (remote_supports_enable_disable_tracepoint)
8927         (remote_supports_string_tracing)
8928         (remote_can_run_breakpoint_commands, remote_trace_init)
8929         (remote_download_tracepoint, remote_can_download_tracepoint)
8930         (remote_download_trace_state_variable, remote_enable_tracepoint)
8931         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8932         (remote_trace_start, remote_get_trace_status)
8933         (remote_get_tracepoint_status, remote_trace_stop)
8934         (remote_trace_find, remote_get_trace_state_variable_value)
8935         (remote_save_trace_data, remote_get_raw_trace_data)
8936         (remote_set_disconnected_tracing, remote_core_of_thread)
8937         (remote_set_circular_trace_buffer, remote_traceframe_info)
8938         (remote_get_min_fast_tracepoint_insn_len)
8939         (remote_set_trace_buffer_size, remote_set_trace_notes)
8940         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8941         (remote_disable_btrace, remote_teardown_btrace)
8942         (remote_read_btrace, remote_btrace_conf)
8943         (remote_augmented_libraries_svr4_read, remote_load)
8944         (remote_pid_to_exec_file, remote_can_do_single_step)
8945         (remote_execution_direction, remote_thread_handle_to_thread_info):
8946         Refactor as methods of remote_target.
8947         (init_remote_ops, init_extended_remote_ops): Delete.
8948         (remote_can_async_p, remote_is_async_p, remote_async)
8949         (remote_thread_events, remote_upload_tracepoints)
8950         (remote_upload_trace_state_variables): Refactor as methods of
8951         remote_target.
8952         (_initialize_remote): Remove references to init_remote_ops and
8953         init_extended_remote_ops.
8954
8955         * remote-sim.c (gdbsim_target): New class.
8956         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8957         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8958         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8959         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8960         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8961         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8962         Refactor as methods of gdbsim_target.
8963         (gdbsim_ops): Now a gdbsim_target.
8964         (init_gdbsim_ops): Delete.
8965         (gdbsim_cntrl_c): Adjust.
8966         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8967
8968         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8969         (the_amd64_linux_nat_target): New.
8970         (amd64_linux_fetch_inferior_registers)
8971         (amd64_linux_store_inferior_registers): Refactor as methods of
8972         amd64_linux_nat_target.
8973         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8974         * i386-linux-nat.c: Don't include "linux-nat.h".
8975         (i386_linux_nat_target): New class.
8976         (the_i386_linux_nat_target): New.
8977         (i386_linux_fetch_inferior_registers)
8978         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8979         as methods of i386_linux_nat_target.
8980         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8981         * inf-child.c (inf_child_ops): Delete.
8982         (inf_child_fetch_inferior_registers)
8983         (inf_child_store_inferior_registers): Delete.
8984         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8985         methods of inf_child_target.
8986         (inf_child_target::supports_terminal_ours)
8987         (inf_child_target::terminal_init)
8988         (inf_child_target::terminal_inferior)
8989         (inf_child_target::terminal_ours_for_output)
8990         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8991         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8992         New.
8993         (inf_child_open, inf_child_disconnect, inf_child_close)
8994         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8995         (inf_child_post_startup_inferior, inf_child_can_run)
8996         (inf_child_pid_to_exec_file): Refactor as methods of
8997         inf_child_target.
8998         (inf_child_follow_fork): Delete.
8999         (inf_child_target::can_create_inferior)
9000         (inf_child_target::can_attach): New.
9001         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9002         (inf_child_target::has_stack, inf_child_target::has_registers)
9003         (inf_child_target::has_execution): New.
9004         (inf_child_fileio_open, inf_child_fileio_pwrite)
9005         (inf_child_fileio_pread, inf_child_fileio_fstat)
9006         (inf_child_fileio_close, inf_child_fileio_unlink)
9007         (inf_child_fileio_readlink, inf_child_use_agent)
9008         (inf_child_can_use_agent): Refactor as methods of
9009         inf_child_target.
9010         (return_zero, inf_child_target): Delete.
9011         (inf_child_target::inf_child_target): New.
9012         * inf-child.h: Include "target.h".
9013         (inf_child_target): Delete function prototype.
9014         (inf_child_target): New class.
9015         (inf_child_open_target, inf_child_mourn_inferior)
9016         (inf_child_maybe_unpush_target): Delete.
9017         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9018         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9019         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9020         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9021         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9022         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9023         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9024         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9025         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9026         methods of inf_ptrace_target.
9027         (inf_ptrace_target): Delete function.
9028         * inf-ptrace.h: Include "inf-child.h".
9029         (inf_ptrace_target): Delete function declaration.
9030         (inf_ptrace_target): New class.
9031         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9032         * linux-nat.c (linux_target): New.
9033         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9034         (linux_nat_target::~linux_nat_target): New.
9035         (linux_child_post_attach, linux_child_post_startup_inferior)
9036         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9037         (linux_child_remove_fork_catchpoint)
9038         (linux_child_insert_vfork_catchpoint)
9039         (linux_child_remove_vfork_catchpoint)
9040         (linux_child_insert_exec_catchpoint)
9041         (linux_child_remove_exec_catchpoint)
9042         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9043         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9044         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9045         (linux_nat_stopped_data_address)
9046         (linux_nat_stopped_by_sw_breakpoint)
9047         (linux_nat_supports_stopped_by_sw_breakpoint)
9048         (linux_nat_stopped_by_hw_breakpoint)
9049         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9050         (linux_nat_kill, linux_nat_mourn_inferior)
9051         (linux_nat_xfer_partial, linux_nat_thread_alive)
9052         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9053         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9054         (linux_child_static_tracepoint_markers_by_strid)
9055         (linux_nat_is_async_p, linux_nat_can_async_p)
9056         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9057         (linux_nat_supports_multi_process)
9058         (linux_nat_supports_disable_randomization, linux_nat_async)
9059         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9060         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9061         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9062         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9063         methods of linux_nat_target.
9064         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9065         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9066         parameter.
9067         (check_stopped_by_watchpoint): Adjust.
9068         (linux_xfer_partial): Delete.
9069         (linux_target_install_ops, linux_target, linux_nat_add_target):
9070         Delete.
9071         (linux_nat_target::linux_nat_target): New.
9072         * linux-nat.h: Include "inf-ptrace.h".
9073         (linux_nat_target): New.
9074         (linux_target, linux_target_install_ops, linux_nat_add_target):
9075         Delete function declarations.
9076         (linux_target): Declare global.
9077         * linux-thread-db.c (thread_db_target): New.
9078         (thread_db_target::thread_db_target): New.
9079         (thread_db_ops): Delete.
9080         (the_thread_db_target): New.
9081         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9082         (thread_db_update_thread_list, thread_db_pid_to_str)
9083         (thread_db_extra_thread_info)
9084         (thread_db_thread_handle_to_thread_info)
9085         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9086         (thread_db_resume): Refactor as methods of thread_db_target.
9087         (init_thread_db_ops): Delete.
9088         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9089         * x86-linux-nat.c: Don't include "linux-nat.h".
9090         (super_post_startup_inferior): Delete.
9091         (x86_linux_nat_target::~x86_linux_nat_target): New.
9092         (x86_linux_child_post_startup_inferior)
9093         (x86_linux_read_description, x86_linux_enable_btrace)
9094         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9095         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9096         methods of x86_linux_nat_target.
9097         (x86_linux_create_target): Delete.  Bits folded ...
9098         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9099         pointer.
9100         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9101         (x86_linux_nat_target): New class.
9102         (x86_linux_create_target): Delete.
9103         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9104         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9105         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9106         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9107         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9108         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9109         make extern.
9110         (x86_use_watchpoints): Delete.
9111         * x86-nat.h: Include "breakpoint.h" and "target.h".
9112         (x86_use_watchpoints): Delete.
9113         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9114         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9115         (x86_insert_watchpoint, x86_remove_watchpoint)
9116         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9117         (x86_stopped_by_hw_breakpoint): New declarations.
9118         (x86_nat_target): New template class.
9119
9120         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9121         (the_ppc_linux_nat_target): New.
9122         (ppc_linux_fetch_inferior_registers)
9123         (ppc_linux_can_use_hw_breakpoint)
9124         (ppc_linux_region_ok_for_hw_watchpoint)
9125         (ppc_linux_ranged_break_num_registers)
9126         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9127         (ppc_linux_insert_mask_watchpoint)
9128         (ppc_linux_remove_mask_watchpoint)
9129         (ppc_linux_can_accel_watchpoint_condition)
9130         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9131         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9132         (ppc_linux_watchpoint_addr_within_range)
9133         (ppc_linux_masked_watch_num_registers)
9134         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9135         (ppc_linux_read_description): Refactor as methods of
9136         ppc_linux_nat_target.
9137         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9138
9139         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9140         (procfs_target): New class.
9141         (the_procfs_target): New.
9142         (procfs_target): Delete function.
9143         (procfs_auxv_parse, procfs_attach, procfs_detach)
9144         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9145         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9146         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9147         (procfs_create_inferior, procfs_update_thread_list)
9148         (procfs_thread_alive, procfs_pid_to_str)
9149         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9150         (procfs_stopped_data_address, procfs_insert_watchpoint)
9151         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9152         (proc_find_memory_regions, procfs_info_proc)
9153         (procfs_make_note_section): Refactor as methods of procfs_target.
9154         (_initialize_procfs): Adjust.
9155         * sol-thread.c (sol_thread_target): New class.
9156         (sol_thread_ops): Now a sol_thread_target.
9157         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9158         (sol_thread_fetch_registers, sol_thread_store_registers)
9159         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9160         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9161         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9162         (init_sol_thread_ops): Delete.
9163         (_initialize_sol_thread): Adjust.  Remove references to
9164         init_sol_thread_ops and complete_target_initialization.
9165
9166         * windows-nat.c (windows_nat_target): New class.
9167         (windows_fetch_inferior_registers)
9168         (windows_store_inferior_registers, windows_resume, windows_wait)
9169         (windows_attach, windows_detach, windows_pid_to_exec_file)
9170         (windows_files_info, windows_create_inferior)
9171         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9172         (windows_close, windows_pid_to_str, windows_xfer_partial)
9173         (windows_get_tib_address, windows_get_ada_task_ptid)
9174         (windows_thread_name, windows_thread_alive): Refactor as
9175         windows_nat_target methods.
9176         (do_initial_windows_stuff): Adjust.
9177         (windows_target): Delete function.
9178         (_initialize_windows_nat): Adjust.
9179
9180         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9181         (darwin_mourn_inferior, darwin_kill_inferior)
9182         (darwin_create_inferior, darwin_attach, darwin_detach)
9183         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9184         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9185         (darwin_supports_multi_process): Refactor as darwin_nat_target
9186         methods.
9187         (darwin_resume_to, darwin_files_info): Delete.
9188         (_initialize_darwin_inferior): Rename to ...
9189         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9190         * darwin-nat.h: Include "inf-child.h".
9191         (darwin_nat_target): New class.
9192         (darwin_complete_target): Delete.
9193         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9194         (darwin_target): New.
9195         (i386_darwin_fetch_inferior_registers)
9196         (i386_darwin_store_inferior_registers): Refactor as methods of
9197         darwin_nat_target.
9198         (darwin_complete_target): Delete, with ...
9199         (_initialize_i386_darwin_nat): ... bits factored out here.
9200
9201         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9202         (the_alpha_linux_nat_target): New.
9203         (alpha_linux_register_u_offset): Refactor as
9204         alpha_linux_nat_target method.
9205         (_initialize_alpha_linux_nat): Adjust.
9206         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9207         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9208         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9209         methods of linux_nat_trad_target.
9210         (linux_trad_target): Delete.
9211         * linux-nat-trad.h (linux_trad_target): Delete function.
9212         (linux_nat_trad_target): New class.
9213         * mips-linux-nat.c (mips_linux_nat_target): New class.
9214         (super_fetch_registers, super_store_registers, super_close):
9215         Delete.
9216         (the_mips_linux_nat_target): New.
9217         (mips64_linux_regsets_fetch_registers)
9218         (mips64_linux_regsets_store_registers)
9219         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9220         (mips_linux_register_u_offset, mips_linux_read_description)
9221         (mips_linux_can_use_hw_breakpoint)
9222         (mips_linux_stopped_by_watchpoint)
9223         (mips_linux_stopped_data_address)
9224         (mips_linux_region_ok_for_hw_watchpoint)
9225         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9226         (mips_linux_close): Refactor as methods of mips_linux_nat.
9227         (_initialize_mips_linux_nat): Adjust to C++ification.
9228
9229         * aix-thread.c (aix_thread_target): New class.
9230         (aix_thread_ops): Now an aix_thread_target.
9231         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9232         (aix_thread_fetch_registers, aix_thread_store_registers)
9233         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9234         (aix_thread_thread_alive, aix_thread_pid_to_str)
9235         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9236         Refactor as methods of aix_thread_target.
9237         (init_aix_thread_ops): Delete.
9238         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9239         and complete_target_initialization.
9240         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9241         (rs6000_nat_target): New class.
9242         (the_rs6000_nat_target): New.
9243         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9244         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9245         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9246         (super_create_inferior): Delete.
9247         (_initialize_rs6000_nat): Adjust to C++ification.
9248
9249         * arm-linux-nat.c (arm_linux_nat_target): New class.
9250         (the_arm_linux_nat_target): New.
9251         (arm_linux_fetch_inferior_registers)
9252         (arm_linux_store_inferior_registers, arm_linux_read_description)
9253         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9254         (arm_linux_remove_hw_breakpoint)
9255         (arm_linux_region_ok_for_hw_watchpoint)
9256         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9257         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9258         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9259         arm_linux_nat_target.
9260         (_initialize_arm_linux_nat): Adjust to C++ification.
9261
9262         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9263         (the_aarch64_linux_nat_target): New.
9264         (aarch64_linux_fetch_inferior_registers)
9265         (aarch64_linux_store_inferior_registers)
9266         (aarch64_linux_child_post_startup_inferior)
9267         (aarch64_linux_read_description)
9268         (aarch64_linux_can_use_hw_breakpoint)
9269         (aarch64_linux_insert_hw_breakpoint)
9270         (aarch64_linux_remove_hw_breakpoint)
9271         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9272         (aarch64_linux_region_ok_for_hw_watchpoint)
9273         (aarch64_linux_stopped_data_address)
9274         (aarch64_linux_stopped_by_watchpoint)
9275         (aarch64_linux_watchpoint_addr_within_range)
9276         (aarch64_linux_can_do_single_step): Refactor as methods of
9277         aarch64_linux_nat_target.
9278         (super_post_startup_inferior): Delete.
9279         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9280
9281         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9282         (the_hppa_linux_nat_target): New.
9283         (hppa_linux_fetch_inferior_registers)
9284         (hppa_linux_store_inferior_registers): Refactor as methods of
9285         hppa_linux_nat_target.
9286         (_initialize_hppa_linux_nat): Adjust to C++ification.
9287
9288         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9289         (the_ia64_linux_nat_target): New.
9290         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9291         (ia64_linux_stopped_data_address)
9292         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9293         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9294         ia64_linux_nat_target methods.
9295         (super_xfer_partial): Delete.
9296         (_initialize_ia64_linux_nat): Adjust to C++ification.
9297
9298         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9299         (the_m32r_linux_nat_target): New.
9300         (m32r_linux_fetch_inferior_registers)
9301         (m32r_linux_store_inferior_registers): Refactor as
9302         m32r_linux_nat_target methods.
9303         (_initialize_m32r_linux_nat): Adjust to C++ification.
9304
9305         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9306         (the_m68k_linux_nat_target): New.
9307         (m68k_linux_fetch_inferior_registers)
9308         (m68k_linux_store_inferior_registers): Refactor as
9309         m68k_linux_nat_target methods.
9310         (_initialize_m68k_linux_nat): Adjust to C++ification.
9311
9312         * s390-linux-nat.c (s390_linux_nat_target): New class.
9313         (the_s390_linux_nat_target): New.
9314         (s390_linux_fetch_inferior_registers)
9315         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9316         (s390_insert_watchpoint, s390_remove_watchpoint)
9317         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9318         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9319         (s390_auxv_parse, s390_read_description): Refactor as methods of
9320         s390_linux_nat_target.
9321         (_initialize_s390_nat): Adjust to C++ification.
9322
9323         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9324         (the_sparc_linux_nat_target): New.
9325         (_initialize_sparc_linux_nat): Adjust to C++ification.
9326         * sparc-nat.c (sparc_fetch_inferior_registers)
9327         (sparc_store_inferior_registers): Remove target_ops parameter.
9328         * sparc-nat.h (sparc_fetch_inferior_registers)
9329         (sparc_store_inferior_registers): Remove target_ops parameter.
9330         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9331         (the_sparc64_linux_nat_target): New.
9332         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9333
9334         * spu-linux-nat.c (spu_linux_nat_target): New class.
9335         (the_spu_linux_nat_target): New.
9336         (spu_child_post_startup_inferior, spu_child_post_attach)
9337         (spu_child_wait, spu_fetch_inferior_registers)
9338         (spu_store_inferior_registers, spu_xfer_partial)
9339         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9340         methods.
9341         (_initialize_spu_nat): Adjust to C++ification.
9342
9343         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9344         (the_tilegx_linux_nat_target): New.
9345         (fetch_inferior_registers, store_inferior_registers):
9346         Refactor as methods.
9347         (_initialize_tile_linux_nat): Adjust to C++ification.
9348
9349         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9350         (the_xtensa_linux_nat_target): New.
9351         (xtensa_linux_fetch_inferior_registers)
9352         (xtensa_linux_store_inferior_registers): Refactor as
9353         xtensa_linux_nat_target methods.
9354         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9355
9356         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9357         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9358         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9359         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9360         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9361         (fbsd_stopped_by_sw_breakpoint)
9362         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9363         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9364         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9365         (fbsd_post_startup_inferior, fbsd_post_attach)
9366         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9367         (fbsd_set_syscall_catchpoint)
9368         (super_xfer_partial, super_resume, super_wait)
9369         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9370         (fbsd_handle_debug_trap): Remove target_ops parameter.
9371         (fbsd_nat_add_target): Delete.
9372         * fbsd-nat.h: Include "inf-ptrace.h".
9373         (fbsd_nat_add_target): Delete.
9374         (USE_SIGTRAP_SIGINFO): Define.
9375         (fbsd_nat_target): New class.
9376
9377         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9378         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9379         (amd64bsd_target): Delete.
9380         * amd64-bsd-nat.h: New file.
9381         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9382         "x86-bsd-nat.h".
9383         (amd64_fbsd_nat_target): New class.
9384         (the_amd64_fbsd_nat_target): New.
9385         (amd64fbsd_read_description): Refactor as method of
9386         amd64_fbsd_nat_target.
9387         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9388         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9389         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9390         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9391         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9392         (i386bsd_target): Delete.
9393         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9394         (i386bsd_fetch_inferior_registers)
9395         (i386bsd_store_inferior_registers): Declare.
9396         (i386_bsd_nat_target): New class.
9397         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9398         (the_i386_fbsd_nat_target): New.
9399         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9400         i386_fbsd_nat_target methods.
9401         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9402         (_initialize_i386fbsd_nat): Adjust to C++ification.
9403         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9404         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9405         (_initialize_x86_bsd_nat): Adjust to C++ification.
9406         * x86-bsd-nat.h: Include "x86-nat.h".
9407         (x86bsd_target): Delete declaration.
9408         (x86bsd_nat_target): New class.
9409
9410         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9411         (the_aarch64_fbsd_nat_target): New.
9412         (aarch64_fbsd_fetch_inferior_registers)
9413         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9414         aarch64_fbsd_nat_target.
9415         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9416         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9417         (the_alpha_bsd_nat_target): New.
9418         (alphabsd_fetch_inferior_registers)
9419         (alphabsd_store_inferior_registers): Refactor as
9420         alpha_bsd_nat_target methods.
9421         (_initialize_alphabsd_nat): Refactor as methods of
9422         alpha_bsd_nat_target.
9423         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9424         (the_amd64_nbsd_nat_target): New.
9425         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9426         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9427         (the_amd64_obsd_nat_target): New.
9428         (_initialize_amd64obsd_nat): Adjust to C++ification.
9429         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9430         (the_arm_fbsd_nat_target): New.
9431         (arm_fbsd_fetch_inferior_registers)
9432         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9433         (_initialize_arm_fbsd_nat): Refactor as methods of
9434         arm_fbsd_nat_target.
9435         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9436         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9437         (the_arm_netbsd_nat_target): New.
9438         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9439         arm_netbsd_nat_target.
9440         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9441         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9442         (the_hppa_nbsd_nat_target): New.
9443         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9444         hppa_nbsd_nat_target methods.
9445         (_initialize_hppanbsd_nat): Adjust to C++ification.
9446         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9447         (the_hppa_obsd_nat_target): New.
9448         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9449         methods of hppa_obsd_nat_target.
9450         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9451         add_target.
9452         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9453         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9454         add_target.
9455         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9456         (_initialize_i386obsd_nat): Use add_target.
9457         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9458         (the_m68k_bsd_nat_target): New.
9459         (m68kbsd_fetch_inferior_registers)
9460         (m68kbsd_store_inferior_registers): Refactor as methods of
9461         m68k_bsd_nat_target.
9462         (_initialize_m68kbsd_nat): Adjust to C++ification.
9463         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9464         (the_mips_fbsd_nat_target): New.
9465         (mips_fbsd_fetch_inferior_registers)
9466         (mips_fbsd_store_inferior_registers): Refactor as methods of
9467         mips_fbsd_nat_target.
9468         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9469         add_target.
9470         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9471         (the_mips_nbsd_nat_target): New.
9472         (mipsnbsd_fetch_inferior_registers)
9473         (mipsnbsd_store_inferior_registers): Refactor as methods of
9474         mips_nbsd_nat_target.
9475         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9476         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9477         (the_mips64_obsd_nat_target): New.
9478         (mips64obsd_fetch_inferior_registers)
9479         (mips64obsd_store_inferior_registers): Refactor as methods of
9480         mips64_obsd_nat_target.
9481         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9482         add_target.
9483         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9484         nbsd_nat_target.
9485         * nbsd-nat.h: Include "inf-ptrace.h".
9486         (nbsd_nat_target): New class.
9487         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9488         (obsd_wait): Refactor as methods of obsd_nat_target.
9489         (obsd_add_target): Delete.
9490         * obsd-nat.h: Include "inf-ptrace.h".
9491         (obsd_nat_target): New class.
9492         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9493         (the_ppc_fbsd_nat_target): New.
9494         (ppcfbsd_fetch_inferior_registers)
9495         (ppcfbsd_store_inferior_registers): Refactor as methods of
9496         ppc_fbsd_nat_target.
9497         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9498         add_target.
9499         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9500         (the_ppc_nbsd_nat_target): New.
9501         (ppcnbsd_fetch_inferior_registers)
9502         (ppcnbsd_store_inferior_registers): Refactor as methods of
9503         ppc_nbsd_nat_target.
9504         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9505         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9506         (the_ppc_obsd_nat_target): New.
9507         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9508         methods of ppc_obsd_nat_target.
9509         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9510         add_target.
9511         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9512         (the_sh_nbsd_nat_target): New.
9513         (shnbsd_fetch_inferior_registers)
9514         (shnbsd_store_inferior_registers): Refactor as methods of
9515         sh_nbsd_nat_target.
9516         (_initialize_shnbsd_nat): Adjust to C++ification.
9517         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9518         (inf_ptrace_xfer_partial): Delete.
9519         (sparc_xfer_partial, sparc_target): Delete.
9520         * sparc-nat.h (sparc_fetch_inferior_registers)
9521         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9522         (sparc_target): Delete function declaration.
9523         (sparc_target): New template class.
9524         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9525         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9526         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9527         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9528         add_target.
9529         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9530         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9531         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9532         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9533         add_target.
9534         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9535         (the_vax_bsd_nat_target): New.
9536         (vaxbsd_fetch_inferior_registers)
9537         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9538         methods.
9539         (_initialize_vaxbsd_nat): Adjust to C++ification.
9540
9541         * bsd-kvm.c (bsd_kvm_target): New class.
9542         (bsd_kvm_ops): Now a bsd_kvm_target.
9543         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9544         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9545         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9546         bsd_kvm_target.
9547         (bsd_kvm_return_one): Delete.
9548         (bsd_kvm_add_target): Adjust to C++ification.
9549
9550         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9551         (nto_procfs_target_procfs): New classes.
9552         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9553         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9554         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9555         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9556         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9557         (procfs_remove_hw_breakpoint, procfs_resume)
9558         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9559         (procfs_kill_inferior, procfs_store_registers)
9560         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9561         as methods of nto_procfs_target.
9562         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9563         (nto_native_ops): Delete.
9564         (procfs_open, procfs_native_open): Delete.
9565         (nto_native_ops): Now an nto_procfs_target_native.
9566         (init_procfs_targets): Adjust to C++ification.
9567         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9568         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9569         Refactor as methods of nto_procfs_target.
9570
9571         * go32-nat.c (go32_nat_target): New class.
9572         (the_go32_nat_target): New.
9573         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9574         (go32_store_registers, go32_xfer_partial, go32_files_info)
9575         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9576         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9577         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9578         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9579         (go32_target): Delete.
9580         (_initialize_go32_nat): Adjust to C++ification.
9581
9582         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9583         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9584         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9585         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9586         gnu_nat_target.
9587         (gnu_target): Delete.
9588         * gnu-nat.h (gnu_target): Delete.
9589         (gnu_nat_target): New class.
9590         * i386-gnu-nat.c (gnu_base_target): New.
9591         (i386_gnu_nat_target): New class.
9592         (the_i386_gnu_nat_target): New.
9593         (_initialize_i386gnu_nat): Adjust to C++ification.
9594
9595 2018-05-02  Pedro Alves  <palves@redhat.com>
9596
9597         * bfd-target.c (target_bfd_xclose): Rename to ...
9598         (target_bfd_close): ... this.
9599         (target_bfd_reopen): Adjust.
9600         * target.c (target_close): Remove references to to_xclose.
9601         * target.h (target_ops::to_xclose): Delete.
9602         (target_ops::to_close): Update comments.
9603
9604 2018-05-02  Pedro Alves  <palves@redhat.com>
9605
9606         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9607         "linux-nat.h".
9608         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9609         * inf-ptrace.c (inf_ptrace_register_u_offset)
9610         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9611         (inf_ptrace_store_register, inf_ptrace_store_registers)
9612         (inf_ptrace_trad_target): Move to ...
9613         * linux-nat-trad.c: ... this new file.
9614         * linux-nat-trad.h: New file.
9615         * linux-nat.c (linux_target_install_ops): Make extern.
9616         (linux_trad_target): Delete.
9617         * linux-nat.h (linux_trad_target): Delete declaration.
9618         (linux_target_install_ops): Declare.
9619         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9620         "linux-nat.h".
9621
9622 2018-05-02  Pedro Alves  <palves@redhat.com>
9623
9624         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9625         procfs_target/add_target here.
9626         * procfs.c (procfs_target): Make static.
9627         (_initialize_procfs): Call add_target here.
9628         * procfs.h (struct target_ops): Remove forward declaration.
9629         (procfs_target): Remove declaration.
9630         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9631
9632 2018-05-02  Pedro Alves  <palves@redhat.com>
9633
9634         * procfs.c (procfs_stopped_by_watchpoint)
9635         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9636         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9637         Forward declare.
9638         (procfs_use_watchpoints): Delete, move contents...
9639         (procfs_target): ... here.
9640         * procfs.h (procfs_use_watchpoints): Delete declaration.
9641         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9642         procfs_use_watchpoints.
9643         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9644         procfs_use_watchpoints.
9645
9646 2018-05-02  Tom Tromey  <tom@tromey.com>
9647
9648         PR python/20084:
9649         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9650         and var_zuinteger_unlimited.
9651         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9652         and PARAM_ZUINTEGER_UNLIMITED.
9653         (set_parameter_value): Handle var_zuinteger and
9654         var_zuinteger_unlimited.
9655         (add_setshow_generic): Likewise.
9656         (parmpy_init): Likewise.
9657
9658 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9659
9660         PR rust/23124
9661         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9662         pointer is not null before dereferencing it.
9663
9664 2018-04-30  Tom Tromey  <tom@tromey.com>
9665
9666         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9667         is_mi_like_p.
9668
9669 2018-04-30  Tom Tromey  <tom@tromey.com>
9670
9671         * breakpoint.c (mention): Remove use of is_mi_like_p.
9672         (print_mention_ranged_breakpoint): Likewise.
9673         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9674         of is_mi_like_p.
9675
9676 2018-04-30  Tom Tromey  <tom@tromey.com>
9677
9678         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9679
9680 2018-04-30  Tom Tromey  <tom@tromey.com>
9681
9682         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9683         (info_spu_event_command): Remove some uses of is_mi_like_p.
9684
9685 2018-04-30  Tom Tromey  <tom@tromey.com>
9686
9687         * python/py-framefilter.c (py_print_single_arg)
9688         (enumerate_locals, py_print_args, py_print_frame): Remove some
9689         uses of is_mi_like_p.
9690
9691 2018-04-30  Tom Tromey  <tom@tromey.com>
9692
9693         * ui-out.c: Update.
9694         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9695         * ui-out.h (ui_out::is_mi_like_p): Now const.
9696         (ui_out::do_is_mi_like_p): Now const.
9697         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9698
9699 2018-04-30  Tom Tromey  <tom@tromey.com>
9700
9701         * varobj.c (varobj_set_visualizer): Use new_reference.
9702         * python/python.c (gdbpy_decode_line): Use new_reference.
9703         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9704         new_reference.
9705
9706 2018-04-30  Tom Tromey  <tom@tromey.com>
9707
9708         * varobj.c (install_new_value): Use new_reference.
9709         * value.h (value_incref): Return void.  Swap intro comment with
9710         value_decref.
9711         * value.c (set_value_parent): Use new_reference.
9712         (value_incref): Return void.  Update intro comment.
9713         (release_value): Use new_reference.
9714         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9715
9716 2018-04-30  Tom Tromey  <tom@tromey.com>
9717
9718         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9719         * gdb_bfd.h (new_bfd_ref): Remove.
9720         (gdb_bfd_open): Update comment.
9721         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9722         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9723         (gdb_bfd_fdopenr): Use new_reference.
9724         * exec.c (exec_file_attach): Use new_reference.
9725
9726 2018-04-30  Tom Tromey  <tom@tromey.com>
9727
9728         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9729         method.
9730
9731 2018-04-30  Tom Tromey  <tom@tromey.com>
9732
9733         * jit.c (jit_read_code_entry): Use type_align.
9734         * i386-tdep.c (i386_gdbarch_init): Don't call
9735         set_gdbarch_long_long_align_bit.
9736         * gdbarch.sh: Remove long_long_align_bit.
9737         * gdbarch.c, gdbarch.h: Rebuild.
9738         * arc-tdep.c (arc_type_align): New function.
9739         (arc_gdbarch_init): Use arc_type_align.  Don't call
9740         set_gdbarch_long_long_align_bit.
9741
9742 2018-04-30  Tom Tromey  <tom@tromey.com>
9743
9744         * rust-lang.c (rust_type_alignment): Remove.
9745         (rust_composite_type): Use type_align.
9746
9747 2018-04-30  Tom Tromey  <tom@tromey.com>
9748
9749         * NEWS: Mention Type.align.
9750         * python/py-type.c (typy_get_alignof): New function.
9751         (type_object_getset): Add "alignof".
9752
9753 2018-04-30  Tom Tromey  <tom@tromey.com>
9754
9755         PR exp/17095:
9756         * NEWS: Update.
9757         * std-operator.def (UNOP_ALIGNOF): New operator.
9758         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9759         New.
9760         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9761         * c-lang.c (c_op_print_tab): Add alignof.
9762         * c-exp.y (ALIGNOF): New token.
9763         (exp): Add "ALIGNOF" production.
9764         (ident_tokens): Add _Alignof and alignof.
9765
9766 2018-04-30  Tom Tromey  <tom@tromey.com>
9767
9768         * i386-tdep.c (i386_type_align): New function.
9769         (i386_gdbarch_init): Update.
9770         * gdbarch.sh (type_align): New method.
9771         * gdbarch.c, gdbarch.h: Rebuild.
9772         * arch-utils.h (default_type_align): Declare.
9773         * arch-utils.c (default_type_align): New function.
9774         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9775         (struct type) <align_log2>: New field.
9776         <instance_flags>: Now a bitfield.
9777         (TYPE_RAW_ALIGN): New macro.
9778         (type_align, type_raw_align, set_type_align): Declare.
9779         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9780         functions.
9781         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9782         (get_alignment, maybe_set_alignment): New functions.
9783         (read_structure_type, read_enumeration_type, read_array_type)
9784         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9785         (read_subrange_type, read_base_type): Set type alignment.
9786
9787 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9788
9789         * dwarf2read.c (read_index_from_section): Use bool.
9790
9791 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9792
9793         PR gdb/22950
9794         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9795         with #ifdef.
9796
9797 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9798
9799         PR build/22873
9800         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9801         last step, and do it atomically.
9802
9803 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9804
9805         * compile/compile-c-types.c (convert_int, convert_float):
9806         Update for C FE v1.
9807
9808 2018-04-27  Tom Tromey  <tom@tromey.com>
9809
9810         PR rust/22545:
9811         * rust-lang.c (rust_inclusive_range_type_p): New function.
9812         (rust_range): Handle inclusive ranges.
9813         (rust_compute_range): Likewise.
9814         * rust-exp.y (struct rust_op) <inclusive>: New field.
9815         (DOTDOTEQ): New constant.
9816         (range_expr): Add "..=" productions.
9817         (operator_tokens): Add "..=" token.
9818         (ast_range): Add "inclusive" parameter.
9819         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9820         ranges.
9821         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9822         bounds values.
9823         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9824         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9825         Update comments.
9826         * expprint.c (print_subexp_standard): Handle new bounds values.
9827         (dump_subexp_body_standard): Likewise.
9828
9829 2018-04-27  Tom Tromey  <tom@tromey.com>
9830
9831         * configure: Rebuild.
9832         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9833         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9834         "OVERRIDE".
9835         (class symbol_needs_eval_context): Likewise.
9836         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9837         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9838         "virtual".
9839         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9840         "override".
9841         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9842         * aarch64-tdep.c (instruction_reader::read): Use "override".
9843         (instruction_reader_test::read): Likewise.
9844         * arm-tdep.c (instruction_reader::read): Use "override".
9845         (instruction_reader_thumb::read): Likewise.
9846
9847 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9848
9849         PR remote/9665
9850         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9851         instead of remote_send.
9852         (remote_send): Remove.
9853
9854 2018-04-26  Pedro Alves  <palves@redhat.com>
9855
9856         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9857         find_function_start_sal instead of find_pc_line.
9858
9859 2018-04-26  Pedro Alves  <palves@redhat.com>
9860
9861         * breakpoint.c (set_breakpoint_location_function): Handle
9862         mst_data_gnu_ifunc.
9863         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9864         * elfread.c (elf_symtab_read): Give data symbols with
9865         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9866         (elf_rel_plt_read): Update comment.
9867         * linespec.c (convert_linespec_to_sals): Handle
9868         mst_data_gnu_ifunc.
9869         (minsym_found): Handle mst_data_gnu_ifunc.
9870         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9871         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9872         * parse.c (find_minsym_type_and_address): Handle
9873         mst_data_gnu_ifunc.
9874         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9875         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9876         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9877         comment.
9878         <mst_data_gnu_ifunc>: New enumerator.
9879
9880 2018-04-26  Pedro Alves  <palves@redhat.com>
9881
9882         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9883         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9884         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9885         Handle it.
9886         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9887         (lookup_minimal_symbol_by_pc): Adjust.
9888         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9889         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9890         * minsyms.h (lookup_msym_prefer): New enum.
9891         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9892         parameter by a lookup_msym_prefer parameter.
9893
9894 2018-04-26  Pedro Alves  <palves@redhat.com>
9895
9896         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9897         ends in "@plt" instead of looking at the symbol's section.
9898
9899 2018-04-26  Pedro Alves  <palves@redhat.com>
9900
9901         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9902         all references.
9903         (find_pc_partial_function_gnu_ifunc): Rename to ...
9904         (find_pc_partial_function): ... this, and remove references to
9905         'is_gnu_ifunc_p'.
9906         (find_pc_partial_function): Delete old implementation.
9907         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9908
9909 2018-04-26  Pedro Alves  <palves@redhat.com>
9910
9911         * linespec.c (struct bound_minimal_symbol_search_key): New.
9912         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9913         skip first line if we found a GNU ifunc minimal symbol by name.
9914         (compare_msymbols): Change parameters to work with a destructured
9915         lhs minsym.
9916         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9917         functions.
9918
9919 2018-04-26  Pedro Alves  <palves@redhat.com>
9920
9921         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9922         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9923         address/name.
9924         (add_location_to_breakpoint): Store the minsym and the objfile in
9925         the breakpoint location.
9926         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9927         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9928         Record the minsym in the sal.
9929         * symtab.h (symtab_and_line) <msymbol>: New field.
9930
9931 2018-04-26  Pedro Alves  <palves@redhat.com>
9932
9933         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9934         unless we actually resolved the ifunc.
9935
9936 2018-04-26  Pedro Alves  <palves@redhat.com>
9937
9938         * c-exp.y (variable production): Prefer ifunc minsyms over
9939         regular function symbols.
9940         * symtab.c (find_gnu_ifunc): New function.
9941         * minsyms.h (lookup_msym_prefer): New enum.
9942         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9943         parameter by a lookup_msym_prefer parameter.
9944         * symtab.h (find_gnu_ifunc): New declaration.
9945
9946 2018-04-26  Pedro Alves  <palves@redhat.com>
9947
9948         * blockframe.c (find_gnu_ifunc_target_type): New function.
9949         (find_function_type): New.
9950         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9951         return a value with a memory address.
9952         (eval_call): For calls to GNU ifunc functions, try to find the
9953         type of the target function from the type that the resolver
9954         returns.
9955         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9956         symbols.
9957         * infcall.c (find_function_return_type): Delete.
9958         (find_function_addr): Add 'function_type' parameter.  For calls to
9959         GNU ifunc functions, try to find the type of the target function
9960         from the type that the resolver returns, and return it via
9961         FUNCTION_TYPE.
9962         (call_function_by_hand_dummy): Adjust to use the function type
9963         returned by find_function_addr.
9964         (find_function_addr): Add 'function_type' parameter and move
9965         description here.
9966         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9967         declarations.
9968
9969 2018-04-26  Pedro Alves  <palves@redhat.com>
9970
9971         * c-exp.y (variable production): Skip finding an alias for ifunc
9972         symbols.
9973
9974 2018-04-26  Pedro Alves  <palves@redhat.com>
9975
9976         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9977
9978 2018-04-25  Pedro Alves  <palves@redhat.com>
9979
9980         * infcmd.c (kill_command): Print the pid as string, not the whole
9981         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9982         message.
9983         * remote.c (remote_detach_1): Print the pid as string, not the
9984         whole thread's ptid.
9985
9986 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9987             Sergio Durigan Junior  <sergiodj@redhat.com>
9988             Pedro Alves  <palves@redhat.com>
9989
9990         * infcmd.c (kill_command): Print message when inferior has
9991         been killed.
9992         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9993         '1'.
9994         (add_inferior): Improve message printed when
9995         'print_inferior_events' is on.
9996         (exit_inferior): Remove message printed when
9997         'print_inferior_events' is on.
9998         (detach_inferior): Improve message printed when
9999         'print_inferior_events' is on.
10000         (initialize_inferiors): Use 'add_inferior_silent' to set
10001         'current_inferior_'.
10002         * inferior.h (print_inferior_events): Declare here as
10003         'extern'.
10004         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10005         '[Detaching...]' messages when 'print_inferior_events' is on.
10006         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10007         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10008         'Detaching after fork from child...', replace it by '... from
10009         parent...'.
10010         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10011         prefix/suffix when printing 'Detaching...' messages.  Print
10012         them when 'print_inferior_events' is on.
10013         * remote.c (remote_detach_1): Print message when detaching
10014         from inferior and '!is_fork_parent'.
10015
10016 2018-04-24  Tom Tromey  <tom@tromey.com>
10017
10018         * cli-out.h: Reindent.
10019
10020 2018-04-24  Tom Tromey  <tom@tromey.com>
10021
10022         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10023         (cli_ui_out::do_field_string): Use fputs_filtered.
10024         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10025
10026 2018-04-23  Tom Tromey  <tom@tromey.com>
10027
10028         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10029         gdb::unique_xmalloc_ptr.
10030
10031 2018-04-23  Tom Tromey  <tom@tromey.com>
10032
10033         * configure: Rebuild.
10034
10035 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10036
10037         PR gdb/23095
10038         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10039         prepare_for_testing.  Set normal_bp to r_debug_state if target
10040         is bsd.
10041
10042 2018-04-21  Pedro Alves  <palves@redhat.com>
10043             Rajendra SY  <rajendra.sy@gmail.com>
10044
10045         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10046         * remote.c (extended_remote_attach): In all-stop mode, mark the
10047         thread as executing.
10048
10049 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10050
10051         * thread.c (thread_apply_all_command): Fix comment.
10052         (thread_command): Fix comment.
10053
10054 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10055
10056         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10057         parameter.
10058         * features/aarch64-core.c (create_feature_aarch64_core):
10059         Regenerate.
10060         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10061         Likewise.
10062         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10063         Likewise.
10064         * features/i386/32bit-avx512.c
10065         (create_feature_i386_32bit_avx512): Likewise.
10066         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10067         Likewise.
10068         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10069         Likewise.
10070         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10071         Likewise.
10072         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10073         Likewise.
10074         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10075         Likewise.
10076         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10077         Likewise.
10078         * features/i386/64bit-avx512.c
10079         (create_feature_i386_64bit_avx512): Likewise.
10080         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10081         Likewise.
10082         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10083         Likewise.
10084         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10085         Likewise.
10086         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10087         Likewise.
10088         * features/i386/64bit-segments.c
10089         (create_feature_i386_64bit_segments): Likewise.
10090         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10091         Likewise.
10092         * features/i386/x32-core.c
10093         (create_feature_i386_x32_core): Likewise.
10094         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10095         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10096         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10097         * target-descriptions.c: In generated code, don't pass xml
10098         filename.
10099
10100 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10101
10102         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10103         (print_xml_feature::visit_post): Likewise.
10104         (print_xml_feature::visit): Likewise.
10105         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10106         (print_xml_feature): Add new class.
10107         * regformats/regdat.sh: Null xmltarget on feature targets.
10108         * target-descriptions.c (struct target_desc): Add xmltarget.
10109         (maintenance_check_tdesc_xml_convert): Add unittest function.
10110         (tdesc_get_features_xml): Add function to get xml.
10111         (maintenance_check_xml_descriptions): Test xml generation.
10112         * xml-tdesc.c (string_read_description_xml): Add function.
10113         * xml-tdesc.h (string_read_description_xml): Add declaration.
10114
10115 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10116
10117         * features/Makefile: Add feature marker to targets with new style
10118         target descriptions.
10119         * regformats/aarch64.dat: Regenerate.
10120         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10121         * regformats/i386/amd64-avx-linux.dat: Likewise.
10122         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10123         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10124         * regformats/i386/amd64-linux.dat: Likewise.
10125         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10126         * regformats/i386/amd64.dat: Likewise.
10127         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10128         * regformats/i386/i386-avx-linux.dat: Likewise.
10129         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10130         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10131         * regformats/i386/i386-linux.dat: Likewise.
10132         * regformats/i386/i386-mmx-linux.dat: Likewise.
10133         * regformats/i386/i386-mpx-linux.dat: Likewise.
10134         * regformats/i386/i386.dat: Likewise.
10135         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10136         * regformats/i386/x32-avx-linux.dat: Likewise.
10137         * regformats/i386/x32-linux.dat: Likewise.
10138         * regformats/tic6x-c62x-linux.dat: Likewise.
10139         * regformats/tic6x-c64x-linux.dat: Likewise.
10140         * regformats/tic6x-c64xp-linux.dat: Likewise.
10141         * regformats/regdat.sh: Parse feature marker.
10142
10143 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10144
10145         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10146         (tdesc_osabi_name): Likewise.
10147         * target-descriptions.c (tdesc_architecture_name): Add new
10148         function.
10149         (tdesc_osabi_name): Likewise.
10150
10151 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10152
10153         * common/tdesc.c (tdesc_predefined_type): Move to here.
10154         (tdesc_named_type): Likewise.
10155         (tdesc_create_vector): Likewise.
10156         (tdesc_create_struct): Likewise.
10157         (tdesc_set_struct_size): Likewise.
10158         (tdesc_create_union): Likewise.
10159         (tdesc_create_flags): Likewise.
10160         (tdesc_create_enum): Likewise.
10161         (tdesc_add_field): Likewise.
10162         (tdesc_add_typed_bitfield): Likewise.
10163         (tdesc_add_bitfield): Likewise.
10164         (tdesc_add_flag): Likewise.
10165         (tdesc_add_enum_value): Likewise.
10166         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10167         (struct tdesc_type_vector): Likewise.
10168         (struct tdesc_type_field): Likewise.
10169         (struct tdesc_type_with_fields): Likewise.
10170         (tdesc_create_enum): Add declaration.
10171         (tdesc_add_typed_bitfield): Likewise.
10172         (tdesc_add_enum_value): Likewise.
10173         * target-descriptions.c (tdesc_type_field): Move from here.
10174         (tdesc_type_builtin): Likewise.
10175         (tdesc_type_vector): Likewise.
10176         (tdesc_type_with_fields): Likewise.
10177         (tdesc_predefined_types): Likewise.
10178         (tdesc_named_type): Likewise.
10179         (tdesc_create_vector): Likewise.
10180         (tdesc_create_struct): Likewise.
10181         (tdesc_set_struct_size): Likewise.
10182         (tdesc_create_union): Likewise.
10183         (tdesc_create_flags): Likewise.
10184         (tdesc_create_enum): Likewise.
10185         (tdesc_add_field): Likewise.
10186         (tdesc_add_typed_bitfield): Likewise.
10187         (tdesc_add_bitfield): Likewise.
10188         (tdesc_add_flag): Likewise.
10189         (tdesc_add_enum_value): Likewise.
10190         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10191         (tdesc_add_typed_bitfield): Likewise.
10192         (tdesc_add_enum_value): Likewise.
10193
10194 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10195
10196         * common/tdesc.c (tdesc_feature::accept): Move to here.
10197         (tdesc_feature::operator==): Likewise.
10198         (tdesc_create_reg): Likewise.
10199         * common/tdesc.h (tdesc_type_kind): Likewise.
10200         (struct tdesc_type): Likewise.
10201         (struct tdesc_feature): Likewise.
10202         * regformats/regdat.sh: Create a feature.
10203         * target-descriptions.c (tdesc_type_kind): Move from here.
10204         (tdesc_type): Likewise.
10205         (tdesc_type_up): Likewise.
10206         (tdesc_feature): Likewise.
10207         (tdesc_create_reg): Likewise.
10208
10209 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10210
10211         * Makefile.in: Add arch/tdesc.c
10212         * common/tdesc.c: New file.
10213         * common/tdesc.h (tdesc_element_visitor): Move to here.
10214         (tdesc_element): Likewise.
10215         (tdesc_reg): Likewise.
10216         (tdesc_reg_up): Likewise.
10217         * regformats/regdef.h (reg): Add offset to constructors.
10218         * target-descriptions.c (tdesc_element_visitor): Move from here.
10219         (tdesc_element): Likewise.
10220         (tdesc_reg): Likewise.
10221         (tdesc_reg_up): Likewise.
10222
10223 2018-04-17  Tom Tromey  <tom@tromey.com>
10224
10225         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10226         discriminant field.
10227
10228 2018-04-17  Tom Tromey  <tom@tromey.com>
10229
10230         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10231
10232 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10233
10234         * symtab.c (print_symbol_info): Skip printing filename and line
10235         number when `last' is NULL.
10236         (symtab_symbol_info): Use empty string instead of NULL for first
10237         invocation of print_symbol_info.
10238         (rbreak_command): Pass NULL to `last' parameter of
10239         print_symbol_info.
10240
10241 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10242
10243         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10244         instead of nullptr.
10245
10246 2018-04-16  Pedro Alves  <palves@redhat.com>
10247
10248         * MAINTAINERS (sh): Remove.
10249         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10250         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10251         (ALLDEPFILES): Remove sh64-tdep.c.
10252         * NEWS: Mentions that support for SH-5/SH64 is removed.
10253         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10254         (sh*-*-openbsd*): Ditto.
10255         (sh64-*-elf*): Remove.
10256         (sh*): Remove.
10257         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10258         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10259         * sh-tdep.c: No longer include "sh64-tdep.h".
10260         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10261         * sh64-tdep.c, sh64-tdep.h: Remove files.
10262
10263 2018-04-16  Pedro Alves  <palves@redhat.com>
10264
10265         * MAINTAINERS: Remove m88k.
10266         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10267         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10268         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10269         * NEWS: Mention that support for m88k was removed.
10270         * configure.host (m88*-*-*): Remove support.
10271         * configure.nat (m88k-*-*): Remove support.
10272         * configure.tgt (m88*-*-openbsd*): Remove.
10273         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10274
10275 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10276
10277         * configure.tgt (x86_tobjs): New variable.
10278         (amd64_tobjs, i386_tobjs): Use it.
10279
10280 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10281
10282         * symtab.c (print_symbol_info): Precede the symbol definition by
10283         the line number when available.
10284         * NEWS: Advertise this enhancement.
10285
10286 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10287
10288         * NEWS (New options): announce set/show record btrace cpu.
10289         * btrace.c: Include record-btrace.h.
10290         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10291         the vendor is unknown.
10292         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10293         Maybe overwrite the btrace configuration's cpu.
10294         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10295         (btrace_fetch): Add cpu parameter.  Update callers.
10296         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10297         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10298         errata workarounds if the vendor is unknown.
10299         * python/py-record-btrace.c: Include record-btrace.h.
10300         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10301         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10302         * record-btrace.c (record_btrace_cpu_state_kind): New.
10303         (record_btrace_cpu): New.
10304         (set_record_btrace_cpu_cmdlist): New.
10305         (record_btrace_get_cpu): New.
10306         (require_btrace_thread, record_btrace_info)
10307         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10308         (cmd_set_record_btrace_cpu_none): New.
10309         (cmd_set_record_btrace_cpu_auto): New.
10310         (cmd_set_record_btrace_cpu): New.
10311         (cmd_show_record_btrace_cpu): New.
10312         (_initialize_record_btrace): Initialize set/show record btrace cpu
10313         commands.
10314         * record-btrace.h (record_btrace_get_cpu): New.
10315
10316 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10317
10318         * record.c (set_record_command): Fix typo in message.
10319
10320 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10321
10322         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10323
10324 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10325
10326         * infrun.c (process_event_stop_test): Call
10327         gdbarch_in_indirect_branch_thunk.
10328         * gdbarch.sh (in_indirect_branch_thunk): New.
10329         * gdbarch.c: Regenerated.
10330         * gdbarch.h: Regenerated.
10331         * x86-tdep.h: New.
10332         * x86-tdep.c: New.
10333         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10334         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10335         (ALLDEPFILES): Add x86-tdep.c.
10336         * arch-utils.h (default_in_indirect_branch_thunk): New.
10337         * arch-utils.c (default_in_indirect_branch_thunk): New.
10338         * i386-tdep: Include x86-tdep.h.
10339         (i386_in_indirect_branch_thunk): New.
10340         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10341         function.
10342         * amd64-tdep: Include x86-tdep.h.
10343         (amd64_in_indirect_branch_thunk): New.
10344         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10345
10346 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10347
10348         PR gdb/23053
10349         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10350         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10351         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10352         regression.
10353
10354 2018-04-12  Tom Tromey  <tom@tromey.com>
10355
10356         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10357         (rust_evaluate_subexp): Likewise.
10358
10359 2018-04-12  Pedro Alves  <palves@redhat.com>
10360
10361         * procfs.c (procfs_detach): Make forward declaration's prototype
10362         match definition's protototype.
10363         (proc_get_LDT_entry): Remove stale do_cleanups call.
10364
10365 2018-04-12  Pedro Alves  <palves@redhat.com>
10366
10367         * target.h (target_ops::to_has_exited): Delete.
10368         (target_has_exited): Delete.
10369         * target-delegates.c: Regenerate.
10370
10371 2018-04-11  Pedro Alves  <palves@redhat.com>
10372
10373         * target.c (fileio_fh_t::t): Add comment.
10374         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10375         (target_fileio_close): Handle a NULL target.
10376         (invalidate_fileio_fh): New.
10377         (target_close): Call it.
10378         * remote.c (remote_hostio_send_command): No longer check whether
10379         remote_desc is open.
10380
10381 2018-04-11  Pedro Alves  <palves@redhat.com>
10382
10383         * target.c (fileio_fh_t): Make it a named struct instead of a
10384         typedef.
10385         (fileio_fh_t::is_closed): New method.
10386         (DEF_VEC_O (fileio_fh_t)): Remove.
10387         (fileio_fhandles): Now a std::vector.
10388         (is_closed_fileio_fh): Delete.
10389         (acquire_fileio_fd): Adjust.  Rename parameters.
10390         (release_fileio_fd): Adjust.
10391         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10392         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10393         (target_fileio_close): Adjust.
10394
10395 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10396
10397         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10398         index.
10399
10400 2018-04-10  Pedro Alves  <palves@redhat.com>
10401
10402         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10403         (scoped_finish_thread_state): New class.
10404         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10405         cleanup.
10406         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10407         (fetch_inferior_event, normal_stop): Likewise.
10408         * thread.c (finish_thread_state_cleanup): Delete.
10409
10410 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10411             Pedro Alves  <palves@redhat.com>
10412
10413         * value.c: Include "selftest.h" and "common/array-view.h".
10414         (struct range) <operator ==>: New.
10415         (test_ranges_contain): New.
10416         (check_ranges_vector): New.
10417         (test_insert_into_bit_range_vector): New.
10418         (_initialize_values): Register selftests.
10419         * common/array-view.h (operator==, operator!=): New.
10420
10421 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10422
10423         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10424         an iterator.
10425         * inline-frame.c: Include <algorithm>.
10426         (struct inline_state): Add constructor.
10427         (inline_state_s): Remove.
10428         (DEF_VEC_O(inline_state_s)): Remove.
10429         (inline_states): Change type to std::vector.
10430         (find_inline_frame_state): Adjust to std::vector.
10431         (allocate_inline_frame_state): Remove.
10432         (clear_inline_frame_state): Adjust to std::vector.
10433         (skip_inline_frames): Adjust to std::vector.
10434
10435 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10436
10437         * tracepoint.h (struct trace_state_variable): Add constructor.
10438         <name>: Change type to std::string.
10439         * tracepoint.c (tsv_s): Remove.
10440         (DEF_VEC_O(tsv_s)): Remove.
10441         (tvariables): Change to std::vector.
10442         (create_trace_state_variable): Adjust to std::vector.
10443         (find_trace_state_variable): Likewise.
10444         (find_trace_state_variable_by_number): Likewise.
10445         (delete_trace_state_variable): Likewise.
10446         (trace_variable_command): Adjust to std::string.
10447         (delete_trace_variable_command): Likewise.
10448         (tvariables_info_1): Adjust to std::vector.
10449         (save_trace_state_variables): Likewise.
10450         (start_tracing): Likewise.
10451         (merge_uploaded_trace_state_variables): Adjust to std::vector
10452         and std::string.
10453         * target.h (struct target_ops)
10454         <to_download_trace_state_variable>: Pass reference to
10455         trace_state_variable.
10456         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10457         * target-delegates.c: Re-generate.
10458         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10459         (mi_tsv_deleted): Likewise.
10460         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10461         * remote.c (remote_download_trace_state_variable): Change
10462         pointer to reference and adjust.
10463         * make-target-delegates (parse_argtypes): Handle references.
10464         (write_function_header): Likewise.
10465         (munge_type): Likewise.
10466
10467 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10468
10469         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10470         string_view-selftests.c.
10471         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10472         testsuite.
10473         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10474         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10475         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10476         * unittests/basic_string_view/element_access/char/1.cc:
10477         Likewise.
10478         * unittests/basic_string_view/element_access/char/empty.cc:
10479         Likewise.
10480         * unittests/basic_string_view/element_access/char/front_back.cc:
10481         Likewise.
10482         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10483         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10484         Likewise.
10485         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10486         Likewise.
10487         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10488         Likewise.
10489         * unittests/basic_string_view/operations/compare/char/1.cc:
10490         Likewise.
10491         * unittests/basic_string_view/operations/compare/char/13650.cc:
10492         Likewise.
10493         * unittests/basic_string_view/operations/copy/char/1.cc:
10494         Likewise.
10495         * unittests/basic_string_view/operations/data/char/1.cc:
10496         Likewise.
10497         * unittests/basic_string_view/operations/find/char/1.cc:
10498         Likewise.
10499         * unittests/basic_string_view/operations/find/char/2.cc:
10500         Likewise.
10501         * unittests/basic_string_view/operations/find/char/3.cc:
10502         Likewise.
10503         * unittests/basic_string_view/operations/find/char/4.cc:
10504         Likewise.
10505         * unittests/basic_string_view/operations/rfind/char/1.cc:
10506         Likewise.
10507         * unittests/basic_string_view/operations/rfind/char/2.cc:
10508         Likewise.
10509         * unittests/basic_string_view/operations/rfind/char/3.cc:
10510         Likewise.
10511         * unittests/basic_string_view/operations/substr/char/1.cc:
10512         Likewise.
10513         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10514         * unittests/string_view-selftests.c: New file.
10515
10516 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10517
10518         * unittests/basic_string_view/capacity/1.cc: New file.
10519         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10520         * unittests/basic_string_view/cons/char/1.cc: New file.
10521         * unittests/basic_string_view/cons/char/2.cc: New file.
10522         * unittests/basic_string_view/cons/char/3.cc: New file.
10523         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10524         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10525         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10526         * unittests/basic_string_view/element_access/char/1.cc: New file.
10527         * unittests/basic_string_view/element_access/char/2.cc: New file.
10528         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10529         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10530         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10531         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10532         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10533         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10534         * unittests/basic_string_view/include.cc: New file.
10535         * unittests/basic_string_view/inserters/char/1.cc: New file.
10536         * unittests/basic_string_view/inserters/char/2.cc: New file.
10537         * unittests/basic_string_view/inserters/char/3.cc: New file.
10538         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10539         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10540         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10541         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10542         * unittests/basic_string_view/literals/types.cc: New file.
10543         * unittests/basic_string_view/literals/values.cc: New file.
10544         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10545         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10546         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10547         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10548         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10549         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10550         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10551         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10552         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10553         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10554         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10555         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10556         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10557         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10558         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10559         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10560         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10561         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10562         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10563         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10564         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10565         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10566         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10567         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10568         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10569         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10570         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10571         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10572         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10573         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10574         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10575         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10576         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10577         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10578         * unittests/basic_string_view/operators/char/2.cc: New file.
10579         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10580         * unittests/basic_string_view/range_access/char/1.cc: New file.
10581         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10582         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10583         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10584         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10585         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10586         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10587         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10588         * unittests/basic_string_view/typedefs.cc: New file.
10589         * unittests/basic_string_view/types/1.cc: New file.
10590
10591 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10592
10593         * common/gdb_string_view.h: Remove libstdc++ implementation
10594         details, adjust to gdb reality.
10595         * common/gdb_string_view.tcc: Likewise.
10596         * cli/cli-script.c (struct string_view): Remove.
10597         (user_args) <m_args>: Change element type to gdb::string_view.
10598         (user_args::insert_args): Adjust.
10599
10600 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10601
10602         * common/gdb_string_view.h: New file.
10603         * common/gdb_string_view.tcc: New file.
10604
10605 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10606
10607         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10608         * configure: Re-generate.
10609
10610 2018-04-09  Pedro Alves  <palves@redhat.com>
10611
10612         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10613         (set_target_gdbarch): Call
10614         gdb::observers::architecture_changed.notify instead of
10615         observer_notify_architecture_changed.
10616
10617 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10618
10619         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10620         (do_restore_current_traceframe_cleanup): Remove.
10621         (restore_current_traceframe_cleanup_dtor): Remove.
10622         (make_cleanup_restore_current_traceframe): Remove.
10623         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10624         New.
10625         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10626         * infrun.c (fetch_inferior_event): Use
10627         scoped_restore_current_traceframe.
10628
10629 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10630
10631         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10632         Remove.
10633         <n_allocated_type_units>: Remove.
10634         <all_type_units>: Change to std::vector.
10635         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10636         to std::vector change.
10637         (dwarf2_per_objfile::get_cutu): Likewise.
10638         (dwarf2_per_objfile::get_tu): Likewise.
10639         (create_signatured_type_table_from_index): Likewise.
10640         (create_signatured_type_table_from_debug_names): Likewise.
10641         (dw2_symtab_iter_next): Likewise.
10642         (dw2_print_stats): Likewise.
10643         (dw2_expand_all_symtabs): Likewise.
10644         (dw2_expand_marked_cus): Likewise.
10645         (dw2_debug_names_iterator::next): Likewise.
10646         (dwarf2_initialize_objfile): Likewise.
10647         (add_signatured_type_cu_to_table): Likewise.
10648         (create_all_type_units): Likewise.
10649         (add_type_unit): Likewise.
10650         (struct tu_abbrev_offset): Add constructor.
10651         (build_type_psymtabs_1): Adjust to std::vector change.
10652         (print_tu_stats): Likewise.
10653         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10654         (write_debug_names): Likewise.
10655
10656 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10657
10658         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10659         Make an std::vector.
10660         <n_comp_units>: Remove.
10661         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10662         to std::vector change.
10663         (dwarf2_per_objfile::get_cutu): Likewise.
10664         (dwarf2_per_objfile::get_cu): Likewise.
10665         (create_cus_from_index): Likewise.
10666         (create_addrmap_from_index): Likewise.
10667         (create_addrmap_from_aranges): Likewise.
10668         (dwarf2_read_index): Likewise.
10669         (dw2_find_last_source_symtab): Likewise.
10670         (dw2_map_symtabs_matching_filename): Likewise.
10671         (dw2_symtab_iter_next): Likewise.
10672         (dw2_print_stats): Likewise.
10673         (dw2_expand_all_symtabs): Likewise.
10674         (dw2_expand_symtabs_with_fullname): Likewise.
10675         (dw2_expand_marked_cus): Likewise.
10676         (dw2_map_symbol_filenames): Likewise.
10677         (create_cus_from_debug_names): Likewise.
10678         (dwarf2_read_debug_names): Likewise.
10679         (dw2_debug_names_iterator::next): Likewise.
10680         (dwarf2_initialize_objfile): Likewise.
10681         (set_partial_user): Likewise.
10682         (dwarf2_build_psymtabs_hard): Likewise.
10683         (read_comp_units_from_section): Remove arguments, adjust to
10684         std::vector change.
10685         (create_all_comp_units): Adjust to std::vector and
10686         read_comp_units_from_section changes.
10687         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10688         change.
10689         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10690         (psyms_seen_size): Likewise.
10691         (write_gdbindex): Likewise.
10692         (write_debug_names): Likewise.
10693
10694 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10695
10696         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10697         with dwarf2_per_objfile.
10698         (create_cus_from_index): Likewise.
10699         (create_signatured_type_table_from_index): Likewise.
10700         (dwarf2_read_index): Likewise.
10701         (dwarf2_initialize_objfile): Likewise.
10702         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10703         per_cu rather than get_dwarf2_per_objfile.
10704
10705 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10706
10707         * dwarf2read.h (struct signatured_type): Forward declare.
10708         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10709         New methods.
10710         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10711         (dw2_get_cutu): ...this.
10712         (dwarf2_per_objfile::get_cu): Rename from...
10713         (dw2_get_cu): ...this.
10714         (dwarf2_per_objfile::get_tu): New.
10715         (create_addrmap_from_index): Adjust.
10716         (create_addrmap_from_aranges): Adjust.
10717         (dw2_find_last_source_symtab): Adjust.
10718         (dw2_map_symtabs_matching_filename): Adjust.
10719         (dw2_symtab_iter_next): Adjust.
10720         (dw2_print_stats): Adjust.
10721         (dw2_expand_all_symtabs): Adjust.
10722         (dw2_expand_symtabs_with_fullname): Adjust.
10723         (dw2_expand_marked_cus): Adjust.
10724         (dw_expand_symtabs_matching_file_matcher): Adjust.
10725         (dw2_map_symbol_filenames): Adjust.
10726         (dw2_debug_names_iterator::next): Adjust.
10727         (dwarf2_initialize_objfile): Adjust.
10728         (set_partial_user): Adjust.
10729         (dwarf2_build_psymtabs_hard): Adjust.
10730
10731 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10732
10733         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10734         Remove unused variables.
10735         (dw2_map_symtabs_matching_filename): Likewise.
10736         (dwarf2_record_block_ranges): Likewise.
10737         (dwarf2_read_addr_index): Likewise.
10738         (follow_die_offset): Likewise.
10739
10740 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10741
10742         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10743         to symbol_file_add_main.
10744
10745 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10746
10747         PR mi/22299
10748         * mi/mi-console.c (do_fputc_async_safe): New.
10749         (mi_console_file::write_async_safe): New.
10750         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10751         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10752         New.
10753         * ui-file.c (ui_file::putstrn): Adjust call to
10754         fputstrn_unfiltered.
10755         * utils.c (printchar): Replace do_fputs and do_fprintf
10756         parameters by do_fputc.
10757         (fputstr_filtered): Adjust call to printchar.
10758         (fputstr_unfiltered): Likewise.
10759         (fputstrn_filtered): Likewise.
10760         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10761         printchar.
10762         * utils.h (do_fputc_ftype): New typedef.
10763         (fputstrn_unfiltered): Add do_fputc parameter.
10764
10765 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10766
10767         * regformats/i386/i386-avx.dat: Remove.
10768
10769 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10770
10771         PR gdb/22979
10772         * amd64-tdep.c (amd64_none_init_abi): New function.
10773         (amd64_x32_none_init_abi): New function.
10774         (_initialize_amd64_tdep): Register handlers for x86-64 and
10775         x64_32 with GDB_OSABI_NONE.
10776         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10777         GDB_OSABI_NONE osabi.
10778
10779 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10780
10781         PR gdb/22980
10782         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10783         GDB_OSABI_NONE.
10784         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10785         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10786
10787 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10788
10789         * common/byte-vector.h (char_vector): New type.
10790         * target.h (target_read_alloc): Return
10791         gdb::optional<byte_vector>.
10792         (target_read_stralloc): Return gdb::optional<char_vector>.
10793         (target_get_osdata): Return gdb::optional<char_vector>.
10794         * target.c (target_read_alloc_1): Templatize.  Replacement
10795         manual memory management with vector.
10796         (target_read_alloc): Change return type, adjust.
10797         (target_read_stralloc): Change return type, adjust.
10798         (target_get_osdata): Change return type, adjust.
10799         * auxv.c (struct auxv_info) <length>: Remove.
10800         <data>: Change type to gdb::optional<byte_vector>.
10801         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10802         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10803         (target_auxv_search): Adjust.
10804         (fprint_target_auxv): Adjust.
10805         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10806         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10807         (linux_make_corefile_notes): Adjust.
10808         * osdata.c (get_osdata): Adjust.
10809         * remote.c (remote_get_threads_with_qxfer): Adjust.
10810         (remote_memory_map): Adjust.
10811         (remote_traceframe_info): Adjust.
10812         (btrace_read_config): Adjust.
10813         (remote_read_btrace): Adjust.
10814         (remote_pid_to_exec_file): Adjust.
10815         * solib-aix.c (solib_aix_get_library_list): Adjust.
10816         * solib-dsbt.c (decode_loadmap): Don't free buf.
10817         (dsbt_get_initial_loadmaps): Adjust.
10818         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10819         * solib-target.c (solib_target_current_sos): Adjust.
10820         * tracepoint.c (sdata_make_value): Adjust.
10821         * xml-support.c (xinclude_start_include): Adjust.
10822         (xml_fetch_content_from_file): Adjust.
10823         * xml-support.h (xml_fetch_another): Change return type.
10824         (xml_fetch_content_from_file): Change return type.
10825         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10826         * xml-tdesc.c (file_read_description_xml): Adjust.
10827         (fetch_available_features_from_target): Change return type.
10828         (target_fetch_description_xml): Adjust.
10829         (target_read_description_xml): Adjust.
10830
10831 2018-04-06  Tom Tromey  <tom@tromey.com>
10832
10833         * value.c (~value): Update.
10834         (struct value) <contents>: Now unique_xmalloc_ptr.
10835         (value_contents_bits_eq, allocate_value_contents)
10836         (value_contents_raw, value_contents_all_raw)
10837         (value_contents_for_printing, value_contents_for_printing_const)
10838         (set_value_enclosing_type): Update.
10839
10840 2018-04-06  Tom Tromey  <tom@tromey.com>
10841
10842         * value.c (range_s): Remove typedef, VEC.
10843         (struct range): Add operator<.
10844         (range_lessthan): Remove.
10845         (ranges_contain): Change type.
10846         (~value): Update.
10847         (struct value) <unavailable, optimized_out>: Now std::vector.
10848         (value_entirely_available)
10849         (value_entirely_covered_by_range_vector)
10850         (value_entirely_unavailable, value_entirely_optimized_out):
10851         Update.
10852         (insert_into_bit_range_vector): Change argument type.
10853         (find_first_range_overlap): Likewise.
10854         (struct ranges_and_idx, value_contents_bits_eq)
10855         (require_not_optimized_out, require_available): Update.
10856         (ranges_copy_adjusted): Change argument types.
10857         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10858
10859 2018-04-06  Tom Tromey  <tom@tromey.com>
10860
10861         * value.c (~value): Update.
10862         (struct value) <parent>: Now a value_ref_ptr.
10863         (value_parent, set_value_parent, value_address, value_copy):
10864         Update.
10865
10866 2018-04-06  Tom Tromey  <tom@tromey.com>
10867
10868         * value.c (struct value): Add constructor, destructor, and member
10869         initializers.
10870         (allocate_value_lazy, value_decref): Update.
10871
10872 2018-04-06  Tom Tromey  <tom@tromey.com>
10873
10874         * value.c (struct value) <released, next>: Remove.
10875         (all_values): Now a std::vector.
10876         (allocate_value_lazy): Update.
10877         (value_next): Remove.
10878         (value_mark, value_free_to_mark, release_value)
10879         (value_release_to_mark): Update.
10880
10881 2018-04-06  Tom Tromey  <tom@tromey.com>
10882
10883         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10884         (free_value_chain): Remove.
10885         * value.c (free_value_chain): Remove.
10886         (value_release_to_mark): Return a std::vector.
10887         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10888         std::vector.
10889         (check_condition): Update.
10890         * eval.c (fetch_subexp_value): Change "val_chain" to a
10891         std::vector.
10892         * breakpoint.c (update_watchpoint): Update.
10893         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10894
10895 2018-04-06  Tom Tromey  <tom@tromey.com>
10896
10897         * value.h (free_all_values): Remove.
10898         * value.c (free_all_values): Remove.
10899
10900 2018-04-06  Tom Tromey  <tom@tromey.com>
10901
10902         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10903         (value_history_chain, value_history_count): Remove.
10904         (value_history): New global.
10905         (record_latest_value, access_value_history, show_values)
10906         (preserve_values): Update.
10907
10908 2018-04-06  Tom Tromey  <tom@tromey.com>
10909
10910         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10911         * varobj.c (varobj_set_display_format, varobj_set_value)
10912         (install_default_visualizer, construct_visualizer)
10913         (install_new_value, ~varobj, varobj_get_value_type)
10914         (my_value_of_variable, varobj_editable_p): Update.
10915         * c-varobj.c (c_describe_child, c_value_of_variable)
10916         (cplus_number_of_children, cplus_describe_child): Update.
10917         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10918         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10919         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10920
10921 2018-04-06  Tom Tromey  <tom@tromey.com>
10922
10923         * printcmd.c (last_examine_address): Change type to
10924         value_ref_ptr.
10925         (do_examine, x_command): Update.
10926
10927 2018-04-06  Tom Tromey  <tom@tromey.com>
10928
10929         * value.c (release_value): Update.
10930         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10931         (struct bpstats) <val>: Now a value_ref_ptr.
10932         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10933         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10934         (~watchpoint, print_it_watchpoint, watch_command_1)
10935         (invalidate_bp_value_on_memory_change): Update.
10936
10937 2018-04-06  Tom Tromey  <tom@tromey.com>
10938
10939         * varobj.c (varobj_clear_saved_item)
10940         (update_dynamic_varobj_children, install_new_value, ~varobj):
10941         Update.
10942         * value.h (value_incref): Move declaration earlier.
10943         (value_decref): Rename from value_free.
10944         (struct value_ref_policy): New.
10945         (value_ref_ptr): New typedef.
10946         (struct value_deleter): Remove.
10947         (gdb_value_up): Remove typedef.
10948         (release_value): Change return type.
10949         (release_value_or_incref): Remove.
10950         * value.c (set_value_parent): Update.
10951         (value_incref): Change return type.
10952         (value_decref): Rename from value_free.
10953         (value_free_to_mark, free_all_values, free_value_chain): Update.
10954         (release_value): Return value_ref_ptr.
10955         (release_value_or_incref): Remove.
10956         (record_latest_value, set_internalvar, clear_internalvar):
10957         Update.
10958         * stack.c (info_frame_command): Don't call value_free.
10959         * python/py-value.c (valpy_dealloc, valpy_new)
10960         (value_to_value_object): Update.
10961         * printcmd.c (do_examine): Update.
10962         * opencl-lang.c (lval_func_free_closure): Update.
10963         * mi/mi-main.c (register_changed_p): Don't call value_free.
10964         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10965         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10966         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10967         value_free.
10968         * guile/scm-value.c (vlscm_free_value_smob)
10969         (vlscm_scm_from_value): Update.
10970         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10971         (frame_unwind_register_unsigned, get_frame_register_bytes)
10972         (put_frame_register_bytes): Don't call value_free.
10973         * findvar.c (address_from_register): Don't call value_free.
10974         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10975         * dwarf2loc.c (entry_data_value_free_closure)
10976         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10977         (dwarf2_evaluate_loc_desc_full): Update.
10978         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10979         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10980         (~watchpoint, watch_command_1)
10981         (invalidate_bp_value_on_memory_change): Update.
10982         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10983
10984 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10985
10986         PR gdb/23022
10987         * warning.m4: Add -Wno-error=deprecated-register.
10988         * configure: Re-generate.
10989
10990 2018-04-05  Tom Tromey  <tom@tromey.com>
10991
10992         * linespec.h: Remove include of "vec.h".
10993
10994 2018-04-05  Tom Tromey  <tom@tromey.com>
10995
10996         * linespec.c (typep): Remove typedef.
10997         (find_methods, find_superclass_methods): Take a std::vector.
10998         (find_method): Use std::vector.
10999
11000 2018-04-05  Tom Tromey  <tom@tromey.com>
11001
11002         * utils.c (compare_strings): Remove.
11003         * utils.h (compare_strings): Remove.
11004         * objc-lang.h (find_imps): Update.
11005         * objc-lang.c (find_methods): Take a std::vector.
11006         (uniquify_strings, find_imps): Likewise.
11007         * linespec.c (find_methods): Take a std::vector.
11008         (decode_objc): Use std::vector.
11009         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11010         a std::vector.
11011         (find_method, find_function_symbols): Use std::vector.
11012
11013 2018-04-05  Tom Tromey  <tom@tromey.com>
11014
11015         * completer.c (completion_tracker::completion_tracker): Remove
11016         cast.
11017         (completion_tracker::discard_completions): Likewise.
11018         * breakpoint.c (ambiguous_names_p): Remove cast.
11019         * ada-lang.c (_initialize_ada_language): Remove cast.
11020         * utils.h (streq): Update.
11021         (streq_hash): Add new declaration.
11022         * utils.c (streq): Return bool.
11023         (streq_hash): New function.
11024
11025 2018-04-05  Tom Tromey  <tom@tromey.com>
11026
11027         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11028         Remove a string copy.
11029
11030 2018-04-05  Tom Tromey  <tom@tromey.com>
11031
11032         * linespec.c (filter_results): Use std::vector.
11033         (decode_line_2, decode_line_full): Update.
11034
11035 2018-04-05  Tom Tromey  <tom@tromey.com>
11036
11037         * linespec.c (canonical_to_fullform): Return std::string.
11038         (filter_results): Update.
11039         (struct decode_line_2_item): Add constructor.
11040         <fullform, displayform>: Now std::string.
11041         (decode_line_2_compare_items): Now a std::sort comparator.
11042         (decode_line_2): Update.
11043
11044 2018-04-05  Tom Tromey  <tom@tromey.com>
11045
11046         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11047         (unexpected_linespec_error): Update.
11048         (linespec_parse_basic, parse_linespec): Update.
11049
11050 2018-04-05  Tom Tromey  <tom@tromey.com>
11051
11052         * linespec.c (linespec_parse_basic): Reindent.
11053
11054 2018-04-05  Tom Tromey  <tom@tromey.com>
11055
11056         * minsyms.h (iterate_over_minimal_symbols): Update.
11057         * minsyms.c (iterate_over_minimal_symbols): Take a
11058         gdb::function_view.
11059         * linespec.c (struct collect_minsyms): Remove.
11060         (compare_msyms): Now a std::sort comparator.
11061         (add_minsym): Add parameters.
11062         (search_minsyms_for_name): Update.  Use std::vector.
11063
11064 2018-04-03  Tom Tromey  <tom@tromey.com>
11065
11066         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11067         gdb::byte_vector.
11068
11069 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11070
11071         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11072
11073 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11074
11075         PR gdb/16959
11076         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11077         printing static type.
11078
11079 2018-04-01  Tom Tromey  <tom@tromey.com>
11080
11081         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11082         (rs6000_xfer_shared_libraries): Update.
11083
11084 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11085
11086         * common/gdb_vecs.h (char_ptr): Remove.
11087         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11088
11089 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11090
11091         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11092         with std::vector.
11093         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11094
11095 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11096
11097         * tracepoint.h (struct uploaded_tp): Initialize fields.
11098         <actions, step_actions, cmd_strings>: Change type to
11099         std::vector<char *>.
11100         * tracepoint.c (get_uploaded_tp): Allocate with new.
11101         (free_uploaded_tps): Free with delete.
11102         (parse_tracepoint_definition): Adjust to std::vector change.
11103         * breakpoint.c (read_uploaded_action): Likewise.
11104         (create_tracepoint_from_upload): Likewise.
11105         * ctf.c (ctf_write_uploaded_tp): Likewise.
11106         (SET_ARRAY_FIELD): Likewise.
11107         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11108
11109 2018-03-30  Tom Tromey  <tom@tromey.com>
11110
11111         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11112         std::unique_ptr.
11113         (svr4_keep_data_in_core): Update.
11114         (svr4_read_so_list): Update.
11115
11116 2018-03-30  Tom Tromey  <tom@tromey.com>
11117
11118         * windows-nat.c (handle_output_debug_string, handle_exception):
11119         Update.
11120         * target.h (target_read_string): Update.
11121         * target.c (target_read_string): Change "string" to
11122         unique_xmalloc_ptr.
11123         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11124         Update.
11125         * solib-frv.c (frv_current_sos): Update.
11126         * solib-dsbt.c (dsbt_current_sos): Update.
11127         * solib-darwin.c (darwin_current_sos): Update.
11128         * linux-thread-db.c (inferior_has_bug): Update.
11129         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11130         Update.  Remove alloca.
11131         * ada-lang.c (ada_main_name): Update.
11132
11133 2018-03-30  Tom Tromey  <tom@tromey.com>
11134
11135         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11136         (struct dwo_file_deleter): New.
11137         (dwo_file_up): New typedef.
11138         (open_and_init_dwo_file): Use dwo_file_up.
11139         (free_dwo_file_cleanup): Remove.
11140
11141 2018-03-30  Tom Tromey  <tom@tromey.com>
11142
11143         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11144         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11145
11146 2018-03-30  Tom Tromey  <tom@tromey.com>
11147
11148         * dwarf2read.c (class free_cached_comp_units): New class.
11149         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11150         (free_cached_comp_units): Remove function.
11151
11152 2018-03-30  Tom Tromey  <tom@tromey.com>
11153
11154         * utils.h (make_cleanup_unpush_target): Remove.
11155         * inf-ptrace.c (struct target_unpusher): New.
11156         (target_unpush_up) New typedef.
11157         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11158         target_unpush_up.
11159         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11160
11161 2018-03-27  Tom Tromey  <tom@tromey.com>
11162
11163         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11164
11165 2018-03-27  Pedro Alves  <palves@redhat.com>
11166             Tom Tromey  <tom@tromey.com>
11167
11168         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11169         destructor.  Now a class.
11170         (gdb_readline_wrapper_cleanup): Remove function.
11171         (gdb_readline_wrapper): Remove cleanups.
11172
11173 2018-03-27  Tom Tromey  <tom@tromey.com>
11174
11175         * typeprint.h (struct type_print_options) <local_typedefs,
11176         global_typedefs>: Remove "struct" keyword.
11177         (class typedef_hash_table): New class.
11178         (recursively_update_typedef_hash, add_template_parameters)
11179         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11180         (find_typedef_in_hash): Don't declare.
11181         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11182         (typedef_hash_table::recursively_update): Rename from
11183         recursively_update_typedef_hash.  Now a member.
11184         (typedef_hash_table::add_template_parameters): Rename from
11185         add_template_parameters.  Now a member.
11186         (typedef_hash_table::typedef_hash_table): Now a constructor;
11187         rename from create_typedef_hash.
11188         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11189         rename from free_typedef_hash.
11190         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11191         (do_free_global_table): Remove.
11192         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11193         from copy_type_recursive.
11194         (create_global_typedef_table): Remove.
11195         (typedef_hash_table::find_global_typedef): Now a member of
11196         typedef_hash_table.
11197         (typedef_hash_table::find_typedef): Rename from
11198         find_typedef_in_hash; now a member.
11199         (whatis_exp): Update.
11200         * extension.h (struct ext_lang_type_printers): Add constructor and
11201         destructor.
11202         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11203         declare.
11204         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11205         Now a constructor; rename from start_ext_lang_type_printers.
11206         (ext_lang_type_printers): Now a destructor; rename from
11207         free_ext_lang_type_printers.
11208         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11209         Update.
11210         (c_type_print_base_struct_union): Update.  Remove cleanups.
11211
11212 2018-03-27  Tom Tromey  <tom@tromey.com>
11213
11214         * dwarf-index-write.c: Include <cmath>.
11215
11216 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11217
11218         * NEWS: Add entry describing new "set|show varsize-limit" command.
11219         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11220         command.
11221         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11222         "set variable".
11223
11224 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11225
11226         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11227         dwarf-index-write.c
11228         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11229         * dwarf-index-common.c: New file.
11230         * dwarf-index-common.h: New file.
11231         * dwarf-index-write.c: New file.
11232         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11233         (struct dwarf2_section_info): Move from here.
11234         (dwarf2_section_info_def): Likewise.
11235         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11236         (offset_type): Likewise.
11237         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11238         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11239         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11240         (byte_swap): Likewise.
11241         (MAYBE_SWAP): Likewise.
11242         (dwarf2_per_cu_ptr): Likewise.
11243         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11244         (struct tu_stats): Likewise.
11245         (struct dwarf2_per_objfile): Likewise.
11246         (struct dwarf2_per_cu_data): Likewise.
11247         (struct signatured_type): Likewise.
11248         (sig_type_ptr): Likewise.
11249         (DEF_VEC_P (sig_type_ptr)): Likewise.
11250         (INDEX4_SUFFIX): Likewise.
11251         (INDEX5_SUFFIX): Likewise.
11252         (DEBUG_STR_SUFFIX): Likewise.
11253         (dwarf2_read_section): Make non-static.
11254         (mapped_index_string_hash): Move from here.
11255         (dwarf5_djb_hash): Likewise.
11256         (file_write): Likewise.
11257         (class data_buf): Likewise.
11258         (struct symtab_index_entry): Likewise.
11259         (struct mapped_symtab): Likewise.
11260         (find_slot): Likewise.
11261         (hash_expand): Likewise.
11262         (add_index_entry): Likewise.
11263         (uniquify_cu_indices): Likewise.
11264         (class c_str_view): Likewise.
11265         (class c_str_view_hasher): Likewise.
11266         (class vector_hasher): Likewise.
11267         (write_hash_table): Likewise.
11268         (psym_index_map): Likewise.
11269         (struct addrmap_index_data): Likewise.
11270         (add_address_entry): Likewise.
11271         (add_address_entry_worker): Likewise.
11272         (write_address_map): Likewise.
11273         (symbol_kind): Likewise.
11274         (write_psymbols): Likewise.
11275         (struct signatured_type_index_data): Likewise.
11276         (write_one_signatured_type): Likewise.
11277         (recursively_count_psymbols): Likewise.
11278         (recursively_write_psymbols): Likewise.
11279         (class debug_names): Likewise.
11280         (check_dwarf64_offsets): Likewise.
11281         (psyms_seen_size): Likewise.
11282         (write_gdbindex): Likewise.
11283         (write_debug_names): Likewise.
11284         (assert_file_size): Likewise.
11285         (write_psymtabs_to_index): Likewise.
11286         (save_gdb_index_command): Likewise.
11287         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11288         command.
11289         * dwarf2read.h: New file.
11290
11291 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11292
11293         PR gdb/22670
11294         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11295         symbol name if the CU's language stores symbol names in linkage
11296         format.
11297         * language.h (struct language_defn)
11298         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11299         all instances of this struct.
11300
11301 2018-03-26  Tom Tromey  <tom@tromey.com>
11302
11303         * stack.c (backtrace_command_1): Remove verbose code.
11304
11305 2018-03-26  Tom Tromey  <tom@tromey.com>
11306
11307         * python/py-framefilter.c (py_print_type): Don't catch
11308         exceptions.  Return void.
11309         (py_print_value): Likewise.
11310         (py_print_single_arg): Likewise.
11311         (enumerate_args): Don't catch exceptions.
11312         (py_print_args): Likewise.
11313         (py_print_frame): Likewise.
11314         (gdbpy_apply_frame_filter): Catch exceptions here.
11315
11316 2018-03-26  Tom Tromey  <tom@tromey.com>
11317
11318         * stack.c (_initialize_stack): Remove trailing newlines from help
11319         text.  Add "Usage" line to "backtrace" help.
11320
11321 2018-03-26  Tom Tromey  <tom@tromey.com>
11322
11323         PR python/16486:
11324         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11325
11326 2018-03-26  Tom Tromey  <tom@tromey.com>
11327
11328         * python/py-framefilter.c (py_print_single_arg): Return
11329         EXT_LANG_BT_ERROR from catch.
11330
11331 2018-03-26  Tom Tromey  <tom@tromey.com>
11332
11333         PR backtrace/15584:
11334         * stack.c (backtrace_command_1): Move some code into no-filters
11335         "if".
11336
11337 2018-03-26  Tom Tromey  <tom@tromey.com>
11338
11339         * python/py-framefilter.c (throw_quit_or_print_exception): New
11340         function.
11341         (gdbpy_apply_frame_filter): Use it.
11342
11343 2018-03-26  Tom Tromey  <tom@tromey.com>
11344
11345         PR cli/17716:
11346         * python/py-framefilter.c (py_print_type, py_print_value)
11347         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11348         RETURN_MASK_ERROR.
11349
11350 2018-03-26  Tom Tromey  <tom@tromey.com>
11351
11352         * python/py-framefilter.c (enumerate_args): Use
11353         gdb::unique_xmalloc_ptr.
11354
11355 2018-03-26  Tom Tromey  <tom@tromey.com>
11356
11357         * python/py-framefilter.c (py_print_frame): Return
11358         EXT_LANG_BT_OK.
11359         (gdbpy_apply_frame_filter): Update comment.
11360         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11361         Remove.
11362         <EXT_LANG_BT_NO_FILTERS>: Change value.
11363
11364 2018-03-26  Tom Tromey  <tom@tromey.com>
11365
11366         PR backtrace/15582:
11367         * stack.c (backtrace_command): Parse "hide" argument.
11368         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11369         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11370         constant.
11371
11372 2018-03-26  Tom Tromey  <tom@tromey.com>
11373
11374         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11375         add "flags".
11376         (backtrace_command): Remove "fulltrace", add "flags".
11377
11378 2018-03-26  Tom Tromey  <tom@tromey.com>
11379
11380         * stack.c (backtrace_command): Rewrite command line parsing.
11381
11382 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11383
11384         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11385
11386 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11387
11388         * filename-seen-cache.h: Add include guard.
11389
11390 2018-03-26  Keith Seitz  <keiths@redhat.com>
11391
11392         * symfile.c (place_section): Remove "struct" from section_addr_info
11393         in comment.
11394         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11395         "struct" keyword from section_addr_info.
11396
11397 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11398
11399         * regformats/regdef.h (reg): Add constructors.
11400
11401 2018-03-25  Pedro Alves  <palves@redhat.com>
11402
11403         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11404         if then/else bodies in var_func_name extraction.
11405
11406 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11407
11408         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11409         lookup_minimal_symbol() to find symbol entry.
11410         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11411
11412 2018-03-23  Keith Seitz  <keiths@redhat.com>
11413
11414         PR c++/22968
11415         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11416         nested type definitions for C++, too.
11417
11418 2018-03-23  Tom Tromey  <tom@tromey.com>
11419
11420         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11421         a typedef.
11422         (macho_register_oso): Remove.
11423         (macho_symtab_read): Take a std::vector.
11424         (oso_el_compare_name): Now a std::sort comparator.
11425         (macho_symfile_read_all_oso): Take a std::vector.
11426         (macho_symfile_read): Use std::vector.  Remove cleanups.
11427
11428 2018-03-22  Tom Tromey  <tom@tromey.com>
11429
11430         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11431         (record_full_goto_bookmark): Use std::string.
11432
11433 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11434
11435         PR tdep/18295
11436         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11437         a single mask.
11438
11439 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11440
11441         * rs6000-tdep.c (store_insn_p): New function.
11442         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11443         and cr_reg to their unshifted values. Use store_insn_p to
11444         match LR saves using either R1 or fdata->alloca_reg. Use
11445         store_insn_p to match CR saves. Set alloca_reg_offset
11446         when alloca_reg and framep are set. Remove lr_reg shift
11447         when assigning to fdata->lr_register.
11448
11449 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11450
11451         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11452         command line args instead of emitting a warning.
11453
11454 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11455
11456         * tracepoint.h (struct static_tracepoint_marker): Initialize
11457         fields, define default constructor, move constructor and move
11458         assignment, disable the rest.
11459         <str_id, extra>: Make std::string.
11460         (release_static_tracepoint_marker): Remove.
11461         (free_current_marker): Remove.
11462         * tracepoint.c (free_current_marker): Remove.
11463         (parse_static_tracepoint_marker_definition): Adjust to
11464         std::string, use new hex2str overload.
11465         (release_static_tracepoint_marker): Remove.
11466         (print_one_static_tracepoint_marker): Get marker by reference
11467         and adjust to std::string.
11468         (info_static_tracepoint_markers_command): Adjust to std::vector
11469         changes
11470         * target.h (static_tracepoint_marker_p): Remove typedef.
11471         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11472         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11473         bool.
11474         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11475         * target-debug.h
11476         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11477         (target_debug_print_std_vector_static_tracepoint_marker): New.
11478         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11479         to...
11480         (target_debug_print_static_tracepoint_marker_p): ... this.
11481         * target-delegates.c: Re-generate.
11482         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11483         Make std::string.
11484         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11485         (decode_static_tracepoint_spec): Adjust to std::vector.
11486         (tracepoint_print_one_detail): Adjust to std::string.
11487         (strace_marker_decode_location): Adjust to std::string.
11488         (update_static_tracepoint): Adjust to std::string, remove call
11489         to release_static_tracepoint_marker.
11490         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11491         Adjust to std::vector.
11492         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11493         (remote_static_tracepoint_markers_by_strid): Adjust to
11494         std::vector.
11495         * common/rsp-low.h (hex2str): New overload with explicit count
11496         of bytes.
11497         * common/rsp-low.c (hex2str): New overload with explicit count
11498         of bytes.
11499         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11500         (_initialize_rsp_low_selftests): Add test_hex2str test.
11501         * unittests/tracepoint-selftests.c
11502         (test_parse_static_tracepoint_marker_definition): Adjust to
11503         std::string.
11504
11505 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11506
11507         * tracepoint.c (parse_static_tracepoint_marker_definition):
11508         Consider case where the definition is followed by more
11509         definitions.
11510         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11511         tracepoint-selftests.c.
11512         * unittests/tracepoint-selftests.c: New.
11513
11514 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11515
11516         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11517         Carvalho.
11518
11519 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11520
11521         * symtab.c (find_pc_sect_line): fixed indentation.
11522
11523 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11524
11525         * symtab.c (find_pc_sect_line): now uses binary search.
11526
11527 2018-03-19  Tom Tromey  <tom@tromey.com>
11528
11529         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11530         "IDENT" production.
11531
11532 2018-03-19  Pedro Alves  <palves@redhat.com>
11533             Tom Tromey  <tom@tromey.com>
11534
11535         * unittests/observable-selftests.c: New file.
11536         * common/observable.h: New file.
11537         * observable.h: New file.
11538         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11539         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11540         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11541         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11542         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11543         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11544         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11545         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11546         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11547         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11548         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11549         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11550         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11551         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11552         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11553         tui/tui-interp.c, valops.c: Update all users.
11554         * tui/tui-hooks.c (tui_bp_created_observer)
11555         (tui_bp_deleted_observer, tui_bp_modified_observer)
11556         (tui_inferior_exit_observer, tui_before_prompt_observer)
11557         (tui_normal_stop_observer, tui_register_changed_observer):
11558         Remove.
11559         (tui_observers_token): New global.
11560         (attach_or_detach, tui_attach_detach_observers): New functions.
11561         (tui_install_hooks, tui_remove_hooks): Use
11562         tui_attach_detach_observers.
11563         * record-btrace.c (record_btrace_thread_observer): Remove.
11564         (record_btrace_thread_observer_token): New global.
11565         * observer.sh: Remove.
11566         * observer.c: Rename to observable.c.
11567         * observable.c (namespace gdb_observers): Define new objects.
11568         (observer_debug): Move into gdb_observers namespace.
11569         (struct observer, struct observer_list, xalloc_observer_list_node)
11570         (xfree_observer_list_node, generic_observer_attach)
11571         (generic_observer_detach, generic_observer_notify): Remove.
11572         (_initialize_observer): Update.
11573         Don't include observer.inc.
11574         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11575         (clean mostlyclean): Likewise.
11576         (observer.h, observer.inc): Remove targets.
11577         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11578         (COMMON_SFILES): Use observable.c, not observer.c.
11579         * .gitignore: Remove observer.h.
11580
11581 2018-03-18  Tom Tromey  <tom@tromey.com>
11582
11583         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11584         gdb::def_vector.
11585         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11586
11587 2018-03-17  Tom Tromey  <tom@tromey.com>
11588
11589         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11590
11591 2018-03-17  Tom Tromey  <tom@tromey.com>
11592
11593         * target.c (class scoped_target_fd): New.
11594         (target_fileio_close_cleanup): Remove.
11595         (target_fileio_read_alloc_1): Use scoped_target_fd.
11596
11597 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11598
11599         * silent-rules.mk: New.
11600         * Makefile.in: Include silent-rules.mk
11601         (srcdir, VPATH, top_srcdir): Move up.
11602         (COMPILE): Add ECHO_CXX.
11603         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11604         (init.c): Add ECHO_INIT_C.
11605         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11606         (version.c): Add ECHO_GEN.
11607         (printcmd.o): Add ECHO_CXX.
11608         (target-float.o): Add ECHO_CXX.
11609         (ada-exp.o): Add ECHO_CXX.
11610         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11611         (insight$(EXEEXT)): Add ECHO_CXXLD.
11612         * gnulib/configure.ac: Add AM_SILENT_RULES.
11613         * gnulib/aclocal.m4: Re-generate.
11614         * gnulib/configure: Re-generate.
11615         * gnulib/import/Makefile.in: Re-generate.
11616
11617 2018-03-16  Tom Tromey  <tom@tromey.com>
11618
11619         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11620         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11621         * utils.c (do_free_section_addr_info)
11622         (make_cleanup_free_section_addr_info): Remove.
11623         * symfile.h (struct other_sections): Add constructor.
11624         (struct section_addr_info): Remove.
11625         (section_addr_info): New typedef.
11626         (struct sym_fns) <sym_offsets>: Change type of parameter.
11627         (build_section_addr_info_from_objfile)
11628         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11629         (default_symfile_offsets, symbol_file_add)
11630         (symbol_file_add_from_bfd)
11631         (build_section_addr_info_from_section_table): Update.
11632         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11633         * symfile.c (alloc_section_addr_info): Remove.
11634         (build_section_addr_info_from_section_table): Change return type.
11635         Update.
11636         (build_section_addr_info_from_bfd)
11637         (build_section_addr_info_from_objfile): Likewise.
11638         (free_section_addr_info): Remove.
11639         (relative_addr_info_to_section_offsets): Change type of "addrs".
11640         (addrs_section_compar): Now a std::sort comparator.
11641         (addrs_section_sort): Change return type.
11642         (addr_info_make_relative): Change type of "addrs".  Update.
11643         (default_symfile_offsets, syms_from_objfile_1)
11644         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11645         (symbol_file_add_separate): Update.
11646         (symbol_file_add): Change type of "addrs".  Update.
11647         (add_symbol_file_command): Update.  Remove cleanups.
11648         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11649         cleanups.
11650         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11651         * solib.c (solib_read_symbols): Update.
11652         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11653         * machoread.c (macho_symfile_offsets): Update.
11654         * jit.c (jit_bfd_try_read_symtab): Update.
11655
11656 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11657
11658         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11659         unittests/utils-selftests.c.
11660         * unittests/utils-selftests.c: New file.
11661
11662 2018-03-14  Tom Tromey  <tom@tromey.com>
11663
11664         PR cli/14977:
11665         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11666         for NULL.
11667
11668 2018-03-14  Tom Tromey  <tom@tromey.com>
11669
11670         PR cli/19918:
11671         * printcmd.c (printf_pointer): Allow "-" in format.
11672
11673 2018-03-14  Tom Tromey  <tom@tromey.com>
11674
11675         * printcmd.c (_initialize_printcmd): Add usage to printf.
11676
11677 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11678
11679         * MAINTAINERS: Update my email address.
11680
11681 2018-03-13  Tom Tromey  <tom@tromey.com>
11682
11683         * machoread.c (macho_check_dsym): Change filenamep to a
11684         std::string*.
11685         (macho_symfile_read): Update.
11686         * symfile.c (load_command): Use std::string.
11687
11688 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11689
11690         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11691         to error message string.
11692         (riscv_register_name): Use xsnprintf instead of sprintf.
11693         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11694         internal_error.
11695         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11696         error.
11697         (riscv_push_dummy_call): Likewise.
11698
11699 2018-03-12  Tom Tromey  <tom@tromey.com>
11700
11701         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11702         Use gdb::byte_vector.
11703         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11704
11705 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11706
11707         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11708         parameter type to readable_regcache.
11709         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11710         the declaration.
11711
11712 2018-03-11  Tom Tromey  <tom@tromey.com>
11713
11714         * dwarf2read.c (struct nextfield): Add initializers.
11715         (struct nextfnfield): Remove.
11716         (struct fnfieldlist): Add initializers.  Remove "length" and
11717         "head", use std::vector.
11718         (struct decl_field_list): Remove.
11719         (struct field_info): Add initializers.
11720         <fields, baseclasses>: Now std::vector.
11721         <nbaseclasses, nfnfields, typedef_field_list_count,
11722         nested_types_list_count>: Remove.
11723         (dwarf2_add_field, dwarf2_add_type_defn)
11724         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11725         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11726         (process_structure_scope): Update.
11727
11728 2018-03-11  Tom Tromey  <tom@tromey.com>
11729
11730         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11731         for use by std::sort.
11732         (build_type_psymtabs_1): Use std::vector.
11733
11734 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11735
11736         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11737         and LIBMPFR in the printed configuration.
11738
11739 2018-03-08  Tom Tromey  <tom@tromey.com>
11740
11741         * source.c (get_filename_and_charpos): Use scoped_fd.
11742         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11743         (procfs_pidlist): Likewise.
11744         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11745         (iterate_over_mappings): Likewise.
11746
11747 2018-03-08  Tom Tromey  <tom@tromey.com>
11748
11749         * infcall.c (struct call_return_meta_info)
11750         <stack_temporaries_enabled>: Remove.
11751         (get_call_return_value, call_function_by_hand_dummy): Update.
11752         * thread.c (disable_thread_stack_temporaries): Remove.
11753         (enable_thread_stack_temporaries): Remove.
11754         (thread_stack_temporaries_enabled_p): Return bool.
11755         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11756         (get_last_thread_stack_temporary): Update.
11757         * eval.c (evaluate_subexp): Update.
11758         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11759         class, not a function.
11760         (value_ptr, value_vec): Remove typedefs.
11761         (class thread_info) <stack_temporaries_enabled>: Now bool.
11762         <stack_temporaries>: Now a std::vector.
11763         (thread_stack_temporaries_enabled_p)
11764         (value_in_thread_stack_temporaries): Return bool.
11765
11766 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11767
11768         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11769         (getpkt_or_notif_sane_1): Likewise.
11770
11771 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11772
11773         * build-id.c (build_id_to_debug_bfd): Use std::string.
11774
11775 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11776
11777         * build-id.c (find_separate_debug_file_by_buildid): Return
11778         std::string.
11779         * build-id.h (find_separate_debug_file_by_buildid): Return
11780         std::string.
11781         * coffread.c (coff_symfile_read): Adjust to std::string.
11782         * elfread.c (elf_symfile_read): Adjust to std::string.
11783         * symfile.c (separate_debug_file_exists): Change parameter to
11784         std::string.
11785         (find_separate_debug_file): Return std::string.
11786         (find_separate_debug_file_by_debuglink): Return std::string.
11787         * symfile.h (find_separate_debug_file_by_debuglink): Return
11788         std::string.
11789
11790 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11791
11792         * common/xml-utils.c (xml_escape_text): Move code to...
11793         (xml_escape_text_append): ... this new function.
11794         * common/xml-utils.h (xml_escape_text_append): New declaration.
11795         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11796         New function.
11797         (_initialize_xml_utils): register test_xml_escape_text_append as
11798         a selftest.
11799
11800 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11801
11802         * defs.h: Remove MAX_REGISTER_SIZE.
11803         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11804         asserts.
11805         * python/py-unwind.c (pyuw_sniffer): Likewise.
11806
11807 2018-03-07  Tom Tromey  <tom@tromey.com>
11808
11809         * linux-tdep.c (linux_info_proc): Update.
11810         * target.h (struct target_ops) <to_fileio_readlink>: Return
11811         optional<string>.
11812         (target_fileio_readlink): Return optional<string>.
11813         * remote.c (remote_hostio_readlink): Return optional<string>.
11814         * inf-child.c (inf_child_fileio_readlink): Return
11815         optional<string>.
11816         * target.c (target_fileio_readlink): Return optional<string>.
11817
11818 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11819
11820         * regcache.c (cooked_read_test): Add riscv to the list of
11821         architectures that have a save_reggroup.
11822
11823 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11824
11825         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11826         value is not a dynamic class object.
11827
11828 2018-03-06  Tom Tromey  <tom@tromey.com>
11829
11830         * rust-exp.y: Formatting fixes.
11831
11832 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11833
11834         * riscv-tdep.c (riscv_register_name): Remove target description
11835         support.
11836         (riscv_gdbarch_init): Remove target description check.
11837
11838 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11839
11840         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11841         comment.
11842         * riscv-tdep.h: Likewise.
11843
11844 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11845
11846         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11847         (riscv_pseudo_register_write): Delete.
11848         (riscv_gdbarch_init): Remove all use of pseudo registers.
11849
11850 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11851
11852         * record-btrace.c (btrace_print_lines): Replace cleanup
11853         parameter with RAII equivalents.
11854         (btrace_insn_history): Replace cleanup with RAII equivalents.
11855         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11856         make_cleanup_ui_out_tuple_begin_end): Remove.
11857         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11858         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11859         make_cleanup_ui_out_list_begin_end): Remove.
11860
11861 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11862
11863         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11864         parameter types to std::vector.  Use bool.
11865         (record_btrace_wait): Replace VEC(tp_t) with
11866         std::vector<thread_info *>.
11867         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11868
11869 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11870
11871         * record-btrace.c (record_btrace_disable_callback): Remove.
11872         (struct scoped_btrace_disable): New.
11873         (record_btrace_open): Use scoped_btrace_disable.
11874
11875 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11876
11877         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11878         reading values from registers.
11879
11880 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11881
11882         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11883         where appropriate.
11884
11885 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11886
11887         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11888         change parameter type.  Use GDB's print functions, and use
11889         core_addr_to_string where appropriate.
11890         (riscv_push_dummy_call): Use core_addr_to_string where
11891         appropriate, update call to riscv_print_arg_location, and reindent
11892         a few lines.
11893         (riscv_return_value): Update call to riscv_print_arg_location.
11894
11895 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11896             Tim Newsome <tim@sifive.com>
11897             Albert Ou <a0u@eecs.berkeley.edu>
11898             Darius Rad <darius@bluespec.com>
11899
11900         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11901         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11902         (ALLDEPFILES): Add riscv-tdep.c
11903         * configure.tgt: Add riscv support.
11904         * riscv-tdep.c: New file.
11905         * riscv-tdep.h: New file.
11906         * NEWS: Mention new target.
11907         * MAINTAINERS: Add entry for riscv.
11908
11909 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11910
11911         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11912         fields within aggregates.
11913
11914 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11915
11916         * record-btrace.c (btrace_print_lines): Change type of flags to
11917         gdb_disassembly_flags.
11918
11919 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11920
11921         * fbsd-nat.c: Include "inf-ptrace.h".
11922         (USE_SIGTRAP_SIGINFO): Conditionally define.
11923         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11924         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11925         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11926         function.
11927         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11928         Likewise.
11929         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11930         Likewise.
11931         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11932         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11933         "supports_stopped_by_hw_breakpoint" target methods.
11934
11935 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11936
11937         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11938         * fbsd-nat.c (debug_fbsd_nat): New variable.
11939         (show_fbsd_nat_debug): New function.
11940         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11941         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11942
11943 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11944
11945         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11946         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11947         prototype.
11948         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11949         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11950         method.
11951
11952 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11953
11954         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11955         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11956
11957 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11958
11959         * charset.c (struct charset_vector): New.
11960         (charsets): Change type to charset_vector.
11961         (find_charset_names): Adjust.
11962         (add_one): Adjust.
11963         (_initialize_charset): Adjust.
11964
11965 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11966
11967         * progspace.h (struct program_space) <deleted_solibs>: Change
11968         type to std::vector<std::string>.
11969         * progspace.c (clear_program_space_solib_cache): Adjust.
11970         * breakpoint.c (print_solib_event): Adjust.
11971         (check_status_catch_solib): Adjust.
11972         * solib.c (update_solib_list): Adjust.
11973         * ui-out.h (class ui_out) <field_string>: New overload.
11974         * ui-out.c (ui_out::field_string): New overload.
11975
11976 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11977
11978         * progspace.h (struct program_space): Add constructor and
11979         destructor, initialize fields.
11980         (add_program_space): Remove.
11981         * progspace.c (add_program_space): Rename to...
11982         (program_space::program_space): ... this.
11983         (release_program_space): Rename to...
11984         (program_space::~program_space): ... this.
11985         (delete_program_space): Use delete to delete program_space.
11986         (initialize_progspace): Use new to allocate program_space.
11987         * inferior.c (add_inferior_with_spaces): Likewise.
11988         (clone_inferior_command): Likewise.
11989         * infrun.c (follow_fork_inferior): Likewise.
11990         (handle_vfork_child_exec_or_exit): Likewise.
11991
11992 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11993
11994         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11995         (delim_string_to_char_ptr_vec): Return std::vector of
11996         gdb::unique_xmalloc_ptr.
11997         (dirnames_to_char_ptr_vec_append): Take std::vector of
11998         gdb::unique_xmalloc_ptr.
11999         (dirnames_to_char_ptr_vec): Return std::vector of
12000         gdb::unique_xmalloc_ptr.
12001         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12002         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12003         (delim_string_to_char_ptr_vec): Return an std::vector of
12004         gdb::unique_xmalloc_ptr, adjust the code.
12005         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12006         gdb::unique_xmalloc_ptr, adjust the code.
12007         (dirnames_to_char_ptr_vec): Return an std::vector of
12008         gdb::unique_xmalloc_ptr, adjust the code.
12009         * auto-load.c (auto_load_safe_path_vec): Change type to
12010         std::vector of gdb::unique_xmalloc_ptr.
12011         (auto_load_expand_dir_vars): Return an std::vector of
12012         gdb::unique_xmalloc_ptr, adjust the code.
12013         (auto_load_safe_path_vec_update): Adjust.
12014         (filename_is_in_auto_load_safe_path_vec): Adjust.
12015         (auto_load_objfile_script_1): Adjust.
12016         * build-id.c (build_id_to_debug_bfd): Adjust.
12017         * linux-thread-db.c (thread_db_load_search): Adjust.
12018         * source.c (add_path): Adjust.
12019         (openp): Adjust.
12020         * symfile.c (find_separate_debug_file): Adjust.
12021         * utils.c (do_free_char_ptr_vec): Remove.
12022         (make_cleanup_free_char_ptr_vec): Remove.
12023
12024 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12025
12026         PR gdb/22907
12027         * common/pathstuff.c: Conditionally include "<windows.h>".
12028
12029 2018-03-01  Georg Sauthoff  <mail@georg.so>
12030
12031         PR gdb/22888
12032         * gcore.in: Quote variables and switch interpreter to bash.
12033
12034 2018-03-01  Tom Tromey  <tom@tromey.com>
12035
12036         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12037         assertion.  Add assertion for discriminant_index.
12038         (quirk_rust_enum): Use correct base type name in univariant case.
12039
12040 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12041
12042         * record.c (get_call_history_modifiers): Return a
12043         record_print_flags.
12044         (cmd_record_call_history): Adjust.
12045         * record-btrace.c (record_btrace_call_history): Adjust.
12046         (record_btrace_call_history_range): Adjust.
12047         (record_btrace_call_history_from): Adjust.
12048         * target-debug.h (target_debug_print_record_print_flags): New.
12049         * target-delegates.c: Re-generate.
12050         * target.c (target_call_history): Change flags type.
12051         (target_call_history_from): Likewise.
12052         (target_call_history_range): Likewise.
12053         * target.h (struct target_ops) <target_call_history>: Likewise.
12054         (target_call_history_from): Likewise.
12055         (target_call_history_range): Likewise.
12056
12057 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12058             Simon Marchi  <simon.marchi@polymtl.ca>
12059
12060         * common/common-utils.c: Include "sys/stat.h".
12061         (is_regular_file): Move here from "source.c"; change return
12062         type to "bool".
12063         * common/common-utils.h (is_regular_file): New prototype.
12064         * common/pathstuff.c (contains_dir_separator): New function.
12065         * common/pathstuff.h (contains_dir_separator): New prototype.
12066         * source.c: Don't include "sys/stat.h".
12067         (is_regular_file): Move to "common/common-utils.c".
12068
12069 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12070
12071         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12072         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12073         * auto-load.c: Include "common/pathstuff.h".
12074         * common/common-def.h (current_directory): Move here.
12075         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12076         function.
12077         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12078         prototype.
12079         * common/pathstuff.c: New file.
12080         * common/pathstuff.h: New file.
12081         * compile/compile.c: Include "common/pathstuff.h".
12082         * defs.h (current_directory): Move to "common/common-defs.h".
12083         * dwarf2read.c: Include "common/pathstuff.h".
12084         * exec.c: Likewise.
12085         * guile/scm-safe-call.c: Likewise.
12086         * linux-thread-db.c: Likewise.
12087         * main.c: Likewise.
12088         * nto-tdep.c: Likewise.
12089         * objfiles.c: Likewise.
12090         * source.c: Likewise.
12091         * symtab.c: Likewise.
12092         * utils.c: Include "common/pathstuff.h".
12093         (gdb_realpath): Move to "common/pathstuff.c".
12094         (gdb_realpath_keepfile): Likewise.
12095         (gdb_abspath): Likewise.
12096         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12097         (gdb_realpath_keepfile): Likewise.
12098         (gdb_abspath): Likewise.
12099
12100 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12101
12102         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12103         wildcard process pid for super_resume for kernels with a
12104         specific bug.
12105
12106 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12107
12108         * compile/compile.c (get_args): Add additional comments
12109         explaining function.
12110
12111 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12112             Tom Tromey  <tom@tromey.com>
12113
12114         * target.h (memory_write_request_s): Remove typedef.  Don't define
12115         VEC.
12116         (target_write_memory_blocks): Change argument to std::vector.
12117         (struct memory_write_request): Add constructor.
12118         * target-memory.c (compare_block_starting_address): Return bool.
12119         Change argument types.
12120         (claim_memory): Change arguments to use std::vector.
12121         (split_regular_and_flash_blocks, blocks_to_erase)
12122         (compute_garbled_blocks): Likewise.
12123         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12124         (target_write_memory_blocks): Change argument to std::vector.
12125         * symfile.c (struct load_section_data): Add constructor and
12126         destructor.  Use std::vector for "requests".
12127         (struct load_progress_data): Add initializers.
12128         (load_section_callback): Update.  Use "new".
12129         (clear_memory_write_data): Remove.
12130         (generic_load): Update.
12131
12132 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12133
12134         * arch/aarch64.h: Use common/tdesc.h.
12135
12136 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12137
12138         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12139         architecture with a 64-bit ABI.
12140
12141 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12142
12143         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12144         ahead of target description loading.
12145
12146 2018-02-26  Tom Tromey  <tom@tromey.com>
12147
12148         * stack.c (backtrace_command_1): Update.
12149         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12150         of "flags".
12151         * python/py-framefilter.c (py_print_frame)
12152         (gdbpy_apply_frame_filter): Change type of "flags".
12153         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12154         of "flags".
12155         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12156         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12157         * extension.h (enum frame_filter_flag): Rename from
12158         frame_filter_flags.
12159         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12160         (apply_ext_lang_frame_filter): Change type of "flags".
12161         * extension.c (apply_ext_lang_frame_filter): Change type of
12162         "flags".
12163         * extension-priv.h (struct extension_language_ops)
12164         <apply_frame_filter>: Change type of "flags".
12165
12166 2018-02-26  Tom Tromey  <tom@tromey.com>
12167
12168         PR python/16497:
12169         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12170         off-by-one in py_end computation.
12171         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12172         PRINT_MORE_FRAMES.
12173         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12174         constant.
12175
12176 2018-02-26  Tom Tromey  <tom@tromey.com>
12177
12178         * dwarf2read.c (struct variant_field): New.
12179         (struct nextfield) <variant>: New field.
12180         (dwarf2_add_field): Handle DW_TAG_variant_part.
12181         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12182         discriminated union.
12183         (read_structure_type): Handle DW_TAG_variant_part.
12184         (handle_struct_member_die): New function, extracted from
12185         process_structure_scope.  Handle DW_TAG_variant.
12186         (process_structure_scope): Handle discriminated unions.  Call
12187         handle_struct_member_die.
12188
12189 2018-02-26  Tom Tromey  <tom@tromey.com>
12190
12191         * rust-lang.h (rust_last_path_segment): Declare.
12192         * rust-lang.c (rust_last_path_segment): Now public.  Change
12193         contract.
12194         (struct disr_info): Remove.
12195         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12196         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12197         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12198         (rust_enum_p, rust_enum_variant): New function.
12199         (rust_underscore_fields): Remove "offset" parameter.
12200         (rust_print_enum): New function.
12201         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12202         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12203         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12204         enums.
12205         (rust_internal_print_type): New function, from rust_print_type.
12206         Remove enum code.
12207         (rust_print_type): Call rust_internal_print_type.
12208         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12209         Update enum handling.
12210         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12211         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12212         (rust_union_quirks): New functions.
12213         (process_full_comp_unit, process_full_type_unit): Call
12214         rust_union_quirks.
12215         (process_structure_scope): Update rust_unions if necessary.
12216
12217 2018-02-26  Tom Tromey  <tom@tromey.com>
12218
12219         * value.h (value_union_variant): Declare.
12220         * valops.c (value_union_variant): New function.
12221         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12222         (struct discriminant_info): New.
12223         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12224         enumerator.
12225         (struct main_type) <flag_discriminated_union>: New field.
12226
12227 2018-02-26  Tom Tromey  <tom@tromey.com>
12228
12229         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12230         unittests/unpack-selftests.c.
12231         * unittests/unpack-selftests.c: New file.
12232         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12233
12234 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12235
12236         * dwarf2read.c (struct partial_die_info) <read>: New method.
12237         (read_partial_die): Remove the declaration.
12238         (load_partial_dies): Update.
12239         (partial_die_info::partial_die_info):
12240         (read_partial_die): Change it to partial_die_info::read.
12241
12242 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12243
12244         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12245         (fixup_partial_die): Remove declaration.
12246         (scan_partial_symbols): Update.
12247         (partial_die_parent_scope): Likewise.
12248         (partial_die_full_name): Likewise.
12249         (fixup_partial_die): Change it to partial_die_info::fixup.
12250
12251 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12252
12253         * dwarf2read.c (read_partial_die): Update the declaration.
12254         (load_partial_dies): Caller update.
12255         (read_partial_die): Remove one argument abbrev_len.
12256
12257 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12258
12259         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12260         assignment operator.
12261         (load_partial_dies): Use ctor and copy ctor.
12262         (read_partial_die): Update.
12263         (dwarf2_cu::find_partial_die): Use ctor.
12264
12265 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12266
12267         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12268         (find_partial_die_in_comp_unit): Change it to
12269         dwarf2_cu::find_partial_die.
12270         (find_partial_die): Update.
12271
12272 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12273
12274         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12275         is NULL.
12276
12277 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12278
12279         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12280
12281 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12282
12283         * arch/amd64.h: Use common/tdesc.h.
12284         * arch/i386.c: Likewise.
12285         * arch/i386.h: Likewise.
12286         * arch/tic6x.c: Likewise.
12287         * arch/tdesc.h: Move file from here...
12288         * common/tdesc.h: ...to here.
12289         * features/aarch64-core.c: Regenerate.
12290         * features/aarch64-fpu.c: Regenerate.
12291         * features/i386/32bit-avx.c: Regenerate.
12292         * features/i386/32bit-avx512.c: Regenerate.
12293         * features/i386/32bit-core.c: Regenerate.
12294         * features/i386/32bit-linux.c: Regenerate.
12295         * features/i386/32bit-mpx.c: Regenerate.
12296         * features/i386/32bit-pkeys.c: Regenerate.
12297         * features/i386/32bit-sse.c: Regenerate.
12298         * features/i386/64bit-avx.c: Regenerate.
12299         * features/i386/64bit-avx512.c: Regenerate.
12300         * features/i386/64bit-core.c: Regenerate.
12301         * features/i386/64bit-linux.c: Regenerate.
12302         * features/i386/64bit-mpx.c: Regenerate.
12303         * features/i386/64bit-pkeys.c: Regenerate.
12304         * features/i386/64bit-segments.c: Regenerate.
12305         * features/i386/64bit-sse.c: Regenerate.
12306         * features/i386/x32-core.c: Regenerate.
12307         * features/tic6x-c6xp.c: Regenerate.
12308         * features/tic6x-core.c: Regenerate.
12309         * features/tic6x-gp.c: Regenerate.
12310         * target-descriptions.c: Use common/tdesc.h.
12311         * target-descriptions.h: Likewise.
12312
12313 2018-02-24  Tom Tromey  <tom@tromey.com>
12314
12315         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12316         (try_thread_db_load_from_dir, thread_db_load_search): Use
12317         std::string.
12318         (info_auto_load_libthread_db_compare): Return bool.  Change
12319         argument types.
12320         (info_auto_load_libthread_db): Use std::vector, std::string.
12321         Remove cleanups.
12322
12323 2018-02-24  Tom Tromey  <tom@tromey.com>
12324
12325         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12326         std::string.
12327         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12328         std::string*.
12329         * gdbarch.c: Rebuild.
12330         * gdbarch.h: Rebuild.
12331         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12332         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12333         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12334         std::string*.
12335
12336 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12337
12338         * gdbtypes.h (sect_offset): Change type to uint64_t.
12339         (sect_offset_str): New function.
12340         * dwarf2read.c (create_addrmap_from_aranges): Use
12341         sect_offset_str.
12342         (error_check_comp_unit_head): Likewise.
12343         (create_debug_type_hash_table): Likewise.
12344         (read_cutu_die_from_dwo): Likewise.
12345         (init_cutu_and_read_dies): Likewise.
12346         (init_cutu_and_read_dies_no_follow): Likewise.
12347         (process_psymtab_comp_unit_reader): Likewise.
12348         (partial_die_parent_scope): Likewise.
12349         (peek_die_abbrev): Likewise.
12350         (process_queue): Likewise.
12351         (dwarf2_physname): Likewise.
12352         (read_namespace_alias): Likewise.
12353         (read_import_statement): Likewise.
12354         (create_dwo_cu_reader): Likewise.
12355         (create_cus_hash_table): Likewise.
12356         (lookup_dwo_cutu): Likewise.
12357         (inherit_abstract_dies): Likewise.
12358         (read_func_scope): Likewise.
12359         (read_call_site_scope): Likewise.
12360         (dwarf2_add_member_fn): Likewise.
12361         (read_common_block): Likewise.
12362         (read_module_type): Likewise.
12363         (read_typedef): Likewise.
12364         (read_subrange_type): Likewise.
12365         (load_partial_dies): Likewise.
12366         (read_partial_die): Likewise.
12367         (find_partial_die): Likewise.
12368         (read_str_index): Likewise.
12369         (dwarf2_string_attr): Likewise.
12370         (build_error_marker_type): Likewise.
12371         (lookup_die_type): Likewise.
12372         (dump_die_shallow): Likewise.
12373         (follow_die_ref): Likewise.
12374         (dwarf2_fetch_die_loc_sect_off): Likewise.
12375         (dwarf2_fetch_constant_bytes): Likewise.
12376         (follow_die_sig): Likewise.
12377         (get_signatured_type): Likewise.
12378         (get_DW_AT_signature_type): Likewise.
12379         (dwarf2_find_containing_comp_unit): Likewise.
12380         (set_die_type): Likewise.
12381
12382 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12383
12384         * arch/aarch64.c: Include "common-defs.h".
12385         * arch/amd64.c: Likewise.
12386         * arch/i386.c: Likewise.
12387
12388 2018-02-21  Tom Tromey  <tom@tromey.com>
12389
12390         * value.h: (extract_field_op): Update.
12391         * eval.c (extract_field_op): Return a const char *.
12392         * expression.h (parse_expression_for_completion): Update.
12393         * completer.c (complete_expression): Update.
12394         (add_struct_fields): Make fieldname const.
12395         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12396         (mark_completion_tag, parse_exp_in_context_1): Update.
12397         (parse_expression_for_completion): Change "name" to
12398         unique_xmalloc_ptr*.
12399
12400 2018-02-21  Tom Tromey  <tom@tromey.com>
12401
12402         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12403
12404 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12405
12406         * avr-tdep.c (avr_read_pc): Change parameter type to
12407         readable_regcache.
12408         * gdbarch.sh (read_pc): Likewise.
12409         * gdbarch.c: Re-generated.
12410         * gdbarch.h: Re-generated.
12411         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12412         readable_regcache.
12413         * ia64-tdep.c (ia64_read_pc): Likewise.
12414         * mips-tdep.c (mips_read_pc): Likewise.
12415         * spu-tdep.c (spu_read_pc): Likewise.
12416
12417 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12418
12419         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12420         * regcache-dump.c: New file.
12421         * regcache.c: Move register_dump to regcache-dump.c.
12422         (maintenance_print_registers): Likewise.
12423         (maintenance_print_raw_registers): Likewise.
12424         (maintenance_print_cooked_registers): Likewise.
12425         (maintenance_print_register_groups): Likewise.
12426         (maintenance_print_remote_registers): Likewise.
12427         (_initialize_regcache): Likewise.
12428         * regcache.h (register_dump): Moved from regcache.c.
12429
12430 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12431
12432         * regcache.c (regcache::regcache): Update.
12433         (regcache::invalidate): Move it to detached_regcache::invalidate.
12434         (get_thread_arch_aspace_regcache): Update.
12435         (regcache::raw_update): Update.
12436         (regcache::cooked_read): Remove some code.
12437         (regcache::cooked_read_value): Likewise.
12438         (regcache::raw_write): Remove assert on m_readonly_p.
12439         (regcache::raw_supply_integer): Move it to
12440         detached_regcache::raw_supply_integer.
12441         (regcache::raw_supply_zeroed): Likewise.
12442         * regcache.h (detached_regcache) <raw_supply_integer>: New
12443         declaration.
12444         <raw_supply_zeroed, invalidate>: Likewise.
12445         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12446         <invalidate>: Likewise.
12447         <m_readonly_p>: Removed.
12448
12449 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12450
12451         * infcmd.c (get_return_value): Let stop_regs point to
12452         get_current_regcache.
12453         * regcache.c (regcache::regcache): Remove.
12454         (register_dump_reg_buffer): New class.
12455         (regcache_print): Adjust.
12456         * regcache.h (regcache): Remove constructors.
12457
12458 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12459
12460         * regcache.c (class register_dump): New class.
12461         (register_dump_regcache, register_dump_none): New class.
12462         (register_dump_remote, register_dump_groups): New class.
12463         (regcache_print): Update.
12464         * regcache.h (regcache_dump_what): Move it to regcache.c.
12465         (regcache) <dump>: Remove.
12466
12467 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12468
12469         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12470          reg_buffer_rw *.
12471         (jit_unwind_reg_set_impl): Call raw_supply.
12472         (jit_frame_sniffer): Use reg_buffer_rw.
12473         * record-full.c (record_full_core_regbuf): Change its type.
12474         (record_full_core_open_1): Use reg_buffer_rw.
12475         (record_full_close): Likewise.
12476         (record_full_core_fetch_registers): Use regcache->raw_supply.
12477         (record_full_core_store_registers): Likewise.
12478         * regcache.c (regcache::get_register_status): Move it to
12479         reg_buffer.
12480         (regcache_raw_set_cached_value): Remove.
12481         (regcache::raw_set_cached_value): Remove.
12482         (regcache::raw_write): Call raw_supply.
12483         (regcache::raw_supply): Move it to reg_buffer_rw.
12484         * regcache.h (regcache_raw_set_cached_value): Remove.
12485         (reg_buffer_rw): New class.
12486
12487 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12488
12489         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12490         readonly_detached_regcache.
12491         (dummy_frame_prev_register): Use regcache->cooked_read.
12492         * frame.c (frame_save_as_regcache): Change return type.
12493         (frame_pop): Update.
12494         * frame.h (frame_save_as_regcache): Update declaration.
12495         * inferior.h (get_infcall_suspend_state_regcache): Update
12496         declaration.
12497         * infrun.c (infcall_suspend_state) <registers>: use
12498         readonly_detached_regcache.
12499         (save_infcall_suspend_state): Don't use regcache_dup.
12500         (get_infcall_suspend_state_regcache): Change return type.
12501         * linux-fork.c (struct fork_info) <savedregs>: Change to
12502         readonly_detached_regcache.
12503         <pc>: New field.
12504         (fork_save_infrun_state): Don't use regcache_dup.
12505         (info_checkpoints_command): Adjust.
12506         * mi/mi-main.c (register_changed_p): Update declaration.
12507         (mi_cmd_data_list_changed_registers): Use
12508         readonly_detached_regcache.
12509         (register_changed_p): Change parameter type to
12510         readonly_detached_regcache.
12511         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12512         readonly_detached_regcache.
12513         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12514         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12515         New.
12516         (regcache::save): Move it to reg_buffer.
12517         (regcache::restore): Change parameter type.
12518         (regcache_dup): Remove.
12519         * regcache.h (reg_buffer) <save>: New method.
12520         (readonly_detached_regcache): New class.
12521         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12522         readonly_detached_regcache.
12523         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12524
12525 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12526
12527         * frame.c (frame_save_as_regcache): Use regcache method save.
12528         (frame_pop): Use regcache method restore.
12529         * infrun.c (restore_infcall_suspend_state): Likewise.
12530         * linux-fork.c (fork_load_infrun_state): Likewise.
12531         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12532         save.
12533         * regcache.c (regcache_save): Remove.
12534         (regcache::restore): More asserts.
12535         (regcache_cpy): Remove.
12536         * regcache.h (regcache_save): Remove the declaration.
12537         (regcache::restore): Move from private to public.
12538         Remove the friend declaration of regcache_cpy.
12539         (regcache_cpy): Remove declaration.
12540
12541 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12542
12543         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12544         parameter type to 'readable_regcache *'.
12545         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12546         * arm-tdep.c (arm_neon_quad_read): Likewise.
12547         (arm_pseudo_read): Likewise.
12548         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12549         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12550         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12551         * gdbarch.c: Re-generated.
12552         * gdbarch.h: Re-generated.
12553         * gdbarch.sh (pseudo_register_read): Change parameter type to
12554         'readable_regcache *'.
12555         (pseudo_register_read_value): Likewise.
12556         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12557         (h8300_pseudo_register_read): Likewise.
12558         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12559         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12560         (i386_pseudo_register_read_into_value): Likewise.
12561         (i386_pseudo_register_read_value): Likewise.
12562         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12563         declaration.
12564         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12565         * m32c-tdep.c (m32c_raw_read): Likewise.
12566         (m32c_read_flg): Likewise.
12567         (m32c_banked_register): Likewise.
12568         (m32c_banked_read): Likewise.
12569         (m32c_sb_read): Likewise.
12570         (m32c_part_read): Likewise.
12571         (m32c_cat_read): Likewise.
12572         (m32c_r3r2r1r0_read): Likewise.
12573         (m32c_pseudo_register_read): Likewise.
12574         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12575         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12576         (mep_pseudo_cr64_read): Likewise.
12577         (mep_pseudo_register_read): Likewise.
12578         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12579         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12580         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12581         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12582         (regcache::cooked_read): Likewise.
12583         (regcache::cooked_read_value): Likewise.
12584         (regcache_cooked_read_signed):
12585         (regcache::cooked_read): Likewise.
12586         * regcache.h (readable_regcache): New class.
12587         (regcache): Inherit readable_regcache.  Move some methods to
12588         readable_regcache.
12589         * rl78-tdep.c (rl78_pseudo_register_read): Change
12590         parameter type to 'readable_regcache *'.
12591         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12592         (e500_pseudo_register_read): Change parameter type to
12593         'readable_regcache *'.
12594         (dfp_pseudo_register_read): Likewise.
12595         (vsx_pseudo_register_read): Likewise.
12596         (efpr_pseudo_register_read): Likewise.
12597         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12598         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12599         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12600         (sh64_pseudo_register_read): Likewise.
12601         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12602         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12603         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12604         (spu_pseudo_register_read): Likewise.
12605         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12606         (xtensa_pseudo_register_read): Likewise.
12607
12608 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12609
12610         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12611         (regcache::arch): Move it to reg_buffer::arch.
12612         (regcache::register_buffer): Likewise.
12613         (regcache::assert_regnum): Likewise.
12614         (regcache::num_raw_registers): Likewise.
12615         * regcache.h (reg_buffer): New class.
12616         (regcache): Inherit reg_buffer.
12617
12618 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12619
12620         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12621         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12622
12623 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12624
12625         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12626
12627 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12628
12629         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12630         (SFILES): Remove common/*.c files.
12631         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12632         * common/common.host: Add common reference.
12633         * configure.ac: Likewise.
12634         * configure: Regenerate.
12635
12636 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12637
12638         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12639         (block_initialize_namespace): Use new.
12640         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12641         (dwarf2_free_objfile): Use delete.
12642         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12643         (copy_type_recursive): Use new.
12644         * gdb_obstack.h (allocate_on_obstack): New.
12645
12646 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12647
12648         PR gdb/22849
12649         * inferior.c (exit_inferior_1): Reset inf->control.
12650
12651 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12652
12653         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12654         declaration.
12655
12656 2018-02-14  Pedro Alves  <palves@redhat.com>
12657
12658         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12659         frame_cleanup_after_sniffer on exception.
12660
12661 2018-02-14  Tom Tromey  <tom@tromey.com>
12662
12663         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12664         const.
12665         (solib_bfd_open): Make pathname const.
12666         * solib.c (solib_bfd_open): Make pathname const.
12667         * solib-spu.c (spu_bfd_fopen): Make name const.
12668         (spu_bfd_open): Make pathname const.
12669         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12670         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12671
12672 2018-02-14  Tom Tromey  <tom@tromey.com>
12673
12674         * symfile.c (symfile_bfd_open): Update.
12675         * source.h (openp, source_full_path_of, find_and_open_source):
12676         Change argument type to unique_xmalloc_ptr.
12677         * source.c (openp): Take a unique_xmalloc_ptr.
12678         (source_full_path_of, find_and_open_source): Likewise.
12679         (open_source_file, symtab_to_fullname): Update.
12680         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12681         unique_xmalloc_ptr.
12682         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12683         (exec_file_find): Update.
12684         * psymtab.c (psymtab_to_fullname): Update.
12685         * nto-tdep.h (nto_find_and_open_solib): Update.
12686         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12687         unique_xmalloc_ptr.
12688         * exec.c (exec_file_attach): Update.
12689         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12690         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12691
12692 2018-02-14  Tom Tromey  <tom@tromey.com>
12693
12694         * solib.c: Include source.h.
12695         * nto-tdep.c: Include source.h.
12696         * mi/mi-cmd-env.c: Include source.h.
12697         * infcmd.c: Include source.h.
12698         * exec.c: Include source.h.
12699         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12700         (add_path, directory_switch, source_path, init_source_path): Move
12701         declarations...
12702         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12703         (add_path, directory_switch, source_path, init_source_path):
12704         ...here.
12705
12706 2018-02-14  Tom Tromey  <tom@tromey.com>
12707
12708         * solist.h (exec_file_find, solib_find): Return
12709         unique_xmalloc_ptr.
12710         (solib_bfd_fopen): Take a const char *.
12711         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12712         (exec_file_find, solib_find): Likewise.
12713         (solib_bfd_fopen): Do not take ownership of "pathname".
12714         (solib_bfd_open): Use unique_xmalloc_ptr.
12715         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12716         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12717         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12718         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12719
12720 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12721
12722         * ada-lang.c (name_match_type_from_name): Remove reference to
12723         ada_name_for_lookup in function's documentation.
12724         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12725
12726 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12727
12728         * defs.h (enum openp_flags): New enum.
12729         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12730         Move to enum openp_flags.
12731         (openp_flags): New enum flags.
12732         (openp): Change parameter type to openp_flags.
12733         * source.c (openp): Change parameter type to openp_flags.
12734         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12735         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12736
12737 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12738
12739         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12740         per-command.
12741
12742 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12743
12744         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12745         into...
12746         (class dwarf2_queue_guard): ...the destructor of this new class.
12747         (dw2_do_instantiate_symtab): Create instance of the new class
12748         dwarf2_queue_guard, remove cleanup.
12749
12750 2018-02-09  Tom Tromey  <tom@tromey.com>
12751
12752         * source.c (find_source_lines): Don't reference past the end of
12753         the vector.
12754
12755 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12756
12757         * remote.c (remote_btrace_maybe_reopen): Change error message.
12758         * btrace.c (btrace_enable): Likewise.
12759         (parse_xml_btrace): Likewise.
12760         (parse_xml_btrace_conf): Likewise.
12761
12762 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12763
12764         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12765         (linux_enable_pt, linux_enable_bts): Call
12766         diagnose_perf_event_open_fail.
12767
12768 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12769
12770         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12771         Remove parameter and change return type.  Update callers.  Move it.
12772         (linux_enable_bts, linux_enable_pt): Improve error message.
12773         (linux_enable_pt): Remove zero buffer size check.
12774         (linux_enable_btrace): Improve error messages.  Remove NULL return
12775         check.
12776
12777 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12778
12779         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12780         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12781         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12782         (linux_supports_pt, linux_supports_btrace): Remove.
12783         (linux_enable_bts): Call cpu_supports_bts.
12784         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12785         * remote.c (remote_supports_btrace): Remove.
12786         (init_remote_ops): Remove remote_supports_btrace.
12787         * target-delegates.c: Regenerated.
12788         * target.c (target_supports_btrace): Remove.
12789         * target.h (target_ops) <to_supports_btrace>: Remove
12790         (target_supports_btrace): Remove.
12791         * x86-linux-nat.c (x86_linux_create_target): Remove
12792         linux_supports_btrace.
12793
12794 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12795
12796         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12797         btrace failed.
12798         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12799         exception and use message in own exception.
12800
12801 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12802
12803         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12804         (perf_event_pt_event_type): Use gdb_file_up.
12805         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12806         scoped_fd, and scoped_mmap.
12807
12808 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12809
12810         * common/scoped_mmap.h: New.
12811         * unittests/scoped_mmap-selftest.c: New.
12812         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12813         unittests/scoped_mmap-selftest.c.
12814
12815 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12816
12817         * common/scoped_fd.h: New.
12818         * unittests/scoped_fd-selftest.c: New.
12819         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12820         unittests/scoped_fd-selftest.c.
12821
12822 2018-02-09  Tom Tromey  <tom@tromey.com>
12823
12824         * auto-load.c (auto_load_section_scripts): Use
12825         gdb::unique_xmalloc_ptr.
12826
12827 2018-02-09  Tom Tromey  <tom@tromey.com>
12828
12829         * auto-load.c (execute_script_contents): Use std::string.
12830
12831 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12832
12833         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12834         Python function, rather than a new command.
12835
12836 2018-02-08  Tom Tromey  <tom@tromey.com>
12837
12838         * solib.c (solib_find_1): Use std::string.
12839         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12840
12841 2018-02-08  Tom Tromey  <tom@tromey.com>
12842
12843         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12844
12845 2018-02-08  Tom Tromey  <tom@tromey.com>
12846
12847         * source.c (find_source_lines): Use gdb::def_vector.
12848
12849 2018-02-08  Tom Tromey  <tom@tromey.com>
12850
12851         * macrocmd.c (struct temporary_macro_definition): New.
12852         (macro_define_command): Use temporary_macro_definition.  Remove
12853         cleanups.
12854         (free_macro_definition_ptr): Remove.
12855
12856 2018-02-08  Tom Tromey  <tom@tromey.com>
12857
12858         * macroexp.c (maybe_expand): Use std::string.
12859
12860 2018-02-08  Tom Tromey  <tom@tromey.com>
12861
12862         * macroexp.c (struct macro_buffer): Add initializers for some
12863         members.
12864         (init_buffer, init_shared_buffer, free_buffer)
12865         (free_buffer_return_text): Remove.
12866         (macro_buffer): New constructors.
12867         (~macro_buffer): New destructor.
12868         (macro_buffer::set_shared): New method.
12869         (macro_buffer::resize_buffer, macro_buffer::appendc)
12870         (macro_buffer::appendmem): Now methods, not free functions.
12871         (set_token, append_tokens_without_splicing, stringify)
12872         (macro_stringify): Update.
12873         (gather_arguments): Change return type.  Remove argc_p argument,
12874         add args_ptr argument.  Use std::vector.
12875         (substitute_args): Remove argc argument.  Accept std::vector.
12876         (expand): Update.  Use std::vector.
12877         (scan, macro_expand, macro_expand_next): Update.
12878
12879 2018-02-08  Tom Tromey  <tom@tromey.com>
12880
12881         * symtab.c (default_collect_symbol_completion_matches_break_on):
12882         Use unique_xmalloc_ptr.
12883         * macroscope.h: (sal_macro_scope, user_macro_scope)
12884         (default_macro_scope): Return unique_xmalloc_ptr.
12885         * macroscope.c (sal_macro_scope, user_macro_scope)
12886         (default_macro_scope): Return unique_xmalloc_ptr.
12887         * macroexp.h (macro_expand, macro_expand_once): Return
12888         unique_xmalloc_ptr.
12889         * macroexp.c (macro_expand, macro_expand_once): Return
12890         unique_xmalloc_ptr.
12891         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12892         (info_macro_command, info_macros_command): Use
12893         unique_xmalloc_ptr.
12894         * compile/compile-c-support.c (write_macro_definitions): Use
12895         unique_xmalloc_ptr.
12896         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12897
12898 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12899
12900         * value.c (value_static_field): Assign field type instead of
12901         containing type when returning an optimized out value.
12902
12903 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12904
12905         * ft32-tdep.c (ft32_read_pc): Remove.
12906         (ft32_write_pc): Remove.
12907         (ft32_gdbarch_init): Update.
12908         * m32r-tdep.c (m32r_read_pc): Remove.
12909         (m32r_gdbarch_init): Update.
12910         * mep-tdep.c (mep_read_pc): Remove.
12911         (mep_gdbarch_init): Update.
12912         * microblaze-tdep.c (microblaze_write_pc): Remove.
12913         (microblaze_gdbarch_init): Update.
12914         * mn10300-tdep.c (mn10300_read_pc): Remove.
12915         (mn10300_write_pc): Remove.
12916         (mn10300_gdbarch_init): Update.
12917         * moxie-tdep.c (moxie_read_pc): Remove.
12918         (moxie_write_pc): Remove.
12919         (moxie_gdbarch_init): Update.
12920
12921 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12922
12923         * expprint.c (print_subexp_standard): Handle
12924         OP_F77_UNDETERMINED_ARGLIST.
12925         (dump_subexp_body_standard): Likewise.
12926
12927 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12928
12929         * target-descriptions.c (tdesc_element_visitor) Add empty
12930         implementations.
12931         (tdesc_type): Move make_gdb_type from here.
12932         (tdesc_type_builtin): Likewise.
12933         (tdesc_type_vector): Likewise.
12934         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12935         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12936         (make_gdb_type_union): Likewise.
12937         (make_gdb_type_flags): Likewise.
12938         (make_gdb_type_enum): Likewise.
12939         (make_gdb_type): New function.
12940         (tdesc_register_type): Use static make_gdb_type.
12941
12942 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12943
12944         * infcmd.c (default_print_one_register_info): Align natural-format
12945         column values consistently one under another.
12946         (pad_to_column): New function.
12947
12948 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12949
12950         * dwarf2read.c (dwarf2_physname): Move commment.
12951
12952 2018-02-01  Leszek Swirski  <leszeks@google.com>
12953
12954         * varobj.c (varobj_formatted_print_options): Allow recursive
12955         pretty printing if pretty printing is enabled.
12956
12957 2018-02-01  Leszek Swirski  <leszeks@google.com>
12958
12959         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12960         names after a structop as a filename.
12961
12962 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12963
12964         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12965         (arm_record_coproc_data_proc): Likewise.
12966
12967 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12968
12969         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12970
12971 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12972
12973         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12974         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12975
12976 2018-01-31  Pedro Alves  <palves@redhat.com>
12977
12978         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12979         * inflow.c (child_terminal_save_inferior): Wrap reference to
12980         tcgetpgrp in HAVE_TERMIOS_H.
12981         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12982         _WIN32.
12983         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12984         always iterate over all inferiors.
12985         (gdbsim_cntrl_c): Adjust.
12986         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12987
12988 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12989
12990         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12991         index type is objfile-owned if the element type is as well.
12992
12993 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12994
12995         GDB 8.1 released.
12996
12997 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12998
12999         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13000         "features/s390x-linux64.c".
13001         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13002         s390_linux32 and s390x_linux64.
13003         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13004         default tdesc.
13005         * s390-tdep.c: Include "features/s390-linux32.c" and
13006         "features/s390x-linux64.c".
13007         (s390_tdesc_valid): Add check for tdesc_has_registers.
13008         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13009         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13010         tdesc_s390x_linux64.
13011         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13012         tdesc_s390x_linux64 to...
13013         * s390-tdep.h: ...here.
13014
13015 2018-01-30  Pedro Alves  <palves@redhat.com>
13016
13017         PR gdb/13211
13018         * config.in, configure: Regenerate.
13019         * configure.ac: Check for getpgid.
13020         * go32-nat.c (go32_pass_ctrlc): New.
13021         (go32_target): Install it.
13022         * inf-child.c (inf_child_target): Install
13023         child_terminal_save_inferior, child_pass_ctrlc and
13024         child_interrupt.
13025         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13026         (inf_ptrace_target): No longer install it.
13027         * infcmd.c (interrupt_target_1): Adjust.
13028         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13029         (child_interrupt): Declare.
13030         (inferior::terminal_state): New.
13031         * inflow.c (struct terminal_info): Update comments.
13032         (inferior_process_group): Delete.
13033         (terminal_is_ours): Delete.
13034         (gdb_tty_state): New.
13035         (child_terminal_init): Adjust.
13036         (is_gdb_terminal, sharing_input_terminal_1)
13037         (sharing_input_terminal): New functions.
13038         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13039         Set the process's actual process group in the foreground if
13040         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13041         mark terminal as the inferior's if not sharing GDB's terminal.
13042         Don't check attach_flag.
13043         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13044         pass down a target_terminal_state.
13045         (child_terminal_save_inferior): New, factored out from ...
13046         (child_terminal_ours_1): ... this.  Handle
13047         target_terminal_state::is_ours_for_output.
13048         (child_interrupt, child_pass_ctrlc): New.
13049         (inflow_inferior_exit): Clear the inferior's terminal_state.
13050         (copy_terminal_info): Copy the inferior's terminal state.
13051         (_initialize_inflow): Remove reference to terminal_is_ours.
13052         * inflow.h (inferior_process_group): Delete.
13053         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13054         * procfs.c (procfs_target): Don't install procfs_interrupt.
13055         (procfs_interrupt): Delete.
13056         * remote.c (remote_serial_quit_handler): Adjust.
13057         (remote_interrupt): Remove ptid parameter.  Adjust.
13058         * target-delegates.c: Regenerate.
13059         * target.c: Include "terminal.h".
13060         (target_terminal::terminal_state): Rename to ...
13061         (target_terminal::m_terminal_state): ... this.
13062         (target_terminal::init): Adjust.
13063         (target_terminal::inferior): Adjust to per-inferior
13064         terminal_state.
13065         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13066         (target_terminal::ours, target_terminal::ours_for_output): Use
13067         target_terminal_is_ours_kind.
13068         (target_interrupt): Remove ptid parameter.  Adjust.
13069         (default_target_pass_ctrlc): Adjust.
13070         * target.h (target_ops::to_terminal_save_inferior): New field.
13071         (target_ops::to_interrupt): Remove ptid_t parameter.
13072         (target_interrupt): Remove ptid_t parameter.  Update comment.
13073         (target_pass_ctrlc): Update comment.
13074         * target/target.h (target_terminal_state): New scoped enum,
13075         factored out of ...
13076         (target_terminal::terminal_state): ... here.
13077         (target_terminal::inferior): Update comments.
13078         (target_terminal::restore_inferior): New.
13079         (target_terminal::is_inferior, target_terminal::is_ours)
13080         (target_terminal::is_ours_for_output): Adjust.
13081         (target_terminal::scoped_restore_terminal_state): Adjust to
13082         rename, and call restore_inferior() instead of inferior().
13083         (target_terminal::scoped_restore_terminal_state::m_state): Change
13084         type.
13085         (target_terminal::terminal_state): Rename to ...
13086         (target_terminal::m_terminal_state): ... this and change type.
13087
13088 2018-01-30  Pedro Alves  <palves@redhat.com>
13089
13090         * linux-nat.c (wait_for_signal): New function.
13091         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13092         directly.
13093         (async_terminal_is_ours)
13094         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13095         (linux_nat_add_target): Don't override
13096         to_terminal_inferior/to_terminal_ours.
13097
13098 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13099
13100         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13101
13102 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13103
13104         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13105         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13106         dwarf2_per_objfile_free here.
13107         (dwarf2_per_objfile_free): Remove.
13108         (_initialize_dwarf2_read): Don't register
13109         dwarf2_per_objfile_free as a registry cleanup.
13110
13111 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13112
13113         Avoid compilation errors in MinGW native builds
13114
13115         The error is triggered by including python-internal.h, and the
13116         error message is:
13117
13118              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13119                       from build-gnulib/import/math.h:27,
13120                       from d:/usr/Python26/include/pyport.h:235,
13121                       from d:/usr/Python26/include/Python.h:58,
13122                       from python/python-internal.h:94,
13123                       from python/py-arch.c:24:
13124              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13125         using ::hypot;
13126                 ^~~~~
13127
13128         This happens because Python headers define 'hypot' to expand t
13129         '_hypot' in the Windows builds.
13130         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13131         'hypoth'.  This avoids a compilation error.
13132
13133 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13134
13135         * MAINTAINERS (Write After Approval): Fix ordering.
13136
13137 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13138
13139         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13140
13141 2018-01-26  Alan Modra  <amodra@gmail.com>
13142
13143         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13144         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13145         Remove nop.  Make const.  Comment.
13146         (powerpc32_plt_stub_so_2): New.
13147         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13148         Correct count.  Update uses.
13149         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13150         Move common code reading PLT entry word.  Correct
13151         powerpc32_plt_stub PLT address calculation.
13152         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13153         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13154         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13155         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13156         (ppc64_standard_linkage8): Likewise.
13157         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13158         Correct insns description.
13159         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13160
13161 2018-01-24  Pedro Alves  <palves@redhat.com>
13162
13163         GCC PR libstdc++/83906
13164         * gdbtypes.c (operator==(const dynamic_prop &,
13165         const dynamic_prop &)): New.
13166         (operator==(const range_bounds &, const range_bounds &)): New.
13167         (check_types_equal): Use them instead of memcmp.
13168         * gdbtypes.h (operator==(const dynamic_prop &,
13169         const dynamic_prop &)): Declare.
13170         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13171         (operator==(const range_bounds &, const range_bounds &)): Declare.
13172         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13173
13174 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13175
13176         * s390-linux-tdep.c (s390_record_address_mask)
13177         (s390_record_calc_disp_common, s390_record_calc_disp)
13178         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13179         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13180         (s390_process_record): Move to s390-tdep.c.
13181         (s390_linux_init_abi_any): Adjust.
13182         * s390-tdep.c (s390_record_address_mask)
13183         (s390_record_calc_disp_common, s390_record_calc_disp)
13184         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13185         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13186         (s390_process_record): Moved from s390-linux-tdep.c
13187         (s390_gdbarch_init): Adjust.
13188
13189 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13190
13191         * s390-linux-nat.c (s390-tdep.h): New include.
13192         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13193         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13194         (ALLDEPFILES): Add s390-tdep.c.
13195         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13196         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13197         * s390-tdep.h: ...this.  New file.
13198         * s390-linux-tdep.c (s390-tdep.h): New include.
13199         (_initialize_s390_tdep): Rename to...
13200         (_initialize_s390_linux_tdep): ...this and adjust.
13201         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13202         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13203         s390-tdep.h.
13204         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13205         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13206         (s390_is_partial_instruction, s390_software_single_step)
13207         (is_non_branch_ril, s390_displaced_step_copy_insn)
13208         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13209         (s390_prologue_data, s390_addr, s390_store, s390_load)
13210         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13211         (s390_register_call_saved, s390_guess_tracepoint_registers)
13212         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13213         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13214         (s390_pseudo_register_name, s390_pseudo_register_type)
13215         (s390_pseudo_register_read, s390_pseudo_register_write)
13216         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13217         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13218         (s390_addr_bits_remove, s390_address_class_type_flags)
13219         (s390_address_class_type_flags_to_name)
13220         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13221         (s390_function_arg_float, s390_function_arg_vector)
13222         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13223         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13224         (s390_frame_align, s390_register_return_value, s390_return_value)
13225         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13226         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13227         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13228         (s390_trad_frame_prev_register, s390_unwind_cache)
13229         (s390_prologue_frame_unwind_cache)
13230         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13231         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13232         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13233         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13234         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13235         (s390_frame_base_address, s390_local_base_address)
13236         (s390_frame_base, s390_gcc_target_options)
13237         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13238         (s390_validate_reg_range, s390_tdesc_valid)
13239         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13240         * s390-tdep.c: ...this.  New file.
13241
13242 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13243
13244         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13245         (s390_process_record, s390_gdbarch_tdep_alloc)
13246         (s390_linux_init_abi_any): Use/set new hook.
13247
13248 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13249
13250         * s390-linux-tdep.c (osabi.h): New include.
13251         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13252         (s390_linux_init_abi_any): New functions.
13253         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13254
13255 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13256
13257         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13258         tdesc_has_registers check
13259
13260 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13261
13262         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13263         (s390_validate_reg_range): New macro.
13264         (s390_gdbarch_init): Adjust.
13265
13266 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13267
13268         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13269         (s390_gdbarch_tdep_alloc): Adjust.
13270         (s390_gdbarch_init): Adjust.
13271
13272 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13273
13274         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13275         <have_tdb>: Change type to bool.
13276         (s390_gdbarch_tdep_alloc): Adjust.
13277         (s390_gdbarch_init): Adjust.
13278
13279 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13280
13281         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13282         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13283         (s390_gdbarch_tdep_alloc): New function.
13284         (s390_gdbarch_init): Allocate tdep at start and use its fields
13285         instead of separate variables.
13286
13287 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13288
13289         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13290         when looking for cached gdbarch and add comment for remaining.
13291
13292 2018-01-22  Pedro Alves  <palves@redhat.com>
13293             Sergio Durigan Junior  <sergiodj@redhat.com>
13294
13295         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13296         case.
13297
13298 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13299
13300         * MAINTAINERS: Update my company e-mail address.
13301
13302 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13303
13304         * regcache.c (cooked_write_test): New function.
13305         (_initialize_regcache): Register the test.
13306
13307 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13308
13309         * ia64-tdep.c (ia64_pseudo_register_read): Call
13310         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13311         * m32c-tdep.c (m32c_cat_read): Likewise.
13312         (m32c_r3r2r1r0_read): Likewise.
13313         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13314         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13315
13316 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13317
13318         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13319         method raw_read instead of regcache_raw_read.
13320         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13321         * arm-tdep.c (arm_neon_quad_read): Likewise.
13322         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13323         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13324         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13325         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13326         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13327         (i386_pseudo_register_read_into_value): Likewise.
13328         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13329         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13330         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13331         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13332         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13333         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13334         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13335         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13336         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13337
13338 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13339
13340         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13341         * configure.tgt: Remove target mt.
13342         * mt-tdep.c: Remove.
13343         * regcache.c (cooked_read_test): Remove the check for mt.
13344
13345 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13346
13347         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13348         instead of gdbarch_pseudo_register_read_value.
13349
13350 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13351
13352         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13353         language is Ada.
13354
13355 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13356
13357         * linespec.c (create_sals_line_offset): Remove code that preserved
13358         the symtab_and_line's line number.
13359
13360 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13361
13362         * varobj.c (varobj_create): Don't set valid_block when creating a
13363         floating varobj.
13364
13365 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13366
13367         * varobj.c (varobj_create): Remove out of date comment.
13368
13369 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13370
13371         PR mi/20395
13372         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13373         updating innermost block.
13374         * parse.c (innermost_block_tracker::update): Take extra type
13375         parameter, and check types match before updating innermost block.
13376         (write_dollar_variable): Update innermost block for registers.
13377         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13378         (innermost_block_tracker::innermost_block_tracker): Initialise
13379         m_types member.
13380         (innermost_block_tracker::reset): Take type parameter.
13381         (innermost_block_tracker::update): Take type parameter, and pass
13382         type through as needed.
13383         (innermost_block_tracker::m_types): New member.
13384         * varobj.c (varobj_create): Pass type when reseting innermost
13385         block.
13386
13387 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13388
13389         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13390         * ada-lang.c (resolve_subexp): Likewise.
13391         * breakpoint.c (set_breakpoint_condition) Likewise.
13392         (watch_command_1) Likewise.
13393         * c-exp.y (variable): Likewise.
13394         * d-exp.y (PrimaryExpression): Likewise.
13395         * f-exp.y (variable): Likewise.
13396         * go-exp.y (variable): Likewise.
13397         * m2-exp.y (variable): Likewise.
13398         * objfiles.c (objfile::~objfile): Likewise.
13399         * p-exp.y (variable): Likewise.
13400         * parse.c (innermost_block): Change type.
13401         * parser-defs.h (class innermost_block_tracker): New.
13402         (innermost_block): Change to innermost_block_tracker.
13403         * printcmd.c (display_command): Switch to innermost_block API.
13404         (do_one_display): Likewise.
13405         * rust-exp.y (do_one_display): Likewise.
13406         * symfile.c (clear_symtab_users): Likewise.
13407         * varobj.c (varobj_create): Switch to innermost_block API, replace
13408         use of innermost_block with block stored on varobj object.
13409
13410 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13411
13412         * expression.h (innermost_block): Remove declaration.
13413         * varobj.c: Add 'parser-defs.h' include.
13414
13415 2018-01-19  Tom Tromey  <tom@tromey.com>
13416
13417         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13418         symbols in the static and global blocks.
13419
13420 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13421
13422         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13423         gdb_ptrace.h, and move including gdb_wait.h ...
13424         * nat/linux-ptrace.h: ... to here.
13425
13426 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13427
13428         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13429         inf_ptrace_detach_success.
13430         (inf_ptrace_detach_success): Add inferior parameter, use it
13431         instead of inferior_ptid, pass it to detach_inferior.
13432         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13433         parameter.
13434         * inferior.c (detach_inferior): Add overload that takes an
13435         inferior object.
13436         * inferior.h (detach_inferior): Likewise.
13437         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13438         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13439         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13440
13441 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13442
13443         * target.h (struct target_ops) <to_detach>: Add inferior
13444         parameter.
13445         (target_detach): Likewise.
13446         * target.c (dispose_inferior): Pass inferior down.
13447         (target_detach): Pass inferior down.  Assert that it is equal to
13448         the current inferior.
13449         * aix-thread.c (aix_thread_detach): Pass inferior down.
13450         * corefile.c (core_file_command): Pass current_inferior() down.
13451         * corelow.c (core_detach): Add inferior parameter.
13452         * darwin-nat.c (darwin_detach): Likewise.
13453         * gnu-nat.c (gnu_detach): Likewise.
13454         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13455         * infcmd.c (detach_command): Pass current_inferior() down to
13456         target_detach.
13457         * infrun.c (follow_fork_inferior): Pass parent_inf to
13458         target_detach.
13459         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13460         target_detach.
13461         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13462         * linux-thread-db.c (thread_db_detach): Likewise.
13463         * nto-procfs.c (procfs_detach): Likewise.
13464         * procfs.c (procfs_detach): Likewise.
13465         * record.c (record_detach): Likewise.
13466         * record.h (struct inferior): Forward-declare.
13467         (record_detach): Add inferior parameter.
13468         * remote-sim.c (gdbsim_detach): Likewise.
13469         * remote.c (remote_detach_1): Likewise.
13470         (remote_detach): Likewise.
13471         (extended_remote_detach): Likewise.
13472         * sol-thread.c (sol_thread_detach): Likewise.
13473         * target-debug.h (target_debug_print_inferior_p): New macro.
13474         * target-delegates.c: Re-generate.
13475         * top.c (kill_or_detach): Pass inferior down to target_detach.
13476         * windows-nat.c (windows_detach): Add inferior parameter.
13477
13478 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13479
13480         * target.h (struct target_ops) <to_detach>: Remove args
13481         parameter.
13482         (target_detach): Likewise.
13483         * target.c (dispose_inferior): Adjust.
13484         (target_detach): Remove args parameter, adjust.
13485         * aix-thread.c (aix_thread_detach): Adjust.
13486         * corefile.c (core_file_command): Adjust.
13487         * corelow.c (core_detach): Adjust.
13488         * darwin-nat.c (darwin_detach): Adjust.
13489         * gnu-nat.c (gnu_detach): Adjust.
13490         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13491         * infcmd.c (detach_command): Adjust
13492         * infrun.c (follow_fork_inferior): Adjust.
13493         (handle_vfork_child_exec_or_exit): Adjust.
13494         * linux-fork.c (linux_fork_detach): Remove args parameter.
13495         * linux-fork.h (linux_fork_detach): Likewise.
13496         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13497         * linux-thread-db.c (thread_db_detach): Likewise.
13498         * nto-procfs.c (procfs_detach): Likewise.
13499         * procfs.c (procfs_detach): Likewise.
13500         (do_detach): Remove signo parameter.
13501         * record.c (record_detach): Remove args parameter.
13502         * record.h (record_detach): Likewise.
13503         * remote-sim.c (gdbsim_detach): Likewise.
13504         * remote.c (remote_detach_1): Likewise.
13505         (remote_detach): Likewise.
13506         (extended_remote_detach): Likewise.
13507         * sol-thread.c (sol_thread_detach): Likewise.
13508         * target-delegates.c: Re-generate.
13509         * top.c (struct qt_args) <args>: Remove field.
13510         (kill_or_detach): Don't pass args.
13511         (quit_force): Don't set args.
13512         * windows-nat.c (windows_detach): Remove args parameter.
13513
13514 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13515
13516         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13517         (arm_linux_init_abi): Install it.
13518
13519 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13520
13521         * osabi.c (gdb_osabi_names): Extend the regexp for
13522         arm-linux-gnueabihf.
13523
13524 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13525
13526         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13527         m_abbrevs.
13528         (abbrev_table::add_abbrev): Update.
13529         (abbrev_table::lookup_abbrev): Update.
13530
13531 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13532
13533         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13534
13535 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13536
13537         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13538         to "std::string".
13539
13540 2018-01-17  Tom Tromey  <tom@tromey.com>
13541
13542         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13543
13544 2018-01-17  Tom Tromey  <tom@tromey.com>
13545
13546         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13547         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13548         (create_array_type_with_stride): Update.
13549         * dwarf2read.c (set_die_type): Update.
13550
13551 2018-01-17  Tom Tromey  <tom@tromey.com>
13552
13553         * dwarf2read.c (delayed_method_info): Remove typedef.
13554         (dwarf2_cu::method_info): Now a std::vector.
13555         (add_to_method_list): Update.
13556         (free_delayed_list): Remove.
13557         (compute_delayed_physnames): Update.
13558         (process_full_comp_unit, process_full_type_unit): Clear the method
13559         list.  Remove cleanups.
13560         (psymtab_include_file_name): Add name_holder parameter.  Use
13561         unique_xmalloc_ptr.
13562         (dwarf_decode_lines): Update.
13563
13564 2018-01-17  Tom Tromey  <tom@tromey.com>
13565             Simon Marchi  <simon.marchi@ericsson.com>
13566
13567         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13568         (dwarf2_per_objfile::free_cached_comp_units)
13569         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13570         (init_cutu_and_read_dies_no_follow): Update.
13571         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13572         (dwarf2_cu::~dwarf2_cu): New.
13573         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13574         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13575
13576 2018-01-17  Tom Tromey  <tom@tromey.com>
13577             Simon Marchi  <simon.marchi@ericsson.com>
13578
13579         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13580         (struct die_reader_specs) <abbrev_table>: New member.
13581         (struct abbrev_table): Add constructor.
13582         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13583         <abbrev_obstack>: Now an auto_obstack.
13584         (abbrev_table_up): New typedef.
13585         (init_cu_die_reader): Add abbrev_table parameter.
13586         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13587         Add result_dwo_abbrev_table.
13588         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13589         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13590         Update.
13591         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13592         parameter.
13593         (skip_children): Update.
13594         (abbrev_table::alloc_abbrev): Rename from
13595         abbrev_table_alloc_abbrev.
13596         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13597         (abbrev_table::lookup_abbrev): Rename from
13598         abbrev_table_lookup_abbrev.
13599         (abbrev_table_read_table): Return abbrev_table_up.
13600         (abbrev_table_free, abbrev_table_free_cleanup)
13601         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13602         (load_partial_dies): Update.
13603
13604 2018-01-17  Tom Tromey  <tom@tromey.com>
13605
13606         * dwarf2read.c (dwarf2_compute_name): Update comment.
13607         (read_func_scope, read_variable): Update.
13608         (new_symbol): Remove.
13609         (new_symbol_full): Rename to new_symbol.
13610
13611 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13612
13613         PR gdb/16577
13614         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13615         a warning instead of throwing an error, set section size to 0 and return
13616         NULL.
13617         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13618
13619 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13620
13621         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13622         std::string.
13623         (linux_ptrace_attach_fail_reason_string): Likewise.
13624         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13625         Likewise.
13626         (linux_ptrace_attach_fail_reason_string): Likewise.
13627         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13628
13629 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13630
13631         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13632
13633 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13634
13635         PR gdb/21559
13636         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13637         checking for fs_base/gs_base fields in struct user_regs_struct.
13638         * configure: Regenerate.
13639
13640 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13641
13642         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13643         function.
13644         (aarch64_linux_init_abi): Install it to gdbarch hook
13645         gcc_target_options.
13646
13647 2018-01-15  Pedro Alves  <palves@redhat.com>
13648
13649         * common/signals-state-save-restore.c
13650         (save_original_signals_state): Fix typos.
13651
13652 2017-01-12  Tom Tromey  <tom@tromey.com>
13653             Sergio Durigan Junior  <sergiodj@redhat.com>
13654
13655         * Makefile.in (install-only): Install gdb-add-index.
13656
13657 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13658
13659         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13660
13661 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13662
13663         * infrun.c (keep_going_pass_signal): Clear step-over info when
13664         insert_breakpoints fails.
13665
13666 2018-01-11  Pedro Alves  <palves@redhat.com>
13667
13668         PR gdb/22583
13669         * infrun.c (resume): Rename to ...
13670         (resume_1): ... this.
13671         (resume): Reimplement as wrapper around resume_1.
13672
13673 2018-01-11  Pedro Alves  <palves@redhat.com>
13674
13675         PR remote/22597
13676         * remote.c (remote_parse_stop_reply): Default to the last-set
13677         general thread instead of to 'magic_null_ptid'.
13678
13679 2018-01-10  Pedro Alves  <palves@redhat.com>
13680
13681         * language.h (language_get_symbol_name_matcher): Rename ...
13682         (get_symbol_name_matcher): ... this.
13683         * language.c (language_get_symbol_name_matcher): Ditto.
13684         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13685         callers adjusted.
13686
13687 2018-01-10  Pedro Alves  <palves@redhat.com>
13688
13689         PR gdb/22670
13690         * dwarf2read.c
13691         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13692         Adjust to use language_get_symbol_name_matcher instead of
13693         language_defn::la_get_symbol_name_matcher.
13694         * language.c (language_get_symbol_name_matcher): If in Ada mode
13695         and the lookup name is a verbatim match, return Ada's matcher.
13696         * language.h (language_get_symbol_name_matcher): Adjust comment.
13697         (ada_lookup_name_info::verbatim_p):: New method.
13698
13699 2018-01-10  Pedro Alves  <palves@redhat.com>
13700
13701         PR gdb/22670
13702         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13703         minsym's language is language_auto or language_cplus, pass down
13704         language_ada instead.
13705         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13706
13707 2018-01-10  Pedro Alves  <palves@redhat.com>
13708
13709         PR gdb/22670
13710         * minsyms.c (linkage_name_str): New function.
13711         (iterate_over_minimal_symbols): Use it.
13712
13713 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13714
13715         * NEWS: Document that 'info proc' now works on FreeBSD.
13716
13717 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13718
13719         * configure.ac: Check for kinfo_getfile in libutil.
13720         * configure: Regenerate.
13721         * config.in: Regenerate.
13722         * fbsd-nat.c: Include "fbsd-tdep.h".
13723         (fbsd_fetch_cmdline): New.
13724         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13725         rather than calling error.
13726         (fbsd_info_proc): New.
13727         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13728         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13729         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13730
13731 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13732
13733         * fbsd-nat.c (struct free_deleter): Remove.
13734         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13735
13736 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13737
13738         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13739         NULL for an empty pathname.
13740
13741 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13742
13743         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13744         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13745         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13746         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13747         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13748         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13749         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13750         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13751         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13752         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13753         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13754         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13755         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13756         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13757         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13758
13759 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13760
13761         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13762         (gnu_xfer_auxv): New function.
13763         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13764         TARGET_OBJECT_AUXV.
13765
13766 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13767             Simon Marchi  <simon.marchi@ericsson.com>
13768
13769         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13770         common/selftest.c.
13771         (COMMON_OBS): Remove selftest.o.
13772         * configure.ac: Append selftest-arch.c and common/selftest.c to
13773         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13774         * configure: Re-generated.
13775         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13776         GDB_SELF_TEST.
13777         (maintenance_info_selftests): Likewise.
13778
13779 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13780
13781         * ada-valprint.c (val_print_packed_array_elements): Use
13782         proper number of elements when printing an array indexed
13783         by an enumeration type.
13784
13785 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13786
13787         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13788         (dw2_get_file_names_reader): Adjust.
13789         (lookup_dwo_signatured_type): Adjust.
13790         (lookup_dwp_signatured_type): Adjust.
13791         (lookup_signatured_type): Adjust.
13792         (create_type_unit_group): Adjust.
13793         (get_type_unit_group): Adjust.
13794         (process_psymtab_comp_unit_reader): Adjust.
13795         (build_type_psymtabs_reader): Adjust.
13796         (scan_partial_symbols): Adjust.
13797         (add_partial_symbol): Adjust.
13798         (add_partial_subprogram): Adjust.
13799         (peek_die_abbrev): Adjust.
13800         (fixup_go_packaging): Adjust.
13801         (process_imported_unit_die): Adjust.
13802         (dwarf2_compute_name): Adjust.
13803         (dwarf2_physname): Adjust.
13804         (read_import_statement): Adjust.
13805         (handle_DW_AT_stmt_list): Adjust.
13806         (read_file_scope): Adjust.
13807         (read_func_scope): Adjust.
13808         (read_lexical_block_scope): Adjust.
13809         (read_call_site_scope): Adjust.
13810         (read_variable): Adjust.
13811         (dwarf2_rnglists_process): Adjust.
13812         (dwarf2_ranges_process): Adjust.
13813         (dwarf2_ranges_read): Adjust.
13814         (dwarf2_get_pc_bounds): Adjust.
13815         (dwarf2_record_block_ranges): Adjust.
13816         (dwarf2_add_field): Adjust.
13817         (dwarf2_add_member_fn): Adjust.
13818         (read_structure_type): Adjust.
13819         (process_structure_scope): Adjust.
13820         (read_enumeration_type): Adjust.
13821         (read_array_type): Adjust.
13822         (mark_common_block_symbol_computed): Adjust.
13823         (read_common_block): Adjust.
13824         (read_namespace_type): Adjust.
13825         (read_namespace): Adjust.
13826         (read_module_type): Adjust.
13827         (read_tag_pointer_type): Adjust.
13828         (read_tag_ptr_to_member_type): Adjust.
13829         (read_tag_string_type): Adjust.
13830         (read_subroutine_type): Adjust.
13831         (read_typedef): Adjust.
13832         (read_base_type): Adjust.
13833         (attr_to_dynamic_prop): Adjust.
13834         (read_subrange_type): Adjust.
13835         (read_unspecified_type): Adjust.
13836         (dwarf2_read_abbrevs): Adjust.
13837         (load_partial_dies): Adjust.
13838         (read_partial_die): Adjust.
13839         (find_partial_die): Adjust.
13840         (guess_partial_die_structure_name): Adjust.
13841         (fixup_partial_die): Adjust.
13842         (read_attribute_value): Adjust.
13843         (read_addr_index): Adjust.
13844         (read_addr_index_from_leb128): Adjust.
13845         (read_str_index): Adjust.
13846         (dwarf2_string_attr): Adjust.
13847         (get_debug_line_section): Adjust.
13848         (dwarf_decode_line_header): Adjust.
13849         (lnp_state_machine::check_line_address): Adjust.
13850         (dwarf_decode_lines_1): Adjust.
13851         (dwarf_decode_lines): Adjust.
13852         (dwarf2_start_symtab): Adjust.
13853         (var_decode_location): Adjust.
13854         (new_symbol_full): Adjust.
13855         (dwarf2_const_value_data): Adjust.
13856         (dwarf2_const_value_attr): Adjust.
13857         (dwarf2_const_value): Adjust.
13858         (die_type): Adjust.
13859         (die_containing_type): Adjust.
13860         (build_error_marker_type): Adjust.
13861         (lookup_die_type): Adjust.
13862         (guess_full_die_structure_name): Adjust.
13863         (anonymous_struct_prefix): Adjust.
13864         (determine_prefix): Adjust.
13865         (dwarf2_name): Adjust.
13866         (follow_die_ref_or_sig): Adjust.
13867         (follow_die_offset): Adjust.
13868         (follow_die_ref): Adjust.
13869         (follow_die_sig_1): Adjust.
13870         (follow_die_sig): Adjust.
13871         (get_signatured_type): Adjust.
13872         (get_DW_AT_signature_type): Adjust.
13873         (decode_locdesc): Adjust.
13874         (dwarf_decode_macros): Adjust.
13875         (cu_debug_loc_section): Adjust.
13876         (fill_in_loclist_baton): Adjust.
13877         (dwarf2_symbol_mark_computed): Adjust.
13878         (init_one_comp_unit): Don't assign
13879         dwarf2_cu::dwarf2_per_objfile.
13880         (set_die_type): Adjust.
13881
13882 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13883
13884         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13885         <dwarf2_per_objfile>: New field.
13886         (dwarf2_per_objfile): Remove global.
13887         (get_dwarf2_per_objfile): New function.
13888         (set_dwarf2_per_objfile): New function.
13889         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13890         dwarf2_per_objfile.
13891         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13892         (read_abbrev_offset): Likewise.
13893         (read_indirect_string): Likewise.
13894         (read_indirect_line_string): Likewise.
13895         (read_indirect_string_at_offset): Likewise.
13896         (read_indirect_string_from_dwz): Likewise.
13897         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13898         dwarf2_per_objfile.
13899         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13900         (create_all_comp_units): Change objfile parameter to
13901         dwarf2_per_objfile.
13902         (create_all_type_units): Likewise.
13903         (process_queue): Add dwarf2_per_objfile parameter.
13904         (read_and_check_comp_unit_head): Likewise.
13905         (lookup_dwo_unit_in_dwp): Likewise.
13906         (get_dwp_file): Likewise.
13907         (process_cu_includes): Likewise.
13908         (struct free_dwo_file_cleanup_data): New struct.
13909         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13910         set_dwarf2_per_objfile.
13911         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13912         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13913         context, adjust calls.
13914         (dw2_instantiate_symtab): Likewise.
13915         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13916         (dw2_get_cu): Likewise.
13917         (create_cu_from_index_list): Change objfile parameter to
13918         dwarf2_per_objfile.
13919         (create_cus_from_index_list): Get dwarf2_per_objfile from
13920         context, adjust calls.
13921         (create_cus_from_index): Likewise.
13922         (create_signatured_type_table_from_index): Change objfile
13923         parameter to dwarf2_per_objfile.
13924         (create_signatured_type_table_from_debug_names): Change objfile
13925         parameter to dwarf2_per_objfile.
13926         (create_addrmap_from_index): Likewise.
13927         (create_addrmap_from_aranges): Likewise.
13928         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13929         (dw2_setup): Remove.
13930         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13931         context.
13932         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13933         get_dwarf2_per_objfile.
13934         (dw2_forget_cached_source_info): Likewise.
13935         (dw2_map_symtabs_matching_filename): Likewise.
13936         (struct dw2_symtab_iterator) <index>: Remove.
13937         <dwarf2_per_objfile>: New field.
13938         (dw2_symtab_iter_init): Replace index parameter with
13939         dwarf2_per_objfile.
13940         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13941         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13942         (dw2_print_stats): Likewise.
13943         (dw2_dump): Likewise.
13944         (dw2_expand_symtabs_for_function): Likewise.
13945         (dw2_expand_all_symtabs): Likewise.
13946         (dw2_expand_symtabs_with_fullname): Likewise.
13947         (dw2_expand_marked_cus): Replace index and objfile parameters
13948         with dwarf2_per_objfile.
13949         (dw_expand_symtabs_matching_file_matcher): Add
13950         dwarf2_per_objfile parameter and adjust calls.
13951         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13952         adjust calls.
13953         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13954         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13955         adjust calls.
13956         (create_cus_from_debug_names_list): Replace objfile parameter
13957         with dwarf2_per_objfile and adjust calls.
13958         (create_cus_from_debug_names): Likewise.
13959         (dwarf2_read_debug_names): Likewise.
13960         (mapped_debug_names::namei_to_name): Adjust call.
13961         (dw2_debug_names_iterator::next): Likewise.
13962         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13963         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13964         (dw2_debug_names_dump): Likewise.
13965         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13966         (dw2_debug_names_expand_symtabs_matching): Likewise.
13967         (dwarf2_initialize_objfile): Likewise.
13968         (dwarf2_build_psymtabs): Likewise.
13969         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13970         this_cu.
13971         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13972         (read_and_check_comp_unit_head): Likewise.
13973         (read_abbrev_offset): Likewise.
13974         (create_debug_type_hash_table): Likewise.
13975         (create_debug_types_hash_table): Likewise.
13976         (create_all_type_units): Replace objfile parameter with
13977         dwarf2_per_objfile.
13978         (add_type_unit): Add dwarf2_per_objfile parameter.
13979         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13980         with dwarf2_per_objfile.
13981         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13982         (lookup_dwp_signatured_type): Likewise.
13983         (lookup_signatured_type): Likewise.
13984         (read_cutu_die_from_dwo): Likewise.
13985         (init_tu_and_read_dwo_dies): Likewise.
13986         (init_cutu_and_read_dies): Likewise.
13987         (init_cutu_and_read_dies_no_follow): Likewise.
13988         (allocate_type_unit_groups_table): Add objfile parameter.
13989         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13990         (get_type_unit_group): Likewise.
13991         (process_psymtab_comp_unit): Update call.
13992         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13993         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13994         (print_tu_stats): Likewise.
13995         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13996         in void* parameter.
13997         (build_type_psymtabs): Change objfile parameter to
13998         dwarf2_per_objfile.
13999         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14000         passed in void* parameter.
14001         (process_skeletonless_type_units): Change objfile parameter to
14002         dwarf2_per_objfile.
14003         (set_partial_user): Likewise.
14004         (dwarf2_build_psymtabs_hard): Likewise.
14005         (read_comp_units_from_section): Likewise.
14006         (create_all_comp_units): Likewise.
14007         (scan_partial_symbols): Update calls.
14008         (add_partial_symbol): Likewise.
14009         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14010         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14011         (process_queue): Add dwarf2_per_objfile parameter.
14012         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14013         (compute_compunit_symtab_includes): Likewise.
14014         (process_cu_includes): Add dwarf2_per_objfile parameter.
14015         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14016         (process_full_type_unit): Likewise.
14017         (process_imported_unit_die): Update call.
14018         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14019         (read_file_scope): Likewise.
14020         (allocate_dwo_file_hash_table): Add objfile parameter.
14021         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14022         (create_cus_hash_table): Likewise.
14023         (create_dwp_hash_table): Likewise.
14024         (create_dwo_unit_in_dwp_v1): Likewise.
14025         (create_dwp_v2_section): Likewise.
14026         (create_dwo_unit_in_dwp_v2): Likewise.
14027         (lookup_dwo_unit_in_dwp): Likewise.
14028         (try_open_dwop_file): Likewise.
14029         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14030         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14031         cleanup to include a reference to dwarf2_per_objfile.
14032         (open_dwp_file): Add dwarf2_per_objfile parameter.
14033         (open_and_init_dwp_file): Likewise.
14034         (get_dwp_file): Likewise.
14035         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14036         (queue_and_load_all_dwo_tus): Update call.
14037         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14038         data.
14039         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14040         (dwarf2_ranges_process): Likewise.
14041         (dwarf2_get_pc_bounds): Likewise.
14042         (mark_common_block_symbol_computed): Likewise.
14043         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14044         (dwarf2_read_abbrevs): Update call.
14045         (read_partial_die): Use dwarf2_per_objfile from cu.
14046         (find_partial_die): Likewise.
14047         (fixup_partial_die): Likewise.
14048         (read_attribute_value): Likewise.
14049         (read_indirect_string_at_offset_from): Add objfile parameter.
14050         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14051         parameter.
14052         (read_indirect_string_from_dwz): Add objfile parameter.
14053         (read_indirect_string): Add objfile parameter.
14054         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14055         (read_addr_index): Use dwarf2_per_objfile from cu.
14056         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14057         call dw2_setup.
14058         (read_str_index): Use dwarf2_per_objfile from cu.
14059         (get_debug_line_section): Likewise.
14060         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14061         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14062         (new_symbol_full): Use dwarf2_per_objfile from cu.
14063         (build_error_marker_type): Likewise.
14064         (lookup_die_type): Likewise.
14065         (determine_prefix): Likewise.
14066         (follow_die_offset): Likewise.
14067         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14068         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14069         (dwarf2_fetch_die_type_sect_off): Likewise.
14070         (dwarf2_get_die_type): Likewise.
14071         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14072         (get_signatured_type): Likewise.
14073         (get_DW_AT_signature_type): Likewise.
14074         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14075         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14076         (cu_debug_loc_section): Likewise.
14077         (fill_in_loclist_baton): Likewise.
14078         (dwarf2_symbol_mark_computed): Likewise.
14079         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14080         dwarf2_per_objfile.
14081         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14082         parameter.
14083         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14084         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14085         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14086         (set_die_type): Use dwarf2_free_objfile from cu.
14087         (get_die_type_at_offset): Likewise.
14088         (dwarf2_per_objfile_free): Don't assign global variable.
14089         (debug_names) <constructor>: Add dwarf2_per_objfile
14090         parameter, update m_debugstrlookup construction.
14091         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14092         parameter.
14093         <m_dwarf2_per_objfile>: New field.
14094         <lookup>: Use m_dwarf2_per_objfile.
14095         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14096         (psyms_seen_size): Likewise.
14097         (write_gdbindex): Replace objfile parameter with
14098         dwarf2_per_objfile.
14099         (write_debug_names): Likewise.
14100         (write_psymtabs_to_index): Likewise.
14101         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14102         calls.
14103
14104 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14105
14106         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14107         <dwarf2_per_objfile>: New field.
14108         (struct dwarf2_per_cu_data) <objfile>: Remove.
14109         <dwarf2_per_objfile>: New field.
14110         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14111         of objfile.
14112         (create_signatured_type_table_from_index): Likewise.
14113         (create_debug_type_hash_table): Likewise.
14114         (fill_in_sig_entry_from_dwo_entry): Likewise.
14115         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14116         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14117         objfile.
14118         (create_partial_symtab): Access objfile through
14119         dwarf2_per_objfile.
14120         (process_psymtab_comp_unit_reader): Likewise.
14121         (read_comp_units_from_section): Likewise.
14122         (scan_partial_symbols): Likewise.
14123         (add_partial_symbol): Likewise.
14124         (add_partial_subprogram): Likewise.
14125         (peek_die_abbrev): Likewise.
14126         (fixup_go_packaging): Likewise.
14127         (process_full_comp_unit): Likewise.
14128         (process_full_type_unit): Likewise.
14129         (process_imported_unit_die): Likewise.
14130         (dwarf2_compute_name): Likewise.
14131         (dwarf2_physname): Likewise.
14132         (read_import_statement): Likewise.
14133         (create_cus_hash_table): Assign dwarf2_physname instead of
14134         objfile.
14135         (read_func_scope): Access objfile through dwarf2_per_objfile.
14136         (read_lexical_block_scope): Likewise.
14137         (read_call_site_scope): Likewise.
14138         (read_variable): Likewise.
14139         (dwarf2_rnglists_process): Likewise.
14140         (dwarf2_ranges_process): Likewise.
14141         (dwarf2_ranges_read): Likewise.
14142         (dwarf2_record_block_ranges): Likewise.
14143         (dwarf2_add_field): Likewise.
14144         (dwarf2_add_member_fn): Likewise.
14145         (read_structure_type): Likewise.
14146         (process_structure_scope): Likewise.
14147         (read_enumeration_type): Likewise.
14148         (read_array_type): Likewise.
14149         (read_common_block): Likewise.
14150         (read_namespace_type): Likewise.
14151         (read_namespace): Likewise.
14152         (read_module_type): Likewise.
14153         (read_tag_pointer_type): Likewise.
14154         (read_tag_ptr_to_member_type): Likewise.
14155         (read_tag_string_type): Likewise.
14156         (read_subroutine_type): Likewise.
14157         (read_typedef): Likewise.
14158         (read_base_type): Likewise.
14159         (attr_to_dynamic_prop): Likewise.
14160         (read_subrange_type): Likewise.
14161         (read_unspecified_type): Likewise.
14162         (load_partial_dies): Likewise.
14163         (read_partial_die): Likewise.
14164         (find_partial_die): Likewise.
14165         (guess_partial_die_structure_name): Likewise.
14166         (fixup_partial_die): Likewise.
14167         (read_attribute_value): Likewise.
14168         (read_addr_index_from_leb128): Likewise.
14169         (dwarf2_read_addr_index): Likewise.
14170         (dwarf2_string_attr): Likewise.
14171         (lnp_state_machine::check_line_address): Likewise.
14172         (dwarf_decode_lines_1): Likewise.
14173         (dwarf_decode_lines): Likewise.
14174         (dwarf2_start_symtab): Likewise.
14175         (var_decode_location): Likewise.
14176         (new_symbol_full): Likewise.
14177         (dwarf2_const_value_data): Likewise.
14178         (dwarf2_const_value_attr): Likewise.
14179         (dwarf2_const_value): Likewise.
14180         (die_type): Likewise.
14181         (die_containing_type): Likewise.
14182         (lookup_die_type): Likewise.
14183         (guess_full_die_structure_name): Likewise.
14184         (anonymous_struct_prefix): Likewise.
14185         (dwarf2_name): Likewise.
14186         (follow_die_ref_or_sig): Likewise.
14187         (follow_die_offset): Likewise.
14188         (follow_die_ref): Likewise.
14189         (dwarf2_fetch_die_loc_sect_off): Likewise.
14190         (dwarf2_fetch_constant_bytes): Likewise.
14191         (dwarf2_fetch_die_type_sect_off): Likewise.
14192         (dwarf2_get_die_type): Likewise.
14193         (follow_die_sig): Likewise.
14194         (decode_locdesc): Likewise.
14195         (dwarf2_per_cu_objfile): Likewise.
14196         (dwarf2_per_cu_text_offset): Likewise.
14197         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14198         objfile.
14199         (set_die_type): Access objfile through
14200         dwarf2_per_objfile.
14201
14202 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14203
14204         * valprint.c (converted_character_d): Remove typedef.
14205         (DEF_VEC_O (converted_character_d)): Remove.
14206         (count_next_character): Use std::vector.
14207         (print_converted_chars_to_obstack): Likewise.
14208         (generic_printstr): Likewise.
14209
14210 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14211
14212         * xml-support.h (struct gdb_xml_value): Add constructor.
14213         <value>: Change type to unique_xmalloc_ptr.
14214         (gdb_xml_value_s): Remove typedef.
14215         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14216         (gdb_xml_element_start_handler): Change parameter type to
14217         std::vector.
14218         (xml_find_attribute): Likewise.
14219         * xml-support.c (xml_find_attribute): Change parameter type to
14220         std::vector and adjust.
14221         (gdb_xml_values_cleanup): Remove.
14222         (gdb_xml_parser::start_element): Adjust to std::vector.
14223         (xinclude_start_include): Change paraeter type to std::vector
14224         and adjust.
14225         * btrace.c (check_xml_btrace_version): Likewise.
14226         (parse_xml_btrace_block): Likewise.
14227         (parse_xml_btrace_pt_config_cpu): Likewise.
14228         (parse_xml_btrace_pt): Likewise.
14229         (parse_xml_btrace_conf_bts): Likewise.
14230         (parse_xml_btrace_conf_pt): Likewise.
14231         * memory-map.c (memory_map_start_memory): Likewise.
14232         (memory_map_start_property): Likewise.
14233         * osdata.c (osdata_start_osdata): Likewise.
14234         (osdata_start_item): Likewise.
14235         (osdata_start_column): Likewise.
14236         * remote.c (start_thread): Likewise.
14237         * solib-aix.c (library_list_start_library): Likewise.
14238         (library_list_start_list): Likewise.
14239         * solib-svr4.c (library_list_start_library): Likewise.
14240         (svr4_library_list_start_list): Likewise.
14241         * solib-target.c (library_list_start_segment): Likewise.
14242         (library_list_start_section): Likewise.
14243         (library_list_start_library): Likewise.
14244         (library_list_start_list): Likewise.
14245         * tracepoint.c (traceframe_info_start_memory): Likewise.
14246         (traceframe_info_start_tvar): Likewise.
14247         * xml-syscall.c (syscall_start_syscall): Likewise.
14248         * xml-tdesc.c (tdesc_start_target): Likewise.
14249         (tdesc_start_feature): Likewise.
14250         (tdesc_start_reg): Likewise.
14251         (tdesc_start_union): Likewise.
14252         (tdesc_start_struct): Likewise.
14253         (tdesc_start_flags): Likewise.
14254         (tdesc_start_enum): Likewise.
14255         (tdesc_start_field): Likewise.
14256         (tdesc_start_enum_value): Likewise.
14257         (tdesc_start_vector): Likewise.
14258
14259 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14260
14261         * extension.h (struct xmethod_worker) <clone>: Remove.
14262         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14263         Remove.
14264         (python_xmethod_worker::clone): Remove.
14265         * valops.c (find_overload_match): Use std::move instead of
14266         clone.
14267
14268 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14269
14270         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14271         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14272         <free_xmethod_worker_data>: Remove.
14273         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14274         <get_xmethod_arg_types>: Remove.
14275         <get_xmethod_result_type>: Remove.
14276         <invoke_xmethod>: Remove.
14277         * extension.c (new_xmethod_worker): Remove.
14278         (clone_xmethod_worker): Remove.
14279         (get_matching_xmethod_workers): Return void, pass std::vector by
14280         pointer.
14281         (get_xmethod_arg_types): Rename to...
14282         (xmethod_worker::get_arg_types): ... this, and adjust.
14283         (get_xmethod_result_type): Rename to...
14284         (xmethod_worker::get_result_type): ... this, and adjust.
14285         (invoke_xmethod): Remove.
14286         (free_xmethod_worker): Remove.
14287         (free_xmethod_worker_vec): Remove.
14288         * extension.h (enum ext_lang_rc): Move here from
14289         extension-priv.h.
14290         (struct xmethod_worker): Add constructor and destructor.
14291         <data>: Remove.
14292         <value>: Remove.
14293         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14294         virtual pure methods.
14295         <get_arg_types, get_result_type>: New methods.
14296         (xmethod_worker_ptr): Remove typedef.
14297         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14298         (xmethod_worker_vec): Remove typedef.
14299         (xmethod_worker_up): New typedef.
14300         (invoke_xmethod): Remove.
14301         (clone_xmethod_worker): Remove.
14302         (free_xmethod_worker): Remove.
14303         (free_xmethod_worker_vec): Remove.
14304         (get_xmethod_arg_types): Remove.
14305         (get_xmethod_result_type): Remove.
14306         * valops.c (find_method_list): Use std::vector, don't use
14307         intermediate vector.
14308         (value_find_oload_method_list): Use std::vector.
14309         (find_overload_match): Use std::vector.
14310         (find_oload_champ): Use std::vector.
14311         * value.c (value_free): Use operator delete.
14312         (value_of_xmethod): Rename to...
14313         (value_from_xmethod): ... this.  Don't assign
14314         xmethod_worker::value, take rvalue-reference.
14315         (result_type_of_xmethod): Adjust.
14316         (call_xmethod): Adjust.
14317         * value.h: Include extension.h.
14318         (struct xmethod_worker): Don't forward-declare.
14319         (value_of_xmethod): Rename to...
14320         (value_from_xmethod): ... this, take rvalue-reference.
14321         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14322         (struct python_xmethod_worker): ... this, add constructor and
14323         destructor.
14324         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14325         (gdbpy_free_xmethod_worker_data): Rename to...
14326         (python_xmethod_worker::~python_xmethod_worker): ... this and
14327         adjust.
14328         (gdbpy_clone_xmethod_worker_data): Rename to...
14329         (python_xmethod_worker::clone): ... this and adjust.
14330         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14331         temporary vector.
14332         (gdbpy_get_xmethod_arg_types): Rename to...
14333         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14334         (gdbpy_get_xmethod_result_type): Rename to...
14335         (python_xmethod_worker::do_get_result_type): ... this and
14336         adjust.
14337         (gdbpy_invoke_xmethod): Rename to...
14338         (python_xmethod_worker::invoke): ... this and adjust.
14339         (new_python_xmethod_worker): Rename to...
14340         (python_xmethod_worker::python_xmethod_worker): ... this and
14341         adjust.
14342         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14343         Remove.
14344         (gdbpy_free_xmethod_worker_data): Remove.
14345         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14346         (gdbpy_get_xmethod_arg_types): Remove.
14347         (gdbpy_get_xmethod_result_type): Remove.
14348         (gdbpy_invoke_xmethod): Remove.
14349         * python/python.c (python_extension_ops): Remove obsolete
14350         callbacks.
14351
14352 2018-01-05  Pedro Alves  <palves@redhat.com>
14353
14354         PR gdb/18653
14355         * common/signals-state-save-restore.c
14356         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14357         find a custom handler preinstalled, instead of internal erroring.
14358         But only warn if !quiet.
14359         * common/signals-state-save-restore.h
14360         (save_original_signals_state): New parameter 'quiet'.
14361         * main.c (captured_main_1): Move save_original_signals_state call
14362         after option handling, and pass QUIET.
14363
14364 2018-01-05  Pedro Alves  <palves@redhat.com>
14365
14366         * spu-tdep.c (spu_catch_start): Pass
14367         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14368
14369 2018-01-05  Pedro Alves  <palves@redhat.com>
14370
14371         PR gdb/22670
14372         * ada-lang.c (literal_symbol_name_matcher): New function.
14373         (ada_get_symbol_name_matcher): Use it for
14374         symbol_name_match_type::SEARCH_NAME.
14375         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14376         it down instead of assuming symbol_name_match_type::FULL.
14377         * block.h (block_lookup_symbol): New parameter 'match_type'.
14378         * c-valprint.c (print_unpacked_pointer): Use
14379         lookup_symbol_search_name instead of lookup_symbol.
14380         * compile/compile-object-load.c (get_out_value_type): Pass down
14381         symbol_name_match_type::SEARCH_NAME.
14382         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14383         symbol_name_match_type::FULL.
14384         * cp-support.c (cp_get_symbol_name_matcher): Handle
14385         symbol_name_match_type::SEARCH_NAME.
14386         * infrun.c (insert_exception_resume_breakpoint): Use
14387         lookup_symbol_search_name.
14388         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14389         * psymtab.c (maintenance_check_psymtabs): Use
14390         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14391         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14392         SYMBOL_SEARCH_NAME.
14393         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14394         if symbol_name_match_type::SEARCH_NAME.
14395         (lookup_symbol_in_language): Pass down
14396         symbol_name_match_type::FULL.
14397         (lookup_symbol_search_name): New.
14398         (lookup_language_this): Pass down
14399         symbol_name_match_type::SEARCH_NAME.
14400         (lookup_symbol_aux, lookup_local_symbol): New parameter
14401         'match_type'.  Pass it down.
14402         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14403         (lookup_symbol_search_name): New declaration.
14404         (lookup_symbol_in_block): New 'match_type' parameter.
14405
14406 2018-01-05  Pedro Alves  <palves@redhat.com>
14407
14408         PR gdb/22670
14409         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14410         ada_lookup_symbol.
14411         (ada_lookup_symbol): Reimplement in terms of
14412         ada_lookup_symbol_list, bits factored out from
14413         ada_lookup_encoded_symbol.
14414
14415 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14416
14417         * ada-exp.y (write_object_renaming): When subscripting an array
14418         using a symbol as the index, pass the block in call to
14419         ada_lookup_encoded_symbol when looking that symbol up.
14420
14421 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14422
14423         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14424         TYPE_INDEX_TYPE.
14425
14426 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14427
14428         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14429         the case where VALUE_LVAL (val0) is not lval_memory.
14430
14431 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14432
14433         * ada-valprint.c (print_optional_low_bound): Handle
14434         character-indexed array printing like boolean-indexed array
14435         printing.
14436
14437 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14438
14439         * NEWS: Create a new section for the next release branch.
14440         Rename the section of the current branch, now that it has
14441         been cut.
14442
14443 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14444
14445         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14446         * version.in: Bump version to 8.1.50.DATE-git.
14447
14448 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14449
14450         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14451         Add field.
14452         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14453         Add field.
14454         (default_exception_support_info) <catch_handlers_sym>: Add field.
14455         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14456         (ada_exception_name_addr_1): Add "catch handlers" handling.
14457         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14458         Update all callers.
14459         (create_excep_cond_exprs) <ex>: Add parameter.
14460         (re_set_exception): Update create_excep_cond_exprs call.
14461         (print_it_exception, print_one_exception, print_mention_exception)
14462         (print_recreate_exception): Add "catch handler" handling.
14463         (allocate_location_catch_handlers, re_set_catch_handlers)
14464         (check_status_catch_handlers, print_it_catch_handlers)
14465         (print_one_catch_handlers, print_mention_catch_handlers)
14466         (print_recreate_catch_handlers): New function.
14467         (catch_handlers_breakpoint_ops): New variable.
14468         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14469         Add parameter.  Add "catch handler" handling.
14470         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14471         Add "catch handler" handling.
14472         (ada_exception_catchpoint_cond_string): Add "catch handler"
14473         handling.
14474         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14475         call.
14476         (catch_ada_handlers_command): New function.
14477         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14478         operations structure.
14479         (_initialize_ada_language): Add "catch handlers" command entry.
14480         * NEWS: Document "catch handlers" feature.
14481
14482 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14483
14484         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14485         account when creating the array type of the slice.
14486         (ada_value_slice): Likewise.
14487
14488 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14489
14490         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14491         New enum value.
14492         (create_array_type_with_stride): Add byte_stride_prop parameter.
14493         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14494         New parameter.  Update all callers in this file.
14495         (array_type_has_dynamic_stride): New function.
14496         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14497         of arrays with dynamic byte strides.
14498         * dwarf2read.c (read_array_type): Add support for dynamic
14499         DW_AT_byte_stride attributes.
14500
14501 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14502
14503         * dwarf2read.c (read_unspecified_type): Treat
14504         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14505
14506 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14507
14508         Update copyright year range in all GDB files.
14509
14510 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14511
14512         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14513         and gdb/testsuite/gdb.base/step-line.c.
14514
14515 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14516
14517         * copyright.py (main): Dump the contents of
14518         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14519         even if BY_HAND is empty.
14520
14521 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14522
14523         * top.c (print_gdb_version): Update Copyright year in version
14524         message.
14525
14526 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14527
14528         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14529
14530 For older changes see ChangeLog-2017.
14531 \f
14532 Local Variables:
14533 mode: change-log
14534 left-margin: 8
14535 fill-column: 74
14536 version-control: never
14537 coding: utf-8
14538 End: