Remove unused variables from riscv-fbsd-tdep.c
[external/binutils.git] / gdb / ChangeLog
1 2018-10-08  Tom Tromey  <tom@tromey.com>
2
3         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
4         variable.
5         (riscv_fbsd_init_abi): Likewise.
6
7 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
8         * valops.c (value_struct_elt_for_reference): Rename local variable
9         to work around the shadowing a previous local warning.
10
11 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
12
13         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
14         * NEWS: Mention new FreeBSD/riscv native configuration.
15         * configure.host: Add riscv*-*-freebsd*.
16         * configure.nat: Likewise.
17         * riscv-fbsd-nat.c: New file.
18
19 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
20
21         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
22         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
23         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
24         * NEWS: Mention new FreeBSD/riscv target.
25         * configure.tgt: Add riscv*-*-freebsd*.
26         * riscv-fbsd-tdep.c: New file.
27         * riscv-fbsd-tdep.h: New file.
28
29 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
30
31         * regcache.h (struct regcache_map_entry): Note that this type can
32         be used with traditional frame caches.
33         * trad-frame.c (trad_frame_set_reg_regmap): New.
34         * trad-frame.h (trad_frame_set_reg_regmap): New.
35
36 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
37
38         PR c++/16841
39         * valops.c (get_virtual_base_offset): New function.
40         (value_struct_elt_for_reference): Use it to get virtual base offset
41         and add it in calculating class member address.
42
43 2018-10-08   John Darrington <john@darrington.wattle.id.au>
44
45     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
46       (check_producer): Check if the producer is codewarrior.
47       (producer_is_codewarrior): New function.
48       (lnp_state_machine::record_line): Ignore is_stmt flag for records
49        produced by codewarrior.
50       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
51
52 2018-10-06  Tom Tromey  <tom@tromey.com>
53
54         PR python/19399:
55         * python/py-inferior.c: Add "architecture" entry.
56         (infpy_architecture): New function.
57
58 2018-10-06  Tom Tromey  <tom@tromey.com>
59
60         PR python/21765:
61         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
62         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
63         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
64         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
65
66 2018-10-06  Tom Tromey  <tom@tromey.com>
67
68         PR build/17077:
69         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
70         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
71         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
72         #include.
73
74 2018-10-06  Tom Tromey  <tom@tromey.com>
75
76         * python/py-breakpoint.c (bppy_get_location): Handle a
77         bp_breakpoint without a location.
78
79 2018-10-06  Tom Tromey  <tom@tromey.com>
80
81         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
82         (_RegEx): Reformat help text.
83         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
84         (AnyCallerIs, AnyCallerMatches): Reformat help text.
85         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
86         text.
87         * python/lib/gdb/command/xmethods.py (InfoXMethod)
88         (EnableXMethod, DisableXMethod): Remove help indentation.
89         Capitalize meta-syntactic variables.
90         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
91         (EnableUnwinder, DisableUnwinder): Remove help indentation.
92         Capitalize meta-syntactic variables.
93         * python/lib/gdb/command/explore.py (ExploreCommand)
94         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
95         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
96         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
97         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
98         Remove help indentation.
99         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
100         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
101         (DisableFrameFilter, SetFrameFilterPriority)
102         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
103
104 2018-10-06  Tom Tromey  <tom@tromey.com>
105
106         PR tui/28819:
107         * tui/tui-io.c (gdb_wgetch): New function.
108         (tui_mld_getc, tui_getc): Use it.
109
110 2018-10-05  Tom Tromey  <tom@tromey.com>
111
112         * sol-thread.c (sol_thread_target::wait): Rename inner
113         "save_ptid".
114
115 2018-10-04  Tom Tromey  <tom@tromey.com>
116
117         * configure: Rebuild.
118         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
119
120 2018-10-04  Tom Tromey  <tom@tromey.com>
121
122         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
123         declaration of "block".
124
125 2018-10-04  Tom Tromey  <tom@tromey.com>
126
127         * common/filestuff.c (fdwalk): Remove inner declaration of
128         "result".
129
130 2018-10-04  Tom Tromey  <tom@tromey.com>
131
132         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
133         "structs_addr" and hoist declaration.
134
135 2018-10-04  Tom Tromey  <tom@tromey.com>
136
137         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
138         variable "size".
139
140 2018-10-04  Tom Tromey  <tom@tromey.com>
141
142         * mdebugread.c (parse_partial_symbols): Use std::string.
143
144 2018-10-04  Tom Tromey  <tom@tromey.com>
145
146         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
147         * p-valprint.c (pascal_val_print): Split inner "i" variable.
148         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
149         header.
150         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
151         more inner scope.
152         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
153         * varobj.c (varobj_update): Rename inner "newobj",
154         "type_changed".
155         * valprint.c (generic_emit_char): Rename inner "buf".
156         * valops.c (find_overload_match): Rename inner "temp".
157         (value_struct_elt_for_reference): Declare "v" in more inner
158         scope.
159         * v850-tdep.c (v850_push_dummy_call): Rename "len".
160         * unittests/array-view-selftests.c (run_tests): Rename inner
161         "vec".
162         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
163         header.
164         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
165         "tsv" in more inner scope.
166         (print_one_static_tracepoint_marker): Rename inner
167         "tuple_emitter".
168         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
169         (tic6x_push_dummy_call): Don't redeclare "addr".
170         * target-float.c: Declare "dto" lower.
171         * symtab.c (lookup_local_symbol): Rename inner "sym".
172         (find_pc_sect_line): Rename inner "pc".
173         * stack.c (print_frame): Don't redeclare "gdbarch".
174         (return_command): Rename inner "gdbarch".
175         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
176         "sp".
177         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
178         header.
179         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
180         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
181         scope.
182         * remote.c (remote_target::update_thread_list): Don't redeclare
183         "tp".
184         (remote_target::process_initial_stop_replies): Rename inner
185         "thread".
186         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
187         (remote_target::wait_as): Don't redeclare "stop_reply".
188         (remote_target::get_thread_local_address): Rename inner
189         "result".
190         (remote_target::get_tib_address): Likewise.
191
192         * regcache.c (cooked_read_test): Rename "regnum".
193         * record-btrace.c (cmd_record_btrace_start): Rename inner
194         "exception".
195         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
196         loop header.
197         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
198         header.
199         (ppu2spu_sniffer): Rename inner "buf".
200         * parse.c (operator_check_standard): Rename inner "type",
201         "objfile".
202         * p-valprint.c (pascal_val_print): Introduce new scope for
203         "low_bound", "high_bound".
204         * p-exp.y (yylex): Declare "i" in loop header.
205         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
206         Lower declaration of "s".
207         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
208         header.
209         (nios2_push_dummy_call): Rename "len".
210         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
211         "buf".
212         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
213         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
214         (linux_xfer_osdata_modules): Likewise.
215         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
216         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
217         (mips_o64_push_dummy_call): Likewise.
218         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
219         "op".
220         * mi/mi-main.c (list_available_thread_groups): Rename inner
221         "tuple_emitter".
222         (mi_cmd_data_read_memory): Rename inner "opts".
223         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
224         "tuple_emitter".
225         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
226         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
227         more inner scope.
228         (parse_partial_symbols): Rename inner "pst", "p", "name"
229         * main.c (captured_main_1): Rename inner "i"s.
230         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
231         "oso2".
232         * linux-tdep.c (linux_info_proc): Rename inner "filename".
233         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
234         * infrun.c (handle_no_resumed): Don't redeclare "thread".
235         (handle_signal_stop): Rename inner "gdbarch".
236         (handle_command): Declare "signum" in loop header.
237         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
238         "status".
239         (examine_prologue): Rename inner "sol" and "sof".
240         (ia64_extract_return_value): Rename inner "val".  Declare another
241         "val" in a more inner scope.
242         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
243         inner scope.
244         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
245         "except".
246         * findvar.c (default_read_var_value): Don't redeclare "addr".
247         * f-exp.y (yylex): Declare "i" in loop header.
248         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
249         Rename inner "type", "expect_type".
250         (evaluate_subexp_for_sizeof): Rename inner "pc".
251         * elfread.c (elf_symfile_read): Rename inner "abfd".
252         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
253         "bytes_read".
254         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
255         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
256         (dwarf_decode_line_header): Rename inner "lh".
257         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
258         "offset".  Declare "i" in loop header.
259         (disassemble_dwarf_expression): Rename inner "addr_size".
260         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
261         inner "result".
262         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
263         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
264         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
265         "inner_list_emitter".
266         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
267         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
268         declaration in a block.
269         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
270         * cp-valprint.c (cp_print_value_fields): Don't redeclare
271         "obstack_final_size".
272         * cp-support.c (inspect_type): Declare "i" in loop header.
273         * compile/compile.c (compile_instance::insert_symbol_error):
274         Rename inner "e".
275         * common/agent.c (agent_run_command): Remove inner "ret"
276         declaration.
277         * coffread.c (coff_symfile_read): Rename inner "name".
278         (coff_symfile_read): Rename inner "abfd".
279         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
280         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
281         "high".
282         * c-exp.y (lex_one_token): Move "len" declaration lower.
283         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
284         "gdbarch".
285         (create_exception_master_breakpoint): Likewise.  Don't redeclare
286         "b".
287         (watch_command_1): Declare "mark" later.
288         (clear_command): Don't shadow "a" or "b".
289         (delete_command): Rename inner "b".
290         (delete_trace_command): Likewise.
291         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
292         "op".
293         (arm_gdbarch_init): Remove inner "e_flags".
294         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
295         "offset" in inner blocks.
296
297 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
298
299         * dwarf-index-write.c (file_write): Don't write if the vector is
300         empty.
301
302 2018-10-05  Tom de Vries  <tdevries@suse.de>
303
304         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
305         PyArg_ParseTuple call.
306
307 2018-10-05  Tom de Vries  <tdevries@suse.de>
308
309         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
310         PyArg_ParseTuple call.
311
312 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
313
314         * psymtab.c (recursively_search_psymtabs): Reformat parameters
315         to avoid exceeding 80 characters per line limit.
316
317 2018-10-04  Tom Tromey  <tom@tromey.com>
318
319         * symfile.c (syms_from_objfile_1, finish_new_objfile)
320         (reread_symbols): Update.
321         * complaints.h (clear_complaints): Remove argument.
322         * complaints.c (enum complaint_series): Remove.
323         (series): Remove global.
324         (complaint_internal): Update.
325         (clear_complaints): Remove argument.
326
327 2018-10-04  Tom Tromey  <tom@tromey.com>
328
329         * symfile.c (symbol_file_add_with_addrs): Do not print "no
330         debugging symbols" message if there is a separate debug objfile.
331
332 2018-10-04  Tom Tromey  <tom@tromey.com>
333
334         PR cli/19551:
335         * symfile.c (symbol_file_add_with_addrs): Update output.
336         * psymtab.c (require_partial_symbols): Update output.
337
338 2018-10-04  Tom Tromey  <tom@tromey.com>
339
340         PR cli/22234:
341         * complaints.c: Emit \n.
342
343 2018-10-04  Tom Tromey  <tom@tromey.com>
344
345         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
346         (separate_debug_file_exists, find_separate_debug_file)
347         (add_symbol_file_command, reread_symbols, allocate_symtab)
348         (allocate_compunit_symtab): Use filtered printing, not
349         unfiltered.
350         * psymtab.c (require_partial_symbols, dump_psymtab)
351         (allocate_psymtab): Use filtered printing, not unfiltered.
352
353 2018-10-04  Tom Tromey  <tom@tromey.com>
354
355         * complaints.c (complaint_internal): Correctly check complaint
356         count.
357
358 2018-10-04  Tom Tromey  <tom@tromey.com>
359
360         * complaints.h (struct complaints): Remove declaration.
361         * complaints.c (clear_complaints): Remove an unused variable.
362
363 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
364
365         * MAINTAINERS (Write After Approval): Add self.
366
367 2018-10-03  Tom Tromey  <tom@tromey.com>
368
369         * guile/scm-value.c (gdbscm_value_to_string): Initialize
370         "buffer_contents".
371         * coffread.c (coff_symtab_read): Initialize "newobj".
372
373 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
374
375         * dwarf2read.c (read_func_scope): Remove struct keyword in
376         range-based for.
377
378 2018-10-03  Tom Tromey  <tom@tromey.com>
379
380         * README: Mention --enable-ubsan.
381         * NEWS: Mention --enable-ubsan.
382         * acinclude.m4: Include sanitize.m4.
383         * configure: Rebuild.
384         * configure.ac: Call AM_GDB_UBSAN.
385         * sanitize.m4: New file.
386
387 2018-10-03  Tom Tromey  <tom@tromey.com>
388
389         * expression.h (enum exp_opcode): Use uint8_t as base type.
390         * expprint.c (op_name): Handle invalid opcodes.
391
392 2018-10-03  Tom Tromey  <tom@tromey.com>
393
394         * parse.c (prefixify_expression): Add assert.
395         (parse_exp_in_context_1): Throw exception if the expression is
396         empty.
397
398 2018-10-03  Tom Tromey  <tom@tromey.com>
399
400         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
401
402 2018-10-03  Tom Tromey  <tom@tromey.com>
403
404         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
405
406 2018-10-03  Tom Tromey  <tom@tromey.com>
407
408         * dwarf2read.c (read_subrange_type): Make "negative_mask"
409         unsigned.
410
411 2018-10-03  Tom Tromey  <tom@tromey.com>
412
413         * findvar.c (extract_integer): Do work in an unsigned type.
414
415 2018-10-03  Tom Tromey  <tom@tromey.com>
416
417         * common/enum-flags.h (enum_flags::operator~): Add static assert.
418         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
419         base type.
420         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
421         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
422         type.
423         * c-lang.h (enum c_string_type_values): Use unsigned as base
424         type.
425         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
426
427 2018-10-03  Tom Tromey  <tom@tromey.com>
428
429         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
430         <~dwarf2_frame_state_reg_info>: Update.
431         <dwarf2_frame_state_reg_info>: Update.
432         <alloc_regs>: Add assertion.  Update.
433         <reg>: Now a std::vector.
434         <num_regs>: Remove.
435         <swap>: Update.
436         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
437         (execute_cfa_program_test, dwarf2_frame_cache): Update.
438
439 2018-10-03  Tom Tromey  <tom@tromey.com>
440
441         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
442
443 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
444
445         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
446
447 2018-10-02  Tom Tromey  <tom@tromey.com>
448
449         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
450
451 2018-10-02  John Darrington <john@darrington.wattle.id.au>
452
453         * NEWS: Mention changed commands.
454         * ser-uds.c: New file.
455         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
456         * configure: Regenerate.
457         * Makefile.in: Add new file.
458         * serial.c (serial_open): Check if filename is a socket
459           and lookup the appropriate interface accordingly.
460
461 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
462
463         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
464         define.
465         (AARCH64_EXTRA_MAGIC): Likewise.
466         (AARCH64_FPSIMD_MAGIC): Likewise.
467         (AARCH64_SVE_MAGIC): Likewise.
468         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
469         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
470         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
471         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
472         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
473         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
474         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
475         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
476         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
477         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
478         (read_aarch64_ctx): Add function.
479         (aarch64_linux_sigframe_init): Detect FP registers.
480
481 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
482
483         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
484         (AARCH64_D0_REGNUM): Likewise.
485         (AARCH64_S0_REGNUM): Likewise.
486         (AARCH64_H0_REGNUM): Likewise.
487         (AARCH64_B0_REGNUM): Likewise.
488         (AARCH64_SVE_V0_REGNUM): Likewise.
489         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
490         (AARCH64_D0_REGNUM): Likewise.
491         (AARCH64_S0_REGNUM): Likewise.
492         (AARCH64_H0_REGNUM): Likewise.
493         (AARCH64_B0_REGNUM): Likewise.
494         (AARCH64_SVE_V0_REGNUM): Likewise.
495
496 2018-10-01  Gary Benson <gbenson@redhat.com>
497
498         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
499         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
500         prfpregset_t instead of gdb_prfpregset_t.
501         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
502         * configure, config.in: Rebuild.
503
504 2018-10-01  Gary Benson <gbenson@redhat.com>
505
506         * common/gdb_proc_service.h: New file, factored out from...
507         * gdb_proc_service.h: Moved common code to the above file.
508         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
509
510 2018-10-01  Gary Benson <gbenson@redhat.com>
511
512         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
513         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
514
515 2018-10-01  Gary Benson <gbenson@redhat.com>
516
517         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
518         (AC_CHECK_HEADERS): Check for linux/elf.h.
519         * configure, config.in: Rebuild.
520         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
521         doesn't define elf_fpregset_t.
522
523 2018-10-01  Gary Benson <gbenson@redhat.com>
524
525         * gdb_proc_service.h: Whitespace change.
526
527 2018-10-01  Tom Tromey  <tom@tromey.com>
528
529         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
530         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
531         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
532
533 2018-10-01  Tom Tromey  <tom@tromey.com>
534
535         * README: Minor change.
536
537 2018-09-30  Pedro Alves  <palves@redhat.com>
538
539         * darwin-nat-info.c (darwin_debug_regions_recurse)
540         (info_mach_exceptions_command): Remove unused local variables.
541         * darwin-nat.c (darwin_decode_notify_message)
542         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
543         (darwin_stop_inferior, darwin_setup_exceptions)
544         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
545         (darwin_nat_target::attach, darwin_nat_target::detach)
546         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
547         local variables.
548         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
549         variables.
550
551 2018-09-29  Tom Tromey  <tom@tromey.com>
552
553         * README: Remove some leftover text.
554
555 2018-09-29  Tom Tromey  <tom@tromey.com>
556
557         * PROBLEMS: Rewrite.
558         * README: Update.
559
560 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
561
562         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
563         case with explicit breakpoint kind.
564         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
565         'additional_info' and related logic.
566         (riscv_debug_breakpoints): New variable.
567         (riscv_breakpoint_kind_from_pc): Use the length of the existing
568         instruction to determine the breakpoint kind.
569         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
570         flag.  Update description of 'set/show riscv
571         use-compressed-breakpoints' flag.
572
573 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
574
575         (NEWS): Mention changes to frame related commands.
576         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
577         (add_prefix_cmd_suppress_notification): New function.
578         (add_com_suppress_notification): Call
579         add_cmd_suppress_notification.
580         * command.h (add_cmd_suppress_notification): Declare.
581         (add_prefix_cmd_suppress_notification): Declare.
582         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
583         (parse_frame_specification): Moved from stack.c, with
584         simplification to handle a single argument.
585         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
586         switch to the selected frame.  Add a header comment.
587         * stack.c: Remove 'safe-ctype.h' include.
588         (find_frame_for_function): Add declaration.
589         (find_frame_for_address): New function.
590         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
591         (frame_selection_by_function_completer): New function.
592         (info_frame_command): Rename to...
593         (info_frame_command_core): ...this, and update parameter types.
594         (select_frame_command): Rename to...
595         (select_frame_command_core): ...this, and update parameter types.
596         (frame_command): Rename to...
597         (frame_command_core): ...this, and update parameter types.
598         (class frame_command_helper): New class to wrap implementations of
599         frame related sub-commands.
600         (frame_apply_cmd_list): New static global.
601         (frame_cmd_list): Make static.
602         (select_frame_cmd_list): New global for sub-commands.
603         (info_frame_cmd_list): New global for sub-commands.
604         (_initialize_stack): Register sub-commands for 'frame',
605         'select-frame', and 'info frame'.  Update 'frame apply' commands
606         to use frame_apply_cmd_list.  Move function local static
607         frame_apply_list to file static frame_apply_cmd_list for
608         consistency.
609         * stack.h (select_frame_command): Delete declarationn.
610         (select_frame_for_mi): Declare new function.
611
612 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
613
614         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
615         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
616         and NOP.
617
618 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
619
620         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
621
622 2018-09-26  Tom Tromey  <tom@tromey.com>
623
624         * valops.c (auto_abandon): Remove dead code.
625
626 2018-09-26  Tom Tromey  <tom@tromey.com>
627
628         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
629
630 2018-09-24  Tom Tromey  <tom@tromey.com>
631
632         * common/pathstuff.c (get_standard_cache_dir): Make
633         "xdg_cache_home" and "home" const.
634         * top.c (init_history): Make "tmpenv" const.
635         * main.c (get_init_files): Make "homedir" const.
636
637 2018-09-23  Tom Tromey  <tom@tromey.com>
638
639         PR python/18852:
640         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
641
642 2018-09-23  Tom Tromey  <tom@tromey.com>
643
644         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
645         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
646         * python/python-internal.h (gdbpy_handle_exception): Declare.
647         * python/py-utils.c (gdbpy_handle_exception): New function.
648
649 2018-09-23  Tom Tromey  <tom@tromey.com>
650
651         PR python/17284:
652         * python/py-type.c (typy_template_argument): Check for negative
653         argument number.
654
655 2018-09-23  Tom Tromey  <tom@tromey.com>
656
657         PR python/14062:
658         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
659
660 2018-09-23  Tom Tromey  <tom@tromey.com>
661
662         PR python/18170:
663         * python/py-value.c (valpy_int): Allow conversion from pointer
664         type.
665
666 2018-09-23  Tom Tromey  <tom@tromey.com>
667
668         PR python/20126:
669         * python/py-value.c (valpy_int): Respect type sign.
670
671 2018-09-23  Tom Tromey  <tom@tromey.com>
672
673         PR python/18352;
674         * python/py-value.c (valpy_float): Allow conversions from int or
675         char.
676         (valpy_int, valpy_long): Allow conversions from float.
677
678 2018-09-23  Tom Tromey  <tom@tromey.com>
679
680         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
681         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
682
683 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
684
685         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
686         __sighndlr.
687         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
688
689 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
690
691         * windows-nat.c (windows_nat_target::wait): Remove a spurious
692         target_terminal::ours().
693
694 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
695
696         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
697         of vl to ULONGEST.
698
699 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
700
701         * breakpoint.c (update_inserted_breakpoint_locations): Remove
702         redundant condition.
703
704 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
705
706         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
707
708         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
709         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
710         * sol-thread.c (ps_pdmodel): Don't guard definition.
711
712         * procfs.c: Fix formatting.
713
714         * procfs.c (sysset_t_alloc): Remove.
715         (create_procinfo): Use XNEW instead of sysset_t_alloc.
716         (procfs_debug_inferior): Likewise.
717         (procfs_set_exec_trap): Likewise.
718         (proc_set_traced_sysentry): Don't allocate argp dynamically.
719         (proc_set_traced_sysexit): Likewise.
720
721         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
722         (dead_procinfo): Likewise.
723         (proc_warn): Likewise.
724         (proc_error): Likewise.
725         (proc_get_LDT_entry): Likewise.
726         (do_attach): Likewise.
727         (procfs_target::pid_to_str): Likewise.
728         (iterate_over_mappings): Likewise.
729
730         * procfs.c (create_procinfo): Fix ARI warning.
731         (proc_get_status): Likewise.
732         (proc_stop_process): Likewise.
733         (proc_run_process): Likewise.
734         (proc_kill): Likewise.
735         (proc_get_LDT_entry): Likewise.
736         (procfs_find_LDT_entry): Likewise.
737         (proc_update_threads): Likewise.
738         (proc_iterate_over_threads): Likewise.
739         (do_attach): Likewise.
740         (procfs_xfer_memory): Likewise.
741         (invalidate_cache): Likewise.
742         (procfs_target::resume): Likewise.
743         (procfs_init_inferior): Likewise.
744         (procfs_set_exec_trap): Likewise.
745         (procfs_target::thread_alive): Likewise.
746         (procfs_target::pid_to_exec_file): Likewise.
747         (iterate_over_mappings): Likewise.
748         (procfs_target::make_corefile_notes): Likewise.
749         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
750
751         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
752         (procfs_find_LDT_entry): Likewise.
753         * sol-thread.c (ps_lgetLDT): Likewise.
754
755 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
756
757         PR tdep/17903
758         * procfs.c (procfs_target): Declare pid_to_exec_file.
759         (procfs_target::pid_to_exec_file): New.
760
761 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
762
763         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
764         renaming.
765         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
766         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
767
768 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
769
770         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
771         (supply_fpregset, fill_fpregset): Move ...
772         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
773         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
774         Remove references to ioctl-based procfs.
775         Include <sys/reg.h>.
776         Remove PR_MODEL_NATIVE guards.
777         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
778         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
779
780 2018-09-19  Xavier Roirand  <roirand@adacore.com>
781
782         PR gdb/20981:
783         * solib-darwin.c (darwin_get_dyld_bfd): New function.
784         (darwin_solib_get_all_image_info_addr_at_init): Update call.
785         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
786
787 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
788
789         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
790         (fbsd_print_sockaddr_in6): Likewise.
791
792 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
793             Chris January  <chris.january@arm.com>
794
795         * eval.c (skip_undetermined_arglist): Skip argument list helper.
796         (evaluate_subexp_standard): Return a dummy type when
797         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
798         OP_F77_UNDETERMINED_ARGLIST case.
799         * expression.h (enum noside): Update comment.
800
801 2018-09-19  George Vasick <george.vasick@oracle.com>
802
803         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
804
805 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
806             April Chin <april.chin@oracle.com>
807             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
808
809         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
810         uint_t lwpid_t.
811         (create_procinfo): Print pids in /proc without leading zeros.
812
813 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
814
815         * nios2-tdep.c (nios2_gcc_target_options): New.
816         (nios2_gdb_arch_init): Install new hook.
817
818 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
819
820         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
821         New file.
822         * update-gnulib.sh: Apply patch.
823         * configure: Re-generate.
824
825 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
826
827         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
828         description.  Make "info proc" command descriptions more
829         consistent.
830
831 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
832
833         * NEWS: Mention 'info proc files' command.
834
835 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
836
837         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
838         descriptors for IP_FILES and IP_ALL.
839
840 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
841
842         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
843         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
844         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
845         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
846         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
847         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
848         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
849         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
850         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
851         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
852         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
853         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
854         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
855         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
856         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
857         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
858         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
859         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
860         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
861         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
862         (struct fbsd_sockaddr_un): New types.
863         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
864         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
865         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
866         (fbsd_core_info_proc_files): New functions.
867         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
868         IP_ALL.
869         * fbsd-tdep.h (fbsd_info_proc_files_header)
870         (fbsd_info_proc_files_entry): New.
871
872 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
873
874         * defs.h (enum info_proc_what) [IP_FILES]: New value.
875         * infcmd.c (info_proc_cmd_files): New function.
876         (_initialize_infcmd): Register 'info proc files' command.
877
878 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
879
880         * gnulib/aclocal-m4-deps.mk: Re-generate.
881         * gnulib/aclocal.m4: Re-generate.
882         * gnulib/config.in: Re-generate.
883         * gnulib/configure: Re-generate.
884         * gnulib/import/Makefile.am: Re-generate.
885         * gnulib/import/Makefile.in: Re-generate.
886         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
887         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
888         * gnulib/import/arpa_inet.in.h: New file.
889         * gnulib/import/inet_ntop.c: New file.
890         * gnulib/import/m4/arpa_inet_h.m4: New file.
891         * gnulib/import/m4/inet_ntop.m4: New file.
892         * gnulib/import/m4/netinet_in_h.m4: New file.
893         * gnulib/import/m4/socklen.m4: New file.
894         * gnulib/import/m4/sockpfaf.m4: New file.
895         * gnulib/import/m4/stdalign.m4: New file.
896         * gnulib/import/m4/sys_uio_h.m4: New file.
897         * gnulib/import/netinet_in.in.h: New file.
898         * gnulib/import/stdalign.in.h: New file.
899         * gnulib/import/sys_socket.c: New file.
900         * gnulib/import/sys_socket.in.h: New file.
901         * gnulib/import/sys_uio.in.h: New file.
902         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
903         module.
904
905 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
906
907         * gnulib/aclocal-m4-deps.mk: New file.
908         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
909         deterministically.
910
911 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
912
913         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
914         KVE_PATH.
915
916 2018-09-18  Tom Tromey  <tom@tromey.com>
917
918         * compile/compile-object-load.c (struct
919         link_hash_table_cleanup_data): Add constructor and destructor.
920         Use DISABLE_COPY_AND_ASSIGN.
921         (~link_hash_table_cleanup_data): Rename from
922         link_hash_table_free.  Now a destructor.
923         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
924
925 2018-09-18  Tom Tromey  <tom@tromey.com>
926
927         * compile/compile-object-run.c (do_module_cleanup): Use delete.
928         * compile/compile-object-load.c (struct munmap_list): Move to
929         header file.
930         (munmap_list::add): Rename from munmap_list_add; rewrite.
931         (munmap_list::~munmap_list): Rename from munmap_list_free.
932         (munmap_listp_free_cleanup): Remove.
933         (compile_object_load): Update.
934         * compile/compile-object-load.h (struct munmap_list): Move from
935         compile-object-load.c.  Rewrite.
936
937 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
938
939         * aarch64-tdep.c (pass_in_v): Use register size.
940         (aarch64_extract_return_value): Likewise.
941         (aarch64_store_return_value): Likewise.
942
943 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
944
945         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
946         rlim_t.
947
948 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
949
950         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
951         Fix short help line.
952
953 2018-09-17  Tom Tromey  <tom@tromey.com>
954
955         PR python/20445:
956         * configure: Rebuild.
957         * configure.ac: Conditionally use -DNDEBUG for Python.
958
959 2018-09-17  Tom Tromey  <tom@tromey.com>
960
961         * configure: Rebuild.
962         * configure.ac: Use gmp as a library dependency when checking for
963         mpfr.
964
965 2018-09-17  Pedro Alves  <palves@redhat.com>
966
967         * python/py-inferior.c (find_inferior_object): Delete.
968
969 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
970
971         * compile/compile-cplus-types.c
972         (compile_cplus_instance::enter_scope): Don't use new_scope after
973         std::move.
974
975 2018-09-17  Tom Tromey  <tom@tromey.com>
976
977         * common/pathstuff.c (get_standard_cache_dir): Use
978         ~/Library/Caches on macOS.
979         * common/pathstuff.h (get_standard_cache_dir): Update comment.
980
981 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
982
983         PR python/23669
984         * breakpoint.c (commands_cmd_element): New.
985         (_initialize_breakpoint): Assign commands_cmd_element.
986         * breakpoint.h (commands_cmd_element): New.
987         * cli/cli-script.c (while_cmd_element, if_command,
988         define_cmd_element): New.
989         (command_name_equals): Remove.
990         (process_next_line): Compare commands by pointer, not by name.
991         (_initialize_cli_script): Assign the various cmd_list_element
992         variables.
993         * compile/compile.c (compile_cmd_element): New.
994         (_initialize_compile): Assign compile_cmd_element.
995         * compile/compile.h (compile_cmd_element): New.
996         * guile/guile.c (guile_cmd_element): New.
997         (install_gdb_commands): Assign guile_cmd_element.
998         * guile/guile.h (guile_cmd_element): New.
999         * python/python.c (python_cmd_element): New.
1000         (_initialize_python): Assign python_cmd_element.
1001         * python/python.h (python_cmd_element): New.
1002         * tracepoint.c (while_stepping_cmd_element): New.
1003         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1004         * tracepoint.h (while_stepping_cmd_element): New.
1005
1006 2018-09-17  Tom Tromey  <tom@tromey.com>
1007
1008         * infrun.c (save_infcall_suspend_state): Return
1009         infcall_suspend_state_up.
1010         (save_infcall_control_state): Return infcall_control_state_up.
1011         * inferior.h (save_infcall_suspend_state)
1012         (save_infcall_control_state): Declare later.  Return unique
1013         pointers.
1014
1015 2018-09-17  Tom Tromey  <tom@tromey.com>
1016
1017         * infrun.c (struct stop_context): Declare constructor,
1018         destructor, "changed" method.
1019         (stop_context::stop_context): Rename from save_stop_context.
1020         (stop_context::~stop_context): Rename from
1021         release_stop_context_cleanup.
1022         (normal_stop): Update.
1023         (stop_context::changed): Rename from stop_context_changed.  Return
1024         bool.
1025
1026 2018-09-17  Tom Tromey  <tom@tromey.com>
1027
1028         * inferior.h (struct infcall_suspend_state_deleter): New.
1029         (infcall_suspend_state_up): New typedef.
1030         (struct infcall_control_state_deleter): New.
1031         (infcall_control_state_up): New typedef.
1032         (make_cleanup_restore_infcall_suspend_state)
1033         (make_cleanup_restore_infcall_control_state): Don't declare.
1034         * infcall.c (call_function_by_hand_dummy): Update.
1035         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1036         (make_cleanup_restore_infcall_suspend_state): Remove.
1037         (do_restore_infcall_control_state_cleanup)
1038         (make_cleanup_restore_infcall_control_state): Remove.
1039
1040 2018-09-17  Tom Tromey  <tom@tromey.com>
1041
1042         * gdbthread.h (struct thread_control_state): Add initializer.
1043         (class thread_info) <control>: Remove initializer.
1044         * inferior.h (struct inferior_control_state): Add initializer.
1045         (class inferior) <control>: Remove initializer.
1046         (exit_inferior_1): Update.
1047         * infrun.c (struct infcall_control_state): Add constructors.
1048         (save_infcall_control_state): Use new.
1049         (restore_infcall_control_state, discard_infcall_control_state):
1050         Use delete.
1051
1052 2018-09-17  Tom Tromey  <tom@tromey.com>
1053
1054         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1055         unique_ptr.
1056         <siginfo_data>: Now a unique_xmalloc_ptr.
1057         (save_infcall_suspend_state, restore_infcall_suspend_state)
1058         (discard_infcall_suspend_state)
1059         (get_infcall_suspend_state_regcache): Update.
1060
1061 2018-09-17  Tom Tromey  <tom@tromey.com>
1062
1063         * gdbthread.h (struct thread_suspend_state): Add initializers.
1064         (class thread_info) <suspend>: Remove initializer.
1065         * infrun.c (struct infcall_suspend_state): Add initializers.
1066         (save_infcall_suspend_state): Use new.
1067         (discard_infcall_suspend_state): Use delete.
1068
1069 2018-09-16  Tom Tromey  <tom@tromey.com>
1070
1071         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1072         Remove.
1073         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1074         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1075         (py_varobj_iter_new): Likewise.
1076         (py_varobj_get_iterator): Use gdbpy_ref.
1077
1078 2018-09-16  Tom Tromey  <tom@tromey.com>
1079
1080         * python/py-threadevent.c (py_get_event_thread): Simplify.
1081         * python/py-inferior.c (infpy_thread_from_thread_handle):
1082         Return immediately after calling thread_to_thread_object.  Use
1083         Py_RETURN_NONE.
1084         (thread_to_thread_object): Set the exception on a NULL return.
1085
1086 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1087
1088         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1089
1090 2018-09-16  Tom Tromey  <tom@tromey.com>
1091
1092         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1093         Remove.
1094
1095 2018-09-16  Tom Tromey  <tom@tromey.com>
1096
1097         * python/python-internal.h (thread_to_thread_object): Change
1098         return type.
1099         * python/py-inferior.c (thread_to_thread_object): Return a new
1100         reference.
1101         (infpy_thread_from_thread_handle): Update.
1102         * python/py-infthread.c (gdbpy_selected_thread): Update.
1103         * python/py-stopevent.c (create_stop_event_object): Update.
1104         * python/py-threadevent.c (py_get_event_thread): Return a new
1105         reference.
1106         (py_get_event_thread): Update.
1107         * python/py-event.h (py_get_event_thread): Change return type.
1108         * python/py-continueevent.c (create_continue_event_object):
1109         Update.
1110
1111 2018-09-16  Tom Tromey  <tom@tromey.com>
1112
1113         * python/py-progspace.c (pspy_get_objfiles): Update.
1114         * python/python-internal.h (objfile_to_objfile_object): Change
1115         return type.
1116         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1117         Update.
1118         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1119         Update.
1120         * python/python.c (gdbpy_get_current_objfile): Update.
1121         (gdbpy_objfiles): Update.
1122         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1123         Update.
1124         (objfile_to_objfile_object): Return a new reference.
1125         * python/py-symtab.c (stpy_get_objfile): Update.
1126         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1127         Update.
1128
1129 2018-09-16  Tom Tromey  <tom@tromey.com>
1130
1131         * python/py-inferior.c (infpy_get_progspace): Update.
1132         * python/python-internal.h (pspace_to_pspace_object): Change
1133         return type.
1134         * python/py-newobjfileevent.c
1135         (create_clear_objfiles_event_object): Update.
1136         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1137         Update.
1138         * python/python.c (gdbpy_get_current_progspace): Update.
1139         (gdbpy_progspaces): Update.
1140         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1141         reference.
1142         * python/py-objfile.c (objfpy_get_progspace): Update.
1143         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1144         Update.
1145
1146 2018-09-16  Tom Tromey  <tom@tromey.com>
1147
1148         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1149         (solib_name, block_for_pc, find_pc_line): New functions.
1150         (execute_unwinders): Update.
1151         * python/py-block.c (gdbpy_block_for_pc): Remove.
1152         * python/py-inferior.c (infpy_get_progspace): New function.
1153         (inferior_object_getset) <progspace>: Add.
1154         * python/py-progspace.c (pspy_objfiles): Rewrite.
1155         (pspy_solib_name, pspy_block_for_pc)
1156         (pspy_find_pc_line, pspy_is_valid): New functions.
1157         (progspace_object_methods): Add entries for solib_name,
1158         block_for_pc, find_pc_line, is_valid.
1159         * python/python-internal.h (gdbpy_block_for_pc)
1160         (build_objfiles_list): Don't declare.
1161         * python/python.c: Don't include solib.h.
1162         (gdbpy_solib_name, gdbpy_find_pc_line)
1163         (gdbpy_get_current_progspace, build_objfiles_list)
1164         (gdbpy_objfiles): Remove.
1165         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1166         solib_name, find_pc_line>: Remove entries.
1167
1168 2018-09-16  Tom Tromey  <tom@tromey.com>
1169
1170         * top.c (new_ui_command): Use GNU style for metasyntactic
1171         variables.
1172         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1173         variables.
1174         * maint.c (maintenance_translate_address): Remove "<>" around
1175         text.
1176         * interps.c (interpreter_exec_cmd): Use GNU style for
1177         metasyntactic variables.
1178         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1179         metasyntactic variables.
1180         * tracepoint.c (tfind_range_command): Use GNU style for
1181         metasyntactic variables.
1182         (tfind_outside_command): Likewise.
1183         (_initialize_tracepoint): Likewise.
1184         * remote.c (extended_remote_target::create_inferior): Use GNU
1185         style for metasyntactic variables.
1186         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1187         metasyntactic variables.
1188         (adi_assign_command): Likewise.
1189
1190 2018-09-16  Tom Tromey  <tom@tromey.com>
1191
1192         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1193         metasyntactic variables.  Print message if no disassembler options
1194         are available.
1195
1196 2018-09-15  Tom Tromey  <tom@tromey.com>
1197
1198         * infcmd.c (get_inferior_args): Return const char *.
1199         * inferior.h (get_inferior_args): Return type now const.
1200         * linux-tdep.c (linux_fill_prpsinfo): Update.
1201         * procfs.c (procfs_target::make_corefile_notes): Update.
1202
1203 2018-09-07  Tom Tromey  <tom@tromey.com>
1204
1205         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1206         inside the TRY.
1207
1208 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1209
1210         * nios2-tdep.c (nios2_type_align): New.
1211         (nios2_gdb_arch_init): Install type_align hook.
1212
1213 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1214
1215         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1216         type that is neither object file owned, nor gdbarch owned.
1217         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1218         gdbarch is non-NULL.
1219         (alloc_type_instance): Allocate non-objfile owned types on the
1220         gdbarch obstack.
1221         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1222         using TYPE_ALLOC to ensure memory is allocated on the correct
1223         obstack.
1224         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1225         obstack, or the gdbarch obstack.
1226         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1227
1228 2018-09-14  Tom Tromey  <tom@tromey.com>
1229
1230         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1231         block.
1232
1233 2018-09-14  Tom Tromey  <tom@tromey.com>
1234
1235         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1236
1237 2018-09-13  Tom Tromey  <tom@tromey.com>
1238
1239         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1240         static.
1241
1242 2018-09-13  Tom Tromey  <tom@tromey.com>
1243
1244         * exec.c (try_open_exec_file): Use std::string.
1245
1246 2018-09-13  Tom Tromey  <tom@tromey.com>
1247
1248         * utils.h (gdb_bfd_errmsg): Return std::string.
1249         * exec.c (exec_file_attach): Update.
1250         * compile/compile-object-load.c (compile_object_load): Update.
1251         * utils.c (gdb_bfd_errmsg): Return std::string.
1252
1253 2018-09-13  Tom Tromey  <tom@tromey.com>
1254
1255         * procfs.c (struct procinfo_deleter): New.
1256         (procinfo_up): New typedef.
1257         (do_destroy_procinfo_cleanup): Remove.
1258         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1259
1260 2018-09-13  Tom Tromey  <tom@tromey.com>
1261
1262         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1263
1264 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1265 2018-09-13  Tom Tromey  <tom@tromey.com>
1266
1267         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1268         (pspy_get_objfiles): New function.
1269         (progspace_object_methods): New.
1270         (pspace_object_type): Add tp_methods callback.
1271         * python/python-internal.h (build_objfiles_list): New
1272         declaration.
1273         * python/python.c (build_objfiles_list): New function.
1274         (gdbpy_objfiles): Implement using build_objfiles_list.
1275         * NEWS: Mention the Progspace.objfiles method.
1276
1277 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1278
1279         * python/py-inferior.c (infpy_get_progspace): New function.
1280         (inferior_object_getset): Add progspace property.
1281         * NEWS: Mention the new property.
1282
1283 2018-09-13  Tom Tromey  <tom@tromey.com>
1284
1285         PR rust/23650:
1286         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1287
1288 2018-09-13  Tom Tromey  <tom@tromey.com>
1289
1290         PR rust/23626:
1291         * rust-lang.c (rust_enum_variant): Now static.
1292         (rust_empty_enum_p): New function.
1293         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1294         Handle empty enum.
1295
1296 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1297
1298         * python/py-inferior.c (infpy_repr): New.
1299         (inferior_object_type): Register infpy_repr.
1300         * python/py-objfile.c (objfpy_repr): New.
1301         (objfile_object_type): Register objfpy_repr.
1302
1303 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1304
1305         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1306
1307 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1308
1309         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1310         typo.
1311
1312 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1313
1314         * common/common-utils.c: Don't include '<sys/stat.h>'.
1315         (is_regular_file): Move to...
1316         * common/filestuff.c (is_regular_file): ... here.
1317         * common/common-utils.h (is_regular_file): Move to...
1318         * common/filestuff.h (is_regular_file): ... here.
1319
1320 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1321
1322         * skip.c (debug_skip): New variable.
1323         (skiplist_entry::do_skip_file_p): Add debug output.
1324         (skiplist_entry::do_skip_gfile_p): Likewise.
1325         (skiplist_entry::skip_function_p): Likewise.
1326         (_initialize_step_skip): Create debug command.
1327         * NEWS: Mention set/show debug skip.
1328
1329 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1330
1331         * darwin-nat.c (should_disable_startup_with_shell):
1332         New function.
1333         (darwin_nat_target::create_inferior): Add call.
1334
1335 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1336
1337         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1338         inf_port, msg_state>: Initialize.
1339         (struct darwin_thread_info) <signaled, single_step>: Change
1340         type and initialize.
1341         (struct darwin_thread_info) <event>: Initialize.
1342
1343 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1344
1345         PR gdb/23555
1346         PR gdb/23558
1347         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1348         guesses.
1349
1350 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1351
1352         Revert:
1353         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1354
1355         PR gdb/23555
1356         PR gdb/23558
1357         * gnulib/aclocal.m4: Regenerate.
1358         * gnulib/config.in: Regenerate.
1359         * gnulib/configure: Regenerate.
1360         * gnulib/import/Makefile.am: Update.
1361         * gnulib/import/Makefile.in: Update.
1362         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1363         * gnulib/import/_Noreturn.h: ... this.
1364         * gnulib/import/alloca.in.h: Update.
1365         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1366         * gnulib/import/arg-nonnull.h: ... this.
1367         * gnulib/import/assure.h: Update.
1368         * gnulib/import/at-func.c: Update.
1369         * gnulib/import/basename-lgpl.c: Update.
1370         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1371         * gnulib/import/c++defs.h: ... this.
1372         * gnulib/import/canonicalize-lgpl.c: Update.
1373         * gnulib/import/cdefs.h: Update.
1374         * gnulib/import/chdir-long.c: Update.
1375         * gnulib/import/chdir-long.h: Update.
1376         * gnulib/import/cloexec.c: Update.
1377         * gnulib/import/cloexec.h: Update.
1378         * gnulib/import/close.c: Update.
1379         * gnulib/import/closedir.c: Update.
1380         * gnulib/import/config.charset: Update.
1381         * gnulib/import/dirent-private.h: Update.
1382         * gnulib/import/dirent.in.h: Update.
1383         * gnulib/import/dirfd.c: Update.
1384         * gnulib/import/dirname-lgpl.c: Update.
1385         * gnulib/import/dirname.h: Update.
1386         * gnulib/import/dosname.h: Update.
1387         * gnulib/import/dup-safer-flag.c: Update.
1388         * gnulib/import/dup-safer.c: Update.
1389         * gnulib/import/dup.c: Update.
1390         * gnulib/import/dup2.c: Update.
1391         * gnulib/import/errno.in.h: Update.
1392         * gnulib/import/error.c: Update.
1393         * gnulib/import/error.h: Update.
1394         * gnulib/import/exitfail.c: Update.
1395         * gnulib/import/exitfail.h: Update.
1396         * gnulib/import/extra/update-copyright: Update.
1397         * gnulib/import/fchdir.c: Update.
1398         * gnulib/import/fcntl.c: Update.
1399         * gnulib/import/fcntl.in.h: Update.
1400         * gnulib/import/fd-hook.c: Update.
1401         * gnulib/import/fd-hook.h: Update.
1402         * gnulib/import/fd-safer-flag.c: Update.
1403         * gnulib/import/fd-safer.c: Update.
1404         * gnulib/import/fdopendir.c: Update.
1405         * gnulib/import/filename.h: Update.
1406         * gnulib/import/filenamecat-lgpl.c: Update.
1407         * gnulib/import/filenamecat.h: Update.
1408         * gnulib/import/flexmember.h: Update.
1409         * gnulib/import/float+.h: Update.
1410         * gnulib/import/float.c: Update.
1411         * gnulib/import/float.in.h: Update.
1412         * gnulib/import/fnmatch.c: Update.
1413         * gnulib/import/fnmatch.in.h: Update.
1414         * gnulib/import/fnmatch_loop.c: Update.
1415         * gnulib/import/fpucw.h: Update.
1416         * gnulib/import/frexp.c: Update.
1417         * gnulib/import/frexpl.c: Update.
1418         * gnulib/import/fstat.c: Update.
1419         * gnulib/import/fstatat.c: Update.
1420         * gnulib/import/getcwd-lgpl.c: Update.
1421         * gnulib/import/getcwd.c: Update.
1422         * gnulib/import/getdtablesize.c: Update.
1423         * gnulib/import/getlogin_r.c: Update.
1424         * gnulib/import/getprogname.c: Update.
1425         * gnulib/import/getprogname.h: Update.
1426         * gnulib/import/gettext.h: Update.
1427         * gnulib/import/gettimeofday.c: Update.
1428         * gnulib/import/glob-libc.h: Update.
1429         * gnulib/import/glob.c: Update.
1430         * gnulib/import/glob.in.h: Update.
1431         * gnulib/import/glob_internal.h: Update.
1432         * gnulib/import/glob_pattern_p.c: Update.
1433         * gnulib/import/globfree.c: Update.
1434         * gnulib/import/hard-locale.c: Update.
1435         * gnulib/import/hard-locale.h: Update.
1436         * gnulib/import/intprops.h: Update.
1437         * gnulib/import/inttypes.in.h: Update.
1438         * gnulib/import/isnan.c: Update.
1439         * gnulib/import/isnand-nolibm.h: Update.
1440         * gnulib/import/isnand.c: Update.
1441         * gnulib/import/isnanl-nolibm.h: Update.
1442         * gnulib/import/isnanl.c: Update.
1443         * gnulib/import/itold.c: Update.
1444         * gnulib/import/libc-config.h: Update.
1445         * gnulib/import/limits.in.h: Update.
1446         * gnulib/import/localcharset.c: Update.
1447         * gnulib/import/localcharset.h: Update.
1448         * gnulib/import/localtime-buffer.c: Update.
1449         * gnulib/import/localtime-buffer.h: Update.
1450         * gnulib/import/lstat.c: Update.
1451         * gnulib/import/m4/00gnulib.m4: Update.
1452         * gnulib/import/m4/__inline.m4: Update.
1453         * gnulib/import/m4/absolute-header.m4: Update.
1454         * gnulib/import/m4/alloca.m4: Update.
1455         * gnulib/import/m4/builtin-expect.m4: Update.
1456         * gnulib/import/m4/canonicalize.m4: Update.
1457         * gnulib/import/m4/chdir-long.m4: Update.
1458         * gnulib/import/m4/close.m4: Update.
1459         * gnulib/import/m4/closedir.m4: Update.
1460         * gnulib/import/m4/configmake.m4: Update.
1461         * gnulib/import/m4/d-ino.m4: Update.
1462         * gnulib/import/m4/d-type.m4: Update.
1463         * gnulib/import/m4/dirent_h.m4: Update.
1464         * gnulib/import/m4/dirfd.m4: Update.
1465         * gnulib/import/m4/dirname.m4: Update.
1466         * gnulib/import/m4/double-slash-root.m4: Update.
1467         * gnulib/import/m4/dup.m4: Update.
1468         * gnulib/import/m4/dup2.m4: Update.
1469         * gnulib/import/m4/eealloc.m4: Update.
1470         * gnulib/import/m4/environ.m4: Update.
1471         * gnulib/import/m4/errno_h.m4: Update.
1472         * gnulib/import/m4/error.m4: Update.
1473         * gnulib/import/m4/exponentd.m4: Update.
1474         * gnulib/import/m4/exponentl.m4: Update.
1475         * gnulib/import/m4/extensions.m4: Update.
1476         * gnulib/import/m4/extern-inline.m4: Update.
1477         * gnulib/import/m4/fchdir.m4: Update.
1478         * gnulib/import/m4/fcntl-o.m4: Update.
1479         * gnulib/import/m4/fcntl.m4: Update.
1480         * gnulib/import/m4/fcntl_h.m4: Update.
1481         * gnulib/import/m4/fdopendir.m4: Update.
1482         * gnulib/import/m4/filenamecat.m4: Update.
1483         * gnulib/import/m4/flexmember.m4: Update.
1484         * gnulib/import/m4/float_h.m4: Update.
1485         * gnulib/import/m4/fnmatch.m4: Update.
1486         * gnulib/import/m4/fnmatch_h.m4: Update.
1487         * gnulib/import/m4/fpieee.m4: Update.
1488         * gnulib/import/m4/frexp.m4: Update.
1489         * gnulib/import/m4/frexpl.m4: Update.
1490         * gnulib/import/m4/fstat.m4: Update.
1491         * gnulib/import/m4/fstatat.m4: Update.
1492         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1493         * gnulib/import/m4/getcwd-path-max.m4: Update.
1494         * gnulib/import/m4/getcwd.m4: Update.
1495         * gnulib/import/m4/getdtablesize.m4: Update.
1496         * gnulib/import/m4/getlogin.m4: Update.
1497         * gnulib/import/m4/getlogin_r.m4: Update.
1498         * gnulib/import/m4/getpagesize.m4: Update.
1499         * gnulib/import/m4/getprogname.m4: Update.
1500         * gnulib/import/m4/gettimeofday.m4: Update.
1501         * gnulib/import/m4/glibc21.m4: Update.
1502         * gnulib/import/m4/glob.m4: Update.
1503         * gnulib/import/m4/glob_h.m4: Update.
1504         * gnulib/import/m4/gnulib-cache.m4: Update.
1505         * gnulib/import/m4/gnulib-common.m4: Update.
1506         * gnulib/import/m4/gnulib-comp.m4: Update.
1507         * gnulib/import/m4/gnulib-tool.m4: Update.
1508         * gnulib/import/m4/hard-locale.m4: Update.
1509         * gnulib/import/m4/include_next.m4: Update.
1510         * gnulib/import/m4/inttypes-pri.m4: Update.
1511         * gnulib/import/m4/inttypes.m4: Update.
1512         * gnulib/import/m4/isnand.m4: Update.
1513         * gnulib/import/m4/isnanl.m4: Update.
1514         * gnulib/import/m4/largefile.m4: Update.
1515         * gnulib/import/m4/limits-h.m4: Update.
1516         * gnulib/import/m4/localcharset.m4: Update.
1517         * gnulib/import/m4/locale-fr.m4: Update.
1518         * gnulib/import/m4/locale-ja.m4: Update.
1519         * gnulib/import/m4/locale-zh.m4: Update.
1520         * gnulib/import/m4/localtime-buffer.m4: Update.
1521         * gnulib/import/m4/longlong.m4: Update.
1522         * gnulib/import/m4/lstat.m4: Update.
1523         * gnulib/import/m4/malloc.m4: Update.
1524         * gnulib/import/m4/malloca.m4: Update.
1525         * gnulib/import/m4/math_h.m4: Update.
1526         * gnulib/import/m4/mbrtowc.m4: Update.
1527         * gnulib/import/m4/mbsinit.m4: Update.
1528         * gnulib/import/m4/mbsrtowcs.m4: Update.
1529         * gnulib/import/m4/mbstate_t.m4: Update.
1530         * gnulib/import/m4/memchr.m4: Update.
1531         * gnulib/import/m4/memmem.m4: Update.
1532         * gnulib/import/m4/mempcpy.m4: Update.
1533         * gnulib/import/m4/memrchr.m4: Update.
1534         * gnulib/import/m4/mkdir.m4: Update.
1535         * gnulib/import/m4/mkstemp.m4: Update.
1536         * gnulib/import/m4/mmap-anon.m4: Update.
1537         * gnulib/import/m4/mode_t.m4: Update.
1538         * gnulib/import/m4/msvc-inval.m4: Update.
1539         * gnulib/import/m4/msvc-nothrow.m4: Update.
1540         * gnulib/import/m4/multiarch.m4: Update.
1541         * gnulib/import/m4/nocrash.m4: Update.
1542         * gnulib/import/m4/off_t.m4: Update.
1543         * gnulib/import/m4/onceonly.m4: Update.
1544         * gnulib/import/m4/open-cloexec.m4: Update.
1545         * gnulib/import/m4/open.m4: Update.
1546         * gnulib/import/m4/openat.m4: Update.
1547         * gnulib/import/m4/opendir.m4: Update.
1548         * gnulib/import/m4/pathmax.m4: Update.
1549         * gnulib/import/m4/rawmemchr.m4: Update.
1550         * gnulib/import/m4/readdir.m4: Update.
1551         * gnulib/import/m4/readlink.m4: Update.
1552         * gnulib/import/m4/realloc.m4: Update.
1553         * gnulib/import/m4/rename.m4: Update.
1554         * gnulib/import/m4/rewinddir.m4: Update.
1555         * gnulib/import/m4/rmdir.m4: Update.
1556         * gnulib/import/m4/save-cwd.m4: Update.
1557         * gnulib/import/m4/secure_getenv.m4: Update.
1558         * gnulib/import/m4/setenv.m4: Update.
1559         * gnulib/import/m4/signal_h.m4: Update.
1560         * gnulib/import/m4/ssize_t.m4: Update.
1561         * gnulib/import/m4/stat-time.m4: Update.
1562         * gnulib/import/m4/stat.m4: Update.
1563         * gnulib/import/m4/std-gnu11.m4: Update.
1564         * gnulib/import/m4/stdbool.m4: Update.
1565         * gnulib/import/m4/stddef_h.m4: Update.
1566         * gnulib/import/m4/stdint.m4: Update.
1567         * gnulib/import/m4/stdio_h.m4: Update.
1568         * gnulib/import/m4/stdlib_h.m4: Update.
1569         * gnulib/import/m4/strchrnul.m4: Update.
1570         * gnulib/import/m4/strdup.m4: Update.
1571         * gnulib/import/m4/strerror.m4: Update.
1572         * gnulib/import/m4/string_h.m4: Update.
1573         * gnulib/import/m4/strstr.m4: Update.
1574         * gnulib/import/m4/strtok_r.m4: Update.
1575         * gnulib/import/m4/sys_socket_h.m4: Update.
1576         * gnulib/import/m4/sys_stat_h.m4: Update.
1577         * gnulib/import/m4/sys_time_h.m4: Update.
1578         * gnulib/import/m4/sys_types_h.m4: Update.
1579         * gnulib/import/m4/tempname.m4: Update.
1580         * gnulib/import/m4/time_h.m4: Update.
1581         * gnulib/import/m4/unistd-safer.m4: Update.
1582         * gnulib/import/m4/unistd_h.m4: Update.
1583         * gnulib/import/m4/warn-on-use.m4: Update.
1584         * gnulib/import/m4/wchar_h.m4: Update.
1585         * gnulib/import/m4/wchar_t.m4: Update.
1586         * gnulib/import/m4/wctype_h.m4: Update.
1587         * gnulib/import/m4/wint_t.m4: Update.
1588         * gnulib/import/malloc.c: Update.
1589         * gnulib/import/malloc/scratch_buffer.h: Update.
1590         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1591         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1592         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1593         * gnulib/import/malloca.c: Update.
1594         * gnulib/import/malloca.h: Update.
1595         * gnulib/import/malloca.valgrind: Update.
1596         * gnulib/import/math.in.h: Update.
1597         * gnulib/import/mbrtowc.c: Update.
1598         * gnulib/import/mbsinit.c: Update.
1599         * gnulib/import/mbsrtowcs-impl.h: Update.
1600         * gnulib/import/mbsrtowcs-state.c: Update.
1601         * gnulib/import/mbsrtowcs.c: Update.
1602         * gnulib/import/memchr.c: Update.
1603         * gnulib/import/memmem.c: Update.
1604         * gnulib/import/mempcpy.c: Update.
1605         * gnulib/import/memrchr.c: Update.
1606         * gnulib/import/mkdir.c: Update.
1607         * gnulib/import/mkstemp.c: Update.
1608         * gnulib/import/msvc-inval.c: Update.
1609         * gnulib/import/msvc-inval.h: Update.
1610         * gnulib/import/msvc-nothrow.c: Update.
1611         * gnulib/import/msvc-nothrow.h: Update.
1612         * gnulib/import/open.c: Update.
1613         * gnulib/import/openat-die.c: Update.
1614         * gnulib/import/openat-priv.h: Update.
1615         * gnulib/import/openat-proc.c: Update.
1616         * gnulib/import/openat.c: Update.
1617         * gnulib/import/openat.h: Update.
1618         * gnulib/import/opendir.c: Update.
1619         * gnulib/import/pathmax.h: Update.
1620         * gnulib/import/pipe-safer.c: Update.
1621         * gnulib/import/rawmemchr.c: Update.
1622         * gnulib/import/readdir.c: Update.
1623         * gnulib/import/readlink.c: Update.
1624         * gnulib/import/realloc.c: Update.
1625         * gnulib/import/ref-add.sin: Update.
1626         * gnulib/import/ref-del.sin: Update.
1627         * gnulib/import/rename.c: Update.
1628         * gnulib/import/rewinddir.c: Update.
1629         * gnulib/import/rmdir.c: Update.
1630         * gnulib/import/same-inode.h: Update.
1631         * gnulib/import/save-cwd.c: Update.
1632         * gnulib/import/save-cwd.h: Update.
1633         * gnulib/import/scratch_buffer.h: Update.
1634         * gnulib/import/secure_getenv.c: Update.
1635         * gnulib/import/setenv.c: Update.
1636         * gnulib/import/signal.in.h: Update.
1637         * gnulib/import/stat-time.c: Update.
1638         * gnulib/import/stat-time.h: Update.
1639         * gnulib/import/stat-w32.c: Update.
1640         * gnulib/import/stat-w32.h: Update.
1641         * gnulib/import/stat.c: Update.
1642         * gnulib/import/stdbool.in.h: Update.
1643         * gnulib/import/stddef.in.h: Update.
1644         * gnulib/import/stdint.in.h: Update.
1645         * gnulib/import/stdio.in.h: Update.
1646         * gnulib/import/stdlib.in.h: Update.
1647         * gnulib/import/str-two-way.h: Update.
1648         * gnulib/import/strchrnul.c: Update.
1649         * gnulib/import/strdup.c: Update.
1650         * gnulib/import/streq.h: Update.
1651         * gnulib/import/strerror-override.c: Update.
1652         * gnulib/import/strerror-override.h: Update.
1653         * gnulib/import/strerror.c: Update.
1654         * gnulib/import/string.in.h: Update.
1655         * gnulib/import/stripslash.c: Update.
1656         * gnulib/import/strnlen1.c: Update.
1657         * gnulib/import/strnlen1.h: Update.
1658         * gnulib/import/strstr.c: Update.
1659         * gnulib/import/strtok_r.c: Update.
1660         * gnulib/import/sys_stat.in.h: Update.
1661         * gnulib/import/sys_time.in.h: Update.
1662         * gnulib/import/sys_types.in.h: Update.
1663         * gnulib/import/tempname.c: Update.
1664         * gnulib/import/tempname.h: Update.
1665         * gnulib/import/time.in.h: Update.
1666         * gnulib/import/unistd--.h: Update.
1667         * gnulib/import/unistd-safer.h: Update.
1668         * gnulib/import/unistd.in.h: Update.
1669         * gnulib/import/unsetenv.c: Update.
1670         * gnulib/import/verify.h: Update.
1671         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1672         * gnulib/import/wchar.in.h: Update.
1673         * gnulib/import/wctype.in.h: Update.
1674         * gnulib/import/xalloc-oversized.h: Update.
1675         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1676         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1677
1678 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1679
1680         * record-btrace.c (get_thread_current_frame): Remove
1681         old_inferior_ptid.
1682
1683 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1684
1685         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1686         with check_tag to 1 if and only if the type is tagged and the
1687         component being searched cannot been found in the current
1688         view. Otherwise, always call ada_to_fixed_type with
1689         check_tag to 0.
1690
1691 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1692
1693         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1694         declaration.
1695         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1696         * ada-varobj.c (ada_varobj_get_number_of_children,
1697         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1698
1699 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1700
1701         * ada-valprint.c (ada_value_print): Use type instead of
1702         enclosing type.
1703
1704 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1705
1706         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1707         an array of access to unconstrained array.
1708
1709 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1710
1711         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1712         (ada_check_typedef): Use it.
1713
1714 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1715
1716         * ada-varobj.c (ada_varobj_describe_struct_child)
1717         (ada_varobj_describe_child): Handle union case like struct one.
1718
1719 2018-09-10  Tom Tromey  <tom@tromey.com>
1720
1721         PR python/18380:
1722         * python/python.c (_initialize_python): Make example in "python"
1723         help work in Python 3.
1724
1725 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1726
1727         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1728         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1729         $(EXEEXT) to the script, as it is not a program.
1730
1731 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1732
1733         * python/py-prettyprint.c (pretty_print_one_value): Return
1734         gdbpy_ref<>.
1735         (print_string_repr): Adjust.
1736         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1737         * python/python-internal.h (apply_varobj_pretty_printer): Return
1738         gdbpy_ref<>.
1739         * varobj.c (varobj_value_get_print_value): Adjust.
1740
1741 2018-09-08  Tom Tromey  <tom@tromey.com>
1742
1743         PR python/16047:
1744         * python/py-prettyprint.c (pretty_print_one_value): Check for
1745         to_string method.
1746
1747 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1748
1749         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1750         replace_operator_with_call.
1751
1752 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1753
1754         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1755
1756 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1757
1758         * ada-typeprint.c (print_range): Print the bounds using TYPE
1759         rather than its TYPE_TARGET_TYPE.
1760
1761 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1762
1763         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1764         call to ada_to_fixed_value_create.
1765
1766 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1767
1768         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1769
1770 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1771
1772         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1773         by calls to error.
1774
1775 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1776
1777         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1778         Move update of loop variable "fi".
1779
1780 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1781
1782         * ada-lang.c (value_assign_to_component): In the case of
1783         big-endian targets, extract the bits of the given VAL
1784         using an src_offset of zero if container is not a scalar.
1785
1786 2018-09-06  Simon Ser  <contact@emersion.fr>
1787
1788         PR gdb/23105
1789         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1790         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1791         * fbsd-tdep.c (fbsd_make_note_desc): New.
1792         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1793         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1794         * target.h (enum target_object) Add FreeBSD-specific
1795         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1796
1797 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1798
1799         * compile/compile-c.h (generate_c_for_variable_locations):
1800         Change reference to pointer.
1801         * compile/compile-c-support.c (compile_program) <compute>:
1802         Likewise.
1803         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1804         (generate_c_for_for_one_variable): Likewise
1805         (generate_c_for_variable_locations): Likewise
1806         * compile/compile-c-types.c (compile_c_instance::convert_type):
1807         Likewise
1808         * compile/compile-cplus-symbols.c (convert_one_symbol):
1809         std::move the scope passed to enter_scope.
1810         * compile/compile-cplus-types.c
1811         (compile_cplus_instance::enter_scope): Make parameter
1812         rvalue-reference.
1813         (compile_cplus_instance::new_scope): Change reference to
1814         pointer.
1815         (compile_cplus_instance::convert_type): Likewise
1816         (compile_cplus_convert_typedef): std::move the scope passed to
1817         enter_scope.
1818         (compile_cplus_convert_struct_or_union): Likewise.
1819         (compile_cplus_convert_enum): Likewise.
1820         (compile_cplus_convert_namespace): Likewise.
1821         * compile/compile-cplus.h (compile_cplus_instance)
1822         <enter_scope>: Make parameter rvalue-reference.
1823         * compile/compile-internal.h (compile_instance)
1824         <get_cached_type>: Likewise
1825         * compile/compile-loc2c.c (push): Likewise
1826         (pushf): Likewise
1827         (unary): Likewise
1828         (binary): Likewise
1829         (print_label): Likewise
1830         (pushf_register_address): Likewise
1831         (pushf_register): Likewise
1832         (do_compile_dwarf_expr_to_c): Likewise
1833         (compile_dwarf_expr_to_c): Likewise
1834         (compile_dwarf_bounds_to_c): Likewise
1835         * compile/compile.c (compile_instance::get_cached_type):
1836         Likewise
1837         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1838         (compile_dwarf_bounds_to_c): Likewise
1839         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1840         (dwarf2_compile_property_to_c): Likewise
1841         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1842         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1843         Likewise
1844
1845 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1846
1847         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1848         * tui/tui-data.c (init_content_element): Don't initialize it.
1849
1850 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1851
1852         * tui/tui-data.h (struct tui_win_info)
1853         <detail::opaque>: Remove.
1854         * tui/tui-data.c (init_win_info): Remove assignment.
1855
1856 2018-09-05  Tom Tromey  <tom@tromey.com>
1857
1858         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1859         -Wformat-nonliteral.
1860         * target-float.c (host_float_ops<T>::to_string)
1861         (host_float_ops<T>::from_string): Use
1862         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1863         * configure: Rebuild.
1864
1865 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1866
1867         * printcmd.c (printf_c_string): Use
1868         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1869         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1870
1871 2018-09-05  Tom Tromey  <tom@tromey.com>
1872
1873         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1874
1875 2018-09-05  Tom de Vries  <tdevries@suse.de>
1876
1877         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1878         with resolve_abstract_p == true.
1879         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1880         defaulting to false. Propagate resolve_abstract_p to
1881         dwarf2_fetch_die_loc_sect_off.
1882         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1883         parameter, defaulting to false.
1884         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1885         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1886         parameter.
1887         * dwarf2read.h (struct die_info): Forward-declare.
1888         (die_info_ptr): New typedef.
1889         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1890
1891 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1892
1893         GDB 8.2 released.
1894
1895 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1896             Pedro Alves  <palves@redhat.com>
1897
1898         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1899         "aclocal-m4-deps.mk".  Include file here.
1900         $(srcdir)/aclocal.m4: Add "configure.ac".
1901         * gnulib/aclocal-m4-deps.mk: New file.
1902         * gnulib/update-gnulib.sh: Automatically update
1903         "aclocal-m4-deps.mk".
1904
1905 2018-09-04  Tom Tromey  <tom@tromey.com>
1906
1907         * configure: Rebuild.
1908         * configure.ac: Remove multi-ice code.
1909
1910 2018-09-04  Tom Tromey  <tom@tromey.com>
1911
1912         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1913         (ada-exp.o): Update.
1914
1915 2018-09-04  Tom Tromey  <tom@tromey.com>
1916
1917         * Makefile.in (printcmd.o, target-float.o): Remove.
1918         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1919
1920 2018-09-04  Tom Tromey  <tom@tromey.com>
1921
1922         * gnulib/Makefile.in: Remove obsolete comment.
1923         * Makefile.in: Remove obsolete comment.
1924
1925 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1926
1927         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1928         line with '+'.
1929
1930 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1931
1932         * riscv-tdep.c: Add 'prologue-value.h' include.
1933         (struct riscv_unwind_cache): New struct.
1934         (riscv_debug_unwinder): New global.
1935         (riscv_scan_prologue): Update arguments, capture register details
1936         from prologue scan.
1937         (riscv_skip_prologue): Reformat arguments line, move end of
1938         prologue calculation into riscv_scan_prologue.
1939         (riscv_frame_cache): Update return type, create
1940         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1941         details.
1942         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1943         (riscv_frame_prev_register): Use the trad_frame within the
1944         riscv_unwind_cache.
1945         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1946         flag.
1947
1948 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1949
1950         * trad-frame.h (trad_frame_set_realreg): Declare.
1951         (trad_frame_set_addr): Declare.
1952         * trad-frame.c (trad_frame_set_realreg): Define new function.
1953         (trad_frame_set_addr): Define new function.
1954         (trad_frame_set_reg_realreg): Use new function.
1955         (trad_frame_set_reg_addr): Use new function.
1956
1957 2018-09-01  Keith Seitz  <keiths@redhat.com>
1958
1959         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1960         pulongest instead of "%lld".
1961         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1962         ATTRIBUTE_UNUSED.
1963
1964 2018-08-31  Tom Tromey  <tom@tromey.com>
1965
1966         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1967         variant part type.
1968
1969 2018-08-31  Pedro Alves  <palves@redhat.com>
1970
1971         * gdbarch.h: Regenerate.
1972
1973 2018-08-31  Pedro Alves  <palves@redhat.com>
1974
1975         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1976         * target.h (Hardware watchpoint interfaces): Describe
1977         continuable/steppable/non-steppable watchpoints.
1978         * gdbarch.h, gdbarch.c: Regenerate.
1979
1980 2018-08-31  Pedro Alves  <palves@redhat.com>
1981
1982         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1983         Delete.
1984         * s390-linux-nat.c
1985         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1986         * target.h (target_ops::have_continuable_watchpoint): Delete.
1987         (target_have_continuable_watchpoint): Delete.
1988         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1989         * target-delegates.c: Regenerate.
1990
1991 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1992
1993         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1994         the files present in "gnulib/import/m4/".
1995
1996 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1997
1998         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1999         c.sw, c.swsp, and c.sdsp.
2000
2001 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2002
2003         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2004         (riscv_read_misa_reg): Don't cache value read into inferior data.
2005         (riscv_new_inferior_data): Delete.
2006         (riscv_inferior_data_cleanup): Delete.
2007         (riscv_inferior_data): Delete.
2008         (riscv_invalidate_inferior_data): Delete.
2009         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2010
2011 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2012
2013         * compile/compile-cplus-types.c
2014         (compile_cplus_instance::leave_scope): Take the address of scope
2015         object.
2016         (compile_cplus_instance::convert_qualified_base): Compare quals
2017         to 0.
2018
2019 2018-08-30  Keith Seitz  <keiths@redhat.com>
2020
2021         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2022         Use "%s" and host_address_to_string instead of "%p" in printf.
2023
2024 2018-08-29  Keith Seitz  <keiths@redhat.com>
2025
2026         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2027         and compile-cplus-types.c.
2028         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2029         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2030         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2031         Declare.
2032         * compile/compile-c-support.c: Include compile-cplus.h.
2033         (load_libcompile): Templatize.
2034         (get_compile_context): "New" function.
2035         (c_get_compile_context): Use get_compile_context.
2036         (cplus_get_compile_context): New function.
2037         (cplus_push_user_expression, cplus_pop_user_expression)
2038         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2039         (cplus_compute_program): Define new structs/functions.
2040         * compile/compile-cplus-symmbols.c: New file.
2041         * compile/compile-cplus-types.c: New file.
2042         * compile/compile-cplus.h: New file.
2043         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2044         Declare.
2045         * compile/compile-object-load.c (get_out_value_type): Use
2046         strncmp_iw when comparing symbol names.
2047         (compile_object_load): Add mst_bss and mst_data.
2048         * compile/compile.c (_initialize_compile): Remove
2049         -Wno-implicit-function-declaration from `compile_args'.
2050         * compile/gcc-cp-plugin.h: New file.
2051         * NEWS: Mention C++ compile support and new debug options.
2052
2053 2018-08-29  Keith Seitz  <keiths@redhat.com>
2054
2055         * linespec.c (collect_info::add_symbol): Make virtual.
2056         (struct symbol_searcher_collect_info): New struct.
2057         (symbol_searcher::find_all_symbols): New method.
2058         * symtab.h (class symbol_searcher): New class.
2059
2060 2018-08-29  Keith Seitz  <keiths@redhat.com>
2061
2062         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2063         Change to vector of block_symbol.  Update all users.
2064         (struct collect_info) <symbols>: Likewise.
2065         (collect_info::add_symbol): Take block_symbol as argument.
2066         Update all callers.
2067         (decode_compound_collector) <m_symbols>: Change type to vector
2068         of block_symbol.  Update all users.
2069         (decode_compound_collector::operator ()): Change parameter type
2070         to block_symbol.
2071         (find_method, find_function_symbols, find_linespec_symbols)
2072         (find_label_symbols_in_block, find_label_symbols): Change symbol
2073         vectors to block_symbol vectors.
2074         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2075         block_symbol.
2076
2077 2018-08-29  Keith Seitz  <keiths@redhat.com>
2078
2079         * linespec.c (symbolp): Remove typedef and VEC definitions.
2080         (bound_minimal_symbol_d): Likewise.
2081
2082 2018-08-29  Keith Seitz  <keiths@redhat.com>
2083
2084         * linespec.c (decode_compound_collector::decode_compound_collector):
2085         Remove initialization for `m_symtabs'.
2086         (decode_compound_collector::release_symbols): Change return type
2087         to std::vector.  Update all callers.
2088         (class decode_compound_collector) <m_symbols>: Change type to
2089         std::vector.
2090         (lookup_prefix_sym): Change return type to std::vector.  Update all
2091         callers.
2092         (compare_symbols): Remove.
2093         (std_compare_symbols): Rename to `compare_symbols'.
2094         (find_method): Change `sym_classes' parameter to std::vector.
2095         Update all callers.  Use std::sort to sort sym_classes.
2096         (find_linespec_symbols): Remove cleanup.
2097
2098 2018-08-29  Keith Seitz  <keiths@redhat.com>
2099
2100         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2101         std::vector.  Update all users.
2102         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2103         (struct collect_info) <minimal_symbols>: Likewise.
2104         (compare_msymbols): Return bool.  Change parameters to const
2105         bound_minimal_symbol references.
2106         (find_method, find_function_symbols, find_linespec_symbols): Change
2107         `minsyms' parameter to std::vector.  Update all callers.
2108
2109 2018-08-29  Keith Seitz  <keiths@redhat.com>
2110
2111         * linespec.c (struct linespec) <label_symbols>: Change type to
2112         std::vector.  Update all users.
2113         (find_label_symbols_in_block): Change `result' parameter to
2114         std::vector.  Update all callers.
2115         (find_label_symbols): Return std::vector.  Update all callers.
2116
2117 2018-08-29  Keith Seitz  <keiths@redhat.com>
2118
2119         * linespec.c (struct linespec) <function_symbols>: Change type to
2120         std::vector.  Update all users.
2121         (struct collect_info) <function_symbols>: Likewise.
2122         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2123         (std_compare_symbols): New function.
2124         (find_method, find_function_symbols, find_linespec_symbols)
2125         (find_label_symbols_in_block): Change `symbols' parameter to
2126         std::vector.  Update all callers.
2127         (find_label_symbols): Likewise for `function_symbols' and
2128         `label_funcs_ret'.
2129
2130 2018-08-29  Keith Seitz  <keiths@redhat.com>
2131
2132         * linespec.c (symtab_vector_up): Define.
2133         (struct linespec) <file_symtabs>: Change type to std::vector *.
2134         Update all uses.
2135         (struct collect_info) <file_symtabs>: Likewise.
2136         (collect_symtabs_from_filename): Return symtab_vector_up.
2137         Update all callers.
2138         (decode_objc): Remove cleanup.
2139         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2140         (symtab_collector::release_symtabs): Return symtab_vector_up.
2141         Update all callers.
2142         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2143         Update all users.
2144         (collect_symtabs_from_filename, symtabs_from_filename): Return
2145         symtab_vector_up.  Update all callers.
2146
2147 2018-08-29  Tom Tromey  <tom@tromey.com>
2148
2149         * csky-tdep.c (csky_analyze_prologue): Use
2150         core_addr_to_string_nz.
2151
2152 2018-08-29  Tom Tromey  <tom@tromey.com>
2153
2154         * windows-nat.c (struct xlate_exception) <them>: Change type to
2155         DWORD.
2156         (xlate): Fix formatting.  Remove last entry.
2157         (struct xlate_exception, xlate): Comment out.
2158         (windows_nat_target::resume): Use ranged for.
2159
2160 2018-08-29  Jim Wilson  <jimw@sifive.com>
2161
2162         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2163         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2164         of NT_PRFPREG.
2165         (riscv_linux_nat_target::store_registers): Likewise.
2166
2167 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2168
2169         PR gdb/23555
2170         PR gdb/23558
2171         * gnulib/aclocal.m4: Regenerate.
2172         * gnulib/config.in: Regenerate.
2173         * gnulib/configure: Regenerate.
2174         * gnulib/import/Makefile.am: Update.
2175         * gnulib/import/Makefile.in: Update.
2176         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2177         * gnulib/import/_Noreturn.h: ... this.
2178         * gnulib/import/alloca.in.h: Update.
2179         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2180         * gnulib/import/arg-nonnull.h: ... this.
2181         * gnulib/import/assure.h: Update.
2182         * gnulib/import/at-func.c: Update.
2183         * gnulib/import/basename-lgpl.c: Update.
2184         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2185         * gnulib/import/c++defs.h: ... this.
2186         * gnulib/import/canonicalize-lgpl.c: Update.
2187         * gnulib/import/cdefs.h: Update.
2188         * gnulib/import/chdir-long.c: Update.
2189         * gnulib/import/chdir-long.h: Update.
2190         * gnulib/import/cloexec.c: Update.
2191         * gnulib/import/cloexec.h: Update.
2192         * gnulib/import/close.c: Update.
2193         * gnulib/import/closedir.c: Update.
2194         * gnulib/import/config.charset: Update.
2195         * gnulib/import/dirent-private.h: Update.
2196         * gnulib/import/dirent.in.h: Update.
2197         * gnulib/import/dirfd.c: Update.
2198         * gnulib/import/dirname-lgpl.c: Update.
2199         * gnulib/import/dirname.h: Update.
2200         * gnulib/import/dosname.h: Update.
2201         * gnulib/import/dup-safer-flag.c: Update.
2202         * gnulib/import/dup-safer.c: Update.
2203         * gnulib/import/dup.c: Update.
2204         * gnulib/import/dup2.c: Update.
2205         * gnulib/import/errno.in.h: Update.
2206         * gnulib/import/error.c: Update.
2207         * gnulib/import/error.h: Update.
2208         * gnulib/import/exitfail.c: Update.
2209         * gnulib/import/exitfail.h: Update.
2210         * gnulib/import/extra/update-copyright: Update.
2211         * gnulib/import/fchdir.c: Update.
2212         * gnulib/import/fcntl.c: Update.
2213         * gnulib/import/fcntl.in.h: Update.
2214         * gnulib/import/fd-hook.c: Update.
2215         * gnulib/import/fd-hook.h: Update.
2216         * gnulib/import/fd-safer-flag.c: Update.
2217         * gnulib/import/fd-safer.c: Update.
2218         * gnulib/import/fdopendir.c: Update.
2219         * gnulib/import/filename.h: Update.
2220         * gnulib/import/filenamecat-lgpl.c: Update.
2221         * gnulib/import/filenamecat.h: Update.
2222         * gnulib/import/flexmember.h: Update.
2223         * gnulib/import/float+.h: Update.
2224         * gnulib/import/float.c: Update.
2225         * gnulib/import/float.in.h: Update.
2226         * gnulib/import/fnmatch.c: Update.
2227         * gnulib/import/fnmatch.in.h: Update.
2228         * gnulib/import/fnmatch_loop.c: Update.
2229         * gnulib/import/fpucw.h: Update.
2230         * gnulib/import/frexp.c: Update.
2231         * gnulib/import/frexpl.c: Update.
2232         * gnulib/import/fstat.c: Update.
2233         * gnulib/import/fstatat.c: Update.
2234         * gnulib/import/getcwd-lgpl.c: Update.
2235         * gnulib/import/getcwd.c: Update.
2236         * gnulib/import/getdtablesize.c: Update.
2237         * gnulib/import/getlogin_r.c: Update.
2238         * gnulib/import/getprogname.c: Update.
2239         * gnulib/import/getprogname.h: Update.
2240         * gnulib/import/gettext.h: Update.
2241         * gnulib/import/gettimeofday.c: Update.
2242         * gnulib/import/glob-libc.h: Update.
2243         * gnulib/import/glob.c: Update.
2244         * gnulib/import/glob.in.h: Update.
2245         * gnulib/import/glob_internal.h: Update.
2246         * gnulib/import/glob_pattern_p.c: Update.
2247         * gnulib/import/globfree.c: Update.
2248         * gnulib/import/hard-locale.c: Update.
2249         * gnulib/import/hard-locale.h: Update.
2250         * gnulib/import/intprops.h: Update.
2251         * gnulib/import/inttypes.in.h: Update.
2252         * gnulib/import/isnan.c: Update.
2253         * gnulib/import/isnand-nolibm.h: Update.
2254         * gnulib/import/isnand.c: Update.
2255         * gnulib/import/isnanl-nolibm.h: Update.
2256         * gnulib/import/isnanl.c: Update.
2257         * gnulib/import/itold.c: Update.
2258         * gnulib/import/libc-config.h: Update.
2259         * gnulib/import/limits.in.h: Update.
2260         * gnulib/import/localcharset.c: Update.
2261         * gnulib/import/localcharset.h: Update.
2262         * gnulib/import/localtime-buffer.c: Update.
2263         * gnulib/import/localtime-buffer.h: Update.
2264         * gnulib/import/lstat.c: Update.
2265         * gnulib/import/m4/00gnulib.m4: Update.
2266         * gnulib/import/m4/__inline.m4: Update.
2267         * gnulib/import/m4/absolute-header.m4: Update.
2268         * gnulib/import/m4/alloca.m4: Update.
2269         * gnulib/import/m4/builtin-expect.m4: Update.
2270         * gnulib/import/m4/canonicalize.m4: Update.
2271         * gnulib/import/m4/chdir-long.m4: Update.
2272         * gnulib/import/m4/close.m4: Update.
2273         * gnulib/import/m4/closedir.m4: Update.
2274         * gnulib/import/m4/configmake.m4: Update.
2275         * gnulib/import/m4/d-ino.m4: Update.
2276         * gnulib/import/m4/d-type.m4: Update.
2277         * gnulib/import/m4/dirent_h.m4: Update.
2278         * gnulib/import/m4/dirfd.m4: Update.
2279         * gnulib/import/m4/dirname.m4: Update.
2280         * gnulib/import/m4/double-slash-root.m4: Update.
2281         * gnulib/import/m4/dup.m4: Update.
2282         * gnulib/import/m4/dup2.m4: Update.
2283         * gnulib/import/m4/eealloc.m4: Update.
2284         * gnulib/import/m4/environ.m4: Update.
2285         * gnulib/import/m4/errno_h.m4: Update.
2286         * gnulib/import/m4/error.m4: Update.
2287         * gnulib/import/m4/exponentd.m4: Update.
2288         * gnulib/import/m4/exponentl.m4: Update.
2289         * gnulib/import/m4/extensions.m4: Update.
2290         * gnulib/import/m4/extern-inline.m4: Update.
2291         * gnulib/import/m4/fchdir.m4: Update.
2292         * gnulib/import/m4/fcntl-o.m4: Update.
2293         * gnulib/import/m4/fcntl.m4: Update.
2294         * gnulib/import/m4/fcntl_h.m4: Update.
2295         * gnulib/import/m4/fdopendir.m4: Update.
2296         * gnulib/import/m4/filenamecat.m4: Update.
2297         * gnulib/import/m4/flexmember.m4: Update.
2298         * gnulib/import/m4/float_h.m4: Update.
2299         * gnulib/import/m4/fnmatch.m4: Update.
2300         * gnulib/import/m4/fnmatch_h.m4: Update.
2301         * gnulib/import/m4/fpieee.m4: Update.
2302         * gnulib/import/m4/frexp.m4: Update.
2303         * gnulib/import/m4/frexpl.m4: Update.
2304         * gnulib/import/m4/fstat.m4: Update.
2305         * gnulib/import/m4/fstatat.m4: Update.
2306         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2307         * gnulib/import/m4/getcwd-path-max.m4: Update.
2308         * gnulib/import/m4/getcwd.m4: Update.
2309         * gnulib/import/m4/getdtablesize.m4: Update.
2310         * gnulib/import/m4/getlogin.m4: Update.
2311         * gnulib/import/m4/getlogin_r.m4: Update.
2312         * gnulib/import/m4/getpagesize.m4: Update.
2313         * gnulib/import/m4/getprogname.m4: Update.
2314         * gnulib/import/m4/gettimeofday.m4: Update.
2315         * gnulib/import/m4/glibc21.m4: Update.
2316         * gnulib/import/m4/glob.m4: Update.
2317         * gnulib/import/m4/glob_h.m4: Update.
2318         * gnulib/import/m4/gnulib-cache.m4: Update.
2319         * gnulib/import/m4/gnulib-common.m4: Update.
2320         * gnulib/import/m4/gnulib-comp.m4: Update.
2321         * gnulib/import/m4/gnulib-tool.m4: Update.
2322         * gnulib/import/m4/hard-locale.m4: Update.
2323         * gnulib/import/m4/include_next.m4: Update.
2324         * gnulib/import/m4/inttypes-pri.m4: Update.
2325         * gnulib/import/m4/inttypes.m4: Update.
2326         * gnulib/import/m4/isnand.m4: Update.
2327         * gnulib/import/m4/isnanl.m4: Update.
2328         * gnulib/import/m4/largefile.m4: Update.
2329         * gnulib/import/m4/limits-h.m4: Update.
2330         * gnulib/import/m4/localcharset.m4: Update.
2331         * gnulib/import/m4/locale-fr.m4: Update.
2332         * gnulib/import/m4/locale-ja.m4: Update.
2333         * gnulib/import/m4/locale-zh.m4: Update.
2334         * gnulib/import/m4/localtime-buffer.m4: Update.
2335         * gnulib/import/m4/longlong.m4: Update.
2336         * gnulib/import/m4/lstat.m4: Update.
2337         * gnulib/import/m4/malloc.m4: Update.
2338         * gnulib/import/m4/malloca.m4: Update.
2339         * gnulib/import/m4/math_h.m4: Update.
2340         * gnulib/import/m4/mbrtowc.m4: Update.
2341         * gnulib/import/m4/mbsinit.m4: Update.
2342         * gnulib/import/m4/mbsrtowcs.m4: Update.
2343         * gnulib/import/m4/mbstate_t.m4: Update.
2344         * gnulib/import/m4/memchr.m4: Update.
2345         * gnulib/import/m4/memmem.m4: Update.
2346         * gnulib/import/m4/mempcpy.m4: Update.
2347         * gnulib/import/m4/memrchr.m4: Update.
2348         * gnulib/import/m4/mkdir.m4: Update.
2349         * gnulib/import/m4/mkstemp.m4: Update.
2350         * gnulib/import/m4/mmap-anon.m4: Update.
2351         * gnulib/import/m4/mode_t.m4: Update.
2352         * gnulib/import/m4/msvc-inval.m4: Update.
2353         * gnulib/import/m4/msvc-nothrow.m4: Update.
2354         * gnulib/import/m4/multiarch.m4: Update.
2355         * gnulib/import/m4/nocrash.m4: Update.
2356         * gnulib/import/m4/off_t.m4: Update.
2357         * gnulib/import/m4/onceonly.m4: Update.
2358         * gnulib/import/m4/open-cloexec.m4: Update.
2359         * gnulib/import/m4/open.m4: Update.
2360         * gnulib/import/m4/openat.m4: Update.
2361         * gnulib/import/m4/opendir.m4: Update.
2362         * gnulib/import/m4/pathmax.m4: Update.
2363         * gnulib/import/m4/rawmemchr.m4: Update.
2364         * gnulib/import/m4/readdir.m4: Update.
2365         * gnulib/import/m4/readlink.m4: Update.
2366         * gnulib/import/m4/realloc.m4: Update.
2367         * gnulib/import/m4/rename.m4: Update.
2368         * gnulib/import/m4/rewinddir.m4: Update.
2369         * gnulib/import/m4/rmdir.m4: Update.
2370         * gnulib/import/m4/save-cwd.m4: Update.
2371         * gnulib/import/m4/secure_getenv.m4: Update.
2372         * gnulib/import/m4/setenv.m4: Update.
2373         * gnulib/import/m4/signal_h.m4: Update.
2374         * gnulib/import/m4/ssize_t.m4: Update.
2375         * gnulib/import/m4/stat-time.m4: Update.
2376         * gnulib/import/m4/stat.m4: Update.
2377         * gnulib/import/m4/std-gnu11.m4: Update.
2378         * gnulib/import/m4/stdbool.m4: Update.
2379         * gnulib/import/m4/stddef_h.m4: Update.
2380         * gnulib/import/m4/stdint.m4: Update.
2381         * gnulib/import/m4/stdio_h.m4: Update.
2382         * gnulib/import/m4/stdlib_h.m4: Update.
2383         * gnulib/import/m4/strchrnul.m4: Update.
2384         * gnulib/import/m4/strdup.m4: Update.
2385         * gnulib/import/m4/strerror.m4: Update.
2386         * gnulib/import/m4/string_h.m4: Update.
2387         * gnulib/import/m4/strstr.m4: Update.
2388         * gnulib/import/m4/strtok_r.m4: Update.
2389         * gnulib/import/m4/sys_socket_h.m4: Update.
2390         * gnulib/import/m4/sys_stat_h.m4: Update.
2391         * gnulib/import/m4/sys_time_h.m4: Update.
2392         * gnulib/import/m4/sys_types_h.m4: Update.
2393         * gnulib/import/m4/tempname.m4: Update.
2394         * gnulib/import/m4/time_h.m4: Update.
2395         * gnulib/import/m4/unistd-safer.m4: Update.
2396         * gnulib/import/m4/unistd_h.m4: Update.
2397         * gnulib/import/m4/warn-on-use.m4: Update.
2398         * gnulib/import/m4/wchar_h.m4: Update.
2399         * gnulib/import/m4/wchar_t.m4: Update.
2400         * gnulib/import/m4/wctype_h.m4: Update.
2401         * gnulib/import/m4/wint_t.m4: Update.
2402         * gnulib/import/malloc.c: Update.
2403         * gnulib/import/malloc/scratch_buffer.h: Update.
2404         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2405         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2406         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2407         * gnulib/import/malloca.c: Update.
2408         * gnulib/import/malloca.h: Update.
2409         * gnulib/import/malloca.valgrind: Update.
2410         * gnulib/import/math.in.h: Update.
2411         * gnulib/import/mbrtowc.c: Update.
2412         * gnulib/import/mbsinit.c: Update.
2413         * gnulib/import/mbsrtowcs-impl.h: Update.
2414         * gnulib/import/mbsrtowcs-state.c: Update.
2415         * gnulib/import/mbsrtowcs.c: Update.
2416         * gnulib/import/memchr.c: Update.
2417         * gnulib/import/memmem.c: Update.
2418         * gnulib/import/mempcpy.c: Update.
2419         * gnulib/import/memrchr.c: Update.
2420         * gnulib/import/mkdir.c: Update.
2421         * gnulib/import/mkstemp.c: Update.
2422         * gnulib/import/msvc-inval.c: Update.
2423         * gnulib/import/msvc-inval.h: Update.
2424         * gnulib/import/msvc-nothrow.c: Update.
2425         * gnulib/import/msvc-nothrow.h: Update.
2426         * gnulib/import/open.c: Update.
2427         * gnulib/import/openat-die.c: Update.
2428         * gnulib/import/openat-priv.h: Update.
2429         * gnulib/import/openat-proc.c: Update.
2430         * gnulib/import/openat.c: Update.
2431         * gnulib/import/openat.h: Update.
2432         * gnulib/import/opendir.c: Update.
2433         * gnulib/import/pathmax.h: Update.
2434         * gnulib/import/pipe-safer.c: Update.
2435         * gnulib/import/rawmemchr.c: Update.
2436         * gnulib/import/readdir.c: Update.
2437         * gnulib/import/readlink.c: Update.
2438         * gnulib/import/realloc.c: Update.
2439         * gnulib/import/ref-add.sin: Update.
2440         * gnulib/import/ref-del.sin: Update.
2441         * gnulib/import/rename.c: Update.
2442         * gnulib/import/rewinddir.c: Update.
2443         * gnulib/import/rmdir.c: Update.
2444         * gnulib/import/same-inode.h: Update.
2445         * gnulib/import/save-cwd.c: Update.
2446         * gnulib/import/save-cwd.h: Update.
2447         * gnulib/import/scratch_buffer.h: Update.
2448         * gnulib/import/secure_getenv.c: Update.
2449         * gnulib/import/setenv.c: Update.
2450         * gnulib/import/signal.in.h: Update.
2451         * gnulib/import/stat-time.c: Update.
2452         * gnulib/import/stat-time.h: Update.
2453         * gnulib/import/stat-w32.c: Update.
2454         * gnulib/import/stat-w32.h: Update.
2455         * gnulib/import/stat.c: Update.
2456         * gnulib/import/stdbool.in.h: Update.
2457         * gnulib/import/stddef.in.h: Update.
2458         * gnulib/import/stdint.in.h: Update.
2459         * gnulib/import/stdio.in.h: Update.
2460         * gnulib/import/stdlib.in.h: Update.
2461         * gnulib/import/str-two-way.h: Update.
2462         * gnulib/import/strchrnul.c: Update.
2463         * gnulib/import/strdup.c: Update.
2464         * gnulib/import/streq.h: Update.
2465         * gnulib/import/strerror-override.c: Update.
2466         * gnulib/import/strerror-override.h: Update.
2467         * gnulib/import/strerror.c: Update.
2468         * gnulib/import/string.in.h: Update.
2469         * gnulib/import/stripslash.c: Update.
2470         * gnulib/import/strnlen1.c: Update.
2471         * gnulib/import/strnlen1.h: Update.
2472         * gnulib/import/strstr.c: Update.
2473         * gnulib/import/strtok_r.c: Update.
2474         * gnulib/import/sys_stat.in.h: Update.
2475         * gnulib/import/sys_time.in.h: Update.
2476         * gnulib/import/sys_types.in.h: Update.
2477         * gnulib/import/tempname.c: Update.
2478         * gnulib/import/tempname.h: Update.
2479         * gnulib/import/time.in.h: Update.
2480         * gnulib/import/unistd--.h: Update.
2481         * gnulib/import/unistd-safer.h: Update.
2482         * gnulib/import/unistd.in.h: Update.
2483         * gnulib/import/unsetenv.c: Update.
2484         * gnulib/import/verify.h: Update.
2485         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2486         * gnulib/import/wchar.in.h: Update.
2487         * gnulib/import/wctype.in.h: Update.
2488         * gnulib/import/xalloc-oversized.h: Update.
2489         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2490         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2491
2492 2018-08-16  Gary Benson <gbenson@redhat.com>
2493
2494         PR gdb/13000:
2495         * gdb/main.c (captured_main_1): Exit with nonzero status
2496         in batch mode if the last command to be executed failed.
2497         * NEWS: Mention the above.
2498
2499 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2500
2501         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2502         end of warning message.
2503
2504 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2505
2506         PR gdb/22943:
2507         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2508         (aarch64_extract_return_value): Use
2509         aapcs_is_vfp_call_or_return_candidate.
2510         (aarch64_return_in_memory): Likewise.
2511         (aarch64_store_return_value): Likewise.
2512
2513 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2514
2515         * aarch64-tdep.c
2516         (aapcs_is_vfp_call_or_return_candidate): Make static
2517         (pass_in_v_or_stack): Remove function.
2518         (pass_in_v_vfp_candidate): New function.
2519         (aarch64_push_dummy_call): Check for float register candidates.
2520
2521 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2522
2523         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2524         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2525         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2526
2527 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2528
2529         PR build/23399
2530         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2531         (struct ipa_sym_addresses): Rename to...
2532         (struct ipa_sym_addresses_common): ... this.
2533         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2534
2535 2018-08-28  Tom Tromey  <tom@tromey.com>
2536
2537         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2538         (token_fifo): Now a std::vector.
2539         (yylex, c_parse): Update.
2540         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2541         (token_fifo): Now a std::vector.
2542         (yylex, d_parse): Update.
2543         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2544         (token_fifo): Now a std::vector.
2545         (yylex, go_parse): Update.
2546
2547 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2548
2549         * parser-defs.h (struct type_stack) <elements>: Change type to
2550         std::vector<union type_stack_elt>.
2551         <depth, size>: Remove.
2552         * parse.c (parse_exp_in_context_1): Adjust.
2553         (type_stack_reserve): Remove.
2554         (check_type_stack_depth): Remove.
2555         (insert_into_type_stack): Adjust to std::vector.
2556         (insert_type): Likewise.
2557         (push_type): Likewise.
2558         (push_type_int): Likewise.
2559         (insert_type_address_space): Likewise.
2560         (pop_type): Likewise.
2561         (pop_type_int): Likewise.
2562         (pop_typelist): Likewise.
2563         (pop_type_stack): Likewise.
2564         (append_type_stack): Likewise.
2565         (push_type_stack): Likewise.
2566         (get_type_stack): Likewise.
2567         (type_stack_cleanup): Likewise.
2568         (push_typelist): Likewise.
2569         (follow_types): Likewise.
2570         (_initialize_parse): Likewise.
2571
2572 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2573
2574         * NEWS: Mention csky target.
2575
2576 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2577             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2578             Don Breazeal  <donb@codesourcery.com>
2579
2580         * csky-linux-tdep.c: New file.
2581         * csky-tdep.c: Likewise.
2582         * csky-tdep.h: Likewise.
2583         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2584         csky-tdep.o.
2585         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2586         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2587         * configure.tgt: Add csky support.
2588
2589 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2590
2591         * python/py-framefilter.c (py_print_frame): Print frame architecture
2592         when printing on an MI output.
2593
2594 2018-08-27  Tom Tromey  <tom@tromey.com>
2595
2596         PR build/23087:
2597         * configure: Rebuild.
2598         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2599
2600 2018-08-27  Tom Tromey  <tom@tromey.com>
2601
2602         * aarch64-linux-tdep.c
2603         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2604         casts to int.
2605
2606 2018-08-27  Tom Tromey  <tom@tromey.com>
2607
2608         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2609         unsigned.
2610         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2611         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2612         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2613         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2614         unsigned.
2615
2616 2018-08-27  Tom Tromey  <tom@tromey.com>
2617
2618         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2619         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2620
2621 2018-08-27  Tom Tromey  <tom@tromey.com>
2622
2623         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2624         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2625         ULONGEST_MAX.
2626         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2627         ULONGEST_MAX.
2628         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2629         ULONGEST_MAX.
2630         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2631         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2632         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2633         ULONGEST_MAX.
2634         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2635         (ppc64_linux_sigaction_tramp_frame)
2636         (ppc32_linux_sighandler_tramp_frame)
2637         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2638         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2639         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2640         * mn10300-linux-tdep.c (am33_linux_sigframe)
2641         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2642         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2643         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2644         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2645         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2646         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2647         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2648         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2649         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2650         * microblaze-linux-tdep.c
2651         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2652         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2653         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2654         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2655         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2656         * common/common-types.h (ULONGEST_MAX): New define.
2657         (CORE_ADDR_MAX): Fix formatting.
2658         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2659         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2660         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2661         (arm_linux_rt_sigreturn_tramp_frame)
2662         (arm_eabi_linux_sigreturn_tramp_frame)
2663         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2664         (thumb2_eabi_linux_sigreturn_tramp_frame)
2665         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2666         (arm_linux_restart_syscall_tramp_frame)
2667         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2668         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2669         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2670         ULONGEST_MAX.
2671         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2672
2673 2018-08-27  Tom Tromey  <tom@tromey.com>
2674
2675         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2676         CORE_ADDR_MAX.
2677         * mips-tdep.c (mips_deal_with_atomic_sequence)
2678         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2679         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2680         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2681         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2682         CORE_ADDR_MAX.
2683         * aarch64-tdep.c (aarch64_software_single_step): Use
2684         CORE_ADDR_MAX.
2685
2686 2018-08-27  Tom Tromey  <tom@tromey.com>
2687
2688         * linespec.c (complete_linespec_component): Add cast to "char".
2689         * completer.c (completion_tracker::build_completion_result): Add
2690         cast to "char".
2691
2692 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2693
2694         * solist.h (struct solist, struct target_so_ops): Fix
2695         indentation.
2696
2697 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2698
2699         * ada-tasks.c (ada_task_info_s): Remove typedef.
2700         (DEF_VEC_O(ada_task_info_s)): Remove.
2701         (struct ada_tasks_inferior_data): Initialize fields.
2702         <task_list>: Make an std::vector.
2703         (get_ada_tasks_inferior_data): Allocate with new.
2704         (ada_get_task_number): Adjust.
2705         (get_task_number_from_id): Likewise.
2706         (valid_task_id): Likewise.
2707         (ada_get_task_info_from_ptid): Likewise.
2708         (iterate_over_live_ada_tasks): Likewise.
2709         (add_ada_task): Likewise.
2710         (read_known_tasks): Likewise.
2711         (ada_build_task_list): Likewise.
2712         (print_ada_task_info): Likewise.
2713         (info_task): Likewise.
2714         (task_command_1): Likewise.
2715
2716 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2717
2718         * ada-lang.c (add_angle_brackets): Return std::string.
2719
2720 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2721
2722         * python/py-threadevent.c (py_get_event_thread): Initialize
2723         pythread.
2724
2725 2018-08-24  Pedro Alves  <palves@redhat.com>
2726
2727         * python/py-bpevent.c (create_breakpoint_event_object): Use
2728         copy-initialization.
2729         * python/py-continueevent.c (emit_continue_event): Use
2730         copy-initialization.
2731         * python/py-exitedevent.c (create_exited_event_object): Return a
2732         gdbpy_ref<>.
2733         (emit_exited_event): Use copy-initialization.
2734         * python/py-inferior.c (python_new_inferior)
2735         (python_inferior_deleted, add_thread_object): Use
2736         copy-initialization.
2737         * python/py-infevents.c (create_inferior_call_event_object)
2738         (create_register_changed_event_object)
2739         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2740         (emit_inferior_call_event, emit_memory_changed_event)
2741         (emit_register_changed_event): Use copy-initialization.
2742         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2743         Return a gdbpy_ref<>.
2744         (emit_new_objfile_event): Use copy-initialization.
2745         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2746         (emit_clear_objfiles_event): Use copy-initialization.
2747         * python/py-signalevent.c (create_signal_event_object): Use
2748         copy-initialization.
2749         * python/py-threadevent.c (create_thread_event_object): Use
2750         copy-initialization.
2751
2752 2018-08-24  Pedro Alves  <palves@redhat.com>
2753             Simon Marchi  <simon.marchi@ericsson.com>
2754
2755         PR gdb/23379
2756         * python/py-continueevent.c: Include "gdbthread.h".
2757         (create_continue_event_object): Add intro comment.  Add 'ptid'
2758         parameter.  Use it to find thread to pass to
2759         create_thread_event_object.
2760         (emit_continue_event): Pass PTID down to
2761         create_continue_event_object.
2762         * python/py-event.h (py_get_event_thread): Declare.
2763         (create_thread_event_object): Remove default from 'thread'
2764         parameter.
2765         * python/py-stopevent.c (create_stop_event_object): Use
2766         py_get_event_thread.
2767         * python/py-threadevent.c (get_event_thread): Rename to ...
2768         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2769         and use it to find the thread.
2770         (create_thread_event_object): Assert that THREAD isn't null.
2771         Don't find the event thread here.
2772
2773 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2774
2775         * block.h (blockrange, blockranges): New struct declarations.
2776         (struct block): Add new field named `ranges'.
2777         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2778         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2779         macros for accessing ranges in struct block.
2780         (make_blockranges): New declaration.
2781         block.c (make_blockranges): New function.
2782         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2783         for block.
2784         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2785         * blockframe.c (cache_pc_function_block): New static global.
2786         (clear_pc_function_cache): Clear cache_pc_function_block.
2787         (find_pc_partial_function): Move comment to symtab.h.  Add
2788         support for non-contiguous blocks.
2789         * cli/cli-cmds.c (block.h): Include.
2790         (print_disassembly): Handle printing of non-contiguous blocks.
2791         (disassemble_current_function): Likewise.
2792         (disassemble_command): Likewise.
2793
2794         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2795         BLOCK_START.
2796         * blockframe.c (get_pc_function_start): Likewise.
2797         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2798         (gcc_symbol_address): Likewise.
2799         * compile/compile-object-run.c (compile_object_run): Likewise.
2800         * compile/compile.c (get_expr_block_and_pc): Likewise.
2801         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2802         (func_addr_to_tail_call_list): Likewise.
2803         * findvar.c (default_read_var_value): Likewise.
2804         * inline-frame.c (inline_frame_this_id): Likewise.
2805         (skip-inline_frames): Likewise.
2806         * infcmd.c (until_next_command): Likewise.
2807         * linespec.c (convert_linespec_to_sals): Likewise.
2808         * parse.c (parse_exp_in_context_1): Likewise.
2809         * printcmd.c (build_address_symbolic): likewise.
2810         (info_address_command): Likewise.
2811         symtab.c (find_function_start_sal): Likewise.
2812         (skip_prologue_sal): Likewise.
2813         (find_function_alias_target): Likewise.
2814         (find_gnu_ifunc): Likewise.
2815         * stack.c (find_frame_funname): Likewise.
2816         * symtab.c (fixup_symbol_section): Likewise.
2817         (find_function_start_sal): Likewise.
2818         (skip_prologue_sal): Likewsie.
2819         (find_function_alias_target): Likewise.
2820         (find_gnu_ifunc): Likewise.
2821         * tracepoint.c (info_scope_command): Likewise.
2822         * value.c (value_fn_field): Likewise.
2823
2824         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2825         in place of find_pc_partial_function.
2826         * blockframe.c (find_function_entry_range_from_pc): New function.
2827         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2828         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2829         for each range in a block.
2830
2831
2832 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2833
2834         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2835         incrementation.
2836
2837 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2838
2839         * solib-svr4.c (read_program_headers_from_bfd): Return
2840         gdb::optional<gdb::byte_vector>.
2841         (svr4_exec_displacement): Adjust.
2842
2843 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2844
2845         * solib-svr4.c (read_program_header): Return
2846         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2847         (find_program_interpreter): Return
2848         gdb::optional<gdb::byte_vector>.
2849         (scan_dyntag_auxv): Adjust.
2850         (enable_break): Adjust.
2851         (svr4_exec_displacement): Adjust.
2852
2853 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2854
2855         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2856         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2857
2858 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2859
2860         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2861         string_vprintf.
2862         * guile/scm-utils.c (gdbscm_printf): Likewise.
2863         * serial.c (serial_printf): Likewise.
2864         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2865
2866 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2867
2868         * stack.c (print_frame): Print frame architecture when printing on
2869         an MI output.
2870         * NEWS: Mention new "arch" attribute in frame output.
2871
2872 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2873
2874         * arch/aarch64.h (aarch64_regnum): Update comment.
2875
2876 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2877
2878         * NEWS: Add SVE to 8.2 section.
2879
2880 2018-08-21  Pedro Alves  <palves@redhat.com>
2881
2882         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2883         out from gdbscm_parse_function_args.
2884         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2885         gdbscm_parse_function_args_1.
2886
2887 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2888
2889         PR gdb/17816
2890         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2891         operator.
2892
2893 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2894
2895         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2896
2897 2018-08-19  Michael Spang  <spang@google.com>
2898
2899         PR gdb/11786
2900         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2901         for PT_TLS segments.
2902
2903 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2904
2905         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2906         dwarf_variable_value.
2907         * dwarf2-frame.c (class dwarf_expr_executor):
2908         Add override for dwarf_variable_value.
2909         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2910         (class symbol_needs_eval_context): Likewise.
2911         (indirect_synthetic_pointer): Add forward declaration.
2912         (sect_variable_value): New function.
2913         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2914         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2915         for DW_OP_GNU_variable_value.
2916
2917 2018-08-16  Tom Tromey  <tom@tromey.com>
2918
2919         * top.c (read_command_file): Update.
2920         (command_line_input): Remove "repeat" argument.
2921         * ada-lang.c (get_selections): Update.
2922         * linespec.c (decode_line_2): Update.
2923         * defs.h (command_line_input): Remove argument.
2924         * cli/cli-script.c (read_next_line): Update.
2925         * python/py-gdb-readline.c: Update.
2926
2927 2018-08-17  Tom Tromey  <tom@tromey.com>
2928
2929         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2930         command_line_input.
2931
2932 2018-08-15  Tom Tromey  <tom@tromey.com>
2933
2934         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2935
2936 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2937
2938         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2939         If used, use find_pc_partial_function to find address range
2940         to disassemble.
2941         * mi/mi-main.c (mi_cmd_list_features): Report
2942         "data-disassemble-a-option" feature.
2943         * NEWS: Mention new -data-disassemble option -a.
2944
2945 2018-08-13  Tom Tromey  <tom@tromey.com>
2946
2947         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2948
2949 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2950
2951         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2952         (aarch64_linux_collect_sve_regset): Likewise.
2953         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2954         * regcache.h (regcache_map_entry_size): New function.
2955
2956 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2957
2958         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2959         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2960         (SVE_HEADER_VL_LENGTH): Likewise.
2961         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2962         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2963         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2964         (SVE_HEADER_SIZE_OFFSET): Likewise.
2965         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2966         (SVE_HEADER_VL_OFFSET): Likewise.
2967         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2968         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2969         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2970         (SVE_HEADER_SIZE): Likewise.
2971         (aarch64_linux_core_read_vq): Add function.
2972         (aarch64_linux_core_read_description): Check for SVE section.
2973
2974 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2975
2976         * aarch64-fbsd-tdep.c
2977         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2978         collect_size.
2979         * aarch64-linux-tdep.c
2980         (aarch64_linux_iterate_over_regset_sections): Likewise.
2981         * alpha-linux-tdep.c
2982         (alpha_linux_iterate_over_regset_sections):
2983         * alpha-nbsd-tdep.c
2984         (alphanbsd_iterate_over_regset_sections): Likewise.
2985         * amd64-fbsd-tdep.c
2986         (amd64fbsd_iterate_over_regset_sections): Likewise.
2987         * amd64-linux-tdep.c
2988         (amd64_linux_iterate_over_regset_sections): Likewise.
2989         * arm-bsd-tdep.c
2990         (armbsd_iterate_over_regset_sections): Likewise.
2991         * arm-fbsd-tdep.c
2992         (arm_fbsd_iterate_over_regset_sections): Likewise.
2993         * arm-linux-tdep.c
2994         (arm_linux_iterate_over_regset_sections): Likewise.
2995         * corelow.c (get_core_registers_cb): Likewise.
2996         (core_target::fetch_registers): Likewise.
2997         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2998         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2999         * gdbarch.h (void): Regenerate.
3000         * gdbarch.sh: Add supply_size and collect_size.
3001         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3002         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3003         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3004         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3005         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3006         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3007         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3008         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3009         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3010         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3011         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3012         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3013         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3014         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3015         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3016         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3017         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3018         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3019         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3020         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3021         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3022         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3023         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3024         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3025         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3026         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3027         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3028         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3029         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3030         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3031
3032 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3033
3034         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3035         with string_printf.
3036
3037 2018-08-10  Keith Seitz  <keiths@redhat.com>
3038
3039         * compile/compile-c-support.c (add_code_header, add_code_footer):
3040         Move into policy class.
3041         (c_push_user_expression, pop_user_expression_nop)
3042         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3043         (compile_program): New host class.
3044         (c_compile_program): New typedef.
3045         (c_compute_porgram): Use c_compile_program.
3046
3047 2018-08-10  Keith Seitz  <keiths@redhat.com>
3048
3049         * compile/compile-internal.h (compile_instance::~compile_instance):
3050         Remove calls to htab_delete.
3051         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3052         * compile.c (compile_instance::compile_instance): Initialize
3053         htab unique pointers.
3054         (compile_instance::get_cached_type, compile_instance::insert_type)
3055         (compile_instance::error_symbol_once): Update for unique_ptr.
3056
3057 2018-08-10  Keith Seitz  <keiths@redhat.com>
3058
3059         * compile/compile-c-symbols.c (struct symbol_error)
3060         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3061         (compile_instance::insert_symbol_error)
3062         (compile_instance::error_symbol_once): Move to ...
3063         * compile/compile.c: ... here.
3064
3065 2018-08-10  Keith Seitz  <keiths@redhat.com>
3066
3067         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3068         instead of `new_compile_instance'.
3069         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3070         Update description.
3071         If the symbol error map is not initialized, create it.
3072         (generate_c_for_for_one_symbol): Do not check/initialize
3073         the symbol error map.
3074         * compile/compile-c-types.c (compile_c_instance): Make a class.
3075         Update all callers.
3076         (compile_instance::compile_instance): Initialize the type cache.
3077         (get_cached_type): New function.
3078         (insert_type): Update description.
3079         (compile_c_instance::m_default_cflags): Define.
3080         (convert_type): Update description.  Use get_cached_type.
3081         (delete_instance): Moved to destructor.
3082         (new_compile_instance): Moved to constructor.
3083         * compile/compile-c.h (compile_c_instance): Make class inheriting
3084         from compile_instance.
3085         <base>: Remove field.
3086         <type_map, symbol_err_map>: Move to base class.
3087         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3088         * compile/compile-internal.h (compile_instance): Make class.
3089         <type_map_t, symbol_err_map_t>: Define.
3090         <fe>: Rename to `m_gcc_fe'.
3091         <scope, block, gcc_target_options>: Add `m_' prefix.
3092         <m_type_map, m_symbol_err_map>: New fields, moved from
3093         compile_c_instance.
3094         <destroy>: Remove.
3095         (convert_type, new_compile_instance): Remove.
3096         * compile/compile.c (cleanup_compile_instance): Remove.
3097         (compile_to_object): Use unique_ptr to eliminate cleanups.
3098         (compile_instance::set_print_callback, compile_instance::version)
3099         (compile_instance::set_verbose)
3100         (compile_instance::set_driver_filename)
3101         (compile_instance::set_triplet_regexp)
3102         (compile_instance::set_arguments)
3103         (compile_instance::set_source_file)
3104         (compile_instance::compile): Define.
3105
3106 2018-08-10  Keith Seitz  <keiths@redhat.com>
3107
3108         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3109         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3110         gcc-c-fe.def to define C plugin.
3111         (delete_instance): Delete `c_plugin'.
3112         (new_compile_instance): Initialize `c_plugin'.
3113         * compile/compile-c.h: Include gcc_c_plugin.h.
3114         (struct compile_c_instance) <c_plugin>: New member.
3115         * gcc-c-plugin.h: New file.
3116         Update all callers with API change.
3117
3118 2018-08-10  Keith Seitz  <keiths@redhat.com>
3119
3120         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3121         (HFILES_NO_SRCDIR): ... to here.
3122         Add compile-internal.h and compile-c.h.
3123         * compile/compile-c-support.c: Include compile-c.h.
3124         * compile/compile-c-symbols.c: Include compile-c.h.
3125         (generate_c_for_variable_locations): Update comment.
3126         * compile/compile-c-types.c: Include compile-c.h.
3127         * compile/compile-c.h: New file -- moved C language declarations
3128         from other files here.
3129         * compile/compile-internal.h: Do not include hashtab.h or
3130         common/enum-flags.h.
3131         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3132         (gcc_convert_symbol, gcc_symbol_address)
3133         (generate_c_for_variable_locations, c_get_mode_for_size)
3134         (c_get_range_decl_name): Definitions moved to compile-c.h.
3135         * compile/compile-loc2c.c: Include compile-c.h.
3136
3137 2018-08-10  Keith Seitz  <keiths@redhat.com>
3138
3139         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3140         (c_symbol_substitution_name): ... this.
3141         Update all callers.
3142
3143 2018-08-10  Keith Seitz  <keiths@redhat.com>
3144
3145         * compile/compile-c-support.c (c_compute_program): Use
3146         unique_xmalloc_ptr to eliminate cleanup.
3147         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3148         Return a unique_xmalloc_ptr and eliminate cleanup.
3149         * compile/compile-internal.h (generate_c_for_variable_locations):
3150         Return unique_xmalloc_ptr and update description.
3151
3152 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3153
3154         * corelow.c (core_target::get_core_register_section): Rename
3155         min_size to section_min_size.
3156
3157 2018-08-09  Jim Wilson  <jimw@sifive.com>
3158
3159         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3160         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3161         * NEWS: Mention new GNU/Linux RISC-V target.
3162         * configure.host: Add riscv*-*-linux*.
3163         * configure.nat: Add riscv*.
3164         * configure.tgt: Add riscv*-*-linux*.
3165         * riscv-linux-nat.c: New file.
3166         * riscv-linux-tdep.c: New file.
3167
3168 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3169
3170         * infrun.c (resume): Make static, add forward declaration.
3171         (proceed): Update header comment.
3172         * infrun.h (resume): Delete declaration.
3173
3174 2018-08-09  Tom Tromey  <tom@tromey.com>
3175
3176         * riscv-tdep.h: Minor formatting fixes.
3177
3178 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3179
3180         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3181         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3182         (test_mkdir_recursive): Likewise.
3183         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3184
3185 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3186
3187         * valarith.c (value_subscripted_rvalue): If an array is not in
3188         memory, and we don't know the upper bound, then we can't know that
3189         the requested element exists or not.
3190
3191 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3192
3193         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3194         (target_options_to_string): Add comment.
3195
3196 2018-08-08  Tom Tromey  <tom@tromey.com>
3197
3198         * unittests/scoped_mmap-selftests.c: Check result of "write".
3199
3200 2018-08-08  Jim Wilson  <jimw@sifive.com>
3201
3202         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3203         (decode_register_index_short): New.
3204         (decode_j_type_insn, decode_cj_type_insn): New.
3205         (decode_b_type_insn, decode_cb_type_insn): New.
3206         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3207         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3208         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3209         is_c_sw_insn instead of is_sw_insn.
3210         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3211         (riscv_software_single_step): New.
3212         * riscv-tdep.h (riscv_software_single_step): Declare.
3213
3214         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3215         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3216
3217 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3218
3219         PR gdb/18050:
3220         * target.c (dispose_inferior): Don't dispose of inferiors that are
3221         already killed.
3222
3223 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3224
3225         * remote.c (remote_target::download_tracepoint): Change char* to
3226         const char*.
3227
3228 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3229
3230         * target.h (target_options_to_string): Return an std::string.
3231         * target.c (str_comma_list_concat_elem): Return void, use
3232         std::string.
3233         (do_option): Likewise.
3234         (target_options_to_string): Return an std::string.
3235         * linux-nat.c (linux_nat_target::wait): Adjust.
3236         * target-debug.h (target_debug_print_options): Adjust.
3237
3238 2018-08-07  Tom Tromey  <tom@tromey.com>
3239
3240         * Makefile.in (CPPFLAGS): New variable.
3241         (INTERNAL_CPPFLAGS): Use it.
3242
3243 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3244
3245         * NEWS: Mention the index cache.
3246
3247 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3248
3249         * common/pathstuff.h (get_standard_cache_dir): New.
3250         * common/pathstuff.c (get_standard_cache_dir): New.
3251         * build-id.h (build_id_to_string): New.
3252         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3253         DEBUG_STR_SUFFIX): Move to here.
3254         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3255         DEBUG_STR_SUFFIX): Move from there.
3256         (write_psymtabs_to_index): Make non-static, add basename
3257         parameter.  Write to temporary files, rename when done.
3258         (save_gdb_index_command): Adjust call to
3259         write_psymtabs_to_index.
3260         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3261         field.
3262         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3263         (get_gdb_index_contents_from_cache): New.
3264         (get_gdb_index_contents_from_cache_dwz): New.
3265         (dwarf2_initialize_objfile): Read index from cache.
3266         (dwarf2_build_psymtabs): Save to index.
3267         * dwarf-index-cache.h: New file.
3268         * dwarf-index-cache.c: New file.
3269         * dwarf-index-write.h: New file.
3270
3271 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3272
3273         * gnulib/aclocal.m4: Re-generate.
3274         * gnulib/config.in: Re-generate.
3275         * gnulib/configure: Re-generate.
3276         * gnulib/import/Makefile.am: Re-generate.
3277         * gnulib/import/Makefile.in: Re-generate.
3278         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3279         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3280         * gnulib/import/m4/mkdir.m4: New file.
3281         * gnulib/import/mkdir.c: New file.
3282         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3283         module.
3284
3285 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3286
3287         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3288         * common/scoped_mmap.c: New file.
3289         * common/scoped_mmap.h (destroy): New method.
3290         (~scoped_mmap, reset): Use destroy.
3291         (scoped_mmap): New move constructor.
3292         (mmap_file): New declaration.
3293         * unittests/scoped_mmap-selftests.c (test_normal,
3294         test_invalid_filename, run_tests): New functions.
3295         (_initialize_scoped_mmap_selftests): Register selftest.
3296
3297 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3298
3299         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3300         (read_gdb_index_from_buffer): ... this.  Remove section
3301         parameter, add buffer parameter.
3302         (get_gdb_index_contents_ftype,
3303         get_gdb_index_contents_dwz_ftype): New typedefs.
3304         (dwarf2_read_gdb_index): Add callback parameters to get the
3305         index contents.
3306         (get_gdb_index_contents_from_section): New.
3307         (dwarf2_initialize_objfile): Update call to
3308         dwarf2_read_gdb_index.
3309
3310 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3311
3312         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3313         (gdb_open_cloexec): Likewise.
3314         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3315         (commandline_from_pid): Likewise.
3316         (linux_xfer_osdata_threads): Likewise.
3317         (linux_xfer_osdata_fds): Likewise.
3318         * ada-lang.c (is_package_name): Likewise.
3319         * auxv.c (procfs_xfer_auxv): Likewise.
3320         * breakpoint.c (print_one_breakpoint_location): Use
3321         uiout::field_fmt.
3322         (print_one_catch_solib): Use string_printf.
3323         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3324         (add_pe_forwarded_sym): Likewise.
3325         * dwarf2read.c (create_type_unit_group): Likewise.
3326         (build_error_marker_type): Likewise.
3327         * infcall.c (get_function_name): Likewise.
3328         * valprint.c (print_converted_chars_to_obstack): Likewise.
3329         * xtensa-tdep.c (xtensa_register_type): Likewise.
3330
3331 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3332
3333         * remote.c (remote_target::download_tracepoint): Fix format
3334         string errors.
3335
3336 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3337
3338         * tracefile.c: Include common/byte-vector.h.
3339         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3340         with trace_regblock_size if needed.  Update uses of buf.
3341
3342 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3343
3344         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3345         std::vector<unsigned char>.
3346         * tracepoint.c (collection_list::collection_list): Remove
3347         m_regs_mask initializer from initializer list.  Resize
3348         m_regs_mask using the largest remote register number.
3349         (collection_list::add_remote_register): Remove size check on
3350         m_regs_mask.  Use at to access element.
3351         (collection_list::stringify): Change type of temp_buf to
3352         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3353         stringify the register mask.  Use pack_hex_byte for the register
3354         mask.
3355
3356 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3357
3358         * tracepoint.h (class collection_list) <add_register>: Remove.
3359         <add_remote_register, add_ax_registers, add_local_register>:
3360         Declare.
3361         <add_memrange>: Add scope parameter.
3362         * tracepoint.c (encode_actions_1): Likewise.
3363         (collection_list::add_register): Rename to ...
3364         (collection_list::add_remote_register): ... this.  Update
3365         comment.
3366         (collection_list::add_ax_registers, add_local_register): New
3367         methods.
3368         (collection_list::add_memrange): Add scope parameter.  Call
3369         add_local_register instead of add_register.
3370         (finalize_tracepoint_aexpr): New function.
3371         (collection_list::collect_symbol): Update calls to add_memrange.
3372         Call add_local_register instead of add_register.  Call
3373         add_ax_registers.  Call finalize_tracepoint_aexpr.
3374         (encode_actions_1): Get remote regnos for $reg action.  Call
3375         add_remote_register, add_ax_registers, and add_local_register.
3376         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3377         (validate_actionline): Call finalize_tracepoint_aexpr.
3378
3379 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3380
3381         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3382         Replace array buf with gdb::char_vector buf, of size
3383         get_remote_packet_size ().  Replace references to buf and
3384         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3385         and xsnprintf with snprintf.  Raise errors if the buffer is too
3386         small.
3387
3388 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3389
3390         * remote.c (remote_target::download_tracepoint): Fix the has_more
3391         predicate in the QTDP action list iteration.
3392
3393 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3394
3395         * remote.c (remote_target::download_tracepoint): Fix indentation
3396         in for block.
3397
3398 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3399
3400         * proc-api.c (_initialize_proc_api): Remove c, unused.
3401         * procfs.c (procfs_init_inferior): Remove signals, unused.
3402         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3403         unused.
3404
3405 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3406             Andrew Burgess  <andrew.burgess@embecosm.com>
3407
3408         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3409         'W_STOPCODE (0)' as this could be ambiguous.
3410
3411 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3412
3413         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3414         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3415         "ai_socktype").
3416
3417 2018-08-02  Tom Tromey  <tom@tromey.com>
3418
3419         PR symtab/16842.
3420         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3421         symbols.
3422         (process_structure_scope): Likewise.
3423
3424 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3425
3426         PR gdb/22629:
3427         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3428         kill inferior.
3429
3430 2018-08-02  Tom Tromey  <tom@tromey.com>
3431
3432         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3433         (darwin_suspend_inferior, darwin_resume_inferior)
3434         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3435         (darwin_check_new_threads): Check result of get_darwin_inferior.
3436
3437 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3438
3439         GDB 8.1.1 released.
3440
3441 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3442
3443         * varobj.c (varobj_get_path_expr_parent): Report an error if
3444         parent is a dynamic varobj.
3445
3446 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3447
3448         * gnulib/aclocal.m4: Re-generate.
3449         * gnulib/config.in: Re-generate.
3450         * gnulib/configure: Re-generate.
3451         * gnulib/import/Makefile.in: Re-generate.
3452         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3453         * gnulib/import/m4/onceonly.m4: Re-generate.
3454
3455 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3456
3457         * target-descriptions.c (struct xml_test_tdesc): New.
3458         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3459         (record_xml_tdesc): Update.
3460         (maintenance_check_xml_descriptions): Update.
3461         * target-descriptions.h (record_xml_tdesc): Update comment.
3462
3463 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3464
3465         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3466         checking array bounds are defined.
3467
3468 2018-07-30  Tom Tromey  <tom@tromey.com>
3469
3470         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3471         irreflexivity violation.
3472
3473 2018-07-30  Tom Tromey  <tom@tromey.com>
3474
3475         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3476         * value.c (unpack_long): Remove lint code.
3477         * valops.c (value_ind): Remove lint code.
3478         * valarith.c (value_x_binop, value_x_unop, value_equal)
3479         (value_pos): Remove lint code.
3480
3481 2018-07-28  Tom de Vries  <tdevries@suse.de>
3482
3483         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3484         with undefined upper bound as <optimized out>.
3485
3486 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3487
3488         * gcore.in: Rename variable "name" to "prefix".  Expand
3489         "usage" text.
3490
3491 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3492
3493         * windows-nat.c (windows_nat_target::create_inferior): Update to
3494         call close() in global namespace.
3495
3496 2018-07-26  Tom Tromey  <tom@tromey.com>
3497
3498         * dwarf-index-write.c (add_address_entry): Don't add objfile
3499         offsets.
3500         * dbxread.c (find_stab_function): Rename from
3501         find_stab_function_addr.  Return a bound_minimal_symbol.
3502         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3503         Don't add objfile offsets.
3504         (end_psymtab): Use raw_text_low, raw_text_high,
3505         MSYMBOL_VALUE_RAW_ADDRESS.
3506         (read_ofile_symtab): Update.
3507         (process_one_symbol): Update.
3508         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3509         offsets.
3510         (dw2_relocate): Remove.
3511         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3512         searching addrmap.
3513         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3514         Update.
3515         (process_psymtab_comp_unit_reader, add_partial_symbol)
3516         (add_partial_subprogram, dwarf2_ranges_read): Update.
3517         (load_partial_dies): Update.
3518         (add_address_entry): Don't add objfile offsets.
3519         (dwarf2_build_include_psymtabs): Update.
3520         (create_addrmap_from_aranges): Don't add objfile offsets.
3521         (dw2_find_pc_sect_compunit_symtab): Update.
3522         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3523         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3524         Update.
3525         (parse_partial_symbols): Don't add objfile offsets.  Use
3526         raw_text_low, raw_text_high.  Update.
3527         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3528         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3529         or call 'relocate' quick function.  Clear psymbol_map.
3530         * psympriv.h (struct partial_symbol) <address>: Add section
3531         offset.
3532         <set_unrelocated_address>: Rename from set_address.
3533         <raw_text_low, raw_text_high>: New methods.
3534         <text_low, text_high>: Add objfile parameter.
3535         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3536         set_unrelocated_address.
3537         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3538         (find_pc_psymbol): Update.
3539         (fixup_psymbol_section, relocate_psymtabs): Remove.
3540         (dump_psymtab, psym_functions): Update.
3541         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3542         parameter.
3543         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3544         (start_psymtab_common): Update.
3545         * symfile-debug.c (debug_qf_relocate): Remove.
3546         (debug_sym_quick_functions): Update.
3547         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3548         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3549         Update.
3550
3551 2018-07-26  Tom Tromey  <tromey@redhat.com>
3552
3553         * dbxread.c (end_psymtab): Use text_high_valid and
3554         text_low_valid.
3555         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3556         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3557         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3558         Update comment.
3559         <text_low_valid, text_high_valid>: New fields.
3560         <set_text_low, set_text_high>: Update.
3561         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3562
3563 2018-07-26  Tom Tromey  <tom@tromey.com>
3564
3565         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3566         Update.
3567         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3568         textlow and texthigh fields.
3569         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3570         Update.
3571         * mdebugread.c (parse_lines, parse_partial_symbols)
3572         (psymtab_to_symtab_1): Update.
3573         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3574         Rename fields.  Update comment.  Now private.
3575         <text_low, text_high, set_text_low, set_text_high>: New methods.
3576         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3577         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3578         (start_psymtab_common, maintenance_info_psymtabs)
3579         (maintenance_check_psymtabs): Update.
3580         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3581         texthigh fields.
3582         (scan_xcoff_symtab): Update.
3583
3584 2018-07-26  Tom Tromey  <tromey@redhat.com>
3585
3586         * psympriv.h (struct partial_symbol) <unrelocated_address,
3587         address, set_address>: New methods.
3588         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3589         (fixup_psymbol_section, relocate_psymtabs): Update.
3590         (print_partial_symbols): Add 'objfile' parameter.  Update.
3591         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3592         Update.
3593
3594 2018-07-26  Tom Tromey  <tom@tromey.com>
3595
3596         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3597         (debug_names::write_psymbols): Update.
3598         * psympriv.h (struct partial_symbol): Derive from
3599         general_symbol_info.
3600         <obj_section>: New method.
3601         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3602         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3603         (find_pc_sect_psymbol, fixup_psymbol_section)
3604         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3605         (print_partial_symbols, recursively_search_psymtabs)
3606         (compare_psymbols, psymbol_hash, psymbol_compare)
3607         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3608         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3609
3610 2018-07-26  Tom Tromey  <tromey@redhat.com>
3611
3612         * dbxread.c (end_psymtab): Remove dead code.
3613
3614 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3615
3616         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3617         DWARF unwinders are disabled.
3618         * dwarf2-frame.c: Add dwarf2read.h include.
3619         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3620         disabled.
3621         (dwarf2_frame_unwinders_enabled_p): Define.
3622         (show_dwarf_unwinders_enabled_p): New function.
3623         (_initialize_dwarf2_frame): Register switch to control DWARF
3624         unwinder use.
3625         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3626         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3627         (show_dwarf_cmdlist): Remove static keyword.
3628         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3629         (show_dwarf_cmdlist): Declare.
3630         * NEWS: Document new feature.
3631
3632 2018-07-26  Tom de Vries  <tdevries@suse.de>
3633
3634         PR breakpoints/23366
3635         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3636
3637 2018-07-26  Tom de Vries  <tdevries@suse.de>
3638
3639         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3640         DW_AT_count can't be translated to a dynamic prop.
3641
3642 2018-07-25  Tom de Vries  <tdevries@suse.de>
3643
3644         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3645         try/catch.
3646
3647 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3648
3649         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3650
3651 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3652
3653         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3654
3655 2018-07-24  Keith Seitz  <keiths@redhat.comt
3656
3657         PR symtab/23010
3658         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3659         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3660         instead of add_symbol_to_list.
3661         (read_file_scope): Call prepare_one_comp_unit before reading
3662         any other DIEs.
3663
3664 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3665
3666         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3667
3668 2018-07-24  Tom Tromey  <tom@tromey.com>
3669
3670         * utils.c (malloc, realloc, free): Don't declare.
3671         * configure, config.in: Rebuild.
3672         * configure.ac: Don't check for declarations of free, malloc, or
3673         realloc.
3674
3675 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3676
3677         * aarch64-linux-nat.c
3678         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3679         variable.
3680         * arm-linux-nat.c (fetch_regs): Likewise.
3681         (store_regs): Likewise.
3682         (fetch_vfp_regs): Likewise.
3683         (store_vfp_regs): Likewise.
3684         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3685         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3686         (arm_linux_nat_target::insert_watchpoint): Likewise.
3687         (arm_linux_nat_target::remove_watchpoint): Likewise.
3688         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3689         Likewise.
3690         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3691         Likewise.
3692         * ppc-linux-nat.c (fetch_register): Likewise.
3693         (fetch_all_gp_regs): Likewise.
3694         (fetch_ppc_registers): Likewise.
3695         (store_all_gp_regs): Likewise.
3696         (store_ppc_registers): Likewise.
3697         (hwdebug_insert_point): Likewise.
3698         (can_use_watchpoint_cond_accel): Likewise.
3699         * remote-sim.c (gdb_os_write_stdout): Likewise.
3700
3701 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3702             Tom Tromey  <tom@tromey.com>
3703
3704         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3705         test for it.
3706         * configure: Rebuild.
3707
3708 2018-07-22  Tom Tromey  <tom@tromey.com>
3709
3710         * regformats/regdat.sh: Define xmltarget_${name} inside
3711         #ifndef IN_PROCESS_AGENT.
3712
3713 2018-07-22  Tom Tromey  <tom@tromey.com>
3714
3715         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3716
3717 2018-07-22  Tom Tromey  <tom@tromey.com>
3718
3719         * symfile.c (reread_symbols): Notify iter, not objfile.
3720
3721 2018-07-22  Tom Tromey  <tom@tromey.com>
3722
3723         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3724         Use arch_ops.
3725         (ravenscar_thread_target::prepare_to_store): Likewise.
3726
3727 2018-07-22  Tom Tromey  <tom@tromey.com>
3728
3729         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3730         unused variable.  Call value_fetch_lazy when needed.
3731         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3732         Remove unused variable.  Call value_fetch_lazy when needed.
3733
3734 2018-07-22  Tom Tromey  <tom@tromey.com>
3735
3736         * m32c-tdep.c (mark_dma): Return void.
3737         (make_regs): Remove unused declarations.
3738
3739 2018-07-22  Tom Tromey  <tom@tromey.com>
3740
3741         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3742         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3743         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3744         bkscm_get_valid_block_smob_arg_unsafe for effect.
3745
3746 2018-07-22  Tom Tromey  <tom@tromey.com>
3747
3748         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3749         value_type.
3750
3751 2018-07-22  Tom Tromey  <tom@tromey.com>
3752
3753         * windows-nat.c (saved_context): Conditionally define.
3754         * remote.c (remote_target::remote_btrace_maybe_reopen):
3755         Conditionally declare "warned".
3756         * inflow.c (sigquit_ours): Conditionally define.
3757         (new_tty): Move "tty" declaration inside #if.
3758         * guile/guile.c (guile_datadir): Conditionally define.
3759         * charset.c (set_be_le_names): Move some declarations inside #if.
3760         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3761         #if.
3762         (parse_xml_btrace_conf): Likewise.
3763
3764 2018-07-22  Tom Tromey  <tom@tromey.com>
3765
3766         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3767
3768 2018-07-22  Tom Tromey  <tom@tromey.com>
3769
3770         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3771         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3772         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3773         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3774         * stack.c (frame_apply_level_command): Remove unused variable.
3775         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3776         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3777         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3778         unused variable.
3779         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3780         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3781         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3782         variable.
3783         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3784         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3785         variable.
3786         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3787         Remove unused variable.
3788         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3789         variable.
3790         * common/tdesc.c (print_xml_feature::visit): Remove unused
3791         variable.
3792         * compile/compile-object-load.c (store_regs): Remove unused
3793         variables.
3794         * complaints.c (clear_complaints): Remove unused variable.
3795         * corelow.c (core_target_open): Remove unused variable.
3796         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3797         variable.
3798         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3799         variable.
3800         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3801         variable.
3802         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3803         variable.
3804         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3805         variable.
3806         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3807         variable.
3808         * ia64-tdep.c (examine_prologue): Remove unused variable.
3809         * infcall.c (run_inferior_call): Remove unused variable.
3810         * inferior.c (exit_inferior): Remove unused variable.
3811         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3812         * linespec.c (decode_line_2): Remove unused variable.
3813         * linux-nat.c (super_close): Remove.
3814         * linux-tdep.c (linux_info_proc): Remove unused variable.
3815         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3816         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3817         Remove unused variable.
3818         * parse.c (find_minsym_type_and_address): Remove unused variable.
3819         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3820         variable.
3821         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3822         variable.
3823         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3824         variables.
3825         * record-btrace.c (record_btrace_target::store_registers): Remove
3826         unused variable.
3827         (cmd_show_record_btrace_cpu): Remove unused variable.
3828         * riscv-tdep.c (riscv_register_reggroup_p)
3829         (riscv_push_dummy_call, riscv_return_value): Remove unused
3830         variable.
3831         * rust-exp.y (literal): Remove unused variable.
3832         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3833         unused variable.
3834         <STRUCTOP_ANONYMOUS>: Likewise.
3835         * s390-linux-tdep.c (s390_linux_init_abi_31)
3836         (s390_linux_init_abi_64): Remove unused variable.
3837         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3838         (file_select_thread, net_windows_open, _initialize_ser_windows):
3839         Remove unused variables.
3840         * symtab.c (find_pc_sect_line): Remove unused variable.
3841         * target-memory.c (compute_garbled_blocks): Remove unused
3842         variable.
3843         (target_write_memory_blocks): Remove unused variable.
3844         * target.c (target_stack::unpush): Remove unused variables.
3845         * tracepoint.c (start_tracing, all_tracepoint_actions)
3846         (merge_uploaded_trace_state_variables)
3847         (print_one_static_tracepoint_marker): Remove unused variable.
3848         * unittests/basic_string_view/element_access/char/1.cc (test01):
3849         Remove unused variable.
3850         * windows-nat.c (windows_continue, windows_add_all_dlls)
3851         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3852         Remove unused variables.
3853
3854 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3855
3856         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3857         attr_profile in HAVE_ELF.
3858         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3859         HAVE_ELF.
3860
3861 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3862
3863         * frame.c (frame_register_unwind): Change parameter name.
3864         (frame_unwind_register): Likewise.
3865         (frame_unwind_register_value): Likewise.
3866         (frame_unwind_register_signed): Likewise.
3867         (frame_unwind_register_unsigned): Likewise.
3868         * frame.h (frame_register_unwind): Likewise.
3869         (frame_unwind_register): Likewise.
3870         (frame_unwind_register_value): Likewise.
3871         (frame_unwind_register_signed): Likewise.
3872         (frame_unwind_register_unsigned): Likewise.
3873         (frame_unwind_arch): Likewise.
3874
3875 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3876
3877         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3878         ISA maintenance.
3879
3880 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3881
3882         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3883         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3884         hand.
3885
3886 2018-07-20  Keith Seitz  <keiths@redhat.com>
3887
3888         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3889         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3890         m_compunit_symtab, m_language>: Add "m_" prefix.
3891         Update all uses.
3892         * buildsym.c: Update all uses.
3893
3894 2018-07-20  Tom Tromey  <tom@tromey.com>
3895
3896         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3897         * buildsym.h (record_line_ftype): Remove typedef.
3898
3899 2018-07-20  Tom Tromey  <tom@tromey.com>
3900
3901         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3902         (end_expandable_symtab): Likewise.
3903         (end_symtab_get_static_block): Likewise.
3904         (end_symtab_from_static_block): Likewise.
3905         * buildsym-legacy.c (augment_type_symtab): Remove.
3906         (end_expandable_symtab): Remove.
3907         (end_symtab_get_static_block): Remove.
3908         (end_symtab_from_static_block): Remove.
3909
3910 2018-07-20  Tom Tromey  <tom@tromey.com>
3911
3912         * dwarf2read.c: Include buildsym.h.
3913         (struct dwarf2_cu) <builder>: New method.
3914         (fixup_go_packaging): Update.
3915         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3916         use scoped_free_pendings.
3917         (using_directives): Add "cu" parameter, remove "language".
3918         (read_import_statement, setup_type_unit_groups, )
3919         (read_func_scope, read_lexical_block_scope)
3920         (dwarf2_record_block_ranges, read_namespace): Update.
3921         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3922         (lnp_state_machine::handle_end_sequence): Update.
3923         (class lnp_state_machine) <m_cu>: New member.
3924         <m_record_line_callback>: Remove.
3925         <m_currently_recording_lines>: New member.
3926         (lnp_state_machine::handle_set_file): Update.
3927         (noop_record_line): Remove.
3928         (dwarf_record_line_p): Add cu parameter.
3929         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3930         (lnp_state_machine::record_line)
3931         (lnp_state_machine::lnp_state_machine)
3932         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3933         (dwarf_decode_lines): Update.
3934         (dwarf2_start_subfile): Add cu parameter.
3935         (dwarf2_start_symtab, new_symbol): Update.
3936         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3937         Remove dwarf2_per_objfile parameter.
3938         (dwarf_decode_macros): Update.
3939
3940 2018-07-20  Tom Tromey  <tom@tromey.com>
3941
3942         * stabsread.c (define_symbol): Update.
3943         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3944         * dwarf2read.c (new_symbol): Update.
3945         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3946         * cp-namespace.c: Include buildsym.h.
3947         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3948         * buildsym-legacy.c (get_buildsym_compunit): New function.
3949
3950 2018-07-20  Tom Tromey  <tom@tromey.com>
3951
3952         * xcoffread.c: Include buildsym-legacy.h.
3953         * windows-nat.c: Include buildsym-legacy.h.
3954         * stabsread.c: Include buildsym-legacy.h.
3955         * mdebugread.c: Include buildsym-legacy.h.
3956         * buildsym-legacy.h: New file.
3957         * buildsym-legacy.c: New file, from buildsym.c.
3958         * go32-nat.c: Include buildsym-legacy.h.
3959         * dwarf2read.c: Include buildsym-legacy.h.
3960         * dbxread.c: Include buildsym-legacy.h.
3961         * cp-namespace.c: Include buildsym-legacy.h.
3962         * coffread.c: Include buildsym-legacy.h.
3963         * buildsym.h: Move some contents to buildsym-legacy.h.
3964         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3965         buildsym-legacy.c.
3966         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3967
3968 2018-07-20  Tom Tromey  <tom@tromey.com>
3969
3970         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3971         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3972         (buildsym_compunit::buildsym_compunit)
3973         (buildsym_compunit::~buildsym_compunit)
3974         (buildsym_compunit::get_macro_table): Define.
3975
3976 2018-07-20  Tom Tromey  <tom@tromey.com>
3977
3978         * buildsym.c (reset_symtab_globals): Remove.
3979         (buildsym_compunit::end_symtab_from_static_block): Update.
3980         (buildsym_compunit::augment_type_symtab): Update.
3981         (end_symtab_from_static_block): Call free_buildsym_compunit.
3982         (augment_type_symtab, end_symtab, end_expandable_symtab):
3983         Likewise.
3984
3985 2018-07-20  Tom Tromey  <tom@tromey.com>
3986
3987         * arch-utils.c: Do not include buildsym.h.
3988         * mipsread.c: Do not include buildsym.h.
3989         * machoread.c: Do not include buildsym.h.
3990         * elfread.c: Do not include buildsym.h.
3991
3992 2018-07-20  Tom Tromey  <tom@tromey.com>
3993
3994         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3995         initialization.
3996         (buildsym_compunit): Add new constructor.
3997         (struct buildsym_compunit) <get_last_source_file, finish_block,
3998         record_block_range, start_subfile, patch_subfile_names,
3999         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4000         set_last_source_start_addr, get_last_source_start_addr,
4001         get_local_using_directives, set_local_using_directives,
4002         get_global_using_directives, outermost_context_p,
4003         get_current_context_stack, get_context_stack_depth,
4004         get_current_subfile, get_local_symbols, get_file_symbols,
4005         get_global_symbols, record_debugformat, record_producer,
4006         push_context, pop_context, end_symtab_get_static_block,
4007         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4008         New public methods.
4009         <record_pending_block, finish_block_internal, make_blockvector,
4010         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4011         private methods.
4012         Update all users.
4013
4014 2018-05-22  Tom Tromey  <tom@tromey.com>
4015
4016         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4017         parameter.
4018         (finish_block_internal): Update.
4019
4020 2018-07-20  Tom Tromey  <tom@tromey.com>
4021
4022         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4023         parameter.
4024         (finish_block_internal): Update.
4025
4026 2018-07-20  Tom Tromey  <tom@tromey.com>
4027
4028         * buildsym.h (EXTERN): Don't define or undef.
4029         * buildsym.c (EXTERN): Don't define.
4030
4031 2018-07-20  Tom Tromey  <tom@tromey.com>
4032
4033         * buildsym.c: Remove TODO comment.
4034
4035 2018-07-20  Tom Tromey  <tom@tromey.com>
4036
4037         * coffread.c (coff_symtab_read): Update.
4038         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4039         (xcoff_new_init): Update.
4040         * mipsread.c (mipscoff_new_init): Update.
4041         * mdebugread.c (mdebug_build_psymtabs): Update.
4042         * elfread.c (elf_new_init): Update.
4043         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4044         Update.
4045         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4046         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4047         (stabsect_build_psymtabs): Update.
4048         * buildsym.h (buildsym_init): Don't declare.
4049         * buildsym.c: Update comment.
4050         (prepare_for_building): Remove.
4051         (start_symtab, restart_symtab): Update.
4052         (reset_symtab_globals): Update comment.
4053         (buildsym_init): Remove.
4054
4055 2018-07-20  Tom Tromey  <tom@tromey.com>
4056
4057         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4058         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4059         (read_enum_type, common_block_start, common_block_end)
4060         (cleanup_undefined_types_1, finish_global_stabs): Update.
4061         * mdebugread.c (psymtab_to_symtab_1): Update.
4062         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4063         (read_lexical_block_scope, new_symbol): Update.
4064         * dbxread.c (process_one_symbol): Update.
4065         * coffread.c (coff_symtab_read, process_coff_symbol)
4066         (coff_read_enum_type): Update.
4067         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4068         declare.
4069         (get_local_symbols, get_file_symbols, get_global_symbols): New
4070         functions.
4071         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4072         m_global_symbols.
4073         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4074         (~scoped_free_pendings): Update.
4075         (finish_block, prepare_for_building, reset_symtab_globals)
4076         (end_symtab_get_static_block, end_symtab_with_blockvector)
4077         (augment_type_symtab, push_context): Update.
4078         (get_local_symbols, get_file_symbols, get_global_symbols): New
4079         functions.
4080         (buildsym_init): Update.
4081
4082 2018-07-20  Tom Tromey  <tom@tromey.com>
4083
4084         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4085         (process_full_type_unit): Likewise.
4086         (dwarf2_start_symtab): Set list_in_scope.
4087
4088 2018-07-20  Tom Tromey  <tom@tromey.com>
4089
4090         * dwarf2read.c (process_psymtab_comp_unit_reader)
4091         (build_type_psymtabs_reader): Do not set list_in_scope.
4092
4093 2018-07-20  Tom Tromey  <tom@tromey.com>
4094
4095         * buildsym.c (free_pendings): Remove.
4096         (add_symbol_to_list, scoped_free_pendings)
4097         (finish_block_internal, buildsym_init): Update.
4098
4099 2018-07-20  Tom Tromey  <tom@tromey.com>
4100
4101         * xcoffread.c (read_xcoff_symtab): Update.
4102         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4103         Update.
4104         * dbxread.c (process_one_symbol): Update.
4105         * coffread.c (coff_symtab_read): Update.
4106         * buildsym.h (finish_block): Update.
4107         * buildsym.c (finish_block): Remove "listhead" argument.
4108         (end_symtab_get_static_block): Update.
4109
4110 2018-07-20  Tom Tromey  <tom@tromey.com>
4111
4112         * buildsym.h (class scoped_free_pendings): Remove constructor.
4113         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4114         method.
4115         <m_pending_block_obstack, m_pending_blocks>: New members.
4116         (pending_block_obstack, pending_blocks): Remove.
4117         (scoped_free_pendings::scoped_free_pendings): Default.
4118         (~scoped_free_pendings): Update.
4119         (free_pending_blocks): Remove.
4120         (finish_block_internal, record_pending_block, make_blockvector)
4121         (end_symtab_get_static_block, augment_type_symtab, push_context)
4122         (buildsym_init): Update.
4123
4124 2018-07-20  Tom Tromey  <tom@tromey.com>
4125
4126         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4127         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4128         members.
4129         (pending_addrmap, pending_addrmap_obstack)
4130         (pending_addrmap_interesting): Remove.
4131         (scoped_free_pendings, record_block_range, make_blockvector)
4132         (prepare_for_building, reset_symtab_globals, buildsym_init):
4133         Update.
4134
4135 2018-07-20  Tom Tromey  <tom@tromey.com>
4136
4137         * xcoffread.c (process_linenos): Update.
4138         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4139         * mdebugread.c (psymtab_to_symtab_1): Update.
4140         * dwarf2read.c (setup_type_unit_groups)
4141         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4142         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4143         * dbxread.c (process_one_symbol): Update.
4144         * coffread.c (coff_symtab_read, enter_linenos)
4145         (process_coff_symbol): Update.
4146         * buildsym.h (current_subfile): Don't declare.
4147         (get_current_subfile): Declare.
4148         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4149         member.
4150         (start_subfile, free_buildsym_compunit, push_subfile)
4151         (prepare_for_building, start_symtab): Update.
4152         (get_current_subfile): New function.
4153
4154 2018-07-20  Tom Tromey  <tom@tromey.com>
4155
4156         * coffread.c (coff_symtab_read): Update.
4157         * xcoffread.c (read_xcoff_symtab): Update.
4158         * dwarf2read.c (new_symbol): Update.
4159         (read_func_scope, read_lexical_block_scope): Update.
4160         * dbxread.c (process_one_symbol): Update.
4161         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4162         (outermost_context_p): Remove macro.
4163         (outermost_context_p, get_current_context_stack)
4164         (get_context_stack_depth): Declare.
4165         (pop_context): Return struct context_stack.
4166         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4167         member.
4168         (context_stack_size): Remove.
4169         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4170         (prepare_for_building, end_symtab_get_static_block)
4171         (augment_type_symtab, push_context): Update.
4172         (pop_context): Return struct context_stack.
4173         (outermost_context_p, get_current_context_stack)
4174         (get_context_stack_depth): New functions.
4175         (buildsym_init): Update.
4176
4177 2018-07-20  Tom Tromey  <tom@tromey.com>
4178
4179         * rust-exp.y: Now a pure parser.  Update all rules.
4180         (%union): Move earlier.
4181         (current_parser, work_obstack): Remove globals.
4182         (rust_parser, ~rust_parser): Update.
4183         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4184         lex_character, lex_number, lex_string, lex_identifier,
4185         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4186         convert_name, convert_params_to_expression,
4187         convert_ast_to_expression, ast_basic_type, ast_operation,
4188         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4189         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4190         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4191         ast_array_type, ast_slice_type, ast_reference_type,
4192         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4193         (rust_parse): Update.
4194         (rustyyerror, rustyylex): Add parser parameter.
4195         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4196         (rust_lex_stringish_test, rust_lex_test_sequence)
4197         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4198         (rust_lex_test_push_back, rust_lex_tests): Update.
4199
4200 2018-07-19  Pedro Alves  <palves@redhat.com>
4201
4202         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4203         gdb::unique_xmalloc_ptr.
4204         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4205         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4206         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4207         copy-initialization.
4208         * guile/scm-pretty-print.c (ppscm_print_children): Use
4209         gdb::unique_xmalloc_ptr instead of cleanups.
4210         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4211         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4212         gdb::unique_xmalloc_ptr.
4213         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4214         Adjust to use gdb::unique_xmalloc_ptr.
4215         * guile/scm-utils.c (extract_arg): Adjust.
4216         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4217         gdb::unique_xmalloc_ptr instead of a cleanup.
4218
4219 2018-07-19  Tom Tromey  <tom@tromey.com>
4220
4221         * utils.c (do_value_free_to_mark)
4222         (make_cleanup_value_free_to_mark): Remove.
4223         * utils.h (make_cleanup_value_free_to_mark): Remove.
4224
4225 2018-07-19  Pedro Alves  <palves@redhat.com>
4226
4227         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4228         forwarding reference.
4229
4230 2018-07-18  Pedro Alves  <palves@redhat.com>
4231
4232         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4233         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4234         cleanup.
4235
4236 2018-07-18  Pedro Alves  <palves@redhat.com>
4237
4238         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4239         exceptions.
4240         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4241         (gdbscm_wrap): New.
4242         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4243         directly instead of a cleanup.
4244         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4245         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4246         (vlscm_binop_gdbthrow): New, factored out from ...
4247         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4248         (vlscm_rich_compare): Use gdbscm_wrap.
4249         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4250         instead of a cleanup.
4251         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4252         cleanup.
4253         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4254         Use xfree directly instead of a cleanup.
4255         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4256         Adjust to use gdbscm_wrap and scoped_value_mark.
4257         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4258         (gdbscm_value_address, gdbscm_value_dereference)
4259         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4260         scoped_value_mark.
4261         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4262         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4263         scoped_value_mark.
4264         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4265         gdbscm_wrap and scoped_value_mark.
4266         (gdbscm_value_to_string): Use xfree directly instead of a
4267         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4268         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4269         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4270         scoped_value_mark.
4271         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4272         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4273         scoped_value_mark.
4274         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4275         gdbscm_wrap.
4276
4277 2018-07-18  Tom de Vries  <tdevries@suse.de>
4278
4279         * findvar.c (default_read_var_value): Also resolve dynamic type for
4280         LOC_OPTIMIZED_OUT vars.
4281
4282 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4283
4284         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4285         decoding.
4286
4287 2018-07-17  Tom Tromey  <tom@tromey.com>
4288
4289         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4290         (compute_enum_list, pascm_set_param_value_x)
4291         (gdbscm_parameter_value): Update.
4292         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4293         (gdbscm_scm_to_host_string): Update.
4294         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4295         Update.
4296         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4297         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4298         * guile/scm-string.c (gdbscm_scm_to_string): Return
4299         unique_xmalloc_ptr.
4300         (gdbscm_scm_to_host_string): Likewise.
4301
4302 2018-07-17  Tom Tromey  <tom@tromey.com>
4303
4304         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4305         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4306         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4307         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4308         unique_xmalloc_ptr.
4309
4310 2018-07-17  Tom Tromey  <tom@tromey.com>
4311
4312         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4313         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4314         Update.
4315         * guile/scm-cmd.c (cmdscm_function): Update.
4316         * guile/scm-pretty-print.c
4317         (ppscm_print_exception_unless_memory_error): Update.
4318         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4319         Return unique_xmalloc_ptr.
4320
4321 2018-07-17  Tom Tromey  <tom@tromey.com>
4322
4323         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4324         Use string_printf.
4325
4326 2018-07-17  Jim Wilson  <jimw@sifive.com>
4327
4328         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4329         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4330         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4331         unecessary braces after EF_RISCV_RVC test.  Delete call to
4332         set_gdbarch_decr_pc_after_break.
4333
4334         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4335         RISCV_LAST_FP_REGNUM + 1.
4336         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4337
4338 2018-07-17  Tom Tromey  <tom@tromey.com>
4339
4340         * configure.ac: Remove --disable-gdbcli.
4341         * configure: Rebuild.
4342         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4343         (SUBDIR_CLI_CFLAGS): Remove.
4344         (SFILES): Use SUBDIR_CLI_SRCS.
4345         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4346
4347 2018-07-17  Tom Tromey  <tom@tromey.com>
4348
4349         PR gdb/18624:
4350         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4351
4352 2018-07-16  Jim Wilson  <jimw@sifive.com>
4353
4354         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4355
4356 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4357
4358         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4359         variable.
4360         (libunwind_frame_sniffer): Likewise.
4361         (libunwind_frame_prev_register): Likewise.
4362         (libunwind_sigtramp_frame_sniffer): Likewise.
4363         * ia64-tdep.c (ia64_access_reg): Likewise.
4364         (ia64_access_rse_reg): Likewise.
4365         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4366         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4367
4368 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4369
4370         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4371
4372 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4373
4374         * remote-sim.c (gdbsim_target::close,
4375         gdbsim_target::mourn_inferior): Remove unused variables.
4376
4377 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4378
4379         * ia64-tdep.c (ktab_buf): New global.
4380         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4381         (get_kernel_table): Adjust.
4382
4383 2018-07-16  Tom Tromey  <tom@tromey.com>
4384
4385         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4386         * dwarf2read.c (using_directives, new_symbol): Use
4387         outermost_context_p.
4388         * dbxread.c (process_one_symbol): Use outermost_context_p.
4389         * coffread.c (coff_symtab_read): Use outermost_context_p.
4390
4391 2018-07-16  Tom Tromey  <tom@tromey.com>
4392
4393         * dwarf2read.c (using_directives, read_func_scope)
4394         (read_lexical_block_scope): Update.
4395         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4396         * buildsym.h (local_using_directives, global_using_directives):
4397         Don't declare.
4398         (get_local_using_directives, set_local_using_directives)
4399         (get_global_using_directives): Declare.
4400         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4401         m_global_using_directives>: New members.
4402         (finish_block_internal, prepare_for_building)
4403         (reset_symtab_globals, end_symtab_get_static_block)
4404         (push_context): Update.
4405         (get_local_using_directives, set_local_using_directives)
4406         (get_global_using_directives): New functions.
4407         (buildsym_init): Update.
4408
4409 2018-07-16  Tom Tromey  <tom@tromey.com>
4410
4411         * xcoffread.c (xcoff_initial_scan): Don't call
4412         free_pending_blocks.
4413         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4414         * buildsym.h (class scoped_free_pendings): Add constructor.
4415         (free_pending_blocks): Don't declare.
4416         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4417         (free_pending_blocks): Now static.
4418
4419 2018-07-16  Tom Tromey  <tom@tromey.com>
4420
4421         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4422         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4423         member.
4424         (struct subfile_stack): Remove.
4425         (subfile_stack): Remove.
4426         (push_subfile, pop_subfile, buildsym_init): Update.
4427
4428 2018-07-16  Tom Tromey  <tom@tromey.com>
4429
4430         * buildsym.c (push_subfile): Use gdb_assert.
4431         (pop_subfile): Use gdb_assert.
4432
4433 2018-07-16  Tom Tromey  <tom@tromey.com>
4434
4435         * buildsym.h (merge_symbol_lists): Remove.
4436         * buildsym.c (merge_symbol_lists): Remove.
4437
4438 2018-07-16  Tom Tromey  <tom@tromey.com>
4439
4440         * stabsread.c (scan_file_globals): Update comment.
4441         * stabsread.h (scan_file_globals): Move from buildsym.h.
4442         * buildsym.h (scan_file_globals): Move to stabsread.h.
4443
4444 2018-07-16  Tom Tromey  <tom@tromey.com>
4445
4446         * xcoffread.c (xcoff_new_init): Update.
4447         * mipsread.c (mipscoff_new_init): Update.
4448         * mdebugread.c (mdebug_build_psymtabs): Update.
4449         * elfread.c (elf_new_init): Update.
4450         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4451         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4452         * buildsym.h (buildsym_new_init): Don't declare.
4453         * buildsym.c (buildsym_new_init): Remove.
4454
4455 2018-07-16  Tom Tromey  <tom@tromey.com>
4456
4457         * stabsread.h (within_function): Move from buildsym.h.
4458         * stabsread.c (start_stabs): Clear within_function.
4459         * coffread.c (coff_start_symtab): Clear within_function.
4460         * buildsym.h (within_function): Move to stabsread.h.
4461         * buildsym.c (prepare_for_building): Update.
4462
4463 2018-07-16  Tom Tromey  <tom@tromey.com>
4464
4465         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4466         * dwarf2read.c (dwarf2_start_symtab): Don't set
4467         processing_gcc_compilation.
4468         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4469
4470 2018-07-16  Tom Tromey  <tom@tromey.com>
4471
4472         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4473         (next_symbol_text_func): Move from buildsym.h.
4474         * stabsread.c (hashname): Move from buildsym.c.
4475         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4476         (next_symbol_text_func, hashname): Move to stabsread.h.
4477         * buildsym.c: Don't include bcache.h
4478         (hashname): Move to stasbread.c.
4479
4480 2018-07-16  Tom Tromey  <tom@tromey.com>
4481
4482         * buildsym.h (context_stack_size): Don't declare.
4483         * buildsym.c (context_stack_size): New global.
4484
4485 2018-07-16  Tom Tromey  <tom@tromey.com>
4486
4487         * dbxread.c (processing_acc_compilation): New global.
4488         * buildsym.h (processing_acc_compilation): Don't declare.
4489
4490 2018-07-16  Tom Tromey  <tom@tromey.com>
4491
4492         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4493         * dbxread.c (read_ofile_symtab): Update.
4494         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4495         * buildsym.h (last_source_start_addr): Remove.
4496         (set_last_source_start_addr, get_last_source_start_addr):
4497         Declare.
4498         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4499         parameter.
4500         (struct buildsym_compunit) <m_last_source_start_addr>: New
4501         member.
4502         (prepare_for_building): Remove start_addr parameter.
4503         (start_symtab, restart_symtab, end_symtab_get_static_block)
4504         (end_symtab_with_blockvector): Update.
4505         (set_last_source_start_addr, get_last_source_start_addr): New
4506         functions.
4507
4508 2018-07-16  Tom Tromey  <tom@tromey.com>
4509
4510         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4511         member.
4512         (have_line_numbers): Remove.
4513         (record_line, prepare_for_building, end_symtab_get_static_block)
4514         (augment_type_symtab): Update.
4515
4516 2018-07-16  Tom Tromey  <tom@tromey.com>
4517
4518         * buildsym.c (~buildsym_compunit): Free the macro table.
4519         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4520         methods.
4521         <m_pending_macros>: New member.
4522         (pending_macros): Remove.
4523         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4524         (reset_symtab_globals, end_symtab_get_static_block)
4525         (end_symtab_with_blockvector, augment_type_symtab)
4526         (buildsym_init): Update.
4527
4528 2018-07-16  Tom Tromey  <tom@tromey.com>
4529
4530         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4531         parameter.
4532         (buildsym_compunit::set_last_source_file): New method.
4533         <m_last_source_file>: New member.
4534         (prepare_for_building): Remove "name" parameter.
4535         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4536         (last_source_file): Remove.
4537         (set_last_source_file, get_last_source_file): Update.
4538
4539 2018-07-16  Tom Tromey  <tom@tromey.com>
4540
4541         * buildsym.c (prepare_for_building): Add assert.
4542
4543 2018-07-16  Tom Tromey  <tom@tromey.com>
4544
4545         * buildsym.c (~buildsym_compunit): Update.
4546         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4547         (start_subfile, patch_subfile_names)
4548         (end_symtab_with_blockvector): Update.
4549
4550 2018-07-16  Tom Tromey  <tom@tromey.com>
4551
4552         * buildsym.c (struct buildsym_compunit): Add constructor,
4553         destructor, initializers.
4554         (start_buildsym_compunit): Remove.
4555         (free_buildsym_compunit): Use "delete".
4556         (start_symtab, restart_symtab): Use "new".
4557
4558 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4559
4560         * symfile.c (set_objfile_default_section_offset): Remove struct
4561         keyword.
4562
4563 2018-07-14  Stafford Horne  <shorne@gmail.com>
4564
4565         * (Responsible Maintainers): Add myself as or1k maintainer.
4566
4567 2018-07-13  Tom Tromey  <tom@tromey.com>
4568
4569         * symfile.c (set_objfile_default_section_offset): Use extra braces
4570         around initializer.
4571
4572 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4573
4574         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4575         non-branching basr.
4576
4577 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4578
4579         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4580         unittests/cli-utils-selftests.c
4581         * unittests/cli-utils-selftests.c: New file.
4582
4583 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4584
4585         * NEWS: Mention new commands. Mention change to 'thread apply'.
4586
4587 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4588
4589         * thread.c (thr_try_catch_cmd): New function.
4590         (thread_apply_all_command): Handle qcs flags.
4591         (thread_apply_command): Handle qcs flags.
4592         (taas_command): New function.
4593         (tfaas_command): New function.
4594         (_initialize_thread): Update to setup the new commands 'taas
4595         and 'tfaas'. Change doc string for 'thread apply'.
4596
4597 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4598
4599         * stack.c: (trailing_outermost_frame): New function, mostly
4600         extracted from backtrace_command_1.
4601         (leading_innermost_frame): New function.
4602         (backtrace_command_1): Update to call trailing_outermost_frame.
4603         (frame_apply_command_count): New function.
4604         (frame_apply_level_command): New function.
4605         (frame_apply_all_command): New function.
4606         (frame_apply_command): New function.
4607         (faas_command): New function.
4608         (frame_cmd_list): New variable.
4609         (_initialize_stack): Update to setup the new commands 'frame apply'
4610         and 'faas'.
4611
4612 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4613
4614         * cli-utils.c (number_or_range_parser::get_number): Only handle
4615         numbers or convenience var as numbers.
4616         (parse_flags): New function.
4617         (parse_flags_qcs): New function.
4618         (number_or_range_parser::finished): Ensure parsing end is detected
4619         before end of string.
4620         * cli-utils.h (parse_flags): New function.
4621         (parse_flags_qcs): New function.
4622         (number_or_range_parser): Remove m_finished bool.
4623         (number_or_range_parser::skip_range): Set m_in_range to false.
4624
4625 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4626
4627         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4628         on Windows.
4629
4630 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4631             Jan Kratochvil  <jan.kratochvil@redhat.com>
4632             Paul Fertser  <fercerpav@gmail.com>
4633             Tsutomu Seki  <sekiriki@gmail.com>
4634             Pedro Alves  <palves@redhat.com>
4635
4636         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4637         'unittests/parse-connection-spec-selftests.c'.
4638         (COMMON_SFILES): Add 'common/netstuff.c'.
4639         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4640         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4641         * common/netstuff.c: New file.
4642         * common/netstuff.h: New file.
4643         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4644         (wait_for_connect): Update comment.  New parameter
4645         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4646         Use 'sock' directly instead of 'scb->fd'.
4647         (try_connect): New function, with code from 'net_open'.
4648         (net_open): Rewrite main loop to deal with multiple
4649         sockets/addresses.  Handle IPv6-style hostnames; implement
4650         support for IPv6 connections.
4651         * unittests/parse-connection-spec-selftests.c: New file.
4652
4653 2018-07-11  Pedro Alves  <palves@redhat.com>
4654
4655         PR gdb/23377
4656         * remote.c (remote_target::remote_detach_pid): Call
4657         set_current_process.
4658
4659 2018-07-11  Pedro Alves  <palves@redhat.com>
4660
4661         * h8300-tdep.c (h8300_gdbarch_init): Remove
4662         set_gdbarch_ecoff_reg_to_regnum calls.
4663
4664 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4665
4666         PR c++/23373
4667         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4668         offsets/sizes for static members of a class/struct.
4669
4670 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4671
4672         * target-descriptions.c (tdesc_register_bitsize): Rename.
4673         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4674         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4675         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4676
4677 2018-07-10  Tom Tromey  <tom@tromey.com>
4678
4679         * breakpoint.c (moribund_locations): Now static and a
4680         std::vector.
4681         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4682         (build_bpstat_chain, update_global_location_list)
4683         (breakpoint_retire_moribund): Update.
4684         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4685         VEC.
4686
4687 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4688
4689         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4690         (riscv_register_reggroup_p): Use new function, remove unneeded
4691         parenthesis.
4692         (riscv_push_dummy_call): Extend assert to compare against xlen or
4693         flen based on register type.
4694
4695 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4696
4697         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4698
4699 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4700
4701         * remote.c (show_hardware_watchpoint_limit): New function.
4702         (show_hardware_watchpoint_length_limit): New function.
4703         (show_hardware_breakpoint_limit): New function.
4704         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4705         where appropriate, update help text.
4706
4707 2018-07-09  Tom Tromey  <tom@tromey.com>
4708
4709         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4710         (CLIBS): Don't mention NAT_CLIBS.
4711
4712 2018-07-09  Tom Tromey  <tom@tromey.com>
4713
4714         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4715         (LIBGDB_OBS, clean mostlyclean): Update.
4716         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4717
4718 2018-07-09  Tom Tromey  <tom@tromey.com>
4719
4720         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4721         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4722         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4723
4724 2018-07-09  Tom Tromey  <tom@tromey.com>
4725
4726         * Makefile.in (ALLDEPFILES): Remove exec.c.
4727         (COMMON_OBS): Remove exec.o.
4728         (COMMON_SFILES): Add exec.c.
4729
4730 2018-07-09  Tom Tromey  <tom@tromey.com>
4731
4732         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4733
4734 2018-07-09  Tom Tromey  <tom@tromey.com>
4735
4736         * Makefile.in (clean mostlyclean): Remove stamp-version.
4737         (version.c): Depend on stamp-version.
4738         (stamp-version): New rule, from version.c rule.
4739
4740 2018-07-09  Tom Tromey  <tom@tromey.com>
4741
4742         * Makefile.in (init.c): Depend on stamp-init.
4743         (stamp-init): New rule, from init.c rule.
4744         (clean mostlyclean): Remove stamp-init.
4745
4746 2018-07-09  Tom Tromey  <tom@tromey.com>
4747
4748         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4749         SUBDIR_GCC_COMPILE_SRCS.
4750
4751 2018-07-09  Tom Tromey  <tom@tromey.com>
4752
4753         * Makefile.in (init.c): Remove some unused sed rules.
4754
4755 2018-07-09  Tom Tromey  <tom@tromey.com>
4756
4757         * Makefile.in (TSOBS): Remove.
4758         (INIT_FILES): Update.
4759         (LIBGDB_OBS): Update.
4760         (COMMON_SFILES): Add inflow.c.
4761         (SFILES): Remove inflow.c.
4762
4763 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4764
4765         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4766
4767 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4768
4769         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4770         get_saveloc_name, is_signal_frame_name, step_name,
4771         init_remote_name, create_addr_space_name,
4772         destroy_addr_space_name, search_unwind_table_name,
4773         find_dyn_list_name): Constify.
4774
4775 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4776
4777         * darwin-nat.c (darwin_pthread_kill): New function.
4778         (darwin_resume_thread): Use darwin_pthread_kill.
4779
4780 2018-07-05  Tom de Vries  <tdevries@suse.de>
4781
4782         * macroexp.c (macro_buffer) <operator=>: New member function.
4783
4784 2018-07-04  Tom Tromey  <tom@tromey.com>
4785
4786         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4787
4788 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4789
4790         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4791         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4792         * maint.c: Likewise.
4793         * top.c: Likewise.
4794
4795 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4796
4797         * NEWS: Create a new section for the next release branch.
4798         Rename the section of the current branch, now that it has
4799         been cut.
4800
4801 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4802
4803         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4804         * version.in: Bump version to 8.2.50.DATE-git.
4805
4806 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4807             Pedro Alves  <palves@redhat.com>
4808
4809         * linux-nat.c (linux_init_ptrace): Rename to ...
4810         (linux_init_ptrace_procfs): ... this.  Call
4811         linux_proc_init_warnings.
4812         (linux_nat_target::post_attach)
4813         (linux_nat_target::post_startup_inferior): Adjust.
4814         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4815         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4816
4817 2018-07-04  Tom de Vries  <tdevries@suse.de>
4818
4819         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4820         check ...
4821         (read_comp_unit_head): ... here.
4822
4823 2018-07-03  Tom Tromey  <tom@tromey.com>
4824
4825         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4826         (stop_tracing, tstatus_command)
4827         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4828         (print_one_static_tracepoint_marker): Update.
4829         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4830         std::vector.
4831         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4832         VEC.
4833         (all_tracepoints, static_tracepoints_here): Return std::vector.
4834
4835 2018-07-03  Tom Tromey  <tom@tromey.com>
4836
4837         * common/ptid.c (ptid_equal): Remove.
4838         * common/ptid.h (ptid_equal): Don't declare.
4839         * ada-tasks.c: Update.
4840         * breakpoint.c: Update.
4841         * common/agent.c: Update.
4842         * corelow.c: Update.
4843         * darwin-nat-info.c: Update.
4844         * darwin-nat.c: Update.
4845         * dcache.c: Update.
4846         * dtrace-probe.c: Update.
4847         * dummy-frame.c: Update.
4848         * fbsd-nat.c: Update.
4849         * frame.c: Update.
4850         * gdbthread.h: Update.
4851         * gnu-nat.c: Update.
4852         * go32-nat.c: Update.
4853         * inf-loop.c: Update.
4854         * inf-ptrace.c: Update.
4855         * infcall.c: Update.
4856         * infcmd.c: Update.
4857         * inflow.c: Update.
4858         * infrun.c: Update.
4859         * linux-fork.c: Update.
4860         * linux-nat.c: Update.
4861         * linux-thread-db.c: Update.
4862         * mi/mi-cmd-var.c: Update.
4863         * mi/mi-interp.c: Update.
4864         * mi/mi-main.c: Update.
4865         * nto-procfs.c: Update.
4866         * ppc-linux-tdep.c: Update.
4867         * procfs.c: Update.
4868         * python/py-inferior.c: Update.
4869         * python/py-record-btrace.c: Update.
4870         * python/py-record.c: Update.
4871         * ravenscar-thread.c: Update.
4872         * regcache.c: Update.
4873         * remote-sim.c: Update.
4874         * remote.c: Update.
4875         * sol-thread.c: Update.
4876         * solib.c: Update.
4877         * target.c: Update.
4878         * tui/tui-stack.c: Update.
4879         * varobj.c: Update.
4880         * windows-nat.c: Update.
4881         * windows-tdep.c: Update.
4882
4883 2018-07-03  Tom Tromey  <tom@tromey.com>
4884
4885         * common/ptid.c (ptid_match): Remove.
4886         * common/ptid.h (ptid_match): Don't declare.
4887         * fbsd-nat.c: Update.
4888         * infcmd.c: Update.
4889         * infrun.c: Update.
4890         * linux-nat.c: Update.
4891         * record-btrace.c: Update.
4892         * regcache.c: Update.
4893         * remote.c: Update.
4894
4895 2018-07-03  Tom Tromey  <tom@tromey.com>
4896
4897         * common/ptid.c (ptid_tid_p): Remove.
4898         * common/ptid.h (ptid_tid_p): Don't declare.
4899         * sol-thread.c: Update.
4900
4901 2018-07-03  Tom Tromey  <tom@tromey.com>
4902
4903         * common/ptid.c (ptid_lwp_p): Remove.
4904         * common/ptid.h (ptid_lwp_p): Don't declare.
4905         * fbsd-nat.c: Update.
4906         * linux-nat.c: Update.
4907         * nat/linux-procfs.c: Update.
4908         * nat/x86-linux-dregs.c: Update.
4909         * sol-thread.c: Update.
4910
4911 2018-07-03  Tom Tromey  <tom@tromey.com>
4912
4913         * common/ptid.c (ptid_is_pid): Remove.
4914         * common/ptid.h (ptid_is_pid): Don't declare.
4915         * infrun.c: Update.
4916         * linux-nat.c: Update.
4917         * mi/mi-interp.c: Update.
4918         * remote.c: Update.
4919         * thread.c: Update.
4920
4921 2018-07-03  Tom Tromey  <tom@tromey.com>
4922
4923         * common/ptid.c (ptid_get_tid): Remove.
4924         * common/ptid.h (ptid_get_tid): Don't declare.
4925         * ada-tasks.c: Update.
4926         * aix-thread.c: Update.
4927         * bsd-uthread.c: Update.
4928         * darwin-nat.c: Update.
4929         * fbsd-nat.c: Update.
4930         * i386-darwin-nat.c: Update.
4931         * infrun.c: Update.
4932         * linux-tdep.c: Update.
4933         * nto-procfs.c: Update.
4934         * ppc-ravenscar-thread.c: Update.
4935         * python/py-infthread.c: Update.
4936         * ravenscar-thread.c: Update.
4937         * sol-thread.c: Update.
4938         * sparc-ravenscar-thread.c: Update.
4939         * windows-nat.c: Update.
4940
4941 2018-07-03  Tom Tromey  <tom@tromey.com>
4942
4943         * common/ptid.c (ptid_get_lwp): Remove.
4944         * common/ptid.h (ptid_get_lwp): Don't declare.
4945         * aarch64-linux-nat.c: Update.
4946         * ada-tasks.c: Update.
4947         * aix-thread.c: Update.
4948         * amd64-linux-nat.c: Update.
4949         * arm-linux-nat.c: Update.
4950         * corelow.c: Update.
4951         * fbsd-nat.c: Update.
4952         * fbsd-tdep.c: Update.
4953         * gnu-nat.c: Update.
4954         * i386-cygwin-tdep.c: Update.
4955         * i386-gnu-nat.c: Update.
4956         * i386-linux-nat.c: Update.
4957         * ia64-linux-nat.c: Update.
4958         * inf-ptrace.c: Update.
4959         * infrun.c: Update.
4960         * linux-fork.c: Update.
4961         * linux-nat.c: Update.
4962         * linux-tdep.c: Update.
4963         * linux-thread-db.c: Update.
4964         * mips-linux-nat.c: Update.
4965         * nat/aarch64-linux-hw-point.c: Update.
4966         * nat/aarch64-linux.c: Update.
4967         * nat/linux-btrace.c: Update.
4968         * nat/linux-osdata.c: Update.
4969         * nat/linux-procfs.c: Update.
4970         * nat/x86-linux-dregs.c: Update.
4971         * obsd-nat.c: Update.
4972         * ppc-fbsd-nat.c: Update.
4973         * ppc-linux-nat.c: Update.
4974         * procfs.c: Update.
4975         * python/py-infthread.c: Update.
4976         * ravenscar-thread.c: Update.
4977         * remote.c: Update.
4978         * s390-linux-nat.c: Update.
4979         * sol-thread.c: Update.
4980         * sol2-tdep.c: Update.
4981         * spu-linux-nat.c: Update.
4982         * x86-linux-nat.c: Update.
4983         * xtensa-linux-nat.c: Update.
4984
4985 2018-07-03  Tom Tromey  <tom@tromey.com>
4986
4987         * common/ptid.c (ptid_get_pid): Remove.
4988         * common/ptid.h (ptid_get_pid): Don't declare.
4989         * aarch64-linux-nat.c: Update.
4990         * ada-lang.c: Update.
4991         * aix-thread.c: Update.
4992         * alpha-bsd-nat.c: Update.
4993         * amd64-fbsd-nat.c: Update.
4994         * amd64-linux-nat.c: Update.
4995         * arm-linux-nat.c: Update.
4996         * arm-nbsd-nat.c: Update.
4997         * auxv.c: Update.
4998         * break-catch-syscall.c: Update.
4999         * breakpoint.c: Update.
5000         * bsd-uthread.c: Update.
5001         * corelow.c: Update.
5002         * ctf.c: Update.
5003         * darwin-nat.c: Update.
5004         * fbsd-nat.c: Update.
5005         * fbsd-tdep.c: Update.
5006         * gcore.c: Update.
5007         * gnu-nat.c: Update.
5008         * hppa-nbsd-nat.c: Update.
5009         * hppa-obsd-nat.c: Update.
5010         * i386-fbsd-nat.c: Update.
5011         * ia64-linux-nat.c: Update.
5012         * inf-ptrace.c: Update.
5013         * infcmd.c: Update.
5014         * inferior.c: Update.
5015         * inferior.h: Update.
5016         * inflow.c: Update.
5017         * infrun.c: Update.
5018         * linux-fork.c: Update.
5019         * linux-nat.c: Update.
5020         * linux-tdep.c: Update.
5021         * linux-thread-db.c: Update.
5022         * m68k-bsd-nat.c: Update.
5023         * mi/mi-interp.c: Update.
5024         * mi/mi-main.c: Update.
5025         * mips-linux-nat.c: Update.
5026         * mips-nbsd-nat.c: Update.
5027         * mips64-obsd-nat.c: Update.
5028         * nat/aarch64-linux-hw-point.c: Update.
5029         * nat/aarch64-linux.c: Update.
5030         * nat/linux-btrace.c: Update.
5031         * nat/linux-osdata.c: Update.
5032         * nat/linux-procfs.c: Update.
5033         * nat/x86-linux-dregs.c: Update.
5034         * nto-procfs.c: Update.
5035         * obsd-nat.c: Update.
5036         * ppc-linux-nat.c: Update.
5037         * ppc-nbsd-nat.c: Update.
5038         * ppc-obsd-nat.c: Update.
5039         * proc-service.c: Update.
5040         * procfs.c: Update.
5041         * python/py-inferior.c: Update.
5042         * python/py-infthread.c: Update.
5043         * ravenscar-thread.c: Update.
5044         * record.c: Update.
5045         * remote-sim.c: Update.
5046         * remote.c: Update.
5047         * rs6000-nat.c: Update.
5048         * s390-linux-nat.c: Update.
5049         * sh-nbsd-nat.c: Update.
5050         * sol-thread.c: Update.
5051         * sparc-nat.c: Update.
5052         * sparc64-tdep.c: Update.
5053         * spu-linux-nat.c: Update.
5054         * spu-tdep.c: Update.
5055         * target-debug.h: Update.
5056         * target.c: Update.
5057         * thread.c: Update.
5058         * tid-parse.c: Update.
5059         * tracefile-tfile.c: Update.
5060         * vax-bsd-nat.c: Update.
5061         * windows-nat.c: Update.
5062         * x86-linux-nat.c: Update.
5063         * x86-nat.c: Update.
5064
5065 2018-07-03  Tom Tromey  <tom@tromey.com>
5066
5067         * common/ptid.c (pid_to_ptid): Remove.
5068         * common/ptid.h (pid_to_ptid): Don't declare.
5069         * aix-thread.c: Update.
5070         * arm-linux-nat.c: Update.
5071         * common/ptid.c: Update.
5072         * common/ptid.h: Update.
5073         * corelow.c: Update.
5074         * ctf.c: Update.
5075         * darwin-nat.c: Update.
5076         * fbsd-nat.c: Update.
5077         * fork-child.c: Update.
5078         * gnu-nat.c: Update.
5079         * go32-nat.c: Update.
5080         * inf-ptrace.c: Update.
5081         * infcmd.c: Update.
5082         * inferior.c: Update.
5083         * infrun.c: Update.
5084         * linux-fork.c: Update.
5085         * linux-nat.c: Update.
5086         * nat/aarch64-linux-hw-point.c: Update.
5087         * nat/fork-inferior.c: Update.
5088         * nat/x86-linux-dregs.c: Update.
5089         * nto-procfs.c: Update.
5090         * obsd-nat.c: Update.
5091         * procfs.c: Update.
5092         * progspace.c: Update.
5093         * remote.c: Update.
5094         * rs6000-nat.c: Update.
5095         * s390-linux-nat.c: Update.
5096         * sol-thread.c: Update.
5097         * spu-linux-nat.c: Update.
5098         * target.c: Update.
5099         * top.c: Update.
5100         * tracefile-tfile.c: Update.
5101         * windows-nat.c: Update.
5102
5103 2018-07-03  Tom Tromey  <tom@tromey.com>
5104
5105         * common/ptid.h (ptid_build): Don't declare.
5106         * common/ptid.c (ptid_build): Remove.
5107         * aix-thread.c: Update.
5108         * bsd-kvm.c: Update.
5109         * bsd-uthread.c: Update.
5110         * common/agent.c: Update.
5111         * common/ptid.c: Update.
5112         * common/ptid.h: Update.
5113         * corelow.c: Update.
5114         * darwin-nat.c: Update.
5115         * fbsd-nat.c: Update.
5116         * gnu-nat.c: Update.
5117         * linux-fork.c: Update.
5118         * linux-nat.c: Update.
5119         * linux-thread-db.c: Update.
5120         * nat/linux-osdata.c: Update.
5121         * nat/linux-procfs.c: Update.
5122         * nto-procfs.c: Update.
5123         * obsd-nat.c: Update.
5124         * proc-service.c: Update.
5125         * procfs.c: Update.
5126         * ravenscar-thread.c: Update.
5127         * remote-sim.c: Update.
5128         * remote.c: Update.
5129         * sol-thread.c: Update.
5130         * target.c: Update.
5131         * windows-nat.c: Update.
5132
5133 2018-07-03  Tom Tromey  <tom@tromey.com>
5134
5135         * infrun.c (follow_exec): Use exit_inferior_silent.
5136         * inferior.c (exit_inferior_num_silent): Remove.
5137         * inferior.h (exit_inferior_num_silent): Don't declare.
5138
5139 2018-07-03  Tom Tromey  <tom@tromey.com>
5140
5141         PR cli/23340:
5142         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5143         inferior_ptid on error.
5144
5145 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5146             Simon Marchi  <simon.marchi@polymtl.ca>
5147
5148         PR tdep/8282
5149         * disasm.h (gdb_disassembler): Add
5150         `m_disassembler_options_holder'. member
5151         * disasm.c (get_all_disassembler_options): New function.
5152         (gdb_disassembler::gdb_disassembler): Use it.
5153         (gdb_buffered_insn_length_init_dis): Likewise.
5154         (gdb_buffered_insn_length): Adjust accordingly.
5155         (set_disassembler_options): Handle options with arguments.
5156         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5157         line if showing options with descriptions.
5158         (disassembler_options_completer): Adapt to using the
5159         `disasm_options_and_args_t' structure.
5160         * mips-tdep.c (mips_disassembler_options): New variable.
5161         (mips_disassembler_options_o32): Likewise.
5162         (mips_disassembler_options_n32): Likewise.
5163         (mips_disassembler_options_n64): Likewise.
5164         (gdb_print_insn_mips): Don't set `disassembler_options'.
5165         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5166         functions.
5167         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5168         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5169         `gdbarch_disassembler_options_implicit' and
5170         `gdbarch_valid_disassembler_options'.
5171         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5172         `disasm_options_and_args_t' structure.
5173         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5174         method.
5175         (valid_disassembler_options): Switch from `disasm_options_t' to
5176         the `disasm_options_and_args_t' structure.
5177         * NEWS: Document `set disassembler-options' support for the MIPS
5178         target.
5179         * gdbarch.h: Regenerate.
5180         * gdbarch.c: Regenerate.
5181
5182 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5183
5184         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5185
5186 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5187
5188         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5189         parameter in call to amd64_target_description.
5190         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5191         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5192         (amd64fbsd_init_abi): Likewise.
5193         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5194         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5195         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5196         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5197
5198 2018-06-29  Pedro Alves  <palves@redhat.com>
5199
5200         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5201         "segments" parameter.
5202         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5203         (_initialize_amd64_tdep): Update call to
5204         amd64_create_target_description.
5205         (amd64_target_description): Add "segments" parameter.  Adjust
5206         the implementation to use it.
5207         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5208         call to amd64_create_target_description.
5209         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5210         * gdb/arch/amd64.h (amd64_create_target_description): Add
5211         "segments" register.
5212         * gdb/arch/amd64.c (amd64_create_target_description): Add
5213         "segments" parameter.  Call create_feature_i386_64bit_segments
5214         only if SEGMENTS is true.
5215         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5216         call to amd64_create_target_description.
5217
5218 2018-06-29  Pedro Alves  <palves@redhat.com>
5219
5220         * thread.c (thread_target_id_str): New, factored out from ...
5221         (print_thread_info_1): ... here.  Use it to compute the max
5222         "Target Id" column width.
5223
5224 2018-06-29  Pedro Alves  <palves@redhat.com>
5225
5226         * remote.c (remote_target::extra_thread_info): Delete
5227         'display_buf' and 'n' locals.  from the cache, regardless of
5228         packet mechanims is in use.  Use cache for qThreadExtra and qP
5229         methods too.
5230
5231 2018-06-29  Pedro Alves  <palves@redhat.com>
5232
5233         * blockframe.c (find_pc_sect_containing_function): New function.
5234         * breakpoint.c (print_breakpoint_location): Don't call
5235         find_pc_sect_function.
5236         * linespec.c (create_sals_line_offset): Record the location's
5237         symbol in the sal.
5238         * linespec.c (convert_address_location_to_sals): Fill in sal's
5239         symbol with find_pc_sect_containing_function.
5240         * symtab.c (find_function_start_sal): Rename to ...
5241         (find_function_start_sal_1): ... this.
5242         (find_function_start_sal): Reimplement as wrapper around
5243         find_function_start_sal_1, and use
5244         find_pc_sect_containing_function to fill in the sal's symbol.
5245         (find_function_start_sal(symbol*, bool)): Adjust.
5246         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5247         comments.
5248         (find_pc_sect_containing_function): Declare.
5249
5250 2018-06-29  Pedro Alves  <palves@redhat.com>
5251
5252         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5253         true if the the location has no symbol.
5254
5255 2018-06-28  Tom Tromey  <tom@tromey.com>
5256
5257         * NEWS: Mention --enable-codesign.
5258         * silent-rules.mk (ECHO_SIGN): New variable.
5259         * configure.ac: Add --enable-codesign.
5260         * configure: Rebuild.
5261         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5262         (gdb$(EXEEXT)): Optionally invoke codesign.
5263
5264 2018-06-28  Pedro Alves  <palves@redhat.com>
5265
5266         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5267         comments.
5268         (switch_to_thread_no_regs): Adjust comment.
5269         * infcmd.c (stop_pc): Delete.
5270         (post_create_inferior, info_program_command): Replace references
5271         to stop_pc with references to thread_info->suspend.stop_pc.
5272         * inferior.h (stop_pc): Delete declaration.
5273         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5274         (handle_inferior_event_1, handle_signal_stop)
5275         (process_event_stop_test, keep_going_stepped_thread)
5276         (handle_step_into_function, handle_step_into_function_backward)
5277         (print_stop_location): Replace references to stop_pc with
5278         references to thread_info->suspend.stop_pc.
5279         (struct infcall_suspend_state) <stop_pc>: Delete field.
5280         (save_infcall_suspend_state, restore_infcall_suspend_state):
5281         Remove references to inf_stat->stop_pc.
5282         * linux-fork.c (fork_load_infrun_state): Likewise.
5283         * record-btrace.c (record_btrace_set_replay): Likewise.
5284         * record-full.c (record_full_goto_entry): Likewise.
5285         * remote.c (print_one_stopped_thread): Likewise.
5286         * target.c (target_resume): Extend comment.
5287         * thread.c (set_executing_thread): New.
5288         (set_executing): Use it.
5289         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5290         Remove references to stop_pc.
5291
5292 2018-06-28  Pedro Alves  <palves@redhat.com>
5293
5294         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5295         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5296
5297 2018-06-28  Tom Tromey  <tom@tromey.com>
5298
5299         * coffread.c (coff_symfile_finish): Update.
5300         * xcoffread.c (xcoff_symfile_finish): Update.
5301         * elfread.c (elf_symfile_finish): Update.
5302         * symfile.h (dwarf2_free_objfile): Don't declare.
5303         * dwarf2read.c (_initialize_dwarf2_read): Use
5304         register_objfile_data_with_cleanup.
5305         (dwarf2_free_objfile): Now static.  Change signature.
5306
5307 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5308
5309         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5310         option "-o" to add-symbol-file-load to add an offset to each
5311         section's load address.
5312         * symfile.c (set_objfile_default_section_offset): New function.
5313
5314 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5315
5316         * symfile.c (add_symbol_file_command): Make sure that sections
5317         with the same name are sorted in the same order.
5318
5319 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5320
5321         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5322         require the second argument.  If omitted, load sections at the
5323         addresses specified in the file.
5324
5325 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5326
5327         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5328         (_initialize_symfile): Add option "-o" to symbol-file to add an
5329         offset to each section of the symbol file.
5330
5331 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5332
5333         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5334
5335 2018-06-27  Tom Tromey  <tom@tromey.com>
5336
5337         * stack.c (_initialize_stack): Update "func" help text.
5338
5339 2018-06-27  Tom Tromey  <tom@tromey.com>
5340
5341         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5342         std::vector.
5343         (unwind_infopy_str, pyuw_create_unwind_info)
5344         (unwind_infopy_add_saved_register, pyuw_sniffer)
5345         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5346         Update.
5347         (struct saved_reg): Add constructor.
5348         <value>: Now a gdbpy_ref<>.
5349
5350 2018-06-27  Tom Tromey  <tom@tromey.com>
5351
5352         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5353
5354 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5355
5356         * gdb-gdb.py.in: Format using autopep8.
5357
5358 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5359
5360         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5361         (type_lookup_function): Recognize CORE_ADDR values.
5362
5363 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5364
5365         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5366         print tag_name.
5367
5368 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5369
5370         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5371         <__lt__>: Add.
5372
5373 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5374
5375         * gdb-gdb.py: Move to...
5376         * gdb-gdb.py.in: ... here.
5377         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5378         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5379         dependencies.
5380         (distclean): Remove gdb-gdb.py when cleaning.
5381         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5382         * configure: Re-generate.
5383
5384 2018-06-27  Pedro Alves  <palves@redhat.com>
5385
5386         * proc-service.c (get_ps_regcache): New.
5387         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5388         (ps_lsetfpregs): Use it.
5389
5390 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5391
5392         PR gdb/21695
5393         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5394         (dwarf_decode_lines_1): Adjust.
5395
5396 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5397
5398         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5399         override.
5400         <info_proc>: Likewise.
5401
5402 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5403
5404         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5405         to windows_fetch_one_register, and only handle the case of
5406         fetching one register.  Move the code that reloads the context
5407         and iterates over all registers if R is negative to...
5408         (windows_nat_target::fetch_registers): ... here.
5409         (do_windows_store_inferior_registers): Rename to
5410         windows_store_one_register, and only handle the case of storing
5411         one register.  Move the code that handles the case where r is
5412         negative to...
5413         (windows_nat_target::store_registers) ... here.
5414
5415 2018-06-26  Tom Tromey  <tom@tromey.com>
5416
5417         PR rust/22574:
5418         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5419         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5420         Update.
5421         (rust_internal_print_type): Add podata parameter.
5422         (rust_print_type): Update.
5423
5424 2018-06-26  Tom Tromey  <tom@tromey.com>
5425
5426         * typeprint.h (struct print_offset_data) <update, finish,
5427         maybe_print_hole>: New methods.
5428         <indentation>: New constant.
5429         * typeprint.c (print_offset_data::indentation): Define.
5430         (print_offset_data::maybe_print_hole, print_offset_data::update)
5431         (print_offset_data::finish): Move from c-typeprint.c and rename.
5432         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5433         (print_spaces_filtered_with_print_options): Update.
5434         (c_print_type_union_field_offset, maybe_print_hole)
5435         (c_print_type_struct_field_offset): Move to typeprint.c and
5436         rename.
5437         (c_type_print_base_struct_union): Update.
5438
5439 2018-06-25  Pedro Alves  <palves@redhat.com>
5440
5441         * gdbthread.h (thread_info_ref, delete_thread)
5442         (delete_thread_silent, first_thread_of_inferior)
5443         (any_thread_of_inferior, switch_to_thread)
5444         (enable_thread_stack_temporaries)
5445         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5446         (get_last_thread_stack_temporary)
5447         (value_in_thread_stack_temporaries, can_access_registers_thread):
5448         Spell out "struct thread_info" instead of just "thread_info".
5449         * inferior.h (notice_new_inferior): Likewise.
5450
5451 2018-06-25  Pedro Alves  <palves@redhat.com>
5452
5453         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5454         pass thread_info pointer to delete_thread.
5455         (windows_nat_target::detach): Pass inferior pointer to
5456         detach_inferior.
5457         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5458         delete_thread.
5459         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5460         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5461         and pass a thread_info pointer to delete_thread.
5462         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5463         pass thread_info pointer to delete_thread.
5464         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5465         delete_thread_silent call.
5466         * procfs.c (procfs_target::detach): Pass inferior pointer to
5467         detach_inferior.
5468         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5469         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5470         delete_thread_silent call.
5471         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5472         pass thread_info pointer to delete_thread.
5473         (windows_nat_target::detach): Pass inferior pointer to
5474         delete_inferior.
5475
5476 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5477
5478         * regcache.c (readable_regcache::read_part): Fix asserts.
5479         (reg_buffer::raw_collect_part): New function.
5480         (regcache::write_part): Fix asserts.
5481         (reg_buffer::raw_supply_part): New function.
5482         (regcache::transfer_regset_register): New helper function.
5483         (regcache::transfer_regset): Call new functions.
5484         (regcache_supply_regset): Use gdb_byte*.
5485         (regcache::supply_regset): Likewise.
5486         (regcache_collect_regset): Likewise.
5487         (regcache::collect_regset): Likewise.
5488         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5489         (reg_buffer::raw_supply_part): Likewise.
5490         (regcache::transfer_regset_register): Likewise.
5491         (regcache::transfer_regset): Use gdb_byte*.
5492
5493 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5494
5495         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5496
5497 2018-06-21  Pedro Alves  <palves@redhat.com>
5498
5499         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5500         instead of a ptid_t.  All callers adjusted.
5501         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5502         adjusted.
5503         (print_ada_task_info, display_current_task_id, task_command_1):
5504         Adjust.
5505         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5506         inferior_thread.
5507         (breakpoint_kind): Adjust.
5508         (remove_breakpoints_pid): Rename to ...
5509         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5510         pointer.  All callers adjusted.
5511         (bpstat_clear_actions): Use inferior_thread.
5512         (get_bpstat_thread): New.
5513         (bpstat_do_actions): Use it.
5514         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5515         to take a thread_info pointer.  All callers adjusted.
5516         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5517         (breakpoint_re_set_thread): Use inferior_thread.
5518         * breakpoint.h (struct inferior): Forward declare.
5519         (bpstat_stop_status): Update.
5520         (remove_breakpoints_pid): Delete.
5521         (remove_breakpoints_inf): New.
5522         * bsd-uthread.c (bsd_uthread_target::wait)
5523         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5524         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5525         (maint_btrace_packet_history_cmd)
5526         (maint_btrace_clear_packet_history_cmd): Adjust.
5527         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5528         inferior_thread.
5529         * cli/cli-interp.c: Include "inferior.h".
5530         * common/refcounted-object.h (struct
5531         refcounted_object_ref_policy): New.
5532         * compile/compile-object-load.c: Include gdbthread.h.
5533         (store_regs): Use inferior_thread.
5534         * corelow.c (core_target::close): Use current_inferior.
5535         (core_target_open): Adjust to use first_thread_of_inferior and use
5536         the current inferior.
5537         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5538         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5539         <thread>: ... this new field.  All references adjusted.
5540         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5541         Take a thread_info pointer instead of a ptid_t.
5542         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5543         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5544         thread_info pointer instead of a ptid_t.
5545         * elfread.c: Include "inferior.h".
5546         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5547         Use inferior_thread.
5548         * eval.c (evaluate_subexp): Likewise.
5549         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5550         inferior_thread.
5551         * gdb_proc_service.h (struct thread_info): Forward declare.
5552         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5553         <thread>: ... this new field.  All references adjusted.
5554         * gdbarch.h, gdbarch.c: Regenerate.
5555         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5556         'thread' parameter.  All implementations and callers adjusted.
5557         * gdbthread.h (thread_info) <set_running>: New method.
5558         (delete_thread, delete_thread_silent): Take a thread_info pointer
5559         instead of a ptid.
5560         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5561         (first_thread_of_process): Delete, replaced by ...
5562         (first_thread_of_inferior): ... this new function.  All callers
5563         adjusted.
5564         (any_live_thread_of_process): Delete, replaced by ...
5565         (any_live_thread_of_inferior): ... this new function.  All callers
5566         adjusted.
5567         (switch_to_thread, switch_to_no_thread): Declare.
5568         (is_executing): Delete.
5569         (enable_thread_stack_temporaries): Update comment.
5570         <enable_thread_stack_temporaries>: Take a thread_info pointer
5571         instead of a ptid_t.  Incref the thread.
5572         <~enable_thread_stack_temporaries>: Decref the thread.
5573         <m_ptid>: Delete
5574         <m_thr>: New.
5575         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5576         (get_last_thread_stack_temporary)
5577         (value_in_thread_stack_temporaries, can_access_registers_thread):
5578         Take a thread_info pointer instead of a ptid_t.  All callers
5579         adjusted.
5580         * infcall.c (get_call_return_value): Use inferior_thread.
5581         (run_inferior_call): Work with thread pointers instead of ptid_t.
5582         (call_function_by_hand_dummy): Work with thread pointers instead
5583         of ptid_t.  Use thread_info_ref.
5584         * infcmd.c (proceed_thread_callback): Access thread's state
5585         directly.
5586         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5587         access thread's state directly.
5588         (continue_command): Use inferior_thread.
5589         (info_program_command): Use find_thread_ptid and access thread
5590         state directly.
5591         (proceed_after_attach_callback): Use thread state directly.
5592         (notice_new_inferior): Take a thread_info pointer instead of a
5593         ptid_t.  All callers adjusted.
5594         (exit_inferior): Take an inferior pointer instead of a pid.  All
5595         callers adjusted.
5596         (exit_inferior_silent): New.
5597         (detach_inferior): Delete.
5598         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5599         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5600         (detach_inferior_command, kill_inferior_command): Use
5601         find_inferior_id instead of valid_gdb_inferior_id and
5602         gdb_inferior_id_to_pid.
5603         (inferior_command): Use inferior and thread pointers.
5604         * inferior.h (struct thread_info): Forward declare.
5605         (notice_new_inferior): Take a thread_info pointer instead of a
5606         ptid_t.  All callers adjusted.
5607         (detach_inferior): Delete declaration.
5608         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5609         instead of a pid.  All callers adjusted.
5610         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5611         (valid_gdb_inferior_id): Delete.
5612         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5613         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5614         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5615         ...
5616         <inf>: ... this new field.
5617         <step_ptid>: Delete, replaced by ...
5618         <step_thread>: ... this new field.
5619         (get_displaced_stepping_state): Take an inferior pointer instead
5620         of a pid.  All callers adjusted.
5621         (displaced_step_in_progress_any_inferior): Adjust.
5622         (displaced_step_in_progress_thread): Take a thread pointer instead
5623         of a ptid_t.  All callers adjusted.
5624         (displaced_step_in_progress, add_displaced_stepping_state): Take
5625         an inferior pointer instead of a pid.  All callers adjusted.
5626         (get_displaced_step_closure_by_addr): Adjust.
5627         (remove_displaced_stepping_state): Take an inferior pointer
5628         instead of a pid.  All callers adjusted.
5629         (displaced_step_prepare_throw, displaced_step_prepare)
5630         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5631         All callers adjusted.
5632         (start_step_over): Adjust.
5633         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5634         displaced step queue.
5635         (do_target_resume): Adjust.
5636         (fetch_inferior_event): Use inferior_thread.
5637         (context_switch, get_inferior_stop_soon): Take an
5638         execution_control_state pointer instead of a ptid_t.  All callers
5639         adjusted.
5640         (switch_to_thread_cleanup): Delete.
5641         (stop_all_threads): Use scoped_restore_current_thread.
5642         * inline-frame.c: Include "gdbthread.h".
5643         (inline_state) <inline_state>: Take a thread pointer instead of a
5644         ptid_t.  All callers adjusted.
5645         <ptid>: Delete, replaced by ...
5646         <thread>: ... this new field.
5647         (find_inline_frame_state): Take a thread pointer instead of a
5648         ptid_t.  All callers adjusted.
5649         (skip_inline_frames, step_into_inline_frame)
5650         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5651         pointer instead of a ptid_t.  All callers adjusted.
5652         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5653         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5654         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5655         pointers directly.
5656         * linux-nat.c (get_detach_signal): Likewise.
5657         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5658         (thread_db_notice_clone): Adjust.
5659         (thread_db_find_new_threads_silently)
5660         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5661         a thread pointer instead of a ptid_t.  All callers adjusted.
5662         * mi/mi-cmd-var.c: Include "inferior.h".
5663         (mi_cmd_var_update_iter): Update to use thread pointers.
5664         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5665         inferior directly.
5666         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5667         out to ...
5668         (mi_output_running): ... this new function.
5669         (mi_on_resume_1): Adjust to use it.
5670         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5671         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5672         directly.
5673         (interrupt_thread_callback): : Adjust to use thread and inferior
5674         pointers.
5675         * proc-service.c: Include "gdbthread.h".
5676         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5677         * progspace-and-thread.c: Include "inferior.h".
5678         * progspace.c: Include "inferior.h".
5679         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5680         hold a reference to an inferior_object.
5681         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5682         inferior_thread.
5683         * python/py-inferior.c (struct inferior_object): Give the type a
5684         tag name instead of a typedef.
5685         (python_on_normal_stop): No need to check if the current thread is
5686         listed.
5687         (inferior_to_inferior_object): Change return type to
5688         inferior_object.  All callers adjusted.
5689         (find_thread_object): Delete, bits factored out to ...
5690         (thread_to_thread_object): ... this new function.
5691         * python/py-infthread.c (create_thread_object): Use
5692         inferior_to_inferior_object.
5693         (thpy_is_stopped): Use thread pointer directly.
5694         (gdbpy_selected_thread): Use inferior_thread.
5695         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5696         field, replaced with ...
5697         <thread>: ... this new field.  All users adjusted.
5698         (btpy_insn_or_gap_new): Drop const.
5699         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5700         callers adjusted.
5701         * python/py-record.c: Include "gdbthread.h".
5702         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5703         a ptid_t.  All callers adjusted.
5704         (gdbpy_current_recording): Use inferior_thread.
5705         * python/py-record.h (recpy_record_object) <ptid>: Delete
5706         field, replaced with ...
5707         <thread>: ... this new field.  All users adjusted.
5708         (recpy_element_object) <ptid>: Delete
5709         field, replaced with ...
5710         <thread>: ... this new field.  All users adjusted.
5711         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5712         a ptid_t.  All callers adjusted.
5713         * python/py-threadevent.c: Include "gdbthread.h".
5714         (get_event_thread): Use thread_to_thread_object.
5715         * python/python-internal.h (struct inferior_object): Forward
5716         declare.
5717         (find_thread_object, find_inferior_object): Delete declarations.
5718         (thread_to_thread_object, inferior_to_inferior_object): New
5719         declarations.
5720         * record-btrace.c: Include "inferior.h".
5721         (require_btrace_thread): Use inferior_thread.
5722         (record_btrace_frame_sniffer)
5723         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5724         (get_thread_current_frame): Use scoped_restore_current_thread and
5725         switch_to_thread.
5726         (get_thread_current_frame): Use thread pointer directly.
5727         (record_btrace_replay_at_breakpoint): Use thread's inferior
5728         pointer directly.
5729         * record-full.c: Include "inferior.h".
5730         * regcache.c: Include "gdbthread.h".
5731         (get_thread_arch_regcache): Use the inferior's address space
5732         directly.
5733         (get_thread_regcache, registers_changed_thread): New.
5734         * regcache.h (get_thread_regcache(thread_info *thread)): New
5735         overload.
5736         (registers_changed_thread): New.
5737         (remote_target) <remote_detach_1>: Swap order of parameters.
5738         (remote_add_thread): <remote_add_thread>: Return the new thread.
5739         (get_remote_thread_info(ptid_t)): New overload.
5740         (remote_target::remote_notice_new_inferior): Use thread pointers
5741         directly.
5742         (remote_target::process_initial_stop_replies): Use
5743         thread_info::set_running.
5744         (remote_target::remote_detach_1, remote_target::detach)
5745         (extended_remote_target::detach): Adjust.
5746         * stack.c (frame_show_address): Use inferior_thread.
5747         * target-debug.h (target_debug_print_thread_info_pp): New.
5748         * target-delegates.c: Regenerate.
5749         * target.c (default_thread_address_space): Delete.
5750         (memory_xfer_partial_1): Use current_inferior.
5751         (target_detach): Use current_inferior.
5752         (target_thread_address_space): Delete.
5753         (generic_mourn_inferior): Use current_inferior.
5754         * target.h (struct target_ops) <thread_address_space>: Delete.
5755         (target_thread_address_space): Delete.
5756         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5757         pointers directly.
5758         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5759         thread pointer instead of a ptid_t.  Adjust all callers.
5760         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5761         (first_thread_of_process): Delete, replaced by ...
5762         (first_thread_of_inferior): ... this new function.  All callers
5763         adjusted.
5764         (any_thread_of_process): Rename to ...
5765         (any_thread_of_inferior): ... this, and take an inferior pointer.
5766         (any_live_thread_of_process): Rename to ...
5767         (any_live_thread_of_inferior): ... this, and take an inferior
5768         pointer.
5769         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5770         (value_in_thread_stack_temporaries)
5771         (get_last_thread_stack_temporary): Take a thread pointer instead
5772         of a ptid_t.  Adjust all callers.
5773         (thread_info::set_running): New.
5774         (validate_registers_access): Use inferior_thread.
5775         (can_access_registers_ptid): Rename to ...
5776         (can_access_registers_thread): ... this, and take a thread
5777         pointer.
5778         (print_thread_info_1): Adjust to compare thread pointers instead
5779         of ptids.
5780         (switch_to_no_thread, switch_to_thread): Make extern.
5781         (scoped_restore_current_thread::~scoped_restore_current_thread):
5782         Use m_thread pointer directly.
5783         (scoped_restore_current_thread::scoped_restore_current_thread):
5784         Use inferior_thread.
5785         (thread_command): Use thread pointer directly.
5786         (thread_num_make_value_helper): Use inferior_thread.
5787         * top.c (execute_command): Use inferior_thread.
5788         * tui/tui-interp.c: Include "inferior.h".
5789         * varobj.c (varobj_create): Use inferior_thread.
5790         (value_of_root_1): Use find_thread_global_id instead of
5791         global_thread_id_to_ptid.
5792
5793 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5794
5795         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5796         possible.
5797         (regcache::write_part): Likewise.
5798         (readable_regcache::cooked_read_part): Update comment.
5799         (readable_regcache::cooked_write_part): Likewise.
5800         * regcache.h: (readable_regcache::read_part): Likewise.
5801         (regcache::write_part): Likewise.
5802
5803 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5804             Dirk Schubert  <dirk.schubert@arm.com>
5805
5806         * aarch64-linux-nat.c (post_attach): New.
5807         (aarch64_linux_nat_target::post_attach): Override post_attach to
5808         record the number of hardware debug registers.
5809
5810 2018-06-20  Tom Tromey  <tom@tromey.com>
5811
5812         * python/py-param.c (add_setshow_generic): Make parameters const.
5813         (parmpy_init): Update.
5814
5815 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5816
5817         * regcache.h (regcache_cooked_read_ftype): Rename to...
5818         (register_read_ftype): ...this, change type to function_view.
5819         (class reg_buffer) <save>: Remove src parameter.
5820         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5821         parameter non-const in first overload.  Remove src parameter in
5822         second overload.
5823         * regcache.c (do_cooked_read): Remove.
5824         (readonly_detached_regcache::readonly_detached_regcache): Make
5825         parameter non-const, adjust call to other constructor.
5826         (reg_buffer::save): Remove src parameter.
5827         * frame.c (do_frame_register_read): Remove.
5828         (frame_save_as_regcache): Use lambda function.
5829         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5830         parameter to ppu2spu_data *.
5831         (ppu2spu_sniffer): Use lambda function.
5832
5833 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5834
5835         * record-full.c (record_full_target::insert_breakpoint): Remove
5836         "struct" keyword, add const.
5837
5838 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5839
5840         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5841         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5842         * configure.ac: Remove AC_PREREQ, add missing quoting.
5843         * gnulib/configure.ac: Modernize usage of
5844         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5845         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5846         (AUTOMAKE_VERSION): Bump to 1.15.1.
5847         * configure: Re-generate.
5848         * config.in: Re-generate.
5849         * aclocal.m4: Re-generate.
5850         * gnulib/aclocal.m4: Re-generate.
5851         * gnulib/config.in: Re-generate.
5852         * gnulib/configure: Re-generate.
5853         * gnulib/import/Makefile.in: Re-generate.
5854
5855 2018-06-19  Pedro Alves  <palves@redhat.com>
5856
5857         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5858         (lookup_minimal_symbol_by_pc_section): ... here with
5859         gdb_assert_not_reached added.
5860
5861 2018-06-19  Pedro Alves  <palves@redhat.com>
5862
5863         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5864         parameter with a block parameter.  Compare location's block symbol
5865         with the frame's block instead of addresses.
5866         (skip_inline_frames): Pass the current block instead of the
5867         frame's address.  Break out as soon as we determine the frame
5868         should not be skipped.
5869
5870 2018-06-18  Tom Tromey  <tom@tromey.com>
5871
5872         * solib-aix.c (solib_aix_get_section_offsets): Return
5873         unique_xmalloc_ptr.
5874         (solib_aix_solib_create_inferior_hook): Update.
5875
5876 2018-06-18  Tom Tromey  <tom@tromey.com>
5877
5878         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5879
5880 2018-06-18  Tom Tromey  <tom@tromey.com>
5881
5882         * solib-frv.c (frv_relocate_main_executable): Use
5883         unique_xmalloc_ptr.
5884         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5885         unique_xmalloc_ptr.
5886
5887 2018-06-18  Tom Tromey  <tom@tromey.com>
5888
5889         * objfiles.h (inhibit_section_map_updates): Update.
5890         (resume_section_map_updates, resume_section_map_updates_cleanup):
5891         Remove.
5892         * solib-svr4.c (svr4_handle_solib_event): Update.
5893         * objfiles.c (inhibit_section_map_updates): Return
5894         scoped_restore_tmpl<int>.
5895         (resume_section_map_updates, resume_section_map_updates_cleanup):
5896         Remove.
5897
5898 2018-06-18  Tom Tromey  <tom@tromey.com>
5899
5900         * valprint.h (read_string): Update.
5901         * valprint.c (read_string): Change type of "buffer".
5902         (val_print_string): Update.
5903         * python/py-value.c (valpy_string): Update.
5904         * language.h (struct language_defn) <la_get_string>: Change
5905         type of "buffer".
5906         (default_get_string, c_get_string): Update.
5907         * language.c (default_get_string): Change type of "buffer".
5908         * guile/scm-value.c (gdbscm_value_to_string): Update.
5909         * c-lang.c (c_get_string): Change type of "buffer".
5910
5911 2018-06-18  Tom Tromey  <tom@tromey.com>
5912
5913         * ser-mingw.c (struct pipe_state_destroyer): New.
5914         (pipe_state_up): New typedef.
5915         (cleanup_pipe_state): Remove.
5916         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5917
5918 2018-06-18  Tom Tromey  <tom@tromey.com>
5919
5920         * rust-lang.h (rust_yyerror): Don't declare.
5921         * rust-lang.c (rust_language_defn): Update.
5922         * rust-exp.y (yyerror): Now static.
5923         * parse.c (parse_exp_in_context_1): Update.
5924         * p-lang.h (p_yyerror): Don't declare.
5925         * p-lang.c (p_language_defn): Update.
5926         * p-exp.y (yyerror): Now static.
5927         * opencl-lang.c (opencl_language_defn): Update.
5928         * objc-lang.c (objc_language_defn): Update.
5929         * m2-lang.h (m2_yyerror): Don't declare.
5930         * m2-lang.c (m2_language_defn): Update.
5931         * m2-exp.y (yyerror): Now static.
5932         * language.h (struct language_defn) <la_error>: Remove.
5933         * language.c (unk_lang_error): Remove.
5934         (unknown_language_defn, auto_language_defn): Remove.
5935         * go-lang.h (go_yyerror): Don't declare.
5936         * go-lang.c (go_language_defn): Update.
5937         * go-exp.y (yyerror): Now static.
5938         * f-lang.h (f_yyerror): Don't declare.
5939         * f-lang.c (f_language_defn): Update.
5940         * f-exp.y (yyerror): Now static.
5941         * d-lang.h (d_yyerror): Don't declare.
5942         * d-lang.c (d_language_defn): Update.
5943         * d-exp.y (yyerror): Now static.
5944         * c-lang.h (c_yyerror): Don't declare.
5945         * c-lang.c (c_language_defn, cplus_language_defn)
5946         (asm_language_defn, minimal_language_defn): Update.
5947         * c-exp.y (yyerror): Now static.
5948         * ada-lang.h (ada_yyerror): Don't declare.
5949         * ada-lang.c (ada_language_defn): Update.
5950         * ada-exp.y (yyerror): Now static.
5951
5952 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5953
5954         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5955         (store_sveregs_to_thread): Likewise.
5956         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5957         (aarch64_linux_store_inferior_registers): Likewise.
5958         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5959         function.
5960         (aarch64_sve_regs_copy_to_regcache): Likewise.
5961         (aarch64_sve_regs_copy_from_regcache): Likewise.
5962         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5963         declaration.
5964         (aarch64_sve_regs_copy_to_regcache): Likewise.
5965         (aarch64_sve_regs_copy_from_regcache): Likewise.
5966         (sve_context): Structure from Linux headers.
5967         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5968         (SVE_SIG_ZREG_SIZE): Likewise.
5969         (SVE_SIG_PREG_SIZE): Likewise.
5970         (SVE_SIG_FFR_SIZE): Likewise.
5971         (SVE_SIG_REGS_OFFSET): Likewise.
5972         (SVE_SIG_ZREGS_OFFSET): Likewise.
5973         (SVE_SIG_ZREG_OFFSET): Likewise.
5974         (SVE_SIG_ZREGS_SIZE): Likewise.
5975         (SVE_SIG_PREGS_OFFSET): Likewise.
5976         (SVE_SIG_PREG_OFFSET): Likewise.
5977         (SVE_SIG_PREGS_SIZE): Likewise.
5978         (SVE_SIG_FFR_OFFSET): Likewise.
5979         (SVE_SIG_REGS_SIZE): Likewise.
5980         (SVE_SIG_CONTEXT_SIZE): Likewise.
5981         (SVE_PT_REGS_MASK): Likewise.
5982         (SVE_PT_REGS_FPSIMD): Likewise.
5983         (SVE_PT_REGS_SVE): Likewise.
5984         (SVE_PT_VL_INHERIT): Likewise.
5985         (SVE_PT_VL_ONEXEC): Likewise.
5986         (SVE_PT_REGS_OFFSET): Likewise.
5987         (SVE_PT_FPSIMD_OFFSET): Likewise.
5988         (SVE_PT_FPSIMD_SIZE): Likewise.
5989         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5990         (SVE_PT_SVE_PREG_SIZE): Likewise.
5991         (SVE_PT_SVE_FFR_SIZE): Likewise.
5992         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5993         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5994         (__SVE_SIG_TO_PT): Likewise.
5995         (SVE_PT_SVE_OFFSET): Likewise.
5996         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5997         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5998         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5999         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6000         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6001         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6002         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6003         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6004         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6005         (SVE_PT_SVE_SIZE): Likewise.
6006         (SVE_PT_SIZE): Likewise.
6007         (HAS_SVE_STATE): New define.
6008
6009 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6010
6011         * nat/aarch64-sve-linux-sigcontext.h: New file.
6012         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6013         new files.
6014         (SVE_VQ_MIN): Likewise.
6015         (SVE_VQ_MAX): Likewise.
6016         (SVE_VL_MIN): Likewise.
6017         (SVE_VL_MAX): Likewise.
6018         (SVE_NUM_ZREGS): Likewise.
6019         (SVE_NUM_PREGS): Likewise.
6020         (sve_vl_valid): Likewise.
6021         (struct user_sve_header): Likewise.
6022
6023 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6024             Richard Bunt <Richard.Bunt@arm.com>
6025
6026         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6027         was requested by GDB.
6028
6029 2018-06-15  Tom de Vries  <tdevries@suse.de>
6030
6031         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6032
6033 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6034
6035         * gnulib/update-gnulib.sh: Print expected versions of
6036         autoconf/aclocal.
6037
6038 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6039
6040         * arch-utils.c (default_type_align): Use type_length_units.
6041         * gdbtypes.c (type_align): Use type_length_units.
6042
6043 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6044
6045         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6046         of 'define' command.
6047
6048 2018-06-14  Tom de Vries  <tdevries@suse.de>
6049
6050         PR cli/22573
6051         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6052         get_no_prettyformat_print_options.
6053
6054 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6055
6056         * sparc-nat.h: Include target.h.
6057         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6058         <fetch_registers>: Remove this argument in function call.
6059         <store_registers>: Remove this argument in function call, remove
6060         extra semicolon.
6061         <low_forget_process>: Call sparc64_forget_process instead of
6062         sparc_forget_process.
6063
6064 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6065
6066         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6067         (procfs_target::make_corefile_notes): Adjust to new
6068         target_read_alloc return type.
6069
6070 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6071             Stephen Roberts  <stephen.roberts@arm.com>
6072
6073         PR gdb/22882
6074         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6075         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6076         Move should_notify_stop local into more inner scope.
6077
6078 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6079             Stephen Roberts  <stephen.roberts@arm.com>
6080
6081         PR gdb/22882
6082         * infrun.c (resume_1): Add call to mark_async_event_handler.
6083
6084 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6085
6086         * infrun.c (do_target_wait): Change old version of $pc printed.
6087
6088 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6089
6090         * dwarf2read.c (read_index_from_section): Rename to...
6091         (read_gdb_index_from_section): ... this, update all callers.
6092         (dwarf2_read_index): Rename to...
6093         (dwarf2_read_gdb_index): ... this, update all callers.
6094
6095 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6096
6097         * gdb/hppa-linux-nat.c
6098         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6099         hppa_linux_nat_target::fetch_registers.
6100
6101 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6102
6103         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6104         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6105         (AARCH64_DWARF_SVE_FFR): Likewise.
6106         (AARCH64_DWARF_SVE_P0): Likewise.
6107         (AARCH64_DWARF_SVE_Z0): Likewise.
6108
6109 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6110
6111         * common/common-regcache.h (raw_compare): New function.
6112         * regcache.c (regcache::raw_compare): Likewise.
6113         * regcache.h (regcache::raw_compare): New declaration.
6114
6115 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6116
6117         * common/common-regcache.h (reg_buffer_common): New structure.
6118         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6119         (reg_buffer::raw_supply): Likewise.
6120         (reg_buffer::raw_supply_integer): Likewise.
6121         (reg_buffer::raw_supply_zeroed): Likewise.
6122         (reg_buffer::raw_collect): Likewise.
6123         (reg_buffer::raw_collect_integer): Likewise.
6124         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6125         (reg_buffer::raw_supply): Likewise.
6126         (reg_buffer::raw_supply_integer): Likewise.
6127         (reg_buffer::raw_supply_zeroed): Likewise.
6128         (reg_buffer::raw_collect): Likewise.
6129         (reg_buffer::raw_collect_integer): Likewise.
6130
6131 2018-06-10  Tom Tromey  <tom@tromey.com>
6132
6133         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6134         (class remote_state) <stop_reply_queue>: Now std::vector.
6135         (remote_state::~remote_state)
6136         (remote_target::stop_reply_queue_length): Update.
6137         (struct queue_iter_param, remove_child_of_pending_fork)
6138         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6139         (check_pending_event_prevents_wildcard_vcont_callback)
6140         (remove_stop_reply_for_inferior)
6141         (remove_stop_reply_of_remote_state)
6142         (remote_notif_remove_once_on_match)
6143         (stop_reply_match_ptid_and_ws)
6144         (remote_kill_child_of_pending_fork): Remove.
6145         (remote_target::remove_new_fork_children)
6146         (remote_target::check_pending_events_prevent_wildcard_vcont)
6147         (remote_target::discard_pending_stop_replies)
6148         (remote_target::discard_pending_stop_replies_in_queue)
6149         (remote_target::remote_notif_remove_queued_reply)
6150         (remote_target::queued_stop_reply)
6151         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6152         (remote_target::wait, remote_target::kill_new_fork_children)
6153         (remote_target::async): Update.
6154
6155 2018-06-10  Tom Tromey  <tom@tromey.com>
6156
6157         * record-full.c (record_full_arch_list_cleanups): Remove.
6158         (record_full_message): Use try/catch.
6159         (record_full_wait_cleanups): Remove.
6160         (record_full_wait_1): Use try/catch.
6161         (record_full_restore): Likewise.
6162
6163 2018-06-10  Tom Tromey  <tom@tromey.com>
6164
6165         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6166         declare VEC.  Add constructor.
6167         <in_target_beneath>: Now bool.
6168         (record_full_breakpoints): Now a std::vector, static.
6169         (record_full_sync_record_breakpoints)
6170         (record_full_init_record_breakpoints)
6171         (record_full_target::insert_breakpoint)
6172         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6173
6174 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6175
6176         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6177         * serial.c (serial_interface_lookup): Remove struct keyword.
6178
6179 2018-06-10  Tom Tromey  <tom@tromey.com>
6180
6181         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6182         method.
6183         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6184         a method.
6185         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6186         method.
6187         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6188         "beneath" as a method.
6189         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6190         Use "beneath" as a method.
6191
6192 2018-06-10  Tom Tromey  <tom@tromey.com>
6193
6194         * tracefile.c (struct trace_file_writer_deleter): New.
6195         <operator()>: Rename from trace_file_writer_xfree.
6196         (trace_file_writer_up): New typedef.
6197         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6198
6199 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6200
6201         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6202         <m_registers, m_register_status>: Change type to
6203         std::unique_ptr.
6204         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6205         XCNEWVEC.
6206
6207 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6208
6209         * common/common-regcache.h (enum register_status): Add
6210         underlying type "signed char".
6211         * regcache.h (reg_buffer) <m_register_status>: Change type to
6212         register_status *.
6213         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6214         register_status instead of signed char.
6215         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6216         (reg_buffer::get_register_status): Remove cast.
6217         (readable_regcache::raw_read): Remove cast.
6218         (readable_regcache::cooked_read): Remove cast.
6219
6220 2018-06-09  Tom Tromey  <tom@tromey.com>
6221
6222         * source.c (reverse_search_command, forward_search_command): Use
6223         scoped_fd.
6224
6225 2018-06-09  Tom Tromey  <tom@tromey.com>
6226
6227         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6228         (serial_ops_list): Now static, std::vector.
6229         (serial_interface_lookup, serial_add_interface): Update.
6230
6231 2018-06-09  Tom Tromey  <tom@tromey.com>
6232
6233         * dwarf2read.c (process_cu_includes): Update.
6234         (process_full_comp_unit): Update.
6235         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6236         std::vector.
6237
6238 2018-06-08  Paul Koning  <paul_koning@dell.com>
6239
6240         PR gdb/23252
6241
6242         * python/python.c (do_start_initialization):
6243         Avoid call to internal Python API.
6244         (init__gdb_module): New function.
6245
6246 2018-06-08  Gary Benson <gbenson@redhat.com>
6247
6248         * linux-thread-db.c (valprint.h): New include.
6249         (struct check_thread_db_info): New structure.
6250         (check_thread_db_on_load, tdb_testinfo): New static globals.
6251         (check_thread_db, check_thread_db_callback): New functions.
6252         (try_thread_db_load_1): Run integrity checks if requested.
6253         (maintenance_check_libthread_db): New function.
6254         (_initialize_thread_db): Register "maint check libthread-db"
6255         and "maint set/show check-libthread-db".
6256         * NEWS: Mention the above new commands.
6257
6258 2018-06-08  Tom Tromey  <tom@tromey.com>
6259
6260         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6261         now a method.
6262
6263 2018-06-08  Tom Tromey  <tom@tromey.com>
6264
6265         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6266
6267 2018-06-08  Tom Tromey  <tom@tromey.com>
6268
6269         * common/btrace-common.h (struct btrace_data): Add constructor,
6270         destructor, move assignment operator.
6271         <empty, clear, fini>: New methods.
6272         <format>: Initialize.
6273         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6274         (btrace_data_empty): Don't declare.
6275         * common/btrace-common.c (btrace_data_init): Remove.
6276         (btrace_data::fini): Rename from btrace_data_fini.
6277         (btrace_data::empty): Rename from btrace_data_empty.
6278         (btrace_data::clear): Rename from btrace_data_clear.  Return
6279         bool.
6280         * btrace.h (make_cleanup_btrace_data): Don't declare.
6281         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6282         (parse_xml_btrace): Update.
6283         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6284         (maint_btrace_clear_packet_history_cmd): Update.
6285
6286 2018-06-07  Pedro Alves  <palves@redhat.com>
6287
6288         * target.h (target_ops) <beneath>: Now a method.  All references
6289         updated.
6290         (class target_stack): New.
6291         * target.c (g_target_stack): New.
6292         (g_current_top_target): Delete.
6293         (current_top_target): Get the top target out of g_target_stack.
6294         (target_stack::push, target_stack::unpush): New.
6295         (push_target, unpush_target): Reimplement.
6296         (target_is_pushed): Reimplement in terms of g_target_stack.
6297         (target_ops::beneath, target_stack::find_beneath): New.
6298
6299 2018-06-07  Pedro Alves  <palves@redhat.com>
6300
6301         * target.h (find_target_beneath): Delete declaration.
6302         * target.c (find_target_beneath): Delete definition.
6303         * aix-thread.c: All callers of find_target_beneath adjusted to
6304         call target_ops::beneath instead.
6305         * bsd-uthread.c: Likewise.
6306         * linux-thread-db.c: Likewise.
6307         * ravenscar-thread.c: Likewise.
6308         * sol-thread.c: Likewise.
6309         * spu-multiarch.c: Likewise.
6310
6311 2018-06-07  Pedro Alves  <palves@redhat.com>
6312
6313         * target.h (target_ops) <beneath>: Now a method.  All references
6314         updated.
6315         (target_ops) <m_beneath>: New.
6316         * target.c (target_ops::beneath): New.
6317         * corelow.c: Adjust all references to target_ops::beneath.
6318         * linux-thread-db.c: Likewise.
6319         * make-target-delegates: Likewise.
6320         * record-btrace.c: Likewise.
6321         * record-full.c: Likewise.
6322         * remote.c: Likewise.
6323         * target.c: Likewise.
6324         * target-delegates.c: Regenerate.
6325
6326 2018-06-07  Pedro Alves  <palves@redhat.com>
6327
6328         * target.h (target_stack): Delete.
6329         (current_top_target): Declare function.
6330         * target.c (target_stack): Delete.
6331         (g_current_top_target): New.
6332         (current_top_target): New function.
6333         * auxv.c: Use current_top_target instead of target_stack
6334         throughout.
6335         * avr-tdep.c: Likewise.
6336         * breakpoint.c: Likewise.
6337         * corefile.c: Likewise.
6338         * elfread.c: Likewise.
6339         * eval.c: Likewise.
6340         * exceptions.c: Likewise.
6341         * frame.c: Likewise.
6342         * gdbarch-selftests.c: Likewise.
6343         * gnu-v3-abi.c: Likewise.
6344         * ia64-tdep.c: Likewise.
6345         * ia64-vms-tdep.c: Likewise.
6346         * infcall.c: Likewise.
6347         * infcmd.c: Likewise.
6348         * infrun.c: Likewise.
6349         * linespec.c: Likewise.
6350         * linux-tdep.c: Likewise.
6351         * minsyms.c: Likewise.
6352         * ppc-linux-nat.c: Likewise.
6353         * ppc-linux-tdep.c: Likewise.
6354         * procfs.c: Likewise.
6355         * regcache.c: Likewise.
6356         * remote.c: Likewise.
6357         * rs6000-tdep.c: Likewise.
6358         * s390-linux-nat.c: Likewise.
6359         * s390-tdep.c: Likewise.
6360         * solib-aix.c: Likewise.
6361         * solib-darwin.c: Likewise.
6362         * solib-dsbt.c: Likewise.
6363         * solib-spu.c: Likewise.
6364         * solib-svr4.c: Likewise.
6365         * solib-target.c: Likewise.
6366         * sparc-tdep.c: Likewise.
6367         * sparc64-tdep.c: Likewise.
6368         * spu-tdep.c: Likewise.
6369         * symfile.c: Likewise.
6370         * symtab.c: Likewise.
6371         * target-descriptions.c: Likewise.
6372         * target-memory.c: Likewise.
6373         * target.c: Likewise.
6374         * target.h: Likewise.
6375         * tracefile-tfile.c: Likewise.
6376         * tracepoint.c: Likewise.
6377         * valops.c: Likewise.
6378         * valprint.c: Likewise.
6379         * value.c: Likewise.
6380         * windows-tdep.c: Likewise.
6381         * mi/mi-main.c: Likewise.
6382
6383 2018-06-07  Tom Tromey  <tom@tromey.com>
6384
6385         * valprint.h (build_address_symbolic): Declare.
6386         * printcmd.c (print_address_symbolic): Update.
6387         (build_address_symbolic): Change "name" and "filename" to
6388         std::string.
6389         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6390         Update.
6391         * defs.h (build_address_symbolic): Remove declaration.
6392
6393 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6394
6395         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6396         (aarch64_vnv_type): Add function.
6397         (aarch64_pseudo_register_name): Add V regs for SVE.
6398         (aarch64_pseudo_register_type): Likewise.
6399         (aarch64_pseudo_register_reggroup_p): Likewise.
6400         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6401         (aarch64_pseudo_read_value): Add V regs for SVE.
6402         (aarch64_pseudo_write_2): Use V0 offset for SVE
6403         (aarch64_pseudo_write): Add V regs for SVE.
6404         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6405
6406 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6407
6408         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6409         (sve_vl_from_vq): Likewise.
6410
6411 2018-06-05  Tom Tromey  <tom@tromey.com>
6412
6413         * cli/cli-cmds.c (show_version): Update.
6414         * top.c (print_gdb_version): Add "interactive" parameter.
6415         Update.
6416         * main.c (captured_main_1): Update.
6417         * top.h (print_gdb_version): Add "interactive" parameter and a
6418         comment.
6419
6420 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6421
6422         * common/enum-flags.h: Add trailing semicolon to example in
6423         comment.
6424
6425 2018-06-05  Tom Tromey  <tom@tromey.com>
6426
6427         PR cli/12326:
6428         * NEWS: Add entry about pager.
6429         * utils.c (pagination_disabled_for_command): New global.
6430         (prompt_for_continue): Allow "c" response to prompt.
6431         (reinitialize_more_filter): Clear
6432         pagination_disabled_for_command.
6433         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6434
6435 2018-06-04  Tom Tromey  <tom@tromey.com>
6436
6437         * ada-lang.h (ada_lookup_symbol_list): Update.
6438         * ada-lang.c (resolve_subexp): Update.
6439         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6440         parameter.
6441         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6442         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6443         results parameter to std::vector.
6444         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6445         Update.
6446         * ada-exp.y (block_lookup): Update.
6447         (select_possible_type_sym): Change type of syms.  Remove nsyms
6448         parameter.
6449         (write_var_or_type, write_name_assoc): Update.
6450
6451 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6452
6453         * windows-nat.c (windows_nat_target::xfer_partial): Return
6454         TARGET_XFER_E_IO if we need to delegate to the target beneath
6455         but BENEATH is NULL.
6456
6457 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6458
6459         * Makefile.in (config.status): Add configure.nat as a
6460         dependency.
6461
6462 2018-06-04  Tom Tromey  <tom@tromey.com>
6463
6464         * cp-name-parser.y (cpname_state): Add method declarations.
6465         (HANDLE_QUAL): Update.
6466         (cpname_state::d_grab, cpname_state::fill_comp)
6467         (cpname_state::make_operator, cpname_state::make_dtor)
6468         (cpname_state::make_builtin_type, cpname_state::make_name)
6469         (cpname_state::d_qualify, cpname_state::d_int_type)
6470         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6471         (%union): Move earlier.
6472
6473 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6474
6475         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6476
6477 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6478
6479         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6480         (aarch64_pseudo_write_1): Likewise.
6481         (aarch64_pseudo_read_value): Use helper.
6482         (aarch64_pseudo_write): Likewise.
6483
6484 2018-06-04  Pedro Alves  <palves@redhat.com>
6485
6486         * darwin-nat.c (darwin_ops): Delete.
6487         (darwin_attach_pid): Use get_native_target.
6488
6489 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6490
6491         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6492         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6493
6494 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6495
6496         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6497         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6498         (aarch64_gdbarch_init): Check for SVE.
6499         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6500
6501 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6502
6503         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6504         * aarch64-tdep.h (aarch64_read_description): Likewise.
6505         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6506         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6507         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6508         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6509         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6510
6511 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6512
6513         * value.c (value_fetch_lazy_bitfield): New.
6514         (value_fetch_lazy_memory): New.
6515         (value_fetch_lazy_register): New.
6516         (value_fetch_lazy): Factor out to smaller functions.
6517
6518 2018-06-01  Tom Tromey  <tom@tromey.com>
6519
6520         * cp-name-parser.y (backslashable, represented): Now const.
6521
6522 2018-06-01  Tom Tromey  <tom@tromey.com>
6523
6524         * cp-name-parser.y: Include parser-defs.h.
6525         (parser_fprintf): Remove declaration.
6526
6527 2018-06-01  Tom Tromey  <tom@tromey.com>
6528
6529         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6530         %parse-param.
6531         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6532         (global_result): Remove globals.
6533         (struct cpname_state): New.
6534         (yyparse): Don't declare.
6535         (yylex, yyerror): Move declarations after %union.
6536         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6537         (make_name): Add state parameter.
6538         Update all callers.
6539         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6540         parameter.
6541         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6542         Update.
6543         (yylex): Add lvalp, state parameters.
6544         (yyerror): Add state parameter.
6545         (cp_demangled_name_to_comp): Update.
6546
6547 2018-06-01  Tom Tromey  <tom@tromey.com>
6548
6549         * cp-name-parser.y (parser_fprintf): Declare.
6550         (GDB_YY_REMAP_PREFIX): Define.
6551         Include yy-remap.h.  Don't redefine yy* identifiers.
6552
6553 2018-06-01  Tom Tromey  <tom@tromey.com>
6554
6555         * python/py-type.c (typy_legacy_template_argument): Update.
6556         * cp-support.h (cp_demangled_name_to_comp): Update.
6557         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6558         parameter to be a "std::string *".
6559         (main): Update.
6560
6561 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6562
6563         * ada-lex.l: Include "diagnostics.h" instead of
6564         "common/diagnostics.h".
6565         * unittests/environ-selftests.c: Likewise.
6566         * common/diagnostics.h: Moved to ../include.
6567
6568 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6569
6570         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6571         to language_mode_manual while calling breakpoint_re_set_one.
6572
6573 2018-06-01  Tom Tromey  <tom@tromey.com>
6574
6575         * valops.c (value_cast_structs, destructor_name_p): Update.
6576         * symtab.c (gdb_mangle_name): Update.
6577         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6578         Update.
6579         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6580         (pascal_object_print_value_fields, pascal_object_print_value):
6581         Update.
6582         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6583         * linespec.c (find_methods): Update.
6584         * gdbtypes.h (type_name_no_tag): Remove.
6585         (type_name_or_error): Rename from type_name_no_tag_or_error.
6586         * gdbtypes.c (type_name_no_tag): Remove.
6587         (type_name_or_error): Rename from type_name_no_tag_or_error.
6588         (lookup_struct_elt_type, check_typedef): Update.
6589         * expprint.c (print_subexp_standard): Update.
6590         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6591         * d-namespace.c (d_lookup_nested_symbol): Update.
6592         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6593         (cp_print_class_member): Update.
6594         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6595         * completer.c (add_struct_fields): Update.
6596         * c-typeprint.c (cp_type_print_derivation_info)
6597         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6598         Update.
6599         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6600         (ada_prefer_type, ada_is_exception_sym): Update.
6601
6602 2018-06-01  Tom Tromey  <tom@tromey.com>
6603
6604         * valops.c (enum_constant_from_type, value_namespace_elt)
6605         (value_maybe_namespace_elt): Update.
6606         * valarith.c (find_size_for_pointer_math): Update.
6607         * target-descriptions.c (make_gdb_type): Update.
6608         * symmisc.c (print_symbol): Update.
6609         * stabsread.c (define_symbol, read_type)
6610         (complain_about_struct_wipeout, add_undefined_type)
6611         (cleanup_undefined_types_1): Update.
6612         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6613         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6614         (rust_internal_print_type, rust_composite_type)
6615         (rust_evaluate_funcall, rust_evaluate_subexp)
6616         (rust_inclusive_range_type_p): Update.
6617         * python/py-type.c (typy_get_tag): Update.
6618         * p-typeprint.c (pascal_type_print_base): Update.
6619         * mdebugread.c (parse_symbol, parse_type): Update.
6620         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6621         Update.
6622         * guile/scm-type.c (gdbscm_type_tag): Update.
6623         * go-lang.c (sixg_string_p): Update.
6624         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6625         Update.
6626         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6627         (TYPE_TAG_NAME): Remove.
6628         * gdbtypes.c (type_name_no_tag): Simplify.
6629         (check_typedef, check_types_equal, recursive_dump_type)
6630         (copy_type_recursive, arch_composite_type): Update.
6631         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6632         in summary mode when needed.
6633         * eval.c (evaluate_funcall): Update.
6634         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6635         (process_structure_scope, read_enumeration_type)
6636         (read_namespace_type, read_module_type, determine_prefix): Update.
6637         * cp-support.c (inspect_type): Update.
6638         * coffread.c (process_coff_symbol, decode_base_type): Update.
6639         * c-varobj.c (c_is_path_expr_parent): Update.
6640         * c-typeprint.c (c_type_print_base_struct_union): Update.
6641         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6642         summary when using C language.
6643         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6644         (gen_maybe_namespace_elt): Update.
6645         * ada-lang.c (ada_type_name): Simplify.
6646         (empty_record, ada_template_to_fixed_record_type_1)
6647         (template_to_static_fixed_type)
6648         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6649
6650 2018-06-01  Tom Tromey  <tom@tromey.com>
6651
6652         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6653         c_print_type.
6654         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6655         (c_print_type): Update.
6656         (c_print_type): New overload.
6657         (c_type_print_varspec_prefix, c_type_print_args)
6658         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6659         (c_type_print_base_struct_union, c_type_print_base_1)
6660         (cp_type_print_method_args): Add "language" parameter.
6661         (c_type_print_base): Update.
6662         * c-lang.h (c_print_type): Add new overload.
6663
6664 2018-06-01  Tom Tromey  <tom@tromey.com>
6665
6666         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6667         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6668
6669 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6670
6671         * aarch64-tdep.c (aarch64_sve_register_names): New const
6672         var.
6673         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6674         (AARCH64_SVE_Z_REGS_NUM): New define.
6675         (AARCH64_SVE_P_REGS_NUM): Likewise.
6676         (AARCH64_SVE_NUM_REGS): Likewise.
6677
6678 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6679
6680         * nat/linux-ptrace.h [__alpha__]
6681         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6682         definitions.
6683
6684 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6685
6686         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6687         the endianness selected.
6688         * NEWS: Document `set endian auto' mode operation update.
6689
6690 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6691
6692         * Makefile.in: Add new header.
6693         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6694         (sve_vl_from_vg): Likewise.
6695         (sve_vq_from_vl): Likewise.
6696         (sve_vl_from_vq): Likewise.
6697         (sve_vq_from_vg): Likewise.
6698         (sve_vg_from_vq): Likewise.
6699         * configure.nat: Add new c file.
6700         * nat/aarch64-sve-linux-ptrace.c: New file.
6701         * nat/aarch64-sve-linux-ptrace.h: New file.
6702
6703 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6704
6705         * aarch64-linux-nat.c (aarch64_linux_read_description):
6706         Add parmeter zero.
6707         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6708         Likewise.
6709         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6710         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6711         (aarch64_gdbarch_init): Add parmeter zero.
6712         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6713         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6714         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6715         parmeter.
6716         * doc/gdb.texinfo: Describe SVE feature
6717         * features/aarch64-sve.c: New file.
6718
6719 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6720
6721         PR gdb/23210
6722         * gdbarch.sh (significant_addr_bit): Default to zero when
6723         not set by target architecture.
6724         * gdbarch.c: Re-generated.
6725         * utils.c (address_significant): Update.
6726
6727 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6728
6729         * stack.c (func_command): Remove trailing newline in call to error.
6730
6731 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6732
6733         * regcache.h (regcache_raw_collect): Remove, update callers to
6734         use regcache::raw_collect.
6735         * regcache.c (regcache_raw_collect): Remove.
6736
6737 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6738
6739         * regcache.h (regcache_raw_supply): Remove, update callers to
6740         use detached_regcache::raw_supply.
6741         * regcache.c (regcache_raw_supply): Remove.
6742
6743 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6744
6745         * regcache.h (regcache_cooked_write_part): Remove, update
6746         callers to use regcache::cooked_write_part.
6747         * regcache.c (regcache_cooked_write_part): Remove.
6748
6749 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6750
6751         * regcache.h (regcache_cooked_read_part): Remove, update callers
6752         to use readable_regcache::cooked_read_part.
6753         * regcache.c (regcache_cooked_read_part): Remove.
6754
6755 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6756
6757         * regcache.h (regcache_cooked_read_value): Remove, update
6758         callers to use readable_regcache::cooked_read_value.
6759         * regcache.c (regcache_cooked_read_value): Remove.
6760
6761 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6762
6763         * regcache.h (regcache_cooked_write): Remove, update callers to
6764         use regcache::cooked_write.
6765         * regcache.c (regcache_cooked_write): Remove.
6766
6767 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6768
6769         * regcache.h (regcache_invalidate): Remove, update callers to
6770         use detached_regcache::invalidate instead.
6771         * regcache.c (regcache_invalidate): Remove.
6772
6773 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6774
6775         * regcache.h (regcache_raw_write_part): Remove, update callers
6776         to use regcache::raw_write_part instead.
6777         * regcache.c (regcache_raw_write_part): Remove.
6778
6779 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6780
6781         * regcache.h (regcache_raw_read_part): Remove, update callers to
6782         use readable_regcache::raw_read_part instead.
6783         * regcache.c (regcache_raw_read_part): Remove.
6784
6785 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6786
6787         * regcache.h (regcache_cooked_read): Remove, update callers to
6788         use readable_regcache::cooked_read instead.
6789         * regcache.c (regcache_cooked_read): Remove.
6790
6791 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6792
6793         * regcache.h (regcache_raw_write): Remove, update callers to use
6794         regcache::raw_write instead.
6795         * regcache.c (regcache_raw_write): Remove.
6796
6797 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6798
6799         * regcache.h (regcache_raw_read): Remove, update callers to use
6800         readable_regcache::raw_read instead.
6801         * regcache.c (regcache_raw_read): Remove.
6802
6803 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6804
6805         * regcache.h (regcache_raw_update): Remove, update callers to
6806         use readable_regcache::raw_update instead.
6807         * regcache.c (regcache_raw_update): Remove.
6808
6809 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6810
6811         * regcache.h (regcache_register_status): Remove, update callers
6812         to use reg_buffer::get_register_status directly instead.
6813         * regcache.c (regcache_register_status): Remove.
6814
6815 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6816
6817         * regcache.h (regcache_get_ptid): Remove, update all callers to
6818         call regcache::ptid instead.
6819         * regcache.c (regcache_get_ptid): Remove.
6820
6821 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6822
6823         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6824
6825 2018-05-30  Pedro Alves  <palves@redhat.com>
6826
6827         * common/common-exceptions.h (exception_rethrow): Use
6828         ATTRIBUTE_NORETURN.
6829
6830 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6831
6832         * breakpoint.c (print_solib_event, check_status_catch_solib):
6833         Remove struct keyword in range-based for loops.
6834         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6835         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6836         Likewise.
6837         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6838         Likewise.
6839         * symfile.c (addr_info_make_relative): Likewise.
6840         * thread.c (value_in_thread_stack_temporaries): Likewise.
6841
6842 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6843
6844         PR gdb/16841
6845         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6846         aggregate type to get its real type before accessing it.
6847
6848 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6849
6850         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6851         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6852         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6853         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6854         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6855         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6856         * printcmd.c (info_address_command): Likewise.
6857
6858 2018-05-29  Tom Tromey  <tom@tromey.com>
6859
6860         * windows-nat.c (handle_exception): Update fall-through comment.
6861
6862 2018-05-29  Tom Tromey  <tom@tromey.com>
6863
6864         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6865         (struct program_space) <added_solibs>: Now a std::vector.
6866         * breakpoint.c (print_solib_event): Update.
6867         (check_status_catch_solib): Update.
6868         * progspace.c (clear_program_space_solib_cache): Update.
6869         * solib.c (update_solib_list): Update.
6870
6871 2018-05-29  Tom Tromey  <tom@tromey.com>
6872
6873         * python/py-type.c (typy_richcompare): Update.
6874         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6875         * gdbtypes.h (types_deeply_equal): Return bool.
6876         (types_equal): Likewise.
6877         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6878         declare VEC.
6879         (check_types_equal): Change worklist to std::vector.  Return
6880         bool.
6881         (struct type_equality_entry): Add constructor.
6882         (compare_maybe_null_strings): Return bool.
6883         (check_types_worklist): Return bool.  Change worklist to
6884         std::vector.
6885         (types_deeply_equal): Use std::vector.
6886         (types_equal): Return bool.
6887         (compare_maybe_null_strings): Simplify.
6888
6889 2018-05-29  Tom Tromey  <tom@tromey.com>
6890
6891         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6892
6893 2018-05-29  Tom Tromey  <tom@tromey.com>
6894
6895         * objc-lang.h: Don't include cp-support.h.
6896         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6897         declare VEC.
6898
6899 2018-05-27  Tom Tromey  <tom@tromey.com>
6900
6901         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6902
6903 2018-05-25  Tom Tromey  <tom@tromey.com>
6904
6905         * value.c (value::location): Initialize.
6906
6907 2018-05-25  Tom Tromey  <tom@tromey.com>
6908
6909         * dbxread.c (init_bincl_list): Remove.
6910         (bincl_list): Now a std::vector.
6911         (bincls_allocated, next_bincl): Remove.
6912         (free_bincl_list, do_free_bincl_list_cleanup)
6913         (make_cleanup_free_bincl_list): Remove.
6914         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6915         unique_xmalloc_ptr.
6916         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6917         (struct header_file_location): Add constructor.
6918         (add_bincl_to_list): Remove.
6919
6920 2018-05-25  Tom Tromey  <tom@tromey.com>
6921
6922         * tui/tui.c (tui_enable): Update.
6923         * mi/mi-interp.c (mi_interp::init): Update.
6924         * interps.h (class interp) <name>: New method.
6925         <m_name>: Rename from name.
6926         (~scoped_restore_interp): Update.
6927         * interps.c (interp::interp): Update.
6928         (interp_add, interp_set, interp_lookup_existing)
6929         (current_interp_named_p): Update.
6930
6931 2018-05-25  Tom Tromey  <tom@tromey.com>
6932
6933         * interps.c (interp_name): Remove.
6934         * mi/mi-interp.c (mi_interp::init): Update.
6935         * interps.h (interp_name): Remove.
6936         (~scoped_restore_interp): Update.
6937         * tui/tui.c (tui_enable): Update.
6938
6939 2018-05-25  Tom Tromey  <tom@tromey.com>
6940
6941         * utils.c (fputs_maybe_filtered): Update.
6942         * linespec.c (decode_line_full): Update.
6943         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6944         (mi_print_breakpoint_for_event, mi_solib_loaded)
6945         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6946         (mi_user_selected_context_changed): Update.
6947         * mi/mi-main.c (mi_execute_command): Update.
6948         * cli/cli-script.c (execute_control_command): Update.
6949         * python/python.c (execute_gdb_command): Update.
6950         * solib.c (info_sharedlibrary_command): Update.
6951         * interps.c (interp_ui_out): Remove.
6952         * interps.h (interp_ui_out): Remove.
6953
6954 2018-05-25  Tom Tromey  <tom@tromey.com>
6955
6956         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6957         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6958         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6959
6960 2018-05-25  Tom Tromey  <tom@tromey.com>
6961
6962         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6963         * interps.c (interp_exec): Use scoped_restore.
6964
6965 2018-05-25  Tom Tromey  <tom@tromey.com>
6966
6967         * remote.c (remote_target::remote_file_get): Use
6968         gdb::byte_vector.
6969         (remote_target::remote_file_put): Likewise.
6970
6971 2018-05-25  Tom Tromey  <tom@tromey.com>
6972
6973         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6974         a std::string.
6975         (get_pe_section_index, add_pe_exported_sym): Update.
6976         (read_pe_exported_syms): Use gdb::def_vector.
6977
6978 2018-05-25  Tom Tromey  <tom@tromey.com>
6979
6980         * frame.c (remove_prev_frame): Remove.
6981         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6982
6983 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6984
6985         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6986         Remove prototypes.
6987         * mips-linux-nat.c (supply_fpregset): Always call
6988         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6989         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6990         `mips_fill_fpregset'.
6991         * mips-linux-tdep.c (mips_supply_fpregset)
6992         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6993         (mips_fill_fpregset_wrapper): Remove functions.
6994         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6995         (mips_linux_fpregset): Remove variable.
6996         (mips_linux_iterate_over_regset_sections): Use
6997         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6998         (mips_linux_o32_sigframe_init): Remove comment.
6999
7000 2018-05-25  Pedro Alves  <palves@redhat.com>
7001
7002         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7003         (struct readahead_cache, struct packet_reg, struct
7004         remote_arch_state, class remote_state): Move higher up in the
7005         file.
7006         (remote_target::m_remote_state): Now an object instead of a pointer.
7007         (remote_target::get_remote_state): Adjust.
7008
7009 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7010
7011         * stack.c (select_and_print_frame): Delete.
7012         (struct function_bounds): Move struct within function.
7013         (func_command): Most content moved into new function
7014         find_frame_for_function, use new function, print result, add
7015         function comment.
7016         (find_frame_for_function): New function, now returns a result.
7017
7018 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7019
7020         * stack.c (iterate_over_block_arg_vars): Fix comment.
7021         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7022
7023 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7024
7025         PR gdb/23203
7026         * frame.c
7027         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7028         Define.
7029         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7030         Define.
7031         * frame.h (class scoped_restore_selected_frame): New class.
7032         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7033         of any exception, use scoped_restore_selected_frame to restore the
7034         frame instead.
7035
7036 2018-05-24  Pedro Alves  <palves@redhat.com>
7037
7038         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7039         override.
7040
7041 2018-05-23  Tom Tromey  <tom@tromey.com>
7042
7043         * complaints.c (struct complaints): Remove.
7044         (symfile_complaint_book): Remove.
7045         (series): New global.
7046         (complaint_internal): Update.
7047         (clear_complaints): Update.
7048
7049 2018-05-23  Tom Tromey  <tom@tromey.com>
7050
7051         * complaints.c (counters): New global.
7052         (struct complain): Remove.
7053         (struct complaints) <root>: Remove.
7054         (complaint_sentinel): Remove.
7055         (symfile_complaint_book): Update.
7056         (find_complaint) Remove.
7057         (complaint_internal, clear_complaints): Update.
7058
7059 2018-05-23  Tom Tromey  <tom@tromey.com>
7060
7061         * complaints.c (struct complain) <file, line>: Remove.
7062         (find_complaint): Remove file, line parameters.
7063         (complaint_internal): Update.
7064
7065 2018-05-23  Tom Tromey  <tom@tromey.com>
7066
7067         * complaints.c (vcomplaint): Remove.
7068         (complaint_internal) Merge in contents of vcomplaint.
7069
7070 2018-05-23  Tom Tromey  <tom@tromey.com>
7071
7072         * complaints.c (struct complaints) <explanation>: Remove.
7073         (symfile_explanations): Remove.
7074         (symfile_complaint_book): Update.
7075         (vcomplaint): Update.
7076         (struct explanation): Remove.
7077
7078 2018-05-23  Tom Tromey  <tom@tromey.com>
7079
7080         * complaints.c (symfile_complaints): Remove.
7081         (complaint_internal): Remove "complaints" parameter.
7082         (clear_complaints, vcomplaint): Remove "c" parameter.
7083         (get_complaints): Remove.
7084         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7085         (dwarf2_debug_line_missing_file_complaint)
7086         (dwarf2_debug_line_missing_end_sequence_complaint)
7087         (dwarf2_complex_location_expr_complaint)
7088         (dwarf2_const_value_length_mismatch_complaint)
7089         (dwarf2_section_buffer_overflow_complaint)
7090         (dwarf2_macro_malformed_definition_complaint)
7091         (dwarf2_invalid_attrib_class_complaint)
7092         (create_addrmap_from_index, dw2_symtab_iter_next)
7093         (dw2_expand_marked_cus)
7094         (dw2_debug_names_iterator::find_vec_in_debug_names)
7095         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7096         (create_debug_type_hash_table, init_cutu_and_read_dies)
7097         (partial_die_parent_scope, add_partial_enumeration)
7098         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7099         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7100         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7101         (create_cus_hash_table, create_dwp_hash_table)
7102         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7103         (dwarf2_rnglists_process, dwarf2_ranges_process)
7104         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7105         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7106         (handle_struct_member_die, process_structure_scope)
7107         (read_array_type, read_common_block, read_module_type)
7108         (read_tag_pointer_type, read_typedef, read_base_type)
7109         (read_subrange_type, load_partial_dies, partial_die_info::read)
7110         (partial_die_info::read, partial_die_info::read)
7111         (partial_die_info::read, read_checked_initial_length_and_offset)
7112         (dwarf2_string_attr, read_formatted_entries)
7113         (dwarf_decode_line_header)
7114         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7115         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7116         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7117         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7118         (get_signatured_type, get_DW_AT_signature_type)
7119         (decode_locdesc, file_file_name, consume_improper_spaces)
7120         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7121         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7122         (dwarf2_symbol_mark_computed, set_die_type)
7123         (read_attribute_value): Update.
7124         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7125         Update.
7126         * dbxread.c (unknown_symtype_complaint)
7127         (lbrac_mismatch_complaint, repeated_header_complaint)
7128         (set_namestring, function_outside_compilation_unit_complaint)
7129         (read_dbx_symtab, process_one_symbol): Update.
7130         * gdbtypes.c (stub_noname_complaint): Update.
7131         * windows-nat.c (handle_unload_dll): Update.
7132         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7133         (decode_base_type): Update.
7134         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7135         (eb_complaint, record_include_begin, record_include_end)
7136         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7137         (process_xcoff_symbol, read_symbol)
7138         (function_outside_compilation_unit_complaint)
7139         (scan_xcoff_symtab): Update.
7140         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7141         * buildsym.c (finish_block_internal, make_blockvector)
7142         (end_symtab_get_static_block, augment_type_symtab): Update.
7143         * dtrace-probe.c (dtrace_process_dof)
7144         (dtrace_static_probe_ops::get_probes): Update.
7145         * complaints.h (struct complaint): Don't declare.
7146         (symfile_complaints): Remove.
7147         (complaint_internal): Remove "complaints" parameter.
7148         (complaint): Likewise.
7149         (clear_complaints): Likewise.
7150         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7151         (reread_symbols): Update.
7152         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7153         (dwarf2_frame_cache, decode_frame_entry): Update.
7154         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7155         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7156         (info_selectors_command): Update.
7157         * macrotab.c (macro_include, check_for_redefinition)
7158         (macro_undef): Update.
7159         * objfiles.c (filter_overlapping_sections): Update.
7160         * stabsread.c (invalid_cpp_abbrev_complaint)
7161         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7162         (define_symbol, error_type, read_type, rs6000_builtin_type)
7163         (stabs_method_name_from_physname, read_member_functions)
7164         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7165         (attach_fields_to_type, complain_about_struct_wipeout)
7166         (read_range_type, read_args, common_block_start)
7167         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7168         Update.
7169         * mdebugread.c (index_complaint, unknown_ext_complaint)
7170         (basic_type_complaint, bad_tag_guess_complaint)
7171         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7172         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7173         (parse_procedure, parse_lines)
7174         (function_outside_compilation_unit_complaint)
7175         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7176         (bad_tag_guess_complaint, reg_value_complaint): Update.
7177         * cp-support.c (demangled_name_complaint): Update.
7178         * macroscope.c (sal_macro_scope): Update.
7179         * dwarf-index-write.c (class debug_names): Update.
7180
7181 2018-05-23  Tom Tromey  <tom@tromey.com>
7182
7183         * complaints.c (clear_complaints): Remove "noisy" parameter.
7184         * complaints.h (clear_complaints): Update.
7185         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7186         (reread_symbols): Update.
7187
7188 2018-05-23  Tom Tromey  <tom@tromey.com>
7189
7190         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7191         SUBSEQUENT_MESSAGE.
7192         (vcomplaint, clear_complaints): Update.
7193         (symfile_explanations): Remove some messages.
7194
7195 2018-05-23  Tom Tromey  <tom@tromey.com>
7196
7197         * complaints.c (internal_complaint): Remove.
7198         * complaints.h (internal_complaint): Remove.
7199
7200 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7201
7202         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7203
7204 2018-05-22  Pedro Alves  <palves@redhat.com>
7205
7206         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7207         (remote_fileio_badfd, remote_fileio_return_errno)
7208         (remote_fileio_return_success, remote_fileio_func_open)
7209         (remote_fileio_func_open, remote_fileio_func_close)
7210         (remote_fileio_func_read, remote_fileio_func_write)
7211         (remote_fileio_func_lseek, remote_fileio_func_rename)
7212         (remote_fileio_func_unlink, remote_fileio_func_stat)
7213         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7214         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7215         remote_target parameter.
7216         (remote_fio_func_map) <func>: Add remote_target parameter.
7217         (do_remote_fileio_request, remote_fileio_request):
7218         * remote-fileio.h (remote_fileio_request):
7219         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7220         remote_target parameter.
7221         (remote_notif_process, handle_notification): Adjust to pass down
7222         the remote.
7223         (remote_notif_state_allocate): Add remote_target parameter.  Save
7224         it.
7225         * remote-notif.h (struct remote_target): Forward declare.
7226         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7227         remote_target parameter.
7228         (struct remote_notif_state) <remote>: New field.
7229         (remote_notif_ack, remote_notif_parse): Add remote_target
7230         parameter.
7231         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7232         remote_target parameter.
7233         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7234         (threads_listing_context, rmt_thread_action, protocol_feature)
7235         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7236         (packet_result, struct threads_listing_context, remote_state):
7237         Move definitions and declarations higher up.
7238         (remote_target) <~remote_target>: Declare.
7239         (remote_download_command_source, remote_file_put, remote_file_get)
7240         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7241         (remote_hostio_pread_vFile, remote_hostio_send_command)
7242         (remote_hostio_set_filesystem, remote_hostio_open)
7243         (remote_hostio_close, remote_hostio_unlink, remote_state)
7244         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7245         (get_memory_write_packet_size, get_memory_read_packet_size)
7246         (append_pending_thread_resumptions, remote_detach_1)
7247         (append_resumption, remote_resume_with_vcont)
7248         (add_current_inferior_and_thread, wait_ns, wait_as)
7249         (process_stop_reply, remote_notice_new_inferior)
7250         (process_initial_stop_replies, remote_add_thread)
7251         (btrace_sync_conf, remote_btrace_maybe_reopen)
7252         (remove_new_fork_children, kill_new_fork_children)
7253         (discard_pending_stop_replies, stop_reply_queue_length)
7254         (check_pending_events_prevent_wildcard_vcont)
7255         (discard_pending_stop_replies_in_queue, stop_reply)
7256         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7257         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7258         (remote_interrupt_as, remote_interrupt_ns)
7259         (remote_get_noisy_reply, remote_query_attached)
7260         (remote_add_inferior, remote_current_thread, get_current_thread)
7261         (set_thread, set_general_thread, set_continue_thread)
7262         (set_general_process, write_ptid)
7263         (remote_unpack_thread_info_response, remote_get_threadinfo)
7264         (parse_threadlist_response, remote_get_threadlist)
7265         (remote_threadlist_iterator, remote_get_threads_with_ql)
7266         (remote_get_threads_with_qxfer)
7267         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7268         (get_offsets, remote_check_symbols, remote_supported_packet)
7269         (remote_query_supported, remote_packet_size)
7270         (remote_serial_quit_handler, remote_detach_pid)
7271         (remote_vcont_probe, remote_resume_with_hc)
7272         (send_interrupt_sequence, interrupt_query)
7273         (remote_notif_get_pending_events, fetch_register_using_p)
7274         (send_g_packet, process_g_packet, fetch_registers_using_g)
7275         (store_register_using_P, store_registers_using_G)
7276         (set_remote_traceframe, check_binary_download)
7277         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7278         (remote_xfer_live_readonly_partial, remote_read_bytes)
7279         (remote_send_printf, remote_flash_write, readchar)
7280         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7281         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7282         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7283         (extended_remote_disable_randomization, extended_remote_run)
7284         (send_environment_packet, extended_remote_environment_support)
7285         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7286         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7287         (packet_command): Now methods of ...
7288         (remote_target): ... this class.
7289         (m_remote_state) <remote_target>: New field.
7290         (struct remote_state) <stop_reply_queue,
7291         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7292         fields.
7293         (remote_state::remote_state): Allocate stop_reply_queue.
7294         (remote_state): Delete global.
7295         (get_remote_state_raw): Delete.
7296         (remote_target::get_remote_state): Allocate m_remote_state on
7297         demand.
7298         (get_current_remote_target): New.
7299         (remote_ops, extended_remote_ops): Delete.
7300         (wait_forever_enabled_p, remote_async_inferior_event_token):
7301         Delete, moved to struct remote_state.
7302         (remote_target::close): Delete self.  Destruction bits split to
7303         ...
7304         (remote_target::~remote_target): ... this.
7305         (show_memory_packet_size): Adjust to use
7306         get_current_remote_target.
7307         (struct protocol_feature) <func>: Add remote_target parameter.
7308         All callers adjusted.
7309         (curr_quit_handler_target): New.
7310         (remote_serial_quit_handler): Reimplement.
7311         (remote_target::open_1): Adjust to use get_current_remote_target.
7312         Heap-allocate remote_target/extended_remote_target instances.
7313         (vcont_builder::vcont_builder): Add remote_target parameter, and
7314         save it in m_remote.  All callers adjusted.
7315         (vcont_builder::m_remote): New field.
7316         (vcont_builder::restart, vcont_builder::flush)
7317         (vcont_builder::push_action): Use it.
7318         (remote_target::commit_resume): Use it.
7319         (struct queue_iter_param) <remote>: New field.
7320         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7321         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7322         (check_pending_event_prevents_wildcard_vcont_callback)
7323         (remote_target::check_pending_events_prevent_wildcard_vcont)
7324         (remote_target::discard_pending_stop_replies)
7325         (remote_target::discard_pending_stop_replies_in_queue)
7326         (remote_target::remote_notif_remove_queued_reply): Fill in
7327         'remote' field.
7328         (remote_notif_get_pending_events): New.
7329         (remote_target::readchar, remote_target::remote_serial_write):
7330         Save/restore curr_quit_handler_target.
7331         (putpkt): New.
7332         (kill_new_fork_children): Fill in 'remote' field.
7333         (packet_command): Use get_current_remote_target, defer to
7334         remote_target method of same name.
7335         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7336         parameter, and save it in m_remote.  All callers adjusted.
7337         (scoped_remote_fd::release): Use m_remote.
7338         (scoped_remote_fd::m_remote): New field.
7339         (remote_file_put, remote_file_get, remote_file_delete): Use
7340         get_current_remote_target, defer to remote_target method of same
7341         name.
7342         (remote_btrace_reset): Add remote_state paremeter.  Update all
7343         callers.
7344         (remote_async_inferior_event_handler). Pass down 'data'.
7345         (remote_new_objfile): Use get_current_remote_target.
7346         (remote_target::vcont_r_supported): New.
7347         (set_range_stepping): Use get_current_remote_target and
7348         remote_target::vcont_r_supported.
7349         (_initialize_remote): Don't allocate 'remote_state' and
7350         'stop_reply_queue' globals.
7351         * remote.h (struct remote_target): Forward declare.
7352         (getpkt, putpkt, remote_notif_get_pending_events): Add
7353         'remote_target' parameter.
7354
7355 2018-05-22  Pedro Alves  <palves@redhat.com>
7356
7357         * remote.c (vcont_builder): Now a class.  Make all data members
7358         private.
7359         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7360         Declare methods.
7361         (vcont_builder_restart): Rename to ...
7362         (vcont_builder::restart): ... this.
7363         (vcont_builder_flush): Rename to ...
7364         (vcont_builder::flush): ... this.
7365         (vcont_builder_push_action): Rename to ...
7366         (vcont_builder::push_action): ... this.
7367         (remote_target::commit_resume): Adjust.
7368
7369 2018-05-22  Pedro Alves  <palves@redhat.com>
7370
7371         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7372         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7373         (get_fixed_memory_packet_size): New.
7374         (get_memory_packet_size): Use it.
7375         (set_memory_packet_size): Don't override the config size with
7376         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7377         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7378         Don't refer to get_memory_packet_size if not connected to a remote
7379         target.  Show "(default)" if configured size is 0.
7380
7381 2018-05-22  Pedro Alves  <palves@redhat.com>
7382
7383         * remote.c (remote_target::mourn_inferior): Move
7384         discard_pending_stop_replies call here from ...
7385         (_initialize_remote): ... here.
7386
7387 2018-05-22  Pedro Alves  <palves@redhat.com>
7388
7389         * remote.c (compare_section_command): Remove set_general_process
7390         call.
7391
7392 2018-05-22  Pedro Alves  <palves@redhat.com>
7393
7394         * remote.c (struct packet_reg, struct remote_arch_state):
7395         Move higher up in the file.
7396         (remote_state) <m_arch_states>: Store remote_arch_state values
7397         instead of remote_arch_state pointers.
7398         (remote_state::get_remote_arch_state): Adjust.
7399
7400 2018-05-22  Pedro Alves  <palves@redhat.com>
7401
7402         * remote.c: Include <unordered_map>.
7403         (remote_state): Now a class.
7404         (remote_state) <get_remote_arch_state>: Declare method.
7405         <get_remote_arch_state>: New field.
7406         (remote_arch_state) <remote_arch_state>: Declare ctor.
7407         <regs>: Now a unique_ptr.
7408         (remote_gdbarch_data_handle): Delete.
7409         (get_remote_arch_state): Delete.
7410         (remote_state::get_remote_arch_state): New.
7411         (get_remote_state): Adjust to call remote_state's
7412         get_remote_arch_state method.
7413         (init_remote_state): Delete, bits factored out to ...
7414         (remote_arch_state::remote_arch_state): ... this new method.
7415         (get_remote_packet_size, get_memory_packet_size)
7416         (process_g_packet, remote_target::fetch_registers)
7417         (remote_target::prepare_to_store, store_registers_using_G)
7418         (remote_target::store_registers, remote_target::get_trace_status):
7419         Adjust to call remote_state's method.
7420         (_initialize_remote): Remove reference to
7421         remote_gdbarch_data_handle.
7422
7423 2018-05-22  Pedro Alves  <palves@redhat.com>
7424
7425         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7426         pread>: New method declarations.
7427         (remote_target::open_1): Adjust.
7428         (readahead_cache_invalidate): Rename to ...
7429         (readahead_cache::invalidate): ... this, and adjust to be a class
7430         method.
7431         (readahead_cache_invalidate_fd): Rename to ...
7432         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7433         class method.
7434         (remote_hostio_pwrite): Adjust.
7435         (remote_hostio_pread_from_cache): Rename to ...
7436         (readahead_cache::pread): ... this, and adjust to be a class
7437         method.
7438         (remote_hostio_close): Adjust.
7439
7440 2018-05-22  Pedro Alves  <palves@redhat.com>
7441
7442         * remote.c (remote_hostio_close_cleanup): Delete.
7443         (class scoped_remote_fd): New.
7444         (remote_file_put, remote_file_get): Use it.
7445
7446 2018-05-22  Pedro Alves  <palves@redhat.com>
7447
7448         (struct vCont_action_support): Use bool and initialize all fields.
7449         (struct readahead_cache): Initialize all fields.
7450         (remote_state): Use bool and initialize all fields.
7451         (remote_state::remote_state, remote_state::~remote_state): New.
7452         (new_remote_state): Delete.
7453         (_initialize_remote): Use new to allocate remote_state.
7454
7455 2018-05-22  Pedro Alves  <palves@redhat.com>
7456             張俊芝  <zjz@zjz.name>
7457
7458         PR gdb/22973
7459         * c-exp.y: Include "c-support.h".
7460         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7461         of tolower.  Use c_ident_is_alpha to scan names.
7462         * c-lang.c: Include "c-support.h".
7463         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7464         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7465         * c-support.h: New file, with bits factored out from ...
7466         * cp-name-parser.y: ... this file.
7467         Include "c-support.h".
7468         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7469         c-support.h and renamed.
7470         (symbol_end, yylex): Adjust.
7471
7472 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7473
7474         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7475         parameter type to CORE_ADDR.
7476         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7477         parameter type in declaration to CORE_ADDR.
7478         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7479         target_auxv_search to get AT_HWCAP and use the result to get the
7480         target description.
7481         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7482         to CORE_ADDR. Remove the cast of the return value to unsigned
7483         long. Fix error predicate of target_auxv_search.
7484         (ppc_linux_nat_target::read_description): Change the type of the
7485         hwcap variable to CORE_ADDR.
7486
7487 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7488
7489         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7490         if the size of fpscr is larger than 32 bits.
7491
7492 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7493
7494         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7495         (ppc32_linux_vsxregmap): New global.
7496         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7497         regcache_supply_regset, and regcache_collect_regset.
7498         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7499         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7500         (fetch_vsx_register, store_vsx_register): Remove.
7501         (fetch_vsx_registers): Add regno parameter. Get regset using
7502         ppc_linux_vsxregset. Use regset to supply registers.
7503         (store_vsx_registers): Add regno parameter. Get regset using
7504         ppc_linux_vsxregset. Use regset to collect registers.
7505         (fetch_register): Call fetch_vsx_registers instead of
7506         fetch_vsx_register.
7507         (store_register): Call store_vsx_registers instead of
7508         store_vsx_register.
7509         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7510         new regno parameter.
7511         (store_ppc_registers): Call store_vsx_registers with -1 for the
7512         new regno parameter.
7513         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7514         (ppc_collect_vsxregset): Remove.
7515
7516 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7517
7518         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7519         offset fields.
7520         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7521         for vector register offset fields.
7522         (ppc64_fbsd_reg_offsets): Likewise.
7523         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7524         to vector register offset fields.
7525         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7526         to vector register offset fields.
7527         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7528         vector register offset fields.
7529         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7530         initializers for vector register offset fields.
7531         (rs6000_aix64_reg_offsets): Likewise.
7532         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7533         (ppc_supply_vrregset): Remove.
7534         (ppc_collect_vrregset): Remove.
7535         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7536         (ppc_linux_vrregset) : New function.
7537         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7538         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7539         (ppc32_linux_vrregset): Remove.
7540         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7541         and use result instead of ppc32_linux_vrregset.
7542         (ppc32_linux_reg_offsets): Remove initializers for vector register
7543         offset fields.
7544         (ppc64_linux_reg_offsets): Likewise.
7545         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7546         * ppc-linux-nat.c: Include regset.h.
7547         (gdb_vrregset_t): Adjust comment to account for little-endian
7548         mode.
7549         (supply_vrregset, fill_vrregset): Remove.
7550         (fetch_altivec_register, store_altivec_register): Remove.
7551         (fetch_altivec_registers): Add regno parameter. Get regset using
7552         ppc_linux_vrregset. Use regset to supply registers.
7553         (store_altivec_registers): Add regno parameter. Get regset using
7554         ppc_linux_vrregset. Use regset to collect registers.
7555         (fetch_register): Call fetch_altivec_registers instead of
7556         fetch_altivec_register.
7557         (store_register): Call store_altivec_registers instead of
7558         store_altivec_register.
7559         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7560         the new regno parameter.
7561         (store_ppc_registers): Call store_altivec_registers with -1 for
7562         the new regno parameter.
7563
7564 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7565
7566         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7567         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7568         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7569         (gdb_vrregset_t): Change array type size to
7570         PPC_LINUX_SIZEOF_VRREGSET.
7571         (gdb_vsxregset_t): Change array type size to
7572         PPC_LINUX_SIZEOF_VSXREGSET.
7573         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7574         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7575         PPC_LINUX_SIZEOF_VSXREGSET.
7576
7577 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7578
7579         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7580         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7581         nat/ppc-linux.c.
7582         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7583         ppc_linux_target_wordsize with tid.
7584         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7585         wordsize with tid.
7586         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7587         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7588         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7589         tid parameter. Remove static specifier.
7590         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7591         (ppc_linux_target_wordsize): New declaration.
7592
7593 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7594
7595         * arch/ppc-linux-common.c: New file.
7596         * arch/ppc-linux-common.h: New file.
7597         * arch/ppc-linux-tdesc.h: New file.
7598         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7599         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7600         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7601         arch/ppc-linux-tdesc.h.
7602         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7603         arch/ppc-linux-tdesc.h.
7604         (ppc_linux_nat_target::read_description): Remove target
7605         description matching code. Fill a ppc_linux_features struct and
7606         call ppc_linux_match_description with it. Move comment about ISA
7607         2.05 to ppc-linux-common.c.
7608         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7609         arch/ppc-linux-tdesc.h.
7610         (ppc_linux_core_read_description): Remove target description
7611         matching code. Fill a ppc_linux_features struct and call
7612         ppc_linux_match_description with it.
7613         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7614         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7615         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7616         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7617         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7618         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7619         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7620         (tdesc_powerpc_e500l): Remove.
7621
7622 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7623
7624         * ada-lang.c (catch_assert_command): Pass empty string instead
7625         of NULL for excep_string argument.
7626
7627 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7628
7629         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7630         the width of the requested register exceeds the width of the
7631         `ptrace' data type.
7632
7633 2018-05-21  Tom Tromey  <tom@tromey.com>
7634
7635         * printcmd.c (output_command): Remove.
7636         (output_command_const): Rename to output_command.
7637         * valprint.h (output_command): Rename from output_command_const.
7638         * tracepoint.c (trace_dump_actions): Call output_command.
7639
7640 2018-05-21  Tom Tromey  <tom@tromey.com>
7641
7642         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7643         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7644         * ada-lang.h (create_ada_exception_catchpoint): Update.
7645         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7646         std::string.
7647         (create_excep_cond_exprs, ~ada_catchpoint)
7648         (should_stop_exception, print_one_exception)
7649         (print_mention_exception, print_recreate_exception): Update.
7650         (ada_get_next_arg): Remove.
7651         (catch_ada_exception_command_split): Use std::string.  Change type
7652         of "excep_string", "cond_string".
7653         (catch_ada_exception_command): Update.
7654         (create_ada_exception_catchpoint): Change type of excep_string.
7655         (ada_exception_sal): Remove excep_string parameter.
7656         (~ada_catchpoint): Remove.
7657
7658 2018-05-21  Tom Tromey  <tom@tromey.com>
7659
7660         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7661         cleanup.
7662
7663 2018-05-21  Tom Tromey  <tom@tromey.com>
7664
7665         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7666         Return unique_xmalloc_ptr.
7667         (print_it_exception): Update.
7668
7669 2018-05-21  Tom Tromey  <tom@tromey.com>
7670
7671         * tracepoint.c (trace_dump_actions): Use std::string.
7672
7673 2018-05-21  Tom Tromey  <tom@tromey.com>
7674
7675         * symfile.c (reread_symbols): Use std::string for original_name.
7676
7677 2018-05-21  Tom Tromey  <tom@tromey.com>
7678
7679         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7680         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7681         constructor.
7682
7683 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7684
7685         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7686         instance to...
7687         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7688         * objfiles.c (get_objfile_bfd_data): Allocate
7689         objfile_per_bfd_storage with obstack_new when allocating on
7690         obstack.
7691
7692 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7693
7694         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7695         OBSTACK_ZALLOC.
7696         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7697         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7698         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7699         (add_pending): Likewise.
7700         (parse_symbol): Likewise.
7701         (parse_partial_symbols): Likewise.
7702         (psymtab_to_symtab_1): Likewise.
7703         (new_psymtab): Likewise.
7704         (elfmdebug_build_psymtabs): Likewise.
7705         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7706         * objfiles.c (get_objfile_bfd_data): Likewise.
7707         (objfile_register_static_link): Likewise.
7708         * psymtab.c (allocate_psymtab): Likewise.
7709         * stabsread.c (read_member_functions): Likewise.
7710         * xcoffread.c (xcoff_end_psymtab): Likewise.
7711
7712 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7713
7714         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7715         compiler supports std::is_trivially_constructible.
7716         * common/poison.h: Include obstack.h.
7717         (IsMallocable): Define to is_trivially_constructible if the
7718         compiler supports it, define to true_type otherwise.
7719         (xobnew): New.
7720         (XOBNEW): Redefine.
7721         (xobnewvec): New.
7722         (XOBNEWVEC): Redefine.
7723         * gdb_obstack.h (obstack_zalloc): New.
7724         (OBSTACK_ZALLOC): Redefine.
7725         (obstack_calloc): New.
7726         (OBSTACK_CALLOC): Redefine.
7727         (obstack_new): New.
7728         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7729         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7730         gdbarch.c.
7731         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7732         obstack_calloc/obstack_zalloc.
7733         (gdbarch_obstack_zalloc): Remove.
7734         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7735
7736 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7737
7738         * stack.c (backtrace_command_1): Remove useless variable int i.
7739
7740 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7741
7742         * stack.c (print_frame_info): Fix comment.
7743
7744 2018-05-18  Tom Tromey  <tom@tromey.com>
7745
7746         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7747         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7748         (~dwarf2_per_objfile): Update
7749         (dwarf2_get_dwz_file): Use new.
7750         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7751         unique_ptr.
7752
7753 2018-05-18  Tom Tromey  <tom@tromey.com>
7754
7755         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7756         unique_ptr.
7757         * dwarf2read.c (struct dwp_file): Add constructor and
7758         initializers.
7759         (open_and_init_dwp_file): Return a unique_ptr.
7760         (dwarf2_per_objfile, create_dwp_hash_table)
7761         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7762         (lookup_dwo_unit_in_dwp): Update.
7763         (open_and_init_dwp_file, get_dwp_file): Update.
7764
7765 2018-05-18  Tom Tromey  <tom@tromey.com>
7766
7767         * dwarf2read.c (dwarf2_per_objfile): Update.
7768         (struct mapped_index): Add initializers.
7769         (dwarf2_read_index): Use new.
7770         (dw2_symtab_iter_init): Update.
7771         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7772         unique_ptr.
7773
7774 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7775
7776         * dwarf2read.c (mapped_index) <total_size>: Remove.
7777
7778 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7779
7780         * unittests/format_pieces-selftests.c (test_format_specifier):
7781         Add ARI comments.
7782
7783 2018-05-18  Tom Tromey  <tom@tromey.com>
7784
7785         * c-typeprint.c (maybe_print_hole): New function.
7786         (c_print_type_struct_field_offset): Update.
7787         (c_type_print_base_struct_union): Call maybe_print_hole.
7788
7789 2018-05-17  Keith Seitz  <keiths@redhat.com>
7790
7791         * breakpoint.c (build_bpstat_chain): New function, moved from
7792         bpstat_stop_status.
7793         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7794         If no stop chain is passed, call build_bpstat_chain to build it.
7795         * breakpoint.h (build_bpstat_chain): Declare.
7796         (bpstat_stop_status): Move documentation here from breakpoint.c.
7797         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7798         build the stop chain and pass it to skip_inline_frames.
7799         Pass this stop chain to bpstat_stop_status.
7800         * inline-frame.c: Include breakpoint.h.
7801         (stopped_by_user_bp_inline_frame): New function.
7802         (skip_inline_frames): Add parameter `stop_chain'.
7803         Move documention to inline-frame.h.
7804         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7805         whether the frame should be elided.
7806         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7807         Add moved documentation and update for new parameter.
7808
7809 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7810
7811         PR cli/14975
7812         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7813         unittests/format_pieces-selftests.c.
7814         * common/format.h (format_piece) <operator==>: New.
7815         (format_pieces) <operator[]>: Remove.
7816         * common/format.c (format_pieces::format_pieces): Handle \e.
7817         * unittests/format_pieces-selftests.c: New.
7818
7819 2018-05-17  Tom Tromey  <tom@tromey.com>
7820
7821         PR symtab/23010:
7822         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7823         (dw2_instantiate_symtab): Add skip_partial parameter.
7824         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7825         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7826         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7827         (dw2_expand_symtabs_matching_one)
7828         (dw2_find_pc_sect_compunit_symtab)
7829         (dw2_debug_names_lookup_symbol)
7830         (dw2_debug_names_expand_symtabs_for_function): Update.
7831         (init_cutu_and_read_dies): Add skip_partial parameter.
7832         (process_psymtab_comp_unit, build_type_psymtabs_1)
7833         (process_skeletonless_type_unit, load_partial_comp_unit)
7834         (psymtab_to_symtab_1): Update.
7835         (load_full_comp_unit): Add skip_partial parameter.
7836         (process_imported_unit_die, dwarf2_read_addr_index)
7837         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7838         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7839         (read_signatured_type): Update.
7840
7841 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7842
7843         * value.c (release_value): Remove unused variable.
7844         (record_latest_value): Likewise.
7845         (access_value_history): Likewise.
7846         (preserve_values): Likewise.
7847
7848 2018-05-17  Tom Tromey  <tom@tromey.com>
7849
7850         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7851         Initialize.
7852
7853 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7854
7855         PR gdb/22286
7856         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7857         Also handle registers whose width is not a multiple of
7858         PTRACE_TYPE_RET.
7859         (linux_nat_trad_target::store_register): Likewise.
7860
7861 2018-05-16  Tom Tromey  <tom@tromey.com>
7862
7863         * gdbcore.h (core_bfd): Redefine.
7864         * corelow.c (core_target::close): Update.
7865         (core_target_open): Update.
7866         * progspace.h (struct program_space) <cbfd>: Now a
7867         gdb_bfd_ref_ptr.
7868
7869 2018-05-16  Tom Tromey  <tom@tromey.com>
7870
7871         PR cli/19551:
7872         * symfile-add-flags.h (enum symfile_add_flags)
7873         <SYMFILE_NOT_FILENAME>: New constant.
7874         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7875         objfile name from BFD.
7876         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7877         * minidebug.c (find_separate_debug_file_in_section): Put
7878         ".gnu_debugdata" into BFD's file name.
7879
7880 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7881
7882         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7883         Remove.
7884
7885 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7886
7887         PR binutils/21446
7888         * aarch64-tdep.c (aarch64_analyze_prologue,
7889         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7890         Indicate not interested in errors.
7891
7892 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7893
7894         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7895         Supply the MIPS_ZERO_REGNUM register.
7896
7897 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7898
7899         * mips-tdep.c (mask_address_var): Make variable static.
7900
7901 2018-05-14  Tom Tromey  <tom@tromey.com>
7902
7903         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7904
7905 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7906
7907         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7908         FXSAVE_ADDR for the mxcsr register.
7909
7910 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7911
7912         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7913
7914 2018-05-11  Pedro Alves  <palves@redhat.com>
7915
7916         * corelow.c (core_target) <core_target>: No longer inline.
7917         Initialize m_core_gdbarch, m_core_vec and build the section table
7918         here.
7919         <~core_target>: New.
7920         <core_gdbarch, get_core_register_section>: New methods.
7921         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7922         factored out from ...
7923         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7924         (core_ops): Delete.
7925         (sniff_core_bfd): Add gdbarch parameter.
7926         (core_close): Delete, merged into ...
7927         (core_target::close): ... here.  Delete self.
7928         (core_close_cleanup): Delete.
7929         (core_target_open): Allocate a core_target on the heap.  Use a
7930         unique_ptr instead of a cleanup.  Bits moved into the core_target
7931         ctor.  Adjust to use core_target methods instead of globals.
7932         (get_core_register_section): Rename to ...
7933         (core_target::get_core_register_section): ... this and adjust.
7934         (struct get_core_registers_cb_data): New.
7935         (get_core_registers_cb): Use it.  Use bool.
7936         (core_target::fetch_registers, core_target::files_info)
7937         (core_target::xfer_partial, core_target::read_description)
7938         (core_target::pid_to, core_target::thread_name): Adjust to
7939         reference class fields instead of globals.
7940         * target.h (struct target_ops_deleter, target_ops_up): New.
7941
7942 2018-05-11  Pedro Alves  <palves@redhat.com>
7943
7944         * corefile.c (core_file_command): Move to corelow.c.
7945         * corelow.c (the_core_target): Delete.
7946         (core_file_command): Moved from corefile.c.  Check exec_bfd
7947         instead of the_core_target.  Use target_detach instead of calling
7948         into the_core_target directly.
7949         (maybe_say_no_core_file_now): New.
7950         (core_target::detach): Use it.
7951         (_initialize_corelow): Remove references to the_core_target.
7952         * gdbcore.h (the_core_target): Delete.
7953
7954 2018-05-11  Tom Tromey  <tromey@redhat.com>
7955             Pedro Alves  <palves@redhat.com>
7956
7957         * corefile.c (core_bfd): Remove.
7958         * gdbcore.h (core_bfd): Now a macro.
7959         * progspace.h (struct program_space) <cbfd>: New field.
7960
7961 2018-05-11  Tom Tromey  <tom@tromey.com>
7962
7963         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7964         gdb::def_vector.
7965
7966 2018-05-10  Tom Tromey  <tom@tromey.com>
7967
7968         * configure: Rebuild.
7969         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7970
7971 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7972
7973         PR server/23158:
7974         * regformats/regdat.sh: Adjust script, following the addition
7975         of the new expedite_regs parameter to init_target_desc.
7976
7977 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7978     
7979         PR gdb/23127
7980         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7981         set_gdbarch_significant_addr_bit.
7982         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7983         set_gdbarch_significant_addr_bit.
7984         * utils.c (address_significant): Update to sign extend addr.
7985
7986 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7987
7988         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7989         (xtensa_linux_init_abi): Limit tdep->num_regs by
7990         tdep->num_nopriv_regs.
7991         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7992         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7993         not initialized.
7994
7995 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7996
7997         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7998
7999 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8000
8001         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8002         (I387_MXCSR_INIT_VAL): New constant.
8003         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8004         buffer if it was supplied by the inferior.
8005         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8006         (i387_xsave_get_clear_bv): New function.
8007         (i387_supply_xsave): Only read x87 control registers from the
8008         xsave buffer if the feature is enabled, and the state will have
8009         been written, otherwise, provide a suitable default.
8010         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8011         including x87 control registers.  Update control registers if they
8012         have changed from the default value, and mark features as enabled
8013         as required.
8014         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8015
8016 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8017
8018         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8019
8020 2018-05-07  Tom Tromey  <tom@tromey.com>
8021
8022         * configure: Rebuild.
8023         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8024
8025 2018-05-07  Tom Tromey  <tom@tromey.com>
8026
8027         PR tdep/20362:
8028         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8029         bit.  Use correct value for VDIV.
8030
8031 2018-05-04  Tom Tromey  <tom@tromey.com>
8032
8033         * configure: Rebuild.
8034         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8035
8036 2018-05-04  Tom Tromey  <tom@tromey.com>
8037
8038         * linux-record.c (record_linux_system_call) <case
8039         RECORD_SYS_RECVFROM>: Add "break".
8040
8041 2018-05-04  Tom Tromey  <tom@tromey.com>
8042
8043         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8044         Add missing "break".
8045         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8046         Add missing "break".
8047
8048 2018-05-04  Tom Tromey  <tom@tromey.com>
8049
8050         * rs6000-tdep.c (ppc_process_record_op4)
8051         (ppc_process_record_op63): Add fall-through comment.
8052
8053 2018-05-04  Tom Tromey  <tom@tromey.com>
8054
8055         * i386-tdep.c (i386_process_record): Add fall-through comment.
8056
8057 2018-05-04  Tom Tromey  <tom@tromey.com>
8058
8059         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8060         comment.
8061
8062 2018-05-04  Tom Tromey  <tom@tromey.com>
8063
8064         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8065         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8066         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8067         comment.
8068         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8069         comment.
8070         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8071         comment.
8072
8073 2018-05-04  Tom Tromey  <tom@tromey.com>
8074
8075         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8076
8077 2018-05-04  Tom Tromey  <tom@tromey.com>
8078
8079         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8080         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8081         * symfile.c (section_is_mapped): Fix fall-through comment.
8082         * stabsread.c (define_symbol, read_member_functions): Fix
8083         fall-through comment.
8084         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8085         comment.
8086         * remote.c (remote_wait_as): Fix fall-through comment.
8087         * p-exp.y (yylex): Fix fall-through comment.
8088         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8089         comment.
8090         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8091         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8092         * jv-exp.y (yylex): Fix fall-through comment.
8093         * go-exp.y (lex_one_token): Fix fall-through comment.
8094         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8095         fall-through comment.
8096         * f-exp.y (yylex): Fix fall-through comment.
8097         * dwarf2read.c (process_die): Fix fall-through comments.
8098         * dbxread.c (process_one_symbol): Fix fall-through comment.
8099         * d-exp.y (lex_one_token): Fix fall-through comment.
8100         * cp-name-parser.y (yylex): Fix fall-through comment.
8101         * coffread.c (coff_symtab_read): Fix fall-through comment.
8102         * c-exp.y (lex_one_token): Fix fall-through comment.
8103         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8104         comment.
8105         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8106         comment.
8107
8108 2018-05-04  Tom Tromey  <tom@tromey.com>
8109
8110         PR python/22730:
8111         * NEWS: Mention gdb.execute change.
8112         * gdbcmd.h (execute_control_command): Don't declare.
8113         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8114         execute_control_commands, execute_control_commands_to_string.
8115         * cli/cli-script.h (execute_control_commands)
8116         (execute_control_commands_to_string): Declare.
8117         (execute_control_command): Add from_tty parameter.
8118         * cli/cli-script.c (execute_control_commands)
8119         (execute_control_commands_to_string): New functions.
8120         (execute_user_command): Use execute_control_commands.
8121         (execute_control_command_1): Add "from_tty" parameter.  Update.
8122         (execute_control_command): Likewise.
8123
8124 2018-05-04  Tom Tromey  <tom@tromey.com>
8125
8126         PR python/22731:
8127         * NEWS: Mention that breakpoint commands are writable.
8128         * python/py-breakpoint.c (bppy_set_commands): New function.
8129         (breakpoint_object_getset) <"commands">: Use it.
8130
8131 2018-05-04  Tom Tromey  <tom@tromey.com>
8132
8133         * tracepoint.c (actions_command): Update.
8134         * mi/mi-cmd-break.c (mi_command_line_array)
8135         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8136         (mi_read_next_line): Remove.
8137         (mi_cmd_break_commands): Update.
8138         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8139         function_view.
8140         * cli/cli-script.c (get_command_line): Update.
8141         (process_next_line): Use function_view.  Constify.
8142         (recurse_read_control_structure, read_command_lines)
8143         (read_command_lines_1): Change argument types to function_view.
8144         (do_define_command, document_command): Update.
8145         * breakpoint.h (check_tracepoint_command): Don't declare.
8146         * breakpoint.c (check_tracepoint_command): Remove.
8147         (commands_command_1, create_tracepoint_from_upload): Update.
8148
8149 2018-05-04  Tom Tromey  <tom@tromey.com>
8150
8151         PR gdb/11750:
8152         * cli/cli-script.h (enum command_control_type) <define_control>:
8153         New constant.
8154         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8155         (build_command_line, execute_control_command_1)
8156         (process_next_line): Likewise.
8157         (do_define_command): New function, extracted from define_command.
8158         (define_command): Use it.
8159
8160 2018-05-04  Tom Tromey  <tom@tromey.com>
8161
8162         * tracepoint.c (actions_command): Update.
8163         * cli/cli-script.h (read_command_lines): Update.
8164         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8165         (MAX_TMPBUF): Remove define.
8166         (define_command): Use string_printf.
8167         (document_command): Likewise.
8168         * breakpoint.c (commands_command_1): Update.
8169
8170 2018-05-04  Tom Tromey  <tom@tromey.com>
8171
8172         * top.c (execute_command): Update.
8173         * cli/cli-script.h (print_command_lines): Now varargs.
8174         * cli/cli-script.c (print_command_lines): Now varargs.
8175         (execute_control_command_1) <case while_control, case if_control>:
8176         Update.
8177
8178 2018-05-04  Tom Tromey  <tom@tromey.com>
8179
8180         * tracepoint.c (all_tracepoint_actions): Rename from
8181         all_tracepoint_actions_and_cleanup.  Change return type.
8182         (actions_command, encode_actions_1, encode_actions)
8183         (trace_dump_actions, tdump_command): Update.
8184         * remote.c (remote_download_command_source): Update.
8185         * python/python.c (gdbpy_eval_from_control_command)
8186         (python_command, python_interactive_command): Update.
8187         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8188         * guile/guile.c (guile_command)
8189         (gdbscm_eval_from_control_command, guile_command): Update.
8190         * compile/compile.c (compile_code_command)
8191         (compile_print_command, compile_to_object): Update.
8192         * cli/cli-script.h (struct command_lines_deleter): New.
8193         (counted_command_line): New typedef.
8194         (struct command_line): Add constructor, destructor.
8195         <body_list>: Remove.
8196         <body_list_0, body_list_1>: New members.
8197         (command_line_up): Remove typedef.
8198         (read_command_lines, read_command_lines_1, get_command_line):
8199         Update.
8200         (copy_command_lines): Don't declare.
8201         * cli/cli-script.c (build_command_line): Use "new".
8202         (get_command_line): Return counted_command_line.
8203         (print_command_lines, execute_user_command)
8204         (execute_control_command_1, while_command, if_command): Update.
8205         (realloc_body_list): Remove.
8206         (process_next_line, recurse_read_control_structure): Update.
8207         (read_command_lines, read_command_lines_1): Return counted_command_line.
8208         (free_command_lines): Use "delete".
8209         (copy_command_lines): Remove.
8210         (define_command, document_command, show_user_1): Update.
8211         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8212         a counted_command_line.
8213         * breakpoint.h (counted_command_line): Remove typedef.
8214         (breakpoint_set_commands): Update.
8215         * breakpoint.c (check_no_tracepoint_commands)
8216         (validate_commands_for_breakpoint): Update.
8217         (breakpoint_set_commands): Change commands to be a
8218         counted_command_line.
8219         (commands_command_1, update_dprintf_command_list)
8220         (create_tracepoint_from_upload): Update.
8221
8222 2018-05-04  Tom Tromey  <tom@tromey.com>
8223
8224         * cli/cli-decode.h (cmd_list_element): New constructor.
8225         (~cmd_list_element): New destructor.
8226         (struct cmd_list_element): Add initializers.
8227         * cli/cli-decode.c (do_add_cmd): Use "new".
8228         (delete_cmd): Use "delete".
8229
8230 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8231             Pedro Alves <palves@redhat.com>
8232
8233         PR breakpoints/19806 and support for PR external/20207.
8234         * NEWS: Mention Aarch64 watchpoint improvements.
8235         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8236         watchpoints and PR external/20207 watchpoints.
8237         * nat/aarch64-linux-hw-point.c
8238         (kernel_supports_any_contiguous_range): New.
8239         (aarch64_watchpoint_offset): New.
8240         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8241         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8242         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8243         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8244         next_addr_orig_p.  Support PR external/20207 watchpoints.
8245         (aarch64_downgrade_regs): New.
8246         (aarch64_dr_state_insert_one_point): New parameters offset and
8247         addr_orig.
8248         (aarch64_dr_state_remove_one_point): Likewise.
8249         (aarch64_handle_breakpoint): Update caller.
8250         (aarch64_handle_aligned_watchpoint): Likewise.
8251         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8252         aligned_offset.
8253         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8254         aarch64_downgrade_regs.
8255         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8256         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8257         (DR_CONTROL_MASK): ... this.
8258         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8259         (unsigned int aarch64_watchpoint_offset): New prototype.
8260         (aarch64_linux_set_debug_regs): Remove const from state.
8261         * utils.c (align_up, align_down): Move to ...
8262         * common/common-utils.c (align_up, align_down): ... here.
8263         * utils.h (align_up, align_down): Move to ...
8264         * common/common-utils.h (align_up, align_down): ... here.
8265
8266 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8267
8268         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8269         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8270         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8271         Re-implement to match the ABI as summarized in GCC's
8272         gcc/config/sparc/sparc.c.  All callers updated.
8273         (sparc32_store_arguments): Remove assertion.
8274
8275 2018-05-04  Tom Tromey  <tom@tromey.com>
8276
8277         * printcmd.c: Don't include tui.h.
8278         (decode_format): Use skip_spaces.
8279
8280 2018-05-04  Tom Tromey  <tom@tromey.com>
8281
8282         PR gdb/22619:
8283         * printcmd.c (last_count): New global.
8284         (x_command): Use saved count when repeating.
8285
8286 2018-05-04  Tom Tromey  <tom@tromey.com>
8287
8288         * nto-procfs.c (do_closedir_cleanup): Remove.
8289         (procfs_pidlist): Use gdb_dir_up.
8290         * procfs.c (do_closedir_cleanup): Remove.
8291         (proc_update_threads): Use gdb_dir_up.
8292         * common/filestuff.h (struct gdb_dir_deleter): New.
8293         (gdb_dir_up): New typedef.
8294
8295 2018-05-04  Tom Tromey  <tom@tromey.com>
8296
8297         * ada-lang.c (print_mention_exception): Use std::string.
8298
8299 2018-05-04  Tom Tromey  <tom@tromey.com>
8300
8301         * ada-lang.c (create_excep_cond_exprs): Update.
8302         (ada_exception_catchpoint_cond_string): Use std::string.
8303
8304 2018-05-04  Tom Tromey  <tom@tromey.com>
8305
8306         * ada-lang.c (xget_renaming_scope): Return std::string.
8307         (old_renaming_is_invisible): Update.
8308
8309 2018-05-04  Tom Tromey  <tom@tromey.com>
8310
8311         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8312         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8313
8314 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8315
8316         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8317
8318 2018-05-04  Tom Tromey  <tom@tromey.com>
8319
8320         * remote.c (remote_query_supported_append): Change type.
8321         (remote_check_symbols): Update.
8322
8323 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8324
8325         PR gdb/11420
8326         * configure.ac: Prepend libpython.
8327         * python/python-config.py: Likewise.
8328         * configure: Regenerate.
8329
8330 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8331
8332         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8333
8334 2018-05-03  Pedro Alves  <palves@redhat.com>
8335
8336         * s390-linux-nat.c
8337         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8338         override.  Write 'true' instead of '1'.
8339         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8340         declaration.
8341
8342 2018-05-02  Pedro Alves  <palves@redhat.com>
8343
8344         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8345         add_inf_child_target.
8346         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8347         add_inf_child_target.
8348         * aix-thread.c (aix_thread_target_info): New.
8349         (aix_thread_target) <shortname, longname, doc>: Delete.
8350         <info>: New.
8351         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8352         add_inf_child_target.
8353         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8354         add_inf_child_target.
8355         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8356         add_inf_child_target.
8357         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8358         add_inf_child_target.
8359         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8360         add_inf_child_target.
8361         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8362         add_inf_child_target.
8363         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8364         add_inf_child_target.
8365         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8366         add_inf_child_target.
8367         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8368         add_inf_child_target.
8369         * bfd-target.c (target_bfd_target_info): New.
8370         (target_bfd) <shortname, longname, doc>: Delete.
8371         <info>: New.
8372         * bsd-kvm.c (bsd_kvm_target_info): New.
8373         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8374         <info>: New.
8375         (bsd_kvm_target::open): Rename to ...
8376         (bsd_kvm_target_open): ... this.  Adjust.
8377         * bsd-uthread.c (bsd_uthread_target_info): New.
8378         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8379         <info>: New.
8380         * corefile.c (core_file_command): Adjust.
8381         * corelow.c (core_target_info): New.
8382         (core_target) <shortname, longname, doc>: Delete.
8383         <info>: New.
8384         (core_target::open): Rename to ...
8385         (core_target_open): ... this.  Adjust.
8386         * ctf.c (ctf_target_info): New.
8387         (ctf_target) <shortname, longname, doc>: Delete.
8388         <info>: New.
8389         (ctf_target::open): Rename to ...
8390         (ctf_target_open): ... this.
8391         (_initialize_ctf): Adjust.
8392         * exec.c (exec_target_info): New.
8393         (exec_target) <shortname, longname, doc>: Delete.
8394         <info>: New.
8395         (exec_target::open): Rename to ...
8396         (exec_target_open): ... this.
8397         * gdbcore.h (core_target_open): Declare.
8398         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8399         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8400         add_inf_child_target.
8401         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8402         add_inf_child_target.
8403         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8404         add_inf_child_target.
8405         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8406         add_inf_child_target.
8407         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8408         add_inf_child_target.
8409         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8410         add_inf_child_target.
8411         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8412         add_inf_child_target.
8413         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8414         add_inf_child_target.
8415         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8416         add_inf_child_target.
8417         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8418         add_inf_child_target.
8419         * inf-child.c (inf_child_target_info): New.
8420         (inf_child_target::info): New.
8421         (inf_child_open_target): Remove 'target' parameter.  Use
8422         get_native_target instead.
8423         (inf_child_target::open): Delete.
8424         (add_inf_child_target): New.
8425         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8426         Delete.
8427         <info>: New.
8428         (add_inf_child_target): Declare.
8429         (inf_child_open_target): Declare.
8430         * linux-thread-db.c (thread_db_target_info): New.
8431         (thread_db_target) <shortname, longname, doc>: Delete.
8432         <info>: New.
8433         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8434         add_inf_child_target.
8435         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8436         add_inf_child_target.
8437         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8438         add_inf_child_target.
8439         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8440         add_inf_child_target.
8441         * make-target-delegates (print_class): Adjust.
8442         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8443         add_inf_child_target.
8444         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8445         add_inf_child_target.
8446         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8447         add_inf_child_target.
8448         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8449         add_inf_child_target.
8450         * nto-procfs.c (nto_native_target_info): New.
8451         (nto_procfs_target_native) <shortname, longname, doc>:
8452         Delete.
8453         <info>: New.
8454         (nto_procfs_target_info): New.
8455         (nto_procfs_target_procfs) <shortname, longname, doc>:
8456         Delete.
8457         <info>: New.
8458         (init_procfs_targets): Adjust.
8459         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8460         add_inf_child_target.
8461         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8462         add_inf_child_target.
8463         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8464         add_inf_child_target.
8465         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8466         add_inf_child_target.
8467         * ravenscar-thread.c (ravenscar_target_info): New.
8468         (ravenscar_thread_target) <shortname, longname, doc>:
8469         Delete.
8470         <info>: New.
8471         * record-btrace.c (record_btrace_target_info):
8472         (record_btrace_target) <shortname, longname, doc>: Delete.
8473         <info>: New.
8474         (record_btrace_target::open): Rename to ...
8475         (record_btrace_target_open): ... this.  Adjust.
8476         * record-full.c (record_longname, record_doc): New.
8477         (record_full_base_target) <shortname, longname, doc>: Delete.
8478         <info>: New.
8479         (record_full_target_info): New.
8480         (record_full_target): <shortname>: Delete.
8481         <info>: New.
8482         (record_full_core_open_1, record_full_open_1): Update comments.
8483         (record_full_base_target::open): Rename to ...
8484         (record_full_open): ... this.
8485         (cmd_record_full_restore): Update.
8486         (_initialize_record_full): Update.
8487         * remote-sim.c (remote_sim_target_info): New.
8488         (gdbsim_target) <shortname, longname, doc>: Delete.
8489         <info>: New.
8490         (gdbsim_target::open): Rename to ...
8491         (gdbsim_target_open): ... this.
8492         (_initialize_remote_sim): Adjust.
8493         * remote.c (remote_doc): New.
8494         (remote_target_info): New.
8495         (remote_target) <shortname, longname, doc>: Delete.
8496         <info>: New.
8497         (extended_remote_target_info): New.
8498         (extended_remote_target) <shortname, longname, doc>: Delete.
8499         <info>: New.
8500         (remote_target::open_1): Make static.  Adjust.
8501         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8502         * s390-linux-nat.c (_initialize_s390_nat): Use
8503         add_inf_child_target.
8504         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8505         add_inf_child_target.
8506         * sol-thread.c (thread_db_target_info): New.
8507         (sol_thread_target) <shortname, longname, doc>: Delete.
8508         <info>: New.
8509         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8510         add_inf_child_target.
8511         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8512         add_inf_child_target.
8513         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8514         add_inf_child_target.
8515         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8516         add_inf_child_target.
8517         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8518         add_inf_child_target.
8519         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8520         add_inf_child_target.
8521         * spu-linux-nat.c (_initialize_spu_nat): Use
8522         add_inf_child_target.
8523         * spu-multiarch.c (spu_multiarch_target_info): New.
8524         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8525         <info>: New.
8526         * target-delegates.c: Regenerate.
8527         * target.c: Include <unordered_map>.
8528         (target_ops_p): Delete.
8529         (DEF_VEC_P(target_ops_p)): Delete.
8530         (target_factories): New.
8531         (test_target_info): New.
8532         (test_target_ops::info): New.
8533         (open_target): Adjust to use target_factories.
8534         (add_target_with_completer): Rename to ...
8535         (add_target): ... this.  Change prototype.  Register target_info
8536         and open callback in target_factories.  Register target_info in
8537         command context instead of target_ops.
8538         (add_target): Delete old implementation.
8539         (add_deprecated_target_alias): Change prototype.  Adjust.
8540         (the_native_target): New.
8541         (set_native_target, get_native_target): New.
8542         (find_default_run_target): Use the_native_target.
8543         (find_attach_target, find_run_target): Simplify.
8544         (target_ops::open): Delete.
8545         (dummy_target_info): New.
8546         (dummy_target::shortname, dummy_target::longname)
8547         (dummy_target::doc): Delete.
8548         (dummy_target::info): New.
8549         (debug_target::shortname, debug_target::longname)
8550         (debug_target::doc): Delete.
8551         (debug_target::info): New.
8552         * target.h (struct target_info): New.
8553         (target_ops::~target_ops): Add comment.
8554         (target_ops::info): New.
8555         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8556         longer virtual.  Implement in terms of target_info.
8557         (set_native_target, get_native_target): Declare.
8558         (target_open_ftype): New.
8559         (add_target, add_target_with_completer)
8560         (add_deprecated_target_alias): Change prototype.
8561         (test_target) <shortname, longname, doc>: Delete.
8562         <info>: New.
8563         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8564         add_inf_child_target.
8565         * tracefile-tfile.c (tfile_target_info): New.
8566         (tfile_target) <shortname, longname, doc>: Delete.
8567         <info>: New.
8568         (tfile_target::open): Rename to ...
8569         (tfile_target_open): ... this.
8570         (_initialize_tracefile_tfile): Adjust.
8571         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8572         add_inf_child_target.
8573         * windows-nat.c (_initialize_windows_nat): Use
8574         add_inf_child_target.
8575         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8576         add_inf_child_target.
8577
8578 2018-05-02  Pedro Alves  <palves@redhat.com>
8579
8580         * linux-nat.h (linux_nat_target) <low_new_thread,
8581         low_delete_thread, low_new_fork, low_forget_process,
8582         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8583         New virtual methods.
8584         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8585         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8586         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8587         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8588         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8589         Delete.
8590         * linux-fork.c (delete_fork): Adjust to call low method.
8591         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8592         (linux_nat_new_fork, linux_nat_forget_process_hook)
8593         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8594         (linux_nat_status_is_event):
8595         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8596         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8597         to call low method.
8598         (sigtrap_is_event): Rename to ...
8599         (linux_nat_target::low_status_is_event): ... this.
8600         (linux_nat_set_status_is_event): Delete.
8601         (save_stop_reason, linux_nat_wait_1)
8602         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8603         low methods.
8604         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8605         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8606         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8607         (linux_nat_set_prepare_to_resume): Delete.
8608         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8609         low virtual methods.
8610         * amd64-linux-nat.c: Likewise.
8611         * arm-linux-nat.c: Likewise.
8612         * i386-linux-nat.c: Likewise.
8613         * ia64-linux-nat.c: Likewise.
8614         * mips-linux-nat.c: Likewise.
8615         * ppc-linux-nat.c: Likewise.
8616         * s390-linux-nat.c: Likewise.
8617         * sparc64-linux-nat.c: Likewise.
8618         * x86-linux-nat.c: Likewise.
8619         * x86-linux-nat.h: Include "nat/x86-linux.h".
8620         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8621         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8622         Override methods.
8623
8624 2018-05-02  Pedro Alves  <palves@redhat.com>
8625
8626         * target.h (target_ops)
8627         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8628         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8629         stopped_by_watchpoint, have_continuable_watchpoint,
8630         stopped_data_address, watchpoint_addr_within_range,
8631         can_accel_watchpoint_condition, can_run, thread_alive,
8632         has_all_memory, has_memory, has_stack, has_registers,
8633         has_execution, can_async_p, is_async_p, supports_non_stop,
8634         always_non_stop_p, can_execute_reverse, supports_multi_process,
8635         supports_enable_disable_tracepoint,
8636         supports_disable_randomization, supports_string_tracing,
8637         supports_evaluation_of_breakpoint_conditions,
8638         can_run_breakpoint_commands, filesystem_is_local,
8639         can_download_tracepoint, get_trace_state_variable_value,
8640         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8641         record_is_replaying, record_will_replay,
8642         augmented_libraries_svr4_read>: Adjust to return bool.
8643         * aarch64-linux-nat.c: All implementations adjusted.
8644         * aix-thread.c: All implementations adjusted.
8645         * arm-linux-nat.c: All implementations adjusted.
8646         * breakpoint.c: All implementations adjusted.
8647         * bsd-kvm.c: All implementations adjusted.
8648         * bsd-uthread.c: All implementations adjusted.
8649         * corelow.c: All implementations adjusted.
8650         * ctf.c: All implementations adjusted.
8651         * darwin-nat.c: All implementations adjusted.
8652         * darwin-nat.h: All implementations adjusted.
8653         * exec.c: All implementations adjusted.
8654         * fbsd-nat.c: All implementations adjusted.
8655         * fbsd-nat.h: All implementations adjusted.
8656         * gnu-nat.c: All implementations adjusted.
8657         * gnu-nat.h: All implementations adjusted.
8658         * go32-nat.c: All implementations adjusted.
8659         * ia64-linux-nat.c: All implementations adjusted.
8660         * inf-child.c: All implementations adjusted.
8661         * inf-child.h: All implementations adjusted.
8662         * inf-ptrace.c: All implementations adjusted.
8663         * inf-ptrace.h: All implementations adjusted.
8664         * linux-nat.c: All implementations adjusted.
8665         * linux-nat.h: All implementations adjusted.
8666         * mips-linux-nat.c: All implementations adjusted.
8667         * nto-procfs.c: All implementations adjusted.
8668         * ppc-linux-nat.c: All implementations adjusted.
8669         * procfs.c: All implementations adjusted.
8670         * ravenscar-thread.c: All implementations adjusted.
8671         * record-btrace.c: All implementations adjusted.
8672         * record-full.c: All implementations adjusted.
8673         * remote-sim.c: All implementations adjusted.
8674         * remote.c: All implementations adjusted.
8675         * s390-linux-nat.c: All implementations adjusted.
8676         * sol-thread.c: All implementations adjusted.
8677         * spu-multiarch.c: All implementations adjusted.
8678         * target-delegates.c: All implementations adjusted.
8679         * target.c: All implementations adjusted.
8680         * target.h: All implementations adjusted.
8681         * tracefile-tfile.c: All implementations adjusted.
8682         * tracefile.c: All implementations adjusted.
8683         * tracefile.h: All implementations adjusted.
8684         * windows-nat.c: All implementations adjusted.
8685         * x86-linux-nat.h: All implementations adjusted.
8686         * x86-nat.h: All implementations adjusted.
8687
8688 2018-05-02  Pedro Alves  <palves@redhat.com>
8689
8690         * make-target-delegates (scan_target_h): Don't trim lines here.
8691         Replace sequences of tabs and/or whitespace with a single
8692         whitespace.
8693         (top level, parsing methods): Trim each line before processing it
8694         here.
8695
8696 2018-05-02  Pedro Alves  <palves@redhat.com>
8697             John Baldwin  <jhb@freebsd.org>
8698
8699         * target.h (enum strata) <debug_stratum>: New.
8700         (struct target_ops) <all delegation methods>: Replace by C++
8701         virtual methods, and drop "to_" prefix.  All references updated
8702         throughout.
8703         <to_shortname, to_longname, to_doc, to_data,
8704         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8705         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8706         virtual methods.  All references updated throughout.
8707         <can_attach, supports_terminal_ours, can_create_inferior,
8708         get_thread_control_capabilities, attach_no_wait>: New
8709         virtual methods.
8710         <insert_breakpoint, remove_breakpoint>: Now
8711         TARGET_DEFAULT_NORETURN methods.
8712         <info_proc>: Now returns bool.
8713         <to_magic>: Delete.
8714         (OPS_MAGIC): Delete.
8715         (current_target): Delete.  All references replaced by references
8716         to ...
8717         (target_stack): ... this.  New.
8718         (target_shortname, target_longname): Adjust.
8719         (target_can_run): Now a function declaration.
8720         (default_child_has_all_memory, default_child_has_memory)
8721         (default_child_has_stack, default_child_has_registers)
8722         (default_child_has_execution): Remove target_ops parameter.
8723         (complete_target_initialization): Delete.
8724         (memory_breakpoint_target): New template class.
8725         (test_target_ops): Refactor as a C++ class with virtual methods.
8726         * make-target-delegates (NAME_PART): Tighten.
8727         (POINTER_PART, CP_SYMBOL): New.
8728         (SIMPLE_RETURN_PART): Reimplement.
8729         (VEC_RETURN_PART): Expect less.
8730         (RETURN_PART, VIRTUAL_PART): New.
8731         (METHOD): Adjust to C++ virtual methods.
8732         (scan_target_h): Remove reference to C99.
8733         (dname): Output "target_ops::" prefix.
8734         (write_function_header): Adjust to output a C++ class method.
8735         (write_declaration): New.
8736         (write_delegator): Adjust to output a C++ class method.
8737         (tdname): Output "dummy_target::" prefix.
8738         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8739         method.
8740         (tdefault_names, debug_names): Delete.
8741         (return_types, tdefaults, styles, argtypes_array): New.
8742         (top level): All methods are delegators.
8743         (print_class): New.
8744         (top level): Print dummy_target and debug_target classes.
8745         * target-delegates.c: Regenerate.
8746         * target-debug.h (target_debug_print_enum_info_proc_what)
8747         (target_debug_print_thread_control_capabilities)
8748         (target_debug_print_thread_info_p): New.
8749         * target.c (dummy_target): Delete.
8750         (the_dummy_target, the_debug_target): New.
8751         (target_stack): Now extern.
8752         (set_targetdebug): Push/unpush debug target.
8753         (default_child_has_all_memory, default_child_has_memory)
8754         (default_child_has_stack, default_child_has_registers)
8755         (default_child_has_execution): Remove target_ops parameter.
8756         (complete_target_initialization): Delete.
8757         (add_target_with_completer): No longer call
8758         complete_target_initialization.
8759         (target_supports_terminal_ours): Use regular delegation.
8760         (update_current_target): Delete.
8761         (push_target): No longer check magic number.  Don't call
8762         update_current_target.
8763         (unpush_target): Don't call update_current_target.
8764         (target_is_pushed): No longer check magic number.
8765         (target_require_runnable): Skip for all stratums over
8766         process_stratum.
8767         (target_ops::info_proc): New.
8768         (target_info_proc): Use find_target_at and
8769         find_default_run_target.
8770         (target_supports_disable_randomization): Use regular delegation.
8771         (target_get_osdata): Use find_target_at.
8772         (target_ops::open, target_ops::close, target_ops::can_attach)
8773         (target_ops::attach, target_ops::can_create_inferior)
8774         (target_ops::create_inferior, target_ops::can_run)
8775         (target_can_run): New.
8776         (default_fileio_target): Use regular delegation.
8777         (target_ops::fileio_open, target_ops::fileio_pwrite)
8778         (target_ops::fileio_pread, target_ops::fileio_fstat)
8779         (target_ops::fileio_close, target_ops::fileio_unlink)
8780         (target_ops::fileio_readlink): New.
8781         (target_fileio_open_1, target_fileio_unlink)
8782         (target_fileio_readlink): Always call the target method.  Handle
8783         FILEIO_ENOSYS.
8784         (return_zero, return_zero_has_execution): Delete.
8785         (init_dummy_target): Delete.
8786         (dummy_target::dummy_target, dummy_target::shortname)
8787         (dummy_target::longname, dummy_target::doc)
8788         (debug_target::debug_target, debug_target::shortname)
8789         (debug_target::longname, debug_target::doc): New.
8790         (target_supports_delete_record): Use regular delegation.
8791         (setup_target_debug): Delete.
8792         (maintenance_print_target_stack): Skip debug_stratum.
8793         (initialize_targets): Instantiate the_dummy_target and
8794         the_debug_target.
8795         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8796         use target_stack.
8797         (target_auxv_search, fprint_target_auxv): Adjust.
8798         (info_auxv_command): Adjust to use target_stack.
8799         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8800         * exceptions.c (print_flush): Handle a NULL target_stack.
8801         * regcache.c (target_ops_no_register): Refactor as class with
8802         virtual methods.
8803
8804         * exec.c (exec_target): New class.
8805         (exec_ops): Now an exec_target.
8806         (exec_open, exec_close_1, exec_get_section_table)
8807         (exec_xfer_partial, exec_files_info, exec_has_memory)
8808         (exec_make_note_section): Refactor as exec_target methods.
8809         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8810         Delete.
8811         (exec_target::find_memory_regions): New.
8812         (_initialize_exec): Don't call init_exec_ops.
8813         * gdbcore.h (exec_file_clear): Delete.
8814
8815         * corefile.c (core_target): Delete.
8816         (core_file_command): Adjust.
8817         * corelow.c (core_target): New class.
8818         (the_core_target): New.
8819         (core_close): Remove target_ops parameter.
8820         (core_close_cleanup): Adjust.
8821         (core_target::close): New.
8822         (core_open, core_detach, get_core_registers, core_files_info)
8823         (core_xfer_partial, core_thread_alive, core_read_description)
8824         (core_pid_to_str, core_thread_name, core_has_memory)
8825         (core_has_stack, core_has_registers, core_info_proc): Rework as
8826         core_target methods.
8827         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8828         (_initialize_corelow): Initialize the_core_target.
8829         * gdbcore.h (core_target): Delete.
8830         (the_core_target): New.
8831
8832         * ctf.c: (ctf_target): New class.
8833         (ctf_ops): Now a ctf_target.
8834         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8835         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8836         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8837         methods.
8838         (init_ctf_ops): Delete.
8839         (_initialize_ctf): Don't call it.
8840         * tracefile-tfile.c (tfile_target): New class.
8841         (tfile_ops): Now a tfile_target.
8842         (tfile_open, tfile_close, tfile_files_info)
8843         (tfile_get_tracepoint_status, tfile_trace_find)
8844         (tfile_fetch_registers, tfile_xfer_partial)
8845         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8846         Refactor as tfile_target methods.
8847         (tfile_xfer_partial_features): Remove target_ops parameter.
8848         (init_tfile_ops): Delete.
8849         (_initialize_tracefile_tfile): Don't call it.
8850         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8851         (tracefile_has_stack, tracefile_has_registers)
8852         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8853         tracefile_target methods.
8854         (init_tracefile_ops): Delete.
8855         (tracefile_target::tracefile_target): New.
8856         * tracefile.h: Include "target.h".
8857         (tracefile_target): New class.
8858         (init_tracefile_ops): Delete.
8859
8860         * spu-multiarch.c (spu_multiarch_target): New class.
8861         (spu_ops): Now a spu_multiarch_target.
8862         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8863         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8864         (spu_search_memory, spu_mourn_inferior): Refactor as
8865         spu_multiarch_target methods.
8866         (init_spu_ops): Delete.
8867         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8868         complete_target_initialization.
8869
8870         * ravenscar-thread.c (ravenscar_thread_target): New class.
8871         (ravenscar_ops): Now a ravenscar_thread_target.
8872         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8873         (ravenscar_thread_alive, ravenscar_pid_to_str)
8874         (ravenscar_fetch_registers, ravenscar_store_registers)
8875         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8876         (ravenscar_stopped_by_hw_breakpoint)
8877         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8878         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8879         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8880         methods.
8881         (init_ravenscar_thread_ops): Delete.
8882         (_initialize_ravenscar): Remove references to
8883         init_ravenscar_thread_ops and complete_target_initialization.
8884
8885         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8886         (bsd_uthread_target): New class.
8887         (bsd_uthread_ops): Now a bsd_uthread_target.
8888         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8889         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8890         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8891         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8892         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8893         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8894         (bsd_uthread_target): Delete function.
8895         (_initialize_bsd_uthread): Remove reference to
8896         complete_target_initialization.
8897
8898         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8899         (target_bfd): ... this new class.
8900         (target_bfd_xfer_partial, target_bfd_get_section_table)
8901         (target_bfd_close): Refactor as target_bfd methods.
8902         (target_bfd::~target_bfd): New.
8903         (target_bfd_reopen): Adjust.
8904         (target_bfd::close): New.
8905
8906         * record-btrace.c (record_btrace_target): New class.
8907         (record_btrace_ops): Now a record_btrace_target.
8908         (record_btrace_open, record_btrace_stop_recording)
8909         (record_btrace_disconnect, record_btrace_close)
8910         (record_btrace_async, record_btrace_info)
8911         (record_btrace_insn_history, record_btrace_insn_history_range)
8912         (record_btrace_insn_history_from, record_btrace_call_history)
8913         (record_btrace_call_history_range)
8914         (record_btrace_call_history_from, record_btrace_record_method)
8915         (record_btrace_is_replaying, record_btrace_will_replay)
8916         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8917         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8918         (record_btrace_store_registers, record_btrace_prepare_to_store)
8919         (record_btrace_to_get_unwinder)
8920         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8921         (record_btrace_commit_resume, record_btrace_wait)
8922         (record_btrace_stop, record_btrace_can_execute_reverse)
8923         (record_btrace_stopped_by_sw_breakpoint)
8924         (record_btrace_supports_stopped_by_sw_breakpoint)
8925         (record_btrace_stopped_by_hw_breakpoint)
8926         (record_btrace_supports_stopped_by_hw_breakpoint)
8927         (record_btrace_update_thread_list, record_btrace_thread_alive)
8928         (record_btrace_goto_begin, record_btrace_goto_end)
8929         (record_btrace_goto, record_btrace_stop_replaying_all)
8930         (record_btrace_execution_direction)
8931         (record_btrace_prepare_to_generate_core)
8932         (record_btrace_done_generating_core): Refactor as
8933         record_btrace_target methods.
8934         (init_record_btrace_ops): Delete.
8935         (_initialize_record_btrace): Remove reference to
8936         init_record_btrace_ops.
8937         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8938         the execution_direction global.
8939         (record_full_base_target, record_full_target)
8940         (record_full_core_target): New classes.
8941         (record_full_ops): Now a record_full_target.
8942         (record_full_core_ops): Now a record_full_core_target.
8943         (record_full_target::detach, record_full_target::disconnect)
8944         (record_full_core_target::disconnect)
8945         (record_full_target::mourn_inferior, record_full_target::kill):
8946         New.
8947         (record_full_open, record_full_close, record_full_async): Refactor
8948         as methods of the record_full_base_target class.
8949         (record_full_resume, record_full_commit_resume): Refactor
8950         as methods of the record_full_target class.
8951         (record_full_wait, record_full_stopped_by_watchpoint)
8952         (record_full_stopped_data_address)
8953         (record_full_stopped_by_sw_breakpoint)
8954         (record_full_supports_stopped_by_sw_breakpoint)
8955         (record_full_stopped_by_hw_breakpoint)
8956         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8957         methods of the record_full_base_target class.
8958         (record_full_store_registers, record_full_xfer_partial)
8959         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8960         Refactor as methods of the record_full_target class.
8961         (record_full_can_execute_reverse, record_full_get_bookmark)
8962         (record_full_goto_bookmark, record_full_execution_direction)
8963         (record_full_record_method, record_full_info, record_full_delete)
8964         (record_full_is_replaying, record_full_will_replay)
8965         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8966         (record_full_stop_replaying): Refactor as methods of the
8967         record_full_base_target class.
8968         (record_full_core_resume, record_full_core_kill)
8969         (record_full_core_fetch_registers)
8970         (record_full_core_prepare_to_store)
8971         (record_full_core_store_registers, record_full_core_xfer_partial)
8972         (record_full_core_insert_breakpoint)
8973         (record_full_core_remove_breakpoint)
8974         (record_full_core_has_execution): Refactor
8975         as methods of the record_full_core_target class.
8976         (record_full_base_target::supports_delete_record): New.
8977         (init_record_full_ops): Delete.
8978         (init_record_full_core_ops): Delete.
8979         (record_full_save): Refactor as method of the
8980         record_full_base_target class.
8981         (_initialize_record_full): Remove references to
8982         init_record_full_ops and init_record_full_core_ops.
8983
8984         * remote.c (remote_target, extended_remote_target): New classes.
8985         (remote_ops): Now a remote_target.
8986         (extended_remote_ops): Now an extended_remote_target.
8987         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8988         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8989         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8990         (remote_pass_signals, remote_set_syscall_catchpoint)
8991         (remote_program_signals, )
8992         (remote_thread_always_alive): Remove target_ops parameter.
8993         (remote_thread_alive, remote_thread_name)
8994         (remote_update_thread_list, remote_threads_extra_info)
8995         (remote_static_tracepoint_marker_at)
8996         (remote_static_tracepoint_markers_by_strid)
8997         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8998         (remote_open): Refactor as methods of remote_target.
8999         (extended_remote_open, extended_remote_detach)
9000         (extended_remote_attach, extended_remote_post_attach):
9001         (extended_remote_supports_disable_randomization)
9002         (extended_remote_create_inferior): : Refactor as method of
9003         extended_remote_target.
9004         (remote_set_permissions, remote_open_1, remote_detach)
9005         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9006         (remote_resume, remote_commit_resume, remote_stop)
9007         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9008         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9009         (remote_prepare_to_store, remote_store_registers)
9010         (remote_flash_erase, remote_flash_done, remote_files_info)
9011         (remote_kill, remote_mourn, remote_insert_breakpoint)
9012         (remote_remove_breakpoint, remote_insert_watchpoint)
9013         (remote_watchpoint_addr_within_range)
9014         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9015         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9016         (remote_supports_stopped_by_sw_breakpoint)
9017         (remote_stopped_by_hw_breakpoint)
9018         (remote_supports_stopped_by_hw_breakpoint)
9019         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9020         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9021         (remote_verify_memory): Refactor as methods of remote_target.
9022         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9023         parameter.
9024         (remote_xfer_partial, remote_get_memory_xfer_limit)
9025         (remote_search_memory, remote_rcmd, remote_memory_map)
9026         (remote_pid_to_str, remote_get_thread_local_address)
9027         (remote_get_tib_address, remote_read_description): Refactor as
9028         methods of remote_target.
9029         (remote_target::fileio_open, remote_target::fileio_pwrite)
9030         (remote_target::fileio_pread, remote_target::fileio_close): New.
9031         (remote_hostio_readlink, remote_hostio_fstat)
9032         (remote_filesystem_is_local, remote_can_execute_reverse)
9033         (remote_supports_non_stop, remote_supports_disable_randomization)
9034         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9035         (remote_supports_enable_disable_tracepoint)
9036         (remote_supports_string_tracing)
9037         (remote_can_run_breakpoint_commands, remote_trace_init)
9038         (remote_download_tracepoint, remote_can_download_tracepoint)
9039         (remote_download_trace_state_variable, remote_enable_tracepoint)
9040         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9041         (remote_trace_start, remote_get_trace_status)
9042         (remote_get_tracepoint_status, remote_trace_stop)
9043         (remote_trace_find, remote_get_trace_state_variable_value)
9044         (remote_save_trace_data, remote_get_raw_trace_data)
9045         (remote_set_disconnected_tracing, remote_core_of_thread)
9046         (remote_set_circular_trace_buffer, remote_traceframe_info)
9047         (remote_get_min_fast_tracepoint_insn_len)
9048         (remote_set_trace_buffer_size, remote_set_trace_notes)
9049         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9050         (remote_disable_btrace, remote_teardown_btrace)
9051         (remote_read_btrace, remote_btrace_conf)
9052         (remote_augmented_libraries_svr4_read, remote_load)
9053         (remote_pid_to_exec_file, remote_can_do_single_step)
9054         (remote_execution_direction, remote_thread_handle_to_thread_info):
9055         Refactor as methods of remote_target.
9056         (init_remote_ops, init_extended_remote_ops): Delete.
9057         (remote_can_async_p, remote_is_async_p, remote_async)
9058         (remote_thread_events, remote_upload_tracepoints)
9059         (remote_upload_trace_state_variables): Refactor as methods of
9060         remote_target.
9061         (_initialize_remote): Remove references to init_remote_ops and
9062         init_extended_remote_ops.
9063
9064         * remote-sim.c (gdbsim_target): New class.
9065         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9066         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9067         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9068         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9069         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9070         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9071         Refactor as methods of gdbsim_target.
9072         (gdbsim_ops): Now a gdbsim_target.
9073         (init_gdbsim_ops): Delete.
9074         (gdbsim_cntrl_c): Adjust.
9075         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9076
9077         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9078         (the_amd64_linux_nat_target): New.
9079         (amd64_linux_fetch_inferior_registers)
9080         (amd64_linux_store_inferior_registers): Refactor as methods of
9081         amd64_linux_nat_target.
9082         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9083         * i386-linux-nat.c: Don't include "linux-nat.h".
9084         (i386_linux_nat_target): New class.
9085         (the_i386_linux_nat_target): New.
9086         (i386_linux_fetch_inferior_registers)
9087         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9088         as methods of i386_linux_nat_target.
9089         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9090         * inf-child.c (inf_child_ops): Delete.
9091         (inf_child_fetch_inferior_registers)
9092         (inf_child_store_inferior_registers): Delete.
9093         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9094         methods of inf_child_target.
9095         (inf_child_target::supports_terminal_ours)
9096         (inf_child_target::terminal_init)
9097         (inf_child_target::terminal_inferior)
9098         (inf_child_target::terminal_ours_for_output)
9099         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9100         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9101         New.
9102         (inf_child_open, inf_child_disconnect, inf_child_close)
9103         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9104         (inf_child_post_startup_inferior, inf_child_can_run)
9105         (inf_child_pid_to_exec_file): Refactor as methods of
9106         inf_child_target.
9107         (inf_child_follow_fork): Delete.
9108         (inf_child_target::can_create_inferior)
9109         (inf_child_target::can_attach): New.
9110         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9111         (inf_child_target::has_stack, inf_child_target::has_registers)
9112         (inf_child_target::has_execution): New.
9113         (inf_child_fileio_open, inf_child_fileio_pwrite)
9114         (inf_child_fileio_pread, inf_child_fileio_fstat)
9115         (inf_child_fileio_close, inf_child_fileio_unlink)
9116         (inf_child_fileio_readlink, inf_child_use_agent)
9117         (inf_child_can_use_agent): Refactor as methods of
9118         inf_child_target.
9119         (return_zero, inf_child_target): Delete.
9120         (inf_child_target::inf_child_target): New.
9121         * inf-child.h: Include "target.h".
9122         (inf_child_target): Delete function prototype.
9123         (inf_child_target): New class.
9124         (inf_child_open_target, inf_child_mourn_inferior)
9125         (inf_child_maybe_unpush_target): Delete.
9126         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9127         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9128         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9129         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9130         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9131         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9132         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9133         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9134         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9135         methods of inf_ptrace_target.
9136         (inf_ptrace_target): Delete function.
9137         * inf-ptrace.h: Include "inf-child.h".
9138         (inf_ptrace_target): Delete function declaration.
9139         (inf_ptrace_target): New class.
9140         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9141         * linux-nat.c (linux_target): New.
9142         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9143         (linux_nat_target::~linux_nat_target): New.
9144         (linux_child_post_attach, linux_child_post_startup_inferior)
9145         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9146         (linux_child_remove_fork_catchpoint)
9147         (linux_child_insert_vfork_catchpoint)
9148         (linux_child_remove_vfork_catchpoint)
9149         (linux_child_insert_exec_catchpoint)
9150         (linux_child_remove_exec_catchpoint)
9151         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9152         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9153         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9154         (linux_nat_stopped_data_address)
9155         (linux_nat_stopped_by_sw_breakpoint)
9156         (linux_nat_supports_stopped_by_sw_breakpoint)
9157         (linux_nat_stopped_by_hw_breakpoint)
9158         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9159         (linux_nat_kill, linux_nat_mourn_inferior)
9160         (linux_nat_xfer_partial, linux_nat_thread_alive)
9161         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9162         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9163         (linux_child_static_tracepoint_markers_by_strid)
9164         (linux_nat_is_async_p, linux_nat_can_async_p)
9165         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9166         (linux_nat_supports_multi_process)
9167         (linux_nat_supports_disable_randomization, linux_nat_async)
9168         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9169         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9170         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9171         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9172         methods of linux_nat_target.
9173         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9174         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9175         parameter.
9176         (check_stopped_by_watchpoint): Adjust.
9177         (linux_xfer_partial): Delete.
9178         (linux_target_install_ops, linux_target, linux_nat_add_target):
9179         Delete.
9180         (linux_nat_target::linux_nat_target): New.
9181         * linux-nat.h: Include "inf-ptrace.h".
9182         (linux_nat_target): New.
9183         (linux_target, linux_target_install_ops, linux_nat_add_target):
9184         Delete function declarations.
9185         (linux_target): Declare global.
9186         * linux-thread-db.c (thread_db_target): New.
9187         (thread_db_target::thread_db_target): New.
9188         (thread_db_ops): Delete.
9189         (the_thread_db_target): New.
9190         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9191         (thread_db_update_thread_list, thread_db_pid_to_str)
9192         (thread_db_extra_thread_info)
9193         (thread_db_thread_handle_to_thread_info)
9194         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9195         (thread_db_resume): Refactor as methods of thread_db_target.
9196         (init_thread_db_ops): Delete.
9197         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9198         * x86-linux-nat.c: Don't include "linux-nat.h".
9199         (super_post_startup_inferior): Delete.
9200         (x86_linux_nat_target::~x86_linux_nat_target): New.
9201         (x86_linux_child_post_startup_inferior)
9202         (x86_linux_read_description, x86_linux_enable_btrace)
9203         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9204         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9205         methods of x86_linux_nat_target.
9206         (x86_linux_create_target): Delete.  Bits folded ...
9207         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9208         pointer.
9209         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9210         (x86_linux_nat_target): New class.
9211         (x86_linux_create_target): Delete.
9212         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9213         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9214         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9215         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9216         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9217         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9218         make extern.
9219         (x86_use_watchpoints): Delete.
9220         * x86-nat.h: Include "breakpoint.h" and "target.h".
9221         (x86_use_watchpoints): Delete.
9222         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9223         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9224         (x86_insert_watchpoint, x86_remove_watchpoint)
9225         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9226         (x86_stopped_by_hw_breakpoint): New declarations.
9227         (x86_nat_target): New template class.
9228
9229         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9230         (the_ppc_linux_nat_target): New.
9231         (ppc_linux_fetch_inferior_registers)
9232         (ppc_linux_can_use_hw_breakpoint)
9233         (ppc_linux_region_ok_for_hw_watchpoint)
9234         (ppc_linux_ranged_break_num_registers)
9235         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9236         (ppc_linux_insert_mask_watchpoint)
9237         (ppc_linux_remove_mask_watchpoint)
9238         (ppc_linux_can_accel_watchpoint_condition)
9239         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9240         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9241         (ppc_linux_watchpoint_addr_within_range)
9242         (ppc_linux_masked_watch_num_registers)
9243         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9244         (ppc_linux_read_description): Refactor as methods of
9245         ppc_linux_nat_target.
9246         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9247
9248         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9249         (procfs_target): New class.
9250         (the_procfs_target): New.
9251         (procfs_target): Delete function.
9252         (procfs_auxv_parse, procfs_attach, procfs_detach)
9253         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9254         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9255         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9256         (procfs_create_inferior, procfs_update_thread_list)
9257         (procfs_thread_alive, procfs_pid_to_str)
9258         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9259         (procfs_stopped_data_address, procfs_insert_watchpoint)
9260         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9261         (proc_find_memory_regions, procfs_info_proc)
9262         (procfs_make_note_section): Refactor as methods of procfs_target.
9263         (_initialize_procfs): Adjust.
9264         * sol-thread.c (sol_thread_target): New class.
9265         (sol_thread_ops): Now a sol_thread_target.
9266         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9267         (sol_thread_fetch_registers, sol_thread_store_registers)
9268         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9269         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9270         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9271         (init_sol_thread_ops): Delete.
9272         (_initialize_sol_thread): Adjust.  Remove references to
9273         init_sol_thread_ops and complete_target_initialization.
9274
9275         * windows-nat.c (windows_nat_target): New class.
9276         (windows_fetch_inferior_registers)
9277         (windows_store_inferior_registers, windows_resume, windows_wait)
9278         (windows_attach, windows_detach, windows_pid_to_exec_file)
9279         (windows_files_info, windows_create_inferior)
9280         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9281         (windows_close, windows_pid_to_str, windows_xfer_partial)
9282         (windows_get_tib_address, windows_get_ada_task_ptid)
9283         (windows_thread_name, windows_thread_alive): Refactor as
9284         windows_nat_target methods.
9285         (do_initial_windows_stuff): Adjust.
9286         (windows_target): Delete function.
9287         (_initialize_windows_nat): Adjust.
9288
9289         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9290         (darwin_mourn_inferior, darwin_kill_inferior)
9291         (darwin_create_inferior, darwin_attach, darwin_detach)
9292         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9293         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9294         (darwin_supports_multi_process): Refactor as darwin_nat_target
9295         methods.
9296         (darwin_resume_to, darwin_files_info): Delete.
9297         (_initialize_darwin_inferior): Rename to ...
9298         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9299         * darwin-nat.h: Include "inf-child.h".
9300         (darwin_nat_target): New class.
9301         (darwin_complete_target): Delete.
9302         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9303         (darwin_target): New.
9304         (i386_darwin_fetch_inferior_registers)
9305         (i386_darwin_store_inferior_registers): Refactor as methods of
9306         darwin_nat_target.
9307         (darwin_complete_target): Delete, with ...
9308         (_initialize_i386_darwin_nat): ... bits factored out here.
9309
9310         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9311         (the_alpha_linux_nat_target): New.
9312         (alpha_linux_register_u_offset): Refactor as
9313         alpha_linux_nat_target method.
9314         (_initialize_alpha_linux_nat): Adjust.
9315         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9316         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9317         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9318         methods of linux_nat_trad_target.
9319         (linux_trad_target): Delete.
9320         * linux-nat-trad.h (linux_trad_target): Delete function.
9321         (linux_nat_trad_target): New class.
9322         * mips-linux-nat.c (mips_linux_nat_target): New class.
9323         (super_fetch_registers, super_store_registers, super_close):
9324         Delete.
9325         (the_mips_linux_nat_target): New.
9326         (mips64_linux_regsets_fetch_registers)
9327         (mips64_linux_regsets_store_registers)
9328         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9329         (mips_linux_register_u_offset, mips_linux_read_description)
9330         (mips_linux_can_use_hw_breakpoint)
9331         (mips_linux_stopped_by_watchpoint)
9332         (mips_linux_stopped_data_address)
9333         (mips_linux_region_ok_for_hw_watchpoint)
9334         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9335         (mips_linux_close): Refactor as methods of mips_linux_nat.
9336         (_initialize_mips_linux_nat): Adjust to C++ification.
9337
9338         * aix-thread.c (aix_thread_target): New class.
9339         (aix_thread_ops): Now an aix_thread_target.
9340         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9341         (aix_thread_fetch_registers, aix_thread_store_registers)
9342         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9343         (aix_thread_thread_alive, aix_thread_pid_to_str)
9344         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9345         Refactor as methods of aix_thread_target.
9346         (init_aix_thread_ops): Delete.
9347         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9348         and complete_target_initialization.
9349         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9350         (rs6000_nat_target): New class.
9351         (the_rs6000_nat_target): New.
9352         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9353         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9354         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9355         (super_create_inferior): Delete.
9356         (_initialize_rs6000_nat): Adjust to C++ification.
9357
9358         * arm-linux-nat.c (arm_linux_nat_target): New class.
9359         (the_arm_linux_nat_target): New.
9360         (arm_linux_fetch_inferior_registers)
9361         (arm_linux_store_inferior_registers, arm_linux_read_description)
9362         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9363         (arm_linux_remove_hw_breakpoint)
9364         (arm_linux_region_ok_for_hw_watchpoint)
9365         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9366         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9367         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9368         arm_linux_nat_target.
9369         (_initialize_arm_linux_nat): Adjust to C++ification.
9370
9371         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9372         (the_aarch64_linux_nat_target): New.
9373         (aarch64_linux_fetch_inferior_registers)
9374         (aarch64_linux_store_inferior_registers)
9375         (aarch64_linux_child_post_startup_inferior)
9376         (aarch64_linux_read_description)
9377         (aarch64_linux_can_use_hw_breakpoint)
9378         (aarch64_linux_insert_hw_breakpoint)
9379         (aarch64_linux_remove_hw_breakpoint)
9380         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9381         (aarch64_linux_region_ok_for_hw_watchpoint)
9382         (aarch64_linux_stopped_data_address)
9383         (aarch64_linux_stopped_by_watchpoint)
9384         (aarch64_linux_watchpoint_addr_within_range)
9385         (aarch64_linux_can_do_single_step): Refactor as methods of
9386         aarch64_linux_nat_target.
9387         (super_post_startup_inferior): Delete.
9388         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9389
9390         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9391         (the_hppa_linux_nat_target): New.
9392         (hppa_linux_fetch_inferior_registers)
9393         (hppa_linux_store_inferior_registers): Refactor as methods of
9394         hppa_linux_nat_target.
9395         (_initialize_hppa_linux_nat): Adjust to C++ification.
9396
9397         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9398         (the_ia64_linux_nat_target): New.
9399         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9400         (ia64_linux_stopped_data_address)
9401         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9402         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9403         ia64_linux_nat_target methods.
9404         (super_xfer_partial): Delete.
9405         (_initialize_ia64_linux_nat): Adjust to C++ification.
9406
9407         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9408         (the_m32r_linux_nat_target): New.
9409         (m32r_linux_fetch_inferior_registers)
9410         (m32r_linux_store_inferior_registers): Refactor as
9411         m32r_linux_nat_target methods.
9412         (_initialize_m32r_linux_nat): Adjust to C++ification.
9413
9414         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9415         (the_m68k_linux_nat_target): New.
9416         (m68k_linux_fetch_inferior_registers)
9417         (m68k_linux_store_inferior_registers): Refactor as
9418         m68k_linux_nat_target methods.
9419         (_initialize_m68k_linux_nat): Adjust to C++ification.
9420
9421         * s390-linux-nat.c (s390_linux_nat_target): New class.
9422         (the_s390_linux_nat_target): New.
9423         (s390_linux_fetch_inferior_registers)
9424         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9425         (s390_insert_watchpoint, s390_remove_watchpoint)
9426         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9427         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9428         (s390_auxv_parse, s390_read_description): Refactor as methods of
9429         s390_linux_nat_target.
9430         (_initialize_s390_nat): Adjust to C++ification.
9431
9432         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9433         (the_sparc_linux_nat_target): New.
9434         (_initialize_sparc_linux_nat): Adjust to C++ification.
9435         * sparc-nat.c (sparc_fetch_inferior_registers)
9436         (sparc_store_inferior_registers): Remove target_ops parameter.
9437         * sparc-nat.h (sparc_fetch_inferior_registers)
9438         (sparc_store_inferior_registers): Remove target_ops parameter.
9439         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9440         (the_sparc64_linux_nat_target): New.
9441         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9442
9443         * spu-linux-nat.c (spu_linux_nat_target): New class.
9444         (the_spu_linux_nat_target): New.
9445         (spu_child_post_startup_inferior, spu_child_post_attach)
9446         (spu_child_wait, spu_fetch_inferior_registers)
9447         (spu_store_inferior_registers, spu_xfer_partial)
9448         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9449         methods.
9450         (_initialize_spu_nat): Adjust to C++ification.
9451
9452         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9453         (the_tilegx_linux_nat_target): New.
9454         (fetch_inferior_registers, store_inferior_registers):
9455         Refactor as methods.
9456         (_initialize_tile_linux_nat): Adjust to C++ification.
9457
9458         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9459         (the_xtensa_linux_nat_target): New.
9460         (xtensa_linux_fetch_inferior_registers)
9461         (xtensa_linux_store_inferior_registers): Refactor as
9462         xtensa_linux_nat_target methods.
9463         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9464
9465         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9466         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9467         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9468         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9469         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9470         (fbsd_stopped_by_sw_breakpoint)
9471         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9472         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9473         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9474         (fbsd_post_startup_inferior, fbsd_post_attach)
9475         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9476         (fbsd_set_syscall_catchpoint)
9477         (super_xfer_partial, super_resume, super_wait)
9478         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9479         (fbsd_handle_debug_trap): Remove target_ops parameter.
9480         (fbsd_nat_add_target): Delete.
9481         * fbsd-nat.h: Include "inf-ptrace.h".
9482         (fbsd_nat_add_target): Delete.
9483         (USE_SIGTRAP_SIGINFO): Define.
9484         (fbsd_nat_target): New class.
9485
9486         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9487         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9488         (amd64bsd_target): Delete.
9489         * amd64-bsd-nat.h: New file.
9490         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9491         "x86-bsd-nat.h".
9492         (amd64_fbsd_nat_target): New class.
9493         (the_amd64_fbsd_nat_target): New.
9494         (amd64fbsd_read_description): Refactor as method of
9495         amd64_fbsd_nat_target.
9496         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9497         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9498         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9499         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9500         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9501         (i386bsd_target): Delete.
9502         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9503         (i386bsd_fetch_inferior_registers)
9504         (i386bsd_store_inferior_registers): Declare.
9505         (i386_bsd_nat_target): New class.
9506         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9507         (the_i386_fbsd_nat_target): New.
9508         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9509         i386_fbsd_nat_target methods.
9510         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9511         (_initialize_i386fbsd_nat): Adjust to C++ification.
9512         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9513         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9514         (_initialize_x86_bsd_nat): Adjust to C++ification.
9515         * x86-bsd-nat.h: Include "x86-nat.h".
9516         (x86bsd_target): Delete declaration.
9517         (x86bsd_nat_target): New class.
9518
9519         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9520         (the_aarch64_fbsd_nat_target): New.
9521         (aarch64_fbsd_fetch_inferior_registers)
9522         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9523         aarch64_fbsd_nat_target.
9524         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9525         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9526         (the_alpha_bsd_nat_target): New.
9527         (alphabsd_fetch_inferior_registers)
9528         (alphabsd_store_inferior_registers): Refactor as
9529         alpha_bsd_nat_target methods.
9530         (_initialize_alphabsd_nat): Refactor as methods of
9531         alpha_bsd_nat_target.
9532         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9533         (the_amd64_nbsd_nat_target): New.
9534         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9535         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9536         (the_amd64_obsd_nat_target): New.
9537         (_initialize_amd64obsd_nat): Adjust to C++ification.
9538         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9539         (the_arm_fbsd_nat_target): New.
9540         (arm_fbsd_fetch_inferior_registers)
9541         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9542         (_initialize_arm_fbsd_nat): Refactor as methods of
9543         arm_fbsd_nat_target.
9544         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9545         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9546         (the_arm_netbsd_nat_target): New.
9547         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9548         arm_netbsd_nat_target.
9549         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9550         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9551         (the_hppa_nbsd_nat_target): New.
9552         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9553         hppa_nbsd_nat_target methods.
9554         (_initialize_hppanbsd_nat): Adjust to C++ification.
9555         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9556         (the_hppa_obsd_nat_target): New.
9557         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9558         methods of hppa_obsd_nat_target.
9559         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9560         add_target.
9561         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9562         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9563         add_target.
9564         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9565         (_initialize_i386obsd_nat): Use add_target.
9566         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9567         (the_m68k_bsd_nat_target): New.
9568         (m68kbsd_fetch_inferior_registers)
9569         (m68kbsd_store_inferior_registers): Refactor as methods of
9570         m68k_bsd_nat_target.
9571         (_initialize_m68kbsd_nat): Adjust to C++ification.
9572         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9573         (the_mips_fbsd_nat_target): New.
9574         (mips_fbsd_fetch_inferior_registers)
9575         (mips_fbsd_store_inferior_registers): Refactor as methods of
9576         mips_fbsd_nat_target.
9577         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9578         add_target.
9579         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9580         (the_mips_nbsd_nat_target): New.
9581         (mipsnbsd_fetch_inferior_registers)
9582         (mipsnbsd_store_inferior_registers): Refactor as methods of
9583         mips_nbsd_nat_target.
9584         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9585         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9586         (the_mips64_obsd_nat_target): New.
9587         (mips64obsd_fetch_inferior_registers)
9588         (mips64obsd_store_inferior_registers): Refactor as methods of
9589         mips64_obsd_nat_target.
9590         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9591         add_target.
9592         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9593         nbsd_nat_target.
9594         * nbsd-nat.h: Include "inf-ptrace.h".
9595         (nbsd_nat_target): New class.
9596         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9597         (obsd_wait): Refactor as methods of obsd_nat_target.
9598         (obsd_add_target): Delete.
9599         * obsd-nat.h: Include "inf-ptrace.h".
9600         (obsd_nat_target): New class.
9601         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9602         (the_ppc_fbsd_nat_target): New.
9603         (ppcfbsd_fetch_inferior_registers)
9604         (ppcfbsd_store_inferior_registers): Refactor as methods of
9605         ppc_fbsd_nat_target.
9606         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9607         add_target.
9608         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9609         (the_ppc_nbsd_nat_target): New.
9610         (ppcnbsd_fetch_inferior_registers)
9611         (ppcnbsd_store_inferior_registers): Refactor as methods of
9612         ppc_nbsd_nat_target.
9613         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9614         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9615         (the_ppc_obsd_nat_target): New.
9616         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9617         methods of ppc_obsd_nat_target.
9618         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9619         add_target.
9620         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9621         (the_sh_nbsd_nat_target): New.
9622         (shnbsd_fetch_inferior_registers)
9623         (shnbsd_store_inferior_registers): Refactor as methods of
9624         sh_nbsd_nat_target.
9625         (_initialize_shnbsd_nat): Adjust to C++ification.
9626         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9627         (inf_ptrace_xfer_partial): Delete.
9628         (sparc_xfer_partial, sparc_target): Delete.
9629         * sparc-nat.h (sparc_fetch_inferior_registers)
9630         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9631         (sparc_target): Delete function declaration.
9632         (sparc_target): New template class.
9633         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9634         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9635         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9636         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9637         add_target.
9638         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9639         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9640         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9641         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9642         add_target.
9643         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9644         (the_vax_bsd_nat_target): New.
9645         (vaxbsd_fetch_inferior_registers)
9646         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9647         methods.
9648         (_initialize_vaxbsd_nat): Adjust to C++ification.
9649
9650         * bsd-kvm.c (bsd_kvm_target): New class.
9651         (bsd_kvm_ops): Now a bsd_kvm_target.
9652         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9653         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9654         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9655         bsd_kvm_target.
9656         (bsd_kvm_return_one): Delete.
9657         (bsd_kvm_add_target): Adjust to C++ification.
9658
9659         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9660         (nto_procfs_target_procfs): New classes.
9661         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9662         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9663         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9664         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9665         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9666         (procfs_remove_hw_breakpoint, procfs_resume)
9667         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9668         (procfs_kill_inferior, procfs_store_registers)
9669         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9670         as methods of nto_procfs_target.
9671         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9672         (nto_native_ops): Delete.
9673         (procfs_open, procfs_native_open): Delete.
9674         (nto_native_ops): Now an nto_procfs_target_native.
9675         (init_procfs_targets): Adjust to C++ification.
9676         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9677         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9678         Refactor as methods of nto_procfs_target.
9679
9680         * go32-nat.c (go32_nat_target): New class.
9681         (the_go32_nat_target): New.
9682         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9683         (go32_store_registers, go32_xfer_partial, go32_files_info)
9684         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9685         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9686         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9687         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9688         (go32_target): Delete.
9689         (_initialize_go32_nat): Adjust to C++ification.
9690
9691         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9692         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9693         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9694         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9695         gnu_nat_target.
9696         (gnu_target): Delete.
9697         * gnu-nat.h (gnu_target): Delete.
9698         (gnu_nat_target): New class.
9699         * i386-gnu-nat.c (gnu_base_target): New.
9700         (i386_gnu_nat_target): New class.
9701         (the_i386_gnu_nat_target): New.
9702         (_initialize_i386gnu_nat): Adjust to C++ification.
9703
9704 2018-05-02  Pedro Alves  <palves@redhat.com>
9705
9706         * bfd-target.c (target_bfd_xclose): Rename to ...
9707         (target_bfd_close): ... this.
9708         (target_bfd_reopen): Adjust.
9709         * target.c (target_close): Remove references to to_xclose.
9710         * target.h (target_ops::to_xclose): Delete.
9711         (target_ops::to_close): Update comments.
9712
9713 2018-05-02  Pedro Alves  <palves@redhat.com>
9714
9715         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9716         "linux-nat.h".
9717         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9718         * inf-ptrace.c (inf_ptrace_register_u_offset)
9719         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9720         (inf_ptrace_store_register, inf_ptrace_store_registers)
9721         (inf_ptrace_trad_target): Move to ...
9722         * linux-nat-trad.c: ... this new file.
9723         * linux-nat-trad.h: New file.
9724         * linux-nat.c (linux_target_install_ops): Make extern.
9725         (linux_trad_target): Delete.
9726         * linux-nat.h (linux_trad_target): Delete declaration.
9727         (linux_target_install_ops): Declare.
9728         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9729         "linux-nat.h".
9730
9731 2018-05-02  Pedro Alves  <palves@redhat.com>
9732
9733         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9734         procfs_target/add_target here.
9735         * procfs.c (procfs_target): Make static.
9736         (_initialize_procfs): Call add_target here.
9737         * procfs.h (struct target_ops): Remove forward declaration.
9738         (procfs_target): Remove declaration.
9739         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9740
9741 2018-05-02  Pedro Alves  <palves@redhat.com>
9742
9743         * procfs.c (procfs_stopped_by_watchpoint)
9744         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9745         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9746         Forward declare.
9747         (procfs_use_watchpoints): Delete, move contents...
9748         (procfs_target): ... here.
9749         * procfs.h (procfs_use_watchpoints): Delete declaration.
9750         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9751         procfs_use_watchpoints.
9752         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9753         procfs_use_watchpoints.
9754
9755 2018-05-02  Tom Tromey  <tom@tromey.com>
9756
9757         PR python/20084:
9758         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9759         and var_zuinteger_unlimited.
9760         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9761         and PARAM_ZUINTEGER_UNLIMITED.
9762         (set_parameter_value): Handle var_zuinteger and
9763         var_zuinteger_unlimited.
9764         (add_setshow_generic): Likewise.
9765         (parmpy_init): Likewise.
9766
9767 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9768
9769         PR rust/23124
9770         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9771         pointer is not null before dereferencing it.
9772
9773 2018-04-30  Tom Tromey  <tom@tromey.com>
9774
9775         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9776         is_mi_like_p.
9777
9778 2018-04-30  Tom Tromey  <tom@tromey.com>
9779
9780         * breakpoint.c (mention): Remove use of is_mi_like_p.
9781         (print_mention_ranged_breakpoint): Likewise.
9782         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9783         of is_mi_like_p.
9784
9785 2018-04-30  Tom Tromey  <tom@tromey.com>
9786
9787         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9788
9789 2018-04-30  Tom Tromey  <tom@tromey.com>
9790
9791         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9792         (info_spu_event_command): Remove some uses of is_mi_like_p.
9793
9794 2018-04-30  Tom Tromey  <tom@tromey.com>
9795
9796         * python/py-framefilter.c (py_print_single_arg)
9797         (enumerate_locals, py_print_args, py_print_frame): Remove some
9798         uses of is_mi_like_p.
9799
9800 2018-04-30  Tom Tromey  <tom@tromey.com>
9801
9802         * ui-out.c: Update.
9803         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9804         * ui-out.h (ui_out::is_mi_like_p): Now const.
9805         (ui_out::do_is_mi_like_p): Now const.
9806         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9807
9808 2018-04-30  Tom Tromey  <tom@tromey.com>
9809
9810         * varobj.c (varobj_set_visualizer): Use new_reference.
9811         * python/python.c (gdbpy_decode_line): Use new_reference.
9812         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9813         new_reference.
9814
9815 2018-04-30  Tom Tromey  <tom@tromey.com>
9816
9817         * varobj.c (install_new_value): Use new_reference.
9818         * value.h (value_incref): Return void.  Swap intro comment with
9819         value_decref.
9820         * value.c (set_value_parent): Use new_reference.
9821         (value_incref): Return void.  Update intro comment.
9822         (release_value): Use new_reference.
9823         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9824
9825 2018-04-30  Tom Tromey  <tom@tromey.com>
9826
9827         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9828         * gdb_bfd.h (new_bfd_ref): Remove.
9829         (gdb_bfd_open): Update comment.
9830         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9831         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9832         (gdb_bfd_fdopenr): Use new_reference.
9833         * exec.c (exec_file_attach): Use new_reference.
9834
9835 2018-04-30  Tom Tromey  <tom@tromey.com>
9836
9837         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9838         method.
9839
9840 2018-04-30  Tom Tromey  <tom@tromey.com>
9841
9842         * jit.c (jit_read_code_entry): Use type_align.
9843         * i386-tdep.c (i386_gdbarch_init): Don't call
9844         set_gdbarch_long_long_align_bit.
9845         * gdbarch.sh: Remove long_long_align_bit.
9846         * gdbarch.c, gdbarch.h: Rebuild.
9847         * arc-tdep.c (arc_type_align): New function.
9848         (arc_gdbarch_init): Use arc_type_align.  Don't call
9849         set_gdbarch_long_long_align_bit.
9850
9851 2018-04-30  Tom Tromey  <tom@tromey.com>
9852
9853         * rust-lang.c (rust_type_alignment): Remove.
9854         (rust_composite_type): Use type_align.
9855
9856 2018-04-30  Tom Tromey  <tom@tromey.com>
9857
9858         * NEWS: Mention Type.align.
9859         * python/py-type.c (typy_get_alignof): New function.
9860         (type_object_getset): Add "alignof".
9861
9862 2018-04-30  Tom Tromey  <tom@tromey.com>
9863
9864         PR exp/17095:
9865         * NEWS: Update.
9866         * std-operator.def (UNOP_ALIGNOF): New operator.
9867         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9868         New.
9869         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9870         * c-lang.c (c_op_print_tab): Add alignof.
9871         * c-exp.y (ALIGNOF): New token.
9872         (exp): Add "ALIGNOF" production.
9873         (ident_tokens): Add _Alignof and alignof.
9874
9875 2018-04-30  Tom Tromey  <tom@tromey.com>
9876
9877         * i386-tdep.c (i386_type_align): New function.
9878         (i386_gdbarch_init): Update.
9879         * gdbarch.sh (type_align): New method.
9880         * gdbarch.c, gdbarch.h: Rebuild.
9881         * arch-utils.h (default_type_align): Declare.
9882         * arch-utils.c (default_type_align): New function.
9883         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9884         (struct type) <align_log2>: New field.
9885         <instance_flags>: Now a bitfield.
9886         (TYPE_RAW_ALIGN): New macro.
9887         (type_align, type_raw_align, set_type_align): Declare.
9888         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9889         functions.
9890         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9891         (get_alignment, maybe_set_alignment): New functions.
9892         (read_structure_type, read_enumeration_type, read_array_type)
9893         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9894         (read_subrange_type, read_base_type): Set type alignment.
9895
9896 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9897
9898         * dwarf2read.c (read_index_from_section): Use bool.
9899
9900 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9901
9902         PR gdb/22950
9903         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9904         with #ifdef.
9905
9906 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9907
9908         PR build/22873
9909         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9910         last step, and do it atomically.
9911
9912 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9913
9914         * compile/compile-c-types.c (convert_int, convert_float):
9915         Update for C FE v1.
9916
9917 2018-04-27  Tom Tromey  <tom@tromey.com>
9918
9919         PR rust/22545:
9920         * rust-lang.c (rust_inclusive_range_type_p): New function.
9921         (rust_range): Handle inclusive ranges.
9922         (rust_compute_range): Likewise.
9923         * rust-exp.y (struct rust_op) <inclusive>: New field.
9924         (DOTDOTEQ): New constant.
9925         (range_expr): Add "..=" productions.
9926         (operator_tokens): Add "..=" token.
9927         (ast_range): Add "inclusive" parameter.
9928         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9929         ranges.
9930         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9931         bounds values.
9932         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9933         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9934         Update comments.
9935         * expprint.c (print_subexp_standard): Handle new bounds values.
9936         (dump_subexp_body_standard): Likewise.
9937
9938 2018-04-27  Tom Tromey  <tom@tromey.com>
9939
9940         * configure: Rebuild.
9941         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9942         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9943         "OVERRIDE".
9944         (class symbol_needs_eval_context): Likewise.
9945         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9946         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9947         "virtual".
9948         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9949         "override".
9950         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9951         * aarch64-tdep.c (instruction_reader::read): Use "override".
9952         (instruction_reader_test::read): Likewise.
9953         * arm-tdep.c (instruction_reader::read): Use "override".
9954         (instruction_reader_thumb::read): Likewise.
9955
9956 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9957
9958         PR remote/9665
9959         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9960         instead of remote_send.
9961         (remote_send): Remove.
9962
9963 2018-04-26  Pedro Alves  <palves@redhat.com>
9964
9965         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9966         find_function_start_sal instead of find_pc_line.
9967
9968 2018-04-26  Pedro Alves  <palves@redhat.com>
9969
9970         * breakpoint.c (set_breakpoint_location_function): Handle
9971         mst_data_gnu_ifunc.
9972         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9973         * elfread.c (elf_symtab_read): Give data symbols with
9974         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9975         (elf_rel_plt_read): Update comment.
9976         * linespec.c (convert_linespec_to_sals): Handle
9977         mst_data_gnu_ifunc.
9978         (minsym_found): Handle mst_data_gnu_ifunc.
9979         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9980         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9981         * parse.c (find_minsym_type_and_address): Handle
9982         mst_data_gnu_ifunc.
9983         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9984         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9985         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9986         comment.
9987         <mst_data_gnu_ifunc>: New enumerator.
9988
9989 2018-04-26  Pedro Alves  <palves@redhat.com>
9990
9991         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9992         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9993         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9994         Handle it.
9995         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9996         (lookup_minimal_symbol_by_pc): Adjust.
9997         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9998         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9999         * minsyms.h (lookup_msym_prefer): New enum.
10000         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10001         parameter by a lookup_msym_prefer parameter.
10002
10003 2018-04-26  Pedro Alves  <palves@redhat.com>
10004
10005         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10006         ends in "@plt" instead of looking at the symbol's section.
10007
10008 2018-04-26  Pedro Alves  <palves@redhat.com>
10009
10010         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10011         all references.
10012         (find_pc_partial_function_gnu_ifunc): Rename to ...
10013         (find_pc_partial_function): ... this, and remove references to
10014         'is_gnu_ifunc_p'.
10015         (find_pc_partial_function): Delete old implementation.
10016         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10017
10018 2018-04-26  Pedro Alves  <palves@redhat.com>
10019
10020         * linespec.c (struct bound_minimal_symbol_search_key): New.
10021         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10022         skip first line if we found a GNU ifunc minimal symbol by name.
10023         (compare_msymbols): Change parameters to work with a destructured
10024         lhs minsym.
10025         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10026         functions.
10027
10028 2018-04-26  Pedro Alves  <palves@redhat.com>
10029
10030         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10031         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10032         address/name.
10033         (add_location_to_breakpoint): Store the minsym and the objfile in
10034         the breakpoint location.
10035         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10036         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10037         Record the minsym in the sal.
10038         * symtab.h (symtab_and_line) <msymbol>: New field.
10039
10040 2018-04-26  Pedro Alves  <palves@redhat.com>
10041
10042         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10043         unless we actually resolved the ifunc.
10044
10045 2018-04-26  Pedro Alves  <palves@redhat.com>
10046
10047         * c-exp.y (variable production): Prefer ifunc minsyms over
10048         regular function symbols.
10049         * symtab.c (find_gnu_ifunc): New function.
10050         * minsyms.h (lookup_msym_prefer): New enum.
10051         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10052         parameter by a lookup_msym_prefer parameter.
10053         * symtab.h (find_gnu_ifunc): New declaration.
10054
10055 2018-04-26  Pedro Alves  <palves@redhat.com>
10056
10057         * blockframe.c (find_gnu_ifunc_target_type): New function.
10058         (find_function_type): New.
10059         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10060         return a value with a memory address.
10061         (eval_call): For calls to GNU ifunc functions, try to find the
10062         type of the target function from the type that the resolver
10063         returns.
10064         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10065         symbols.
10066         * infcall.c (find_function_return_type): Delete.
10067         (find_function_addr): Add 'function_type' parameter.  For calls to
10068         GNU ifunc functions, try to find the type of the target function
10069         from the type that the resolver returns, and return it via
10070         FUNCTION_TYPE.
10071         (call_function_by_hand_dummy): Adjust to use the function type
10072         returned by find_function_addr.
10073         (find_function_addr): Add 'function_type' parameter and move
10074         description here.
10075         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10076         declarations.
10077
10078 2018-04-26  Pedro Alves  <palves@redhat.com>
10079
10080         * c-exp.y (variable production): Skip finding an alias for ifunc
10081         symbols.
10082
10083 2018-04-26  Pedro Alves  <palves@redhat.com>
10084
10085         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10086
10087 2018-04-25  Pedro Alves  <palves@redhat.com>
10088
10089         * infcmd.c (kill_command): Print the pid as string, not the whole
10090         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10091         message.
10092         * remote.c (remote_detach_1): Print the pid as string, not the
10093         whole thread's ptid.
10094
10095 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10096             Sergio Durigan Junior  <sergiodj@redhat.com>
10097             Pedro Alves  <palves@redhat.com>
10098
10099         * infcmd.c (kill_command): Print message when inferior has
10100         been killed.
10101         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10102         '1'.
10103         (add_inferior): Improve message printed when
10104         'print_inferior_events' is on.
10105         (exit_inferior): Remove message printed when
10106         'print_inferior_events' is on.
10107         (detach_inferior): Improve message printed when
10108         'print_inferior_events' is on.
10109         (initialize_inferiors): Use 'add_inferior_silent' to set
10110         'current_inferior_'.
10111         * inferior.h (print_inferior_events): Declare here as
10112         'extern'.
10113         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10114         '[Detaching...]' messages when 'print_inferior_events' is on.
10115         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10116         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10117         'Detaching after fork from child...', replace it by '... from
10118         parent...'.
10119         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10120         prefix/suffix when printing 'Detaching...' messages.  Print
10121         them when 'print_inferior_events' is on.
10122         * remote.c (remote_detach_1): Print message when detaching
10123         from inferior and '!is_fork_parent'.
10124
10125 2018-04-24  Tom Tromey  <tom@tromey.com>
10126
10127         * cli-out.h: Reindent.
10128
10129 2018-04-24  Tom Tromey  <tom@tromey.com>
10130
10131         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10132         (cli_ui_out::do_field_string): Use fputs_filtered.
10133         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10134
10135 2018-04-23  Tom Tromey  <tom@tromey.com>
10136
10137         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10138         gdb::unique_xmalloc_ptr.
10139
10140 2018-04-23  Tom Tromey  <tom@tromey.com>
10141
10142         * configure: Rebuild.
10143
10144 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10145
10146         PR gdb/23095
10147         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10148         prepare_for_testing.  Set normal_bp to r_debug_state if target
10149         is bsd.
10150
10151 2018-04-21  Pedro Alves  <palves@redhat.com>
10152             Rajendra SY  <rajendra.sy@gmail.com>
10153
10154         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10155         * remote.c (extended_remote_attach): In all-stop mode, mark the
10156         thread as executing.
10157
10158 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10159
10160         * thread.c (thread_apply_all_command): Fix comment.
10161         (thread_command): Fix comment.
10162
10163 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10164
10165         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10166         parameter.
10167         * features/aarch64-core.c (create_feature_aarch64_core):
10168         Regenerate.
10169         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10170         Likewise.
10171         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10172         Likewise.
10173         * features/i386/32bit-avx512.c
10174         (create_feature_i386_32bit_avx512): Likewise.
10175         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10176         Likewise.
10177         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10178         Likewise.
10179         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10180         Likewise.
10181         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10182         Likewise.
10183         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10184         Likewise.
10185         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10186         Likewise.
10187         * features/i386/64bit-avx512.c
10188         (create_feature_i386_64bit_avx512): Likewise.
10189         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10190         Likewise.
10191         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10192         Likewise.
10193         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10194         Likewise.
10195         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10196         Likewise.
10197         * features/i386/64bit-segments.c
10198         (create_feature_i386_64bit_segments): Likewise.
10199         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10200         Likewise.
10201         * features/i386/x32-core.c
10202         (create_feature_i386_x32_core): Likewise.
10203         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10204         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10205         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10206         * target-descriptions.c: In generated code, don't pass xml
10207         filename.
10208
10209 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10210
10211         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10212         (print_xml_feature::visit_post): Likewise.
10213         (print_xml_feature::visit): Likewise.
10214         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10215         (print_xml_feature): Add new class.
10216         * regformats/regdat.sh: Null xmltarget on feature targets.
10217         * target-descriptions.c (struct target_desc): Add xmltarget.
10218         (maintenance_check_tdesc_xml_convert): Add unittest function.
10219         (tdesc_get_features_xml): Add function to get xml.
10220         (maintenance_check_xml_descriptions): Test xml generation.
10221         * xml-tdesc.c (string_read_description_xml): Add function.
10222         * xml-tdesc.h (string_read_description_xml): Add declaration.
10223
10224 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10225
10226         * features/Makefile: Add feature marker to targets with new style
10227         target descriptions.
10228         * regformats/aarch64.dat: Regenerate.
10229         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10230         * regformats/i386/amd64-avx-linux.dat: Likewise.
10231         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10232         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10233         * regformats/i386/amd64-linux.dat: Likewise.
10234         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10235         * regformats/i386/amd64.dat: Likewise.
10236         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10237         * regformats/i386/i386-avx-linux.dat: Likewise.
10238         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10239         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10240         * regformats/i386/i386-linux.dat: Likewise.
10241         * regformats/i386/i386-mmx-linux.dat: Likewise.
10242         * regformats/i386/i386-mpx-linux.dat: Likewise.
10243         * regformats/i386/i386.dat: Likewise.
10244         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10245         * regformats/i386/x32-avx-linux.dat: Likewise.
10246         * regformats/i386/x32-linux.dat: Likewise.
10247         * regformats/tic6x-c62x-linux.dat: Likewise.
10248         * regformats/tic6x-c64x-linux.dat: Likewise.
10249         * regformats/tic6x-c64xp-linux.dat: Likewise.
10250         * regformats/regdat.sh: Parse feature marker.
10251
10252 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10253
10254         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10255         (tdesc_osabi_name): Likewise.
10256         * target-descriptions.c (tdesc_architecture_name): Add new
10257         function.
10258         (tdesc_osabi_name): Likewise.
10259
10260 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10261
10262         * common/tdesc.c (tdesc_predefined_type): Move to here.
10263         (tdesc_named_type): Likewise.
10264         (tdesc_create_vector): Likewise.
10265         (tdesc_create_struct): Likewise.
10266         (tdesc_set_struct_size): Likewise.
10267         (tdesc_create_union): Likewise.
10268         (tdesc_create_flags): Likewise.
10269         (tdesc_create_enum): Likewise.
10270         (tdesc_add_field): Likewise.
10271         (tdesc_add_typed_bitfield): Likewise.
10272         (tdesc_add_bitfield): Likewise.
10273         (tdesc_add_flag): Likewise.
10274         (tdesc_add_enum_value): Likewise.
10275         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10276         (struct tdesc_type_vector): Likewise.
10277         (struct tdesc_type_field): Likewise.
10278         (struct tdesc_type_with_fields): Likewise.
10279         (tdesc_create_enum): Add declaration.
10280         (tdesc_add_typed_bitfield): Likewise.
10281         (tdesc_add_enum_value): Likewise.
10282         * target-descriptions.c (tdesc_type_field): Move from here.
10283         (tdesc_type_builtin): Likewise.
10284         (tdesc_type_vector): Likewise.
10285         (tdesc_type_with_fields): Likewise.
10286         (tdesc_predefined_types): Likewise.
10287         (tdesc_named_type): Likewise.
10288         (tdesc_create_vector): Likewise.
10289         (tdesc_create_struct): Likewise.
10290         (tdesc_set_struct_size): Likewise.
10291         (tdesc_create_union): Likewise.
10292         (tdesc_create_flags): Likewise.
10293         (tdesc_create_enum): Likewise.
10294         (tdesc_add_field): Likewise.
10295         (tdesc_add_typed_bitfield): Likewise.
10296         (tdesc_add_bitfield): Likewise.
10297         (tdesc_add_flag): Likewise.
10298         (tdesc_add_enum_value): Likewise.
10299         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10300         (tdesc_add_typed_bitfield): Likewise.
10301         (tdesc_add_enum_value): Likewise.
10302
10303 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10304
10305         * common/tdesc.c (tdesc_feature::accept): Move to here.
10306         (tdesc_feature::operator==): Likewise.
10307         (tdesc_create_reg): Likewise.
10308         * common/tdesc.h (tdesc_type_kind): Likewise.
10309         (struct tdesc_type): Likewise.
10310         (struct tdesc_feature): Likewise.
10311         * regformats/regdat.sh: Create a feature.
10312         * target-descriptions.c (tdesc_type_kind): Move from here.
10313         (tdesc_type): Likewise.
10314         (tdesc_type_up): Likewise.
10315         (tdesc_feature): Likewise.
10316         (tdesc_create_reg): Likewise.
10317
10318 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10319
10320         * Makefile.in: Add arch/tdesc.c
10321         * common/tdesc.c: New file.
10322         * common/tdesc.h (tdesc_element_visitor): Move to here.
10323         (tdesc_element): Likewise.
10324         (tdesc_reg): Likewise.
10325         (tdesc_reg_up): Likewise.
10326         * regformats/regdef.h (reg): Add offset to constructors.
10327         * target-descriptions.c (tdesc_element_visitor): Move from here.
10328         (tdesc_element): Likewise.
10329         (tdesc_reg): Likewise.
10330         (tdesc_reg_up): Likewise.
10331
10332 2018-04-17  Tom Tromey  <tom@tromey.com>
10333
10334         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10335         discriminant field.
10336
10337 2018-04-17  Tom Tromey  <tom@tromey.com>
10338
10339         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10340
10341 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10342
10343         * symtab.c (print_symbol_info): Skip printing filename and line
10344         number when `last' is NULL.
10345         (symtab_symbol_info): Use empty string instead of NULL for first
10346         invocation of print_symbol_info.
10347         (rbreak_command): Pass NULL to `last' parameter of
10348         print_symbol_info.
10349
10350 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10351
10352         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10353         instead of nullptr.
10354
10355 2018-04-16  Pedro Alves  <palves@redhat.com>
10356
10357         * MAINTAINERS (sh): Remove.
10358         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10359         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10360         (ALLDEPFILES): Remove sh64-tdep.c.
10361         * NEWS: Mentions that support for SH-5/SH64 is removed.
10362         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10363         (sh*-*-openbsd*): Ditto.
10364         (sh64-*-elf*): Remove.
10365         (sh*): Remove.
10366         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10367         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10368         * sh-tdep.c: No longer include "sh64-tdep.h".
10369         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10370         * sh64-tdep.c, sh64-tdep.h: Remove files.
10371
10372 2018-04-16  Pedro Alves  <palves@redhat.com>
10373
10374         * MAINTAINERS: Remove m88k.
10375         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10376         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10377         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10378         * NEWS: Mention that support for m88k was removed.
10379         * configure.host (m88*-*-*): Remove support.
10380         * configure.nat (m88k-*-*): Remove support.
10381         * configure.tgt (m88*-*-openbsd*): Remove.
10382         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10383
10384 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10385
10386         * configure.tgt (x86_tobjs): New variable.
10387         (amd64_tobjs, i386_tobjs): Use it.
10388
10389 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10390
10391         * symtab.c (print_symbol_info): Precede the symbol definition by
10392         the line number when available.
10393         * NEWS: Advertise this enhancement.
10394
10395 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10396
10397         * NEWS (New options): announce set/show record btrace cpu.
10398         * btrace.c: Include record-btrace.h.
10399         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10400         the vendor is unknown.
10401         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10402         Maybe overwrite the btrace configuration's cpu.
10403         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10404         (btrace_fetch): Add cpu parameter.  Update callers.
10405         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10406         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10407         errata workarounds if the vendor is unknown.
10408         * python/py-record-btrace.c: Include record-btrace.h.
10409         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10410         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10411         * record-btrace.c (record_btrace_cpu_state_kind): New.
10412         (record_btrace_cpu): New.
10413         (set_record_btrace_cpu_cmdlist): New.
10414         (record_btrace_get_cpu): New.
10415         (require_btrace_thread, record_btrace_info)
10416         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10417         (cmd_set_record_btrace_cpu_none): New.
10418         (cmd_set_record_btrace_cpu_auto): New.
10419         (cmd_set_record_btrace_cpu): New.
10420         (cmd_show_record_btrace_cpu): New.
10421         (_initialize_record_btrace): Initialize set/show record btrace cpu
10422         commands.
10423         * record-btrace.h (record_btrace_get_cpu): New.
10424
10425 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10426
10427         * record.c (set_record_command): Fix typo in message.
10428
10429 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10430
10431         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10432
10433 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10434
10435         * infrun.c (process_event_stop_test): Call
10436         gdbarch_in_indirect_branch_thunk.
10437         * gdbarch.sh (in_indirect_branch_thunk): New.
10438         * gdbarch.c: Regenerated.
10439         * gdbarch.h: Regenerated.
10440         * x86-tdep.h: New.
10441         * x86-tdep.c: New.
10442         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10443         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10444         (ALLDEPFILES): Add x86-tdep.c.
10445         * arch-utils.h (default_in_indirect_branch_thunk): New.
10446         * arch-utils.c (default_in_indirect_branch_thunk): New.
10447         * i386-tdep: Include x86-tdep.h.
10448         (i386_in_indirect_branch_thunk): New.
10449         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10450         function.
10451         * amd64-tdep: Include x86-tdep.h.
10452         (amd64_in_indirect_branch_thunk): New.
10453         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10454
10455 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10456
10457         PR gdb/23053
10458         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10459         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10460         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10461         regression.
10462
10463 2018-04-12  Tom Tromey  <tom@tromey.com>
10464
10465         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10466         (rust_evaluate_subexp): Likewise.
10467
10468 2018-04-12  Pedro Alves  <palves@redhat.com>
10469
10470         * procfs.c (procfs_detach): Make forward declaration's prototype
10471         match definition's protototype.
10472         (proc_get_LDT_entry): Remove stale do_cleanups call.
10473
10474 2018-04-12  Pedro Alves  <palves@redhat.com>
10475
10476         * target.h (target_ops::to_has_exited): Delete.
10477         (target_has_exited): Delete.
10478         * target-delegates.c: Regenerate.
10479
10480 2018-04-11  Pedro Alves  <palves@redhat.com>
10481
10482         * target.c (fileio_fh_t::t): Add comment.
10483         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10484         (target_fileio_close): Handle a NULL target.
10485         (invalidate_fileio_fh): New.
10486         (target_close): Call it.
10487         * remote.c (remote_hostio_send_command): No longer check whether
10488         remote_desc is open.
10489
10490 2018-04-11  Pedro Alves  <palves@redhat.com>
10491
10492         * target.c (fileio_fh_t): Make it a named struct instead of a
10493         typedef.
10494         (fileio_fh_t::is_closed): New method.
10495         (DEF_VEC_O (fileio_fh_t)): Remove.
10496         (fileio_fhandles): Now a std::vector.
10497         (is_closed_fileio_fh): Delete.
10498         (acquire_fileio_fd): Adjust.  Rename parameters.
10499         (release_fileio_fd): Adjust.
10500         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10501         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10502         (target_fileio_close): Adjust.
10503
10504 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10505
10506         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10507         index.
10508
10509 2018-04-10  Pedro Alves  <palves@redhat.com>
10510
10511         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10512         (scoped_finish_thread_state): New class.
10513         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10514         cleanup.
10515         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10516         (fetch_inferior_event, normal_stop): Likewise.
10517         * thread.c (finish_thread_state_cleanup): Delete.
10518
10519 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10520             Pedro Alves  <palves@redhat.com>
10521
10522         * value.c: Include "selftest.h" and "common/array-view.h".
10523         (struct range) <operator ==>: New.
10524         (test_ranges_contain): New.
10525         (check_ranges_vector): New.
10526         (test_insert_into_bit_range_vector): New.
10527         (_initialize_values): Register selftests.
10528         * common/array-view.h (operator==, operator!=): New.
10529
10530 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10531
10532         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10533         an iterator.
10534         * inline-frame.c: Include <algorithm>.
10535         (struct inline_state): Add constructor.
10536         (inline_state_s): Remove.
10537         (DEF_VEC_O(inline_state_s)): Remove.
10538         (inline_states): Change type to std::vector.
10539         (find_inline_frame_state): Adjust to std::vector.
10540         (allocate_inline_frame_state): Remove.
10541         (clear_inline_frame_state): Adjust to std::vector.
10542         (skip_inline_frames): Adjust to std::vector.
10543
10544 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10545
10546         * tracepoint.h (struct trace_state_variable): Add constructor.
10547         <name>: Change type to std::string.
10548         * tracepoint.c (tsv_s): Remove.
10549         (DEF_VEC_O(tsv_s)): Remove.
10550         (tvariables): Change to std::vector.
10551         (create_trace_state_variable): Adjust to std::vector.
10552         (find_trace_state_variable): Likewise.
10553         (find_trace_state_variable_by_number): Likewise.
10554         (delete_trace_state_variable): Likewise.
10555         (trace_variable_command): Adjust to std::string.
10556         (delete_trace_variable_command): Likewise.
10557         (tvariables_info_1): Adjust to std::vector.
10558         (save_trace_state_variables): Likewise.
10559         (start_tracing): Likewise.
10560         (merge_uploaded_trace_state_variables): Adjust to std::vector
10561         and std::string.
10562         * target.h (struct target_ops)
10563         <to_download_trace_state_variable>: Pass reference to
10564         trace_state_variable.
10565         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10566         * target-delegates.c: Re-generate.
10567         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10568         (mi_tsv_deleted): Likewise.
10569         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10570         * remote.c (remote_download_trace_state_variable): Change
10571         pointer to reference and adjust.
10572         * make-target-delegates (parse_argtypes): Handle references.
10573         (write_function_header): Likewise.
10574         (munge_type): Likewise.
10575
10576 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10577
10578         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10579         string_view-selftests.c.
10580         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10581         testsuite.
10582         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10583         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10584         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10585         * unittests/basic_string_view/element_access/char/1.cc:
10586         Likewise.
10587         * unittests/basic_string_view/element_access/char/empty.cc:
10588         Likewise.
10589         * unittests/basic_string_view/element_access/char/front_back.cc:
10590         Likewise.
10591         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10592         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10593         Likewise.
10594         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10595         Likewise.
10596         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10597         Likewise.
10598         * unittests/basic_string_view/operations/compare/char/1.cc:
10599         Likewise.
10600         * unittests/basic_string_view/operations/compare/char/13650.cc:
10601         Likewise.
10602         * unittests/basic_string_view/operations/copy/char/1.cc:
10603         Likewise.
10604         * unittests/basic_string_view/operations/data/char/1.cc:
10605         Likewise.
10606         * unittests/basic_string_view/operations/find/char/1.cc:
10607         Likewise.
10608         * unittests/basic_string_view/operations/find/char/2.cc:
10609         Likewise.
10610         * unittests/basic_string_view/operations/find/char/3.cc:
10611         Likewise.
10612         * unittests/basic_string_view/operations/find/char/4.cc:
10613         Likewise.
10614         * unittests/basic_string_view/operations/rfind/char/1.cc:
10615         Likewise.
10616         * unittests/basic_string_view/operations/rfind/char/2.cc:
10617         Likewise.
10618         * unittests/basic_string_view/operations/rfind/char/3.cc:
10619         Likewise.
10620         * unittests/basic_string_view/operations/substr/char/1.cc:
10621         Likewise.
10622         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10623         * unittests/string_view-selftests.c: New file.
10624
10625 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10626
10627         * unittests/basic_string_view/capacity/1.cc: New file.
10628         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10629         * unittests/basic_string_view/cons/char/1.cc: New file.
10630         * unittests/basic_string_view/cons/char/2.cc: New file.
10631         * unittests/basic_string_view/cons/char/3.cc: New file.
10632         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10633         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10634         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10635         * unittests/basic_string_view/element_access/char/1.cc: New file.
10636         * unittests/basic_string_view/element_access/char/2.cc: New file.
10637         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10638         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10639         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10640         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10641         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10642         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10643         * unittests/basic_string_view/include.cc: New file.
10644         * unittests/basic_string_view/inserters/char/1.cc: New file.
10645         * unittests/basic_string_view/inserters/char/2.cc: New file.
10646         * unittests/basic_string_view/inserters/char/3.cc: New file.
10647         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10648         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10649         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10650         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10651         * unittests/basic_string_view/literals/types.cc: New file.
10652         * unittests/basic_string_view/literals/values.cc: New file.
10653         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10654         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10655         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10656         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10657         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10658         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10659         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10660         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10661         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10662         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10663         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10664         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10665         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10666         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10667         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10668         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10669         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10670         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10671         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10672         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10673         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10674         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10675         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10676         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10677         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10678         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10679         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10680         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10681         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10682         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10683         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10684         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10685         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10686         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10687         * unittests/basic_string_view/operators/char/2.cc: New file.
10688         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10689         * unittests/basic_string_view/range_access/char/1.cc: New file.
10690         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10691         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10692         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10693         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10694         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10695         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10696         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10697         * unittests/basic_string_view/typedefs.cc: New file.
10698         * unittests/basic_string_view/types/1.cc: New file.
10699
10700 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10701
10702         * common/gdb_string_view.h: Remove libstdc++ implementation
10703         details, adjust to gdb reality.
10704         * common/gdb_string_view.tcc: Likewise.
10705         * cli/cli-script.c (struct string_view): Remove.
10706         (user_args) <m_args>: Change element type to gdb::string_view.
10707         (user_args::insert_args): Adjust.
10708
10709 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10710
10711         * common/gdb_string_view.h: New file.
10712         * common/gdb_string_view.tcc: New file.
10713
10714 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10715
10716         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10717         * configure: Re-generate.
10718
10719 2018-04-09  Pedro Alves  <palves@redhat.com>
10720
10721         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10722         (set_target_gdbarch): Call
10723         gdb::observers::architecture_changed.notify instead of
10724         observer_notify_architecture_changed.
10725
10726 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10727
10728         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10729         (do_restore_current_traceframe_cleanup): Remove.
10730         (restore_current_traceframe_cleanup_dtor): Remove.
10731         (make_cleanup_restore_current_traceframe): Remove.
10732         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10733         New.
10734         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10735         * infrun.c (fetch_inferior_event): Use
10736         scoped_restore_current_traceframe.
10737
10738 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10739
10740         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10741         Remove.
10742         <n_allocated_type_units>: Remove.
10743         <all_type_units>: Change to std::vector.
10744         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10745         to std::vector change.
10746         (dwarf2_per_objfile::get_cutu): Likewise.
10747         (dwarf2_per_objfile::get_tu): Likewise.
10748         (create_signatured_type_table_from_index): Likewise.
10749         (create_signatured_type_table_from_debug_names): Likewise.
10750         (dw2_symtab_iter_next): Likewise.
10751         (dw2_print_stats): Likewise.
10752         (dw2_expand_all_symtabs): Likewise.
10753         (dw2_expand_marked_cus): Likewise.
10754         (dw2_debug_names_iterator::next): Likewise.
10755         (dwarf2_initialize_objfile): Likewise.
10756         (add_signatured_type_cu_to_table): Likewise.
10757         (create_all_type_units): Likewise.
10758         (add_type_unit): Likewise.
10759         (struct tu_abbrev_offset): Add constructor.
10760         (build_type_psymtabs_1): Adjust to std::vector change.
10761         (print_tu_stats): Likewise.
10762         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10763         (write_debug_names): Likewise.
10764
10765 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10766
10767         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10768         Make an std::vector.
10769         <n_comp_units>: Remove.
10770         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10771         to std::vector change.
10772         (dwarf2_per_objfile::get_cutu): Likewise.
10773         (dwarf2_per_objfile::get_cu): Likewise.
10774         (create_cus_from_index): Likewise.
10775         (create_addrmap_from_index): Likewise.
10776         (create_addrmap_from_aranges): Likewise.
10777         (dwarf2_read_index): Likewise.
10778         (dw2_find_last_source_symtab): Likewise.
10779         (dw2_map_symtabs_matching_filename): Likewise.
10780         (dw2_symtab_iter_next): Likewise.
10781         (dw2_print_stats): Likewise.
10782         (dw2_expand_all_symtabs): Likewise.
10783         (dw2_expand_symtabs_with_fullname): Likewise.
10784         (dw2_expand_marked_cus): Likewise.
10785         (dw2_map_symbol_filenames): Likewise.
10786         (create_cus_from_debug_names): Likewise.
10787         (dwarf2_read_debug_names): Likewise.
10788         (dw2_debug_names_iterator::next): Likewise.
10789         (dwarf2_initialize_objfile): Likewise.
10790         (set_partial_user): Likewise.
10791         (dwarf2_build_psymtabs_hard): Likewise.
10792         (read_comp_units_from_section): Remove arguments, adjust to
10793         std::vector change.
10794         (create_all_comp_units): Adjust to std::vector and
10795         read_comp_units_from_section changes.
10796         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10797         change.
10798         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10799         (psyms_seen_size): Likewise.
10800         (write_gdbindex): Likewise.
10801         (write_debug_names): Likewise.
10802
10803 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10804
10805         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10806         with dwarf2_per_objfile.
10807         (create_cus_from_index): Likewise.
10808         (create_signatured_type_table_from_index): Likewise.
10809         (dwarf2_read_index): Likewise.
10810         (dwarf2_initialize_objfile): Likewise.
10811         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10812         per_cu rather than get_dwarf2_per_objfile.
10813
10814 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10815
10816         * dwarf2read.h (struct signatured_type): Forward declare.
10817         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10818         New methods.
10819         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10820         (dw2_get_cutu): ...this.
10821         (dwarf2_per_objfile::get_cu): Rename from...
10822         (dw2_get_cu): ...this.
10823         (dwarf2_per_objfile::get_tu): New.
10824         (create_addrmap_from_index): Adjust.
10825         (create_addrmap_from_aranges): Adjust.
10826         (dw2_find_last_source_symtab): Adjust.
10827         (dw2_map_symtabs_matching_filename): Adjust.
10828         (dw2_symtab_iter_next): Adjust.
10829         (dw2_print_stats): Adjust.
10830         (dw2_expand_all_symtabs): Adjust.
10831         (dw2_expand_symtabs_with_fullname): Adjust.
10832         (dw2_expand_marked_cus): Adjust.
10833         (dw_expand_symtabs_matching_file_matcher): Adjust.
10834         (dw2_map_symbol_filenames): Adjust.
10835         (dw2_debug_names_iterator::next): Adjust.
10836         (dwarf2_initialize_objfile): Adjust.
10837         (set_partial_user): Adjust.
10838         (dwarf2_build_psymtabs_hard): Adjust.
10839
10840 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10841
10842         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10843         Remove unused variables.
10844         (dw2_map_symtabs_matching_filename): Likewise.
10845         (dwarf2_record_block_ranges): Likewise.
10846         (dwarf2_read_addr_index): Likewise.
10847         (follow_die_offset): Likewise.
10848
10849 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10850
10851         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10852         to symbol_file_add_main.
10853
10854 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10855
10856         PR mi/22299
10857         * mi/mi-console.c (do_fputc_async_safe): New.
10858         (mi_console_file::write_async_safe): New.
10859         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10860         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10861         New.
10862         * ui-file.c (ui_file::putstrn): Adjust call to
10863         fputstrn_unfiltered.
10864         * utils.c (printchar): Replace do_fputs and do_fprintf
10865         parameters by do_fputc.
10866         (fputstr_filtered): Adjust call to printchar.
10867         (fputstr_unfiltered): Likewise.
10868         (fputstrn_filtered): Likewise.
10869         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10870         printchar.
10871         * utils.h (do_fputc_ftype): New typedef.
10872         (fputstrn_unfiltered): Add do_fputc parameter.
10873
10874 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10875
10876         * regformats/i386/i386-avx.dat: Remove.
10877
10878 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10879
10880         PR gdb/22979
10881         * amd64-tdep.c (amd64_none_init_abi): New function.
10882         (amd64_x32_none_init_abi): New function.
10883         (_initialize_amd64_tdep): Register handlers for x86-64 and
10884         x64_32 with GDB_OSABI_NONE.
10885         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10886         GDB_OSABI_NONE osabi.
10887
10888 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10889
10890         PR gdb/22980
10891         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10892         GDB_OSABI_NONE.
10893         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10894         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10895
10896 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10897
10898         * common/byte-vector.h (char_vector): New type.
10899         * target.h (target_read_alloc): Return
10900         gdb::optional<byte_vector>.
10901         (target_read_stralloc): Return gdb::optional<char_vector>.
10902         (target_get_osdata): Return gdb::optional<char_vector>.
10903         * target.c (target_read_alloc_1): Templatize.  Replacement
10904         manual memory management with vector.
10905         (target_read_alloc): Change return type, adjust.
10906         (target_read_stralloc): Change return type, adjust.
10907         (target_get_osdata): Change return type, adjust.
10908         * auxv.c (struct auxv_info) <length>: Remove.
10909         <data>: Change type to gdb::optional<byte_vector>.
10910         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10911         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10912         (target_auxv_search): Adjust.
10913         (fprint_target_auxv): Adjust.
10914         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10915         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10916         (linux_make_corefile_notes): Adjust.
10917         * osdata.c (get_osdata): Adjust.
10918         * remote.c (remote_get_threads_with_qxfer): Adjust.
10919         (remote_memory_map): Adjust.
10920         (remote_traceframe_info): Adjust.
10921         (btrace_read_config): Adjust.
10922         (remote_read_btrace): Adjust.
10923         (remote_pid_to_exec_file): Adjust.
10924         * solib-aix.c (solib_aix_get_library_list): Adjust.
10925         * solib-dsbt.c (decode_loadmap): Don't free buf.
10926         (dsbt_get_initial_loadmaps): Adjust.
10927         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10928         * solib-target.c (solib_target_current_sos): Adjust.
10929         * tracepoint.c (sdata_make_value): Adjust.
10930         * xml-support.c (xinclude_start_include): Adjust.
10931         (xml_fetch_content_from_file): Adjust.
10932         * xml-support.h (xml_fetch_another): Change return type.
10933         (xml_fetch_content_from_file): Change return type.
10934         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10935         * xml-tdesc.c (file_read_description_xml): Adjust.
10936         (fetch_available_features_from_target): Change return type.
10937         (target_fetch_description_xml): Adjust.
10938         (target_read_description_xml): Adjust.
10939
10940 2018-04-06  Tom Tromey  <tom@tromey.com>
10941
10942         * value.c (~value): Update.
10943         (struct value) <contents>: Now unique_xmalloc_ptr.
10944         (value_contents_bits_eq, allocate_value_contents)
10945         (value_contents_raw, value_contents_all_raw)
10946         (value_contents_for_printing, value_contents_for_printing_const)
10947         (set_value_enclosing_type): Update.
10948
10949 2018-04-06  Tom Tromey  <tom@tromey.com>
10950
10951         * value.c (range_s): Remove typedef, VEC.
10952         (struct range): Add operator<.
10953         (range_lessthan): Remove.
10954         (ranges_contain): Change type.
10955         (~value): Update.
10956         (struct value) <unavailable, optimized_out>: Now std::vector.
10957         (value_entirely_available)
10958         (value_entirely_covered_by_range_vector)
10959         (value_entirely_unavailable, value_entirely_optimized_out):
10960         Update.
10961         (insert_into_bit_range_vector): Change argument type.
10962         (find_first_range_overlap): Likewise.
10963         (struct ranges_and_idx, value_contents_bits_eq)
10964         (require_not_optimized_out, require_available): Update.
10965         (ranges_copy_adjusted): Change argument types.
10966         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10967
10968 2018-04-06  Tom Tromey  <tom@tromey.com>
10969
10970         * value.c (~value): Update.
10971         (struct value) <parent>: Now a value_ref_ptr.
10972         (value_parent, set_value_parent, value_address, value_copy):
10973         Update.
10974
10975 2018-04-06  Tom Tromey  <tom@tromey.com>
10976
10977         * value.c (struct value): Add constructor, destructor, and member
10978         initializers.
10979         (allocate_value_lazy, value_decref): Update.
10980
10981 2018-04-06  Tom Tromey  <tom@tromey.com>
10982
10983         * value.c (struct value) <released, next>: Remove.
10984         (all_values): Now a std::vector.
10985         (allocate_value_lazy): Update.
10986         (value_next): Remove.
10987         (value_mark, value_free_to_mark, release_value)
10988         (value_release_to_mark): Update.
10989
10990 2018-04-06  Tom Tromey  <tom@tromey.com>
10991
10992         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10993         (free_value_chain): Remove.
10994         * value.c (free_value_chain): Remove.
10995         (value_release_to_mark): Return a std::vector.
10996         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10997         std::vector.
10998         (check_condition): Update.
10999         * eval.c (fetch_subexp_value): Change "val_chain" to a
11000         std::vector.
11001         * breakpoint.c (update_watchpoint): Update.
11002         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11003
11004 2018-04-06  Tom Tromey  <tom@tromey.com>
11005
11006         * value.h (free_all_values): Remove.
11007         * value.c (free_all_values): Remove.
11008
11009 2018-04-06  Tom Tromey  <tom@tromey.com>
11010
11011         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11012         (value_history_chain, value_history_count): Remove.
11013         (value_history): New global.
11014         (record_latest_value, access_value_history, show_values)
11015         (preserve_values): Update.
11016
11017 2018-04-06  Tom Tromey  <tom@tromey.com>
11018
11019         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11020         * varobj.c (varobj_set_display_format, varobj_set_value)
11021         (install_default_visualizer, construct_visualizer)
11022         (install_new_value, ~varobj, varobj_get_value_type)
11023         (my_value_of_variable, varobj_editable_p): Update.
11024         * c-varobj.c (c_describe_child, c_value_of_variable)
11025         (cplus_number_of_children, cplus_describe_child): Update.
11026         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11027         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11028         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11029
11030 2018-04-06  Tom Tromey  <tom@tromey.com>
11031
11032         * printcmd.c (last_examine_address): Change type to
11033         value_ref_ptr.
11034         (do_examine, x_command): Update.
11035
11036 2018-04-06  Tom Tromey  <tom@tromey.com>
11037
11038         * value.c (release_value): Update.
11039         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11040         (struct bpstats) <val>: Now a value_ref_ptr.
11041         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11042         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11043         (~watchpoint, print_it_watchpoint, watch_command_1)
11044         (invalidate_bp_value_on_memory_change): Update.
11045
11046 2018-04-06  Tom Tromey  <tom@tromey.com>
11047
11048         * varobj.c (varobj_clear_saved_item)
11049         (update_dynamic_varobj_children, install_new_value, ~varobj):
11050         Update.
11051         * value.h (value_incref): Move declaration earlier.
11052         (value_decref): Rename from value_free.
11053         (struct value_ref_policy): New.
11054         (value_ref_ptr): New typedef.
11055         (struct value_deleter): Remove.
11056         (gdb_value_up): Remove typedef.
11057         (release_value): Change return type.
11058         (release_value_or_incref): Remove.
11059         * value.c (set_value_parent): Update.
11060         (value_incref): Change return type.
11061         (value_decref): Rename from value_free.
11062         (value_free_to_mark, free_all_values, free_value_chain): Update.
11063         (release_value): Return value_ref_ptr.
11064         (release_value_or_incref): Remove.
11065         (record_latest_value, set_internalvar, clear_internalvar):
11066         Update.
11067         * stack.c (info_frame_command): Don't call value_free.
11068         * python/py-value.c (valpy_dealloc, valpy_new)
11069         (value_to_value_object): Update.
11070         * printcmd.c (do_examine): Update.
11071         * opencl-lang.c (lval_func_free_closure): Update.
11072         * mi/mi-main.c (register_changed_p): Don't call value_free.
11073         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11074         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11075         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11076         value_free.
11077         * guile/scm-value.c (vlscm_free_value_smob)
11078         (vlscm_scm_from_value): Update.
11079         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11080         (frame_unwind_register_unsigned, get_frame_register_bytes)
11081         (put_frame_register_bytes): Don't call value_free.
11082         * findvar.c (address_from_register): Don't call value_free.
11083         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11084         * dwarf2loc.c (entry_data_value_free_closure)
11085         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11086         (dwarf2_evaluate_loc_desc_full): Update.
11087         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11088         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11089         (~watchpoint, watch_command_1)
11090         (invalidate_bp_value_on_memory_change): Update.
11091         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11092
11093 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11094
11095         PR gdb/23022
11096         * warning.m4: Add -Wno-error=deprecated-register.
11097         * configure: Re-generate.
11098
11099 2018-04-05  Tom Tromey  <tom@tromey.com>
11100
11101         * linespec.h: Remove include of "vec.h".
11102
11103 2018-04-05  Tom Tromey  <tom@tromey.com>
11104
11105         * linespec.c (typep): Remove typedef.
11106         (find_methods, find_superclass_methods): Take a std::vector.
11107         (find_method): Use std::vector.
11108
11109 2018-04-05  Tom Tromey  <tom@tromey.com>
11110
11111         * utils.c (compare_strings): Remove.
11112         * utils.h (compare_strings): Remove.
11113         * objc-lang.h (find_imps): Update.
11114         * objc-lang.c (find_methods): Take a std::vector.
11115         (uniquify_strings, find_imps): Likewise.
11116         * linespec.c (find_methods): Take a std::vector.
11117         (decode_objc): Use std::vector.
11118         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11119         a std::vector.
11120         (find_method, find_function_symbols): Use std::vector.
11121
11122 2018-04-05  Tom Tromey  <tom@tromey.com>
11123
11124         * completer.c (completion_tracker::completion_tracker): Remove
11125         cast.
11126         (completion_tracker::discard_completions): Likewise.
11127         * breakpoint.c (ambiguous_names_p): Remove cast.
11128         * ada-lang.c (_initialize_ada_language): Remove cast.
11129         * utils.h (streq): Update.
11130         (streq_hash): Add new declaration.
11131         * utils.c (streq): Return bool.
11132         (streq_hash): New function.
11133
11134 2018-04-05  Tom Tromey  <tom@tromey.com>
11135
11136         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11137         Remove a string copy.
11138
11139 2018-04-05  Tom Tromey  <tom@tromey.com>
11140
11141         * linespec.c (filter_results): Use std::vector.
11142         (decode_line_2, decode_line_full): Update.
11143
11144 2018-04-05  Tom Tromey  <tom@tromey.com>
11145
11146         * linespec.c (canonical_to_fullform): Return std::string.
11147         (filter_results): Update.
11148         (struct decode_line_2_item): Add constructor.
11149         <fullform, displayform>: Now std::string.
11150         (decode_line_2_compare_items): Now a std::sort comparator.
11151         (decode_line_2): Update.
11152
11153 2018-04-05  Tom Tromey  <tom@tromey.com>
11154
11155         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11156         (unexpected_linespec_error): Update.
11157         (linespec_parse_basic, parse_linespec): Update.
11158
11159 2018-04-05  Tom Tromey  <tom@tromey.com>
11160
11161         * linespec.c (linespec_parse_basic): Reindent.
11162
11163 2018-04-05  Tom Tromey  <tom@tromey.com>
11164
11165         * minsyms.h (iterate_over_minimal_symbols): Update.
11166         * minsyms.c (iterate_over_minimal_symbols): Take a
11167         gdb::function_view.
11168         * linespec.c (struct collect_minsyms): Remove.
11169         (compare_msyms): Now a std::sort comparator.
11170         (add_minsym): Add parameters.
11171         (search_minsyms_for_name): Update.  Use std::vector.
11172
11173 2018-04-03  Tom Tromey  <tom@tromey.com>
11174
11175         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11176         gdb::byte_vector.
11177
11178 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11179
11180         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11181
11182 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11183
11184         PR gdb/16959
11185         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11186         printing static type.
11187
11188 2018-04-01  Tom Tromey  <tom@tromey.com>
11189
11190         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11191         (rs6000_xfer_shared_libraries): Update.
11192
11193 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11194
11195         * common/gdb_vecs.h (char_ptr): Remove.
11196         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11197
11198 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11199
11200         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11201         with std::vector.
11202         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11203
11204 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11205
11206         * tracepoint.h (struct uploaded_tp): Initialize fields.
11207         <actions, step_actions, cmd_strings>: Change type to
11208         std::vector<char *>.
11209         * tracepoint.c (get_uploaded_tp): Allocate with new.
11210         (free_uploaded_tps): Free with delete.
11211         (parse_tracepoint_definition): Adjust to std::vector change.
11212         * breakpoint.c (read_uploaded_action): Likewise.
11213         (create_tracepoint_from_upload): Likewise.
11214         * ctf.c (ctf_write_uploaded_tp): Likewise.
11215         (SET_ARRAY_FIELD): Likewise.
11216         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11217
11218 2018-03-30  Tom Tromey  <tom@tromey.com>
11219
11220         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11221         std::unique_ptr.
11222         (svr4_keep_data_in_core): Update.
11223         (svr4_read_so_list): Update.
11224
11225 2018-03-30  Tom Tromey  <tom@tromey.com>
11226
11227         * windows-nat.c (handle_output_debug_string, handle_exception):
11228         Update.
11229         * target.h (target_read_string): Update.
11230         * target.c (target_read_string): Change "string" to
11231         unique_xmalloc_ptr.
11232         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11233         Update.
11234         * solib-frv.c (frv_current_sos): Update.
11235         * solib-dsbt.c (dsbt_current_sos): Update.
11236         * solib-darwin.c (darwin_current_sos): Update.
11237         * linux-thread-db.c (inferior_has_bug): Update.
11238         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11239         Update.  Remove alloca.
11240         * ada-lang.c (ada_main_name): Update.
11241
11242 2018-03-30  Tom Tromey  <tom@tromey.com>
11243
11244         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11245         (struct dwo_file_deleter): New.
11246         (dwo_file_up): New typedef.
11247         (open_and_init_dwo_file): Use dwo_file_up.
11248         (free_dwo_file_cleanup): Remove.
11249
11250 2018-03-30  Tom Tromey  <tom@tromey.com>
11251
11252         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11253         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11254
11255 2018-03-30  Tom Tromey  <tom@tromey.com>
11256
11257         * dwarf2read.c (class free_cached_comp_units): New class.
11258         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11259         (free_cached_comp_units): Remove function.
11260
11261 2018-03-30  Tom Tromey  <tom@tromey.com>
11262
11263         * utils.h (make_cleanup_unpush_target): Remove.
11264         * inf-ptrace.c (struct target_unpusher): New.
11265         (target_unpush_up) New typedef.
11266         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11267         target_unpush_up.
11268         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11269
11270 2018-03-27  Tom Tromey  <tom@tromey.com>
11271
11272         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11273
11274 2018-03-27  Pedro Alves  <palves@redhat.com>
11275             Tom Tromey  <tom@tromey.com>
11276
11277         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11278         destructor.  Now a class.
11279         (gdb_readline_wrapper_cleanup): Remove function.
11280         (gdb_readline_wrapper): Remove cleanups.
11281
11282 2018-03-27  Tom Tromey  <tom@tromey.com>
11283
11284         * typeprint.h (struct type_print_options) <local_typedefs,
11285         global_typedefs>: Remove "struct" keyword.
11286         (class typedef_hash_table): New class.
11287         (recursively_update_typedef_hash, add_template_parameters)
11288         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11289         (find_typedef_in_hash): Don't declare.
11290         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11291         (typedef_hash_table::recursively_update): Rename from
11292         recursively_update_typedef_hash.  Now a member.
11293         (typedef_hash_table::add_template_parameters): Rename from
11294         add_template_parameters.  Now a member.
11295         (typedef_hash_table::typedef_hash_table): Now a constructor;
11296         rename from create_typedef_hash.
11297         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11298         rename from free_typedef_hash.
11299         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11300         (do_free_global_table): Remove.
11301         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11302         from copy_type_recursive.
11303         (create_global_typedef_table): Remove.
11304         (typedef_hash_table::find_global_typedef): Now a member of
11305         typedef_hash_table.
11306         (typedef_hash_table::find_typedef): Rename from
11307         find_typedef_in_hash; now a member.
11308         (whatis_exp): Update.
11309         * extension.h (struct ext_lang_type_printers): Add constructor and
11310         destructor.
11311         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11312         declare.
11313         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11314         Now a constructor; rename from start_ext_lang_type_printers.
11315         (ext_lang_type_printers): Now a destructor; rename from
11316         free_ext_lang_type_printers.
11317         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11318         Update.
11319         (c_type_print_base_struct_union): Update.  Remove cleanups.
11320
11321 2018-03-27  Tom Tromey  <tom@tromey.com>
11322
11323         * dwarf-index-write.c: Include <cmath>.
11324
11325 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11326
11327         * NEWS: Add entry describing new "set|show varsize-limit" command.
11328         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11329         command.
11330         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11331         "set variable".
11332
11333 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11334
11335         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11336         dwarf-index-write.c
11337         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11338         * dwarf-index-common.c: New file.
11339         * dwarf-index-common.h: New file.
11340         * dwarf-index-write.c: New file.
11341         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11342         (struct dwarf2_section_info): Move from here.
11343         (dwarf2_section_info_def): Likewise.
11344         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11345         (offset_type): Likewise.
11346         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11347         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11348         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11349         (byte_swap): Likewise.
11350         (MAYBE_SWAP): Likewise.
11351         (dwarf2_per_cu_ptr): Likewise.
11352         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11353         (struct tu_stats): Likewise.
11354         (struct dwarf2_per_objfile): Likewise.
11355         (struct dwarf2_per_cu_data): Likewise.
11356         (struct signatured_type): Likewise.
11357         (sig_type_ptr): Likewise.
11358         (DEF_VEC_P (sig_type_ptr)): Likewise.
11359         (INDEX4_SUFFIX): Likewise.
11360         (INDEX5_SUFFIX): Likewise.
11361         (DEBUG_STR_SUFFIX): Likewise.
11362         (dwarf2_read_section): Make non-static.
11363         (mapped_index_string_hash): Move from here.
11364         (dwarf5_djb_hash): Likewise.
11365         (file_write): Likewise.
11366         (class data_buf): Likewise.
11367         (struct symtab_index_entry): Likewise.
11368         (struct mapped_symtab): Likewise.
11369         (find_slot): Likewise.
11370         (hash_expand): Likewise.
11371         (add_index_entry): Likewise.
11372         (uniquify_cu_indices): Likewise.
11373         (class c_str_view): Likewise.
11374         (class c_str_view_hasher): Likewise.
11375         (class vector_hasher): Likewise.
11376         (write_hash_table): Likewise.
11377         (psym_index_map): Likewise.
11378         (struct addrmap_index_data): Likewise.
11379         (add_address_entry): Likewise.
11380         (add_address_entry_worker): Likewise.
11381         (write_address_map): Likewise.
11382         (symbol_kind): Likewise.
11383         (write_psymbols): Likewise.
11384         (struct signatured_type_index_data): Likewise.
11385         (write_one_signatured_type): Likewise.
11386         (recursively_count_psymbols): Likewise.
11387         (recursively_write_psymbols): Likewise.
11388         (class debug_names): Likewise.
11389         (check_dwarf64_offsets): Likewise.
11390         (psyms_seen_size): Likewise.
11391         (write_gdbindex): Likewise.
11392         (write_debug_names): Likewise.
11393         (assert_file_size): Likewise.
11394         (write_psymtabs_to_index): Likewise.
11395         (save_gdb_index_command): Likewise.
11396         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11397         command.
11398         * dwarf2read.h: New file.
11399
11400 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11401
11402         PR gdb/22670
11403         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11404         symbol name if the CU's language stores symbol names in linkage
11405         format.
11406         * language.h (struct language_defn)
11407         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11408         all instances of this struct.
11409
11410 2018-03-26  Tom Tromey  <tom@tromey.com>
11411
11412         * stack.c (backtrace_command_1): Remove verbose code.
11413
11414 2018-03-26  Tom Tromey  <tom@tromey.com>
11415
11416         * python/py-framefilter.c (py_print_type): Don't catch
11417         exceptions.  Return void.
11418         (py_print_value): Likewise.
11419         (py_print_single_arg): Likewise.
11420         (enumerate_args): Don't catch exceptions.
11421         (py_print_args): Likewise.
11422         (py_print_frame): Likewise.
11423         (gdbpy_apply_frame_filter): Catch exceptions here.
11424
11425 2018-03-26  Tom Tromey  <tom@tromey.com>
11426
11427         * stack.c (_initialize_stack): Remove trailing newlines from help
11428         text.  Add "Usage" line to "backtrace" help.
11429
11430 2018-03-26  Tom Tromey  <tom@tromey.com>
11431
11432         PR python/16486:
11433         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11434
11435 2018-03-26  Tom Tromey  <tom@tromey.com>
11436
11437         * python/py-framefilter.c (py_print_single_arg): Return
11438         EXT_LANG_BT_ERROR from catch.
11439
11440 2018-03-26  Tom Tromey  <tom@tromey.com>
11441
11442         PR backtrace/15584:
11443         * stack.c (backtrace_command_1): Move some code into no-filters
11444         "if".
11445
11446 2018-03-26  Tom Tromey  <tom@tromey.com>
11447
11448         * python/py-framefilter.c (throw_quit_or_print_exception): New
11449         function.
11450         (gdbpy_apply_frame_filter): Use it.
11451
11452 2018-03-26  Tom Tromey  <tom@tromey.com>
11453
11454         PR cli/17716:
11455         * python/py-framefilter.c (py_print_type, py_print_value)
11456         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11457         RETURN_MASK_ERROR.
11458
11459 2018-03-26  Tom Tromey  <tom@tromey.com>
11460
11461         * python/py-framefilter.c (enumerate_args): Use
11462         gdb::unique_xmalloc_ptr.
11463
11464 2018-03-26  Tom Tromey  <tom@tromey.com>
11465
11466         * python/py-framefilter.c (py_print_frame): Return
11467         EXT_LANG_BT_OK.
11468         (gdbpy_apply_frame_filter): Update comment.
11469         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11470         Remove.
11471         <EXT_LANG_BT_NO_FILTERS>: Change value.
11472
11473 2018-03-26  Tom Tromey  <tom@tromey.com>
11474
11475         PR backtrace/15582:
11476         * stack.c (backtrace_command): Parse "hide" argument.
11477         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11478         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11479         constant.
11480
11481 2018-03-26  Tom Tromey  <tom@tromey.com>
11482
11483         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11484         add "flags".
11485         (backtrace_command): Remove "fulltrace", add "flags".
11486
11487 2018-03-26  Tom Tromey  <tom@tromey.com>
11488
11489         * stack.c (backtrace_command): Rewrite command line parsing.
11490
11491 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11492
11493         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11494
11495 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11496
11497         * filename-seen-cache.h: Add include guard.
11498
11499 2018-03-26  Keith Seitz  <keiths@redhat.com>
11500
11501         * symfile.c (place_section): Remove "struct" from section_addr_info
11502         in comment.
11503         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11504         "struct" keyword from section_addr_info.
11505
11506 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11507
11508         * regformats/regdef.h (reg): Add constructors.
11509
11510 2018-03-25  Pedro Alves  <palves@redhat.com>
11511
11512         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11513         if then/else bodies in var_func_name extraction.
11514
11515 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11516
11517         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11518         lookup_minimal_symbol() to find symbol entry.
11519         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11520
11521 2018-03-23  Keith Seitz  <keiths@redhat.com>
11522
11523         PR c++/22968
11524         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11525         nested type definitions for C++, too.
11526
11527 2018-03-23  Tom Tromey  <tom@tromey.com>
11528
11529         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11530         a typedef.
11531         (macho_register_oso): Remove.
11532         (macho_symtab_read): Take a std::vector.
11533         (oso_el_compare_name): Now a std::sort comparator.
11534         (macho_symfile_read_all_oso): Take a std::vector.
11535         (macho_symfile_read): Use std::vector.  Remove cleanups.
11536
11537 2018-03-22  Tom Tromey  <tom@tromey.com>
11538
11539         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11540         (record_full_goto_bookmark): Use std::string.
11541
11542 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11543
11544         PR tdep/18295
11545         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11546         a single mask.
11547
11548 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11549
11550         * rs6000-tdep.c (store_insn_p): New function.
11551         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11552         and cr_reg to their unshifted values. Use store_insn_p to
11553         match LR saves using either R1 or fdata->alloca_reg. Use
11554         store_insn_p to match CR saves. Set alloca_reg_offset
11555         when alloca_reg and framep are set. Remove lr_reg shift
11556         when assigning to fdata->lr_register.
11557
11558 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11559
11560         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11561         command line args instead of emitting a warning.
11562
11563 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11564
11565         * tracepoint.h (struct static_tracepoint_marker): Initialize
11566         fields, define default constructor, move constructor and move
11567         assignment, disable the rest.
11568         <str_id, extra>: Make std::string.
11569         (release_static_tracepoint_marker): Remove.
11570         (free_current_marker): Remove.
11571         * tracepoint.c (free_current_marker): Remove.
11572         (parse_static_tracepoint_marker_definition): Adjust to
11573         std::string, use new hex2str overload.
11574         (release_static_tracepoint_marker): Remove.
11575         (print_one_static_tracepoint_marker): Get marker by reference
11576         and adjust to std::string.
11577         (info_static_tracepoint_markers_command): Adjust to std::vector
11578         changes
11579         * target.h (static_tracepoint_marker_p): Remove typedef.
11580         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11581         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11582         bool.
11583         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11584         * target-debug.h
11585         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11586         (target_debug_print_std_vector_static_tracepoint_marker): New.
11587         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11588         to...
11589         (target_debug_print_static_tracepoint_marker_p): ... this.
11590         * target-delegates.c: Re-generate.
11591         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11592         Make std::string.
11593         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11594         (decode_static_tracepoint_spec): Adjust to std::vector.
11595         (tracepoint_print_one_detail): Adjust to std::string.
11596         (strace_marker_decode_location): Adjust to std::string.
11597         (update_static_tracepoint): Adjust to std::string, remove call
11598         to release_static_tracepoint_marker.
11599         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11600         Adjust to std::vector.
11601         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11602         (remote_static_tracepoint_markers_by_strid): Adjust to
11603         std::vector.
11604         * common/rsp-low.h (hex2str): New overload with explicit count
11605         of bytes.
11606         * common/rsp-low.c (hex2str): New overload with explicit count
11607         of bytes.
11608         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11609         (_initialize_rsp_low_selftests): Add test_hex2str test.
11610         * unittests/tracepoint-selftests.c
11611         (test_parse_static_tracepoint_marker_definition): Adjust to
11612         std::string.
11613
11614 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * tracepoint.c (parse_static_tracepoint_marker_definition):
11617         Consider case where the definition is followed by more
11618         definitions.
11619         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11620         tracepoint-selftests.c.
11621         * unittests/tracepoint-selftests.c: New.
11622
11623 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11624
11625         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11626         Carvalho.
11627
11628 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11629
11630         * symtab.c (find_pc_sect_line): fixed indentation.
11631
11632 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11633
11634         * symtab.c (find_pc_sect_line): now uses binary search.
11635
11636 2018-03-19  Tom Tromey  <tom@tromey.com>
11637
11638         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11639         "IDENT" production.
11640
11641 2018-03-19  Pedro Alves  <palves@redhat.com>
11642             Tom Tromey  <tom@tromey.com>
11643
11644         * unittests/observable-selftests.c: New file.
11645         * common/observable.h: New file.
11646         * observable.h: New file.
11647         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11648         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11649         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11650         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11651         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11652         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11653         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11654         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11655         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11656         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11657         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11658         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11659         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11660         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11661         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11662         tui/tui-interp.c, valops.c: Update all users.
11663         * tui/tui-hooks.c (tui_bp_created_observer)
11664         (tui_bp_deleted_observer, tui_bp_modified_observer)
11665         (tui_inferior_exit_observer, tui_before_prompt_observer)
11666         (tui_normal_stop_observer, tui_register_changed_observer):
11667         Remove.
11668         (tui_observers_token): New global.
11669         (attach_or_detach, tui_attach_detach_observers): New functions.
11670         (tui_install_hooks, tui_remove_hooks): Use
11671         tui_attach_detach_observers.
11672         * record-btrace.c (record_btrace_thread_observer): Remove.
11673         (record_btrace_thread_observer_token): New global.
11674         * observer.sh: Remove.
11675         * observer.c: Rename to observable.c.
11676         * observable.c (namespace gdb_observers): Define new objects.
11677         (observer_debug): Move into gdb_observers namespace.
11678         (struct observer, struct observer_list, xalloc_observer_list_node)
11679         (xfree_observer_list_node, generic_observer_attach)
11680         (generic_observer_detach, generic_observer_notify): Remove.
11681         (_initialize_observer): Update.
11682         Don't include observer.inc.
11683         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11684         (clean mostlyclean): Likewise.
11685         (observer.h, observer.inc): Remove targets.
11686         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11687         (COMMON_SFILES): Use observable.c, not observer.c.
11688         * .gitignore: Remove observer.h.
11689
11690 2018-03-18  Tom Tromey  <tom@tromey.com>
11691
11692         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11693         gdb::def_vector.
11694         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11695
11696 2018-03-17  Tom Tromey  <tom@tromey.com>
11697
11698         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11699
11700 2018-03-17  Tom Tromey  <tom@tromey.com>
11701
11702         * target.c (class scoped_target_fd): New.
11703         (target_fileio_close_cleanup): Remove.
11704         (target_fileio_read_alloc_1): Use scoped_target_fd.
11705
11706 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11707
11708         * silent-rules.mk: New.
11709         * Makefile.in: Include silent-rules.mk
11710         (srcdir, VPATH, top_srcdir): Move up.
11711         (COMPILE): Add ECHO_CXX.
11712         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11713         (init.c): Add ECHO_INIT_C.
11714         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11715         (version.c): Add ECHO_GEN.
11716         (printcmd.o): Add ECHO_CXX.
11717         (target-float.o): Add ECHO_CXX.
11718         (ada-exp.o): Add ECHO_CXX.
11719         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11720         (insight$(EXEEXT)): Add ECHO_CXXLD.
11721         * gnulib/configure.ac: Add AM_SILENT_RULES.
11722         * gnulib/aclocal.m4: Re-generate.
11723         * gnulib/configure: Re-generate.
11724         * gnulib/import/Makefile.in: Re-generate.
11725
11726 2018-03-16  Tom Tromey  <tom@tromey.com>
11727
11728         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11729         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11730         * utils.c (do_free_section_addr_info)
11731         (make_cleanup_free_section_addr_info): Remove.
11732         * symfile.h (struct other_sections): Add constructor.
11733         (struct section_addr_info): Remove.
11734         (section_addr_info): New typedef.
11735         (struct sym_fns) <sym_offsets>: Change type of parameter.
11736         (build_section_addr_info_from_objfile)
11737         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11738         (default_symfile_offsets, symbol_file_add)
11739         (symbol_file_add_from_bfd)
11740         (build_section_addr_info_from_section_table): Update.
11741         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11742         * symfile.c (alloc_section_addr_info): Remove.
11743         (build_section_addr_info_from_section_table): Change return type.
11744         Update.
11745         (build_section_addr_info_from_bfd)
11746         (build_section_addr_info_from_objfile): Likewise.
11747         (free_section_addr_info): Remove.
11748         (relative_addr_info_to_section_offsets): Change type of "addrs".
11749         (addrs_section_compar): Now a std::sort comparator.
11750         (addrs_section_sort): Change return type.
11751         (addr_info_make_relative): Change type of "addrs".  Update.
11752         (default_symfile_offsets, syms_from_objfile_1)
11753         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11754         (symbol_file_add_separate): Update.
11755         (symbol_file_add): Change type of "addrs".  Update.
11756         (add_symbol_file_command): Update.  Remove cleanups.
11757         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11758         cleanups.
11759         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11760         * solib.c (solib_read_symbols): Update.
11761         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11762         * machoread.c (macho_symfile_offsets): Update.
11763         * jit.c (jit_bfd_try_read_symtab): Update.
11764
11765 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11766
11767         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11768         unittests/utils-selftests.c.
11769         * unittests/utils-selftests.c: New file.
11770
11771 2018-03-14  Tom Tromey  <tom@tromey.com>
11772
11773         PR cli/14977:
11774         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11775         for NULL.
11776
11777 2018-03-14  Tom Tromey  <tom@tromey.com>
11778
11779         PR cli/19918:
11780         * printcmd.c (printf_pointer): Allow "-" in format.
11781
11782 2018-03-14  Tom Tromey  <tom@tromey.com>
11783
11784         * printcmd.c (_initialize_printcmd): Add usage to printf.
11785
11786 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11787
11788         * MAINTAINERS: Update my email address.
11789
11790 2018-03-13  Tom Tromey  <tom@tromey.com>
11791
11792         * machoread.c (macho_check_dsym): Change filenamep to a
11793         std::string*.
11794         (macho_symfile_read): Update.
11795         * symfile.c (load_command): Use std::string.
11796
11797 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11798
11799         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11800         to error message string.
11801         (riscv_register_name): Use xsnprintf instead of sprintf.
11802         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11803         internal_error.
11804         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11805         error.
11806         (riscv_push_dummy_call): Likewise.
11807
11808 2018-03-12  Tom Tromey  <tom@tromey.com>
11809
11810         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11811         Use gdb::byte_vector.
11812         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11813
11814 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11815
11816         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11817         parameter type to readable_regcache.
11818         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11819         the declaration.
11820
11821 2018-03-11  Tom Tromey  <tom@tromey.com>
11822
11823         * dwarf2read.c (struct nextfield): Add initializers.
11824         (struct nextfnfield): Remove.
11825         (struct fnfieldlist): Add initializers.  Remove "length" and
11826         "head", use std::vector.
11827         (struct decl_field_list): Remove.
11828         (struct field_info): Add initializers.
11829         <fields, baseclasses>: Now std::vector.
11830         <nbaseclasses, nfnfields, typedef_field_list_count,
11831         nested_types_list_count>: Remove.
11832         (dwarf2_add_field, dwarf2_add_type_defn)
11833         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11834         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11835         (process_structure_scope): Update.
11836
11837 2018-03-11  Tom Tromey  <tom@tromey.com>
11838
11839         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11840         for use by std::sort.
11841         (build_type_psymtabs_1): Use std::vector.
11842
11843 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11844
11845         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11846         and LIBMPFR in the printed configuration.
11847
11848 2018-03-08  Tom Tromey  <tom@tromey.com>
11849
11850         * source.c (get_filename_and_charpos): Use scoped_fd.
11851         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11852         (procfs_pidlist): Likewise.
11853         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11854         (iterate_over_mappings): Likewise.
11855
11856 2018-03-08  Tom Tromey  <tom@tromey.com>
11857
11858         * infcall.c (struct call_return_meta_info)
11859         <stack_temporaries_enabled>: Remove.
11860         (get_call_return_value, call_function_by_hand_dummy): Update.
11861         * thread.c (disable_thread_stack_temporaries): Remove.
11862         (enable_thread_stack_temporaries): Remove.
11863         (thread_stack_temporaries_enabled_p): Return bool.
11864         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11865         (get_last_thread_stack_temporary): Update.
11866         * eval.c (evaluate_subexp): Update.
11867         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11868         class, not a function.
11869         (value_ptr, value_vec): Remove typedefs.
11870         (class thread_info) <stack_temporaries_enabled>: Now bool.
11871         <stack_temporaries>: Now a std::vector.
11872         (thread_stack_temporaries_enabled_p)
11873         (value_in_thread_stack_temporaries): Return bool.
11874
11875 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11876
11877         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11878         (getpkt_or_notif_sane_1): Likewise.
11879
11880 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11881
11882         * build-id.c (build_id_to_debug_bfd): Use std::string.
11883
11884 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11885
11886         * build-id.c (find_separate_debug_file_by_buildid): Return
11887         std::string.
11888         * build-id.h (find_separate_debug_file_by_buildid): Return
11889         std::string.
11890         * coffread.c (coff_symfile_read): Adjust to std::string.
11891         * elfread.c (elf_symfile_read): Adjust to std::string.
11892         * symfile.c (separate_debug_file_exists): Change parameter to
11893         std::string.
11894         (find_separate_debug_file): Return std::string.
11895         (find_separate_debug_file_by_debuglink): Return std::string.
11896         * symfile.h (find_separate_debug_file_by_debuglink): Return
11897         std::string.
11898
11899 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11900
11901         * common/xml-utils.c (xml_escape_text): Move code to...
11902         (xml_escape_text_append): ... this new function.
11903         * common/xml-utils.h (xml_escape_text_append): New declaration.
11904         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11905         New function.
11906         (_initialize_xml_utils): register test_xml_escape_text_append as
11907         a selftest.
11908
11909 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11910
11911         * defs.h: Remove MAX_REGISTER_SIZE.
11912         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11913         asserts.
11914         * python/py-unwind.c (pyuw_sniffer): Likewise.
11915
11916 2018-03-07  Tom Tromey  <tom@tromey.com>
11917
11918         * linux-tdep.c (linux_info_proc): Update.
11919         * target.h (struct target_ops) <to_fileio_readlink>: Return
11920         optional<string>.
11921         (target_fileio_readlink): Return optional<string>.
11922         * remote.c (remote_hostio_readlink): Return optional<string>.
11923         * inf-child.c (inf_child_fileio_readlink): Return
11924         optional<string>.
11925         * target.c (target_fileio_readlink): Return optional<string>.
11926
11927 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11928
11929         * regcache.c (cooked_read_test): Add riscv to the list of
11930         architectures that have a save_reggroup.
11931
11932 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11933
11934         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11935         value is not a dynamic class object.
11936
11937 2018-03-06  Tom Tromey  <tom@tromey.com>
11938
11939         * rust-exp.y: Formatting fixes.
11940
11941 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11942
11943         * riscv-tdep.c (riscv_register_name): Remove target description
11944         support.
11945         (riscv_gdbarch_init): Remove target description check.
11946
11947 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11948
11949         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11950         comment.
11951         * riscv-tdep.h: Likewise.
11952
11953 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11954
11955         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11956         (riscv_pseudo_register_write): Delete.
11957         (riscv_gdbarch_init): Remove all use of pseudo registers.
11958
11959 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11960
11961         * record-btrace.c (btrace_print_lines): Replace cleanup
11962         parameter with RAII equivalents.
11963         (btrace_insn_history): Replace cleanup with RAII equivalents.
11964         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11965         make_cleanup_ui_out_tuple_begin_end): Remove.
11966         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11967         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11968         make_cleanup_ui_out_list_begin_end): Remove.
11969
11970 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11971
11972         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11973         parameter types to std::vector.  Use bool.
11974         (record_btrace_wait): Replace VEC(tp_t) with
11975         std::vector<thread_info *>.
11976         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11977
11978 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11979
11980         * record-btrace.c (record_btrace_disable_callback): Remove.
11981         (struct scoped_btrace_disable): New.
11982         (record_btrace_open): Use scoped_btrace_disable.
11983
11984 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11985
11986         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11987         reading values from registers.
11988
11989 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11990
11991         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11992         where appropriate.
11993
11994 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11995
11996         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11997         change parameter type.  Use GDB's print functions, and use
11998         core_addr_to_string where appropriate.
11999         (riscv_push_dummy_call): Use core_addr_to_string where
12000         appropriate, update call to riscv_print_arg_location, and reindent
12001         a few lines.
12002         (riscv_return_value): Update call to riscv_print_arg_location.
12003
12004 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12005             Tim Newsome <tim@sifive.com>
12006             Albert Ou <a0u@eecs.berkeley.edu>
12007             Darius Rad <darius@bluespec.com>
12008
12009         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12010         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12011         (ALLDEPFILES): Add riscv-tdep.c
12012         * configure.tgt: Add riscv support.
12013         * riscv-tdep.c: New file.
12014         * riscv-tdep.h: New file.
12015         * NEWS: Mention new target.
12016         * MAINTAINERS: Add entry for riscv.
12017
12018 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12019
12020         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12021         fields within aggregates.
12022
12023 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12024
12025         * record-btrace.c (btrace_print_lines): Change type of flags to
12026         gdb_disassembly_flags.
12027
12028 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12029
12030         * fbsd-nat.c: Include "inf-ptrace.h".
12031         (USE_SIGTRAP_SIGINFO): Conditionally define.
12032         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12033         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12034         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12035         function.
12036         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12037         Likewise.
12038         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12039         Likewise.
12040         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12041         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12042         "supports_stopped_by_hw_breakpoint" target methods.
12043
12044 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12045
12046         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12047         * fbsd-nat.c (debug_fbsd_nat): New variable.
12048         (show_fbsd_nat_debug): New function.
12049         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12050         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12051
12052 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12053
12054         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12055         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12056         prototype.
12057         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12058         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12059         method.
12060
12061 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12062
12063         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12064         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12065
12066 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12067
12068         * charset.c (struct charset_vector): New.
12069         (charsets): Change type to charset_vector.
12070         (find_charset_names): Adjust.
12071         (add_one): Adjust.
12072         (_initialize_charset): Adjust.
12073
12074 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12075
12076         * progspace.h (struct program_space) <deleted_solibs>: Change
12077         type to std::vector<std::string>.
12078         * progspace.c (clear_program_space_solib_cache): Adjust.
12079         * breakpoint.c (print_solib_event): Adjust.
12080         (check_status_catch_solib): Adjust.
12081         * solib.c (update_solib_list): Adjust.
12082         * ui-out.h (class ui_out) <field_string>: New overload.
12083         * ui-out.c (ui_out::field_string): New overload.
12084
12085 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12086
12087         * progspace.h (struct program_space): Add constructor and
12088         destructor, initialize fields.
12089         (add_program_space): Remove.
12090         * progspace.c (add_program_space): Rename to...
12091         (program_space::program_space): ... this.
12092         (release_program_space): Rename to...
12093         (program_space::~program_space): ... this.
12094         (delete_program_space): Use delete to delete program_space.
12095         (initialize_progspace): Use new to allocate program_space.
12096         * inferior.c (add_inferior_with_spaces): Likewise.
12097         (clone_inferior_command): Likewise.
12098         * infrun.c (follow_fork_inferior): Likewise.
12099         (handle_vfork_child_exec_or_exit): Likewise.
12100
12101 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12102
12103         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12104         (delim_string_to_char_ptr_vec): Return std::vector of
12105         gdb::unique_xmalloc_ptr.
12106         (dirnames_to_char_ptr_vec_append): Take std::vector of
12107         gdb::unique_xmalloc_ptr.
12108         (dirnames_to_char_ptr_vec): Return std::vector of
12109         gdb::unique_xmalloc_ptr.
12110         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12111         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12112         (delim_string_to_char_ptr_vec): Return an std::vector of
12113         gdb::unique_xmalloc_ptr, adjust the code.
12114         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12115         gdb::unique_xmalloc_ptr, adjust the code.
12116         (dirnames_to_char_ptr_vec): Return an std::vector of
12117         gdb::unique_xmalloc_ptr, adjust the code.
12118         * auto-load.c (auto_load_safe_path_vec): Change type to
12119         std::vector of gdb::unique_xmalloc_ptr.
12120         (auto_load_expand_dir_vars): Return an std::vector of
12121         gdb::unique_xmalloc_ptr, adjust the code.
12122         (auto_load_safe_path_vec_update): Adjust.
12123         (filename_is_in_auto_load_safe_path_vec): Adjust.
12124         (auto_load_objfile_script_1): Adjust.
12125         * build-id.c (build_id_to_debug_bfd): Adjust.
12126         * linux-thread-db.c (thread_db_load_search): Adjust.
12127         * source.c (add_path): Adjust.
12128         (openp): Adjust.
12129         * symfile.c (find_separate_debug_file): Adjust.
12130         * utils.c (do_free_char_ptr_vec): Remove.
12131         (make_cleanup_free_char_ptr_vec): Remove.
12132
12133 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12134
12135         PR gdb/22907
12136         * common/pathstuff.c: Conditionally include "<windows.h>".
12137
12138 2018-03-01  Georg Sauthoff  <mail@georg.so>
12139
12140         PR gdb/22888
12141         * gcore.in: Quote variables and switch interpreter to bash.
12142
12143 2018-03-01  Tom Tromey  <tom@tromey.com>
12144
12145         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12146         assertion.  Add assertion for discriminant_index.
12147         (quirk_rust_enum): Use correct base type name in univariant case.
12148
12149 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12150
12151         * record.c (get_call_history_modifiers): Return a
12152         record_print_flags.
12153         (cmd_record_call_history): Adjust.
12154         * record-btrace.c (record_btrace_call_history): Adjust.
12155         (record_btrace_call_history_range): Adjust.
12156         (record_btrace_call_history_from): Adjust.
12157         * target-debug.h (target_debug_print_record_print_flags): New.
12158         * target-delegates.c: Re-generate.
12159         * target.c (target_call_history): Change flags type.
12160         (target_call_history_from): Likewise.
12161         (target_call_history_range): Likewise.
12162         * target.h (struct target_ops) <target_call_history>: Likewise.
12163         (target_call_history_from): Likewise.
12164         (target_call_history_range): Likewise.
12165
12166 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12167             Simon Marchi  <simon.marchi@polymtl.ca>
12168
12169         * common/common-utils.c: Include "sys/stat.h".
12170         (is_regular_file): Move here from "source.c"; change return
12171         type to "bool".
12172         * common/common-utils.h (is_regular_file): New prototype.
12173         * common/pathstuff.c (contains_dir_separator): New function.
12174         * common/pathstuff.h (contains_dir_separator): New prototype.
12175         * source.c: Don't include "sys/stat.h".
12176         (is_regular_file): Move to "common/common-utils.c".
12177
12178 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12179
12180         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12181         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12182         * auto-load.c: Include "common/pathstuff.h".
12183         * common/common-def.h (current_directory): Move here.
12184         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12185         function.
12186         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12187         prototype.
12188         * common/pathstuff.c: New file.
12189         * common/pathstuff.h: New file.
12190         * compile/compile.c: Include "common/pathstuff.h".
12191         * defs.h (current_directory): Move to "common/common-defs.h".
12192         * dwarf2read.c: Include "common/pathstuff.h".
12193         * exec.c: Likewise.
12194         * guile/scm-safe-call.c: Likewise.
12195         * linux-thread-db.c: Likewise.
12196         * main.c: Likewise.
12197         * nto-tdep.c: Likewise.
12198         * objfiles.c: Likewise.
12199         * source.c: Likewise.
12200         * symtab.c: Likewise.
12201         * utils.c: Include "common/pathstuff.h".
12202         (gdb_realpath): Move to "common/pathstuff.c".
12203         (gdb_realpath_keepfile): Likewise.
12204         (gdb_abspath): Likewise.
12205         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12206         (gdb_realpath_keepfile): Likewise.
12207         (gdb_abspath): Likewise.
12208
12209 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12210
12211         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12212         wildcard process pid for super_resume for kernels with a
12213         specific bug.
12214
12215 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12216
12217         * compile/compile.c (get_args): Add additional comments
12218         explaining function.
12219
12220 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12221             Tom Tromey  <tom@tromey.com>
12222
12223         * target.h (memory_write_request_s): Remove typedef.  Don't define
12224         VEC.
12225         (target_write_memory_blocks): Change argument to std::vector.
12226         (struct memory_write_request): Add constructor.
12227         * target-memory.c (compare_block_starting_address): Return bool.
12228         Change argument types.
12229         (claim_memory): Change arguments to use std::vector.
12230         (split_regular_and_flash_blocks, blocks_to_erase)
12231         (compute_garbled_blocks): Likewise.
12232         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12233         (target_write_memory_blocks): Change argument to std::vector.
12234         * symfile.c (struct load_section_data): Add constructor and
12235         destructor.  Use std::vector for "requests".
12236         (struct load_progress_data): Add initializers.
12237         (load_section_callback): Update.  Use "new".
12238         (clear_memory_write_data): Remove.
12239         (generic_load): Update.
12240
12241 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12242
12243         * arch/aarch64.h: Use common/tdesc.h.
12244
12245 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12246
12247         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12248         architecture with a 64-bit ABI.
12249
12250 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12251
12252         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12253         ahead of target description loading.
12254
12255 2018-02-26  Tom Tromey  <tom@tromey.com>
12256
12257         * stack.c (backtrace_command_1): Update.
12258         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12259         of "flags".
12260         * python/py-framefilter.c (py_print_frame)
12261         (gdbpy_apply_frame_filter): Change type of "flags".
12262         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12263         of "flags".
12264         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12265         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12266         * extension.h (enum frame_filter_flag): Rename from
12267         frame_filter_flags.
12268         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12269         (apply_ext_lang_frame_filter): Change type of "flags".
12270         * extension.c (apply_ext_lang_frame_filter): Change type of
12271         "flags".
12272         * extension-priv.h (struct extension_language_ops)
12273         <apply_frame_filter>: Change type of "flags".
12274
12275 2018-02-26  Tom Tromey  <tom@tromey.com>
12276
12277         PR python/16497:
12278         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12279         off-by-one in py_end computation.
12280         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12281         PRINT_MORE_FRAMES.
12282         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12283         constant.
12284
12285 2018-02-26  Tom Tromey  <tom@tromey.com>
12286
12287         * dwarf2read.c (struct variant_field): New.
12288         (struct nextfield) <variant>: New field.
12289         (dwarf2_add_field): Handle DW_TAG_variant_part.
12290         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12291         discriminated union.
12292         (read_structure_type): Handle DW_TAG_variant_part.
12293         (handle_struct_member_die): New function, extracted from
12294         process_structure_scope.  Handle DW_TAG_variant.
12295         (process_structure_scope): Handle discriminated unions.  Call
12296         handle_struct_member_die.
12297
12298 2018-02-26  Tom Tromey  <tom@tromey.com>
12299
12300         * rust-lang.h (rust_last_path_segment): Declare.
12301         * rust-lang.c (rust_last_path_segment): Now public.  Change
12302         contract.
12303         (struct disr_info): Remove.
12304         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12305         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12306         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12307         (rust_enum_p, rust_enum_variant): New function.
12308         (rust_underscore_fields): Remove "offset" parameter.
12309         (rust_print_enum): New function.
12310         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12311         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12312         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12313         enums.
12314         (rust_internal_print_type): New function, from rust_print_type.
12315         Remove enum code.
12316         (rust_print_type): Call rust_internal_print_type.
12317         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12318         Update enum handling.
12319         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12320         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12321         (rust_union_quirks): New functions.
12322         (process_full_comp_unit, process_full_type_unit): Call
12323         rust_union_quirks.
12324         (process_structure_scope): Update rust_unions if necessary.
12325
12326 2018-02-26  Tom Tromey  <tom@tromey.com>
12327
12328         * value.h (value_union_variant): Declare.
12329         * valops.c (value_union_variant): New function.
12330         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12331         (struct discriminant_info): New.
12332         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12333         enumerator.
12334         (struct main_type) <flag_discriminated_union>: New field.
12335
12336 2018-02-26  Tom Tromey  <tom@tromey.com>
12337
12338         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12339         unittests/unpack-selftests.c.
12340         * unittests/unpack-selftests.c: New file.
12341         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12342
12343 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12344
12345         * dwarf2read.c (struct partial_die_info) <read>: New method.
12346         (read_partial_die): Remove the declaration.
12347         (load_partial_dies): Update.
12348         (partial_die_info::partial_die_info):
12349         (read_partial_die): Change it to partial_die_info::read.
12350
12351 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12352
12353         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12354         (fixup_partial_die): Remove declaration.
12355         (scan_partial_symbols): Update.
12356         (partial_die_parent_scope): Likewise.
12357         (partial_die_full_name): Likewise.
12358         (fixup_partial_die): Change it to partial_die_info::fixup.
12359
12360 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12361
12362         * dwarf2read.c (read_partial_die): Update the declaration.
12363         (load_partial_dies): Caller update.
12364         (read_partial_die): Remove one argument abbrev_len.
12365
12366 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12367
12368         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12369         assignment operator.
12370         (load_partial_dies): Use ctor and copy ctor.
12371         (read_partial_die): Update.
12372         (dwarf2_cu::find_partial_die): Use ctor.
12373
12374 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12375
12376         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12377         (find_partial_die_in_comp_unit): Change it to
12378         dwarf2_cu::find_partial_die.
12379         (find_partial_die): Update.
12380
12381 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12382
12383         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12384         is NULL.
12385
12386 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12387
12388         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12389
12390 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12391
12392         * arch/amd64.h: Use common/tdesc.h.
12393         * arch/i386.c: Likewise.
12394         * arch/i386.h: Likewise.
12395         * arch/tic6x.c: Likewise.
12396         * arch/tdesc.h: Move file from here...
12397         * common/tdesc.h: ...to here.
12398         * features/aarch64-core.c: Regenerate.
12399         * features/aarch64-fpu.c: Regenerate.
12400         * features/i386/32bit-avx.c: Regenerate.
12401         * features/i386/32bit-avx512.c: Regenerate.
12402         * features/i386/32bit-core.c: Regenerate.
12403         * features/i386/32bit-linux.c: Regenerate.
12404         * features/i386/32bit-mpx.c: Regenerate.
12405         * features/i386/32bit-pkeys.c: Regenerate.
12406         * features/i386/32bit-sse.c: Regenerate.
12407         * features/i386/64bit-avx.c: Regenerate.
12408         * features/i386/64bit-avx512.c: Regenerate.
12409         * features/i386/64bit-core.c: Regenerate.
12410         * features/i386/64bit-linux.c: Regenerate.
12411         * features/i386/64bit-mpx.c: Regenerate.
12412         * features/i386/64bit-pkeys.c: Regenerate.
12413         * features/i386/64bit-segments.c: Regenerate.
12414         * features/i386/64bit-sse.c: Regenerate.
12415         * features/i386/x32-core.c: Regenerate.
12416         * features/tic6x-c6xp.c: Regenerate.
12417         * features/tic6x-core.c: Regenerate.
12418         * features/tic6x-gp.c: Regenerate.
12419         * target-descriptions.c: Use common/tdesc.h.
12420         * target-descriptions.h: Likewise.
12421
12422 2018-02-24  Tom Tromey  <tom@tromey.com>
12423
12424         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12425         (try_thread_db_load_from_dir, thread_db_load_search): Use
12426         std::string.
12427         (info_auto_load_libthread_db_compare): Return bool.  Change
12428         argument types.
12429         (info_auto_load_libthread_db): Use std::vector, std::string.
12430         Remove cleanups.
12431
12432 2018-02-24  Tom Tromey  <tom@tromey.com>
12433
12434         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12435         std::string.
12436         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12437         std::string*.
12438         * gdbarch.c: Rebuild.
12439         * gdbarch.h: Rebuild.
12440         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12441         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12442         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12443         std::string*.
12444
12445 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12446
12447         * gdbtypes.h (sect_offset): Change type to uint64_t.
12448         (sect_offset_str): New function.
12449         * dwarf2read.c (create_addrmap_from_aranges): Use
12450         sect_offset_str.
12451         (error_check_comp_unit_head): Likewise.
12452         (create_debug_type_hash_table): Likewise.
12453         (read_cutu_die_from_dwo): Likewise.
12454         (init_cutu_and_read_dies): Likewise.
12455         (init_cutu_and_read_dies_no_follow): Likewise.
12456         (process_psymtab_comp_unit_reader): Likewise.
12457         (partial_die_parent_scope): Likewise.
12458         (peek_die_abbrev): Likewise.
12459         (process_queue): Likewise.
12460         (dwarf2_physname): Likewise.
12461         (read_namespace_alias): Likewise.
12462         (read_import_statement): Likewise.
12463         (create_dwo_cu_reader): Likewise.
12464         (create_cus_hash_table): Likewise.
12465         (lookup_dwo_cutu): Likewise.
12466         (inherit_abstract_dies): Likewise.
12467         (read_func_scope): Likewise.
12468         (read_call_site_scope): Likewise.
12469         (dwarf2_add_member_fn): Likewise.
12470         (read_common_block): Likewise.
12471         (read_module_type): Likewise.
12472         (read_typedef): Likewise.
12473         (read_subrange_type): Likewise.
12474         (load_partial_dies): Likewise.
12475         (read_partial_die): Likewise.
12476         (find_partial_die): Likewise.
12477         (read_str_index): Likewise.
12478         (dwarf2_string_attr): Likewise.
12479         (build_error_marker_type): Likewise.
12480         (lookup_die_type): Likewise.
12481         (dump_die_shallow): Likewise.
12482         (follow_die_ref): Likewise.
12483         (dwarf2_fetch_die_loc_sect_off): Likewise.
12484         (dwarf2_fetch_constant_bytes): Likewise.
12485         (follow_die_sig): Likewise.
12486         (get_signatured_type): Likewise.
12487         (get_DW_AT_signature_type): Likewise.
12488         (dwarf2_find_containing_comp_unit): Likewise.
12489         (set_die_type): Likewise.
12490
12491 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12492
12493         * arch/aarch64.c: Include "common-defs.h".
12494         * arch/amd64.c: Likewise.
12495         * arch/i386.c: Likewise.
12496
12497 2018-02-21  Tom Tromey  <tom@tromey.com>
12498
12499         * value.h: (extract_field_op): Update.
12500         * eval.c (extract_field_op): Return a const char *.
12501         * expression.h (parse_expression_for_completion): Update.
12502         * completer.c (complete_expression): Update.
12503         (add_struct_fields): Make fieldname const.
12504         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12505         (mark_completion_tag, parse_exp_in_context_1): Update.
12506         (parse_expression_for_completion): Change "name" to
12507         unique_xmalloc_ptr*.
12508
12509 2018-02-21  Tom Tromey  <tom@tromey.com>
12510
12511         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12512
12513 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12514
12515         * avr-tdep.c (avr_read_pc): Change parameter type to
12516         readable_regcache.
12517         * gdbarch.sh (read_pc): Likewise.
12518         * gdbarch.c: Re-generated.
12519         * gdbarch.h: Re-generated.
12520         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12521         readable_regcache.
12522         * ia64-tdep.c (ia64_read_pc): Likewise.
12523         * mips-tdep.c (mips_read_pc): Likewise.
12524         * spu-tdep.c (spu_read_pc): Likewise.
12525
12526 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12527
12528         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12529         * regcache-dump.c: New file.
12530         * regcache.c: Move register_dump to regcache-dump.c.
12531         (maintenance_print_registers): Likewise.
12532         (maintenance_print_raw_registers): Likewise.
12533         (maintenance_print_cooked_registers): Likewise.
12534         (maintenance_print_register_groups): Likewise.
12535         (maintenance_print_remote_registers): Likewise.
12536         (_initialize_regcache): Likewise.
12537         * regcache.h (register_dump): Moved from regcache.c.
12538
12539 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12540
12541         * regcache.c (regcache::regcache): Update.
12542         (regcache::invalidate): Move it to detached_regcache::invalidate.
12543         (get_thread_arch_aspace_regcache): Update.
12544         (regcache::raw_update): Update.
12545         (regcache::cooked_read): Remove some code.
12546         (regcache::cooked_read_value): Likewise.
12547         (regcache::raw_write): Remove assert on m_readonly_p.
12548         (regcache::raw_supply_integer): Move it to
12549         detached_regcache::raw_supply_integer.
12550         (regcache::raw_supply_zeroed): Likewise.
12551         * regcache.h (detached_regcache) <raw_supply_integer>: New
12552         declaration.
12553         <raw_supply_zeroed, invalidate>: Likewise.
12554         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12555         <invalidate>: Likewise.
12556         <m_readonly_p>: Removed.
12557
12558 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12559
12560         * infcmd.c (get_return_value): Let stop_regs point to
12561         get_current_regcache.
12562         * regcache.c (regcache::regcache): Remove.
12563         (register_dump_reg_buffer): New class.
12564         (regcache_print): Adjust.
12565         * regcache.h (regcache): Remove constructors.
12566
12567 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12568
12569         * regcache.c (class register_dump): New class.
12570         (register_dump_regcache, register_dump_none): New class.
12571         (register_dump_remote, register_dump_groups): New class.
12572         (regcache_print): Update.
12573         * regcache.h (regcache_dump_what): Move it to regcache.c.
12574         (regcache) <dump>: Remove.
12575
12576 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12577
12578         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12579          reg_buffer_rw *.
12580         (jit_unwind_reg_set_impl): Call raw_supply.
12581         (jit_frame_sniffer): Use reg_buffer_rw.
12582         * record-full.c (record_full_core_regbuf): Change its type.
12583         (record_full_core_open_1): Use reg_buffer_rw.
12584         (record_full_close): Likewise.
12585         (record_full_core_fetch_registers): Use regcache->raw_supply.
12586         (record_full_core_store_registers): Likewise.
12587         * regcache.c (regcache::get_register_status): Move it to
12588         reg_buffer.
12589         (regcache_raw_set_cached_value): Remove.
12590         (regcache::raw_set_cached_value): Remove.
12591         (regcache::raw_write): Call raw_supply.
12592         (regcache::raw_supply): Move it to reg_buffer_rw.
12593         * regcache.h (regcache_raw_set_cached_value): Remove.
12594         (reg_buffer_rw): New class.
12595
12596 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12597
12598         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12599         readonly_detached_regcache.
12600         (dummy_frame_prev_register): Use regcache->cooked_read.
12601         * frame.c (frame_save_as_regcache): Change return type.
12602         (frame_pop): Update.
12603         * frame.h (frame_save_as_regcache): Update declaration.
12604         * inferior.h (get_infcall_suspend_state_regcache): Update
12605         declaration.
12606         * infrun.c (infcall_suspend_state) <registers>: use
12607         readonly_detached_regcache.
12608         (save_infcall_suspend_state): Don't use regcache_dup.
12609         (get_infcall_suspend_state_regcache): Change return type.
12610         * linux-fork.c (struct fork_info) <savedregs>: Change to
12611         readonly_detached_regcache.
12612         <pc>: New field.
12613         (fork_save_infrun_state): Don't use regcache_dup.
12614         (info_checkpoints_command): Adjust.
12615         * mi/mi-main.c (register_changed_p): Update declaration.
12616         (mi_cmd_data_list_changed_registers): Use
12617         readonly_detached_regcache.
12618         (register_changed_p): Change parameter type to
12619         readonly_detached_regcache.
12620         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12621         readonly_detached_regcache.
12622         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12623         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12624         New.
12625         (regcache::save): Move it to reg_buffer.
12626         (regcache::restore): Change parameter type.
12627         (regcache_dup): Remove.
12628         * regcache.h (reg_buffer) <save>: New method.
12629         (readonly_detached_regcache): New class.
12630         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12631         readonly_detached_regcache.
12632         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12633
12634 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12635
12636         * frame.c (frame_save_as_regcache): Use regcache method save.
12637         (frame_pop): Use regcache method restore.
12638         * infrun.c (restore_infcall_suspend_state): Likewise.
12639         * linux-fork.c (fork_load_infrun_state): Likewise.
12640         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12641         save.
12642         * regcache.c (regcache_save): Remove.
12643         (regcache::restore): More asserts.
12644         (regcache_cpy): Remove.
12645         * regcache.h (regcache_save): Remove the declaration.
12646         (regcache::restore): Move from private to public.
12647         Remove the friend declaration of regcache_cpy.
12648         (regcache_cpy): Remove declaration.
12649
12650 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12651
12652         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12653         parameter type to 'readable_regcache *'.
12654         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12655         * arm-tdep.c (arm_neon_quad_read): Likewise.
12656         (arm_pseudo_read): Likewise.
12657         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12658         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12659         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12660         * gdbarch.c: Re-generated.
12661         * gdbarch.h: Re-generated.
12662         * gdbarch.sh (pseudo_register_read): Change parameter type to
12663         'readable_regcache *'.
12664         (pseudo_register_read_value): Likewise.
12665         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12666         (h8300_pseudo_register_read): Likewise.
12667         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12668         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12669         (i386_pseudo_register_read_into_value): Likewise.
12670         (i386_pseudo_register_read_value): Likewise.
12671         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12672         declaration.
12673         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12674         * m32c-tdep.c (m32c_raw_read): Likewise.
12675         (m32c_read_flg): Likewise.
12676         (m32c_banked_register): Likewise.
12677         (m32c_banked_read): Likewise.
12678         (m32c_sb_read): Likewise.
12679         (m32c_part_read): Likewise.
12680         (m32c_cat_read): Likewise.
12681         (m32c_r3r2r1r0_read): Likewise.
12682         (m32c_pseudo_register_read): Likewise.
12683         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12684         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12685         (mep_pseudo_cr64_read): Likewise.
12686         (mep_pseudo_register_read): Likewise.
12687         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12688         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12689         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12690         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12691         (regcache::cooked_read): Likewise.
12692         (regcache::cooked_read_value): Likewise.
12693         (regcache_cooked_read_signed):
12694         (regcache::cooked_read): Likewise.
12695         * regcache.h (readable_regcache): New class.
12696         (regcache): Inherit readable_regcache.  Move some methods to
12697         readable_regcache.
12698         * rl78-tdep.c (rl78_pseudo_register_read): Change
12699         parameter type to 'readable_regcache *'.
12700         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12701         (e500_pseudo_register_read): Change parameter type to
12702         'readable_regcache *'.
12703         (dfp_pseudo_register_read): Likewise.
12704         (vsx_pseudo_register_read): Likewise.
12705         (efpr_pseudo_register_read): Likewise.
12706         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12707         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12708         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12709         (sh64_pseudo_register_read): Likewise.
12710         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12711         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12712         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12713         (spu_pseudo_register_read): Likewise.
12714         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12715         (xtensa_pseudo_register_read): Likewise.
12716
12717 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12718
12719         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12720         (regcache::arch): Move it to reg_buffer::arch.
12721         (regcache::register_buffer): Likewise.
12722         (regcache::assert_regnum): Likewise.
12723         (regcache::num_raw_registers): Likewise.
12724         * regcache.h (reg_buffer): New class.
12725         (regcache): Inherit reg_buffer.
12726
12727 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12728
12729         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12730         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12731
12732 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12733
12734         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12735
12736 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12737
12738         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12739         (SFILES): Remove common/*.c files.
12740         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12741         * common/common.host: Add common reference.
12742         * configure.ac: Likewise.
12743         * configure: Regenerate.
12744
12745 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12746
12747         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12748         (block_initialize_namespace): Use new.
12749         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12750         (dwarf2_free_objfile): Use delete.
12751         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12752         (copy_type_recursive): Use new.
12753         * gdb_obstack.h (allocate_on_obstack): New.
12754
12755 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12756
12757         PR gdb/22849
12758         * inferior.c (exit_inferior_1): Reset inf->control.
12759
12760 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12761
12762         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12763         declaration.
12764
12765 2018-02-14  Pedro Alves  <palves@redhat.com>
12766
12767         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12768         frame_cleanup_after_sniffer on exception.
12769
12770 2018-02-14  Tom Tromey  <tom@tromey.com>
12771
12772         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12773         const.
12774         (solib_bfd_open): Make pathname const.
12775         * solib.c (solib_bfd_open): Make pathname const.
12776         * solib-spu.c (spu_bfd_fopen): Make name const.
12777         (spu_bfd_open): Make pathname const.
12778         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12779         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12780
12781 2018-02-14  Tom Tromey  <tom@tromey.com>
12782
12783         * symfile.c (symfile_bfd_open): Update.
12784         * source.h (openp, source_full_path_of, find_and_open_source):
12785         Change argument type to unique_xmalloc_ptr.
12786         * source.c (openp): Take a unique_xmalloc_ptr.
12787         (source_full_path_of, find_and_open_source): Likewise.
12788         (open_source_file, symtab_to_fullname): Update.
12789         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12790         unique_xmalloc_ptr.
12791         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12792         (exec_file_find): Update.
12793         * psymtab.c (psymtab_to_fullname): Update.
12794         * nto-tdep.h (nto_find_and_open_solib): Update.
12795         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12796         unique_xmalloc_ptr.
12797         * exec.c (exec_file_attach): Update.
12798         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12799         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12800
12801 2018-02-14  Tom Tromey  <tom@tromey.com>
12802
12803         * solib.c: Include source.h.
12804         * nto-tdep.c: Include source.h.
12805         * mi/mi-cmd-env.c: Include source.h.
12806         * infcmd.c: Include source.h.
12807         * exec.c: Include source.h.
12808         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12809         (add_path, directory_switch, source_path, init_source_path): Move
12810         declarations...
12811         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12812         (add_path, directory_switch, source_path, init_source_path):
12813         ...here.
12814
12815 2018-02-14  Tom Tromey  <tom@tromey.com>
12816
12817         * solist.h (exec_file_find, solib_find): Return
12818         unique_xmalloc_ptr.
12819         (solib_bfd_fopen): Take a const char *.
12820         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12821         (exec_file_find, solib_find): Likewise.
12822         (solib_bfd_fopen): Do not take ownership of "pathname".
12823         (solib_bfd_open): Use unique_xmalloc_ptr.
12824         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12825         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12826         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12827         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12828
12829 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12830
12831         * ada-lang.c (name_match_type_from_name): Remove reference to
12832         ada_name_for_lookup in function's documentation.
12833         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12834
12835 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12836
12837         * defs.h (enum openp_flags): New enum.
12838         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12839         Move to enum openp_flags.
12840         (openp_flags): New enum flags.
12841         (openp): Change parameter type to openp_flags.
12842         * source.c (openp): Change parameter type to openp_flags.
12843         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12844         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12845
12846 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12847
12848         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12849         per-command.
12850
12851 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12852
12853         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12854         into...
12855         (class dwarf2_queue_guard): ...the destructor of this new class.
12856         (dw2_do_instantiate_symtab): Create instance of the new class
12857         dwarf2_queue_guard, remove cleanup.
12858
12859 2018-02-09  Tom Tromey  <tom@tromey.com>
12860
12861         * source.c (find_source_lines): Don't reference past the end of
12862         the vector.
12863
12864 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12865
12866         * remote.c (remote_btrace_maybe_reopen): Change error message.
12867         * btrace.c (btrace_enable): Likewise.
12868         (parse_xml_btrace): Likewise.
12869         (parse_xml_btrace_conf): Likewise.
12870
12871 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12872
12873         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12874         (linux_enable_pt, linux_enable_bts): Call
12875         diagnose_perf_event_open_fail.
12876
12877 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12878
12879         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12880         Remove parameter and change return type.  Update callers.  Move it.
12881         (linux_enable_bts, linux_enable_pt): Improve error message.
12882         (linux_enable_pt): Remove zero buffer size check.
12883         (linux_enable_btrace): Improve error messages.  Remove NULL return
12884         check.
12885
12886 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12887
12888         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12889         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12890         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12891         (linux_supports_pt, linux_supports_btrace): Remove.
12892         (linux_enable_bts): Call cpu_supports_bts.
12893         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12894         * remote.c (remote_supports_btrace): Remove.
12895         (init_remote_ops): Remove remote_supports_btrace.
12896         * target-delegates.c: Regenerated.
12897         * target.c (target_supports_btrace): Remove.
12898         * target.h (target_ops) <to_supports_btrace>: Remove
12899         (target_supports_btrace): Remove.
12900         * x86-linux-nat.c (x86_linux_create_target): Remove
12901         linux_supports_btrace.
12902
12903 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12904
12905         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12906         btrace failed.
12907         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12908         exception and use message in own exception.
12909
12910 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12911
12912         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12913         (perf_event_pt_event_type): Use gdb_file_up.
12914         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12915         scoped_fd, and scoped_mmap.
12916
12917 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12918
12919         * common/scoped_mmap.h: New.
12920         * unittests/scoped_mmap-selftest.c: New.
12921         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12922         unittests/scoped_mmap-selftest.c.
12923
12924 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12925
12926         * common/scoped_fd.h: New.
12927         * unittests/scoped_fd-selftest.c: New.
12928         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12929         unittests/scoped_fd-selftest.c.
12930
12931 2018-02-09  Tom Tromey  <tom@tromey.com>
12932
12933         * auto-load.c (auto_load_section_scripts): Use
12934         gdb::unique_xmalloc_ptr.
12935
12936 2018-02-09  Tom Tromey  <tom@tromey.com>
12937
12938         * auto-load.c (execute_script_contents): Use std::string.
12939
12940 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12941
12942         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12943         Python function, rather than a new command.
12944
12945 2018-02-08  Tom Tromey  <tom@tromey.com>
12946
12947         * solib.c (solib_find_1): Use std::string.
12948         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12949
12950 2018-02-08  Tom Tromey  <tom@tromey.com>
12951
12952         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12953
12954 2018-02-08  Tom Tromey  <tom@tromey.com>
12955
12956         * source.c (find_source_lines): Use gdb::def_vector.
12957
12958 2018-02-08  Tom Tromey  <tom@tromey.com>
12959
12960         * macrocmd.c (struct temporary_macro_definition): New.
12961         (macro_define_command): Use temporary_macro_definition.  Remove
12962         cleanups.
12963         (free_macro_definition_ptr): Remove.
12964
12965 2018-02-08  Tom Tromey  <tom@tromey.com>
12966
12967         * macroexp.c (maybe_expand): Use std::string.
12968
12969 2018-02-08  Tom Tromey  <tom@tromey.com>
12970
12971         * macroexp.c (struct macro_buffer): Add initializers for some
12972         members.
12973         (init_buffer, init_shared_buffer, free_buffer)
12974         (free_buffer_return_text): Remove.
12975         (macro_buffer): New constructors.
12976         (~macro_buffer): New destructor.
12977         (macro_buffer::set_shared): New method.
12978         (macro_buffer::resize_buffer, macro_buffer::appendc)
12979         (macro_buffer::appendmem): Now methods, not free functions.
12980         (set_token, append_tokens_without_splicing, stringify)
12981         (macro_stringify): Update.
12982         (gather_arguments): Change return type.  Remove argc_p argument,
12983         add args_ptr argument.  Use std::vector.
12984         (substitute_args): Remove argc argument.  Accept std::vector.
12985         (expand): Update.  Use std::vector.
12986         (scan, macro_expand, macro_expand_next): Update.
12987
12988 2018-02-08  Tom Tromey  <tom@tromey.com>
12989
12990         * symtab.c (default_collect_symbol_completion_matches_break_on):
12991         Use unique_xmalloc_ptr.
12992         * macroscope.h: (sal_macro_scope, user_macro_scope)
12993         (default_macro_scope): Return unique_xmalloc_ptr.
12994         * macroscope.c (sal_macro_scope, user_macro_scope)
12995         (default_macro_scope): Return unique_xmalloc_ptr.
12996         * macroexp.h (macro_expand, macro_expand_once): Return
12997         unique_xmalloc_ptr.
12998         * macroexp.c (macro_expand, macro_expand_once): Return
12999         unique_xmalloc_ptr.
13000         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13001         (info_macro_command, info_macros_command): Use
13002         unique_xmalloc_ptr.
13003         * compile/compile-c-support.c (write_macro_definitions): Use
13004         unique_xmalloc_ptr.
13005         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13006
13007 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13008
13009         * value.c (value_static_field): Assign field type instead of
13010         containing type when returning an optimized out value.
13011
13012 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13013
13014         * ft32-tdep.c (ft32_read_pc): Remove.
13015         (ft32_write_pc): Remove.
13016         (ft32_gdbarch_init): Update.
13017         * m32r-tdep.c (m32r_read_pc): Remove.
13018         (m32r_gdbarch_init): Update.
13019         * mep-tdep.c (mep_read_pc): Remove.
13020         (mep_gdbarch_init): Update.
13021         * microblaze-tdep.c (microblaze_write_pc): Remove.
13022         (microblaze_gdbarch_init): Update.
13023         * mn10300-tdep.c (mn10300_read_pc): Remove.
13024         (mn10300_write_pc): Remove.
13025         (mn10300_gdbarch_init): Update.
13026         * moxie-tdep.c (moxie_read_pc): Remove.
13027         (moxie_write_pc): Remove.
13028         (moxie_gdbarch_init): Update.
13029
13030 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13031
13032         * expprint.c (print_subexp_standard): Handle
13033         OP_F77_UNDETERMINED_ARGLIST.
13034         (dump_subexp_body_standard): Likewise.
13035
13036 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13037
13038         * target-descriptions.c (tdesc_element_visitor) Add empty
13039         implementations.
13040         (tdesc_type): Move make_gdb_type from here.
13041         (tdesc_type_builtin): Likewise.
13042         (tdesc_type_vector): Likewise.
13043         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13044         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13045         (make_gdb_type_union): Likewise.
13046         (make_gdb_type_flags): Likewise.
13047         (make_gdb_type_enum): Likewise.
13048         (make_gdb_type): New function.
13049         (tdesc_register_type): Use static make_gdb_type.
13050
13051 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13052
13053         * infcmd.c (default_print_one_register_info): Align natural-format
13054         column values consistently one under another.
13055         (pad_to_column): New function.
13056
13057 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13058
13059         * dwarf2read.c (dwarf2_physname): Move commment.
13060
13061 2018-02-01  Leszek Swirski  <leszeks@google.com>
13062
13063         * varobj.c (varobj_formatted_print_options): Allow recursive
13064         pretty printing if pretty printing is enabled.
13065
13066 2018-02-01  Leszek Swirski  <leszeks@google.com>
13067
13068         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13069         names after a structop as a filename.
13070
13071 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13072
13073         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13074         (arm_record_coproc_data_proc): Likewise.
13075
13076 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13077
13078         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13079
13080 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13081
13082         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13083         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13084
13085 2018-01-31  Pedro Alves  <palves@redhat.com>
13086
13087         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13088         * inflow.c (child_terminal_save_inferior): Wrap reference to
13089         tcgetpgrp in HAVE_TERMIOS_H.
13090         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13091         _WIN32.
13092         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13093         always iterate over all inferiors.
13094         (gdbsim_cntrl_c): Adjust.
13095         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13096
13097 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13098
13099         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13100         index type is objfile-owned if the element type is as well.
13101
13102 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13103
13104         GDB 8.1 released.
13105
13106 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13107
13108         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13109         "features/s390x-linux64.c".
13110         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13111         s390_linux32 and s390x_linux64.
13112         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13113         default tdesc.
13114         * s390-tdep.c: Include "features/s390-linux32.c" and
13115         "features/s390x-linux64.c".
13116         (s390_tdesc_valid): Add check for tdesc_has_registers.
13117         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13118         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13119         tdesc_s390x_linux64.
13120         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13121         tdesc_s390x_linux64 to...
13122         * s390-tdep.h: ...here.
13123
13124 2018-01-30  Pedro Alves  <palves@redhat.com>
13125
13126         PR gdb/13211
13127         * config.in, configure: Regenerate.
13128         * configure.ac: Check for getpgid.
13129         * go32-nat.c (go32_pass_ctrlc): New.
13130         (go32_target): Install it.
13131         * inf-child.c (inf_child_target): Install
13132         child_terminal_save_inferior, child_pass_ctrlc and
13133         child_interrupt.
13134         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13135         (inf_ptrace_target): No longer install it.
13136         * infcmd.c (interrupt_target_1): Adjust.
13137         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13138         (child_interrupt): Declare.
13139         (inferior::terminal_state): New.
13140         * inflow.c (struct terminal_info): Update comments.
13141         (inferior_process_group): Delete.
13142         (terminal_is_ours): Delete.
13143         (gdb_tty_state): New.
13144         (child_terminal_init): Adjust.
13145         (is_gdb_terminal, sharing_input_terminal_1)
13146         (sharing_input_terminal): New functions.
13147         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13148         Set the process's actual process group in the foreground if
13149         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13150         mark terminal as the inferior's if not sharing GDB's terminal.
13151         Don't check attach_flag.
13152         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13153         pass down a target_terminal_state.
13154         (child_terminal_save_inferior): New, factored out from ...
13155         (child_terminal_ours_1): ... this.  Handle
13156         target_terminal_state::is_ours_for_output.
13157         (child_interrupt, child_pass_ctrlc): New.
13158         (inflow_inferior_exit): Clear the inferior's terminal_state.
13159         (copy_terminal_info): Copy the inferior's terminal state.
13160         (_initialize_inflow): Remove reference to terminal_is_ours.
13161         * inflow.h (inferior_process_group): Delete.
13162         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13163         * procfs.c (procfs_target): Don't install procfs_interrupt.
13164         (procfs_interrupt): Delete.
13165         * remote.c (remote_serial_quit_handler): Adjust.
13166         (remote_interrupt): Remove ptid parameter.  Adjust.
13167         * target-delegates.c: Regenerate.
13168         * target.c: Include "terminal.h".
13169         (target_terminal::terminal_state): Rename to ...
13170         (target_terminal::m_terminal_state): ... this.
13171         (target_terminal::init): Adjust.
13172         (target_terminal::inferior): Adjust to per-inferior
13173         terminal_state.
13174         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13175         (target_terminal::ours, target_terminal::ours_for_output): Use
13176         target_terminal_is_ours_kind.
13177         (target_interrupt): Remove ptid parameter.  Adjust.
13178         (default_target_pass_ctrlc): Adjust.
13179         * target.h (target_ops::to_terminal_save_inferior): New field.
13180         (target_ops::to_interrupt): Remove ptid_t parameter.
13181         (target_interrupt): Remove ptid_t parameter.  Update comment.
13182         (target_pass_ctrlc): Update comment.
13183         * target/target.h (target_terminal_state): New scoped enum,
13184         factored out of ...
13185         (target_terminal::terminal_state): ... here.
13186         (target_terminal::inferior): Update comments.
13187         (target_terminal::restore_inferior): New.
13188         (target_terminal::is_inferior, target_terminal::is_ours)
13189         (target_terminal::is_ours_for_output): Adjust.
13190         (target_terminal::scoped_restore_terminal_state): Adjust to
13191         rename, and call restore_inferior() instead of inferior().
13192         (target_terminal::scoped_restore_terminal_state::m_state): Change
13193         type.
13194         (target_terminal::terminal_state): Rename to ...
13195         (target_terminal::m_terminal_state): ... this and change type.
13196
13197 2018-01-30  Pedro Alves  <palves@redhat.com>
13198
13199         * linux-nat.c (wait_for_signal): New function.
13200         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13201         directly.
13202         (async_terminal_is_ours)
13203         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13204         (linux_nat_add_target): Don't override
13205         to_terminal_inferior/to_terminal_ours.
13206
13207 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13208
13209         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13210
13211 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13212
13213         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13214         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13215         dwarf2_per_objfile_free here.
13216         (dwarf2_per_objfile_free): Remove.
13217         (_initialize_dwarf2_read): Don't register
13218         dwarf2_per_objfile_free as a registry cleanup.
13219
13220 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13221
13222         Avoid compilation errors in MinGW native builds
13223
13224         The error is triggered by including python-internal.h, and the
13225         error message is:
13226
13227              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13228                       from build-gnulib/import/math.h:27,
13229                       from d:/usr/Python26/include/pyport.h:235,
13230                       from d:/usr/Python26/include/Python.h:58,
13231                       from python/python-internal.h:94,
13232                       from python/py-arch.c:24:
13233              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13234         using ::hypot;
13235                 ^~~~~
13236
13237         This happens because Python headers define 'hypot' to expand t
13238         '_hypot' in the Windows builds.
13239         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13240         'hypoth'.  This avoids a compilation error.
13241
13242 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13243
13244         * MAINTAINERS (Write After Approval): Fix ordering.
13245
13246 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13247
13248         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13249
13250 2018-01-26  Alan Modra  <amodra@gmail.com>
13251
13252         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13253         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13254         Remove nop.  Make const.  Comment.
13255         (powerpc32_plt_stub_so_2): New.
13256         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13257         Correct count.  Update uses.
13258         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13259         Move common code reading PLT entry word.  Correct
13260         powerpc32_plt_stub PLT address calculation.
13261         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13262         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13263         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13264         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13265         (ppc64_standard_linkage8): Likewise.
13266         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13267         Correct insns description.
13268         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13269
13270 2018-01-24  Pedro Alves  <palves@redhat.com>
13271
13272         GCC PR libstdc++/83906
13273         * gdbtypes.c (operator==(const dynamic_prop &,
13274         const dynamic_prop &)): New.
13275         (operator==(const range_bounds &, const range_bounds &)): New.
13276         (check_types_equal): Use them instead of memcmp.
13277         * gdbtypes.h (operator==(const dynamic_prop &,
13278         const dynamic_prop &)): Declare.
13279         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13280         (operator==(const range_bounds &, const range_bounds &)): Declare.
13281         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13282
13283 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13284
13285         * s390-linux-tdep.c (s390_record_address_mask)
13286         (s390_record_calc_disp_common, s390_record_calc_disp)
13287         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13288         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13289         (s390_process_record): Move to s390-tdep.c.
13290         (s390_linux_init_abi_any): Adjust.
13291         * s390-tdep.c (s390_record_address_mask)
13292         (s390_record_calc_disp_common, s390_record_calc_disp)
13293         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13294         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13295         (s390_process_record): Moved from s390-linux-tdep.c
13296         (s390_gdbarch_init): Adjust.
13297
13298 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13299
13300         * s390-linux-nat.c (s390-tdep.h): New include.
13301         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13302         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13303         (ALLDEPFILES): Add s390-tdep.c.
13304         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13305         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13306         * s390-tdep.h: ...this.  New file.
13307         * s390-linux-tdep.c (s390-tdep.h): New include.
13308         (_initialize_s390_tdep): Rename to...
13309         (_initialize_s390_linux_tdep): ...this and adjust.
13310         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13311         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13312         s390-tdep.h.
13313         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13314         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13315         (s390_is_partial_instruction, s390_software_single_step)
13316         (is_non_branch_ril, s390_displaced_step_copy_insn)
13317         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13318         (s390_prologue_data, s390_addr, s390_store, s390_load)
13319         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13320         (s390_register_call_saved, s390_guess_tracepoint_registers)
13321         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13322         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13323         (s390_pseudo_register_name, s390_pseudo_register_type)
13324         (s390_pseudo_register_read, s390_pseudo_register_write)
13325         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13326         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13327         (s390_addr_bits_remove, s390_address_class_type_flags)
13328         (s390_address_class_type_flags_to_name)
13329         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13330         (s390_function_arg_float, s390_function_arg_vector)
13331         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13332         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13333         (s390_frame_align, s390_register_return_value, s390_return_value)
13334         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13335         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13336         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13337         (s390_trad_frame_prev_register, s390_unwind_cache)
13338         (s390_prologue_frame_unwind_cache)
13339         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13340         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13341         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13342         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13343         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13344         (s390_frame_base_address, s390_local_base_address)
13345         (s390_frame_base, s390_gcc_target_options)
13346         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13347         (s390_validate_reg_range, s390_tdesc_valid)
13348         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13349         * s390-tdep.c: ...this.  New file.
13350
13351 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13352
13353         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13354         (s390_process_record, s390_gdbarch_tdep_alloc)
13355         (s390_linux_init_abi_any): Use/set new hook.
13356
13357 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13358
13359         * s390-linux-tdep.c (osabi.h): New include.
13360         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13361         (s390_linux_init_abi_any): New functions.
13362         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13363
13364 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13365
13366         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13367         tdesc_has_registers check
13368
13369 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13370
13371         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13372         (s390_validate_reg_range): New macro.
13373         (s390_gdbarch_init): Adjust.
13374
13375 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13376
13377         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13378         (s390_gdbarch_tdep_alloc): Adjust.
13379         (s390_gdbarch_init): Adjust.
13380
13381 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13382
13383         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13384         <have_tdb>: Change type to bool.
13385         (s390_gdbarch_tdep_alloc): Adjust.
13386         (s390_gdbarch_init): Adjust.
13387
13388 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13389
13390         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13391         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13392         (s390_gdbarch_tdep_alloc): New function.
13393         (s390_gdbarch_init): Allocate tdep at start and use its fields
13394         instead of separate variables.
13395
13396 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13397
13398         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13399         when looking for cached gdbarch and add comment for remaining.
13400
13401 2018-01-22  Pedro Alves  <palves@redhat.com>
13402             Sergio Durigan Junior  <sergiodj@redhat.com>
13403
13404         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13405         case.
13406
13407 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13408
13409         * MAINTAINERS: Update my company e-mail address.
13410
13411 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13412
13413         * regcache.c (cooked_write_test): New function.
13414         (_initialize_regcache): Register the test.
13415
13416 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13417
13418         * ia64-tdep.c (ia64_pseudo_register_read): Call
13419         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13420         * m32c-tdep.c (m32c_cat_read): Likewise.
13421         (m32c_r3r2r1r0_read): Likewise.
13422         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13423         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13424
13425 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13426
13427         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13428         method raw_read instead of regcache_raw_read.
13429         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13430         * arm-tdep.c (arm_neon_quad_read): Likewise.
13431         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13432         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13433         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13434         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13435         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13436         (i386_pseudo_register_read_into_value): Likewise.
13437         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13438         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13439         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13440         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13441         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13442         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13443         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13444         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13445         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13446
13447 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13448
13449         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13450         * configure.tgt: Remove target mt.
13451         * mt-tdep.c: Remove.
13452         * regcache.c (cooked_read_test): Remove the check for mt.
13453
13454 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13455
13456         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13457         instead of gdbarch_pseudo_register_read_value.
13458
13459 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13460
13461         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13462         language is Ada.
13463
13464 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13465
13466         * linespec.c (create_sals_line_offset): Remove code that preserved
13467         the symtab_and_line's line number.
13468
13469 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13470
13471         * varobj.c (varobj_create): Don't set valid_block when creating a
13472         floating varobj.
13473
13474 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13475
13476         * varobj.c (varobj_create): Remove out of date comment.
13477
13478 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13479
13480         PR mi/20395
13481         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13482         updating innermost block.
13483         * parse.c (innermost_block_tracker::update): Take extra type
13484         parameter, and check types match before updating innermost block.
13485         (write_dollar_variable): Update innermost block for registers.
13486         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13487         (innermost_block_tracker::innermost_block_tracker): Initialise
13488         m_types member.
13489         (innermost_block_tracker::reset): Take type parameter.
13490         (innermost_block_tracker::update): Take type parameter, and pass
13491         type through as needed.
13492         (innermost_block_tracker::m_types): New member.
13493         * varobj.c (varobj_create): Pass type when reseting innermost
13494         block.
13495
13496 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13497
13498         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13499         * ada-lang.c (resolve_subexp): Likewise.
13500         * breakpoint.c (set_breakpoint_condition) Likewise.
13501         (watch_command_1) Likewise.
13502         * c-exp.y (variable): Likewise.
13503         * d-exp.y (PrimaryExpression): Likewise.
13504         * f-exp.y (variable): Likewise.
13505         * go-exp.y (variable): Likewise.
13506         * m2-exp.y (variable): Likewise.
13507         * objfiles.c (objfile::~objfile): Likewise.
13508         * p-exp.y (variable): Likewise.
13509         * parse.c (innermost_block): Change type.
13510         * parser-defs.h (class innermost_block_tracker): New.
13511         (innermost_block): Change to innermost_block_tracker.
13512         * printcmd.c (display_command): Switch to innermost_block API.
13513         (do_one_display): Likewise.
13514         * rust-exp.y (do_one_display): Likewise.
13515         * symfile.c (clear_symtab_users): Likewise.
13516         * varobj.c (varobj_create): Switch to innermost_block API, replace
13517         use of innermost_block with block stored on varobj object.
13518
13519 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13520
13521         * expression.h (innermost_block): Remove declaration.
13522         * varobj.c: Add 'parser-defs.h' include.
13523
13524 2018-01-19  Tom Tromey  <tom@tromey.com>
13525
13526         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13527         symbols in the static and global blocks.
13528
13529 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13530
13531         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13532         gdb_ptrace.h, and move including gdb_wait.h ...
13533         * nat/linux-ptrace.h: ... to here.
13534
13535 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13536
13537         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13538         inf_ptrace_detach_success.
13539         (inf_ptrace_detach_success): Add inferior parameter, use it
13540         instead of inferior_ptid, pass it to detach_inferior.
13541         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13542         parameter.
13543         * inferior.c (detach_inferior): Add overload that takes an
13544         inferior object.
13545         * inferior.h (detach_inferior): Likewise.
13546         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13547         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13548         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13549
13550 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13551
13552         * target.h (struct target_ops) <to_detach>: Add inferior
13553         parameter.
13554         (target_detach): Likewise.
13555         * target.c (dispose_inferior): Pass inferior down.
13556         (target_detach): Pass inferior down.  Assert that it is equal to
13557         the current inferior.
13558         * aix-thread.c (aix_thread_detach): Pass inferior down.
13559         * corefile.c (core_file_command): Pass current_inferior() down.
13560         * corelow.c (core_detach): Add inferior parameter.
13561         * darwin-nat.c (darwin_detach): Likewise.
13562         * gnu-nat.c (gnu_detach): Likewise.
13563         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13564         * infcmd.c (detach_command): Pass current_inferior() down to
13565         target_detach.
13566         * infrun.c (follow_fork_inferior): Pass parent_inf to
13567         target_detach.
13568         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13569         target_detach.
13570         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13571         * linux-thread-db.c (thread_db_detach): Likewise.
13572         * nto-procfs.c (procfs_detach): Likewise.
13573         * procfs.c (procfs_detach): Likewise.
13574         * record.c (record_detach): Likewise.
13575         * record.h (struct inferior): Forward-declare.
13576         (record_detach): Add inferior parameter.
13577         * remote-sim.c (gdbsim_detach): Likewise.
13578         * remote.c (remote_detach_1): Likewise.
13579         (remote_detach): Likewise.
13580         (extended_remote_detach): Likewise.
13581         * sol-thread.c (sol_thread_detach): Likewise.
13582         * target-debug.h (target_debug_print_inferior_p): New macro.
13583         * target-delegates.c: Re-generate.
13584         * top.c (kill_or_detach): Pass inferior down to target_detach.
13585         * windows-nat.c (windows_detach): Add inferior parameter.
13586
13587 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13588
13589         * target.h (struct target_ops) <to_detach>: Remove args
13590         parameter.
13591         (target_detach): Likewise.
13592         * target.c (dispose_inferior): Adjust.
13593         (target_detach): Remove args parameter, adjust.
13594         * aix-thread.c (aix_thread_detach): Adjust.
13595         * corefile.c (core_file_command): Adjust.
13596         * corelow.c (core_detach): Adjust.
13597         * darwin-nat.c (darwin_detach): Adjust.
13598         * gnu-nat.c (gnu_detach): Adjust.
13599         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13600         * infcmd.c (detach_command): Adjust
13601         * infrun.c (follow_fork_inferior): Adjust.
13602         (handle_vfork_child_exec_or_exit): Adjust.
13603         * linux-fork.c (linux_fork_detach): Remove args parameter.
13604         * linux-fork.h (linux_fork_detach): Likewise.
13605         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13606         * linux-thread-db.c (thread_db_detach): Likewise.
13607         * nto-procfs.c (procfs_detach): Likewise.
13608         * procfs.c (procfs_detach): Likewise.
13609         (do_detach): Remove signo parameter.
13610         * record.c (record_detach): Remove args parameter.
13611         * record.h (record_detach): Likewise.
13612         * remote-sim.c (gdbsim_detach): Likewise.
13613         * remote.c (remote_detach_1): Likewise.
13614         (remote_detach): Likewise.
13615         (extended_remote_detach): Likewise.
13616         * sol-thread.c (sol_thread_detach): Likewise.
13617         * target-delegates.c: Re-generate.
13618         * top.c (struct qt_args) <args>: Remove field.
13619         (kill_or_detach): Don't pass args.
13620         (quit_force): Don't set args.
13621         * windows-nat.c (windows_detach): Remove args parameter.
13622
13623 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13624
13625         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13626         (arm_linux_init_abi): Install it.
13627
13628 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13629
13630         * osabi.c (gdb_osabi_names): Extend the regexp for
13631         arm-linux-gnueabihf.
13632
13633 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13634
13635         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13636         m_abbrevs.
13637         (abbrev_table::add_abbrev): Update.
13638         (abbrev_table::lookup_abbrev): Update.
13639
13640 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13641
13642         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13643
13644 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13645
13646         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13647         to "std::string".
13648
13649 2018-01-17  Tom Tromey  <tom@tromey.com>
13650
13651         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13652
13653 2018-01-17  Tom Tromey  <tom@tromey.com>
13654
13655         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13656         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13657         (create_array_type_with_stride): Update.
13658         * dwarf2read.c (set_die_type): Update.
13659
13660 2018-01-17  Tom Tromey  <tom@tromey.com>
13661
13662         * dwarf2read.c (delayed_method_info): Remove typedef.
13663         (dwarf2_cu::method_info): Now a std::vector.
13664         (add_to_method_list): Update.
13665         (free_delayed_list): Remove.
13666         (compute_delayed_physnames): Update.
13667         (process_full_comp_unit, process_full_type_unit): Clear the method
13668         list.  Remove cleanups.
13669         (psymtab_include_file_name): Add name_holder parameter.  Use
13670         unique_xmalloc_ptr.
13671         (dwarf_decode_lines): Update.
13672
13673 2018-01-17  Tom Tromey  <tom@tromey.com>
13674             Simon Marchi  <simon.marchi@ericsson.com>
13675
13676         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13677         (dwarf2_per_objfile::free_cached_comp_units)
13678         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13679         (init_cutu_and_read_dies_no_follow): Update.
13680         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13681         (dwarf2_cu::~dwarf2_cu): New.
13682         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13683         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13684
13685 2018-01-17  Tom Tromey  <tom@tromey.com>
13686             Simon Marchi  <simon.marchi@ericsson.com>
13687
13688         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13689         (struct die_reader_specs) <abbrev_table>: New member.
13690         (struct abbrev_table): Add constructor.
13691         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13692         <abbrev_obstack>: Now an auto_obstack.
13693         (abbrev_table_up): New typedef.
13694         (init_cu_die_reader): Add abbrev_table parameter.
13695         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13696         Add result_dwo_abbrev_table.
13697         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13698         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13699         Update.
13700         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13701         parameter.
13702         (skip_children): Update.
13703         (abbrev_table::alloc_abbrev): Rename from
13704         abbrev_table_alloc_abbrev.
13705         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13706         (abbrev_table::lookup_abbrev): Rename from
13707         abbrev_table_lookup_abbrev.
13708         (abbrev_table_read_table): Return abbrev_table_up.
13709         (abbrev_table_free, abbrev_table_free_cleanup)
13710         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13711         (load_partial_dies): Update.
13712
13713 2018-01-17  Tom Tromey  <tom@tromey.com>
13714
13715         * dwarf2read.c (dwarf2_compute_name): Update comment.
13716         (read_func_scope, read_variable): Update.
13717         (new_symbol): Remove.
13718         (new_symbol_full): Rename to new_symbol.
13719
13720 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13721
13722         PR gdb/16577
13723         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13724         a warning instead of throwing an error, set section size to 0 and return
13725         NULL.
13726         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13727
13728 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13729
13730         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13731         std::string.
13732         (linux_ptrace_attach_fail_reason_string): Likewise.
13733         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13734         Likewise.
13735         (linux_ptrace_attach_fail_reason_string): Likewise.
13736         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13737
13738 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13739
13740         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13741
13742 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13743
13744         PR gdb/21559
13745         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13746         checking for fs_base/gs_base fields in struct user_regs_struct.
13747         * configure: Regenerate.
13748
13749 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13750
13751         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13752         function.
13753         (aarch64_linux_init_abi): Install it to gdbarch hook
13754         gcc_target_options.
13755
13756 2018-01-15  Pedro Alves  <palves@redhat.com>
13757
13758         * common/signals-state-save-restore.c
13759         (save_original_signals_state): Fix typos.
13760
13761 2017-01-12  Tom Tromey  <tom@tromey.com>
13762             Sergio Durigan Junior  <sergiodj@redhat.com>
13763
13764         * Makefile.in (install-only): Install gdb-add-index.
13765
13766 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13767
13768         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13769
13770 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13771
13772         * infrun.c (keep_going_pass_signal): Clear step-over info when
13773         insert_breakpoints fails.
13774
13775 2018-01-11  Pedro Alves  <palves@redhat.com>
13776
13777         PR gdb/22583
13778         * infrun.c (resume): Rename to ...
13779         (resume_1): ... this.
13780         (resume): Reimplement as wrapper around resume_1.
13781
13782 2018-01-11  Pedro Alves  <palves@redhat.com>
13783
13784         PR remote/22597
13785         * remote.c (remote_parse_stop_reply): Default to the last-set
13786         general thread instead of to 'magic_null_ptid'.
13787
13788 2018-01-10  Pedro Alves  <palves@redhat.com>
13789
13790         * language.h (language_get_symbol_name_matcher): Rename ...
13791         (get_symbol_name_matcher): ... this.
13792         * language.c (language_get_symbol_name_matcher): Ditto.
13793         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13794         callers adjusted.
13795
13796 2018-01-10  Pedro Alves  <palves@redhat.com>
13797
13798         PR gdb/22670
13799         * dwarf2read.c
13800         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13801         Adjust to use language_get_symbol_name_matcher instead of
13802         language_defn::la_get_symbol_name_matcher.
13803         * language.c (language_get_symbol_name_matcher): If in Ada mode
13804         and the lookup name is a verbatim match, return Ada's matcher.
13805         * language.h (language_get_symbol_name_matcher): Adjust comment.
13806         (ada_lookup_name_info::verbatim_p):: New method.
13807
13808 2018-01-10  Pedro Alves  <palves@redhat.com>
13809
13810         PR gdb/22670
13811         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13812         minsym's language is language_auto or language_cplus, pass down
13813         language_ada instead.
13814         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13815
13816 2018-01-10  Pedro Alves  <palves@redhat.com>
13817
13818         PR gdb/22670
13819         * minsyms.c (linkage_name_str): New function.
13820         (iterate_over_minimal_symbols): Use it.
13821
13822 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13823
13824         * NEWS: Document that 'info proc' now works on FreeBSD.
13825
13826 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13827
13828         * configure.ac: Check for kinfo_getfile in libutil.
13829         * configure: Regenerate.
13830         * config.in: Regenerate.
13831         * fbsd-nat.c: Include "fbsd-tdep.h".
13832         (fbsd_fetch_cmdline): New.
13833         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13834         rather than calling error.
13835         (fbsd_info_proc): New.
13836         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13837         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13838         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13839
13840 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13841
13842         * fbsd-nat.c (struct free_deleter): Remove.
13843         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13844
13845 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13846
13847         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13848         NULL for an empty pathname.
13849
13850 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13851
13852         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13853         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13854         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13855         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13856         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13857         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13858         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13859         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13860         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13861         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13862         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13863         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13864         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13865         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13866         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13867
13868 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13869
13870         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13871         (gnu_xfer_auxv): New function.
13872         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13873         TARGET_OBJECT_AUXV.
13874
13875 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13876             Simon Marchi  <simon.marchi@ericsson.com>
13877
13878         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13879         common/selftest.c.
13880         (COMMON_OBS): Remove selftest.o.
13881         * configure.ac: Append selftest-arch.c and common/selftest.c to
13882         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13883         * configure: Re-generated.
13884         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13885         GDB_SELF_TEST.
13886         (maintenance_info_selftests): Likewise.
13887
13888 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13889
13890         * ada-valprint.c (val_print_packed_array_elements): Use
13891         proper number of elements when printing an array indexed
13892         by an enumeration type.
13893
13894 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13895
13896         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13897         (dw2_get_file_names_reader): Adjust.
13898         (lookup_dwo_signatured_type): Adjust.
13899         (lookup_dwp_signatured_type): Adjust.
13900         (lookup_signatured_type): Adjust.
13901         (create_type_unit_group): Adjust.
13902         (get_type_unit_group): Adjust.
13903         (process_psymtab_comp_unit_reader): Adjust.
13904         (build_type_psymtabs_reader): Adjust.
13905         (scan_partial_symbols): Adjust.
13906         (add_partial_symbol): Adjust.
13907         (add_partial_subprogram): Adjust.
13908         (peek_die_abbrev): Adjust.
13909         (fixup_go_packaging): Adjust.
13910         (process_imported_unit_die): Adjust.
13911         (dwarf2_compute_name): Adjust.
13912         (dwarf2_physname): Adjust.
13913         (read_import_statement): Adjust.
13914         (handle_DW_AT_stmt_list): Adjust.
13915         (read_file_scope): Adjust.
13916         (read_func_scope): Adjust.
13917         (read_lexical_block_scope): Adjust.
13918         (read_call_site_scope): Adjust.
13919         (read_variable): Adjust.
13920         (dwarf2_rnglists_process): Adjust.
13921         (dwarf2_ranges_process): Adjust.
13922         (dwarf2_ranges_read): Adjust.
13923         (dwarf2_get_pc_bounds): Adjust.
13924         (dwarf2_record_block_ranges): Adjust.
13925         (dwarf2_add_field): Adjust.
13926         (dwarf2_add_member_fn): Adjust.
13927         (read_structure_type): Adjust.
13928         (process_structure_scope): Adjust.
13929         (read_enumeration_type): Adjust.
13930         (read_array_type): Adjust.
13931         (mark_common_block_symbol_computed): Adjust.
13932         (read_common_block): Adjust.
13933         (read_namespace_type): Adjust.
13934         (read_namespace): Adjust.
13935         (read_module_type): Adjust.
13936         (read_tag_pointer_type): Adjust.
13937         (read_tag_ptr_to_member_type): Adjust.
13938         (read_tag_string_type): Adjust.
13939         (read_subroutine_type): Adjust.
13940         (read_typedef): Adjust.
13941         (read_base_type): Adjust.
13942         (attr_to_dynamic_prop): Adjust.
13943         (read_subrange_type): Adjust.
13944         (read_unspecified_type): Adjust.
13945         (dwarf2_read_abbrevs): Adjust.
13946         (load_partial_dies): Adjust.
13947         (read_partial_die): Adjust.
13948         (find_partial_die): Adjust.
13949         (guess_partial_die_structure_name): Adjust.
13950         (fixup_partial_die): Adjust.
13951         (read_attribute_value): Adjust.
13952         (read_addr_index): Adjust.
13953         (read_addr_index_from_leb128): Adjust.
13954         (read_str_index): Adjust.
13955         (dwarf2_string_attr): Adjust.
13956         (get_debug_line_section): Adjust.
13957         (dwarf_decode_line_header): Adjust.
13958         (lnp_state_machine::check_line_address): Adjust.
13959         (dwarf_decode_lines_1): Adjust.
13960         (dwarf_decode_lines): Adjust.
13961         (dwarf2_start_symtab): Adjust.
13962         (var_decode_location): Adjust.
13963         (new_symbol_full): Adjust.
13964         (dwarf2_const_value_data): Adjust.
13965         (dwarf2_const_value_attr): Adjust.
13966         (dwarf2_const_value): Adjust.
13967         (die_type): Adjust.
13968         (die_containing_type): Adjust.
13969         (build_error_marker_type): Adjust.
13970         (lookup_die_type): Adjust.
13971         (guess_full_die_structure_name): Adjust.
13972         (anonymous_struct_prefix): Adjust.
13973         (determine_prefix): Adjust.
13974         (dwarf2_name): Adjust.
13975         (follow_die_ref_or_sig): Adjust.
13976         (follow_die_offset): Adjust.
13977         (follow_die_ref): Adjust.
13978         (follow_die_sig_1): Adjust.
13979         (follow_die_sig): Adjust.
13980         (get_signatured_type): Adjust.
13981         (get_DW_AT_signature_type): Adjust.
13982         (decode_locdesc): Adjust.
13983         (dwarf_decode_macros): Adjust.
13984         (cu_debug_loc_section): Adjust.
13985         (fill_in_loclist_baton): Adjust.
13986         (dwarf2_symbol_mark_computed): Adjust.
13987         (init_one_comp_unit): Don't assign
13988         dwarf2_cu::dwarf2_per_objfile.
13989         (set_die_type): Adjust.
13990
13991 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13992
13993         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13994         <dwarf2_per_objfile>: New field.
13995         (dwarf2_per_objfile): Remove global.
13996         (get_dwarf2_per_objfile): New function.
13997         (set_dwarf2_per_objfile): New function.
13998         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13999         dwarf2_per_objfile.
14000         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14001         (read_abbrev_offset): Likewise.
14002         (read_indirect_string): Likewise.
14003         (read_indirect_line_string): Likewise.
14004         (read_indirect_string_at_offset): Likewise.
14005         (read_indirect_string_from_dwz): Likewise.
14006         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14007         dwarf2_per_objfile.
14008         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14009         (create_all_comp_units): Change objfile parameter to
14010         dwarf2_per_objfile.
14011         (create_all_type_units): Likewise.
14012         (process_queue): Add dwarf2_per_objfile parameter.
14013         (read_and_check_comp_unit_head): Likewise.
14014         (lookup_dwo_unit_in_dwp): Likewise.
14015         (get_dwp_file): Likewise.
14016         (process_cu_includes): Likewise.
14017         (struct free_dwo_file_cleanup_data): New struct.
14018         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14019         set_dwarf2_per_objfile.
14020         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14021         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14022         context, adjust calls.
14023         (dw2_instantiate_symtab): Likewise.
14024         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14025         (dw2_get_cu): Likewise.
14026         (create_cu_from_index_list): Change objfile parameter to
14027         dwarf2_per_objfile.
14028         (create_cus_from_index_list): Get dwarf2_per_objfile from
14029         context, adjust calls.
14030         (create_cus_from_index): Likewise.
14031         (create_signatured_type_table_from_index): Change objfile
14032         parameter to dwarf2_per_objfile.
14033         (create_signatured_type_table_from_debug_names): Change objfile
14034         parameter to dwarf2_per_objfile.
14035         (create_addrmap_from_index): Likewise.
14036         (create_addrmap_from_aranges): Likewise.
14037         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14038         (dw2_setup): Remove.
14039         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14040         context.
14041         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14042         get_dwarf2_per_objfile.
14043         (dw2_forget_cached_source_info): Likewise.
14044         (dw2_map_symtabs_matching_filename): Likewise.
14045         (struct dw2_symtab_iterator) <index>: Remove.
14046         <dwarf2_per_objfile>: New field.
14047         (dw2_symtab_iter_init): Replace index parameter with
14048         dwarf2_per_objfile.
14049         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14050         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14051         (dw2_print_stats): Likewise.
14052         (dw2_dump): Likewise.
14053         (dw2_expand_symtabs_for_function): Likewise.
14054         (dw2_expand_all_symtabs): Likewise.
14055         (dw2_expand_symtabs_with_fullname): Likewise.
14056         (dw2_expand_marked_cus): Replace index and objfile parameters
14057         with dwarf2_per_objfile.
14058         (dw_expand_symtabs_matching_file_matcher): Add
14059         dwarf2_per_objfile parameter and adjust calls.
14060         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14061         adjust calls.
14062         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14063         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14064         adjust calls.
14065         (create_cus_from_debug_names_list): Replace objfile parameter
14066         with dwarf2_per_objfile and adjust calls.
14067         (create_cus_from_debug_names): Likewise.
14068         (dwarf2_read_debug_names): Likewise.
14069         (mapped_debug_names::namei_to_name): Adjust call.
14070         (dw2_debug_names_iterator::next): Likewise.
14071         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14072         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14073         (dw2_debug_names_dump): Likewise.
14074         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14075         (dw2_debug_names_expand_symtabs_matching): Likewise.
14076         (dwarf2_initialize_objfile): Likewise.
14077         (dwarf2_build_psymtabs): Likewise.
14078         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14079         this_cu.
14080         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14081         (read_and_check_comp_unit_head): Likewise.
14082         (read_abbrev_offset): Likewise.
14083         (create_debug_type_hash_table): Likewise.
14084         (create_debug_types_hash_table): Likewise.
14085         (create_all_type_units): Replace objfile parameter with
14086         dwarf2_per_objfile.
14087         (add_type_unit): Add dwarf2_per_objfile parameter.
14088         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14089         with dwarf2_per_objfile.
14090         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14091         (lookup_dwp_signatured_type): Likewise.
14092         (lookup_signatured_type): Likewise.
14093         (read_cutu_die_from_dwo): Likewise.
14094         (init_tu_and_read_dwo_dies): Likewise.
14095         (init_cutu_and_read_dies): Likewise.
14096         (init_cutu_and_read_dies_no_follow): Likewise.
14097         (allocate_type_unit_groups_table): Add objfile parameter.
14098         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14099         (get_type_unit_group): Likewise.
14100         (process_psymtab_comp_unit): Update call.
14101         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14102         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14103         (print_tu_stats): Likewise.
14104         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14105         in void* parameter.
14106         (build_type_psymtabs): Change objfile parameter to
14107         dwarf2_per_objfile.
14108         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14109         passed in void* parameter.
14110         (process_skeletonless_type_units): Change objfile parameter to
14111         dwarf2_per_objfile.
14112         (set_partial_user): Likewise.
14113         (dwarf2_build_psymtabs_hard): Likewise.
14114         (read_comp_units_from_section): Likewise.
14115         (create_all_comp_units): Likewise.
14116         (scan_partial_symbols): Update calls.
14117         (add_partial_symbol): Likewise.
14118         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14119         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14120         (process_queue): Add dwarf2_per_objfile parameter.
14121         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14122         (compute_compunit_symtab_includes): Likewise.
14123         (process_cu_includes): Add dwarf2_per_objfile parameter.
14124         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14125         (process_full_type_unit): Likewise.
14126         (process_imported_unit_die): Update call.
14127         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14128         (read_file_scope): Likewise.
14129         (allocate_dwo_file_hash_table): Add objfile parameter.
14130         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14131         (create_cus_hash_table): Likewise.
14132         (create_dwp_hash_table): Likewise.
14133         (create_dwo_unit_in_dwp_v1): Likewise.
14134         (create_dwp_v2_section): Likewise.
14135         (create_dwo_unit_in_dwp_v2): Likewise.
14136         (lookup_dwo_unit_in_dwp): Likewise.
14137         (try_open_dwop_file): Likewise.
14138         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14139         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14140         cleanup to include a reference to dwarf2_per_objfile.
14141         (open_dwp_file): Add dwarf2_per_objfile parameter.
14142         (open_and_init_dwp_file): Likewise.
14143         (get_dwp_file): Likewise.
14144         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14145         (queue_and_load_all_dwo_tus): Update call.
14146         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14147         data.
14148         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14149         (dwarf2_ranges_process): Likewise.
14150         (dwarf2_get_pc_bounds): Likewise.
14151         (mark_common_block_symbol_computed): Likewise.
14152         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14153         (dwarf2_read_abbrevs): Update call.
14154         (read_partial_die): Use dwarf2_per_objfile from cu.
14155         (find_partial_die): Likewise.
14156         (fixup_partial_die): Likewise.
14157         (read_attribute_value): Likewise.
14158         (read_indirect_string_at_offset_from): Add objfile parameter.
14159         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14160         parameter.
14161         (read_indirect_string_from_dwz): Add objfile parameter.
14162         (read_indirect_string): Add objfile parameter.
14163         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14164         (read_addr_index): Use dwarf2_per_objfile from cu.
14165         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14166         call dw2_setup.
14167         (read_str_index): Use dwarf2_per_objfile from cu.
14168         (get_debug_line_section): Likewise.
14169         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14170         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14171         (new_symbol_full): Use dwarf2_per_objfile from cu.
14172         (build_error_marker_type): Likewise.
14173         (lookup_die_type): Likewise.
14174         (determine_prefix): Likewise.
14175         (follow_die_offset): Likewise.
14176         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14177         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14178         (dwarf2_fetch_die_type_sect_off): Likewise.
14179         (dwarf2_get_die_type): Likewise.
14180         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14181         (get_signatured_type): Likewise.
14182         (get_DW_AT_signature_type): Likewise.
14183         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14184         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14185         (cu_debug_loc_section): Likewise.
14186         (fill_in_loclist_baton): Likewise.
14187         (dwarf2_symbol_mark_computed): Likewise.
14188         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14189         dwarf2_per_objfile.
14190         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14191         parameter.
14192         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14193         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14194         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14195         (set_die_type): Use dwarf2_free_objfile from cu.
14196         (get_die_type_at_offset): Likewise.
14197         (dwarf2_per_objfile_free): Don't assign global variable.
14198         (debug_names) <constructor>: Add dwarf2_per_objfile
14199         parameter, update m_debugstrlookup construction.
14200         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14201         parameter.
14202         <m_dwarf2_per_objfile>: New field.
14203         <lookup>: Use m_dwarf2_per_objfile.
14204         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14205         (psyms_seen_size): Likewise.
14206         (write_gdbindex): Replace objfile parameter with
14207         dwarf2_per_objfile.
14208         (write_debug_names): Likewise.
14209         (write_psymtabs_to_index): Likewise.
14210         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14211         calls.
14212
14213 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14214
14215         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14216         <dwarf2_per_objfile>: New field.
14217         (struct dwarf2_per_cu_data) <objfile>: Remove.
14218         <dwarf2_per_objfile>: New field.
14219         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14220         of objfile.
14221         (create_signatured_type_table_from_index): Likewise.
14222         (create_debug_type_hash_table): Likewise.
14223         (fill_in_sig_entry_from_dwo_entry): Likewise.
14224         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14225         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14226         objfile.
14227         (create_partial_symtab): Access objfile through
14228         dwarf2_per_objfile.
14229         (process_psymtab_comp_unit_reader): Likewise.
14230         (read_comp_units_from_section): Likewise.
14231         (scan_partial_symbols): Likewise.
14232         (add_partial_symbol): Likewise.
14233         (add_partial_subprogram): Likewise.
14234         (peek_die_abbrev): Likewise.
14235         (fixup_go_packaging): Likewise.
14236         (process_full_comp_unit): Likewise.
14237         (process_full_type_unit): Likewise.
14238         (process_imported_unit_die): Likewise.
14239         (dwarf2_compute_name): Likewise.
14240         (dwarf2_physname): Likewise.
14241         (read_import_statement): Likewise.
14242         (create_cus_hash_table): Assign dwarf2_physname instead of
14243         objfile.
14244         (read_func_scope): Access objfile through dwarf2_per_objfile.
14245         (read_lexical_block_scope): Likewise.
14246         (read_call_site_scope): Likewise.
14247         (read_variable): Likewise.
14248         (dwarf2_rnglists_process): Likewise.
14249         (dwarf2_ranges_process): Likewise.
14250         (dwarf2_ranges_read): Likewise.
14251         (dwarf2_record_block_ranges): Likewise.
14252         (dwarf2_add_field): Likewise.
14253         (dwarf2_add_member_fn): Likewise.
14254         (read_structure_type): Likewise.
14255         (process_structure_scope): Likewise.
14256         (read_enumeration_type): Likewise.
14257         (read_array_type): Likewise.
14258         (read_common_block): Likewise.
14259         (read_namespace_type): Likewise.
14260         (read_namespace): Likewise.
14261         (read_module_type): Likewise.
14262         (read_tag_pointer_type): Likewise.
14263         (read_tag_ptr_to_member_type): Likewise.
14264         (read_tag_string_type): Likewise.
14265         (read_subroutine_type): Likewise.
14266         (read_typedef): Likewise.
14267         (read_base_type): Likewise.
14268         (attr_to_dynamic_prop): Likewise.
14269         (read_subrange_type): Likewise.
14270         (read_unspecified_type): Likewise.
14271         (load_partial_dies): Likewise.
14272         (read_partial_die): Likewise.
14273         (find_partial_die): Likewise.
14274         (guess_partial_die_structure_name): Likewise.
14275         (fixup_partial_die): Likewise.
14276         (read_attribute_value): Likewise.
14277         (read_addr_index_from_leb128): Likewise.
14278         (dwarf2_read_addr_index): Likewise.
14279         (dwarf2_string_attr): Likewise.
14280         (lnp_state_machine::check_line_address): Likewise.
14281         (dwarf_decode_lines_1): Likewise.
14282         (dwarf_decode_lines): Likewise.
14283         (dwarf2_start_symtab): Likewise.
14284         (var_decode_location): Likewise.
14285         (new_symbol_full): Likewise.
14286         (dwarf2_const_value_data): Likewise.
14287         (dwarf2_const_value_attr): Likewise.
14288         (dwarf2_const_value): Likewise.
14289         (die_type): Likewise.
14290         (die_containing_type): Likewise.
14291         (lookup_die_type): Likewise.
14292         (guess_full_die_structure_name): Likewise.
14293         (anonymous_struct_prefix): Likewise.
14294         (dwarf2_name): Likewise.
14295         (follow_die_ref_or_sig): Likewise.
14296         (follow_die_offset): Likewise.
14297         (follow_die_ref): Likewise.
14298         (dwarf2_fetch_die_loc_sect_off): Likewise.
14299         (dwarf2_fetch_constant_bytes): Likewise.
14300         (dwarf2_fetch_die_type_sect_off): Likewise.
14301         (dwarf2_get_die_type): Likewise.
14302         (follow_die_sig): Likewise.
14303         (decode_locdesc): Likewise.
14304         (dwarf2_per_cu_objfile): Likewise.
14305         (dwarf2_per_cu_text_offset): Likewise.
14306         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14307         objfile.
14308         (set_die_type): Access objfile through
14309         dwarf2_per_objfile.
14310
14311 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14312
14313         * valprint.c (converted_character_d): Remove typedef.
14314         (DEF_VEC_O (converted_character_d)): Remove.
14315         (count_next_character): Use std::vector.
14316         (print_converted_chars_to_obstack): Likewise.
14317         (generic_printstr): Likewise.
14318
14319 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14320
14321         * xml-support.h (struct gdb_xml_value): Add constructor.
14322         <value>: Change type to unique_xmalloc_ptr.
14323         (gdb_xml_value_s): Remove typedef.
14324         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14325         (gdb_xml_element_start_handler): Change parameter type to
14326         std::vector.
14327         (xml_find_attribute): Likewise.
14328         * xml-support.c (xml_find_attribute): Change parameter type to
14329         std::vector and adjust.
14330         (gdb_xml_values_cleanup): Remove.
14331         (gdb_xml_parser::start_element): Adjust to std::vector.
14332         (xinclude_start_include): Change paraeter type to std::vector
14333         and adjust.
14334         * btrace.c (check_xml_btrace_version): Likewise.
14335         (parse_xml_btrace_block): Likewise.
14336         (parse_xml_btrace_pt_config_cpu): Likewise.
14337         (parse_xml_btrace_pt): Likewise.
14338         (parse_xml_btrace_conf_bts): Likewise.
14339         (parse_xml_btrace_conf_pt): Likewise.
14340         * memory-map.c (memory_map_start_memory): Likewise.
14341         (memory_map_start_property): Likewise.
14342         * osdata.c (osdata_start_osdata): Likewise.
14343         (osdata_start_item): Likewise.
14344         (osdata_start_column): Likewise.
14345         * remote.c (start_thread): Likewise.
14346         * solib-aix.c (library_list_start_library): Likewise.
14347         (library_list_start_list): Likewise.
14348         * solib-svr4.c (library_list_start_library): Likewise.
14349         (svr4_library_list_start_list): Likewise.
14350         * solib-target.c (library_list_start_segment): Likewise.
14351         (library_list_start_section): Likewise.
14352         (library_list_start_library): Likewise.
14353         (library_list_start_list): Likewise.
14354         * tracepoint.c (traceframe_info_start_memory): Likewise.
14355         (traceframe_info_start_tvar): Likewise.
14356         * xml-syscall.c (syscall_start_syscall): Likewise.
14357         * xml-tdesc.c (tdesc_start_target): Likewise.
14358         (tdesc_start_feature): Likewise.
14359         (tdesc_start_reg): Likewise.
14360         (tdesc_start_union): Likewise.
14361         (tdesc_start_struct): Likewise.
14362         (tdesc_start_flags): Likewise.
14363         (tdesc_start_enum): Likewise.
14364         (tdesc_start_field): Likewise.
14365         (tdesc_start_enum_value): Likewise.
14366         (tdesc_start_vector): Likewise.
14367
14368 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14369
14370         * extension.h (struct xmethod_worker) <clone>: Remove.
14371         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14372         Remove.
14373         (python_xmethod_worker::clone): Remove.
14374         * valops.c (find_overload_match): Use std::move instead of
14375         clone.
14376
14377 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14378
14379         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14380         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14381         <free_xmethod_worker_data>: Remove.
14382         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14383         <get_xmethod_arg_types>: Remove.
14384         <get_xmethod_result_type>: Remove.
14385         <invoke_xmethod>: Remove.
14386         * extension.c (new_xmethod_worker): Remove.
14387         (clone_xmethod_worker): Remove.
14388         (get_matching_xmethod_workers): Return void, pass std::vector by
14389         pointer.
14390         (get_xmethod_arg_types): Rename to...
14391         (xmethod_worker::get_arg_types): ... this, and adjust.
14392         (get_xmethod_result_type): Rename to...
14393         (xmethod_worker::get_result_type): ... this, and adjust.
14394         (invoke_xmethod): Remove.
14395         (free_xmethod_worker): Remove.
14396         (free_xmethod_worker_vec): Remove.
14397         * extension.h (enum ext_lang_rc): Move here from
14398         extension-priv.h.
14399         (struct xmethod_worker): Add constructor and destructor.
14400         <data>: Remove.
14401         <value>: Remove.
14402         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14403         virtual pure methods.
14404         <get_arg_types, get_result_type>: New methods.
14405         (xmethod_worker_ptr): Remove typedef.
14406         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14407         (xmethod_worker_vec): Remove typedef.
14408         (xmethod_worker_up): New typedef.
14409         (invoke_xmethod): Remove.
14410         (clone_xmethod_worker): Remove.
14411         (free_xmethod_worker): Remove.
14412         (free_xmethod_worker_vec): Remove.
14413         (get_xmethod_arg_types): Remove.
14414         (get_xmethod_result_type): Remove.
14415         * valops.c (find_method_list): Use std::vector, don't use
14416         intermediate vector.
14417         (value_find_oload_method_list): Use std::vector.
14418         (find_overload_match): Use std::vector.
14419         (find_oload_champ): Use std::vector.
14420         * value.c (value_free): Use operator delete.
14421         (value_of_xmethod): Rename to...
14422         (value_from_xmethod): ... this.  Don't assign
14423         xmethod_worker::value, take rvalue-reference.
14424         (result_type_of_xmethod): Adjust.
14425         (call_xmethod): Adjust.
14426         * value.h: Include extension.h.
14427         (struct xmethod_worker): Don't forward-declare.
14428         (value_of_xmethod): Rename to...
14429         (value_from_xmethod): ... this, take rvalue-reference.
14430         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14431         (struct python_xmethod_worker): ... this, add constructor and
14432         destructor.
14433         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14434         (gdbpy_free_xmethod_worker_data): Rename to...
14435         (python_xmethod_worker::~python_xmethod_worker): ... this and
14436         adjust.
14437         (gdbpy_clone_xmethod_worker_data): Rename to...
14438         (python_xmethod_worker::clone): ... this and adjust.
14439         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14440         temporary vector.
14441         (gdbpy_get_xmethod_arg_types): Rename to...
14442         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14443         (gdbpy_get_xmethod_result_type): Rename to...
14444         (python_xmethod_worker::do_get_result_type): ... this and
14445         adjust.
14446         (gdbpy_invoke_xmethod): Rename to...
14447         (python_xmethod_worker::invoke): ... this and adjust.
14448         (new_python_xmethod_worker): Rename to...
14449         (python_xmethod_worker::python_xmethod_worker): ... this and
14450         adjust.
14451         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14452         Remove.
14453         (gdbpy_free_xmethod_worker_data): Remove.
14454         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14455         (gdbpy_get_xmethod_arg_types): Remove.
14456         (gdbpy_get_xmethod_result_type): Remove.
14457         (gdbpy_invoke_xmethod): Remove.
14458         * python/python.c (python_extension_ops): Remove obsolete
14459         callbacks.
14460
14461 2018-01-05  Pedro Alves  <palves@redhat.com>
14462
14463         PR gdb/18653
14464         * common/signals-state-save-restore.c
14465         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14466         find a custom handler preinstalled, instead of internal erroring.
14467         But only warn if !quiet.
14468         * common/signals-state-save-restore.h
14469         (save_original_signals_state): New parameter 'quiet'.
14470         * main.c (captured_main_1): Move save_original_signals_state call
14471         after option handling, and pass QUIET.
14472
14473 2018-01-05  Pedro Alves  <palves@redhat.com>
14474
14475         * spu-tdep.c (spu_catch_start): Pass
14476         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14477
14478 2018-01-05  Pedro Alves  <palves@redhat.com>
14479
14480         PR gdb/22670
14481         * ada-lang.c (literal_symbol_name_matcher): New function.
14482         (ada_get_symbol_name_matcher): Use it for
14483         symbol_name_match_type::SEARCH_NAME.
14484         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14485         it down instead of assuming symbol_name_match_type::FULL.
14486         * block.h (block_lookup_symbol): New parameter 'match_type'.
14487         * c-valprint.c (print_unpacked_pointer): Use
14488         lookup_symbol_search_name instead of lookup_symbol.
14489         * compile/compile-object-load.c (get_out_value_type): Pass down
14490         symbol_name_match_type::SEARCH_NAME.
14491         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14492         symbol_name_match_type::FULL.
14493         * cp-support.c (cp_get_symbol_name_matcher): Handle
14494         symbol_name_match_type::SEARCH_NAME.
14495         * infrun.c (insert_exception_resume_breakpoint): Use
14496         lookup_symbol_search_name.
14497         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14498         * psymtab.c (maintenance_check_psymtabs): Use
14499         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14500         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14501         SYMBOL_SEARCH_NAME.
14502         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14503         if symbol_name_match_type::SEARCH_NAME.
14504         (lookup_symbol_in_language): Pass down
14505         symbol_name_match_type::FULL.
14506         (lookup_symbol_search_name): New.
14507         (lookup_language_this): Pass down
14508         symbol_name_match_type::SEARCH_NAME.
14509         (lookup_symbol_aux, lookup_local_symbol): New parameter
14510         'match_type'.  Pass it down.
14511         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14512         (lookup_symbol_search_name): New declaration.
14513         (lookup_symbol_in_block): New 'match_type' parameter.
14514
14515 2018-01-05  Pedro Alves  <palves@redhat.com>
14516
14517         PR gdb/22670
14518         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14519         ada_lookup_symbol.
14520         (ada_lookup_symbol): Reimplement in terms of
14521         ada_lookup_symbol_list, bits factored out from
14522         ada_lookup_encoded_symbol.
14523
14524 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14525
14526         * ada-exp.y (write_object_renaming): When subscripting an array
14527         using a symbol as the index, pass the block in call to
14528         ada_lookup_encoded_symbol when looking that symbol up.
14529
14530 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14531
14532         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14533         TYPE_INDEX_TYPE.
14534
14535 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14536
14537         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14538         the case where VALUE_LVAL (val0) is not lval_memory.
14539
14540 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14541
14542         * ada-valprint.c (print_optional_low_bound): Handle
14543         character-indexed array printing like boolean-indexed array
14544         printing.
14545
14546 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14547
14548         * NEWS: Create a new section for the next release branch.
14549         Rename the section of the current branch, now that it has
14550         been cut.
14551
14552 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14553
14554         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14555         * version.in: Bump version to 8.1.50.DATE-git.
14556
14557 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14558
14559         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14560         Add field.
14561         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14562         Add field.
14563         (default_exception_support_info) <catch_handlers_sym>: Add field.
14564         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14565         (ada_exception_name_addr_1): Add "catch handlers" handling.
14566         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14567         Update all callers.
14568         (create_excep_cond_exprs) <ex>: Add parameter.
14569         (re_set_exception): Update create_excep_cond_exprs call.
14570         (print_it_exception, print_one_exception, print_mention_exception)
14571         (print_recreate_exception): Add "catch handler" handling.
14572         (allocate_location_catch_handlers, re_set_catch_handlers)
14573         (check_status_catch_handlers, print_it_catch_handlers)
14574         (print_one_catch_handlers, print_mention_catch_handlers)
14575         (print_recreate_catch_handlers): New function.
14576         (catch_handlers_breakpoint_ops): New variable.
14577         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14578         Add parameter.  Add "catch handler" handling.
14579         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14580         Add "catch handler" handling.
14581         (ada_exception_catchpoint_cond_string): Add "catch handler"
14582         handling.
14583         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14584         call.
14585         (catch_ada_handlers_command): New function.
14586         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14587         operations structure.
14588         (_initialize_ada_language): Add "catch handlers" command entry.
14589         * NEWS: Document "catch handlers" feature.
14590
14591 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14592
14593         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14594         account when creating the array type of the slice.
14595         (ada_value_slice): Likewise.
14596
14597 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14598
14599         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14600         New enum value.
14601         (create_array_type_with_stride): Add byte_stride_prop parameter.
14602         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14603         New parameter.  Update all callers in this file.
14604         (array_type_has_dynamic_stride): New function.
14605         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14606         of arrays with dynamic byte strides.
14607         * dwarf2read.c (read_array_type): Add support for dynamic
14608         DW_AT_byte_stride attributes.
14609
14610 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14611
14612         * dwarf2read.c (read_unspecified_type): Treat
14613         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14614
14615 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14616
14617         Update copyright year range in all GDB files.
14618
14619 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14620
14621         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14622         and gdb/testsuite/gdb.base/step-line.c.
14623
14624 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14625
14626         * copyright.py (main): Dump the contents of
14627         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14628         even if BY_HAND is empty.
14629
14630 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14631
14632         * top.c (print_gdb_version): Update Copyright year in version
14633         message.
14634
14635 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14636
14637         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14638
14639 For older changes see ChangeLog-2017.
14640 \f
14641 Local Variables:
14642 mode: change-log
14643 left-margin: 8
14644 fill-column: 74
14645 version-control: never
14646 coding: utf-8
14647 End: