Fix the [-Werror=shadow=local] warning
[external/binutils.git] / gdb / ChangeLog
1 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
2         * valops.c (value_struct_elt_for_reference): Rename local variable
3         to work around the shadowing a previous local warning.
4
5 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
6
7         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
8         * NEWS: Mention new FreeBSD/riscv native configuration.
9         * configure.host: Add riscv*-*-freebsd*.
10         * configure.nat: Likewise.
11         * riscv-fbsd-nat.c: New file.
12
13 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
14
15         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
16         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
17         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
18         * NEWS: Mention new FreeBSD/riscv target.
19         * configure.tgt: Add riscv*-*-freebsd*.
20         * riscv-fbsd-tdep.c: New file.
21         * riscv-fbsd-tdep.h: New file.
22
23 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
24
25         * regcache.h (struct regcache_map_entry): Note that this type can
26         be used with traditional frame caches.
27         * trad-frame.c (trad_frame_set_reg_regmap): New.
28         * trad-frame.h (trad_frame_set_reg_regmap): New.
29
30 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
31
32         PR c++/16841
33         * valops.c (get_virtual_base_offset): New function.
34         (value_struct_elt_for_reference): Use it to get virtual base offset
35         and add it in calculating class member address.
36
37 2018-10-08   John Darrington <john@darrington.wattle.id.au>
38
39     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
40       (check_producer): Check if the producer is codewarrior.
41       (producer_is_codewarrior): New function.
42       (lnp_state_machine::record_line): Ignore is_stmt flag for records
43        produced by codewarrior.
44       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
45
46 2018-10-06  Tom Tromey  <tom@tromey.com>
47
48         PR python/19399:
49         * python/py-inferior.c: Add "architecture" entry.
50         (infpy_architecture): New function.
51
52 2018-10-06  Tom Tromey  <tom@tromey.com>
53
54         PR python/21765:
55         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
56         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
57         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
58         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
59
60 2018-10-06  Tom Tromey  <tom@tromey.com>
61
62         PR build/17077:
63         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
64         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
65         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
66         #include.
67
68 2018-10-06  Tom Tromey  <tom@tromey.com>
69
70         * python/py-breakpoint.c (bppy_get_location): Handle a
71         bp_breakpoint without a location.
72
73 2018-10-06  Tom Tromey  <tom@tromey.com>
74
75         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
76         (_RegEx): Reformat help text.
77         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
78         (AnyCallerIs, AnyCallerMatches): Reformat help text.
79         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
80         text.
81         * python/lib/gdb/command/xmethods.py (InfoXMethod)
82         (EnableXMethod, DisableXMethod): Remove help indentation.
83         Capitalize meta-syntactic variables.
84         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
85         (EnableUnwinder, DisableUnwinder): Remove help indentation.
86         Capitalize meta-syntactic variables.
87         * python/lib/gdb/command/explore.py (ExploreCommand)
88         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
89         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
90         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
91         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
92         Remove help indentation.
93         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
94         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
95         (DisableFrameFilter, SetFrameFilterPriority)
96         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
97
98 2018-10-06  Tom Tromey  <tom@tromey.com>
99
100         PR tui/28819:
101         * tui/tui-io.c (gdb_wgetch): New function.
102         (tui_mld_getc, tui_getc): Use it.
103
104 2018-10-05  Tom Tromey  <tom@tromey.com>
105
106         * sol-thread.c (sol_thread_target::wait): Rename inner
107         "save_ptid".
108
109 2018-10-04  Tom Tromey  <tom@tromey.com>
110
111         * configure: Rebuild.
112         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
113
114 2018-10-04  Tom Tromey  <tom@tromey.com>
115
116         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
117         declaration of "block".
118
119 2018-10-04  Tom Tromey  <tom@tromey.com>
120
121         * common/filestuff.c (fdwalk): Remove inner declaration of
122         "result".
123
124 2018-10-04  Tom Tromey  <tom@tromey.com>
125
126         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
127         "structs_addr" and hoist declaration.
128
129 2018-10-04  Tom Tromey  <tom@tromey.com>
130
131         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
132         variable "size".
133
134 2018-10-04  Tom Tromey  <tom@tromey.com>
135
136         * mdebugread.c (parse_partial_symbols): Use std::string.
137
138 2018-10-04  Tom Tromey  <tom@tromey.com>
139
140         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
141         * p-valprint.c (pascal_val_print): Split inner "i" variable.
142         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
143         header.
144         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
145         more inner scope.
146         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
147         * varobj.c (varobj_update): Rename inner "newobj",
148         "type_changed".
149         * valprint.c (generic_emit_char): Rename inner "buf".
150         * valops.c (find_overload_match): Rename inner "temp".
151         (value_struct_elt_for_reference): Declare "v" in more inner
152         scope.
153         * v850-tdep.c (v850_push_dummy_call): Rename "len".
154         * unittests/array-view-selftests.c (run_tests): Rename inner
155         "vec".
156         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
157         header.
158         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
159         "tsv" in more inner scope.
160         (print_one_static_tracepoint_marker): Rename inner
161         "tuple_emitter".
162         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
163         (tic6x_push_dummy_call): Don't redeclare "addr".
164         * target-float.c: Declare "dto" lower.
165         * symtab.c (lookup_local_symbol): Rename inner "sym".
166         (find_pc_sect_line): Rename inner "pc".
167         * stack.c (print_frame): Don't redeclare "gdbarch".
168         (return_command): Rename inner "gdbarch".
169         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
170         "sp".
171         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
172         header.
173         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
174         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
175         scope.
176         * remote.c (remote_target::update_thread_list): Don't redeclare
177         "tp".
178         (remote_target::process_initial_stop_replies): Rename inner
179         "thread".
180         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
181         (remote_target::wait_as): Don't redeclare "stop_reply".
182         (remote_target::get_thread_local_address): Rename inner
183         "result".
184         (remote_target::get_tib_address): Likewise.
185
186         * regcache.c (cooked_read_test): Rename "regnum".
187         * record-btrace.c (cmd_record_btrace_start): Rename inner
188         "exception".
189         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
190         loop header.
191         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
192         header.
193         (ppu2spu_sniffer): Rename inner "buf".
194         * parse.c (operator_check_standard): Rename inner "type",
195         "objfile".
196         * p-valprint.c (pascal_val_print): Introduce new scope for
197         "low_bound", "high_bound".
198         * p-exp.y (yylex): Declare "i" in loop header.
199         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
200         Lower declaration of "s".
201         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
202         header.
203         (nios2_push_dummy_call): Rename "len".
204         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
205         "buf".
206         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
207         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
208         (linux_xfer_osdata_modules): Likewise.
209         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
210         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
211         (mips_o64_push_dummy_call): Likewise.
212         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
213         "op".
214         * mi/mi-main.c (list_available_thread_groups): Rename inner
215         "tuple_emitter".
216         (mi_cmd_data_read_memory): Rename inner "opts".
217         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
218         "tuple_emitter".
219         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
220         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
221         more inner scope.
222         (parse_partial_symbols): Rename inner "pst", "p", "name"
223         * main.c (captured_main_1): Rename inner "i"s.
224         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
225         "oso2".
226         * linux-tdep.c (linux_info_proc): Rename inner "filename".
227         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
228         * infrun.c (handle_no_resumed): Don't redeclare "thread".
229         (handle_signal_stop): Rename inner "gdbarch".
230         (handle_command): Declare "signum" in loop header.
231         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
232         "status".
233         (examine_prologue): Rename inner "sol" and "sof".
234         (ia64_extract_return_value): Rename inner "val".  Declare another
235         "val" in a more inner scope.
236         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
237         inner scope.
238         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
239         "except".
240         * findvar.c (default_read_var_value): Don't redeclare "addr".
241         * f-exp.y (yylex): Declare "i" in loop header.
242         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
243         Rename inner "type", "expect_type".
244         (evaluate_subexp_for_sizeof): Rename inner "pc".
245         * elfread.c (elf_symfile_read): Rename inner "abfd".
246         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
247         "bytes_read".
248         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
249         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
250         (dwarf_decode_line_header): Rename inner "lh".
251         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
252         "offset".  Declare "i" in loop header.
253         (disassemble_dwarf_expression): Rename inner "addr_size".
254         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
255         inner "result".
256         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
257         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
258         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
259         "inner_list_emitter".
260         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
261         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
262         declaration in a block.
263         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
264         * cp-valprint.c (cp_print_value_fields): Don't redeclare
265         "obstack_final_size".
266         * cp-support.c (inspect_type): Declare "i" in loop header.
267         * compile/compile.c (compile_instance::insert_symbol_error):
268         Rename inner "e".
269         * common/agent.c (agent_run_command): Remove inner "ret"
270         declaration.
271         * coffread.c (coff_symfile_read): Rename inner "name".
272         (coff_symfile_read): Rename inner "abfd".
273         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
274         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
275         "high".
276         * c-exp.y (lex_one_token): Move "len" declaration lower.
277         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
278         "gdbarch".
279         (create_exception_master_breakpoint): Likewise.  Don't redeclare
280         "b".
281         (watch_command_1): Declare "mark" later.
282         (clear_command): Don't shadow "a" or "b".
283         (delete_command): Rename inner "b".
284         (delete_trace_command): Likewise.
285         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
286         "op".
287         (arm_gdbarch_init): Remove inner "e_flags".
288         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
289         "offset" in inner blocks.
290
291 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
292
293         * dwarf-index-write.c (file_write): Don't write if the vector is
294         empty.
295
296 2018-10-05  Tom de Vries  <tdevries@suse.de>
297
298         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
299         PyArg_ParseTuple call.
300
301 2018-10-05  Tom de Vries  <tdevries@suse.de>
302
303         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
304         PyArg_ParseTuple call.
305
306 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
307
308         * psymtab.c (recursively_search_psymtabs): Reformat parameters
309         to avoid exceeding 80 characters per line limit.
310
311 2018-10-04  Tom Tromey  <tom@tromey.com>
312
313         * symfile.c (syms_from_objfile_1, finish_new_objfile)
314         (reread_symbols): Update.
315         * complaints.h (clear_complaints): Remove argument.
316         * complaints.c (enum complaint_series): Remove.
317         (series): Remove global.
318         (complaint_internal): Update.
319         (clear_complaints): Remove argument.
320
321 2018-10-04  Tom Tromey  <tom@tromey.com>
322
323         * symfile.c (symbol_file_add_with_addrs): Do not print "no
324         debugging symbols" message if there is a separate debug objfile.
325
326 2018-10-04  Tom Tromey  <tom@tromey.com>
327
328         PR cli/19551:
329         * symfile.c (symbol_file_add_with_addrs): Update output.
330         * psymtab.c (require_partial_symbols): Update output.
331
332 2018-10-04  Tom Tromey  <tom@tromey.com>
333
334         PR cli/22234:
335         * complaints.c: Emit \n.
336
337 2018-10-04  Tom Tromey  <tom@tromey.com>
338
339         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
340         (separate_debug_file_exists, find_separate_debug_file)
341         (add_symbol_file_command, reread_symbols, allocate_symtab)
342         (allocate_compunit_symtab): Use filtered printing, not
343         unfiltered.
344         * psymtab.c (require_partial_symbols, dump_psymtab)
345         (allocate_psymtab): Use filtered printing, not unfiltered.
346
347 2018-10-04  Tom Tromey  <tom@tromey.com>
348
349         * complaints.c (complaint_internal): Correctly check complaint
350         count.
351
352 2018-10-04  Tom Tromey  <tom@tromey.com>
353
354         * complaints.h (struct complaints): Remove declaration.
355         * complaints.c (clear_complaints): Remove an unused variable.
356
357 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
358
359         * MAINTAINERS (Write After Approval): Add self.
360
361 2018-10-03  Tom Tromey  <tom@tromey.com>
362
363         * guile/scm-value.c (gdbscm_value_to_string): Initialize
364         "buffer_contents".
365         * coffread.c (coff_symtab_read): Initialize "newobj".
366
367 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
368
369         * dwarf2read.c (read_func_scope): Remove struct keyword in
370         range-based for.
371
372 2018-10-03  Tom Tromey  <tom@tromey.com>
373
374         * README: Mention --enable-ubsan.
375         * NEWS: Mention --enable-ubsan.
376         * acinclude.m4: Include sanitize.m4.
377         * configure: Rebuild.
378         * configure.ac: Call AM_GDB_UBSAN.
379         * sanitize.m4: New file.
380
381 2018-10-03  Tom Tromey  <tom@tromey.com>
382
383         * expression.h (enum exp_opcode): Use uint8_t as base type.
384         * expprint.c (op_name): Handle invalid opcodes.
385
386 2018-10-03  Tom Tromey  <tom@tromey.com>
387
388         * parse.c (prefixify_expression): Add assert.
389         (parse_exp_in_context_1): Throw exception if the expression is
390         empty.
391
392 2018-10-03  Tom Tromey  <tom@tromey.com>
393
394         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
395
396 2018-10-03  Tom Tromey  <tom@tromey.com>
397
398         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
399
400 2018-10-03  Tom Tromey  <tom@tromey.com>
401
402         * dwarf2read.c (read_subrange_type): Make "negative_mask"
403         unsigned.
404
405 2018-10-03  Tom Tromey  <tom@tromey.com>
406
407         * findvar.c (extract_integer): Do work in an unsigned type.
408
409 2018-10-03  Tom Tromey  <tom@tromey.com>
410
411         * common/enum-flags.h (enum_flags::operator~): Add static assert.
412         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
413         base type.
414         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
415         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
416         type.
417         * c-lang.h (enum c_string_type_values): Use unsigned as base
418         type.
419         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
420
421 2018-10-03  Tom Tromey  <tom@tromey.com>
422
423         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
424         <~dwarf2_frame_state_reg_info>: Update.
425         <dwarf2_frame_state_reg_info>: Update.
426         <alloc_regs>: Add assertion.  Update.
427         <reg>: Now a std::vector.
428         <num_regs>: Remove.
429         <swap>: Update.
430         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
431         (execute_cfa_program_test, dwarf2_frame_cache): Update.
432
433 2018-10-03  Tom Tromey  <tom@tromey.com>
434
435         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
436
437 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
438
439         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
440
441 2018-10-02  Tom Tromey  <tom@tromey.com>
442
443         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
444
445 2018-10-02  John Darrington <john@darrington.wattle.id.au>
446
447         * NEWS: Mention changed commands.
448         * ser-uds.c: New file.
449         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
450         * configure: Regenerate.
451         * Makefile.in: Add new file.
452         * serial.c (serial_open): Check if filename is a socket
453           and lookup the appropriate interface accordingly.
454
455 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
456
457         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
458         define.
459         (AARCH64_EXTRA_MAGIC): Likewise.
460         (AARCH64_FPSIMD_MAGIC): Likewise.
461         (AARCH64_SVE_MAGIC): Likewise.
462         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
463         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
464         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
465         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
466         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
467         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
468         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
469         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
470         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
471         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
472         (read_aarch64_ctx): Add function.
473         (aarch64_linux_sigframe_init): Detect FP registers.
474
475 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
476
477         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
478         (AARCH64_D0_REGNUM): Likewise.
479         (AARCH64_S0_REGNUM): Likewise.
480         (AARCH64_H0_REGNUM): Likewise.
481         (AARCH64_B0_REGNUM): Likewise.
482         (AARCH64_SVE_V0_REGNUM): Likewise.
483         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from 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
490 2018-10-01  Gary Benson <gbenson@redhat.com>
491
492         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
493         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
494         prfpregset_t instead of gdb_prfpregset_t.
495         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
496         * configure, config.in: Rebuild.
497
498 2018-10-01  Gary Benson <gbenson@redhat.com>
499
500         * common/gdb_proc_service.h: New file, factored out from...
501         * gdb_proc_service.h: Moved common code to the above file.
502         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
503
504 2018-10-01  Gary Benson <gbenson@redhat.com>
505
506         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
507         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
508
509 2018-10-01  Gary Benson <gbenson@redhat.com>
510
511         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
512         (AC_CHECK_HEADERS): Check for linux/elf.h.
513         * configure, config.in: Rebuild.
514         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
515         doesn't define elf_fpregset_t.
516
517 2018-10-01  Gary Benson <gbenson@redhat.com>
518
519         * gdb_proc_service.h: Whitespace change.
520
521 2018-10-01  Tom Tromey  <tom@tromey.com>
522
523         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
524         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
525         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
526
527 2018-10-01  Tom Tromey  <tom@tromey.com>
528
529         * README: Minor change.
530
531 2018-09-30  Pedro Alves  <palves@redhat.com>
532
533         * darwin-nat-info.c (darwin_debug_regions_recurse)
534         (info_mach_exceptions_command): Remove unused local variables.
535         * darwin-nat.c (darwin_decode_notify_message)
536         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
537         (darwin_stop_inferior, darwin_setup_exceptions)
538         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
539         (darwin_nat_target::attach, darwin_nat_target::detach)
540         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
541         local variables.
542         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
543         variables.
544
545 2018-09-29  Tom Tromey  <tom@tromey.com>
546
547         * README: Remove some leftover text.
548
549 2018-09-29  Tom Tromey  <tom@tromey.com>
550
551         * PROBLEMS: Rewrite.
552         * README: Update.
553
554 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
555
556         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
557         case with explicit breakpoint kind.
558         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
559         'additional_info' and related logic.
560         (riscv_debug_breakpoints): New variable.
561         (riscv_breakpoint_kind_from_pc): Use the length of the existing
562         instruction to determine the breakpoint kind.
563         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
564         flag.  Update description of 'set/show riscv
565         use-compressed-breakpoints' flag.
566
567 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
568
569         (NEWS): Mention changes to frame related commands.
570         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
571         (add_prefix_cmd_suppress_notification): New function.
572         (add_com_suppress_notification): Call
573         add_cmd_suppress_notification.
574         * command.h (add_cmd_suppress_notification): Declare.
575         (add_prefix_cmd_suppress_notification): Declare.
576         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
577         (parse_frame_specification): Moved from stack.c, with
578         simplification to handle a single argument.
579         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
580         switch to the selected frame.  Add a header comment.
581         * stack.c: Remove 'safe-ctype.h' include.
582         (find_frame_for_function): Add declaration.
583         (find_frame_for_address): New function.
584         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
585         (frame_selection_by_function_completer): New function.
586         (info_frame_command): Rename to...
587         (info_frame_command_core): ...this, and update parameter types.
588         (select_frame_command): Rename to...
589         (select_frame_command_core): ...this, and update parameter types.
590         (frame_command): Rename to...
591         (frame_command_core): ...this, and update parameter types.
592         (class frame_command_helper): New class to wrap implementations of
593         frame related sub-commands.
594         (frame_apply_cmd_list): New static global.
595         (frame_cmd_list): Make static.
596         (select_frame_cmd_list): New global for sub-commands.
597         (info_frame_cmd_list): New global for sub-commands.
598         (_initialize_stack): Register sub-commands for 'frame',
599         'select-frame', and 'info frame'.  Update 'frame apply' commands
600         to use frame_apply_cmd_list.  Move function local static
601         frame_apply_list to file static frame_apply_cmd_list for
602         consistency.
603         * stack.h (select_frame_command): Delete declarationn.
604         (select_frame_for_mi): Declare new function.
605
606 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
607
608         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
609         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
610         and NOP.
611
612 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
613
614         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
615
616 2018-09-26  Tom Tromey  <tom@tromey.com>
617
618         * valops.c (auto_abandon): Remove dead code.
619
620 2018-09-26  Tom Tromey  <tom@tromey.com>
621
622         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
623
624 2018-09-24  Tom Tromey  <tom@tromey.com>
625
626         * common/pathstuff.c (get_standard_cache_dir): Make
627         "xdg_cache_home" and "home" const.
628         * top.c (init_history): Make "tmpenv" const.
629         * main.c (get_init_files): Make "homedir" const.
630
631 2018-09-23  Tom Tromey  <tom@tromey.com>
632
633         PR python/18852:
634         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
635
636 2018-09-23  Tom Tromey  <tom@tromey.com>
637
638         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
639         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
640         * python/python-internal.h (gdbpy_handle_exception): Declare.
641         * python/py-utils.c (gdbpy_handle_exception): New function.
642
643 2018-09-23  Tom Tromey  <tom@tromey.com>
644
645         PR python/17284:
646         * python/py-type.c (typy_template_argument): Check for negative
647         argument number.
648
649 2018-09-23  Tom Tromey  <tom@tromey.com>
650
651         PR python/14062:
652         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
653
654 2018-09-23  Tom Tromey  <tom@tromey.com>
655
656         PR python/18170:
657         * python/py-value.c (valpy_int): Allow conversion from pointer
658         type.
659
660 2018-09-23  Tom Tromey  <tom@tromey.com>
661
662         PR python/20126:
663         * python/py-value.c (valpy_int): Respect type sign.
664
665 2018-09-23  Tom Tromey  <tom@tromey.com>
666
667         PR python/18352;
668         * python/py-value.c (valpy_float): Allow conversions from int or
669         char.
670         (valpy_int, valpy_long): Allow conversions from float.
671
672 2018-09-23  Tom Tromey  <tom@tromey.com>
673
674         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
675         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
676
677 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
678
679         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
680         __sighndlr.
681         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
682
683 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
684
685         * windows-nat.c (windows_nat_target::wait): Remove a spurious
686         target_terminal::ours().
687
688 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
689
690         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
691         of vl to ULONGEST.
692
693 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
694
695         * breakpoint.c (update_inserted_breakpoint_locations): Remove
696         redundant condition.
697
698 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
699
700         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
701
702         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
703         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
704         * sol-thread.c (ps_pdmodel): Don't guard definition.
705
706         * procfs.c: Fix formatting.
707
708         * procfs.c (sysset_t_alloc): Remove.
709         (create_procinfo): Use XNEW instead of sysset_t_alloc.
710         (procfs_debug_inferior): Likewise.
711         (procfs_set_exec_trap): Likewise.
712         (proc_set_traced_sysentry): Don't allocate argp dynamically.
713         (proc_set_traced_sysexit): Likewise.
714
715         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
716         (dead_procinfo): Likewise.
717         (proc_warn): Likewise.
718         (proc_error): Likewise.
719         (proc_get_LDT_entry): Likewise.
720         (do_attach): Likewise.
721         (procfs_target::pid_to_str): Likewise.
722         (iterate_over_mappings): Likewise.
723
724         * procfs.c (create_procinfo): Fix ARI warning.
725         (proc_get_status): Likewise.
726         (proc_stop_process): Likewise.
727         (proc_run_process): Likewise.
728         (proc_kill): Likewise.
729         (proc_get_LDT_entry): Likewise.
730         (procfs_find_LDT_entry): Likewise.
731         (proc_update_threads): Likewise.
732         (proc_iterate_over_threads): Likewise.
733         (do_attach): Likewise.
734         (procfs_xfer_memory): Likewise.
735         (invalidate_cache): Likewise.
736         (procfs_target::resume): Likewise.
737         (procfs_init_inferior): Likewise.
738         (procfs_set_exec_trap): Likewise.
739         (procfs_target::thread_alive): Likewise.
740         (procfs_target::pid_to_exec_file): Likewise.
741         (iterate_over_mappings): Likewise.
742         (procfs_target::make_corefile_notes): Likewise.
743         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
744
745         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
746         (procfs_find_LDT_entry): Likewise.
747         * sol-thread.c (ps_lgetLDT): Likewise.
748
749 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
750
751         PR tdep/17903
752         * procfs.c (procfs_target): Declare pid_to_exec_file.
753         (procfs_target::pid_to_exec_file): New.
754
755 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
756
757         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
758         renaming.
759         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
760         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
761
762 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
763
764         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
765         (supply_fpregset, fill_fpregset): Move ...
766         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
767         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
768         Remove references to ioctl-based procfs.
769         Include <sys/reg.h>.
770         Remove PR_MODEL_NATIVE guards.
771         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
772         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
773
774 2018-09-19  Xavier Roirand  <roirand@adacore.com>
775
776         PR gdb/20981:
777         * solib-darwin.c (darwin_get_dyld_bfd): New function.
778         (darwin_solib_get_all_image_info_addr_at_init): Update call.
779         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
780
781 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
782
783         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
784         (fbsd_print_sockaddr_in6): Likewise.
785
786 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
787             Chris January  <chris.january@arm.com>
788
789         * eval.c (skip_undetermined_arglist): Skip argument list helper.
790         (evaluate_subexp_standard): Return a dummy type when
791         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
792         OP_F77_UNDETERMINED_ARGLIST case.
793         * expression.h (enum noside): Update comment.
794
795 2018-09-19  George Vasick <george.vasick@oracle.com>
796
797         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
798
799 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
800             April Chin <april.chin@oracle.com>
801             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
802
803         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
804         uint_t lwpid_t.
805         (create_procinfo): Print pids in /proc without leading zeros.
806
807 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
808
809         * nios2-tdep.c (nios2_gcc_target_options): New.
810         (nios2_gdb_arch_init): Install new hook.
811
812 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
813
814         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
815         New file.
816         * update-gnulib.sh: Apply patch.
817         * configure: Re-generate.
818
819 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
820
821         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
822         description.  Make "info proc" command descriptions more
823         consistent.
824
825 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
826
827         * NEWS: Mention 'info proc files' command.
828
829 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
830
831         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
832         descriptors for IP_FILES and IP_ALL.
833
834 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
835
836         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
837         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
838         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
839         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
840         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
841         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
842         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
843         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
844         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
845         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
846         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
847         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
848         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
849         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
850         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
851         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
852         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
853         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
854         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
855         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
856         (struct fbsd_sockaddr_un): New types.
857         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
858         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
859         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
860         (fbsd_core_info_proc_files): New functions.
861         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
862         IP_ALL.
863         * fbsd-tdep.h (fbsd_info_proc_files_header)
864         (fbsd_info_proc_files_entry): New.
865
866 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
867
868         * defs.h (enum info_proc_what) [IP_FILES]: New value.
869         * infcmd.c (info_proc_cmd_files): New function.
870         (_initialize_infcmd): Register 'info proc files' command.
871
872 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
873
874         * gnulib/aclocal-m4-deps.mk: Re-generate.
875         * gnulib/aclocal.m4: Re-generate.
876         * gnulib/config.in: Re-generate.
877         * gnulib/configure: Re-generate.
878         * gnulib/import/Makefile.am: Re-generate.
879         * gnulib/import/Makefile.in: Re-generate.
880         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
881         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
882         * gnulib/import/arpa_inet.in.h: New file.
883         * gnulib/import/inet_ntop.c: New file.
884         * gnulib/import/m4/arpa_inet_h.m4: New file.
885         * gnulib/import/m4/inet_ntop.m4: New file.
886         * gnulib/import/m4/netinet_in_h.m4: New file.
887         * gnulib/import/m4/socklen.m4: New file.
888         * gnulib/import/m4/sockpfaf.m4: New file.
889         * gnulib/import/m4/stdalign.m4: New file.
890         * gnulib/import/m4/sys_uio_h.m4: New file.
891         * gnulib/import/netinet_in.in.h: New file.
892         * gnulib/import/stdalign.in.h: New file.
893         * gnulib/import/sys_socket.c: New file.
894         * gnulib/import/sys_socket.in.h: New file.
895         * gnulib/import/sys_uio.in.h: New file.
896         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
897         module.
898
899 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
900
901         * gnulib/aclocal-m4-deps.mk: New file.
902         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
903         deterministically.
904
905 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
906
907         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
908         KVE_PATH.
909
910 2018-09-18  Tom Tromey  <tom@tromey.com>
911
912         * compile/compile-object-load.c (struct
913         link_hash_table_cleanup_data): Add constructor and destructor.
914         Use DISABLE_COPY_AND_ASSIGN.
915         (~link_hash_table_cleanup_data): Rename from
916         link_hash_table_free.  Now a destructor.
917         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
918
919 2018-09-18  Tom Tromey  <tom@tromey.com>
920
921         * compile/compile-object-run.c (do_module_cleanup): Use delete.
922         * compile/compile-object-load.c (struct munmap_list): Move to
923         header file.
924         (munmap_list::add): Rename from munmap_list_add; rewrite.
925         (munmap_list::~munmap_list): Rename from munmap_list_free.
926         (munmap_listp_free_cleanup): Remove.
927         (compile_object_load): Update.
928         * compile/compile-object-load.h (struct munmap_list): Move from
929         compile-object-load.c.  Rewrite.
930
931 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
932
933         * aarch64-tdep.c (pass_in_v): Use register size.
934         (aarch64_extract_return_value): Likewise.
935         (aarch64_store_return_value): Likewise.
936
937 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
938
939         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
940         rlim_t.
941
942 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
943
944         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
945         Fix short help line.
946
947 2018-09-17  Tom Tromey  <tom@tromey.com>
948
949         PR python/20445:
950         * configure: Rebuild.
951         * configure.ac: Conditionally use -DNDEBUG for Python.
952
953 2018-09-17  Tom Tromey  <tom@tromey.com>
954
955         * configure: Rebuild.
956         * configure.ac: Use gmp as a library dependency when checking for
957         mpfr.
958
959 2018-09-17  Pedro Alves  <palves@redhat.com>
960
961         * python/py-inferior.c (find_inferior_object): Delete.
962
963 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
964
965         * compile/compile-cplus-types.c
966         (compile_cplus_instance::enter_scope): Don't use new_scope after
967         std::move.
968
969 2018-09-17  Tom Tromey  <tom@tromey.com>
970
971         * common/pathstuff.c (get_standard_cache_dir): Use
972         ~/Library/Caches on macOS.
973         * common/pathstuff.h (get_standard_cache_dir): Update comment.
974
975 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
976
977         PR python/23669
978         * breakpoint.c (commands_cmd_element): New.
979         (_initialize_breakpoint): Assign commands_cmd_element.
980         * breakpoint.h (commands_cmd_element): New.
981         * cli/cli-script.c (while_cmd_element, if_command,
982         define_cmd_element): New.
983         (command_name_equals): Remove.
984         (process_next_line): Compare commands by pointer, not by name.
985         (_initialize_cli_script): Assign the various cmd_list_element
986         variables.
987         * compile/compile.c (compile_cmd_element): New.
988         (_initialize_compile): Assign compile_cmd_element.
989         * compile/compile.h (compile_cmd_element): New.
990         * guile/guile.c (guile_cmd_element): New.
991         (install_gdb_commands): Assign guile_cmd_element.
992         * guile/guile.h (guile_cmd_element): New.
993         * python/python.c (python_cmd_element): New.
994         (_initialize_python): Assign python_cmd_element.
995         * python/python.h (python_cmd_element): New.
996         * tracepoint.c (while_stepping_cmd_element): New.
997         (_initialize_tracepoint): Assign while_stepping_cmd_element.
998         * tracepoint.h (while_stepping_cmd_element): New.
999
1000 2018-09-17  Tom Tromey  <tom@tromey.com>
1001
1002         * infrun.c (save_infcall_suspend_state): Return
1003         infcall_suspend_state_up.
1004         (save_infcall_control_state): Return infcall_control_state_up.
1005         * inferior.h (save_infcall_suspend_state)
1006         (save_infcall_control_state): Declare later.  Return unique
1007         pointers.
1008
1009 2018-09-17  Tom Tromey  <tom@tromey.com>
1010
1011         * infrun.c (struct stop_context): Declare constructor,
1012         destructor, "changed" method.
1013         (stop_context::stop_context): Rename from save_stop_context.
1014         (stop_context::~stop_context): Rename from
1015         release_stop_context_cleanup.
1016         (normal_stop): Update.
1017         (stop_context::changed): Rename from stop_context_changed.  Return
1018         bool.
1019
1020 2018-09-17  Tom Tromey  <tom@tromey.com>
1021
1022         * inferior.h (struct infcall_suspend_state_deleter): New.
1023         (infcall_suspend_state_up): New typedef.
1024         (struct infcall_control_state_deleter): New.
1025         (infcall_control_state_up): New typedef.
1026         (make_cleanup_restore_infcall_suspend_state)
1027         (make_cleanup_restore_infcall_control_state): Don't declare.
1028         * infcall.c (call_function_by_hand_dummy): Update.
1029         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1030         (make_cleanup_restore_infcall_suspend_state): Remove.
1031         (do_restore_infcall_control_state_cleanup)
1032         (make_cleanup_restore_infcall_control_state): Remove.
1033
1034 2018-09-17  Tom Tromey  <tom@tromey.com>
1035
1036         * gdbthread.h (struct thread_control_state): Add initializer.
1037         (class thread_info) <control>: Remove initializer.
1038         * inferior.h (struct inferior_control_state): Add initializer.
1039         (class inferior) <control>: Remove initializer.
1040         (exit_inferior_1): Update.
1041         * infrun.c (struct infcall_control_state): Add constructors.
1042         (save_infcall_control_state): Use new.
1043         (restore_infcall_control_state, discard_infcall_control_state):
1044         Use delete.
1045
1046 2018-09-17  Tom Tromey  <tom@tromey.com>
1047
1048         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1049         unique_ptr.
1050         <siginfo_data>: Now a unique_xmalloc_ptr.
1051         (save_infcall_suspend_state, restore_infcall_suspend_state)
1052         (discard_infcall_suspend_state)
1053         (get_infcall_suspend_state_regcache): Update.
1054
1055 2018-09-17  Tom Tromey  <tom@tromey.com>
1056
1057         * gdbthread.h (struct thread_suspend_state): Add initializers.
1058         (class thread_info) <suspend>: Remove initializer.
1059         * infrun.c (struct infcall_suspend_state): Add initializers.
1060         (save_infcall_suspend_state): Use new.
1061         (discard_infcall_suspend_state): Use delete.
1062
1063 2018-09-16  Tom Tromey  <tom@tromey.com>
1064
1065         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1066         Remove.
1067         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1068         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1069         (py_varobj_iter_new): Likewise.
1070         (py_varobj_get_iterator): Use gdbpy_ref.
1071
1072 2018-09-16  Tom Tromey  <tom@tromey.com>
1073
1074         * python/py-threadevent.c (py_get_event_thread): Simplify.
1075         * python/py-inferior.c (infpy_thread_from_thread_handle):
1076         Return immediately after calling thread_to_thread_object.  Use
1077         Py_RETURN_NONE.
1078         (thread_to_thread_object): Set the exception on a NULL return.
1079
1080 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1081
1082         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1083
1084 2018-09-16  Tom Tromey  <tom@tromey.com>
1085
1086         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1087         Remove.
1088
1089 2018-09-16  Tom Tromey  <tom@tromey.com>
1090
1091         * python/python-internal.h (thread_to_thread_object): Change
1092         return type.
1093         * python/py-inferior.c (thread_to_thread_object): Return a new
1094         reference.
1095         (infpy_thread_from_thread_handle): Update.
1096         * python/py-infthread.c (gdbpy_selected_thread): Update.
1097         * python/py-stopevent.c (create_stop_event_object): Update.
1098         * python/py-threadevent.c (py_get_event_thread): Return a new
1099         reference.
1100         (py_get_event_thread): Update.
1101         * python/py-event.h (py_get_event_thread): Change return type.
1102         * python/py-continueevent.c (create_continue_event_object):
1103         Update.
1104
1105 2018-09-16  Tom Tromey  <tom@tromey.com>
1106
1107         * python/py-progspace.c (pspy_get_objfiles): Update.
1108         * python/python-internal.h (objfile_to_objfile_object): Change
1109         return type.
1110         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1111         Update.
1112         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1113         Update.
1114         * python/python.c (gdbpy_get_current_objfile): Update.
1115         (gdbpy_objfiles): Update.
1116         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1117         Update.
1118         (objfile_to_objfile_object): Return a new reference.
1119         * python/py-symtab.c (stpy_get_objfile): Update.
1120         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1121         Update.
1122
1123 2018-09-16  Tom Tromey  <tom@tromey.com>
1124
1125         * python/py-inferior.c (infpy_get_progspace): Update.
1126         * python/python-internal.h (pspace_to_pspace_object): Change
1127         return type.
1128         * python/py-newobjfileevent.c
1129         (create_clear_objfiles_event_object): Update.
1130         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1131         Update.
1132         * python/python.c (gdbpy_get_current_progspace): Update.
1133         (gdbpy_progspaces): Update.
1134         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1135         reference.
1136         * python/py-objfile.c (objfpy_get_progspace): Update.
1137         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1138         Update.
1139
1140 2018-09-16  Tom Tromey  <tom@tromey.com>
1141
1142         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1143         (solib_name, block_for_pc, find_pc_line): New functions.
1144         (execute_unwinders): Update.
1145         * python/py-block.c (gdbpy_block_for_pc): Remove.
1146         * python/py-inferior.c (infpy_get_progspace): New function.
1147         (inferior_object_getset) <progspace>: Add.
1148         * python/py-progspace.c (pspy_objfiles): Rewrite.
1149         (pspy_solib_name, pspy_block_for_pc)
1150         (pspy_find_pc_line, pspy_is_valid): New functions.
1151         (progspace_object_methods): Add entries for solib_name,
1152         block_for_pc, find_pc_line, is_valid.
1153         * python/python-internal.h (gdbpy_block_for_pc)
1154         (build_objfiles_list): Don't declare.
1155         * python/python.c: Don't include solib.h.
1156         (gdbpy_solib_name, gdbpy_find_pc_line)
1157         (gdbpy_get_current_progspace, build_objfiles_list)
1158         (gdbpy_objfiles): Remove.
1159         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1160         solib_name, find_pc_line>: Remove entries.
1161
1162 2018-09-16  Tom Tromey  <tom@tromey.com>
1163
1164         * top.c (new_ui_command): Use GNU style for metasyntactic
1165         variables.
1166         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1167         variables.
1168         * maint.c (maintenance_translate_address): Remove "<>" around
1169         text.
1170         * interps.c (interpreter_exec_cmd): Use GNU style for
1171         metasyntactic variables.
1172         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1173         metasyntactic variables.
1174         * tracepoint.c (tfind_range_command): Use GNU style for
1175         metasyntactic variables.
1176         (tfind_outside_command): Likewise.
1177         (_initialize_tracepoint): Likewise.
1178         * remote.c (extended_remote_target::create_inferior): Use GNU
1179         style for metasyntactic variables.
1180         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1181         metasyntactic variables.
1182         (adi_assign_command): Likewise.
1183
1184 2018-09-16  Tom Tromey  <tom@tromey.com>
1185
1186         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1187         metasyntactic variables.  Print message if no disassembler options
1188         are available.
1189
1190 2018-09-15  Tom Tromey  <tom@tromey.com>
1191
1192         * infcmd.c (get_inferior_args): Return const char *.
1193         * inferior.h (get_inferior_args): Return type now const.
1194         * linux-tdep.c (linux_fill_prpsinfo): Update.
1195         * procfs.c (procfs_target::make_corefile_notes): Update.
1196
1197 2018-09-07  Tom Tromey  <tom@tromey.com>
1198
1199         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1200         inside the TRY.
1201
1202 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1203
1204         * nios2-tdep.c (nios2_type_align): New.
1205         (nios2_gdb_arch_init): Install type_align hook.
1206
1207 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1208
1209         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1210         type that is neither object file owned, nor gdbarch owned.
1211         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1212         gdbarch is non-NULL.
1213         (alloc_type_instance): Allocate non-objfile owned types on the
1214         gdbarch obstack.
1215         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1216         using TYPE_ALLOC to ensure memory is allocated on the correct
1217         obstack.
1218         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1219         obstack, or the gdbarch obstack.
1220         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1221
1222 2018-09-14  Tom Tromey  <tom@tromey.com>
1223
1224         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1225         block.
1226
1227 2018-09-14  Tom Tromey  <tom@tromey.com>
1228
1229         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1230
1231 2018-09-13  Tom Tromey  <tom@tromey.com>
1232
1233         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1234         static.
1235
1236 2018-09-13  Tom Tromey  <tom@tromey.com>
1237
1238         * exec.c (try_open_exec_file): Use std::string.
1239
1240 2018-09-13  Tom Tromey  <tom@tromey.com>
1241
1242         * utils.h (gdb_bfd_errmsg): Return std::string.
1243         * exec.c (exec_file_attach): Update.
1244         * compile/compile-object-load.c (compile_object_load): Update.
1245         * utils.c (gdb_bfd_errmsg): Return std::string.
1246
1247 2018-09-13  Tom Tromey  <tom@tromey.com>
1248
1249         * procfs.c (struct procinfo_deleter): New.
1250         (procinfo_up): New typedef.
1251         (do_destroy_procinfo_cleanup): Remove.
1252         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1253
1254 2018-09-13  Tom Tromey  <tom@tromey.com>
1255
1256         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1257
1258 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1259 2018-09-13  Tom Tromey  <tom@tromey.com>
1260
1261         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1262         (pspy_get_objfiles): New function.
1263         (progspace_object_methods): New.
1264         (pspace_object_type): Add tp_methods callback.
1265         * python/python-internal.h (build_objfiles_list): New
1266         declaration.
1267         * python/python.c (build_objfiles_list): New function.
1268         (gdbpy_objfiles): Implement using build_objfiles_list.
1269         * NEWS: Mention the Progspace.objfiles method.
1270
1271 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1272
1273         * python/py-inferior.c (infpy_get_progspace): New function.
1274         (inferior_object_getset): Add progspace property.
1275         * NEWS: Mention the new property.
1276
1277 2018-09-13  Tom Tromey  <tom@tromey.com>
1278
1279         PR rust/23650:
1280         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1281
1282 2018-09-13  Tom Tromey  <tom@tromey.com>
1283
1284         PR rust/23626:
1285         * rust-lang.c (rust_enum_variant): Now static.
1286         (rust_empty_enum_p): New function.
1287         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1288         Handle empty enum.
1289
1290 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1291
1292         * python/py-inferior.c (infpy_repr): New.
1293         (inferior_object_type): Register infpy_repr.
1294         * python/py-objfile.c (objfpy_repr): New.
1295         (objfile_object_type): Register objfpy_repr.
1296
1297 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1298
1299         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1300
1301 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1302
1303         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1304         typo.
1305
1306 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1307
1308         * common/common-utils.c: Don't include '<sys/stat.h>'.
1309         (is_regular_file): Move to...
1310         * common/filestuff.c (is_regular_file): ... here.
1311         * common/common-utils.h (is_regular_file): Move to...
1312         * common/filestuff.h (is_regular_file): ... here.
1313
1314 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1315
1316         * skip.c (debug_skip): New variable.
1317         (skiplist_entry::do_skip_file_p): Add debug output.
1318         (skiplist_entry::do_skip_gfile_p): Likewise.
1319         (skiplist_entry::skip_function_p): Likewise.
1320         (_initialize_step_skip): Create debug command.
1321         * NEWS: Mention set/show debug skip.
1322
1323 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1324
1325         * darwin-nat.c (should_disable_startup_with_shell):
1326         New function.
1327         (darwin_nat_target::create_inferior): Add call.
1328
1329 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1330
1331         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1332         inf_port, msg_state>: Initialize.
1333         (struct darwin_thread_info) <signaled, single_step>: Change
1334         type and initialize.
1335         (struct darwin_thread_info) <event>: Initialize.
1336
1337 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1338
1339         PR gdb/23555
1340         PR gdb/23558
1341         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1342         guesses.
1343
1344 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1345
1346         Revert:
1347         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1348
1349         PR gdb/23555
1350         PR gdb/23558
1351         * gnulib/aclocal.m4: Regenerate.
1352         * gnulib/config.in: Regenerate.
1353         * gnulib/configure: Regenerate.
1354         * gnulib/import/Makefile.am: Update.
1355         * gnulib/import/Makefile.in: Update.
1356         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1357         * gnulib/import/_Noreturn.h: ... this.
1358         * gnulib/import/alloca.in.h: Update.
1359         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1360         * gnulib/import/arg-nonnull.h: ... this.
1361         * gnulib/import/assure.h: Update.
1362         * gnulib/import/at-func.c: Update.
1363         * gnulib/import/basename-lgpl.c: Update.
1364         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1365         * gnulib/import/c++defs.h: ... this.
1366         * gnulib/import/canonicalize-lgpl.c: Update.
1367         * gnulib/import/cdefs.h: Update.
1368         * gnulib/import/chdir-long.c: Update.
1369         * gnulib/import/chdir-long.h: Update.
1370         * gnulib/import/cloexec.c: Update.
1371         * gnulib/import/cloexec.h: Update.
1372         * gnulib/import/close.c: Update.
1373         * gnulib/import/closedir.c: Update.
1374         * gnulib/import/config.charset: Update.
1375         * gnulib/import/dirent-private.h: Update.
1376         * gnulib/import/dirent.in.h: Update.
1377         * gnulib/import/dirfd.c: Update.
1378         * gnulib/import/dirname-lgpl.c: Update.
1379         * gnulib/import/dirname.h: Update.
1380         * gnulib/import/dosname.h: Update.
1381         * gnulib/import/dup-safer-flag.c: Update.
1382         * gnulib/import/dup-safer.c: Update.
1383         * gnulib/import/dup.c: Update.
1384         * gnulib/import/dup2.c: Update.
1385         * gnulib/import/errno.in.h: Update.
1386         * gnulib/import/error.c: Update.
1387         * gnulib/import/error.h: Update.
1388         * gnulib/import/exitfail.c: Update.
1389         * gnulib/import/exitfail.h: Update.
1390         * gnulib/import/extra/update-copyright: Update.
1391         * gnulib/import/fchdir.c: Update.
1392         * gnulib/import/fcntl.c: Update.
1393         * gnulib/import/fcntl.in.h: Update.
1394         * gnulib/import/fd-hook.c: Update.
1395         * gnulib/import/fd-hook.h: Update.
1396         * gnulib/import/fd-safer-flag.c: Update.
1397         * gnulib/import/fd-safer.c: Update.
1398         * gnulib/import/fdopendir.c: Update.
1399         * gnulib/import/filename.h: Update.
1400         * gnulib/import/filenamecat-lgpl.c: Update.
1401         * gnulib/import/filenamecat.h: Update.
1402         * gnulib/import/flexmember.h: Update.
1403         * gnulib/import/float+.h: Update.
1404         * gnulib/import/float.c: Update.
1405         * gnulib/import/float.in.h: Update.
1406         * gnulib/import/fnmatch.c: Update.
1407         * gnulib/import/fnmatch.in.h: Update.
1408         * gnulib/import/fnmatch_loop.c: Update.
1409         * gnulib/import/fpucw.h: Update.
1410         * gnulib/import/frexp.c: Update.
1411         * gnulib/import/frexpl.c: Update.
1412         * gnulib/import/fstat.c: Update.
1413         * gnulib/import/fstatat.c: Update.
1414         * gnulib/import/getcwd-lgpl.c: Update.
1415         * gnulib/import/getcwd.c: Update.
1416         * gnulib/import/getdtablesize.c: Update.
1417         * gnulib/import/getlogin_r.c: Update.
1418         * gnulib/import/getprogname.c: Update.
1419         * gnulib/import/getprogname.h: Update.
1420         * gnulib/import/gettext.h: Update.
1421         * gnulib/import/gettimeofday.c: Update.
1422         * gnulib/import/glob-libc.h: Update.
1423         * gnulib/import/glob.c: Update.
1424         * gnulib/import/glob.in.h: Update.
1425         * gnulib/import/glob_internal.h: Update.
1426         * gnulib/import/glob_pattern_p.c: Update.
1427         * gnulib/import/globfree.c: Update.
1428         * gnulib/import/hard-locale.c: Update.
1429         * gnulib/import/hard-locale.h: Update.
1430         * gnulib/import/intprops.h: Update.
1431         * gnulib/import/inttypes.in.h: Update.
1432         * gnulib/import/isnan.c: Update.
1433         * gnulib/import/isnand-nolibm.h: Update.
1434         * gnulib/import/isnand.c: Update.
1435         * gnulib/import/isnanl-nolibm.h: Update.
1436         * gnulib/import/isnanl.c: Update.
1437         * gnulib/import/itold.c: Update.
1438         * gnulib/import/libc-config.h: Update.
1439         * gnulib/import/limits.in.h: Update.
1440         * gnulib/import/localcharset.c: Update.
1441         * gnulib/import/localcharset.h: Update.
1442         * gnulib/import/localtime-buffer.c: Update.
1443         * gnulib/import/localtime-buffer.h: Update.
1444         * gnulib/import/lstat.c: Update.
1445         * gnulib/import/m4/00gnulib.m4: Update.
1446         * gnulib/import/m4/__inline.m4: Update.
1447         * gnulib/import/m4/absolute-header.m4: Update.
1448         * gnulib/import/m4/alloca.m4: Update.
1449         * gnulib/import/m4/builtin-expect.m4: Update.
1450         * gnulib/import/m4/canonicalize.m4: Update.
1451         * gnulib/import/m4/chdir-long.m4: Update.
1452         * gnulib/import/m4/close.m4: Update.
1453         * gnulib/import/m4/closedir.m4: Update.
1454         * gnulib/import/m4/configmake.m4: Update.
1455         * gnulib/import/m4/d-ino.m4: Update.
1456         * gnulib/import/m4/d-type.m4: Update.
1457         * gnulib/import/m4/dirent_h.m4: Update.
1458         * gnulib/import/m4/dirfd.m4: Update.
1459         * gnulib/import/m4/dirname.m4: Update.
1460         * gnulib/import/m4/double-slash-root.m4: Update.
1461         * gnulib/import/m4/dup.m4: Update.
1462         * gnulib/import/m4/dup2.m4: Update.
1463         * gnulib/import/m4/eealloc.m4: Update.
1464         * gnulib/import/m4/environ.m4: Update.
1465         * gnulib/import/m4/errno_h.m4: Update.
1466         * gnulib/import/m4/error.m4: Update.
1467         * gnulib/import/m4/exponentd.m4: Update.
1468         * gnulib/import/m4/exponentl.m4: Update.
1469         * gnulib/import/m4/extensions.m4: Update.
1470         * gnulib/import/m4/extern-inline.m4: Update.
1471         * gnulib/import/m4/fchdir.m4: Update.
1472         * gnulib/import/m4/fcntl-o.m4: Update.
1473         * gnulib/import/m4/fcntl.m4: Update.
1474         * gnulib/import/m4/fcntl_h.m4: Update.
1475         * gnulib/import/m4/fdopendir.m4: Update.
1476         * gnulib/import/m4/filenamecat.m4: Update.
1477         * gnulib/import/m4/flexmember.m4: Update.
1478         * gnulib/import/m4/float_h.m4: Update.
1479         * gnulib/import/m4/fnmatch.m4: Update.
1480         * gnulib/import/m4/fnmatch_h.m4: Update.
1481         * gnulib/import/m4/fpieee.m4: Update.
1482         * gnulib/import/m4/frexp.m4: Update.
1483         * gnulib/import/m4/frexpl.m4: Update.
1484         * gnulib/import/m4/fstat.m4: Update.
1485         * gnulib/import/m4/fstatat.m4: Update.
1486         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1487         * gnulib/import/m4/getcwd-path-max.m4: Update.
1488         * gnulib/import/m4/getcwd.m4: Update.
1489         * gnulib/import/m4/getdtablesize.m4: Update.
1490         * gnulib/import/m4/getlogin.m4: Update.
1491         * gnulib/import/m4/getlogin_r.m4: Update.
1492         * gnulib/import/m4/getpagesize.m4: Update.
1493         * gnulib/import/m4/getprogname.m4: Update.
1494         * gnulib/import/m4/gettimeofday.m4: Update.
1495         * gnulib/import/m4/glibc21.m4: Update.
1496         * gnulib/import/m4/glob.m4: Update.
1497         * gnulib/import/m4/glob_h.m4: Update.
1498         * gnulib/import/m4/gnulib-cache.m4: Update.
1499         * gnulib/import/m4/gnulib-common.m4: Update.
1500         * gnulib/import/m4/gnulib-comp.m4: Update.
1501         * gnulib/import/m4/gnulib-tool.m4: Update.
1502         * gnulib/import/m4/hard-locale.m4: Update.
1503         * gnulib/import/m4/include_next.m4: Update.
1504         * gnulib/import/m4/inttypes-pri.m4: Update.
1505         * gnulib/import/m4/inttypes.m4: Update.
1506         * gnulib/import/m4/isnand.m4: Update.
1507         * gnulib/import/m4/isnanl.m4: Update.
1508         * gnulib/import/m4/largefile.m4: Update.
1509         * gnulib/import/m4/limits-h.m4: Update.
1510         * gnulib/import/m4/localcharset.m4: Update.
1511         * gnulib/import/m4/locale-fr.m4: Update.
1512         * gnulib/import/m4/locale-ja.m4: Update.
1513         * gnulib/import/m4/locale-zh.m4: Update.
1514         * gnulib/import/m4/localtime-buffer.m4: Update.
1515         * gnulib/import/m4/longlong.m4: Update.
1516         * gnulib/import/m4/lstat.m4: Update.
1517         * gnulib/import/m4/malloc.m4: Update.
1518         * gnulib/import/m4/malloca.m4: Update.
1519         * gnulib/import/m4/math_h.m4: Update.
1520         * gnulib/import/m4/mbrtowc.m4: Update.
1521         * gnulib/import/m4/mbsinit.m4: Update.
1522         * gnulib/import/m4/mbsrtowcs.m4: Update.
1523         * gnulib/import/m4/mbstate_t.m4: Update.
1524         * gnulib/import/m4/memchr.m4: Update.
1525         * gnulib/import/m4/memmem.m4: Update.
1526         * gnulib/import/m4/mempcpy.m4: Update.
1527         * gnulib/import/m4/memrchr.m4: Update.
1528         * gnulib/import/m4/mkdir.m4: Update.
1529         * gnulib/import/m4/mkstemp.m4: Update.
1530         * gnulib/import/m4/mmap-anon.m4: Update.
1531         * gnulib/import/m4/mode_t.m4: Update.
1532         * gnulib/import/m4/msvc-inval.m4: Update.
1533         * gnulib/import/m4/msvc-nothrow.m4: Update.
1534         * gnulib/import/m4/multiarch.m4: Update.
1535         * gnulib/import/m4/nocrash.m4: Update.
1536         * gnulib/import/m4/off_t.m4: Update.
1537         * gnulib/import/m4/onceonly.m4: Update.
1538         * gnulib/import/m4/open-cloexec.m4: Update.
1539         * gnulib/import/m4/open.m4: Update.
1540         * gnulib/import/m4/openat.m4: Update.
1541         * gnulib/import/m4/opendir.m4: Update.
1542         * gnulib/import/m4/pathmax.m4: Update.
1543         * gnulib/import/m4/rawmemchr.m4: Update.
1544         * gnulib/import/m4/readdir.m4: Update.
1545         * gnulib/import/m4/readlink.m4: Update.
1546         * gnulib/import/m4/realloc.m4: Update.
1547         * gnulib/import/m4/rename.m4: Update.
1548         * gnulib/import/m4/rewinddir.m4: Update.
1549         * gnulib/import/m4/rmdir.m4: Update.
1550         * gnulib/import/m4/save-cwd.m4: Update.
1551         * gnulib/import/m4/secure_getenv.m4: Update.
1552         * gnulib/import/m4/setenv.m4: Update.
1553         * gnulib/import/m4/signal_h.m4: Update.
1554         * gnulib/import/m4/ssize_t.m4: Update.
1555         * gnulib/import/m4/stat-time.m4: Update.
1556         * gnulib/import/m4/stat.m4: Update.
1557         * gnulib/import/m4/std-gnu11.m4: Update.
1558         * gnulib/import/m4/stdbool.m4: Update.
1559         * gnulib/import/m4/stddef_h.m4: Update.
1560         * gnulib/import/m4/stdint.m4: Update.
1561         * gnulib/import/m4/stdio_h.m4: Update.
1562         * gnulib/import/m4/stdlib_h.m4: Update.
1563         * gnulib/import/m4/strchrnul.m4: Update.
1564         * gnulib/import/m4/strdup.m4: Update.
1565         * gnulib/import/m4/strerror.m4: Update.
1566         * gnulib/import/m4/string_h.m4: Update.
1567         * gnulib/import/m4/strstr.m4: Update.
1568         * gnulib/import/m4/strtok_r.m4: Update.
1569         * gnulib/import/m4/sys_socket_h.m4: Update.
1570         * gnulib/import/m4/sys_stat_h.m4: Update.
1571         * gnulib/import/m4/sys_time_h.m4: Update.
1572         * gnulib/import/m4/sys_types_h.m4: Update.
1573         * gnulib/import/m4/tempname.m4: Update.
1574         * gnulib/import/m4/time_h.m4: Update.
1575         * gnulib/import/m4/unistd-safer.m4: Update.
1576         * gnulib/import/m4/unistd_h.m4: Update.
1577         * gnulib/import/m4/warn-on-use.m4: Update.
1578         * gnulib/import/m4/wchar_h.m4: Update.
1579         * gnulib/import/m4/wchar_t.m4: Update.
1580         * gnulib/import/m4/wctype_h.m4: Update.
1581         * gnulib/import/m4/wint_t.m4: Update.
1582         * gnulib/import/malloc.c: Update.
1583         * gnulib/import/malloc/scratch_buffer.h: Update.
1584         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1585         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1586         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1587         * gnulib/import/malloca.c: Update.
1588         * gnulib/import/malloca.h: Update.
1589         * gnulib/import/malloca.valgrind: Update.
1590         * gnulib/import/math.in.h: Update.
1591         * gnulib/import/mbrtowc.c: Update.
1592         * gnulib/import/mbsinit.c: Update.
1593         * gnulib/import/mbsrtowcs-impl.h: Update.
1594         * gnulib/import/mbsrtowcs-state.c: Update.
1595         * gnulib/import/mbsrtowcs.c: Update.
1596         * gnulib/import/memchr.c: Update.
1597         * gnulib/import/memmem.c: Update.
1598         * gnulib/import/mempcpy.c: Update.
1599         * gnulib/import/memrchr.c: Update.
1600         * gnulib/import/mkdir.c: Update.
1601         * gnulib/import/mkstemp.c: Update.
1602         * gnulib/import/msvc-inval.c: Update.
1603         * gnulib/import/msvc-inval.h: Update.
1604         * gnulib/import/msvc-nothrow.c: Update.
1605         * gnulib/import/msvc-nothrow.h: Update.
1606         * gnulib/import/open.c: Update.
1607         * gnulib/import/openat-die.c: Update.
1608         * gnulib/import/openat-priv.h: Update.
1609         * gnulib/import/openat-proc.c: Update.
1610         * gnulib/import/openat.c: Update.
1611         * gnulib/import/openat.h: Update.
1612         * gnulib/import/opendir.c: Update.
1613         * gnulib/import/pathmax.h: Update.
1614         * gnulib/import/pipe-safer.c: Update.
1615         * gnulib/import/rawmemchr.c: Update.
1616         * gnulib/import/readdir.c: Update.
1617         * gnulib/import/readlink.c: Update.
1618         * gnulib/import/realloc.c: Update.
1619         * gnulib/import/ref-add.sin: Update.
1620         * gnulib/import/ref-del.sin: Update.
1621         * gnulib/import/rename.c: Update.
1622         * gnulib/import/rewinddir.c: Update.
1623         * gnulib/import/rmdir.c: Update.
1624         * gnulib/import/same-inode.h: Update.
1625         * gnulib/import/save-cwd.c: Update.
1626         * gnulib/import/save-cwd.h: Update.
1627         * gnulib/import/scratch_buffer.h: Update.
1628         * gnulib/import/secure_getenv.c: Update.
1629         * gnulib/import/setenv.c: Update.
1630         * gnulib/import/signal.in.h: Update.
1631         * gnulib/import/stat-time.c: Update.
1632         * gnulib/import/stat-time.h: Update.
1633         * gnulib/import/stat-w32.c: Update.
1634         * gnulib/import/stat-w32.h: Update.
1635         * gnulib/import/stat.c: Update.
1636         * gnulib/import/stdbool.in.h: Update.
1637         * gnulib/import/stddef.in.h: Update.
1638         * gnulib/import/stdint.in.h: Update.
1639         * gnulib/import/stdio.in.h: Update.
1640         * gnulib/import/stdlib.in.h: Update.
1641         * gnulib/import/str-two-way.h: Update.
1642         * gnulib/import/strchrnul.c: Update.
1643         * gnulib/import/strdup.c: Update.
1644         * gnulib/import/streq.h: Update.
1645         * gnulib/import/strerror-override.c: Update.
1646         * gnulib/import/strerror-override.h: Update.
1647         * gnulib/import/strerror.c: Update.
1648         * gnulib/import/string.in.h: Update.
1649         * gnulib/import/stripslash.c: Update.
1650         * gnulib/import/strnlen1.c: Update.
1651         * gnulib/import/strnlen1.h: Update.
1652         * gnulib/import/strstr.c: Update.
1653         * gnulib/import/strtok_r.c: Update.
1654         * gnulib/import/sys_stat.in.h: Update.
1655         * gnulib/import/sys_time.in.h: Update.
1656         * gnulib/import/sys_types.in.h: Update.
1657         * gnulib/import/tempname.c: Update.
1658         * gnulib/import/tempname.h: Update.
1659         * gnulib/import/time.in.h: Update.
1660         * gnulib/import/unistd--.h: Update.
1661         * gnulib/import/unistd-safer.h: Update.
1662         * gnulib/import/unistd.in.h: Update.
1663         * gnulib/import/unsetenv.c: Update.
1664         * gnulib/import/verify.h: Update.
1665         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1666         * gnulib/import/wchar.in.h: Update.
1667         * gnulib/import/wctype.in.h: Update.
1668         * gnulib/import/xalloc-oversized.h: Update.
1669         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1670         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1671
1672 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1673
1674         * record-btrace.c (get_thread_current_frame): Remove
1675         old_inferior_ptid.
1676
1677 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1678
1679         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1680         with check_tag to 1 if and only if the type is tagged and the
1681         component being searched cannot been found in the current
1682         view. Otherwise, always call ada_to_fixed_type with
1683         check_tag to 0.
1684
1685 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1686
1687         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1688         declaration.
1689         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1690         * ada-varobj.c (ada_varobj_get_number_of_children,
1691         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1692
1693 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1694
1695         * ada-valprint.c (ada_value_print): Use type instead of
1696         enclosing type.
1697
1698 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1699
1700         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1701         an array of access to unconstrained array.
1702
1703 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1704
1705         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1706         (ada_check_typedef): Use it.
1707
1708 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1709
1710         * ada-varobj.c (ada_varobj_describe_struct_child)
1711         (ada_varobj_describe_child): Handle union case like struct one.
1712
1713 2018-09-10  Tom Tromey  <tom@tromey.com>
1714
1715         PR python/18380:
1716         * python/python.c (_initialize_python): Make example in "python"
1717         help work in Python 3.
1718
1719 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1720
1721         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1722         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1723         $(EXEEXT) to the script, as it is not a program.
1724
1725 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1726
1727         * python/py-prettyprint.c (pretty_print_one_value): Return
1728         gdbpy_ref<>.
1729         (print_string_repr): Adjust.
1730         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1731         * python/python-internal.h (apply_varobj_pretty_printer): Return
1732         gdbpy_ref<>.
1733         * varobj.c (varobj_value_get_print_value): Adjust.
1734
1735 2018-09-08  Tom Tromey  <tom@tromey.com>
1736
1737         PR python/16047:
1738         * python/py-prettyprint.c (pretty_print_one_value): Check for
1739         to_string method.
1740
1741 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1742
1743         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1744         replace_operator_with_call.
1745
1746 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1747
1748         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1749
1750 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1751
1752         * ada-typeprint.c (print_range): Print the bounds using TYPE
1753         rather than its TYPE_TARGET_TYPE.
1754
1755 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1756
1757         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1758         call to ada_to_fixed_value_create.
1759
1760 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1761
1762         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1763
1764 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1765
1766         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1767         by calls to error.
1768
1769 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1770
1771         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1772         Move update of loop variable "fi".
1773
1774 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1775
1776         * ada-lang.c (value_assign_to_component): In the case of
1777         big-endian targets, extract the bits of the given VAL
1778         using an src_offset of zero if container is not a scalar.
1779
1780 2018-09-06  Simon Ser  <contact@emersion.fr>
1781
1782         PR gdb/23105
1783         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1784         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1785         * fbsd-tdep.c (fbsd_make_note_desc): New.
1786         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1787         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1788         * target.h (enum target_object) Add FreeBSD-specific
1789         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1790
1791 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1792
1793         * compile/compile-c.h (generate_c_for_variable_locations):
1794         Change reference to pointer.
1795         * compile/compile-c-support.c (compile_program) <compute>:
1796         Likewise.
1797         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1798         (generate_c_for_for_one_variable): Likewise
1799         (generate_c_for_variable_locations): Likewise
1800         * compile/compile-c-types.c (compile_c_instance::convert_type):
1801         Likewise
1802         * compile/compile-cplus-symbols.c (convert_one_symbol):
1803         std::move the scope passed to enter_scope.
1804         * compile/compile-cplus-types.c
1805         (compile_cplus_instance::enter_scope): Make parameter
1806         rvalue-reference.
1807         (compile_cplus_instance::new_scope): Change reference to
1808         pointer.
1809         (compile_cplus_instance::convert_type): Likewise
1810         (compile_cplus_convert_typedef): std::move the scope passed to
1811         enter_scope.
1812         (compile_cplus_convert_struct_or_union): Likewise.
1813         (compile_cplus_convert_enum): Likewise.
1814         (compile_cplus_convert_namespace): Likewise.
1815         * compile/compile-cplus.h (compile_cplus_instance)
1816         <enter_scope>: Make parameter rvalue-reference.
1817         * compile/compile-internal.h (compile_instance)
1818         <get_cached_type>: Likewise
1819         * compile/compile-loc2c.c (push): Likewise
1820         (pushf): Likewise
1821         (unary): Likewise
1822         (binary): Likewise
1823         (print_label): Likewise
1824         (pushf_register_address): Likewise
1825         (pushf_register): Likewise
1826         (do_compile_dwarf_expr_to_c): Likewise
1827         (compile_dwarf_expr_to_c): Likewise
1828         (compile_dwarf_bounds_to_c): Likewise
1829         * compile/compile.c (compile_instance::get_cached_type):
1830         Likewise
1831         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1832         (compile_dwarf_bounds_to_c): Likewise
1833         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1834         (dwarf2_compile_property_to_c): Likewise
1835         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1836         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1837         Likewise
1838
1839 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1840
1841         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1842         * tui/tui-data.c (init_content_element): Don't initialize it.
1843
1844 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1845
1846         * tui/tui-data.h (struct tui_win_info)
1847         <detail::opaque>: Remove.
1848         * tui/tui-data.c (init_win_info): Remove assignment.
1849
1850 2018-09-05  Tom Tromey  <tom@tromey.com>
1851
1852         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1853         -Wformat-nonliteral.
1854         * target-float.c (host_float_ops<T>::to_string)
1855         (host_float_ops<T>::from_string): Use
1856         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1857         * configure: Rebuild.
1858
1859 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1860
1861         * printcmd.c (printf_c_string): Use
1862         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1863         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1864
1865 2018-09-05  Tom Tromey  <tom@tromey.com>
1866
1867         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1868
1869 2018-09-05  Tom de Vries  <tdevries@suse.de>
1870
1871         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1872         with resolve_abstract_p == true.
1873         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1874         defaulting to false. Propagate resolve_abstract_p to
1875         dwarf2_fetch_die_loc_sect_off.
1876         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1877         parameter, defaulting to false.
1878         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1879         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1880         parameter.
1881         * dwarf2read.h (struct die_info): Forward-declare.
1882         (die_info_ptr): New typedef.
1883         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1884
1885 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1886
1887         GDB 8.2 released.
1888
1889 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1890             Pedro Alves  <palves@redhat.com>
1891
1892         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1893         "aclocal-m4-deps.mk".  Include file here.
1894         $(srcdir)/aclocal.m4: Add "configure.ac".
1895         * gnulib/aclocal-m4-deps.mk: New file.
1896         * gnulib/update-gnulib.sh: Automatically update
1897         "aclocal-m4-deps.mk".
1898
1899 2018-09-04  Tom Tromey  <tom@tromey.com>
1900
1901         * configure: Rebuild.
1902         * configure.ac: Remove multi-ice code.
1903
1904 2018-09-04  Tom Tromey  <tom@tromey.com>
1905
1906         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1907         (ada-exp.o): Update.
1908
1909 2018-09-04  Tom Tromey  <tom@tromey.com>
1910
1911         * Makefile.in (printcmd.o, target-float.o): Remove.
1912         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1913
1914 2018-09-04  Tom Tromey  <tom@tromey.com>
1915
1916         * gnulib/Makefile.in: Remove obsolete comment.
1917         * Makefile.in: Remove obsolete comment.
1918
1919 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1920
1921         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1922         line with '+'.
1923
1924 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1925
1926         * riscv-tdep.c: Add 'prologue-value.h' include.
1927         (struct riscv_unwind_cache): New struct.
1928         (riscv_debug_unwinder): New global.
1929         (riscv_scan_prologue): Update arguments, capture register details
1930         from prologue scan.
1931         (riscv_skip_prologue): Reformat arguments line, move end of
1932         prologue calculation into riscv_scan_prologue.
1933         (riscv_frame_cache): Update return type, create
1934         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1935         details.
1936         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1937         (riscv_frame_prev_register): Use the trad_frame within the
1938         riscv_unwind_cache.
1939         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1940         flag.
1941
1942 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1943
1944         * trad-frame.h (trad_frame_set_realreg): Declare.
1945         (trad_frame_set_addr): Declare.
1946         * trad-frame.c (trad_frame_set_realreg): Define new function.
1947         (trad_frame_set_addr): Define new function.
1948         (trad_frame_set_reg_realreg): Use new function.
1949         (trad_frame_set_reg_addr): Use new function.
1950
1951 2018-09-01  Keith Seitz  <keiths@redhat.com>
1952
1953         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1954         pulongest instead of "%lld".
1955         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1956         ATTRIBUTE_UNUSED.
1957
1958 2018-08-31  Tom Tromey  <tom@tromey.com>
1959
1960         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1961         variant part type.
1962
1963 2018-08-31  Pedro Alves  <palves@redhat.com>
1964
1965         * gdbarch.h: Regenerate.
1966
1967 2018-08-31  Pedro Alves  <palves@redhat.com>
1968
1969         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1970         * target.h (Hardware watchpoint interfaces): Describe
1971         continuable/steppable/non-steppable watchpoints.
1972         * gdbarch.h, gdbarch.c: Regenerate.
1973
1974 2018-08-31  Pedro Alves  <palves@redhat.com>
1975
1976         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1977         Delete.
1978         * s390-linux-nat.c
1979         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1980         * target.h (target_ops::have_continuable_watchpoint): Delete.
1981         (target_have_continuable_watchpoint): Delete.
1982         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1983         * target-delegates.c: Regenerate.
1984
1985 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1986
1987         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1988         the files present in "gnulib/import/m4/".
1989
1990 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1991
1992         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1993         c.sw, c.swsp, and c.sdsp.
1994
1995 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1996
1997         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1998         (riscv_read_misa_reg): Don't cache value read into inferior data.
1999         (riscv_new_inferior_data): Delete.
2000         (riscv_inferior_data_cleanup): Delete.
2001         (riscv_inferior_data): Delete.
2002         (riscv_invalidate_inferior_data): Delete.
2003         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2004
2005 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2006
2007         * compile/compile-cplus-types.c
2008         (compile_cplus_instance::leave_scope): Take the address of scope
2009         object.
2010         (compile_cplus_instance::convert_qualified_base): Compare quals
2011         to 0.
2012
2013 2018-08-30  Keith Seitz  <keiths@redhat.com>
2014
2015         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2016         Use "%s" and host_address_to_string instead of "%p" in printf.
2017
2018 2018-08-29  Keith Seitz  <keiths@redhat.com>
2019
2020         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2021         and compile-cplus-types.c.
2022         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2023         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2024         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2025         Declare.
2026         * compile/compile-c-support.c: Include compile-cplus.h.
2027         (load_libcompile): Templatize.
2028         (get_compile_context): "New" function.
2029         (c_get_compile_context): Use get_compile_context.
2030         (cplus_get_compile_context): New function.
2031         (cplus_push_user_expression, cplus_pop_user_expression)
2032         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2033         (cplus_compute_program): Define new structs/functions.
2034         * compile/compile-cplus-symmbols.c: New file.
2035         * compile/compile-cplus-types.c: New file.
2036         * compile/compile-cplus.h: New file.
2037         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2038         Declare.
2039         * compile/compile-object-load.c (get_out_value_type): Use
2040         strncmp_iw when comparing symbol names.
2041         (compile_object_load): Add mst_bss and mst_data.
2042         * compile/compile.c (_initialize_compile): Remove
2043         -Wno-implicit-function-declaration from `compile_args'.
2044         * compile/gcc-cp-plugin.h: New file.
2045         * NEWS: Mention C++ compile support and new debug options.
2046
2047 2018-08-29  Keith Seitz  <keiths@redhat.com>
2048
2049         * linespec.c (collect_info::add_symbol): Make virtual.
2050         (struct symbol_searcher_collect_info): New struct.
2051         (symbol_searcher::find_all_symbols): New method.
2052         * symtab.h (class symbol_searcher): New class.
2053
2054 2018-08-29  Keith Seitz  <keiths@redhat.com>
2055
2056         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2057         Change to vector of block_symbol.  Update all users.
2058         (struct collect_info) <symbols>: Likewise.
2059         (collect_info::add_symbol): Take block_symbol as argument.
2060         Update all callers.
2061         (decode_compound_collector) <m_symbols>: Change type to vector
2062         of block_symbol.  Update all users.
2063         (decode_compound_collector::operator ()): Change parameter type
2064         to block_symbol.
2065         (find_method, find_function_symbols, find_linespec_symbols)
2066         (find_label_symbols_in_block, find_label_symbols): Change symbol
2067         vectors to block_symbol vectors.
2068         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2069         block_symbol.
2070
2071 2018-08-29  Keith Seitz  <keiths@redhat.com>
2072
2073         * linespec.c (symbolp): Remove typedef and VEC definitions.
2074         (bound_minimal_symbol_d): Likewise.
2075
2076 2018-08-29  Keith Seitz  <keiths@redhat.com>
2077
2078         * linespec.c (decode_compound_collector::decode_compound_collector):
2079         Remove initialization for `m_symtabs'.
2080         (decode_compound_collector::release_symbols): Change return type
2081         to std::vector.  Update all callers.
2082         (class decode_compound_collector) <m_symbols>: Change type to
2083         std::vector.
2084         (lookup_prefix_sym): Change return type to std::vector.  Update all
2085         callers.
2086         (compare_symbols): Remove.
2087         (std_compare_symbols): Rename to `compare_symbols'.
2088         (find_method): Change `sym_classes' parameter to std::vector.
2089         Update all callers.  Use std::sort to sort sym_classes.
2090         (find_linespec_symbols): Remove cleanup.
2091
2092 2018-08-29  Keith Seitz  <keiths@redhat.com>
2093
2094         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2095         std::vector.  Update all users.
2096         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2097         (struct collect_info) <minimal_symbols>: Likewise.
2098         (compare_msymbols): Return bool.  Change parameters to const
2099         bound_minimal_symbol references.
2100         (find_method, find_function_symbols, find_linespec_symbols): Change
2101         `minsyms' parameter to std::vector.  Update all callers.
2102
2103 2018-08-29  Keith Seitz  <keiths@redhat.com>
2104
2105         * linespec.c (struct linespec) <label_symbols>: Change type to
2106         std::vector.  Update all users.
2107         (find_label_symbols_in_block): Change `result' parameter to
2108         std::vector.  Update all callers.
2109         (find_label_symbols): Return std::vector.  Update all callers.
2110
2111 2018-08-29  Keith Seitz  <keiths@redhat.com>
2112
2113         * linespec.c (struct linespec) <function_symbols>: Change type to
2114         std::vector.  Update all users.
2115         (struct collect_info) <function_symbols>: Likewise.
2116         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2117         (std_compare_symbols): New function.
2118         (find_method, find_function_symbols, find_linespec_symbols)
2119         (find_label_symbols_in_block): Change `symbols' parameter to
2120         std::vector.  Update all callers.
2121         (find_label_symbols): Likewise for `function_symbols' and
2122         `label_funcs_ret'.
2123
2124 2018-08-29  Keith Seitz  <keiths@redhat.com>
2125
2126         * linespec.c (symtab_vector_up): Define.
2127         (struct linespec) <file_symtabs>: Change type to std::vector *.
2128         Update all uses.
2129         (struct collect_info) <file_symtabs>: Likewise.
2130         (collect_symtabs_from_filename): Return symtab_vector_up.
2131         Update all callers.
2132         (decode_objc): Remove cleanup.
2133         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2134         (symtab_collector::release_symtabs): Return symtab_vector_up.
2135         Update all callers.
2136         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2137         Update all users.
2138         (collect_symtabs_from_filename, symtabs_from_filename): Return
2139         symtab_vector_up.  Update all callers.
2140
2141 2018-08-29  Tom Tromey  <tom@tromey.com>
2142
2143         * csky-tdep.c (csky_analyze_prologue): Use
2144         core_addr_to_string_nz.
2145
2146 2018-08-29  Tom Tromey  <tom@tromey.com>
2147
2148         * windows-nat.c (struct xlate_exception) <them>: Change type to
2149         DWORD.
2150         (xlate): Fix formatting.  Remove last entry.
2151         (struct xlate_exception, xlate): Comment out.
2152         (windows_nat_target::resume): Use ranged for.
2153
2154 2018-08-29  Jim Wilson  <jimw@sifive.com>
2155
2156         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2157         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2158         of NT_PRFPREG.
2159         (riscv_linux_nat_target::store_registers): Likewise.
2160
2161 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2162
2163         PR gdb/23555
2164         PR gdb/23558
2165         * gnulib/aclocal.m4: Regenerate.
2166         * gnulib/config.in: Regenerate.
2167         * gnulib/configure: Regenerate.
2168         * gnulib/import/Makefile.am: Update.
2169         * gnulib/import/Makefile.in: Update.
2170         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2171         * gnulib/import/_Noreturn.h: ... this.
2172         * gnulib/import/alloca.in.h: Update.
2173         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2174         * gnulib/import/arg-nonnull.h: ... this.
2175         * gnulib/import/assure.h: Update.
2176         * gnulib/import/at-func.c: Update.
2177         * gnulib/import/basename-lgpl.c: Update.
2178         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2179         * gnulib/import/c++defs.h: ... this.
2180         * gnulib/import/canonicalize-lgpl.c: Update.
2181         * gnulib/import/cdefs.h: Update.
2182         * gnulib/import/chdir-long.c: Update.
2183         * gnulib/import/chdir-long.h: Update.
2184         * gnulib/import/cloexec.c: Update.
2185         * gnulib/import/cloexec.h: Update.
2186         * gnulib/import/close.c: Update.
2187         * gnulib/import/closedir.c: Update.
2188         * gnulib/import/config.charset: Update.
2189         * gnulib/import/dirent-private.h: Update.
2190         * gnulib/import/dirent.in.h: Update.
2191         * gnulib/import/dirfd.c: Update.
2192         * gnulib/import/dirname-lgpl.c: Update.
2193         * gnulib/import/dirname.h: Update.
2194         * gnulib/import/dosname.h: Update.
2195         * gnulib/import/dup-safer-flag.c: Update.
2196         * gnulib/import/dup-safer.c: Update.
2197         * gnulib/import/dup.c: Update.
2198         * gnulib/import/dup2.c: Update.
2199         * gnulib/import/errno.in.h: Update.
2200         * gnulib/import/error.c: Update.
2201         * gnulib/import/error.h: Update.
2202         * gnulib/import/exitfail.c: Update.
2203         * gnulib/import/exitfail.h: Update.
2204         * gnulib/import/extra/update-copyright: Update.
2205         * gnulib/import/fchdir.c: Update.
2206         * gnulib/import/fcntl.c: Update.
2207         * gnulib/import/fcntl.in.h: Update.
2208         * gnulib/import/fd-hook.c: Update.
2209         * gnulib/import/fd-hook.h: Update.
2210         * gnulib/import/fd-safer-flag.c: Update.
2211         * gnulib/import/fd-safer.c: Update.
2212         * gnulib/import/fdopendir.c: Update.
2213         * gnulib/import/filename.h: Update.
2214         * gnulib/import/filenamecat-lgpl.c: Update.
2215         * gnulib/import/filenamecat.h: Update.
2216         * gnulib/import/flexmember.h: Update.
2217         * gnulib/import/float+.h: Update.
2218         * gnulib/import/float.c: Update.
2219         * gnulib/import/float.in.h: Update.
2220         * gnulib/import/fnmatch.c: Update.
2221         * gnulib/import/fnmatch.in.h: Update.
2222         * gnulib/import/fnmatch_loop.c: Update.
2223         * gnulib/import/fpucw.h: Update.
2224         * gnulib/import/frexp.c: Update.
2225         * gnulib/import/frexpl.c: Update.
2226         * gnulib/import/fstat.c: Update.
2227         * gnulib/import/fstatat.c: Update.
2228         * gnulib/import/getcwd-lgpl.c: Update.
2229         * gnulib/import/getcwd.c: Update.
2230         * gnulib/import/getdtablesize.c: Update.
2231         * gnulib/import/getlogin_r.c: Update.
2232         * gnulib/import/getprogname.c: Update.
2233         * gnulib/import/getprogname.h: Update.
2234         * gnulib/import/gettext.h: Update.
2235         * gnulib/import/gettimeofday.c: Update.
2236         * gnulib/import/glob-libc.h: Update.
2237         * gnulib/import/glob.c: Update.
2238         * gnulib/import/glob.in.h: Update.
2239         * gnulib/import/glob_internal.h: Update.
2240         * gnulib/import/glob_pattern_p.c: Update.
2241         * gnulib/import/globfree.c: Update.
2242         * gnulib/import/hard-locale.c: Update.
2243         * gnulib/import/hard-locale.h: Update.
2244         * gnulib/import/intprops.h: Update.
2245         * gnulib/import/inttypes.in.h: Update.
2246         * gnulib/import/isnan.c: Update.
2247         * gnulib/import/isnand-nolibm.h: Update.
2248         * gnulib/import/isnand.c: Update.
2249         * gnulib/import/isnanl-nolibm.h: Update.
2250         * gnulib/import/isnanl.c: Update.
2251         * gnulib/import/itold.c: Update.
2252         * gnulib/import/libc-config.h: Update.
2253         * gnulib/import/limits.in.h: Update.
2254         * gnulib/import/localcharset.c: Update.
2255         * gnulib/import/localcharset.h: Update.
2256         * gnulib/import/localtime-buffer.c: Update.
2257         * gnulib/import/localtime-buffer.h: Update.
2258         * gnulib/import/lstat.c: Update.
2259         * gnulib/import/m4/00gnulib.m4: Update.
2260         * gnulib/import/m4/__inline.m4: Update.
2261         * gnulib/import/m4/absolute-header.m4: Update.
2262         * gnulib/import/m4/alloca.m4: Update.
2263         * gnulib/import/m4/builtin-expect.m4: Update.
2264         * gnulib/import/m4/canonicalize.m4: Update.
2265         * gnulib/import/m4/chdir-long.m4: Update.
2266         * gnulib/import/m4/close.m4: Update.
2267         * gnulib/import/m4/closedir.m4: Update.
2268         * gnulib/import/m4/configmake.m4: Update.
2269         * gnulib/import/m4/d-ino.m4: Update.
2270         * gnulib/import/m4/d-type.m4: Update.
2271         * gnulib/import/m4/dirent_h.m4: Update.
2272         * gnulib/import/m4/dirfd.m4: Update.
2273         * gnulib/import/m4/dirname.m4: Update.
2274         * gnulib/import/m4/double-slash-root.m4: Update.
2275         * gnulib/import/m4/dup.m4: Update.
2276         * gnulib/import/m4/dup2.m4: Update.
2277         * gnulib/import/m4/eealloc.m4: Update.
2278         * gnulib/import/m4/environ.m4: Update.
2279         * gnulib/import/m4/errno_h.m4: Update.
2280         * gnulib/import/m4/error.m4: Update.
2281         * gnulib/import/m4/exponentd.m4: Update.
2282         * gnulib/import/m4/exponentl.m4: Update.
2283         * gnulib/import/m4/extensions.m4: Update.
2284         * gnulib/import/m4/extern-inline.m4: Update.
2285         * gnulib/import/m4/fchdir.m4: Update.
2286         * gnulib/import/m4/fcntl-o.m4: Update.
2287         * gnulib/import/m4/fcntl.m4: Update.
2288         * gnulib/import/m4/fcntl_h.m4: Update.
2289         * gnulib/import/m4/fdopendir.m4: Update.
2290         * gnulib/import/m4/filenamecat.m4: Update.
2291         * gnulib/import/m4/flexmember.m4: Update.
2292         * gnulib/import/m4/float_h.m4: Update.
2293         * gnulib/import/m4/fnmatch.m4: Update.
2294         * gnulib/import/m4/fnmatch_h.m4: Update.
2295         * gnulib/import/m4/fpieee.m4: Update.
2296         * gnulib/import/m4/frexp.m4: Update.
2297         * gnulib/import/m4/frexpl.m4: Update.
2298         * gnulib/import/m4/fstat.m4: Update.
2299         * gnulib/import/m4/fstatat.m4: Update.
2300         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2301         * gnulib/import/m4/getcwd-path-max.m4: Update.
2302         * gnulib/import/m4/getcwd.m4: Update.
2303         * gnulib/import/m4/getdtablesize.m4: Update.
2304         * gnulib/import/m4/getlogin.m4: Update.
2305         * gnulib/import/m4/getlogin_r.m4: Update.
2306         * gnulib/import/m4/getpagesize.m4: Update.
2307         * gnulib/import/m4/getprogname.m4: Update.
2308         * gnulib/import/m4/gettimeofday.m4: Update.
2309         * gnulib/import/m4/glibc21.m4: Update.
2310         * gnulib/import/m4/glob.m4: Update.
2311         * gnulib/import/m4/glob_h.m4: Update.
2312         * gnulib/import/m4/gnulib-cache.m4: Update.
2313         * gnulib/import/m4/gnulib-common.m4: Update.
2314         * gnulib/import/m4/gnulib-comp.m4: Update.
2315         * gnulib/import/m4/gnulib-tool.m4: Update.
2316         * gnulib/import/m4/hard-locale.m4: Update.
2317         * gnulib/import/m4/include_next.m4: Update.
2318         * gnulib/import/m4/inttypes-pri.m4: Update.
2319         * gnulib/import/m4/inttypes.m4: Update.
2320         * gnulib/import/m4/isnand.m4: Update.
2321         * gnulib/import/m4/isnanl.m4: Update.
2322         * gnulib/import/m4/largefile.m4: Update.
2323         * gnulib/import/m4/limits-h.m4: Update.
2324         * gnulib/import/m4/localcharset.m4: Update.
2325         * gnulib/import/m4/locale-fr.m4: Update.
2326         * gnulib/import/m4/locale-ja.m4: Update.
2327         * gnulib/import/m4/locale-zh.m4: Update.
2328         * gnulib/import/m4/localtime-buffer.m4: Update.
2329         * gnulib/import/m4/longlong.m4: Update.
2330         * gnulib/import/m4/lstat.m4: Update.
2331         * gnulib/import/m4/malloc.m4: Update.
2332         * gnulib/import/m4/malloca.m4: Update.
2333         * gnulib/import/m4/math_h.m4: Update.
2334         * gnulib/import/m4/mbrtowc.m4: Update.
2335         * gnulib/import/m4/mbsinit.m4: Update.
2336         * gnulib/import/m4/mbsrtowcs.m4: Update.
2337         * gnulib/import/m4/mbstate_t.m4: Update.
2338         * gnulib/import/m4/memchr.m4: Update.
2339         * gnulib/import/m4/memmem.m4: Update.
2340         * gnulib/import/m4/mempcpy.m4: Update.
2341         * gnulib/import/m4/memrchr.m4: Update.
2342         * gnulib/import/m4/mkdir.m4: Update.
2343         * gnulib/import/m4/mkstemp.m4: Update.
2344         * gnulib/import/m4/mmap-anon.m4: Update.
2345         * gnulib/import/m4/mode_t.m4: Update.
2346         * gnulib/import/m4/msvc-inval.m4: Update.
2347         * gnulib/import/m4/msvc-nothrow.m4: Update.
2348         * gnulib/import/m4/multiarch.m4: Update.
2349         * gnulib/import/m4/nocrash.m4: Update.
2350         * gnulib/import/m4/off_t.m4: Update.
2351         * gnulib/import/m4/onceonly.m4: Update.
2352         * gnulib/import/m4/open-cloexec.m4: Update.
2353         * gnulib/import/m4/open.m4: Update.
2354         * gnulib/import/m4/openat.m4: Update.
2355         * gnulib/import/m4/opendir.m4: Update.
2356         * gnulib/import/m4/pathmax.m4: Update.
2357         * gnulib/import/m4/rawmemchr.m4: Update.
2358         * gnulib/import/m4/readdir.m4: Update.
2359         * gnulib/import/m4/readlink.m4: Update.
2360         * gnulib/import/m4/realloc.m4: Update.
2361         * gnulib/import/m4/rename.m4: Update.
2362         * gnulib/import/m4/rewinddir.m4: Update.
2363         * gnulib/import/m4/rmdir.m4: Update.
2364         * gnulib/import/m4/save-cwd.m4: Update.
2365         * gnulib/import/m4/secure_getenv.m4: Update.
2366         * gnulib/import/m4/setenv.m4: Update.
2367         * gnulib/import/m4/signal_h.m4: Update.
2368         * gnulib/import/m4/ssize_t.m4: Update.
2369         * gnulib/import/m4/stat-time.m4: Update.
2370         * gnulib/import/m4/stat.m4: Update.
2371         * gnulib/import/m4/std-gnu11.m4: Update.
2372         * gnulib/import/m4/stdbool.m4: Update.
2373         * gnulib/import/m4/stddef_h.m4: Update.
2374         * gnulib/import/m4/stdint.m4: Update.
2375         * gnulib/import/m4/stdio_h.m4: Update.
2376         * gnulib/import/m4/stdlib_h.m4: Update.
2377         * gnulib/import/m4/strchrnul.m4: Update.
2378         * gnulib/import/m4/strdup.m4: Update.
2379         * gnulib/import/m4/strerror.m4: Update.
2380         * gnulib/import/m4/string_h.m4: Update.
2381         * gnulib/import/m4/strstr.m4: Update.
2382         * gnulib/import/m4/strtok_r.m4: Update.
2383         * gnulib/import/m4/sys_socket_h.m4: Update.
2384         * gnulib/import/m4/sys_stat_h.m4: Update.
2385         * gnulib/import/m4/sys_time_h.m4: Update.
2386         * gnulib/import/m4/sys_types_h.m4: Update.
2387         * gnulib/import/m4/tempname.m4: Update.
2388         * gnulib/import/m4/time_h.m4: Update.
2389         * gnulib/import/m4/unistd-safer.m4: Update.
2390         * gnulib/import/m4/unistd_h.m4: Update.
2391         * gnulib/import/m4/warn-on-use.m4: Update.
2392         * gnulib/import/m4/wchar_h.m4: Update.
2393         * gnulib/import/m4/wchar_t.m4: Update.
2394         * gnulib/import/m4/wctype_h.m4: Update.
2395         * gnulib/import/m4/wint_t.m4: Update.
2396         * gnulib/import/malloc.c: Update.
2397         * gnulib/import/malloc/scratch_buffer.h: Update.
2398         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2399         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2400         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2401         * gnulib/import/malloca.c: Update.
2402         * gnulib/import/malloca.h: Update.
2403         * gnulib/import/malloca.valgrind: Update.
2404         * gnulib/import/math.in.h: Update.
2405         * gnulib/import/mbrtowc.c: Update.
2406         * gnulib/import/mbsinit.c: Update.
2407         * gnulib/import/mbsrtowcs-impl.h: Update.
2408         * gnulib/import/mbsrtowcs-state.c: Update.
2409         * gnulib/import/mbsrtowcs.c: Update.
2410         * gnulib/import/memchr.c: Update.
2411         * gnulib/import/memmem.c: Update.
2412         * gnulib/import/mempcpy.c: Update.
2413         * gnulib/import/memrchr.c: Update.
2414         * gnulib/import/mkdir.c: Update.
2415         * gnulib/import/mkstemp.c: Update.
2416         * gnulib/import/msvc-inval.c: Update.
2417         * gnulib/import/msvc-inval.h: Update.
2418         * gnulib/import/msvc-nothrow.c: Update.
2419         * gnulib/import/msvc-nothrow.h: Update.
2420         * gnulib/import/open.c: Update.
2421         * gnulib/import/openat-die.c: Update.
2422         * gnulib/import/openat-priv.h: Update.
2423         * gnulib/import/openat-proc.c: Update.
2424         * gnulib/import/openat.c: Update.
2425         * gnulib/import/openat.h: Update.
2426         * gnulib/import/opendir.c: Update.
2427         * gnulib/import/pathmax.h: Update.
2428         * gnulib/import/pipe-safer.c: Update.
2429         * gnulib/import/rawmemchr.c: Update.
2430         * gnulib/import/readdir.c: Update.
2431         * gnulib/import/readlink.c: Update.
2432         * gnulib/import/realloc.c: Update.
2433         * gnulib/import/ref-add.sin: Update.
2434         * gnulib/import/ref-del.sin: Update.
2435         * gnulib/import/rename.c: Update.
2436         * gnulib/import/rewinddir.c: Update.
2437         * gnulib/import/rmdir.c: Update.
2438         * gnulib/import/same-inode.h: Update.
2439         * gnulib/import/save-cwd.c: Update.
2440         * gnulib/import/save-cwd.h: Update.
2441         * gnulib/import/scratch_buffer.h: Update.
2442         * gnulib/import/secure_getenv.c: Update.
2443         * gnulib/import/setenv.c: Update.
2444         * gnulib/import/signal.in.h: Update.
2445         * gnulib/import/stat-time.c: Update.
2446         * gnulib/import/stat-time.h: Update.
2447         * gnulib/import/stat-w32.c: Update.
2448         * gnulib/import/stat-w32.h: Update.
2449         * gnulib/import/stat.c: Update.
2450         * gnulib/import/stdbool.in.h: Update.
2451         * gnulib/import/stddef.in.h: Update.
2452         * gnulib/import/stdint.in.h: Update.
2453         * gnulib/import/stdio.in.h: Update.
2454         * gnulib/import/stdlib.in.h: Update.
2455         * gnulib/import/str-two-way.h: Update.
2456         * gnulib/import/strchrnul.c: Update.
2457         * gnulib/import/strdup.c: Update.
2458         * gnulib/import/streq.h: Update.
2459         * gnulib/import/strerror-override.c: Update.
2460         * gnulib/import/strerror-override.h: Update.
2461         * gnulib/import/strerror.c: Update.
2462         * gnulib/import/string.in.h: Update.
2463         * gnulib/import/stripslash.c: Update.
2464         * gnulib/import/strnlen1.c: Update.
2465         * gnulib/import/strnlen1.h: Update.
2466         * gnulib/import/strstr.c: Update.
2467         * gnulib/import/strtok_r.c: Update.
2468         * gnulib/import/sys_stat.in.h: Update.
2469         * gnulib/import/sys_time.in.h: Update.
2470         * gnulib/import/sys_types.in.h: Update.
2471         * gnulib/import/tempname.c: Update.
2472         * gnulib/import/tempname.h: Update.
2473         * gnulib/import/time.in.h: Update.
2474         * gnulib/import/unistd--.h: Update.
2475         * gnulib/import/unistd-safer.h: Update.
2476         * gnulib/import/unistd.in.h: Update.
2477         * gnulib/import/unsetenv.c: Update.
2478         * gnulib/import/verify.h: Update.
2479         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2480         * gnulib/import/wchar.in.h: Update.
2481         * gnulib/import/wctype.in.h: Update.
2482         * gnulib/import/xalloc-oversized.h: Update.
2483         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2484         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2485
2486 2018-08-16  Gary Benson <gbenson@redhat.com>
2487
2488         PR gdb/13000:
2489         * gdb/main.c (captured_main_1): Exit with nonzero status
2490         in batch mode if the last command to be executed failed.
2491         * NEWS: Mention the above.
2492
2493 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2494
2495         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2496         end of warning message.
2497
2498 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2499
2500         PR gdb/22943:
2501         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2502         (aarch64_extract_return_value): Use
2503         aapcs_is_vfp_call_or_return_candidate.
2504         (aarch64_return_in_memory): Likewise.
2505         (aarch64_store_return_value): Likewise.
2506
2507 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2508
2509         * aarch64-tdep.c
2510         (aapcs_is_vfp_call_or_return_candidate): Make static
2511         (pass_in_v_or_stack): Remove function.
2512         (pass_in_v_vfp_candidate): New function.
2513         (aarch64_push_dummy_call): Check for float register candidates.
2514
2515 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2516
2517         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2518         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2519         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2520
2521 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2522
2523         PR build/23399
2524         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2525         (struct ipa_sym_addresses): Rename to...
2526         (struct ipa_sym_addresses_common): ... this.
2527         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2528
2529 2018-08-28  Tom Tromey  <tom@tromey.com>
2530
2531         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2532         (token_fifo): Now a std::vector.
2533         (yylex, c_parse): Update.
2534         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2535         (token_fifo): Now a std::vector.
2536         (yylex, d_parse): Update.
2537         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2538         (token_fifo): Now a std::vector.
2539         (yylex, go_parse): Update.
2540
2541 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2542
2543         * parser-defs.h (struct type_stack) <elements>: Change type to
2544         std::vector<union type_stack_elt>.
2545         <depth, size>: Remove.
2546         * parse.c (parse_exp_in_context_1): Adjust.
2547         (type_stack_reserve): Remove.
2548         (check_type_stack_depth): Remove.
2549         (insert_into_type_stack): Adjust to std::vector.
2550         (insert_type): Likewise.
2551         (push_type): Likewise.
2552         (push_type_int): Likewise.
2553         (insert_type_address_space): Likewise.
2554         (pop_type): Likewise.
2555         (pop_type_int): Likewise.
2556         (pop_typelist): Likewise.
2557         (pop_type_stack): Likewise.
2558         (append_type_stack): Likewise.
2559         (push_type_stack): Likewise.
2560         (get_type_stack): Likewise.
2561         (type_stack_cleanup): Likewise.
2562         (push_typelist): Likewise.
2563         (follow_types): Likewise.
2564         (_initialize_parse): Likewise.
2565
2566 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2567
2568         * NEWS: Mention csky target.
2569
2570 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2571             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2572             Don Breazeal  <donb@codesourcery.com>
2573
2574         * csky-linux-tdep.c: New file.
2575         * csky-tdep.c: Likewise.
2576         * csky-tdep.h: Likewise.
2577         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2578         csky-tdep.o.
2579         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2580         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2581         * configure.tgt: Add csky support.
2582
2583 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2584
2585         * python/py-framefilter.c (py_print_frame): Print frame architecture
2586         when printing on an MI output.
2587
2588 2018-08-27  Tom Tromey  <tom@tromey.com>
2589
2590         PR build/23087:
2591         * configure: Rebuild.
2592         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2593
2594 2018-08-27  Tom Tromey  <tom@tromey.com>
2595
2596         * aarch64-linux-tdep.c
2597         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2598         casts to int.
2599
2600 2018-08-27  Tom Tromey  <tom@tromey.com>
2601
2602         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2603         unsigned.
2604         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2605         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2606         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2607         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2608         unsigned.
2609
2610 2018-08-27  Tom Tromey  <tom@tromey.com>
2611
2612         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2613         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2614
2615 2018-08-27  Tom Tromey  <tom@tromey.com>
2616
2617         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2618         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2619         ULONGEST_MAX.
2620         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2621         ULONGEST_MAX.
2622         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2623         ULONGEST_MAX.
2624         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2625         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2626         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2627         ULONGEST_MAX.
2628         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2629         (ppc64_linux_sigaction_tramp_frame)
2630         (ppc32_linux_sighandler_tramp_frame)
2631         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2632         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2633         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2634         * mn10300-linux-tdep.c (am33_linux_sigframe)
2635         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2636         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2637         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2638         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2639         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2640         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2641         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2642         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2643         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2644         * microblaze-linux-tdep.c
2645         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2646         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2647         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2648         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2649         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2650         * common/common-types.h (ULONGEST_MAX): New define.
2651         (CORE_ADDR_MAX): Fix formatting.
2652         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2653         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2654         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2655         (arm_linux_rt_sigreturn_tramp_frame)
2656         (arm_eabi_linux_sigreturn_tramp_frame)
2657         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2658         (thumb2_eabi_linux_sigreturn_tramp_frame)
2659         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2660         (arm_linux_restart_syscall_tramp_frame)
2661         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2662         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2663         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2664         ULONGEST_MAX.
2665         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2666
2667 2018-08-27  Tom Tromey  <tom@tromey.com>
2668
2669         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2670         CORE_ADDR_MAX.
2671         * mips-tdep.c (mips_deal_with_atomic_sequence)
2672         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2673         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2674         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2675         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2676         CORE_ADDR_MAX.
2677         * aarch64-tdep.c (aarch64_software_single_step): Use
2678         CORE_ADDR_MAX.
2679
2680 2018-08-27  Tom Tromey  <tom@tromey.com>
2681
2682         * linespec.c (complete_linespec_component): Add cast to "char".
2683         * completer.c (completion_tracker::build_completion_result): Add
2684         cast to "char".
2685
2686 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2687
2688         * solist.h (struct solist, struct target_so_ops): Fix
2689         indentation.
2690
2691 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2692
2693         * ada-tasks.c (ada_task_info_s): Remove typedef.
2694         (DEF_VEC_O(ada_task_info_s)): Remove.
2695         (struct ada_tasks_inferior_data): Initialize fields.
2696         <task_list>: Make an std::vector.
2697         (get_ada_tasks_inferior_data): Allocate with new.
2698         (ada_get_task_number): Adjust.
2699         (get_task_number_from_id): Likewise.
2700         (valid_task_id): Likewise.
2701         (ada_get_task_info_from_ptid): Likewise.
2702         (iterate_over_live_ada_tasks): Likewise.
2703         (add_ada_task): Likewise.
2704         (read_known_tasks): Likewise.
2705         (ada_build_task_list): Likewise.
2706         (print_ada_task_info): Likewise.
2707         (info_task): Likewise.
2708         (task_command_1): Likewise.
2709
2710 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2711
2712         * ada-lang.c (add_angle_brackets): Return std::string.
2713
2714 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2715
2716         * python/py-threadevent.c (py_get_event_thread): Initialize
2717         pythread.
2718
2719 2018-08-24  Pedro Alves  <palves@redhat.com>
2720
2721         * python/py-bpevent.c (create_breakpoint_event_object): Use
2722         copy-initialization.
2723         * python/py-continueevent.c (emit_continue_event): Use
2724         copy-initialization.
2725         * python/py-exitedevent.c (create_exited_event_object): Return a
2726         gdbpy_ref<>.
2727         (emit_exited_event): Use copy-initialization.
2728         * python/py-inferior.c (python_new_inferior)
2729         (python_inferior_deleted, add_thread_object): Use
2730         copy-initialization.
2731         * python/py-infevents.c (create_inferior_call_event_object)
2732         (create_register_changed_event_object)
2733         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2734         (emit_inferior_call_event, emit_memory_changed_event)
2735         (emit_register_changed_event): Use copy-initialization.
2736         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2737         Return a gdbpy_ref<>.
2738         (emit_new_objfile_event): Use copy-initialization.
2739         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2740         (emit_clear_objfiles_event): Use copy-initialization.
2741         * python/py-signalevent.c (create_signal_event_object): Use
2742         copy-initialization.
2743         * python/py-threadevent.c (create_thread_event_object): Use
2744         copy-initialization.
2745
2746 2018-08-24  Pedro Alves  <palves@redhat.com>
2747             Simon Marchi  <simon.marchi@ericsson.com>
2748
2749         PR gdb/23379
2750         * python/py-continueevent.c: Include "gdbthread.h".
2751         (create_continue_event_object): Add intro comment.  Add 'ptid'
2752         parameter.  Use it to find thread to pass to
2753         create_thread_event_object.
2754         (emit_continue_event): Pass PTID down to
2755         create_continue_event_object.
2756         * python/py-event.h (py_get_event_thread): Declare.
2757         (create_thread_event_object): Remove default from 'thread'
2758         parameter.
2759         * python/py-stopevent.c (create_stop_event_object): Use
2760         py_get_event_thread.
2761         * python/py-threadevent.c (get_event_thread): Rename to ...
2762         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2763         and use it to find the thread.
2764         (create_thread_event_object): Assert that THREAD isn't null.
2765         Don't find the event thread here.
2766
2767 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2768
2769         * block.h (blockrange, blockranges): New struct declarations.
2770         (struct block): Add new field named `ranges'.
2771         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2772         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2773         macros for accessing ranges in struct block.
2774         (make_blockranges): New declaration.
2775         block.c (make_blockranges): New function.
2776         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2777         for block.
2778         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2779         * blockframe.c (cache_pc_function_block): New static global.
2780         (clear_pc_function_cache): Clear cache_pc_function_block.
2781         (find_pc_partial_function): Move comment to symtab.h.  Add
2782         support for non-contiguous blocks.
2783         * cli/cli-cmds.c (block.h): Include.
2784         (print_disassembly): Handle printing of non-contiguous blocks.
2785         (disassemble_current_function): Likewise.
2786         (disassemble_command): Likewise.
2787
2788         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2789         BLOCK_START.
2790         * blockframe.c (get_pc_function_start): Likewise.
2791         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2792         (gcc_symbol_address): Likewise.
2793         * compile/compile-object-run.c (compile_object_run): Likewise.
2794         * compile/compile.c (get_expr_block_and_pc): Likewise.
2795         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2796         (func_addr_to_tail_call_list): Likewise.
2797         * findvar.c (default_read_var_value): Likewise.
2798         * inline-frame.c (inline_frame_this_id): Likewise.
2799         (skip-inline_frames): Likewise.
2800         * infcmd.c (until_next_command): Likewise.
2801         * linespec.c (convert_linespec_to_sals): Likewise.
2802         * parse.c (parse_exp_in_context_1): Likewise.
2803         * printcmd.c (build_address_symbolic): likewise.
2804         (info_address_command): Likewise.
2805         symtab.c (find_function_start_sal): Likewise.
2806         (skip_prologue_sal): Likewise.
2807         (find_function_alias_target): Likewise.
2808         (find_gnu_ifunc): Likewise.
2809         * stack.c (find_frame_funname): Likewise.
2810         * symtab.c (fixup_symbol_section): Likewise.
2811         (find_function_start_sal): Likewise.
2812         (skip_prologue_sal): Likewsie.
2813         (find_function_alias_target): Likewise.
2814         (find_gnu_ifunc): Likewise.
2815         * tracepoint.c (info_scope_command): Likewise.
2816         * value.c (value_fn_field): Likewise.
2817
2818         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2819         in place of find_pc_partial_function.
2820         * blockframe.c (find_function_entry_range_from_pc): New function.
2821         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2822         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2823         for each range in a block.
2824
2825
2826 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2827
2828         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2829         incrementation.
2830
2831 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2832
2833         * solib-svr4.c (read_program_headers_from_bfd): Return
2834         gdb::optional<gdb::byte_vector>.
2835         (svr4_exec_displacement): Adjust.
2836
2837 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2838
2839         * solib-svr4.c (read_program_header): Return
2840         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2841         (find_program_interpreter): Return
2842         gdb::optional<gdb::byte_vector>.
2843         (scan_dyntag_auxv): Adjust.
2844         (enable_break): Adjust.
2845         (svr4_exec_displacement): Adjust.
2846
2847 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2848
2849         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2850         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2851
2852 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2853
2854         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2855         string_vprintf.
2856         * guile/scm-utils.c (gdbscm_printf): Likewise.
2857         * serial.c (serial_printf): Likewise.
2858         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2859
2860 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2861
2862         * stack.c (print_frame): Print frame architecture when printing on
2863         an MI output.
2864         * NEWS: Mention new "arch" attribute in frame output.
2865
2866 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2867
2868         * arch/aarch64.h (aarch64_regnum): Update comment.
2869
2870 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2871
2872         * NEWS: Add SVE to 8.2 section.
2873
2874 2018-08-21  Pedro Alves  <palves@redhat.com>
2875
2876         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2877         out from gdbscm_parse_function_args.
2878         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2879         gdbscm_parse_function_args_1.
2880
2881 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2882
2883         PR gdb/17816
2884         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2885         operator.
2886
2887 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2888
2889         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2890
2891 2018-08-19  Michael Spang  <spang@google.com>
2892
2893         PR gdb/11786
2894         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2895         for PT_TLS segments.
2896
2897 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2898
2899         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2900         dwarf_variable_value.
2901         * dwarf2-frame.c (class dwarf_expr_executor):
2902         Add override for dwarf_variable_value.
2903         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2904         (class symbol_needs_eval_context): Likewise.
2905         (indirect_synthetic_pointer): Add forward declaration.
2906         (sect_variable_value): New function.
2907         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2908         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2909         for DW_OP_GNU_variable_value.
2910
2911 2018-08-16  Tom Tromey  <tom@tromey.com>
2912
2913         * top.c (read_command_file): Update.
2914         (command_line_input): Remove "repeat" argument.
2915         * ada-lang.c (get_selections): Update.
2916         * linespec.c (decode_line_2): Update.
2917         * defs.h (command_line_input): Remove argument.
2918         * cli/cli-script.c (read_next_line): Update.
2919         * python/py-gdb-readline.c: Update.
2920
2921 2018-08-17  Tom Tromey  <tom@tromey.com>
2922
2923         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2924         command_line_input.
2925
2926 2018-08-15  Tom Tromey  <tom@tromey.com>
2927
2928         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2929
2930 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2931
2932         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2933         If used, use find_pc_partial_function to find address range
2934         to disassemble.
2935         * mi/mi-main.c (mi_cmd_list_features): Report
2936         "data-disassemble-a-option" feature.
2937         * NEWS: Mention new -data-disassemble option -a.
2938
2939 2018-08-13  Tom Tromey  <tom@tromey.com>
2940
2941         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2942
2943 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2944
2945         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2946         (aarch64_linux_collect_sve_regset): Likewise.
2947         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2948         * regcache.h (regcache_map_entry_size): New function.
2949
2950 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2951
2952         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2953         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2954         (SVE_HEADER_VL_LENGTH): Likewise.
2955         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2956         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2957         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2958         (SVE_HEADER_SIZE_OFFSET): Likewise.
2959         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2960         (SVE_HEADER_VL_OFFSET): Likewise.
2961         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2962         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2963         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2964         (SVE_HEADER_SIZE): Likewise.
2965         (aarch64_linux_core_read_vq): Add function.
2966         (aarch64_linux_core_read_description): Check for SVE section.
2967
2968 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2969
2970         * aarch64-fbsd-tdep.c
2971         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2972         collect_size.
2973         * aarch64-linux-tdep.c
2974         (aarch64_linux_iterate_over_regset_sections): Likewise.
2975         * alpha-linux-tdep.c
2976         (alpha_linux_iterate_over_regset_sections):
2977         * alpha-nbsd-tdep.c
2978         (alphanbsd_iterate_over_regset_sections): Likewise.
2979         * amd64-fbsd-tdep.c
2980         (amd64fbsd_iterate_over_regset_sections): Likewise.
2981         * amd64-linux-tdep.c
2982         (amd64_linux_iterate_over_regset_sections): Likewise.
2983         * arm-bsd-tdep.c
2984         (armbsd_iterate_over_regset_sections): Likewise.
2985         * arm-fbsd-tdep.c
2986         (arm_fbsd_iterate_over_regset_sections): Likewise.
2987         * arm-linux-tdep.c
2988         (arm_linux_iterate_over_regset_sections): Likewise.
2989         * corelow.c (get_core_registers_cb): Likewise.
2990         (core_target::fetch_registers): Likewise.
2991         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2992         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2993         * gdbarch.h (void): Regenerate.
2994         * gdbarch.sh: Add supply_size and collect_size.
2995         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2996         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2997         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2998         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2999         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3000         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3001         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3002         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3003         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3004         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3005         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3006         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3007         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3008         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3009         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3010         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3011         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3012         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3013         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3014         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3015         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3016         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3017         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3018         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3019         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3020         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3021         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3022         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3023         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3024         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3025
3026 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3027
3028         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3029         with string_printf.
3030
3031 2018-08-10  Keith Seitz  <keiths@redhat.com>
3032
3033         * compile/compile-c-support.c (add_code_header, add_code_footer):
3034         Move into policy class.
3035         (c_push_user_expression, pop_user_expression_nop)
3036         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3037         (compile_program): New host class.
3038         (c_compile_program): New typedef.
3039         (c_compute_porgram): Use c_compile_program.
3040
3041 2018-08-10  Keith Seitz  <keiths@redhat.com>
3042
3043         * compile/compile-internal.h (compile_instance::~compile_instance):
3044         Remove calls to htab_delete.
3045         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3046         * compile.c (compile_instance::compile_instance): Initialize
3047         htab unique pointers.
3048         (compile_instance::get_cached_type, compile_instance::insert_type)
3049         (compile_instance::error_symbol_once): Update for unique_ptr.
3050
3051 2018-08-10  Keith Seitz  <keiths@redhat.com>
3052
3053         * compile/compile-c-symbols.c (struct symbol_error)
3054         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3055         (compile_instance::insert_symbol_error)
3056         (compile_instance::error_symbol_once): Move to ...
3057         * compile/compile.c: ... here.
3058
3059 2018-08-10  Keith Seitz  <keiths@redhat.com>
3060
3061         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3062         instead of `new_compile_instance'.
3063         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3064         Update description.
3065         If the symbol error map is not initialized, create it.
3066         (generate_c_for_for_one_symbol): Do not check/initialize
3067         the symbol error map.
3068         * compile/compile-c-types.c (compile_c_instance): Make a class.
3069         Update all callers.
3070         (compile_instance::compile_instance): Initialize the type cache.
3071         (get_cached_type): New function.
3072         (insert_type): Update description.
3073         (compile_c_instance::m_default_cflags): Define.
3074         (convert_type): Update description.  Use get_cached_type.
3075         (delete_instance): Moved to destructor.
3076         (new_compile_instance): Moved to constructor.
3077         * compile/compile-c.h (compile_c_instance): Make class inheriting
3078         from compile_instance.
3079         <base>: Remove field.
3080         <type_map, symbol_err_map>: Move to base class.
3081         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3082         * compile/compile-internal.h (compile_instance): Make class.
3083         <type_map_t, symbol_err_map_t>: Define.
3084         <fe>: Rename to `m_gcc_fe'.
3085         <scope, block, gcc_target_options>: Add `m_' prefix.
3086         <m_type_map, m_symbol_err_map>: New fields, moved from
3087         compile_c_instance.
3088         <destroy>: Remove.
3089         (convert_type, new_compile_instance): Remove.
3090         * compile/compile.c (cleanup_compile_instance): Remove.
3091         (compile_to_object): Use unique_ptr to eliminate cleanups.
3092         (compile_instance::set_print_callback, compile_instance::version)
3093         (compile_instance::set_verbose)
3094         (compile_instance::set_driver_filename)
3095         (compile_instance::set_triplet_regexp)
3096         (compile_instance::set_arguments)
3097         (compile_instance::set_source_file)
3098         (compile_instance::compile): Define.
3099
3100 2018-08-10  Keith Seitz  <keiths@redhat.com>
3101
3102         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3103         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3104         gcc-c-fe.def to define C plugin.
3105         (delete_instance): Delete `c_plugin'.
3106         (new_compile_instance): Initialize `c_plugin'.
3107         * compile/compile-c.h: Include gcc_c_plugin.h.
3108         (struct compile_c_instance) <c_plugin>: New member.
3109         * gcc-c-plugin.h: New file.
3110         Update all callers with API change.
3111
3112 2018-08-10  Keith Seitz  <keiths@redhat.com>
3113
3114         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3115         (HFILES_NO_SRCDIR): ... to here.
3116         Add compile-internal.h and compile-c.h.
3117         * compile/compile-c-support.c: Include compile-c.h.
3118         * compile/compile-c-symbols.c: Include compile-c.h.
3119         (generate_c_for_variable_locations): Update comment.
3120         * compile/compile-c-types.c: Include compile-c.h.
3121         * compile/compile-c.h: New file -- moved C language declarations
3122         from other files here.
3123         * compile/compile-internal.h: Do not include hashtab.h or
3124         common/enum-flags.h.
3125         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3126         (gcc_convert_symbol, gcc_symbol_address)
3127         (generate_c_for_variable_locations, c_get_mode_for_size)
3128         (c_get_range_decl_name): Definitions moved to compile-c.h.
3129         * compile/compile-loc2c.c: Include compile-c.h.
3130
3131 2018-08-10  Keith Seitz  <keiths@redhat.com>
3132
3133         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3134         (c_symbol_substitution_name): ... this.
3135         Update all callers.
3136
3137 2018-08-10  Keith Seitz  <keiths@redhat.com>
3138
3139         * compile/compile-c-support.c (c_compute_program): Use
3140         unique_xmalloc_ptr to eliminate cleanup.
3141         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3142         Return a unique_xmalloc_ptr and eliminate cleanup.
3143         * compile/compile-internal.h (generate_c_for_variable_locations):
3144         Return unique_xmalloc_ptr and update description.
3145
3146 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3147
3148         * corelow.c (core_target::get_core_register_section): Rename
3149         min_size to section_min_size.
3150
3151 2018-08-09  Jim Wilson  <jimw@sifive.com>
3152
3153         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3154         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3155         * NEWS: Mention new GNU/Linux RISC-V target.
3156         * configure.host: Add riscv*-*-linux*.
3157         * configure.nat: Add riscv*.
3158         * configure.tgt: Add riscv*-*-linux*.
3159         * riscv-linux-nat.c: New file.
3160         * riscv-linux-tdep.c: New file.
3161
3162 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3163
3164         * infrun.c (resume): Make static, add forward declaration.
3165         (proceed): Update header comment.
3166         * infrun.h (resume): Delete declaration.
3167
3168 2018-08-09  Tom Tromey  <tom@tromey.com>
3169
3170         * riscv-tdep.h: Minor formatting fixes.
3171
3172 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3173
3174         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3175         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3176         (test_mkdir_recursive): Likewise.
3177         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3178
3179 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3180
3181         * valarith.c (value_subscripted_rvalue): If an array is not in
3182         memory, and we don't know the upper bound, then we can't know that
3183         the requested element exists or not.
3184
3185 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3186
3187         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3188         (target_options_to_string): Add comment.
3189
3190 2018-08-08  Tom Tromey  <tom@tromey.com>
3191
3192         * unittests/scoped_mmap-selftests.c: Check result of "write".
3193
3194 2018-08-08  Jim Wilson  <jimw@sifive.com>
3195
3196         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3197         (decode_register_index_short): New.
3198         (decode_j_type_insn, decode_cj_type_insn): New.
3199         (decode_b_type_insn, decode_cb_type_insn): New.
3200         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3201         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3202         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3203         is_c_sw_insn instead of is_sw_insn.
3204         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3205         (riscv_software_single_step): New.
3206         * riscv-tdep.h (riscv_software_single_step): Declare.
3207
3208         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3209         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3210
3211 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3212
3213         PR gdb/18050:
3214         * target.c (dispose_inferior): Don't dispose of inferiors that are
3215         already killed.
3216
3217 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3218
3219         * remote.c (remote_target::download_tracepoint): Change char* to
3220         const char*.
3221
3222 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3223
3224         * target.h (target_options_to_string): Return an std::string.
3225         * target.c (str_comma_list_concat_elem): Return void, use
3226         std::string.
3227         (do_option): Likewise.
3228         (target_options_to_string): Return an std::string.
3229         * linux-nat.c (linux_nat_target::wait): Adjust.
3230         * target-debug.h (target_debug_print_options): Adjust.
3231
3232 2018-08-07  Tom Tromey  <tom@tromey.com>
3233
3234         * Makefile.in (CPPFLAGS): New variable.
3235         (INTERNAL_CPPFLAGS): Use it.
3236
3237 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3238
3239         * NEWS: Mention the index cache.
3240
3241 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3242
3243         * common/pathstuff.h (get_standard_cache_dir): New.
3244         * common/pathstuff.c (get_standard_cache_dir): New.
3245         * build-id.h (build_id_to_string): New.
3246         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3247         DEBUG_STR_SUFFIX): Move to here.
3248         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3249         DEBUG_STR_SUFFIX): Move from there.
3250         (write_psymtabs_to_index): Make non-static, add basename
3251         parameter.  Write to temporary files, rename when done.
3252         (save_gdb_index_command): Adjust call to
3253         write_psymtabs_to_index.
3254         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3255         field.
3256         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3257         (get_gdb_index_contents_from_cache): New.
3258         (get_gdb_index_contents_from_cache_dwz): New.
3259         (dwarf2_initialize_objfile): Read index from cache.
3260         (dwarf2_build_psymtabs): Save to index.
3261         * dwarf-index-cache.h: New file.
3262         * dwarf-index-cache.c: New file.
3263         * dwarf-index-write.h: New file.
3264
3265 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3266
3267         * gnulib/aclocal.m4: Re-generate.
3268         * gnulib/config.in: Re-generate.
3269         * gnulib/configure: Re-generate.
3270         * gnulib/import/Makefile.am: Re-generate.
3271         * gnulib/import/Makefile.in: Re-generate.
3272         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3273         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3274         * gnulib/import/m4/mkdir.m4: New file.
3275         * gnulib/import/mkdir.c: New file.
3276         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3277         module.
3278
3279 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3280
3281         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3282         * common/scoped_mmap.c: New file.
3283         * common/scoped_mmap.h (destroy): New method.
3284         (~scoped_mmap, reset): Use destroy.
3285         (scoped_mmap): New move constructor.
3286         (mmap_file): New declaration.
3287         * unittests/scoped_mmap-selftests.c (test_normal,
3288         test_invalid_filename, run_tests): New functions.
3289         (_initialize_scoped_mmap_selftests): Register selftest.
3290
3291 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3292
3293         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3294         (read_gdb_index_from_buffer): ... this.  Remove section
3295         parameter, add buffer parameter.
3296         (get_gdb_index_contents_ftype,
3297         get_gdb_index_contents_dwz_ftype): New typedefs.
3298         (dwarf2_read_gdb_index): Add callback parameters to get the
3299         index contents.
3300         (get_gdb_index_contents_from_section): New.
3301         (dwarf2_initialize_objfile): Update call to
3302         dwarf2_read_gdb_index.
3303
3304 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3305
3306         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3307         (gdb_open_cloexec): Likewise.
3308         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3309         (commandline_from_pid): Likewise.
3310         (linux_xfer_osdata_threads): Likewise.
3311         (linux_xfer_osdata_fds): Likewise.
3312         * ada-lang.c (is_package_name): Likewise.
3313         * auxv.c (procfs_xfer_auxv): Likewise.
3314         * breakpoint.c (print_one_breakpoint_location): Use
3315         uiout::field_fmt.
3316         (print_one_catch_solib): Use string_printf.
3317         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3318         (add_pe_forwarded_sym): Likewise.
3319         * dwarf2read.c (create_type_unit_group): Likewise.
3320         (build_error_marker_type): Likewise.
3321         * infcall.c (get_function_name): Likewise.
3322         * valprint.c (print_converted_chars_to_obstack): Likewise.
3323         * xtensa-tdep.c (xtensa_register_type): Likewise.
3324
3325 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3326
3327         * remote.c (remote_target::download_tracepoint): Fix format
3328         string errors.
3329
3330 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3331
3332         * tracefile.c: Include common/byte-vector.h.
3333         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3334         with trace_regblock_size if needed.  Update uses of buf.
3335
3336 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3337
3338         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3339         std::vector<unsigned char>.
3340         * tracepoint.c (collection_list::collection_list): Remove
3341         m_regs_mask initializer from initializer list.  Resize
3342         m_regs_mask using the largest remote register number.
3343         (collection_list::add_remote_register): Remove size check on
3344         m_regs_mask.  Use at to access element.
3345         (collection_list::stringify): Change type of temp_buf to
3346         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3347         stringify the register mask.  Use pack_hex_byte for the register
3348         mask.
3349
3350 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3351
3352         * tracepoint.h (class collection_list) <add_register>: Remove.
3353         <add_remote_register, add_ax_registers, add_local_register>:
3354         Declare.
3355         <add_memrange>: Add scope parameter.
3356         * tracepoint.c (encode_actions_1): Likewise.
3357         (collection_list::add_register): Rename to ...
3358         (collection_list::add_remote_register): ... this.  Update
3359         comment.
3360         (collection_list::add_ax_registers, add_local_register): New
3361         methods.
3362         (collection_list::add_memrange): Add scope parameter.  Call
3363         add_local_register instead of add_register.
3364         (finalize_tracepoint_aexpr): New function.
3365         (collection_list::collect_symbol): Update calls to add_memrange.
3366         Call add_local_register instead of add_register.  Call
3367         add_ax_registers.  Call finalize_tracepoint_aexpr.
3368         (encode_actions_1): Get remote regnos for $reg action.  Call
3369         add_remote_register, add_ax_registers, and add_local_register.
3370         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3371         (validate_actionline): Call finalize_tracepoint_aexpr.
3372
3373 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3374
3375         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3376         Replace array buf with gdb::char_vector buf, of size
3377         get_remote_packet_size ().  Replace references to buf and
3378         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3379         and xsnprintf with snprintf.  Raise errors if the buffer is too
3380         small.
3381
3382 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3383
3384         * remote.c (remote_target::download_tracepoint): Fix the has_more
3385         predicate in the QTDP action list iteration.
3386
3387 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3388
3389         * remote.c (remote_target::download_tracepoint): Fix indentation
3390         in for block.
3391
3392 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3393
3394         * proc-api.c (_initialize_proc_api): Remove c, unused.
3395         * procfs.c (procfs_init_inferior): Remove signals, unused.
3396         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3397         unused.
3398
3399 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3400             Andrew Burgess  <andrew.burgess@embecosm.com>
3401
3402         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3403         'W_STOPCODE (0)' as this could be ambiguous.
3404
3405 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3406
3407         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3408         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3409         "ai_socktype").
3410
3411 2018-08-02  Tom Tromey  <tom@tromey.com>
3412
3413         PR symtab/16842.
3414         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3415         symbols.
3416         (process_structure_scope): Likewise.
3417
3418 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3419
3420         PR gdb/22629:
3421         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3422         kill inferior.
3423
3424 2018-08-02  Tom Tromey  <tom@tromey.com>
3425
3426         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3427         (darwin_suspend_inferior, darwin_resume_inferior)
3428         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3429         (darwin_check_new_threads): Check result of get_darwin_inferior.
3430
3431 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3432
3433         GDB 8.1.1 released.
3434
3435 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3436
3437         * varobj.c (varobj_get_path_expr_parent): Report an error if
3438         parent is a dynamic varobj.
3439
3440 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3441
3442         * gnulib/aclocal.m4: Re-generate.
3443         * gnulib/config.in: Re-generate.
3444         * gnulib/configure: Re-generate.
3445         * gnulib/import/Makefile.in: Re-generate.
3446         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3447         * gnulib/import/m4/onceonly.m4: Re-generate.
3448
3449 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3450
3451         * target-descriptions.c (struct xml_test_tdesc): New.
3452         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3453         (record_xml_tdesc): Update.
3454         (maintenance_check_xml_descriptions): Update.
3455         * target-descriptions.h (record_xml_tdesc): Update comment.
3456
3457 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3458
3459         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3460         checking array bounds are defined.
3461
3462 2018-07-30  Tom Tromey  <tom@tromey.com>
3463
3464         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3465         irreflexivity violation.
3466
3467 2018-07-30  Tom Tromey  <tom@tromey.com>
3468
3469         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3470         * value.c (unpack_long): Remove lint code.
3471         * valops.c (value_ind): Remove lint code.
3472         * valarith.c (value_x_binop, value_x_unop, value_equal)
3473         (value_pos): Remove lint code.
3474
3475 2018-07-28  Tom de Vries  <tdevries@suse.de>
3476
3477         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3478         with undefined upper bound as <optimized out>.
3479
3480 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3481
3482         * gcore.in: Rename variable "name" to "prefix".  Expand
3483         "usage" text.
3484
3485 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3486
3487         * windows-nat.c (windows_nat_target::create_inferior): Update to
3488         call close() in global namespace.
3489
3490 2018-07-26  Tom Tromey  <tom@tromey.com>
3491
3492         * dwarf-index-write.c (add_address_entry): Don't add objfile
3493         offsets.
3494         * dbxread.c (find_stab_function): Rename from
3495         find_stab_function_addr.  Return a bound_minimal_symbol.
3496         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3497         Don't add objfile offsets.
3498         (end_psymtab): Use raw_text_low, raw_text_high,
3499         MSYMBOL_VALUE_RAW_ADDRESS.
3500         (read_ofile_symtab): Update.
3501         (process_one_symbol): Update.
3502         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3503         offsets.
3504         (dw2_relocate): Remove.
3505         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3506         searching addrmap.
3507         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3508         Update.
3509         (process_psymtab_comp_unit_reader, add_partial_symbol)
3510         (add_partial_subprogram, dwarf2_ranges_read): Update.
3511         (load_partial_dies): Update.
3512         (add_address_entry): Don't add objfile offsets.
3513         (dwarf2_build_include_psymtabs): Update.
3514         (create_addrmap_from_aranges): Don't add objfile offsets.
3515         (dw2_find_pc_sect_compunit_symtab): Update.
3516         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3517         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3518         Update.
3519         (parse_partial_symbols): Don't add objfile offsets.  Use
3520         raw_text_low, raw_text_high.  Update.
3521         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3522         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3523         or call 'relocate' quick function.  Clear psymbol_map.
3524         * psympriv.h (struct partial_symbol) <address>: Add section
3525         offset.
3526         <set_unrelocated_address>: Rename from set_address.
3527         <raw_text_low, raw_text_high>: New methods.
3528         <text_low, text_high>: Add objfile parameter.
3529         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3530         set_unrelocated_address.
3531         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3532         (find_pc_psymbol): Update.
3533         (fixup_psymbol_section, relocate_psymtabs): Remove.
3534         (dump_psymtab, psym_functions): Update.
3535         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3536         parameter.
3537         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3538         (start_psymtab_common): Update.
3539         * symfile-debug.c (debug_qf_relocate): Remove.
3540         (debug_sym_quick_functions): Update.
3541         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3542         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3543         Update.
3544
3545 2018-07-26  Tom Tromey  <tromey@redhat.com>
3546
3547         * dbxread.c (end_psymtab): Use text_high_valid and
3548         text_low_valid.
3549         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3550         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3551         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3552         Update comment.
3553         <text_low_valid, text_high_valid>: New fields.
3554         <set_text_low, set_text_high>: Update.
3555         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3556
3557 2018-07-26  Tom Tromey  <tom@tromey.com>
3558
3559         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3560         Update.
3561         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3562         textlow and texthigh fields.
3563         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3564         Update.
3565         * mdebugread.c (parse_lines, parse_partial_symbols)
3566         (psymtab_to_symtab_1): Update.
3567         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3568         Rename fields.  Update comment.  Now private.
3569         <text_low, text_high, set_text_low, set_text_high>: New methods.
3570         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3571         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3572         (start_psymtab_common, maintenance_info_psymtabs)
3573         (maintenance_check_psymtabs): Update.
3574         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3575         texthigh fields.
3576         (scan_xcoff_symtab): Update.
3577
3578 2018-07-26  Tom Tromey  <tromey@redhat.com>
3579
3580         * psympriv.h (struct partial_symbol) <unrelocated_address,
3581         address, set_address>: New methods.
3582         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3583         (fixup_psymbol_section, relocate_psymtabs): Update.
3584         (print_partial_symbols): Add 'objfile' parameter.  Update.
3585         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3586         Update.
3587
3588 2018-07-26  Tom Tromey  <tom@tromey.com>
3589
3590         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3591         (debug_names::write_psymbols): Update.
3592         * psympriv.h (struct partial_symbol): Derive from
3593         general_symbol_info.
3594         <obj_section>: New method.
3595         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3596         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3597         (find_pc_sect_psymbol, fixup_psymbol_section)
3598         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3599         (print_partial_symbols, recursively_search_psymtabs)
3600         (compare_psymbols, psymbol_hash, psymbol_compare)
3601         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3602         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3603
3604 2018-07-26  Tom Tromey  <tromey@redhat.com>
3605
3606         * dbxread.c (end_psymtab): Remove dead code.
3607
3608 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3609
3610         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3611         DWARF unwinders are disabled.
3612         * dwarf2-frame.c: Add dwarf2read.h include.
3613         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3614         disabled.
3615         (dwarf2_frame_unwinders_enabled_p): Define.
3616         (show_dwarf_unwinders_enabled_p): New function.
3617         (_initialize_dwarf2_frame): Register switch to control DWARF
3618         unwinder use.
3619         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3620         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3621         (show_dwarf_cmdlist): Remove static keyword.
3622         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3623         (show_dwarf_cmdlist): Declare.
3624         * NEWS: Document new feature.
3625
3626 2018-07-26  Tom de Vries  <tdevries@suse.de>
3627
3628         PR breakpoints/23366
3629         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3630
3631 2018-07-26  Tom de Vries  <tdevries@suse.de>
3632
3633         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3634         DW_AT_count can't be translated to a dynamic prop.
3635
3636 2018-07-25  Tom de Vries  <tdevries@suse.de>
3637
3638         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3639         try/catch.
3640
3641 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3642
3643         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3644
3645 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3646
3647         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3648
3649 2018-07-24  Keith Seitz  <keiths@redhat.comt
3650
3651         PR symtab/23010
3652         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3653         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3654         instead of add_symbol_to_list.
3655         (read_file_scope): Call prepare_one_comp_unit before reading
3656         any other DIEs.
3657
3658 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3659
3660         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3661
3662 2018-07-24  Tom Tromey  <tom@tromey.com>
3663
3664         * utils.c (malloc, realloc, free): Don't declare.
3665         * configure, config.in: Rebuild.
3666         * configure.ac: Don't check for declarations of free, malloc, or
3667         realloc.
3668
3669 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3670
3671         * aarch64-linux-nat.c
3672         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3673         variable.
3674         * arm-linux-nat.c (fetch_regs): Likewise.
3675         (store_regs): Likewise.
3676         (fetch_vfp_regs): Likewise.
3677         (store_vfp_regs): Likewise.
3678         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3679         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3680         (arm_linux_nat_target::insert_watchpoint): Likewise.
3681         (arm_linux_nat_target::remove_watchpoint): Likewise.
3682         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3683         Likewise.
3684         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3685         Likewise.
3686         * ppc-linux-nat.c (fetch_register): Likewise.
3687         (fetch_all_gp_regs): Likewise.
3688         (fetch_ppc_registers): Likewise.
3689         (store_all_gp_regs): Likewise.
3690         (store_ppc_registers): Likewise.
3691         (hwdebug_insert_point): Likewise.
3692         (can_use_watchpoint_cond_accel): Likewise.
3693         * remote-sim.c (gdb_os_write_stdout): Likewise.
3694
3695 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3696             Tom Tromey  <tom@tromey.com>
3697
3698         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3699         test for it.
3700         * configure: Rebuild.
3701
3702 2018-07-22  Tom Tromey  <tom@tromey.com>
3703
3704         * regformats/regdat.sh: Define xmltarget_${name} inside
3705         #ifndef IN_PROCESS_AGENT.
3706
3707 2018-07-22  Tom Tromey  <tom@tromey.com>
3708
3709         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3710
3711 2018-07-22  Tom Tromey  <tom@tromey.com>
3712
3713         * symfile.c (reread_symbols): Notify iter, not objfile.
3714
3715 2018-07-22  Tom Tromey  <tom@tromey.com>
3716
3717         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3718         Use arch_ops.
3719         (ravenscar_thread_target::prepare_to_store): Likewise.
3720
3721 2018-07-22  Tom Tromey  <tom@tromey.com>
3722
3723         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3724         unused variable.  Call value_fetch_lazy when needed.
3725         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3726         Remove unused variable.  Call value_fetch_lazy when needed.
3727
3728 2018-07-22  Tom Tromey  <tom@tromey.com>
3729
3730         * m32c-tdep.c (mark_dma): Return void.
3731         (make_regs): Remove unused declarations.
3732
3733 2018-07-22  Tom Tromey  <tom@tromey.com>
3734
3735         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3736         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3737         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3738         bkscm_get_valid_block_smob_arg_unsafe for effect.
3739
3740 2018-07-22  Tom Tromey  <tom@tromey.com>
3741
3742         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3743         value_type.
3744
3745 2018-07-22  Tom Tromey  <tom@tromey.com>
3746
3747         * windows-nat.c (saved_context): Conditionally define.
3748         * remote.c (remote_target::remote_btrace_maybe_reopen):
3749         Conditionally declare "warned".
3750         * inflow.c (sigquit_ours): Conditionally define.
3751         (new_tty): Move "tty" declaration inside #if.
3752         * guile/guile.c (guile_datadir): Conditionally define.
3753         * charset.c (set_be_le_names): Move some declarations inside #if.
3754         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3755         #if.
3756         (parse_xml_btrace_conf): Likewise.
3757
3758 2018-07-22  Tom Tromey  <tom@tromey.com>
3759
3760         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3761
3762 2018-07-22  Tom Tromey  <tom@tromey.com>
3763
3764         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3765         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3766         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3767         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3768         * stack.c (frame_apply_level_command): Remove unused variable.
3769         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3770         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3771         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3772         unused variable.
3773         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3774         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3775         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3776         variable.
3777         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3778         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3779         variable.
3780         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3781         Remove unused variable.
3782         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3783         variable.
3784         * common/tdesc.c (print_xml_feature::visit): Remove unused
3785         variable.
3786         * compile/compile-object-load.c (store_regs): Remove unused
3787         variables.
3788         * complaints.c (clear_complaints): Remove unused variable.
3789         * corelow.c (core_target_open): Remove unused variable.
3790         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3791         variable.
3792         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3793         variable.
3794         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3795         variable.
3796         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3797         variable.
3798         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3799         variable.
3800         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3801         variable.
3802         * ia64-tdep.c (examine_prologue): Remove unused variable.
3803         * infcall.c (run_inferior_call): Remove unused variable.
3804         * inferior.c (exit_inferior): Remove unused variable.
3805         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3806         * linespec.c (decode_line_2): Remove unused variable.
3807         * linux-nat.c (super_close): Remove.
3808         * linux-tdep.c (linux_info_proc): Remove unused variable.
3809         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3810         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3811         Remove unused variable.
3812         * parse.c (find_minsym_type_and_address): Remove unused variable.
3813         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3814         variable.
3815         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3816         variable.
3817         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3818         variables.
3819         * record-btrace.c (record_btrace_target::store_registers): Remove
3820         unused variable.
3821         (cmd_show_record_btrace_cpu): Remove unused variable.
3822         * riscv-tdep.c (riscv_register_reggroup_p)
3823         (riscv_push_dummy_call, riscv_return_value): Remove unused
3824         variable.
3825         * rust-exp.y (literal): Remove unused variable.
3826         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3827         unused variable.
3828         <STRUCTOP_ANONYMOUS>: Likewise.
3829         * s390-linux-tdep.c (s390_linux_init_abi_31)
3830         (s390_linux_init_abi_64): Remove unused variable.
3831         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3832         (file_select_thread, net_windows_open, _initialize_ser_windows):
3833         Remove unused variables.
3834         * symtab.c (find_pc_sect_line): Remove unused variable.
3835         * target-memory.c (compute_garbled_blocks): Remove unused
3836         variable.
3837         (target_write_memory_blocks): Remove unused variable.
3838         * target.c (target_stack::unpush): Remove unused variables.
3839         * tracepoint.c (start_tracing, all_tracepoint_actions)
3840         (merge_uploaded_trace_state_variables)
3841         (print_one_static_tracepoint_marker): Remove unused variable.
3842         * unittests/basic_string_view/element_access/char/1.cc (test01):
3843         Remove unused variable.
3844         * windows-nat.c (windows_continue, windows_add_all_dlls)
3845         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3846         Remove unused variables.
3847
3848 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3849
3850         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3851         attr_profile in HAVE_ELF.
3852         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3853         HAVE_ELF.
3854
3855 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3856
3857         * frame.c (frame_register_unwind): Change parameter name.
3858         (frame_unwind_register): Likewise.
3859         (frame_unwind_register_value): Likewise.
3860         (frame_unwind_register_signed): Likewise.
3861         (frame_unwind_register_unsigned): Likewise.
3862         * frame.h (frame_register_unwind): Likewise.
3863         (frame_unwind_register): Likewise.
3864         (frame_unwind_register_value): Likewise.
3865         (frame_unwind_register_signed): Likewise.
3866         (frame_unwind_register_unsigned): Likewise.
3867         (frame_unwind_arch): Likewise.
3868
3869 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3870
3871         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3872         ISA maintenance.
3873
3874 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3875
3876         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3877         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3878         hand.
3879
3880 2018-07-20  Keith Seitz  <keiths@redhat.com>
3881
3882         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3883         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3884         m_compunit_symtab, m_language>: Add "m_" prefix.
3885         Update all uses.
3886         * buildsym.c: Update all uses.
3887
3888 2018-07-20  Tom Tromey  <tom@tromey.com>
3889
3890         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3891         * buildsym.h (record_line_ftype): Remove typedef.
3892
3893 2018-07-20  Tom Tromey  <tom@tromey.com>
3894
3895         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3896         (end_expandable_symtab): Likewise.
3897         (end_symtab_get_static_block): Likewise.
3898         (end_symtab_from_static_block): Likewise.
3899         * buildsym-legacy.c (augment_type_symtab): Remove.
3900         (end_expandable_symtab): Remove.
3901         (end_symtab_get_static_block): Remove.
3902         (end_symtab_from_static_block): Remove.
3903
3904 2018-07-20  Tom Tromey  <tom@tromey.com>
3905
3906         * dwarf2read.c: Include buildsym.h.
3907         (struct dwarf2_cu) <builder>: New method.
3908         (fixup_go_packaging): Update.
3909         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3910         use scoped_free_pendings.
3911         (using_directives): Add "cu" parameter, remove "language".
3912         (read_import_statement, setup_type_unit_groups, )
3913         (read_func_scope, read_lexical_block_scope)
3914         (dwarf2_record_block_ranges, read_namespace): Update.
3915         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3916         (lnp_state_machine::handle_end_sequence): Update.
3917         (class lnp_state_machine) <m_cu>: New member.
3918         <m_record_line_callback>: Remove.
3919         <m_currently_recording_lines>: New member.
3920         (lnp_state_machine::handle_set_file): Update.
3921         (noop_record_line): Remove.
3922         (dwarf_record_line_p): Add cu parameter.
3923         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3924         (lnp_state_machine::record_line)
3925         (lnp_state_machine::lnp_state_machine)
3926         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3927         (dwarf_decode_lines): Update.
3928         (dwarf2_start_subfile): Add cu parameter.
3929         (dwarf2_start_symtab, new_symbol): Update.
3930         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3931         Remove dwarf2_per_objfile parameter.
3932         (dwarf_decode_macros): Update.
3933
3934 2018-07-20  Tom Tromey  <tom@tromey.com>
3935
3936         * stabsread.c (define_symbol): Update.
3937         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3938         * dwarf2read.c (new_symbol): Update.
3939         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3940         * cp-namespace.c: Include buildsym.h.
3941         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3942         * buildsym-legacy.c (get_buildsym_compunit): New function.
3943
3944 2018-07-20  Tom Tromey  <tom@tromey.com>
3945
3946         * xcoffread.c: Include buildsym-legacy.h.
3947         * windows-nat.c: Include buildsym-legacy.h.
3948         * stabsread.c: Include buildsym-legacy.h.
3949         * mdebugread.c: Include buildsym-legacy.h.
3950         * buildsym-legacy.h: New file.
3951         * buildsym-legacy.c: New file, from buildsym.c.
3952         * go32-nat.c: Include buildsym-legacy.h.
3953         * dwarf2read.c: Include buildsym-legacy.h.
3954         * dbxread.c: Include buildsym-legacy.h.
3955         * cp-namespace.c: Include buildsym-legacy.h.
3956         * coffread.c: Include buildsym-legacy.h.
3957         * buildsym.h: Move some contents to buildsym-legacy.h.
3958         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3959         buildsym-legacy.c.
3960         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3961
3962 2018-07-20  Tom Tromey  <tom@tromey.com>
3963
3964         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3965         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3966         (buildsym_compunit::buildsym_compunit)
3967         (buildsym_compunit::~buildsym_compunit)
3968         (buildsym_compunit::get_macro_table): Define.
3969
3970 2018-07-20  Tom Tromey  <tom@tromey.com>
3971
3972         * buildsym.c (reset_symtab_globals): Remove.
3973         (buildsym_compunit::end_symtab_from_static_block): Update.
3974         (buildsym_compunit::augment_type_symtab): Update.
3975         (end_symtab_from_static_block): Call free_buildsym_compunit.
3976         (augment_type_symtab, end_symtab, end_expandable_symtab):
3977         Likewise.
3978
3979 2018-07-20  Tom Tromey  <tom@tromey.com>
3980
3981         * arch-utils.c: Do not include buildsym.h.
3982         * mipsread.c: Do not include buildsym.h.
3983         * machoread.c: Do not include buildsym.h.
3984         * elfread.c: Do not include buildsym.h.
3985
3986 2018-07-20  Tom Tromey  <tom@tromey.com>
3987
3988         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3989         initialization.
3990         (buildsym_compunit): Add new constructor.
3991         (struct buildsym_compunit) <get_last_source_file, finish_block,
3992         record_block_range, start_subfile, patch_subfile_names,
3993         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3994         set_last_source_start_addr, get_last_source_start_addr,
3995         get_local_using_directives, set_local_using_directives,
3996         get_global_using_directives, outermost_context_p,
3997         get_current_context_stack, get_context_stack_depth,
3998         get_current_subfile, get_local_symbols, get_file_symbols,
3999         get_global_symbols, record_debugformat, record_producer,
4000         push_context, pop_context, end_symtab_get_static_block,
4001         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4002         New public methods.
4003         <record_pending_block, finish_block_internal, make_blockvector,
4004         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4005         private methods.
4006         Update all users.
4007
4008 2018-05-22  Tom Tromey  <tom@tromey.com>
4009
4010         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4011         parameter.
4012         (finish_block_internal): Update.
4013
4014 2018-07-20  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.h (EXTERN): Don't define or undef.
4023         * buildsym.c (EXTERN): Don't define.
4024
4025 2018-07-20  Tom Tromey  <tom@tromey.com>
4026
4027         * buildsym.c: Remove TODO comment.
4028
4029 2018-07-20  Tom Tromey  <tom@tromey.com>
4030
4031         * coffread.c (coff_symtab_read): Update.
4032         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4033         (xcoff_new_init): Update.
4034         * mipsread.c (mipscoff_new_init): Update.
4035         * mdebugread.c (mdebug_build_psymtabs): Update.
4036         * elfread.c (elf_new_init): Update.
4037         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4038         Update.
4039         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4040         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4041         (stabsect_build_psymtabs): Update.
4042         * buildsym.h (buildsym_init): Don't declare.
4043         * buildsym.c: Update comment.
4044         (prepare_for_building): Remove.
4045         (start_symtab, restart_symtab): Update.
4046         (reset_symtab_globals): Update comment.
4047         (buildsym_init): Remove.
4048
4049 2018-07-20  Tom Tromey  <tom@tromey.com>
4050
4051         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4052         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4053         (read_enum_type, common_block_start, common_block_end)
4054         (cleanup_undefined_types_1, finish_global_stabs): Update.
4055         * mdebugread.c (psymtab_to_symtab_1): Update.
4056         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4057         (read_lexical_block_scope, new_symbol): Update.
4058         * dbxread.c (process_one_symbol): Update.
4059         * coffread.c (coff_symtab_read, process_coff_symbol)
4060         (coff_read_enum_type): Update.
4061         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4062         declare.
4063         (get_local_symbols, get_file_symbols, get_global_symbols): New
4064         functions.
4065         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4066         m_global_symbols.
4067         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4068         (~scoped_free_pendings): Update.
4069         (finish_block, prepare_for_building, reset_symtab_globals)
4070         (end_symtab_get_static_block, end_symtab_with_blockvector)
4071         (augment_type_symtab, push_context): Update.
4072         (get_local_symbols, get_file_symbols, get_global_symbols): New
4073         functions.
4074         (buildsym_init): Update.
4075
4076 2018-07-20  Tom Tromey  <tom@tromey.com>
4077
4078         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4079         (process_full_type_unit): Likewise.
4080         (dwarf2_start_symtab): Set list_in_scope.
4081
4082 2018-07-20  Tom Tromey  <tom@tromey.com>
4083
4084         * dwarf2read.c (process_psymtab_comp_unit_reader)
4085         (build_type_psymtabs_reader): Do not set list_in_scope.
4086
4087 2018-07-20  Tom Tromey  <tom@tromey.com>
4088
4089         * buildsym.c (free_pendings): Remove.
4090         (add_symbol_to_list, scoped_free_pendings)
4091         (finish_block_internal, buildsym_init): Update.
4092
4093 2018-07-20  Tom Tromey  <tom@tromey.com>
4094
4095         * xcoffread.c (read_xcoff_symtab): Update.
4096         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4097         Update.
4098         * dbxread.c (process_one_symbol): Update.
4099         * coffread.c (coff_symtab_read): Update.
4100         * buildsym.h (finish_block): Update.
4101         * buildsym.c (finish_block): Remove "listhead" argument.
4102         (end_symtab_get_static_block): Update.
4103
4104 2018-07-20  Tom Tromey  <tom@tromey.com>
4105
4106         * buildsym.h (class scoped_free_pendings): Remove constructor.
4107         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4108         method.
4109         <m_pending_block_obstack, m_pending_blocks>: New members.
4110         (pending_block_obstack, pending_blocks): Remove.
4111         (scoped_free_pendings::scoped_free_pendings): Default.
4112         (~scoped_free_pendings): Update.
4113         (free_pending_blocks): Remove.
4114         (finish_block_internal, record_pending_block, make_blockvector)
4115         (end_symtab_get_static_block, augment_type_symtab, push_context)
4116         (buildsym_init): Update.
4117
4118 2018-07-20  Tom Tromey  <tom@tromey.com>
4119
4120         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4121         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4122         members.
4123         (pending_addrmap, pending_addrmap_obstack)
4124         (pending_addrmap_interesting): Remove.
4125         (scoped_free_pendings, record_block_range, make_blockvector)
4126         (prepare_for_building, reset_symtab_globals, buildsym_init):
4127         Update.
4128
4129 2018-07-20  Tom Tromey  <tom@tromey.com>
4130
4131         * xcoffread.c (process_linenos): Update.
4132         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4133         * mdebugread.c (psymtab_to_symtab_1): Update.
4134         * dwarf2read.c (setup_type_unit_groups)
4135         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4136         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4137         * dbxread.c (process_one_symbol): Update.
4138         * coffread.c (coff_symtab_read, enter_linenos)
4139         (process_coff_symbol): Update.
4140         * buildsym.h (current_subfile): Don't declare.
4141         (get_current_subfile): Declare.
4142         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4143         member.
4144         (start_subfile, free_buildsym_compunit, push_subfile)
4145         (prepare_for_building, start_symtab): Update.
4146         (get_current_subfile): New function.
4147
4148 2018-07-20  Tom Tromey  <tom@tromey.com>
4149
4150         * coffread.c (coff_symtab_read): Update.
4151         * xcoffread.c (read_xcoff_symtab): Update.
4152         * dwarf2read.c (new_symbol): Update.
4153         (read_func_scope, read_lexical_block_scope): Update.
4154         * dbxread.c (process_one_symbol): Update.
4155         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4156         (outermost_context_p): Remove macro.
4157         (outermost_context_p, get_current_context_stack)
4158         (get_context_stack_depth): Declare.
4159         (pop_context): Return struct context_stack.
4160         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4161         member.
4162         (context_stack_size): Remove.
4163         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4164         (prepare_for_building, end_symtab_get_static_block)
4165         (augment_type_symtab, push_context): Update.
4166         (pop_context): Return struct context_stack.
4167         (outermost_context_p, get_current_context_stack)
4168         (get_context_stack_depth): New functions.
4169         (buildsym_init): Update.
4170
4171 2018-07-20  Tom Tromey  <tom@tromey.com>
4172
4173         * rust-exp.y: Now a pure parser.  Update all rules.
4174         (%union): Move earlier.
4175         (current_parser, work_obstack): Remove globals.
4176         (rust_parser, ~rust_parser): Update.
4177         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4178         lex_character, lex_number, lex_string, lex_identifier,
4179         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4180         convert_name, convert_params_to_expression,
4181         convert_ast_to_expression, ast_basic_type, ast_operation,
4182         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4183         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4184         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4185         ast_array_type, ast_slice_type, ast_reference_type,
4186         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4187         (rust_parse): Update.
4188         (rustyyerror, rustyylex): Add parser parameter.
4189         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4190         (rust_lex_stringish_test, rust_lex_test_sequence)
4191         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4192         (rust_lex_test_push_back, rust_lex_tests): Update.
4193
4194 2018-07-19  Pedro Alves  <palves@redhat.com>
4195
4196         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4197         gdb::unique_xmalloc_ptr.
4198         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4199         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4200         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4201         copy-initialization.
4202         * guile/scm-pretty-print.c (ppscm_print_children): Use
4203         gdb::unique_xmalloc_ptr instead of cleanups.
4204         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4205         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4206         gdb::unique_xmalloc_ptr.
4207         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4208         Adjust to use gdb::unique_xmalloc_ptr.
4209         * guile/scm-utils.c (extract_arg): Adjust.
4210         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4211         gdb::unique_xmalloc_ptr instead of a cleanup.
4212
4213 2018-07-19  Tom Tromey  <tom@tromey.com>
4214
4215         * utils.c (do_value_free_to_mark)
4216         (make_cleanup_value_free_to_mark): Remove.
4217         * utils.h (make_cleanup_value_free_to_mark): Remove.
4218
4219 2018-07-19  Pedro Alves  <palves@redhat.com>
4220
4221         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4222         forwarding reference.
4223
4224 2018-07-18  Pedro Alves  <palves@redhat.com>
4225
4226         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4227         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4228         cleanup.
4229
4230 2018-07-18  Pedro Alves  <palves@redhat.com>
4231
4232         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4233         exceptions.
4234         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4235         (gdbscm_wrap): New.
4236         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4237         directly instead of a cleanup.
4238         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4239         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4240         (vlscm_binop_gdbthrow): New, factored out from ...
4241         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4242         (vlscm_rich_compare): Use gdbscm_wrap.
4243         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4244         instead of a cleanup.
4245         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4246         cleanup.
4247         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4248         Use xfree directly instead of a cleanup.
4249         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4250         Adjust to use gdbscm_wrap and scoped_value_mark.
4251         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4252         (gdbscm_value_address, gdbscm_value_dereference)
4253         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4254         scoped_value_mark.
4255         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4256         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4257         scoped_value_mark.
4258         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4259         gdbscm_wrap and scoped_value_mark.
4260         (gdbscm_value_to_string): Use xfree directly instead of a
4261         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4262         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4263         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4264         scoped_value_mark.
4265         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4266         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4267         scoped_value_mark.
4268         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4269         gdbscm_wrap.
4270
4271 2018-07-18  Tom de Vries  <tdevries@suse.de>
4272
4273         * findvar.c (default_read_var_value): Also resolve dynamic type for
4274         LOC_OPTIMIZED_OUT vars.
4275
4276 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4277
4278         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4279         decoding.
4280
4281 2018-07-17  Tom Tromey  <tom@tromey.com>
4282
4283         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4284         (compute_enum_list, pascm_set_param_value_x)
4285         (gdbscm_parameter_value): Update.
4286         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4287         (gdbscm_scm_to_host_string): Update.
4288         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4289         Update.
4290         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4291         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4292         * guile/scm-string.c (gdbscm_scm_to_string): Return
4293         unique_xmalloc_ptr.
4294         (gdbscm_scm_to_host_string): Likewise.
4295
4296 2018-07-17  Tom Tromey  <tom@tromey.com>
4297
4298         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4299         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4300         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4301         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4302         unique_xmalloc_ptr.
4303
4304 2018-07-17  Tom Tromey  <tom@tromey.com>
4305
4306         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4307         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4308         Update.
4309         * guile/scm-cmd.c (cmdscm_function): Update.
4310         * guile/scm-pretty-print.c
4311         (ppscm_print_exception_unless_memory_error): Update.
4312         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4313         Return unique_xmalloc_ptr.
4314
4315 2018-07-17  Tom Tromey  <tom@tromey.com>
4316
4317         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4318         Use string_printf.
4319
4320 2018-07-17  Jim Wilson  <jimw@sifive.com>
4321
4322         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4323         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4324         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4325         unecessary braces after EF_RISCV_RVC test.  Delete call to
4326         set_gdbarch_decr_pc_after_break.
4327
4328         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4329         RISCV_LAST_FP_REGNUM + 1.
4330         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4331
4332 2018-07-17  Tom Tromey  <tom@tromey.com>
4333
4334         * configure.ac: Remove --disable-gdbcli.
4335         * configure: Rebuild.
4336         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4337         (SUBDIR_CLI_CFLAGS): Remove.
4338         (SFILES): Use SUBDIR_CLI_SRCS.
4339         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4340
4341 2018-07-17  Tom Tromey  <tom@tromey.com>
4342
4343         PR gdb/18624:
4344         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4345
4346 2018-07-16  Jim Wilson  <jimw@sifive.com>
4347
4348         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4349
4350 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4351
4352         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4353         variable.
4354         (libunwind_frame_sniffer): Likewise.
4355         (libunwind_frame_prev_register): Likewise.
4356         (libunwind_sigtramp_frame_sniffer): Likewise.
4357         * ia64-tdep.c (ia64_access_reg): Likewise.
4358         (ia64_access_rse_reg): Likewise.
4359         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4360         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4361
4362 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4363
4364         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4365
4366 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4367
4368         * remote-sim.c (gdbsim_target::close,
4369         gdbsim_target::mourn_inferior): Remove unused variables.
4370
4371 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4372
4373         * ia64-tdep.c (ktab_buf): New global.
4374         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4375         (get_kernel_table): Adjust.
4376
4377 2018-07-16  Tom Tromey  <tom@tromey.com>
4378
4379         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4380         * dwarf2read.c (using_directives, new_symbol): Use
4381         outermost_context_p.
4382         * dbxread.c (process_one_symbol): Use outermost_context_p.
4383         * coffread.c (coff_symtab_read): Use outermost_context_p.
4384
4385 2018-07-16  Tom Tromey  <tom@tromey.com>
4386
4387         * dwarf2read.c (using_directives, read_func_scope)
4388         (read_lexical_block_scope): Update.
4389         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4390         * buildsym.h (local_using_directives, global_using_directives):
4391         Don't declare.
4392         (get_local_using_directives, set_local_using_directives)
4393         (get_global_using_directives): Declare.
4394         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4395         m_global_using_directives>: New members.
4396         (finish_block_internal, prepare_for_building)
4397         (reset_symtab_globals, end_symtab_get_static_block)
4398         (push_context): Update.
4399         (get_local_using_directives, set_local_using_directives)
4400         (get_global_using_directives): New functions.
4401         (buildsym_init): Update.
4402
4403 2018-07-16  Tom Tromey  <tom@tromey.com>
4404
4405         * xcoffread.c (xcoff_initial_scan): Don't call
4406         free_pending_blocks.
4407         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4408         * buildsym.h (class scoped_free_pendings): Add constructor.
4409         (free_pending_blocks): Don't declare.
4410         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4411         (free_pending_blocks): Now static.
4412
4413 2018-07-16  Tom Tromey  <tom@tromey.com>
4414
4415         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4416         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4417         member.
4418         (struct subfile_stack): Remove.
4419         (subfile_stack): Remove.
4420         (push_subfile, pop_subfile, buildsym_init): Update.
4421
4422 2018-07-16  Tom Tromey  <tom@tromey.com>
4423
4424         * buildsym.c (push_subfile): Use gdb_assert.
4425         (pop_subfile): Use gdb_assert.
4426
4427 2018-07-16  Tom Tromey  <tom@tromey.com>
4428
4429         * buildsym.h (merge_symbol_lists): Remove.
4430         * buildsym.c (merge_symbol_lists): Remove.
4431
4432 2018-07-16  Tom Tromey  <tom@tromey.com>
4433
4434         * stabsread.c (scan_file_globals): Update comment.
4435         * stabsread.h (scan_file_globals): Move from buildsym.h.
4436         * buildsym.h (scan_file_globals): Move to stabsread.h.
4437
4438 2018-07-16  Tom Tromey  <tom@tromey.com>
4439
4440         * xcoffread.c (xcoff_new_init): Update.
4441         * mipsread.c (mipscoff_new_init): Update.
4442         * mdebugread.c (mdebug_build_psymtabs): Update.
4443         * elfread.c (elf_new_init): Update.
4444         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4445         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4446         * buildsym.h (buildsym_new_init): Don't declare.
4447         * buildsym.c (buildsym_new_init): Remove.
4448
4449 2018-07-16  Tom Tromey  <tom@tromey.com>
4450
4451         * stabsread.h (within_function): Move from buildsym.h.
4452         * stabsread.c (start_stabs): Clear within_function.
4453         * coffread.c (coff_start_symtab): Clear within_function.
4454         * buildsym.h (within_function): Move to stabsread.h.
4455         * buildsym.c (prepare_for_building): Update.
4456
4457 2018-07-16  Tom Tromey  <tom@tromey.com>
4458
4459         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4460         * dwarf2read.c (dwarf2_start_symtab): Don't set
4461         processing_gcc_compilation.
4462         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4463
4464 2018-07-16  Tom Tromey  <tom@tromey.com>
4465
4466         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4467         (next_symbol_text_func): Move from buildsym.h.
4468         * stabsread.c (hashname): Move from buildsym.c.
4469         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4470         (next_symbol_text_func, hashname): Move to stabsread.h.
4471         * buildsym.c: Don't include bcache.h
4472         (hashname): Move to stasbread.c.
4473
4474 2018-07-16  Tom Tromey  <tom@tromey.com>
4475
4476         * buildsym.h (context_stack_size): Don't declare.
4477         * buildsym.c (context_stack_size): New global.
4478
4479 2018-07-16  Tom Tromey  <tom@tromey.com>
4480
4481         * dbxread.c (processing_acc_compilation): New global.
4482         * buildsym.h (processing_acc_compilation): Don't declare.
4483
4484 2018-07-16  Tom Tromey  <tom@tromey.com>
4485
4486         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4487         * dbxread.c (read_ofile_symtab): Update.
4488         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4489         * buildsym.h (last_source_start_addr): Remove.
4490         (set_last_source_start_addr, get_last_source_start_addr):
4491         Declare.
4492         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4493         parameter.
4494         (struct buildsym_compunit) <m_last_source_start_addr>: New
4495         member.
4496         (prepare_for_building): Remove start_addr parameter.
4497         (start_symtab, restart_symtab, end_symtab_get_static_block)
4498         (end_symtab_with_blockvector): Update.
4499         (set_last_source_start_addr, get_last_source_start_addr): New
4500         functions.
4501
4502 2018-07-16  Tom Tromey  <tom@tromey.com>
4503
4504         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4505         member.
4506         (have_line_numbers): Remove.
4507         (record_line, prepare_for_building, end_symtab_get_static_block)
4508         (augment_type_symtab): Update.
4509
4510 2018-07-16  Tom Tromey  <tom@tromey.com>
4511
4512         * buildsym.c (~buildsym_compunit): Free the macro table.
4513         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4514         methods.
4515         <m_pending_macros>: New member.
4516         (pending_macros): Remove.
4517         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4518         (reset_symtab_globals, end_symtab_get_static_block)
4519         (end_symtab_with_blockvector, augment_type_symtab)
4520         (buildsym_init): Update.
4521
4522 2018-07-16  Tom Tromey  <tom@tromey.com>
4523
4524         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4525         parameter.
4526         (buildsym_compunit::set_last_source_file): New method.
4527         <m_last_source_file>: New member.
4528         (prepare_for_building): Remove "name" parameter.
4529         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4530         (last_source_file): Remove.
4531         (set_last_source_file, get_last_source_file): Update.
4532
4533 2018-07-16  Tom Tromey  <tom@tromey.com>
4534
4535         * buildsym.c (prepare_for_building): Add assert.
4536
4537 2018-07-16  Tom Tromey  <tom@tromey.com>
4538
4539         * buildsym.c (~buildsym_compunit): Update.
4540         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4541         (start_subfile, patch_subfile_names)
4542         (end_symtab_with_blockvector): Update.
4543
4544 2018-07-16  Tom Tromey  <tom@tromey.com>
4545
4546         * buildsym.c (struct buildsym_compunit): Add constructor,
4547         destructor, initializers.
4548         (start_buildsym_compunit): Remove.
4549         (free_buildsym_compunit): Use "delete".
4550         (start_symtab, restart_symtab): Use "new".
4551
4552 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4553
4554         * symfile.c (set_objfile_default_section_offset): Remove struct
4555         keyword.
4556
4557 2018-07-14  Stafford Horne  <shorne@gmail.com>
4558
4559         * (Responsible Maintainers): Add myself as or1k maintainer.
4560
4561 2018-07-13  Tom Tromey  <tom@tromey.com>
4562
4563         * symfile.c (set_objfile_default_section_offset): Use extra braces
4564         around initializer.
4565
4566 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4567
4568         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4569         non-branching basr.
4570
4571 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4572
4573         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4574         unittests/cli-utils-selftests.c
4575         * unittests/cli-utils-selftests.c: New file.
4576
4577 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4578
4579         * NEWS: Mention new commands. Mention change to 'thread apply'.
4580
4581 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4582
4583         * thread.c (thr_try_catch_cmd): New function.
4584         (thread_apply_all_command): Handle qcs flags.
4585         (thread_apply_command): Handle qcs flags.
4586         (taas_command): New function.
4587         (tfaas_command): New function.
4588         (_initialize_thread): Update to setup the new commands 'taas
4589         and 'tfaas'. Change doc string for 'thread apply'.
4590
4591 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4592
4593         * stack.c: (trailing_outermost_frame): New function, mostly
4594         extracted from backtrace_command_1.
4595         (leading_innermost_frame): New function.
4596         (backtrace_command_1): Update to call trailing_outermost_frame.
4597         (frame_apply_command_count): New function.
4598         (frame_apply_level_command): New function.
4599         (frame_apply_all_command): New function.
4600         (frame_apply_command): New function.
4601         (faas_command): New function.
4602         (frame_cmd_list): New variable.
4603         (_initialize_stack): Update to setup the new commands 'frame apply'
4604         and 'faas'.
4605
4606 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4607
4608         * cli-utils.c (number_or_range_parser::get_number): Only handle
4609         numbers or convenience var as numbers.
4610         (parse_flags): New function.
4611         (parse_flags_qcs): New function.
4612         (number_or_range_parser::finished): Ensure parsing end is detected
4613         before end of string.
4614         * cli-utils.h (parse_flags): New function.
4615         (parse_flags_qcs): New function.
4616         (number_or_range_parser): Remove m_finished bool.
4617         (number_or_range_parser::skip_range): Set m_in_range to false.
4618
4619 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4620
4621         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4622         on Windows.
4623
4624 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4625             Jan Kratochvil  <jan.kratochvil@redhat.com>
4626             Paul Fertser  <fercerpav@gmail.com>
4627             Tsutomu Seki  <sekiriki@gmail.com>
4628             Pedro Alves  <palves@redhat.com>
4629
4630         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4631         'unittests/parse-connection-spec-selftests.c'.
4632         (COMMON_SFILES): Add 'common/netstuff.c'.
4633         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4634         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4635         * common/netstuff.c: New file.
4636         * common/netstuff.h: New file.
4637         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4638         (wait_for_connect): Update comment.  New parameter
4639         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4640         Use 'sock' directly instead of 'scb->fd'.
4641         (try_connect): New function, with code from 'net_open'.
4642         (net_open): Rewrite main loop to deal with multiple
4643         sockets/addresses.  Handle IPv6-style hostnames; implement
4644         support for IPv6 connections.
4645         * unittests/parse-connection-spec-selftests.c: New file.
4646
4647 2018-07-11  Pedro Alves  <palves@redhat.com>
4648
4649         PR gdb/23377
4650         * remote.c (remote_target::remote_detach_pid): Call
4651         set_current_process.
4652
4653 2018-07-11  Pedro Alves  <palves@redhat.com>
4654
4655         * h8300-tdep.c (h8300_gdbarch_init): Remove
4656         set_gdbarch_ecoff_reg_to_regnum calls.
4657
4658 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4659
4660         PR c++/23373
4661         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4662         offsets/sizes for static members of a class/struct.
4663
4664 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4665
4666         * target-descriptions.c (tdesc_register_bitsize): Rename.
4667         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4668         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4669         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4670
4671 2018-07-10  Tom Tromey  <tom@tromey.com>
4672
4673         * breakpoint.c (moribund_locations): Now static and a
4674         std::vector.
4675         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4676         (build_bpstat_chain, update_global_location_list)
4677         (breakpoint_retire_moribund): Update.
4678         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4679         VEC.
4680
4681 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4682
4683         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4684         (riscv_register_reggroup_p): Use new function, remove unneeded
4685         parenthesis.
4686         (riscv_push_dummy_call): Extend assert to compare against xlen or
4687         flen based on register type.
4688
4689 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4690
4691         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4692
4693 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4694
4695         * remote.c (show_hardware_watchpoint_limit): New function.
4696         (show_hardware_watchpoint_length_limit): New function.
4697         (show_hardware_breakpoint_limit): New function.
4698         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4699         where appropriate, update help text.
4700
4701 2018-07-09  Tom Tromey  <tom@tromey.com>
4702
4703         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4704         (CLIBS): Don't mention NAT_CLIBS.
4705
4706 2018-07-09  Tom Tromey  <tom@tromey.com>
4707
4708         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4709         (LIBGDB_OBS, clean mostlyclean): Update.
4710         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4711
4712 2018-07-09  Tom Tromey  <tom@tromey.com>
4713
4714         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4715         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4716         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4717
4718 2018-07-09  Tom Tromey  <tom@tromey.com>
4719
4720         * Makefile.in (ALLDEPFILES): Remove exec.c.
4721         (COMMON_OBS): Remove exec.o.
4722         (COMMON_SFILES): Add exec.c.
4723
4724 2018-07-09  Tom Tromey  <tom@tromey.com>
4725
4726         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4727
4728 2018-07-09  Tom Tromey  <tom@tromey.com>
4729
4730         * Makefile.in (clean mostlyclean): Remove stamp-version.
4731         (version.c): Depend on stamp-version.
4732         (stamp-version): New rule, from version.c rule.
4733
4734 2018-07-09  Tom Tromey  <tom@tromey.com>
4735
4736         * Makefile.in (init.c): Depend on stamp-init.
4737         (stamp-init): New rule, from init.c rule.
4738         (clean mostlyclean): Remove stamp-init.
4739
4740 2018-07-09  Tom Tromey  <tom@tromey.com>
4741
4742         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4743         SUBDIR_GCC_COMPILE_SRCS.
4744
4745 2018-07-09  Tom Tromey  <tom@tromey.com>
4746
4747         * Makefile.in (init.c): Remove some unused sed rules.
4748
4749 2018-07-09  Tom Tromey  <tom@tromey.com>
4750
4751         * Makefile.in (TSOBS): Remove.
4752         (INIT_FILES): Update.
4753         (LIBGDB_OBS): Update.
4754         (COMMON_SFILES): Add inflow.c.
4755         (SFILES): Remove inflow.c.
4756
4757 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4758
4759         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4760
4761 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4762
4763         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4764         get_saveloc_name, is_signal_frame_name, step_name,
4765         init_remote_name, create_addr_space_name,
4766         destroy_addr_space_name, search_unwind_table_name,
4767         find_dyn_list_name): Constify.
4768
4769 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4770
4771         * darwin-nat.c (darwin_pthread_kill): New function.
4772         (darwin_resume_thread): Use darwin_pthread_kill.
4773
4774 2018-07-05  Tom de Vries  <tdevries@suse.de>
4775
4776         * macroexp.c (macro_buffer) <operator=>: New member function.
4777
4778 2018-07-04  Tom Tromey  <tom@tromey.com>
4779
4780         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4781
4782 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4783
4784         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4785         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4786         * maint.c: Likewise.
4787         * top.c: Likewise.
4788
4789 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4790
4791         * NEWS: Create a new section for the next release branch.
4792         Rename the section of the current branch, now that it has
4793         been cut.
4794
4795 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4796
4797         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4798         * version.in: Bump version to 8.2.50.DATE-git.
4799
4800 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4801             Pedro Alves  <palves@redhat.com>
4802
4803         * linux-nat.c (linux_init_ptrace): Rename to ...
4804         (linux_init_ptrace_procfs): ... this.  Call
4805         linux_proc_init_warnings.
4806         (linux_nat_target::post_attach)
4807         (linux_nat_target::post_startup_inferior): Adjust.
4808         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4809         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4810
4811 2018-07-04  Tom de Vries  <tdevries@suse.de>
4812
4813         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4814         check ...
4815         (read_comp_unit_head): ... here.
4816
4817 2018-07-03  Tom Tromey  <tom@tromey.com>
4818
4819         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4820         (stop_tracing, tstatus_command)
4821         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4822         (print_one_static_tracepoint_marker): Update.
4823         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4824         std::vector.
4825         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4826         VEC.
4827         (all_tracepoints, static_tracepoints_here): Return std::vector.
4828
4829 2018-07-03  Tom Tromey  <tom@tromey.com>
4830
4831         * common/ptid.c (ptid_equal): Remove.
4832         * common/ptid.h (ptid_equal): Don't declare.
4833         * ada-tasks.c: Update.
4834         * breakpoint.c: Update.
4835         * common/agent.c: Update.
4836         * corelow.c: Update.
4837         * darwin-nat-info.c: Update.
4838         * darwin-nat.c: Update.
4839         * dcache.c: Update.
4840         * dtrace-probe.c: Update.
4841         * dummy-frame.c: Update.
4842         * fbsd-nat.c: Update.
4843         * frame.c: Update.
4844         * gdbthread.h: Update.
4845         * gnu-nat.c: Update.
4846         * go32-nat.c: Update.
4847         * inf-loop.c: Update.
4848         * inf-ptrace.c: Update.
4849         * infcall.c: Update.
4850         * infcmd.c: Update.
4851         * inflow.c: Update.
4852         * infrun.c: Update.
4853         * linux-fork.c: Update.
4854         * linux-nat.c: Update.
4855         * linux-thread-db.c: Update.
4856         * mi/mi-cmd-var.c: Update.
4857         * mi/mi-interp.c: Update.
4858         * mi/mi-main.c: Update.
4859         * nto-procfs.c: Update.
4860         * ppc-linux-tdep.c: Update.
4861         * procfs.c: Update.
4862         * python/py-inferior.c: Update.
4863         * python/py-record-btrace.c: Update.
4864         * python/py-record.c: Update.
4865         * ravenscar-thread.c: Update.
4866         * regcache.c: Update.
4867         * remote-sim.c: Update.
4868         * remote.c: Update.
4869         * sol-thread.c: Update.
4870         * solib.c: Update.
4871         * target.c: Update.
4872         * tui/tui-stack.c: Update.
4873         * varobj.c: Update.
4874         * windows-nat.c: Update.
4875         * windows-tdep.c: Update.
4876
4877 2018-07-03  Tom Tromey  <tom@tromey.com>
4878
4879         * common/ptid.c (ptid_match): Remove.
4880         * common/ptid.h (ptid_match): Don't declare.
4881         * fbsd-nat.c: Update.
4882         * infcmd.c: Update.
4883         * infrun.c: Update.
4884         * linux-nat.c: Update.
4885         * record-btrace.c: Update.
4886         * regcache.c: Update.
4887         * remote.c: Update.
4888
4889 2018-07-03  Tom Tromey  <tom@tromey.com>
4890
4891         * common/ptid.c (ptid_tid_p): Remove.
4892         * common/ptid.h (ptid_tid_p): Don't declare.
4893         * sol-thread.c: Update.
4894
4895 2018-07-03  Tom Tromey  <tom@tromey.com>
4896
4897         * common/ptid.c (ptid_lwp_p): Remove.
4898         * common/ptid.h (ptid_lwp_p): Don't declare.
4899         * fbsd-nat.c: Update.
4900         * linux-nat.c: Update.
4901         * nat/linux-procfs.c: Update.
4902         * nat/x86-linux-dregs.c: Update.
4903         * sol-thread.c: Update.
4904
4905 2018-07-03  Tom Tromey  <tom@tromey.com>
4906
4907         * common/ptid.c (ptid_is_pid): Remove.
4908         * common/ptid.h (ptid_is_pid): Don't declare.
4909         * infrun.c: Update.
4910         * linux-nat.c: Update.
4911         * mi/mi-interp.c: Update.
4912         * remote.c: Update.
4913         * thread.c: Update.
4914
4915 2018-07-03  Tom Tromey  <tom@tromey.com>
4916
4917         * common/ptid.c (ptid_get_tid): Remove.
4918         * common/ptid.h (ptid_get_tid): Don't declare.
4919         * ada-tasks.c: Update.
4920         * aix-thread.c: Update.
4921         * bsd-uthread.c: Update.
4922         * darwin-nat.c: Update.
4923         * fbsd-nat.c: Update.
4924         * i386-darwin-nat.c: Update.
4925         * infrun.c: Update.
4926         * linux-tdep.c: Update.
4927         * nto-procfs.c: Update.
4928         * ppc-ravenscar-thread.c: Update.
4929         * python/py-infthread.c: Update.
4930         * ravenscar-thread.c: Update.
4931         * sol-thread.c: Update.
4932         * sparc-ravenscar-thread.c: Update.
4933         * windows-nat.c: Update.
4934
4935 2018-07-03  Tom Tromey  <tom@tromey.com>
4936
4937         * common/ptid.c (ptid_get_lwp): Remove.
4938         * common/ptid.h (ptid_get_lwp): Don't declare.
4939         * aarch64-linux-nat.c: Update.
4940         * ada-tasks.c: Update.
4941         * aix-thread.c: Update.
4942         * amd64-linux-nat.c: Update.
4943         * arm-linux-nat.c: Update.
4944         * corelow.c: Update.
4945         * fbsd-nat.c: Update.
4946         * fbsd-tdep.c: Update.
4947         * gnu-nat.c: Update.
4948         * i386-cygwin-tdep.c: Update.
4949         * i386-gnu-nat.c: Update.
4950         * i386-linux-nat.c: Update.
4951         * ia64-linux-nat.c: Update.
4952         * inf-ptrace.c: Update.
4953         * infrun.c: Update.
4954         * linux-fork.c: Update.
4955         * linux-nat.c: Update.
4956         * linux-tdep.c: Update.
4957         * linux-thread-db.c: Update.
4958         * mips-linux-nat.c: Update.
4959         * nat/aarch64-linux-hw-point.c: Update.
4960         * nat/aarch64-linux.c: Update.
4961         * nat/linux-btrace.c: Update.
4962         * nat/linux-osdata.c: Update.
4963         * nat/linux-procfs.c: Update.
4964         * nat/x86-linux-dregs.c: Update.
4965         * obsd-nat.c: Update.
4966         * ppc-fbsd-nat.c: Update.
4967         * ppc-linux-nat.c: Update.
4968         * procfs.c: Update.
4969         * python/py-infthread.c: Update.
4970         * ravenscar-thread.c: Update.
4971         * remote.c: Update.
4972         * s390-linux-nat.c: Update.
4973         * sol-thread.c: Update.
4974         * sol2-tdep.c: Update.
4975         * spu-linux-nat.c: Update.
4976         * x86-linux-nat.c: Update.
4977         * xtensa-linux-nat.c: Update.
4978
4979 2018-07-03  Tom Tromey  <tom@tromey.com>
4980
4981         * common/ptid.c (ptid_get_pid): Remove.
4982         * common/ptid.h (ptid_get_pid): Don't declare.
4983         * aarch64-linux-nat.c: Update.
4984         * ada-lang.c: Update.
4985         * aix-thread.c: Update.
4986         * alpha-bsd-nat.c: Update.
4987         * amd64-fbsd-nat.c: Update.
4988         * amd64-linux-nat.c: Update.
4989         * arm-linux-nat.c: Update.
4990         * arm-nbsd-nat.c: Update.
4991         * auxv.c: Update.
4992         * break-catch-syscall.c: Update.
4993         * breakpoint.c: Update.
4994         * bsd-uthread.c: Update.
4995         * corelow.c: Update.
4996         * ctf.c: Update.
4997         * darwin-nat.c: Update.
4998         * fbsd-nat.c: Update.
4999         * fbsd-tdep.c: Update.
5000         * gcore.c: Update.
5001         * gnu-nat.c: Update.
5002         * hppa-nbsd-nat.c: Update.
5003         * hppa-obsd-nat.c: Update.
5004         * i386-fbsd-nat.c: Update.
5005         * ia64-linux-nat.c: Update.
5006         * inf-ptrace.c: Update.
5007         * infcmd.c: Update.
5008         * inferior.c: Update.
5009         * inferior.h: Update.
5010         * inflow.c: Update.
5011         * infrun.c: Update.
5012         * linux-fork.c: Update.
5013         * linux-nat.c: Update.
5014         * linux-tdep.c: Update.
5015         * linux-thread-db.c: Update.
5016         * m68k-bsd-nat.c: Update.
5017         * mi/mi-interp.c: Update.
5018         * mi/mi-main.c: Update.
5019         * mips-linux-nat.c: Update.
5020         * mips-nbsd-nat.c: Update.
5021         * mips64-obsd-nat.c: Update.
5022         * nat/aarch64-linux-hw-point.c: Update.
5023         * nat/aarch64-linux.c: Update.
5024         * nat/linux-btrace.c: Update.
5025         * nat/linux-osdata.c: Update.
5026         * nat/linux-procfs.c: Update.
5027         * nat/x86-linux-dregs.c: Update.
5028         * nto-procfs.c: Update.
5029         * obsd-nat.c: Update.
5030         * ppc-linux-nat.c: Update.
5031         * ppc-nbsd-nat.c: Update.
5032         * ppc-obsd-nat.c: Update.
5033         * proc-service.c: Update.
5034         * procfs.c: Update.
5035         * python/py-inferior.c: Update.
5036         * python/py-infthread.c: Update.
5037         * ravenscar-thread.c: Update.
5038         * record.c: Update.
5039         * remote-sim.c: Update.
5040         * remote.c: Update.
5041         * rs6000-nat.c: Update.
5042         * s390-linux-nat.c: Update.
5043         * sh-nbsd-nat.c: Update.
5044         * sol-thread.c: Update.
5045         * sparc-nat.c: Update.
5046         * sparc64-tdep.c: Update.
5047         * spu-linux-nat.c: Update.
5048         * spu-tdep.c: Update.
5049         * target-debug.h: Update.
5050         * target.c: Update.
5051         * thread.c: Update.
5052         * tid-parse.c: Update.
5053         * tracefile-tfile.c: Update.
5054         * vax-bsd-nat.c: Update.
5055         * windows-nat.c: Update.
5056         * x86-linux-nat.c: Update.
5057         * x86-nat.c: Update.
5058
5059 2018-07-03  Tom Tromey  <tom@tromey.com>
5060
5061         * common/ptid.c (pid_to_ptid): Remove.
5062         * common/ptid.h (pid_to_ptid): Don't declare.
5063         * aix-thread.c: Update.
5064         * arm-linux-nat.c: Update.
5065         * common/ptid.c: Update.
5066         * common/ptid.h: Update.
5067         * corelow.c: Update.
5068         * ctf.c: Update.
5069         * darwin-nat.c: Update.
5070         * fbsd-nat.c: Update.
5071         * fork-child.c: Update.
5072         * gnu-nat.c: Update.
5073         * go32-nat.c: Update.
5074         * inf-ptrace.c: Update.
5075         * infcmd.c: Update.
5076         * inferior.c: Update.
5077         * infrun.c: Update.
5078         * linux-fork.c: Update.
5079         * linux-nat.c: Update.
5080         * nat/aarch64-linux-hw-point.c: Update.
5081         * nat/fork-inferior.c: Update.
5082         * nat/x86-linux-dregs.c: Update.
5083         * nto-procfs.c: Update.
5084         * obsd-nat.c: Update.
5085         * procfs.c: Update.
5086         * progspace.c: Update.
5087         * remote.c: Update.
5088         * rs6000-nat.c: Update.
5089         * s390-linux-nat.c: Update.
5090         * sol-thread.c: Update.
5091         * spu-linux-nat.c: Update.
5092         * target.c: Update.
5093         * top.c: Update.
5094         * tracefile-tfile.c: Update.
5095         * windows-nat.c: Update.
5096
5097 2018-07-03  Tom Tromey  <tom@tromey.com>
5098
5099         * common/ptid.h (ptid_build): Don't declare.
5100         * common/ptid.c (ptid_build): Remove.
5101         * aix-thread.c: Update.
5102         * bsd-kvm.c: Update.
5103         * bsd-uthread.c: Update.
5104         * common/agent.c: Update.
5105         * common/ptid.c: Update.
5106         * common/ptid.h: Update.
5107         * corelow.c: Update.
5108         * darwin-nat.c: Update.
5109         * fbsd-nat.c: Update.
5110         * gnu-nat.c: Update.
5111         * linux-fork.c: Update.
5112         * linux-nat.c: Update.
5113         * linux-thread-db.c: Update.
5114         * nat/linux-osdata.c: Update.
5115         * nat/linux-procfs.c: Update.
5116         * nto-procfs.c: Update.
5117         * obsd-nat.c: Update.
5118         * proc-service.c: Update.
5119         * procfs.c: Update.
5120         * ravenscar-thread.c: Update.
5121         * remote-sim.c: Update.
5122         * remote.c: Update.
5123         * sol-thread.c: Update.
5124         * target.c: Update.
5125         * windows-nat.c: Update.
5126
5127 2018-07-03  Tom Tromey  <tom@tromey.com>
5128
5129         * infrun.c (follow_exec): Use exit_inferior_silent.
5130         * inferior.c (exit_inferior_num_silent): Remove.
5131         * inferior.h (exit_inferior_num_silent): Don't declare.
5132
5133 2018-07-03  Tom Tromey  <tom@tromey.com>
5134
5135         PR cli/23340:
5136         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5137         inferior_ptid on error.
5138
5139 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5140             Simon Marchi  <simon.marchi@polymtl.ca>
5141
5142         PR tdep/8282
5143         * disasm.h (gdb_disassembler): Add
5144         `m_disassembler_options_holder'. member
5145         * disasm.c (get_all_disassembler_options): New function.
5146         (gdb_disassembler::gdb_disassembler): Use it.
5147         (gdb_buffered_insn_length_init_dis): Likewise.
5148         (gdb_buffered_insn_length): Adjust accordingly.
5149         (set_disassembler_options): Handle options with arguments.
5150         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5151         line if showing options with descriptions.
5152         (disassembler_options_completer): Adapt to using the
5153         `disasm_options_and_args_t' structure.
5154         * mips-tdep.c (mips_disassembler_options): New variable.
5155         (mips_disassembler_options_o32): Likewise.
5156         (mips_disassembler_options_n32): Likewise.
5157         (mips_disassembler_options_n64): Likewise.
5158         (gdb_print_insn_mips): Don't set `disassembler_options'.
5159         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5160         functions.
5161         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5162         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5163         `gdbarch_disassembler_options_implicit' and
5164         `gdbarch_valid_disassembler_options'.
5165         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5166         `disasm_options_and_args_t' structure.
5167         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5168         method.
5169         (valid_disassembler_options): Switch from `disasm_options_t' to
5170         the `disasm_options_and_args_t' structure.
5171         * NEWS: Document `set disassembler-options' support for the MIPS
5172         target.
5173         * gdbarch.h: Regenerate.
5174         * gdbarch.c: Regenerate.
5175
5176 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5177
5178         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5179
5180 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5181
5182         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5183         parameter in call to amd64_target_description.
5184         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5185         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5186         (amd64fbsd_init_abi): Likewise.
5187         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5188         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5189         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5190         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5191
5192 2018-06-29  Pedro Alves  <palves@redhat.com>
5193
5194         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5195         "segments" parameter.
5196         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5197         (_initialize_amd64_tdep): Update call to
5198         amd64_create_target_description.
5199         (amd64_target_description): Add "segments" parameter.  Adjust
5200         the implementation to use it.
5201         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5202         call to amd64_create_target_description.
5203         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5204         * gdb/arch/amd64.h (amd64_create_target_description): Add
5205         "segments" register.
5206         * gdb/arch/amd64.c (amd64_create_target_description): Add
5207         "segments" parameter.  Call create_feature_i386_64bit_segments
5208         only if SEGMENTS is true.
5209         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5210         call to amd64_create_target_description.
5211
5212 2018-06-29  Pedro Alves  <palves@redhat.com>
5213
5214         * thread.c (thread_target_id_str): New, factored out from ...
5215         (print_thread_info_1): ... here.  Use it to compute the max
5216         "Target Id" column width.
5217
5218 2018-06-29  Pedro Alves  <palves@redhat.com>
5219
5220         * remote.c (remote_target::extra_thread_info): Delete
5221         'display_buf' and 'n' locals.  from the cache, regardless of
5222         packet mechanims is in use.  Use cache for qThreadExtra and qP
5223         methods too.
5224
5225 2018-06-29  Pedro Alves  <palves@redhat.com>
5226
5227         * blockframe.c (find_pc_sect_containing_function): New function.
5228         * breakpoint.c (print_breakpoint_location): Don't call
5229         find_pc_sect_function.
5230         * linespec.c (create_sals_line_offset): Record the location's
5231         symbol in the sal.
5232         * linespec.c (convert_address_location_to_sals): Fill in sal's
5233         symbol with find_pc_sect_containing_function.
5234         * symtab.c (find_function_start_sal): Rename to ...
5235         (find_function_start_sal_1): ... this.
5236         (find_function_start_sal): Reimplement as wrapper around
5237         find_function_start_sal_1, and use
5238         find_pc_sect_containing_function to fill in the sal's symbol.
5239         (find_function_start_sal(symbol*, bool)): Adjust.
5240         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5241         comments.
5242         (find_pc_sect_containing_function): Declare.
5243
5244 2018-06-29  Pedro Alves  <palves@redhat.com>
5245
5246         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5247         true if the the location has no symbol.
5248
5249 2018-06-28  Tom Tromey  <tom@tromey.com>
5250
5251         * NEWS: Mention --enable-codesign.
5252         * silent-rules.mk (ECHO_SIGN): New variable.
5253         * configure.ac: Add --enable-codesign.
5254         * configure: Rebuild.
5255         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5256         (gdb$(EXEEXT)): Optionally invoke codesign.
5257
5258 2018-06-28  Pedro Alves  <palves@redhat.com>
5259
5260         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5261         comments.
5262         (switch_to_thread_no_regs): Adjust comment.
5263         * infcmd.c (stop_pc): Delete.
5264         (post_create_inferior, info_program_command): Replace references
5265         to stop_pc with references to thread_info->suspend.stop_pc.
5266         * inferior.h (stop_pc): Delete declaration.
5267         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5268         (handle_inferior_event_1, handle_signal_stop)
5269         (process_event_stop_test, keep_going_stepped_thread)
5270         (handle_step_into_function, handle_step_into_function_backward)
5271         (print_stop_location): Replace references to stop_pc with
5272         references to thread_info->suspend.stop_pc.
5273         (struct infcall_suspend_state) <stop_pc>: Delete field.
5274         (save_infcall_suspend_state, restore_infcall_suspend_state):
5275         Remove references to inf_stat->stop_pc.
5276         * linux-fork.c (fork_load_infrun_state): Likewise.
5277         * record-btrace.c (record_btrace_set_replay): Likewise.
5278         * record-full.c (record_full_goto_entry): Likewise.
5279         * remote.c (print_one_stopped_thread): Likewise.
5280         * target.c (target_resume): Extend comment.
5281         * thread.c (set_executing_thread): New.
5282         (set_executing): Use it.
5283         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5284         Remove references to stop_pc.
5285
5286 2018-06-28  Pedro Alves  <palves@redhat.com>
5287
5288         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5289         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5290
5291 2018-06-28  Tom Tromey  <tom@tromey.com>
5292
5293         * coffread.c (coff_symfile_finish): Update.
5294         * xcoffread.c (xcoff_symfile_finish): Update.
5295         * elfread.c (elf_symfile_finish): Update.
5296         * symfile.h (dwarf2_free_objfile): Don't declare.
5297         * dwarf2read.c (_initialize_dwarf2_read): Use
5298         register_objfile_data_with_cleanup.
5299         (dwarf2_free_objfile): Now static.  Change signature.
5300
5301 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5302
5303         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5304         option "-o" to add-symbol-file-load to add an offset to each
5305         section's load address.
5306         * symfile.c (set_objfile_default_section_offset): New function.
5307
5308 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5309
5310         * symfile.c (add_symbol_file_command): Make sure that sections
5311         with the same name are sorted in the same order.
5312
5313 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5314
5315         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5316         require the second argument.  If omitted, load sections at the
5317         addresses specified in the file.
5318
5319 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5320
5321         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5322         (_initialize_symfile): Add option "-o" to symbol-file to add an
5323         offset to each section of the symbol file.
5324
5325 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5326
5327         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5328
5329 2018-06-27  Tom Tromey  <tom@tromey.com>
5330
5331         * stack.c (_initialize_stack): Update "func" help text.
5332
5333 2018-06-27  Tom Tromey  <tom@tromey.com>
5334
5335         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5336         std::vector.
5337         (unwind_infopy_str, pyuw_create_unwind_info)
5338         (unwind_infopy_add_saved_register, pyuw_sniffer)
5339         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5340         Update.
5341         (struct saved_reg): Add constructor.
5342         <value>: Now a gdbpy_ref<>.
5343
5344 2018-06-27  Tom Tromey  <tom@tromey.com>
5345
5346         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5347
5348 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5349
5350         * gdb-gdb.py.in: Format using autopep8.
5351
5352 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5353
5354         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5355         (type_lookup_function): Recognize CORE_ADDR values.
5356
5357 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5358
5359         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5360         print tag_name.
5361
5362 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5363
5364         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5365         <__lt__>: Add.
5366
5367 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5368
5369         * gdb-gdb.py: Move to...
5370         * gdb-gdb.py.in: ... here.
5371         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5372         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5373         dependencies.
5374         (distclean): Remove gdb-gdb.py when cleaning.
5375         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5376         * configure: Re-generate.
5377
5378 2018-06-27  Pedro Alves  <palves@redhat.com>
5379
5380         * proc-service.c (get_ps_regcache): New.
5381         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5382         (ps_lsetfpregs): Use it.
5383
5384 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5385
5386         PR gdb/21695
5387         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5388         (dwarf_decode_lines_1): Adjust.
5389
5390 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5391
5392         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5393         override.
5394         <info_proc>: Likewise.
5395
5396 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5397
5398         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5399         to windows_fetch_one_register, and only handle the case of
5400         fetching one register.  Move the code that reloads the context
5401         and iterates over all registers if R is negative to...
5402         (windows_nat_target::fetch_registers): ... here.
5403         (do_windows_store_inferior_registers): Rename to
5404         windows_store_one_register, and only handle the case of storing
5405         one register.  Move the code that handles the case where r is
5406         negative to...
5407         (windows_nat_target::store_registers) ... here.
5408
5409 2018-06-26  Tom Tromey  <tom@tromey.com>
5410
5411         PR rust/22574:
5412         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5413         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5414         Update.
5415         (rust_internal_print_type): Add podata parameter.
5416         (rust_print_type): Update.
5417
5418 2018-06-26  Tom Tromey  <tom@tromey.com>
5419
5420         * typeprint.h (struct print_offset_data) <update, finish,
5421         maybe_print_hole>: New methods.
5422         <indentation>: New constant.
5423         * typeprint.c (print_offset_data::indentation): Define.
5424         (print_offset_data::maybe_print_hole, print_offset_data::update)
5425         (print_offset_data::finish): Move from c-typeprint.c and rename.
5426         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5427         (print_spaces_filtered_with_print_options): Update.
5428         (c_print_type_union_field_offset, maybe_print_hole)
5429         (c_print_type_struct_field_offset): Move to typeprint.c and
5430         rename.
5431         (c_type_print_base_struct_union): Update.
5432
5433 2018-06-25  Pedro Alves  <palves@redhat.com>
5434
5435         * gdbthread.h (thread_info_ref, delete_thread)
5436         (delete_thread_silent, first_thread_of_inferior)
5437         (any_thread_of_inferior, switch_to_thread)
5438         (enable_thread_stack_temporaries)
5439         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5440         (get_last_thread_stack_temporary)
5441         (value_in_thread_stack_temporaries, can_access_registers_thread):
5442         Spell out "struct thread_info" instead of just "thread_info".
5443         * inferior.h (notice_new_inferior): Likewise.
5444
5445 2018-06-25  Pedro Alves  <palves@redhat.com>
5446
5447         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5448         pass thread_info pointer to delete_thread.
5449         (windows_nat_target::detach): Pass inferior pointer to
5450         detach_inferior.
5451         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5452         delete_thread.
5453         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5454         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5455         and pass a thread_info pointer to delete_thread.
5456         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5457         pass thread_info pointer to delete_thread.
5458         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5459         delete_thread_silent call.
5460         * procfs.c (procfs_target::detach): Pass inferior pointer to
5461         detach_inferior.
5462         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5463         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5464         delete_thread_silent call.
5465         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5466         pass thread_info pointer to delete_thread.
5467         (windows_nat_target::detach): Pass inferior pointer to
5468         delete_inferior.
5469
5470 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5471
5472         * regcache.c (readable_regcache::read_part): Fix asserts.
5473         (reg_buffer::raw_collect_part): New function.
5474         (regcache::write_part): Fix asserts.
5475         (reg_buffer::raw_supply_part): New function.
5476         (regcache::transfer_regset_register): New helper function.
5477         (regcache::transfer_regset): Call new functions.
5478         (regcache_supply_regset): Use gdb_byte*.
5479         (regcache::supply_regset): Likewise.
5480         (regcache_collect_regset): Likewise.
5481         (regcache::collect_regset): Likewise.
5482         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5483         (reg_buffer::raw_supply_part): Likewise.
5484         (regcache::transfer_regset_register): Likewise.
5485         (regcache::transfer_regset): Use gdb_byte*.
5486
5487 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5488
5489         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5490
5491 2018-06-21  Pedro Alves  <palves@redhat.com>
5492
5493         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5494         instead of a ptid_t.  All callers adjusted.
5495         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5496         adjusted.
5497         (print_ada_task_info, display_current_task_id, task_command_1):
5498         Adjust.
5499         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5500         inferior_thread.
5501         (breakpoint_kind): Adjust.
5502         (remove_breakpoints_pid): Rename to ...
5503         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5504         pointer.  All callers adjusted.
5505         (bpstat_clear_actions): Use inferior_thread.
5506         (get_bpstat_thread): New.
5507         (bpstat_do_actions): Use it.
5508         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5509         to take a thread_info pointer.  All callers adjusted.
5510         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5511         (breakpoint_re_set_thread): Use inferior_thread.
5512         * breakpoint.h (struct inferior): Forward declare.
5513         (bpstat_stop_status): Update.
5514         (remove_breakpoints_pid): Delete.
5515         (remove_breakpoints_inf): New.
5516         * bsd-uthread.c (bsd_uthread_target::wait)
5517         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5518         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5519         (maint_btrace_packet_history_cmd)
5520         (maint_btrace_clear_packet_history_cmd): Adjust.
5521         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5522         inferior_thread.
5523         * cli/cli-interp.c: Include "inferior.h".
5524         * common/refcounted-object.h (struct
5525         refcounted_object_ref_policy): New.
5526         * compile/compile-object-load.c: Include gdbthread.h.
5527         (store_regs): Use inferior_thread.
5528         * corelow.c (core_target::close): Use current_inferior.
5529         (core_target_open): Adjust to use first_thread_of_inferior and use
5530         the current inferior.
5531         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5532         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5533         <thread>: ... this new field.  All references adjusted.
5534         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5535         Take a thread_info pointer instead of a ptid_t.
5536         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5537         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5538         thread_info pointer instead of a ptid_t.
5539         * elfread.c: Include "inferior.h".
5540         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5541         Use inferior_thread.
5542         * eval.c (evaluate_subexp): Likewise.
5543         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5544         inferior_thread.
5545         * gdb_proc_service.h (struct thread_info): Forward declare.
5546         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5547         <thread>: ... this new field.  All references adjusted.
5548         * gdbarch.h, gdbarch.c: Regenerate.
5549         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5550         'thread' parameter.  All implementations and callers adjusted.
5551         * gdbthread.h (thread_info) <set_running>: New method.
5552         (delete_thread, delete_thread_silent): Take a thread_info pointer
5553         instead of a ptid.
5554         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5555         (first_thread_of_process): Delete, replaced by ...
5556         (first_thread_of_inferior): ... this new function.  All callers
5557         adjusted.
5558         (any_live_thread_of_process): Delete, replaced by ...
5559         (any_live_thread_of_inferior): ... this new function.  All callers
5560         adjusted.
5561         (switch_to_thread, switch_to_no_thread): Declare.
5562         (is_executing): Delete.
5563         (enable_thread_stack_temporaries): Update comment.
5564         <enable_thread_stack_temporaries>: Take a thread_info pointer
5565         instead of a ptid_t.  Incref the thread.
5566         <~enable_thread_stack_temporaries>: Decref the thread.
5567         <m_ptid>: Delete
5568         <m_thr>: New.
5569         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5570         (get_last_thread_stack_temporary)
5571         (value_in_thread_stack_temporaries, can_access_registers_thread):
5572         Take a thread_info pointer instead of a ptid_t.  All callers
5573         adjusted.
5574         * infcall.c (get_call_return_value): Use inferior_thread.
5575         (run_inferior_call): Work with thread pointers instead of ptid_t.
5576         (call_function_by_hand_dummy): Work with thread pointers instead
5577         of ptid_t.  Use thread_info_ref.
5578         * infcmd.c (proceed_thread_callback): Access thread's state
5579         directly.
5580         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5581         access thread's state directly.
5582         (continue_command): Use inferior_thread.
5583         (info_program_command): Use find_thread_ptid and access thread
5584         state directly.
5585         (proceed_after_attach_callback): Use thread state directly.
5586         (notice_new_inferior): Take a thread_info pointer instead of a
5587         ptid_t.  All callers adjusted.
5588         (exit_inferior): Take an inferior pointer instead of a pid.  All
5589         callers adjusted.
5590         (exit_inferior_silent): New.
5591         (detach_inferior): Delete.
5592         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5593         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5594         (detach_inferior_command, kill_inferior_command): Use
5595         find_inferior_id instead of valid_gdb_inferior_id and
5596         gdb_inferior_id_to_pid.
5597         (inferior_command): Use inferior and thread pointers.
5598         * inferior.h (struct thread_info): Forward declare.
5599         (notice_new_inferior): Take a thread_info pointer instead of a
5600         ptid_t.  All callers adjusted.
5601         (detach_inferior): Delete declaration.
5602         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5603         instead of a pid.  All callers adjusted.
5604         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5605         (valid_gdb_inferior_id): Delete.
5606         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5607         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5608         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5609         ...
5610         <inf>: ... this new field.
5611         <step_ptid>: Delete, replaced by ...
5612         <step_thread>: ... this new field.
5613         (get_displaced_stepping_state): Take an inferior pointer instead
5614         of a pid.  All callers adjusted.
5615         (displaced_step_in_progress_any_inferior): Adjust.
5616         (displaced_step_in_progress_thread): Take a thread pointer instead
5617         of a ptid_t.  All callers adjusted.
5618         (displaced_step_in_progress, add_displaced_stepping_state): Take
5619         an inferior pointer instead of a pid.  All callers adjusted.
5620         (get_displaced_step_closure_by_addr): Adjust.
5621         (remove_displaced_stepping_state): Take an inferior pointer
5622         instead of a pid.  All callers adjusted.
5623         (displaced_step_prepare_throw, displaced_step_prepare)
5624         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5625         All callers adjusted.
5626         (start_step_over): Adjust.
5627         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5628         displaced step queue.
5629         (do_target_resume): Adjust.
5630         (fetch_inferior_event): Use inferior_thread.
5631         (context_switch, get_inferior_stop_soon): Take an
5632         execution_control_state pointer instead of a ptid_t.  All callers
5633         adjusted.
5634         (switch_to_thread_cleanup): Delete.
5635         (stop_all_threads): Use scoped_restore_current_thread.
5636         * inline-frame.c: Include "gdbthread.h".
5637         (inline_state) <inline_state>: Take a thread pointer instead of a
5638         ptid_t.  All callers adjusted.
5639         <ptid>: Delete, replaced by ...
5640         <thread>: ... this new field.
5641         (find_inline_frame_state): Take a thread pointer instead of a
5642         ptid_t.  All callers adjusted.
5643         (skip_inline_frames, step_into_inline_frame)
5644         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5645         pointer instead of a ptid_t.  All callers adjusted.
5646         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5647         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5648         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5649         pointers directly.
5650         * linux-nat.c (get_detach_signal): Likewise.
5651         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5652         (thread_db_notice_clone): Adjust.
5653         (thread_db_find_new_threads_silently)
5654         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5655         a thread pointer instead of a ptid_t.  All callers adjusted.
5656         * mi/mi-cmd-var.c: Include "inferior.h".
5657         (mi_cmd_var_update_iter): Update to use thread pointers.
5658         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5659         inferior directly.
5660         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5661         out to ...
5662         (mi_output_running): ... this new function.
5663         (mi_on_resume_1): Adjust to use it.
5664         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5665         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5666         directly.
5667         (interrupt_thread_callback): : Adjust to use thread and inferior
5668         pointers.
5669         * proc-service.c: Include "gdbthread.h".
5670         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5671         * progspace-and-thread.c: Include "inferior.h".
5672         * progspace.c: Include "inferior.h".
5673         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5674         hold a reference to an inferior_object.
5675         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5676         inferior_thread.
5677         * python/py-inferior.c (struct inferior_object): Give the type a
5678         tag name instead of a typedef.
5679         (python_on_normal_stop): No need to check if the current thread is
5680         listed.
5681         (inferior_to_inferior_object): Change return type to
5682         inferior_object.  All callers adjusted.
5683         (find_thread_object): Delete, bits factored out to ...
5684         (thread_to_thread_object): ... this new function.
5685         * python/py-infthread.c (create_thread_object): Use
5686         inferior_to_inferior_object.
5687         (thpy_is_stopped): Use thread pointer directly.
5688         (gdbpy_selected_thread): Use inferior_thread.
5689         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5690         field, replaced with ...
5691         <thread>: ... this new field.  All users adjusted.
5692         (btpy_insn_or_gap_new): Drop const.
5693         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5694         callers adjusted.
5695         * python/py-record.c: Include "gdbthread.h".
5696         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5697         a ptid_t.  All callers adjusted.
5698         (gdbpy_current_recording): Use inferior_thread.
5699         * python/py-record.h (recpy_record_object) <ptid>: Delete
5700         field, replaced with ...
5701         <thread>: ... this new field.  All users adjusted.
5702         (recpy_element_object) <ptid>: Delete
5703         field, replaced with ...
5704         <thread>: ... this new field.  All users adjusted.
5705         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5706         a ptid_t.  All callers adjusted.
5707         * python/py-threadevent.c: Include "gdbthread.h".
5708         (get_event_thread): Use thread_to_thread_object.
5709         * python/python-internal.h (struct inferior_object): Forward
5710         declare.
5711         (find_thread_object, find_inferior_object): Delete declarations.
5712         (thread_to_thread_object, inferior_to_inferior_object): New
5713         declarations.
5714         * record-btrace.c: Include "inferior.h".
5715         (require_btrace_thread): Use inferior_thread.
5716         (record_btrace_frame_sniffer)
5717         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5718         (get_thread_current_frame): Use scoped_restore_current_thread and
5719         switch_to_thread.
5720         (get_thread_current_frame): Use thread pointer directly.
5721         (record_btrace_replay_at_breakpoint): Use thread's inferior
5722         pointer directly.
5723         * record-full.c: Include "inferior.h".
5724         * regcache.c: Include "gdbthread.h".
5725         (get_thread_arch_regcache): Use the inferior's address space
5726         directly.
5727         (get_thread_regcache, registers_changed_thread): New.
5728         * regcache.h (get_thread_regcache(thread_info *thread)): New
5729         overload.
5730         (registers_changed_thread): New.
5731         (remote_target) <remote_detach_1>: Swap order of parameters.
5732         (remote_add_thread): <remote_add_thread>: Return the new thread.
5733         (get_remote_thread_info(ptid_t)): New overload.
5734         (remote_target::remote_notice_new_inferior): Use thread pointers
5735         directly.
5736         (remote_target::process_initial_stop_replies): Use
5737         thread_info::set_running.
5738         (remote_target::remote_detach_1, remote_target::detach)
5739         (extended_remote_target::detach): Adjust.
5740         * stack.c (frame_show_address): Use inferior_thread.
5741         * target-debug.h (target_debug_print_thread_info_pp): New.
5742         * target-delegates.c: Regenerate.
5743         * target.c (default_thread_address_space): Delete.
5744         (memory_xfer_partial_1): Use current_inferior.
5745         (target_detach): Use current_inferior.
5746         (target_thread_address_space): Delete.
5747         (generic_mourn_inferior): Use current_inferior.
5748         * target.h (struct target_ops) <thread_address_space>: Delete.
5749         (target_thread_address_space): Delete.
5750         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5751         pointers directly.
5752         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5753         thread pointer instead of a ptid_t.  Adjust all callers.
5754         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5755         (first_thread_of_process): Delete, replaced by ...
5756         (first_thread_of_inferior): ... this new function.  All callers
5757         adjusted.
5758         (any_thread_of_process): Rename to ...
5759         (any_thread_of_inferior): ... this, and take an inferior pointer.
5760         (any_live_thread_of_process): Rename to ...
5761         (any_live_thread_of_inferior): ... this, and take an inferior
5762         pointer.
5763         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5764         (value_in_thread_stack_temporaries)
5765         (get_last_thread_stack_temporary): Take a thread pointer instead
5766         of a ptid_t.  Adjust all callers.
5767         (thread_info::set_running): New.
5768         (validate_registers_access): Use inferior_thread.
5769         (can_access_registers_ptid): Rename to ...
5770         (can_access_registers_thread): ... this, and take a thread
5771         pointer.
5772         (print_thread_info_1): Adjust to compare thread pointers instead
5773         of ptids.
5774         (switch_to_no_thread, switch_to_thread): Make extern.
5775         (scoped_restore_current_thread::~scoped_restore_current_thread):
5776         Use m_thread pointer directly.
5777         (scoped_restore_current_thread::scoped_restore_current_thread):
5778         Use inferior_thread.
5779         (thread_command): Use thread pointer directly.
5780         (thread_num_make_value_helper): Use inferior_thread.
5781         * top.c (execute_command): Use inferior_thread.
5782         * tui/tui-interp.c: Include "inferior.h".
5783         * varobj.c (varobj_create): Use inferior_thread.
5784         (value_of_root_1): Use find_thread_global_id instead of
5785         global_thread_id_to_ptid.
5786
5787 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5788
5789         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5790         possible.
5791         (regcache::write_part): Likewise.
5792         (readable_regcache::cooked_read_part): Update comment.
5793         (readable_regcache::cooked_write_part): Likewise.
5794         * regcache.h: (readable_regcache::read_part): Likewise.
5795         (regcache::write_part): Likewise.
5796
5797 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5798             Dirk Schubert  <dirk.schubert@arm.com>
5799
5800         * aarch64-linux-nat.c (post_attach): New.
5801         (aarch64_linux_nat_target::post_attach): Override post_attach to
5802         record the number of hardware debug registers.
5803
5804 2018-06-20  Tom Tromey  <tom@tromey.com>
5805
5806         * python/py-param.c (add_setshow_generic): Make parameters const.
5807         (parmpy_init): Update.
5808
5809 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5810
5811         * regcache.h (regcache_cooked_read_ftype): Rename to...
5812         (register_read_ftype): ...this, change type to function_view.
5813         (class reg_buffer) <save>: Remove src parameter.
5814         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5815         parameter non-const in first overload.  Remove src parameter in
5816         second overload.
5817         * regcache.c (do_cooked_read): Remove.
5818         (readonly_detached_regcache::readonly_detached_regcache): Make
5819         parameter non-const, adjust call to other constructor.
5820         (reg_buffer::save): Remove src parameter.
5821         * frame.c (do_frame_register_read): Remove.
5822         (frame_save_as_regcache): Use lambda function.
5823         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5824         parameter to ppu2spu_data *.
5825         (ppu2spu_sniffer): Use lambda function.
5826
5827 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5828
5829         * record-full.c (record_full_target::insert_breakpoint): Remove
5830         "struct" keyword, add const.
5831
5832 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5833
5834         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5835         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5836         * configure.ac: Remove AC_PREREQ, add missing quoting.
5837         * gnulib/configure.ac: Modernize usage of
5838         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5839         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5840         (AUTOMAKE_VERSION): Bump to 1.15.1.
5841         * configure: Re-generate.
5842         * config.in: Re-generate.
5843         * aclocal.m4: Re-generate.
5844         * gnulib/aclocal.m4: Re-generate.
5845         * gnulib/config.in: Re-generate.
5846         * gnulib/configure: Re-generate.
5847         * gnulib/import/Makefile.in: Re-generate.
5848
5849 2018-06-19  Pedro Alves  <palves@redhat.com>
5850
5851         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5852         (lookup_minimal_symbol_by_pc_section): ... here with
5853         gdb_assert_not_reached added.
5854
5855 2018-06-19  Pedro Alves  <palves@redhat.com>
5856
5857         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5858         parameter with a block parameter.  Compare location's block symbol
5859         with the frame's block instead of addresses.
5860         (skip_inline_frames): Pass the current block instead of the
5861         frame's address.  Break out as soon as we determine the frame
5862         should not be skipped.
5863
5864 2018-06-18  Tom Tromey  <tom@tromey.com>
5865
5866         * solib-aix.c (solib_aix_get_section_offsets): Return
5867         unique_xmalloc_ptr.
5868         (solib_aix_solib_create_inferior_hook): Update.
5869
5870 2018-06-18  Tom Tromey  <tom@tromey.com>
5871
5872         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5873
5874 2018-06-18  Tom Tromey  <tom@tromey.com>
5875
5876         * solib-frv.c (frv_relocate_main_executable): Use
5877         unique_xmalloc_ptr.
5878         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5879         unique_xmalloc_ptr.
5880
5881 2018-06-18  Tom Tromey  <tom@tromey.com>
5882
5883         * objfiles.h (inhibit_section_map_updates): Update.
5884         (resume_section_map_updates, resume_section_map_updates_cleanup):
5885         Remove.
5886         * solib-svr4.c (svr4_handle_solib_event): Update.
5887         * objfiles.c (inhibit_section_map_updates): Return
5888         scoped_restore_tmpl<int>.
5889         (resume_section_map_updates, resume_section_map_updates_cleanup):
5890         Remove.
5891
5892 2018-06-18  Tom Tromey  <tom@tromey.com>
5893
5894         * valprint.h (read_string): Update.
5895         * valprint.c (read_string): Change type of "buffer".
5896         (val_print_string): Update.
5897         * python/py-value.c (valpy_string): Update.
5898         * language.h (struct language_defn) <la_get_string>: Change
5899         type of "buffer".
5900         (default_get_string, c_get_string): Update.
5901         * language.c (default_get_string): Change type of "buffer".
5902         * guile/scm-value.c (gdbscm_value_to_string): Update.
5903         * c-lang.c (c_get_string): Change type of "buffer".
5904
5905 2018-06-18  Tom Tromey  <tom@tromey.com>
5906
5907         * ser-mingw.c (struct pipe_state_destroyer): New.
5908         (pipe_state_up): New typedef.
5909         (cleanup_pipe_state): Remove.
5910         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5911
5912 2018-06-18  Tom Tromey  <tom@tromey.com>
5913
5914         * rust-lang.h (rust_yyerror): Don't declare.
5915         * rust-lang.c (rust_language_defn): Update.
5916         * rust-exp.y (yyerror): Now static.
5917         * parse.c (parse_exp_in_context_1): Update.
5918         * p-lang.h (p_yyerror): Don't declare.
5919         * p-lang.c (p_language_defn): Update.
5920         * p-exp.y (yyerror): Now static.
5921         * opencl-lang.c (opencl_language_defn): Update.
5922         * objc-lang.c (objc_language_defn): Update.
5923         * m2-lang.h (m2_yyerror): Don't declare.
5924         * m2-lang.c (m2_language_defn): Update.
5925         * m2-exp.y (yyerror): Now static.
5926         * language.h (struct language_defn) <la_error>: Remove.
5927         * language.c (unk_lang_error): Remove.
5928         (unknown_language_defn, auto_language_defn): Remove.
5929         * go-lang.h (go_yyerror): Don't declare.
5930         * go-lang.c (go_language_defn): Update.
5931         * go-exp.y (yyerror): Now static.
5932         * f-lang.h (f_yyerror): Don't declare.
5933         * f-lang.c (f_language_defn): Update.
5934         * f-exp.y (yyerror): Now static.
5935         * d-lang.h (d_yyerror): Don't declare.
5936         * d-lang.c (d_language_defn): Update.
5937         * d-exp.y (yyerror): Now static.
5938         * c-lang.h (c_yyerror): Don't declare.
5939         * c-lang.c (c_language_defn, cplus_language_defn)
5940         (asm_language_defn, minimal_language_defn): Update.
5941         * c-exp.y (yyerror): Now static.
5942         * ada-lang.h (ada_yyerror): Don't declare.
5943         * ada-lang.c (ada_language_defn): Update.
5944         * ada-exp.y (yyerror): Now static.
5945
5946 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5947
5948         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5949         (store_sveregs_to_thread): Likewise.
5950         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5951         (aarch64_linux_store_inferior_registers): Likewise.
5952         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5953         function.
5954         (aarch64_sve_regs_copy_to_regcache): Likewise.
5955         (aarch64_sve_regs_copy_from_regcache): Likewise.
5956         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5957         declaration.
5958         (aarch64_sve_regs_copy_to_regcache): Likewise.
5959         (aarch64_sve_regs_copy_from_regcache): Likewise.
5960         (sve_context): Structure from Linux headers.
5961         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5962         (SVE_SIG_ZREG_SIZE): Likewise.
5963         (SVE_SIG_PREG_SIZE): Likewise.
5964         (SVE_SIG_FFR_SIZE): Likewise.
5965         (SVE_SIG_REGS_OFFSET): Likewise.
5966         (SVE_SIG_ZREGS_OFFSET): Likewise.
5967         (SVE_SIG_ZREG_OFFSET): Likewise.
5968         (SVE_SIG_ZREGS_SIZE): Likewise.
5969         (SVE_SIG_PREGS_OFFSET): Likewise.
5970         (SVE_SIG_PREG_OFFSET): Likewise.
5971         (SVE_SIG_PREGS_SIZE): Likewise.
5972         (SVE_SIG_FFR_OFFSET): Likewise.
5973         (SVE_SIG_REGS_SIZE): Likewise.
5974         (SVE_SIG_CONTEXT_SIZE): Likewise.
5975         (SVE_PT_REGS_MASK): Likewise.
5976         (SVE_PT_REGS_FPSIMD): Likewise.
5977         (SVE_PT_REGS_SVE): Likewise.
5978         (SVE_PT_VL_INHERIT): Likewise.
5979         (SVE_PT_VL_ONEXEC): Likewise.
5980         (SVE_PT_REGS_OFFSET): Likewise.
5981         (SVE_PT_FPSIMD_OFFSET): Likewise.
5982         (SVE_PT_FPSIMD_SIZE): Likewise.
5983         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5984         (SVE_PT_SVE_PREG_SIZE): Likewise.
5985         (SVE_PT_SVE_FFR_SIZE): Likewise.
5986         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5987         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5988         (__SVE_SIG_TO_PT): Likewise.
5989         (SVE_PT_SVE_OFFSET): Likewise.
5990         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5991         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5992         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5993         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5994         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5995         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5996         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5997         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5998         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5999         (SVE_PT_SVE_SIZE): Likewise.
6000         (SVE_PT_SIZE): Likewise.
6001         (HAS_SVE_STATE): New define.
6002
6003 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6004
6005         * nat/aarch64-sve-linux-sigcontext.h: New file.
6006         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6007         new files.
6008         (SVE_VQ_MIN): Likewise.
6009         (SVE_VQ_MAX): Likewise.
6010         (SVE_VL_MIN): Likewise.
6011         (SVE_VL_MAX): Likewise.
6012         (SVE_NUM_ZREGS): Likewise.
6013         (SVE_NUM_PREGS): Likewise.
6014         (sve_vl_valid): Likewise.
6015         (struct user_sve_header): Likewise.
6016
6017 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6018             Richard Bunt <Richard.Bunt@arm.com>
6019
6020         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6021         was requested by GDB.
6022
6023 2018-06-15  Tom de Vries  <tdevries@suse.de>
6024
6025         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6026
6027 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6028
6029         * gnulib/update-gnulib.sh: Print expected versions of
6030         autoconf/aclocal.
6031
6032 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6033
6034         * arch-utils.c (default_type_align): Use type_length_units.
6035         * gdbtypes.c (type_align): Use type_length_units.
6036
6037 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6038
6039         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6040         of 'define' command.
6041
6042 2018-06-14  Tom de Vries  <tdevries@suse.de>
6043
6044         PR cli/22573
6045         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6046         get_no_prettyformat_print_options.
6047
6048 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6049
6050         * sparc-nat.h: Include target.h.
6051         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6052         <fetch_registers>: Remove this argument in function call.
6053         <store_registers>: Remove this argument in function call, remove
6054         extra semicolon.
6055         <low_forget_process>: Call sparc64_forget_process instead of
6056         sparc_forget_process.
6057
6058 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6059
6060         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6061         (procfs_target::make_corefile_notes): Adjust to new
6062         target_read_alloc return type.
6063
6064 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6065             Stephen Roberts  <stephen.roberts@arm.com>
6066
6067         PR gdb/22882
6068         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6069         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6070         Move should_notify_stop local into more inner scope.
6071
6072 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6073             Stephen Roberts  <stephen.roberts@arm.com>
6074
6075         PR gdb/22882
6076         * infrun.c (resume_1): Add call to mark_async_event_handler.
6077
6078 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6079
6080         * infrun.c (do_target_wait): Change old version of $pc printed.
6081
6082 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6083
6084         * dwarf2read.c (read_index_from_section): Rename to...
6085         (read_gdb_index_from_section): ... this, update all callers.
6086         (dwarf2_read_index): Rename to...
6087         (dwarf2_read_gdb_index): ... this, update all callers.
6088
6089 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6090
6091         * gdb/hppa-linux-nat.c
6092         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6093         hppa_linux_nat_target::fetch_registers.
6094
6095 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6096
6097         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6098         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6099         (AARCH64_DWARF_SVE_FFR): Likewise.
6100         (AARCH64_DWARF_SVE_P0): Likewise.
6101         (AARCH64_DWARF_SVE_Z0): Likewise.
6102
6103 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6104
6105         * common/common-regcache.h (raw_compare): New function.
6106         * regcache.c (regcache::raw_compare): Likewise.
6107         * regcache.h (regcache::raw_compare): New declaration.
6108
6109 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6110
6111         * common/common-regcache.h (reg_buffer_common): New structure.
6112         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6113         (reg_buffer::raw_supply): Likewise.
6114         (reg_buffer::raw_supply_integer): Likewise.
6115         (reg_buffer::raw_supply_zeroed): Likewise.
6116         (reg_buffer::raw_collect): Likewise.
6117         (reg_buffer::raw_collect_integer): Likewise.
6118         * regcache.h (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
6125 2018-06-10  Tom Tromey  <tom@tromey.com>
6126
6127         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6128         (class remote_state) <stop_reply_queue>: Now std::vector.
6129         (remote_state::~remote_state)
6130         (remote_target::stop_reply_queue_length): Update.
6131         (struct queue_iter_param, remove_child_of_pending_fork)
6132         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6133         (check_pending_event_prevents_wildcard_vcont_callback)
6134         (remove_stop_reply_for_inferior)
6135         (remove_stop_reply_of_remote_state)
6136         (remote_notif_remove_once_on_match)
6137         (stop_reply_match_ptid_and_ws)
6138         (remote_kill_child_of_pending_fork): Remove.
6139         (remote_target::remove_new_fork_children)
6140         (remote_target::check_pending_events_prevent_wildcard_vcont)
6141         (remote_target::discard_pending_stop_replies)
6142         (remote_target::discard_pending_stop_replies_in_queue)
6143         (remote_target::remote_notif_remove_queued_reply)
6144         (remote_target::queued_stop_reply)
6145         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6146         (remote_target::wait, remote_target::kill_new_fork_children)
6147         (remote_target::async): Update.
6148
6149 2018-06-10  Tom Tromey  <tom@tromey.com>
6150
6151         * record-full.c (record_full_arch_list_cleanups): Remove.
6152         (record_full_message): Use try/catch.
6153         (record_full_wait_cleanups): Remove.
6154         (record_full_wait_1): Use try/catch.
6155         (record_full_restore): Likewise.
6156
6157 2018-06-10  Tom Tromey  <tom@tromey.com>
6158
6159         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6160         declare VEC.  Add constructor.
6161         <in_target_beneath>: Now bool.
6162         (record_full_breakpoints): Now a std::vector, static.
6163         (record_full_sync_record_breakpoints)
6164         (record_full_init_record_breakpoints)
6165         (record_full_target::insert_breakpoint)
6166         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6167
6168 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6169
6170         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6171         * serial.c (serial_interface_lookup): Remove struct keyword.
6172
6173 2018-06-10  Tom Tromey  <tom@tromey.com>
6174
6175         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6176         method.
6177         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6178         a method.
6179         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6180         method.
6181         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6182         "beneath" as a method.
6183         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6184         Use "beneath" as a method.
6185
6186 2018-06-10  Tom Tromey  <tom@tromey.com>
6187
6188         * tracefile.c (struct trace_file_writer_deleter): New.
6189         <operator()>: Rename from trace_file_writer_xfree.
6190         (trace_file_writer_up): New typedef.
6191         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6192
6193 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6194
6195         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6196         <m_registers, m_register_status>: Change type to
6197         std::unique_ptr.
6198         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6199         XCNEWVEC.
6200
6201 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6202
6203         * common/common-regcache.h (enum register_status): Add
6204         underlying type "signed char".
6205         * regcache.h (reg_buffer) <m_register_status>: Change type to
6206         register_status *.
6207         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6208         register_status instead of signed char.
6209         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6210         (reg_buffer::get_register_status): Remove cast.
6211         (readable_regcache::raw_read): Remove cast.
6212         (readable_regcache::cooked_read): Remove cast.
6213
6214 2018-06-09  Tom Tromey  <tom@tromey.com>
6215
6216         * source.c (reverse_search_command, forward_search_command): Use
6217         scoped_fd.
6218
6219 2018-06-09  Tom Tromey  <tom@tromey.com>
6220
6221         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6222         (serial_ops_list): Now static, std::vector.
6223         (serial_interface_lookup, serial_add_interface): Update.
6224
6225 2018-06-09  Tom Tromey  <tom@tromey.com>
6226
6227         * dwarf2read.c (process_cu_includes): Update.
6228         (process_full_comp_unit): Update.
6229         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6230         std::vector.
6231
6232 2018-06-08  Paul Koning  <paul_koning@dell.com>
6233
6234         PR gdb/23252
6235
6236         * python/python.c (do_start_initialization):
6237         Avoid call to internal Python API.
6238         (init__gdb_module): New function.
6239
6240 2018-06-08  Gary Benson <gbenson@redhat.com>
6241
6242         * linux-thread-db.c (valprint.h): New include.
6243         (struct check_thread_db_info): New structure.
6244         (check_thread_db_on_load, tdb_testinfo): New static globals.
6245         (check_thread_db, check_thread_db_callback): New functions.
6246         (try_thread_db_load_1): Run integrity checks if requested.
6247         (maintenance_check_libthread_db): New function.
6248         (_initialize_thread_db): Register "maint check libthread-db"
6249         and "maint set/show check-libthread-db".
6250         * NEWS: Mention the above new commands.
6251
6252 2018-06-08  Tom Tromey  <tom@tromey.com>
6253
6254         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6255         now a method.
6256
6257 2018-06-08  Tom Tromey  <tom@tromey.com>
6258
6259         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6260
6261 2018-06-08  Tom Tromey  <tom@tromey.com>
6262
6263         * common/btrace-common.h (struct btrace_data): Add constructor,
6264         destructor, move assignment operator.
6265         <empty, clear, fini>: New methods.
6266         <format>: Initialize.
6267         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6268         (btrace_data_empty): Don't declare.
6269         * common/btrace-common.c (btrace_data_init): Remove.
6270         (btrace_data::fini): Rename from btrace_data_fini.
6271         (btrace_data::empty): Rename from btrace_data_empty.
6272         (btrace_data::clear): Rename from btrace_data_clear.  Return
6273         bool.
6274         * btrace.h (make_cleanup_btrace_data): Don't declare.
6275         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6276         (parse_xml_btrace): Update.
6277         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6278         (maint_btrace_clear_packet_history_cmd): Update.
6279
6280 2018-06-07  Pedro Alves  <palves@redhat.com>
6281
6282         * target.h (target_ops) <beneath>: Now a method.  All references
6283         updated.
6284         (class target_stack): New.
6285         * target.c (g_target_stack): New.
6286         (g_current_top_target): Delete.
6287         (current_top_target): Get the top target out of g_target_stack.
6288         (target_stack::push, target_stack::unpush): New.
6289         (push_target, unpush_target): Reimplement.
6290         (target_is_pushed): Reimplement in terms of g_target_stack.
6291         (target_ops::beneath, target_stack::find_beneath): New.
6292
6293 2018-06-07  Pedro Alves  <palves@redhat.com>
6294
6295         * target.h (find_target_beneath): Delete declaration.
6296         * target.c (find_target_beneath): Delete definition.
6297         * aix-thread.c: All callers of find_target_beneath adjusted to
6298         call target_ops::beneath instead.
6299         * bsd-uthread.c: Likewise.
6300         * linux-thread-db.c: Likewise.
6301         * ravenscar-thread.c: Likewise.
6302         * sol-thread.c: Likewise.
6303         * spu-multiarch.c: Likewise.
6304
6305 2018-06-07  Pedro Alves  <palves@redhat.com>
6306
6307         * target.h (target_ops) <beneath>: Now a method.  All references
6308         updated.
6309         (target_ops) <m_beneath>: New.
6310         * target.c (target_ops::beneath): New.
6311         * corelow.c: Adjust all references to target_ops::beneath.
6312         * linux-thread-db.c: Likewise.
6313         * make-target-delegates: Likewise.
6314         * record-btrace.c: Likewise.
6315         * record-full.c: Likewise.
6316         * remote.c: Likewise.
6317         * target.c: Likewise.
6318         * target-delegates.c: Regenerate.
6319
6320 2018-06-07  Pedro Alves  <palves@redhat.com>
6321
6322         * target.h (target_stack): Delete.
6323         (current_top_target): Declare function.
6324         * target.c (target_stack): Delete.
6325         (g_current_top_target): New.
6326         (current_top_target): New function.
6327         * auxv.c: Use current_top_target instead of target_stack
6328         throughout.
6329         * avr-tdep.c: Likewise.
6330         * breakpoint.c: Likewise.
6331         * corefile.c: Likewise.
6332         * elfread.c: Likewise.
6333         * eval.c: Likewise.
6334         * exceptions.c: Likewise.
6335         * frame.c: Likewise.
6336         * gdbarch-selftests.c: Likewise.
6337         * gnu-v3-abi.c: Likewise.
6338         * ia64-tdep.c: Likewise.
6339         * ia64-vms-tdep.c: Likewise.
6340         * infcall.c: Likewise.
6341         * infcmd.c: Likewise.
6342         * infrun.c: Likewise.
6343         * linespec.c: Likewise.
6344         * linux-tdep.c: Likewise.
6345         * minsyms.c: Likewise.
6346         * ppc-linux-nat.c: Likewise.
6347         * ppc-linux-tdep.c: Likewise.
6348         * procfs.c: Likewise.
6349         * regcache.c: Likewise.
6350         * remote.c: Likewise.
6351         * rs6000-tdep.c: Likewise.
6352         * s390-linux-nat.c: Likewise.
6353         * s390-tdep.c: Likewise.
6354         * solib-aix.c: Likewise.
6355         * solib-darwin.c: Likewise.
6356         * solib-dsbt.c: Likewise.
6357         * solib-spu.c: Likewise.
6358         * solib-svr4.c: Likewise.
6359         * solib-target.c: Likewise.
6360         * sparc-tdep.c: Likewise.
6361         * sparc64-tdep.c: Likewise.
6362         * spu-tdep.c: Likewise.
6363         * symfile.c: Likewise.
6364         * symtab.c: Likewise.
6365         * target-descriptions.c: Likewise.
6366         * target-memory.c: Likewise.
6367         * target.c: Likewise.
6368         * target.h: Likewise.
6369         * tracefile-tfile.c: Likewise.
6370         * tracepoint.c: Likewise.
6371         * valops.c: Likewise.
6372         * valprint.c: Likewise.
6373         * value.c: Likewise.
6374         * windows-tdep.c: Likewise.
6375         * mi/mi-main.c: Likewise.
6376
6377 2018-06-07  Tom Tromey  <tom@tromey.com>
6378
6379         * valprint.h (build_address_symbolic): Declare.
6380         * printcmd.c (print_address_symbolic): Update.
6381         (build_address_symbolic): Change "name" and "filename" to
6382         std::string.
6383         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6384         Update.
6385         * defs.h (build_address_symbolic): Remove declaration.
6386
6387 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6388
6389         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6390         (aarch64_vnv_type): Add function.
6391         (aarch64_pseudo_register_name): Add V regs for SVE.
6392         (aarch64_pseudo_register_type): Likewise.
6393         (aarch64_pseudo_register_reggroup_p): Likewise.
6394         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6395         (aarch64_pseudo_read_value): Add V regs for SVE.
6396         (aarch64_pseudo_write_2): Use V0 offset for SVE
6397         (aarch64_pseudo_write): Add V regs for SVE.
6398         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6399
6400 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6401
6402         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6403         (sve_vl_from_vq): Likewise.
6404
6405 2018-06-05  Tom Tromey  <tom@tromey.com>
6406
6407         * cli/cli-cmds.c (show_version): Update.
6408         * top.c (print_gdb_version): Add "interactive" parameter.
6409         Update.
6410         * main.c (captured_main_1): Update.
6411         * top.h (print_gdb_version): Add "interactive" parameter and a
6412         comment.
6413
6414 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6415
6416         * common/enum-flags.h: Add trailing semicolon to example in
6417         comment.
6418
6419 2018-06-05  Tom Tromey  <tom@tromey.com>
6420
6421         PR cli/12326:
6422         * NEWS: Add entry about pager.
6423         * utils.c (pagination_disabled_for_command): New global.
6424         (prompt_for_continue): Allow "c" response to prompt.
6425         (reinitialize_more_filter): Clear
6426         pagination_disabled_for_command.
6427         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6428
6429 2018-06-04  Tom Tromey  <tom@tromey.com>
6430
6431         * ada-lang.h (ada_lookup_symbol_list): Update.
6432         * ada-lang.c (resolve_subexp): Update.
6433         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6434         parameter.
6435         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6436         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6437         results parameter to std::vector.
6438         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6439         Update.
6440         * ada-exp.y (block_lookup): Update.
6441         (select_possible_type_sym): Change type of syms.  Remove nsyms
6442         parameter.
6443         (write_var_or_type, write_name_assoc): Update.
6444
6445 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6446
6447         * windows-nat.c (windows_nat_target::xfer_partial): Return
6448         TARGET_XFER_E_IO if we need to delegate to the target beneath
6449         but BENEATH is NULL.
6450
6451 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6452
6453         * Makefile.in (config.status): Add configure.nat as a
6454         dependency.
6455
6456 2018-06-04  Tom Tromey  <tom@tromey.com>
6457
6458         * cp-name-parser.y (cpname_state): Add method declarations.
6459         (HANDLE_QUAL): Update.
6460         (cpname_state::d_grab, cpname_state::fill_comp)
6461         (cpname_state::make_operator, cpname_state::make_dtor)
6462         (cpname_state::make_builtin_type, cpname_state::make_name)
6463         (cpname_state::d_qualify, cpname_state::d_int_type)
6464         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6465         (%union): Move earlier.
6466
6467 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6468
6469         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6470
6471 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6472
6473         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6474         (aarch64_pseudo_write_1): Likewise.
6475         (aarch64_pseudo_read_value): Use helper.
6476         (aarch64_pseudo_write): Likewise.
6477
6478 2018-06-04  Pedro Alves  <palves@redhat.com>
6479
6480         * darwin-nat.c (darwin_ops): Delete.
6481         (darwin_attach_pid): Use get_native_target.
6482
6483 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6484
6485         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6486         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6487
6488 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6489
6490         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6491         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6492         (aarch64_gdbarch_init): Check for SVE.
6493         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6494
6495 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6496
6497         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6498         * aarch64-tdep.h (aarch64_read_description): Likewise.
6499         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6500         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6501         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6502         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6503         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6504
6505 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6506
6507         * value.c (value_fetch_lazy_bitfield): New.
6508         (value_fetch_lazy_memory): New.
6509         (value_fetch_lazy_register): New.
6510         (value_fetch_lazy): Factor out to smaller functions.
6511
6512 2018-06-01  Tom Tromey  <tom@tromey.com>
6513
6514         * cp-name-parser.y (backslashable, represented): Now const.
6515
6516 2018-06-01  Tom Tromey  <tom@tromey.com>
6517
6518         * cp-name-parser.y: Include parser-defs.h.
6519         (parser_fprintf): Remove declaration.
6520
6521 2018-06-01  Tom Tromey  <tom@tromey.com>
6522
6523         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6524         %parse-param.
6525         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6526         (global_result): Remove globals.
6527         (struct cpname_state): New.
6528         (yyparse): Don't declare.
6529         (yylex, yyerror): Move declarations after %union.
6530         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6531         (make_name): Add state parameter.
6532         Update all callers.
6533         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6534         parameter.
6535         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6536         Update.
6537         (yylex): Add lvalp, state parameters.
6538         (yyerror): Add state parameter.
6539         (cp_demangled_name_to_comp): Update.
6540
6541 2018-06-01  Tom Tromey  <tom@tromey.com>
6542
6543         * cp-name-parser.y (parser_fprintf): Declare.
6544         (GDB_YY_REMAP_PREFIX): Define.
6545         Include yy-remap.h.  Don't redefine yy* identifiers.
6546
6547 2018-06-01  Tom Tromey  <tom@tromey.com>
6548
6549         * python/py-type.c (typy_legacy_template_argument): Update.
6550         * cp-support.h (cp_demangled_name_to_comp): Update.
6551         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6552         parameter to be a "std::string *".
6553         (main): Update.
6554
6555 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6556
6557         * ada-lex.l: Include "diagnostics.h" instead of
6558         "common/diagnostics.h".
6559         * unittests/environ-selftests.c: Likewise.
6560         * common/diagnostics.h: Moved to ../include.
6561
6562 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6563
6564         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6565         to language_mode_manual while calling breakpoint_re_set_one.
6566
6567 2018-06-01  Tom Tromey  <tom@tromey.com>
6568
6569         * valops.c (value_cast_structs, destructor_name_p): Update.
6570         * symtab.c (gdb_mangle_name): Update.
6571         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6572         Update.
6573         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6574         (pascal_object_print_value_fields, pascal_object_print_value):
6575         Update.
6576         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6577         * linespec.c (find_methods): Update.
6578         * gdbtypes.h (type_name_no_tag): Remove.
6579         (type_name_or_error): Rename from type_name_no_tag_or_error.
6580         * gdbtypes.c (type_name_no_tag): Remove.
6581         (type_name_or_error): Rename from type_name_no_tag_or_error.
6582         (lookup_struct_elt_type, check_typedef): Update.
6583         * expprint.c (print_subexp_standard): Update.
6584         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6585         * d-namespace.c (d_lookup_nested_symbol): Update.
6586         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6587         (cp_print_class_member): Update.
6588         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6589         * completer.c (add_struct_fields): Update.
6590         * c-typeprint.c (cp_type_print_derivation_info)
6591         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6592         Update.
6593         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6594         (ada_prefer_type, ada_is_exception_sym): Update.
6595
6596 2018-06-01  Tom Tromey  <tom@tromey.com>
6597
6598         * valops.c (enum_constant_from_type, value_namespace_elt)
6599         (value_maybe_namespace_elt): Update.
6600         * valarith.c (find_size_for_pointer_math): Update.
6601         * target-descriptions.c (make_gdb_type): Update.
6602         * symmisc.c (print_symbol): Update.
6603         * stabsread.c (define_symbol, read_type)
6604         (complain_about_struct_wipeout, add_undefined_type)
6605         (cleanup_undefined_types_1): Update.
6606         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6607         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6608         (rust_internal_print_type, rust_composite_type)
6609         (rust_evaluate_funcall, rust_evaluate_subexp)
6610         (rust_inclusive_range_type_p): Update.
6611         * python/py-type.c (typy_get_tag): Update.
6612         * p-typeprint.c (pascal_type_print_base): Update.
6613         * mdebugread.c (parse_symbol, parse_type): Update.
6614         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6615         Update.
6616         * guile/scm-type.c (gdbscm_type_tag): Update.
6617         * go-lang.c (sixg_string_p): Update.
6618         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6619         Update.
6620         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6621         (TYPE_TAG_NAME): Remove.
6622         * gdbtypes.c (type_name_no_tag): Simplify.
6623         (check_typedef, check_types_equal, recursive_dump_type)
6624         (copy_type_recursive, arch_composite_type): Update.
6625         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6626         in summary mode when needed.
6627         * eval.c (evaluate_funcall): Update.
6628         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6629         (process_structure_scope, read_enumeration_type)
6630         (read_namespace_type, read_module_type, determine_prefix): Update.
6631         * cp-support.c (inspect_type): Update.
6632         * coffread.c (process_coff_symbol, decode_base_type): Update.
6633         * c-varobj.c (c_is_path_expr_parent): Update.
6634         * c-typeprint.c (c_type_print_base_struct_union): Update.
6635         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6636         summary when using C language.
6637         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6638         (gen_maybe_namespace_elt): Update.
6639         * ada-lang.c (ada_type_name): Simplify.
6640         (empty_record, ada_template_to_fixed_record_type_1)
6641         (template_to_static_fixed_type)
6642         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6643
6644 2018-06-01  Tom Tromey  <tom@tromey.com>
6645
6646         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6647         c_print_type.
6648         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6649         (c_print_type): Update.
6650         (c_print_type): New overload.
6651         (c_type_print_varspec_prefix, c_type_print_args)
6652         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6653         (c_type_print_base_struct_union, c_type_print_base_1)
6654         (cp_type_print_method_args): Add "language" parameter.
6655         (c_type_print_base): Update.
6656         * c-lang.h (c_print_type): Add new overload.
6657
6658 2018-06-01  Tom Tromey  <tom@tromey.com>
6659
6660         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6661         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6662
6663 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6664
6665         * aarch64-tdep.c (aarch64_sve_register_names): New const
6666         var.
6667         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6668         (AARCH64_SVE_Z_REGS_NUM): New define.
6669         (AARCH64_SVE_P_REGS_NUM): Likewise.
6670         (AARCH64_SVE_NUM_REGS): Likewise.
6671
6672 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6673
6674         * nat/linux-ptrace.h [__alpha__]
6675         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6676         definitions.
6677
6678 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6679
6680         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6681         the endianness selected.
6682         * NEWS: Document `set endian auto' mode operation update.
6683
6684 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6685
6686         * Makefile.in: Add new header.
6687         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6688         (sve_vl_from_vg): Likewise.
6689         (sve_vq_from_vl): Likewise.
6690         (sve_vl_from_vq): Likewise.
6691         (sve_vq_from_vg): Likewise.
6692         (sve_vg_from_vq): Likewise.
6693         * configure.nat: Add new c file.
6694         * nat/aarch64-sve-linux-ptrace.c: New file.
6695         * nat/aarch64-sve-linux-ptrace.h: New file.
6696
6697 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6698
6699         * aarch64-linux-nat.c (aarch64_linux_read_description):
6700         Add parmeter zero.
6701         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6702         Likewise.
6703         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6704         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6705         (aarch64_gdbarch_init): Add parmeter zero.
6706         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6707         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6708         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6709         parmeter.
6710         * doc/gdb.texinfo: Describe SVE feature
6711         * features/aarch64-sve.c: New file.
6712
6713 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6714
6715         PR gdb/23210
6716         * gdbarch.sh (significant_addr_bit): Default to zero when
6717         not set by target architecture.
6718         * gdbarch.c: Re-generated.
6719         * utils.c (address_significant): Update.
6720
6721 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6722
6723         * stack.c (func_command): Remove trailing newline in call to error.
6724
6725 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6726
6727         * regcache.h (regcache_raw_collect): Remove, update callers to
6728         use regcache::raw_collect.
6729         * regcache.c (regcache_raw_collect): Remove.
6730
6731 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6732
6733         * regcache.h (regcache_raw_supply): Remove, update callers to
6734         use detached_regcache::raw_supply.
6735         * regcache.c (regcache_raw_supply): Remove.
6736
6737 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6738
6739         * regcache.h (regcache_cooked_write_part): Remove, update
6740         callers to use regcache::cooked_write_part.
6741         * regcache.c (regcache_cooked_write_part): Remove.
6742
6743 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6744
6745         * regcache.h (regcache_cooked_read_part): Remove, update callers
6746         to use readable_regcache::cooked_read_part.
6747         * regcache.c (regcache_cooked_read_part): Remove.
6748
6749 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6750
6751         * regcache.h (regcache_cooked_read_value): Remove, update
6752         callers to use readable_regcache::cooked_read_value.
6753         * regcache.c (regcache_cooked_read_value): Remove.
6754
6755 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6756
6757         * regcache.h (regcache_cooked_write): Remove, update callers to
6758         use regcache::cooked_write.
6759         * regcache.c (regcache_cooked_write): Remove.
6760
6761 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6762
6763         * regcache.h (regcache_invalidate): Remove, update callers to
6764         use detached_regcache::invalidate instead.
6765         * regcache.c (regcache_invalidate): Remove.
6766
6767 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6768
6769         * regcache.h (regcache_raw_write_part): Remove, update callers
6770         to use regcache::raw_write_part instead.
6771         * regcache.c (regcache_raw_write_part): Remove.
6772
6773 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6774
6775         * regcache.h (regcache_raw_read_part): Remove, update callers to
6776         use readable_regcache::raw_read_part instead.
6777         * regcache.c (regcache_raw_read_part): Remove.
6778
6779 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6780
6781         * regcache.h (regcache_cooked_read): Remove, update callers to
6782         use readable_regcache::cooked_read instead.
6783         * regcache.c (regcache_cooked_read): Remove.
6784
6785 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6786
6787         * regcache.h (regcache_raw_write): Remove, update callers to use
6788         regcache::raw_write instead.
6789         * regcache.c (regcache_raw_write): Remove.
6790
6791 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6792
6793         * regcache.h (regcache_raw_read): Remove, update callers to use
6794         readable_regcache::raw_read instead.
6795         * regcache.c (regcache_raw_read): Remove.
6796
6797 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6798
6799         * regcache.h (regcache_raw_update): Remove, update callers to
6800         use readable_regcache::raw_update instead.
6801         * regcache.c (regcache_raw_update): Remove.
6802
6803 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6804
6805         * regcache.h (regcache_register_status): Remove, update callers
6806         to use reg_buffer::get_register_status directly instead.
6807         * regcache.c (regcache_register_status): Remove.
6808
6809 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6810
6811         * regcache.h (regcache_get_ptid): Remove, update all callers to
6812         call regcache::ptid instead.
6813         * regcache.c (regcache_get_ptid): Remove.
6814
6815 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6816
6817         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6818
6819 2018-05-30  Pedro Alves  <palves@redhat.com>
6820
6821         * common/common-exceptions.h (exception_rethrow): Use
6822         ATTRIBUTE_NORETURN.
6823
6824 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6825
6826         * breakpoint.c (print_solib_event, check_status_catch_solib):
6827         Remove struct keyword in range-based for loops.
6828         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6829         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6830         Likewise.
6831         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6832         Likewise.
6833         * symfile.c (addr_info_make_relative): Likewise.
6834         * thread.c (value_in_thread_stack_temporaries): Likewise.
6835
6836 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6837
6838         PR gdb/16841
6839         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6840         aggregate type to get its real type before accessing it.
6841
6842 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6843
6844         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6845         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6846         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6847         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6848         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6849         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6850         * printcmd.c (info_address_command): Likewise.
6851
6852 2018-05-29  Tom Tromey  <tom@tromey.com>
6853
6854         * windows-nat.c (handle_exception): Update fall-through comment.
6855
6856 2018-05-29  Tom Tromey  <tom@tromey.com>
6857
6858         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6859         (struct program_space) <added_solibs>: Now a std::vector.
6860         * breakpoint.c (print_solib_event): Update.
6861         (check_status_catch_solib): Update.
6862         * progspace.c (clear_program_space_solib_cache): Update.
6863         * solib.c (update_solib_list): Update.
6864
6865 2018-05-29  Tom Tromey  <tom@tromey.com>
6866
6867         * python/py-type.c (typy_richcompare): Update.
6868         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6869         * gdbtypes.h (types_deeply_equal): Return bool.
6870         (types_equal): Likewise.
6871         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6872         declare VEC.
6873         (check_types_equal): Change worklist to std::vector.  Return
6874         bool.
6875         (struct type_equality_entry): Add constructor.
6876         (compare_maybe_null_strings): Return bool.
6877         (check_types_worklist): Return bool.  Change worklist to
6878         std::vector.
6879         (types_deeply_equal): Use std::vector.
6880         (types_equal): Return bool.
6881         (compare_maybe_null_strings): Simplify.
6882
6883 2018-05-29  Tom Tromey  <tom@tromey.com>
6884
6885         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6886
6887 2018-05-29  Tom Tromey  <tom@tromey.com>
6888
6889         * objc-lang.h: Don't include cp-support.h.
6890         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6891         declare VEC.
6892
6893 2018-05-27  Tom Tromey  <tom@tromey.com>
6894
6895         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6896
6897 2018-05-25  Tom Tromey  <tom@tromey.com>
6898
6899         * value.c (value::location): Initialize.
6900
6901 2018-05-25  Tom Tromey  <tom@tromey.com>
6902
6903         * dbxread.c (init_bincl_list): Remove.
6904         (bincl_list): Now a std::vector.
6905         (bincls_allocated, next_bincl): Remove.
6906         (free_bincl_list, do_free_bincl_list_cleanup)
6907         (make_cleanup_free_bincl_list): Remove.
6908         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6909         unique_xmalloc_ptr.
6910         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6911         (struct header_file_location): Add constructor.
6912         (add_bincl_to_list): Remove.
6913
6914 2018-05-25  Tom Tromey  <tom@tromey.com>
6915
6916         * tui/tui.c (tui_enable): Update.
6917         * mi/mi-interp.c (mi_interp::init): Update.
6918         * interps.h (class interp) <name>: New method.
6919         <m_name>: Rename from name.
6920         (~scoped_restore_interp): Update.
6921         * interps.c (interp::interp): Update.
6922         (interp_add, interp_set, interp_lookup_existing)
6923         (current_interp_named_p): Update.
6924
6925 2018-05-25  Tom Tromey  <tom@tromey.com>
6926
6927         * interps.c (interp_name): Remove.
6928         * mi/mi-interp.c (mi_interp::init): Update.
6929         * interps.h (interp_name): Remove.
6930         (~scoped_restore_interp): Update.
6931         * tui/tui.c (tui_enable): Update.
6932
6933 2018-05-25  Tom Tromey  <tom@tromey.com>
6934
6935         * utils.c (fputs_maybe_filtered): Update.
6936         * linespec.c (decode_line_full): Update.
6937         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6938         (mi_print_breakpoint_for_event, mi_solib_loaded)
6939         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6940         (mi_user_selected_context_changed): Update.
6941         * mi/mi-main.c (mi_execute_command): Update.
6942         * cli/cli-script.c (execute_control_command): Update.
6943         * python/python.c (execute_gdb_command): Update.
6944         * solib.c (info_sharedlibrary_command): Update.
6945         * interps.c (interp_ui_out): Remove.
6946         * interps.h (interp_ui_out): Remove.
6947
6948 2018-05-25  Tom Tromey  <tom@tromey.com>
6949
6950         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6951         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6952         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6953
6954 2018-05-25  Tom Tromey  <tom@tromey.com>
6955
6956         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6957         * interps.c (interp_exec): Use scoped_restore.
6958
6959 2018-05-25  Tom Tromey  <tom@tromey.com>
6960
6961         * remote.c (remote_target::remote_file_get): Use
6962         gdb::byte_vector.
6963         (remote_target::remote_file_put): Likewise.
6964
6965 2018-05-25  Tom Tromey  <tom@tromey.com>
6966
6967         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6968         a std::string.
6969         (get_pe_section_index, add_pe_exported_sym): Update.
6970         (read_pe_exported_syms): Use gdb::def_vector.
6971
6972 2018-05-25  Tom Tromey  <tom@tromey.com>
6973
6974         * frame.c (remove_prev_frame): Remove.
6975         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6976
6977 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6978
6979         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6980         Remove prototypes.
6981         * mips-linux-nat.c (supply_fpregset): Always call
6982         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6983         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6984         `mips_fill_fpregset'.
6985         * mips-linux-tdep.c (mips_supply_fpregset)
6986         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6987         (mips_fill_fpregset_wrapper): Remove functions.
6988         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6989         (mips_linux_fpregset): Remove variable.
6990         (mips_linux_iterate_over_regset_sections): Use
6991         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6992         (mips_linux_o32_sigframe_init): Remove comment.
6993
6994 2018-05-25  Pedro Alves  <palves@redhat.com>
6995
6996         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6997         (struct readahead_cache, struct packet_reg, struct
6998         remote_arch_state, class remote_state): Move higher up in the
6999         file.
7000         (remote_target::m_remote_state): Now an object instead of a pointer.
7001         (remote_target::get_remote_state): Adjust.
7002
7003 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7004
7005         * stack.c (select_and_print_frame): Delete.
7006         (struct function_bounds): Move struct within function.
7007         (func_command): Most content moved into new function
7008         find_frame_for_function, use new function, print result, add
7009         function comment.
7010         (find_frame_for_function): New function, now returns a result.
7011
7012 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7013
7014         * stack.c (iterate_over_block_arg_vars): Fix comment.
7015         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7016
7017 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7018
7019         PR gdb/23203
7020         * frame.c
7021         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7022         Define.
7023         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7024         Define.
7025         * frame.h (class scoped_restore_selected_frame): New class.
7026         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7027         of any exception, use scoped_restore_selected_frame to restore the
7028         frame instead.
7029
7030 2018-05-24  Pedro Alves  <palves@redhat.com>
7031
7032         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7033         override.
7034
7035 2018-05-23  Tom Tromey  <tom@tromey.com>
7036
7037         * complaints.c (struct complaints): Remove.
7038         (symfile_complaint_book): Remove.
7039         (series): New global.
7040         (complaint_internal): Update.
7041         (clear_complaints): Update.
7042
7043 2018-05-23  Tom Tromey  <tom@tromey.com>
7044
7045         * complaints.c (counters): New global.
7046         (struct complain): Remove.
7047         (struct complaints) <root>: Remove.
7048         (complaint_sentinel): Remove.
7049         (symfile_complaint_book): Update.
7050         (find_complaint) Remove.
7051         (complaint_internal, clear_complaints): Update.
7052
7053 2018-05-23  Tom Tromey  <tom@tromey.com>
7054
7055         * complaints.c (struct complain) <file, line>: Remove.
7056         (find_complaint): Remove file, line parameters.
7057         (complaint_internal): Update.
7058
7059 2018-05-23  Tom Tromey  <tom@tromey.com>
7060
7061         * complaints.c (vcomplaint): Remove.
7062         (complaint_internal) Merge in contents of vcomplaint.
7063
7064 2018-05-23  Tom Tromey  <tom@tromey.com>
7065
7066         * complaints.c (struct complaints) <explanation>: Remove.
7067         (symfile_explanations): Remove.
7068         (symfile_complaint_book): Update.
7069         (vcomplaint): Update.
7070         (struct explanation): Remove.
7071
7072 2018-05-23  Tom Tromey  <tom@tromey.com>
7073
7074         * complaints.c (symfile_complaints): Remove.
7075         (complaint_internal): Remove "complaints" parameter.
7076         (clear_complaints, vcomplaint): Remove "c" parameter.
7077         (get_complaints): Remove.
7078         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7079         (dwarf2_debug_line_missing_file_complaint)
7080         (dwarf2_debug_line_missing_end_sequence_complaint)
7081         (dwarf2_complex_location_expr_complaint)
7082         (dwarf2_const_value_length_mismatch_complaint)
7083         (dwarf2_section_buffer_overflow_complaint)
7084         (dwarf2_macro_malformed_definition_complaint)
7085         (dwarf2_invalid_attrib_class_complaint)
7086         (create_addrmap_from_index, dw2_symtab_iter_next)
7087         (dw2_expand_marked_cus)
7088         (dw2_debug_names_iterator::find_vec_in_debug_names)
7089         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7090         (create_debug_type_hash_table, init_cutu_and_read_dies)
7091         (partial_die_parent_scope, add_partial_enumeration)
7092         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7093         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7094         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7095         (create_cus_hash_table, create_dwp_hash_table)
7096         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7097         (dwarf2_rnglists_process, dwarf2_ranges_process)
7098         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7099         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7100         (handle_struct_member_die, process_structure_scope)
7101         (read_array_type, read_common_block, read_module_type)
7102         (read_tag_pointer_type, read_typedef, read_base_type)
7103         (read_subrange_type, load_partial_dies, partial_die_info::read)
7104         (partial_die_info::read, partial_die_info::read)
7105         (partial_die_info::read, read_checked_initial_length_and_offset)
7106         (dwarf2_string_attr, read_formatted_entries)
7107         (dwarf_decode_line_header)
7108         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7109         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7110         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7111         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7112         (get_signatured_type, get_DW_AT_signature_type)
7113         (decode_locdesc, file_file_name, consume_improper_spaces)
7114         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7115         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7116         (dwarf2_symbol_mark_computed, set_die_type)
7117         (read_attribute_value): Update.
7118         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7119         Update.
7120         * dbxread.c (unknown_symtype_complaint)
7121         (lbrac_mismatch_complaint, repeated_header_complaint)
7122         (set_namestring, function_outside_compilation_unit_complaint)
7123         (read_dbx_symtab, process_one_symbol): Update.
7124         * gdbtypes.c (stub_noname_complaint): Update.
7125         * windows-nat.c (handle_unload_dll): Update.
7126         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7127         (decode_base_type): Update.
7128         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7129         (eb_complaint, record_include_begin, record_include_end)
7130         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7131         (process_xcoff_symbol, read_symbol)
7132         (function_outside_compilation_unit_complaint)
7133         (scan_xcoff_symtab): Update.
7134         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7135         * buildsym.c (finish_block_internal, make_blockvector)
7136         (end_symtab_get_static_block, augment_type_symtab): Update.
7137         * dtrace-probe.c (dtrace_process_dof)
7138         (dtrace_static_probe_ops::get_probes): Update.
7139         * complaints.h (struct complaint): Don't declare.
7140         (symfile_complaints): Remove.
7141         (complaint_internal): Remove "complaints" parameter.
7142         (complaint): Likewise.
7143         (clear_complaints): Likewise.
7144         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7145         (reread_symbols): Update.
7146         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7147         (dwarf2_frame_cache, decode_frame_entry): Update.
7148         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7149         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7150         (info_selectors_command): Update.
7151         * macrotab.c (macro_include, check_for_redefinition)
7152         (macro_undef): Update.
7153         * objfiles.c (filter_overlapping_sections): Update.
7154         * stabsread.c (invalid_cpp_abbrev_complaint)
7155         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7156         (define_symbol, error_type, read_type, rs6000_builtin_type)
7157         (stabs_method_name_from_physname, read_member_functions)
7158         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7159         (attach_fields_to_type, complain_about_struct_wipeout)
7160         (read_range_type, read_args, common_block_start)
7161         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7162         Update.
7163         * mdebugread.c (index_complaint, unknown_ext_complaint)
7164         (basic_type_complaint, bad_tag_guess_complaint)
7165         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7166         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7167         (parse_procedure, parse_lines)
7168         (function_outside_compilation_unit_complaint)
7169         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7170         (bad_tag_guess_complaint, reg_value_complaint): Update.
7171         * cp-support.c (demangled_name_complaint): Update.
7172         * macroscope.c (sal_macro_scope): Update.
7173         * dwarf-index-write.c (class debug_names): Update.
7174
7175 2018-05-23  Tom Tromey  <tom@tromey.com>
7176
7177         * complaints.c (clear_complaints): Remove "noisy" parameter.
7178         * complaints.h (clear_complaints): Update.
7179         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7180         (reread_symbols): Update.
7181
7182 2018-05-23  Tom Tromey  <tom@tromey.com>
7183
7184         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7185         SUBSEQUENT_MESSAGE.
7186         (vcomplaint, clear_complaints): Update.
7187         (symfile_explanations): Remove some messages.
7188
7189 2018-05-23  Tom Tromey  <tom@tromey.com>
7190
7191         * complaints.c (internal_complaint): Remove.
7192         * complaints.h (internal_complaint): Remove.
7193
7194 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7195
7196         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7197
7198 2018-05-22  Pedro Alves  <palves@redhat.com>
7199
7200         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7201         (remote_fileio_badfd, remote_fileio_return_errno)
7202         (remote_fileio_return_success, remote_fileio_func_open)
7203         (remote_fileio_func_open, remote_fileio_func_close)
7204         (remote_fileio_func_read, remote_fileio_func_write)
7205         (remote_fileio_func_lseek, remote_fileio_func_rename)
7206         (remote_fileio_func_unlink, remote_fileio_func_stat)
7207         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7208         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7209         remote_target parameter.
7210         (remote_fio_func_map) <func>: Add remote_target parameter.
7211         (do_remote_fileio_request, remote_fileio_request):
7212         * remote-fileio.h (remote_fileio_request):
7213         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7214         remote_target parameter.
7215         (remote_notif_process, handle_notification): Adjust to pass down
7216         the remote.
7217         (remote_notif_state_allocate): Add remote_target parameter.  Save
7218         it.
7219         * remote-notif.h (struct remote_target): Forward declare.
7220         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7221         remote_target parameter.
7222         (struct remote_notif_state) <remote>: New field.
7223         (remote_notif_ack, remote_notif_parse): Add remote_target
7224         parameter.
7225         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7226         remote_target parameter.
7227         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7228         (threads_listing_context, rmt_thread_action, protocol_feature)
7229         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7230         (packet_result, struct threads_listing_context, remote_state):
7231         Move definitions and declarations higher up.
7232         (remote_target) <~remote_target>: Declare.
7233         (remote_download_command_source, remote_file_put, remote_file_get)
7234         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7235         (remote_hostio_pread_vFile, remote_hostio_send_command)
7236         (remote_hostio_set_filesystem, remote_hostio_open)
7237         (remote_hostio_close, remote_hostio_unlink, remote_state)
7238         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7239         (get_memory_write_packet_size, get_memory_read_packet_size)
7240         (append_pending_thread_resumptions, remote_detach_1)
7241         (append_resumption, remote_resume_with_vcont)
7242         (add_current_inferior_and_thread, wait_ns, wait_as)
7243         (process_stop_reply, remote_notice_new_inferior)
7244         (process_initial_stop_replies, remote_add_thread)
7245         (btrace_sync_conf, remote_btrace_maybe_reopen)
7246         (remove_new_fork_children, kill_new_fork_children)
7247         (discard_pending_stop_replies, stop_reply_queue_length)
7248         (check_pending_events_prevent_wildcard_vcont)
7249         (discard_pending_stop_replies_in_queue, stop_reply)
7250         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7251         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7252         (remote_interrupt_as, remote_interrupt_ns)
7253         (remote_get_noisy_reply, remote_query_attached)
7254         (remote_add_inferior, remote_current_thread, get_current_thread)
7255         (set_thread, set_general_thread, set_continue_thread)
7256         (set_general_process, write_ptid)
7257         (remote_unpack_thread_info_response, remote_get_threadinfo)
7258         (parse_threadlist_response, remote_get_threadlist)
7259         (remote_threadlist_iterator, remote_get_threads_with_ql)
7260         (remote_get_threads_with_qxfer)
7261         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7262         (get_offsets, remote_check_symbols, remote_supported_packet)
7263         (remote_query_supported, remote_packet_size)
7264         (remote_serial_quit_handler, remote_detach_pid)
7265         (remote_vcont_probe, remote_resume_with_hc)
7266         (send_interrupt_sequence, interrupt_query)
7267         (remote_notif_get_pending_events, fetch_register_using_p)
7268         (send_g_packet, process_g_packet, fetch_registers_using_g)
7269         (store_register_using_P, store_registers_using_G)
7270         (set_remote_traceframe, check_binary_download)
7271         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7272         (remote_xfer_live_readonly_partial, remote_read_bytes)
7273         (remote_send_printf, remote_flash_write, readchar)
7274         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7275         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7276         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7277         (extended_remote_disable_randomization, extended_remote_run)
7278         (send_environment_packet, extended_remote_environment_support)
7279         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7280         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7281         (packet_command): Now methods of ...
7282         (remote_target): ... this class.
7283         (m_remote_state) <remote_target>: New field.
7284         (struct remote_state) <stop_reply_queue,
7285         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7286         fields.
7287         (remote_state::remote_state): Allocate stop_reply_queue.
7288         (remote_state): Delete global.
7289         (get_remote_state_raw): Delete.
7290         (remote_target::get_remote_state): Allocate m_remote_state on
7291         demand.
7292         (get_current_remote_target): New.
7293         (remote_ops, extended_remote_ops): Delete.
7294         (wait_forever_enabled_p, remote_async_inferior_event_token):
7295         Delete, moved to struct remote_state.
7296         (remote_target::close): Delete self.  Destruction bits split to
7297         ...
7298         (remote_target::~remote_target): ... this.
7299         (show_memory_packet_size): Adjust to use
7300         get_current_remote_target.
7301         (struct protocol_feature) <func>: Add remote_target parameter.
7302         All callers adjusted.
7303         (curr_quit_handler_target): New.
7304         (remote_serial_quit_handler): Reimplement.
7305         (remote_target::open_1): Adjust to use get_current_remote_target.
7306         Heap-allocate remote_target/extended_remote_target instances.
7307         (vcont_builder::vcont_builder): Add remote_target parameter, and
7308         save it in m_remote.  All callers adjusted.
7309         (vcont_builder::m_remote): New field.
7310         (vcont_builder::restart, vcont_builder::flush)
7311         (vcont_builder::push_action): Use it.
7312         (remote_target::commit_resume): Use it.
7313         (struct queue_iter_param) <remote>: New field.
7314         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7315         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7316         (check_pending_event_prevents_wildcard_vcont_callback)
7317         (remote_target::check_pending_events_prevent_wildcard_vcont)
7318         (remote_target::discard_pending_stop_replies)
7319         (remote_target::discard_pending_stop_replies_in_queue)
7320         (remote_target::remote_notif_remove_queued_reply): Fill in
7321         'remote' field.
7322         (remote_notif_get_pending_events): New.
7323         (remote_target::readchar, remote_target::remote_serial_write):
7324         Save/restore curr_quit_handler_target.
7325         (putpkt): New.
7326         (kill_new_fork_children): Fill in 'remote' field.
7327         (packet_command): Use get_current_remote_target, defer to
7328         remote_target method of same name.
7329         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7330         parameter, and save it in m_remote.  All callers adjusted.
7331         (scoped_remote_fd::release): Use m_remote.
7332         (scoped_remote_fd::m_remote): New field.
7333         (remote_file_put, remote_file_get, remote_file_delete): Use
7334         get_current_remote_target, defer to remote_target method of same
7335         name.
7336         (remote_btrace_reset): Add remote_state paremeter.  Update all
7337         callers.
7338         (remote_async_inferior_event_handler). Pass down 'data'.
7339         (remote_new_objfile): Use get_current_remote_target.
7340         (remote_target::vcont_r_supported): New.
7341         (set_range_stepping): Use get_current_remote_target and
7342         remote_target::vcont_r_supported.
7343         (_initialize_remote): Don't allocate 'remote_state' and
7344         'stop_reply_queue' globals.
7345         * remote.h (struct remote_target): Forward declare.
7346         (getpkt, putpkt, remote_notif_get_pending_events): Add
7347         'remote_target' parameter.
7348
7349 2018-05-22  Pedro Alves  <palves@redhat.com>
7350
7351         * remote.c (vcont_builder): Now a class.  Make all data members
7352         private.
7353         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7354         Declare methods.
7355         (vcont_builder_restart): Rename to ...
7356         (vcont_builder::restart): ... this.
7357         (vcont_builder_flush): Rename to ...
7358         (vcont_builder::flush): ... this.
7359         (vcont_builder_push_action): Rename to ...
7360         (vcont_builder::push_action): ... this.
7361         (remote_target::commit_resume): Adjust.
7362
7363 2018-05-22  Pedro Alves  <palves@redhat.com>
7364
7365         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7366         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7367         (get_fixed_memory_packet_size): New.
7368         (get_memory_packet_size): Use it.
7369         (set_memory_packet_size): Don't override the config size with
7370         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7371         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7372         Don't refer to get_memory_packet_size if not connected to a remote
7373         target.  Show "(default)" if configured size is 0.
7374
7375 2018-05-22  Pedro Alves  <palves@redhat.com>
7376
7377         * remote.c (remote_target::mourn_inferior): Move
7378         discard_pending_stop_replies call here from ...
7379         (_initialize_remote): ... here.
7380
7381 2018-05-22  Pedro Alves  <palves@redhat.com>
7382
7383         * remote.c (compare_section_command): Remove set_general_process
7384         call.
7385
7386 2018-05-22  Pedro Alves  <palves@redhat.com>
7387
7388         * remote.c (struct packet_reg, struct remote_arch_state):
7389         Move higher up in the file.
7390         (remote_state) <m_arch_states>: Store remote_arch_state values
7391         instead of remote_arch_state pointers.
7392         (remote_state::get_remote_arch_state): Adjust.
7393
7394 2018-05-22  Pedro Alves  <palves@redhat.com>
7395
7396         * remote.c: Include <unordered_map>.
7397         (remote_state): Now a class.
7398         (remote_state) <get_remote_arch_state>: Declare method.
7399         <get_remote_arch_state>: New field.
7400         (remote_arch_state) <remote_arch_state>: Declare ctor.
7401         <regs>: Now a unique_ptr.
7402         (remote_gdbarch_data_handle): Delete.
7403         (get_remote_arch_state): Delete.
7404         (remote_state::get_remote_arch_state): New.
7405         (get_remote_state): Adjust to call remote_state's
7406         get_remote_arch_state method.
7407         (init_remote_state): Delete, bits factored out to ...
7408         (remote_arch_state::remote_arch_state): ... this new method.
7409         (get_remote_packet_size, get_memory_packet_size)
7410         (process_g_packet, remote_target::fetch_registers)
7411         (remote_target::prepare_to_store, store_registers_using_G)
7412         (remote_target::store_registers, remote_target::get_trace_status):
7413         Adjust to call remote_state's method.
7414         (_initialize_remote): Remove reference to
7415         remote_gdbarch_data_handle.
7416
7417 2018-05-22  Pedro Alves  <palves@redhat.com>
7418
7419         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7420         pread>: New method declarations.
7421         (remote_target::open_1): Adjust.
7422         (readahead_cache_invalidate): Rename to ...
7423         (readahead_cache::invalidate): ... this, and adjust to be a class
7424         method.
7425         (readahead_cache_invalidate_fd): Rename to ...
7426         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7427         class method.
7428         (remote_hostio_pwrite): Adjust.
7429         (remote_hostio_pread_from_cache): Rename to ...
7430         (readahead_cache::pread): ... this, and adjust to be a class
7431         method.
7432         (remote_hostio_close): Adjust.
7433
7434 2018-05-22  Pedro Alves  <palves@redhat.com>
7435
7436         * remote.c (remote_hostio_close_cleanup): Delete.
7437         (class scoped_remote_fd): New.
7438         (remote_file_put, remote_file_get): Use it.
7439
7440 2018-05-22  Pedro Alves  <palves@redhat.com>
7441
7442         (struct vCont_action_support): Use bool and initialize all fields.
7443         (struct readahead_cache): Initialize all fields.
7444         (remote_state): Use bool and initialize all fields.
7445         (remote_state::remote_state, remote_state::~remote_state): New.
7446         (new_remote_state): Delete.
7447         (_initialize_remote): Use new to allocate remote_state.
7448
7449 2018-05-22  Pedro Alves  <palves@redhat.com>
7450             張俊芝  <zjz@zjz.name>
7451
7452         PR gdb/22973
7453         * c-exp.y: Include "c-support.h".
7454         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7455         of tolower.  Use c_ident_is_alpha to scan names.
7456         * c-lang.c: Include "c-support.h".
7457         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7458         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7459         * c-support.h: New file, with bits factored out from ...
7460         * cp-name-parser.y: ... this file.
7461         Include "c-support.h".
7462         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7463         c-support.h and renamed.
7464         (symbol_end, yylex): Adjust.
7465
7466 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7467
7468         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7469         parameter type to CORE_ADDR.
7470         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7471         parameter type in declaration to CORE_ADDR.
7472         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7473         target_auxv_search to get AT_HWCAP and use the result to get the
7474         target description.
7475         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7476         to CORE_ADDR. Remove the cast of the return value to unsigned
7477         long. Fix error predicate of target_auxv_search.
7478         (ppc_linux_nat_target::read_description): Change the type of the
7479         hwcap variable to CORE_ADDR.
7480
7481 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7482
7483         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7484         if the size of fpscr is larger than 32 bits.
7485
7486 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7487
7488         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7489         (ppc32_linux_vsxregmap): New global.
7490         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7491         regcache_supply_regset, and regcache_collect_regset.
7492         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7493         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7494         (fetch_vsx_register, store_vsx_register): Remove.
7495         (fetch_vsx_registers): Add regno parameter. Get regset using
7496         ppc_linux_vsxregset. Use regset to supply registers.
7497         (store_vsx_registers): Add regno parameter. Get regset using
7498         ppc_linux_vsxregset. Use regset to collect registers.
7499         (fetch_register): Call fetch_vsx_registers instead of
7500         fetch_vsx_register.
7501         (store_register): Call store_vsx_registers instead of
7502         store_vsx_register.
7503         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7504         new regno parameter.
7505         (store_ppc_registers): Call store_vsx_registers with -1 for the
7506         new regno parameter.
7507         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7508         (ppc_collect_vsxregset): Remove.
7509
7510 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7511
7512         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7513         offset fields.
7514         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7515         for vector register offset fields.
7516         (ppc64_fbsd_reg_offsets): Likewise.
7517         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7518         to vector register offset fields.
7519         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7520         to vector register offset fields.
7521         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7522         vector register offset fields.
7523         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7524         initializers for vector register offset fields.
7525         (rs6000_aix64_reg_offsets): Likewise.
7526         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7527         (ppc_supply_vrregset): Remove.
7528         (ppc_collect_vrregset): Remove.
7529         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7530         (ppc_linux_vrregset) : New function.
7531         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7532         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7533         (ppc32_linux_vrregset): Remove.
7534         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7535         and use result instead of ppc32_linux_vrregset.
7536         (ppc32_linux_reg_offsets): Remove initializers for vector register
7537         offset fields.
7538         (ppc64_linux_reg_offsets): Likewise.
7539         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7540         * ppc-linux-nat.c: Include regset.h.
7541         (gdb_vrregset_t): Adjust comment to account for little-endian
7542         mode.
7543         (supply_vrregset, fill_vrregset): Remove.
7544         (fetch_altivec_register, store_altivec_register): Remove.
7545         (fetch_altivec_registers): Add regno parameter. Get regset using
7546         ppc_linux_vrregset. Use regset to supply registers.
7547         (store_altivec_registers): Add regno parameter. Get regset using
7548         ppc_linux_vrregset. Use regset to collect registers.
7549         (fetch_register): Call fetch_altivec_registers instead of
7550         fetch_altivec_register.
7551         (store_register): Call store_altivec_registers instead of
7552         store_altivec_register.
7553         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7554         the new regno parameter.
7555         (store_ppc_registers): Call store_altivec_registers with -1 for
7556         the new regno parameter.
7557
7558 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7559
7560         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7561         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7562         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7563         (gdb_vrregset_t): Change array type size to
7564         PPC_LINUX_SIZEOF_VRREGSET.
7565         (gdb_vsxregset_t): Change array type size to
7566         PPC_LINUX_SIZEOF_VSXREGSET.
7567         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7568         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7569         PPC_LINUX_SIZEOF_VSXREGSET.
7570
7571 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7572
7573         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7574         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7575         nat/ppc-linux.c.
7576         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7577         ppc_linux_target_wordsize with tid.
7578         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7579         wordsize with tid.
7580         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7581         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7582         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7583         tid parameter. Remove static specifier.
7584         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7585         (ppc_linux_target_wordsize): New declaration.
7586
7587 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7588
7589         * arch/ppc-linux-common.c: New file.
7590         * arch/ppc-linux-common.h: New file.
7591         * arch/ppc-linux-tdesc.h: New file.
7592         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7593         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7594         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7595         arch/ppc-linux-tdesc.h.
7596         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7597         arch/ppc-linux-tdesc.h.
7598         (ppc_linux_nat_target::read_description): Remove target
7599         description matching code. Fill a ppc_linux_features struct and
7600         call ppc_linux_match_description with it. Move comment about ISA
7601         2.05 to ppc-linux-common.c.
7602         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7603         arch/ppc-linux-tdesc.h.
7604         (ppc_linux_core_read_description): Remove target description
7605         matching code. Fill a ppc_linux_features struct and call
7606         ppc_linux_match_description with it.
7607         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7608         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7609         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7610         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7611         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7612         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7613         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7614         (tdesc_powerpc_e500l): Remove.
7615
7616 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7617
7618         * ada-lang.c (catch_assert_command): Pass empty string instead
7619         of NULL for excep_string argument.
7620
7621 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7622
7623         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7624         the width of the requested register exceeds the width of the
7625         `ptrace' data type.
7626
7627 2018-05-21  Tom Tromey  <tom@tromey.com>
7628
7629         * printcmd.c (output_command): Remove.
7630         (output_command_const): Rename to output_command.
7631         * valprint.h (output_command): Rename from output_command_const.
7632         * tracepoint.c (trace_dump_actions): Call output_command.
7633
7634 2018-05-21  Tom Tromey  <tom@tromey.com>
7635
7636         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7637         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7638         * ada-lang.h (create_ada_exception_catchpoint): Update.
7639         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7640         std::string.
7641         (create_excep_cond_exprs, ~ada_catchpoint)
7642         (should_stop_exception, print_one_exception)
7643         (print_mention_exception, print_recreate_exception): Update.
7644         (ada_get_next_arg): Remove.
7645         (catch_ada_exception_command_split): Use std::string.  Change type
7646         of "excep_string", "cond_string".
7647         (catch_ada_exception_command): Update.
7648         (create_ada_exception_catchpoint): Change type of excep_string.
7649         (ada_exception_sal): Remove excep_string parameter.
7650         (~ada_catchpoint): Remove.
7651
7652 2018-05-21  Tom Tromey  <tom@tromey.com>
7653
7654         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7655         cleanup.
7656
7657 2018-05-21  Tom Tromey  <tom@tromey.com>
7658
7659         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7660         Return unique_xmalloc_ptr.
7661         (print_it_exception): Update.
7662
7663 2018-05-21  Tom Tromey  <tom@tromey.com>
7664
7665         * tracepoint.c (trace_dump_actions): Use std::string.
7666
7667 2018-05-21  Tom Tromey  <tom@tromey.com>
7668
7669         * symfile.c (reread_symbols): Use std::string for original_name.
7670
7671 2018-05-21  Tom Tromey  <tom@tromey.com>
7672
7673         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7674         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7675         constructor.
7676
7677 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7678
7679         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7680         instance to...
7681         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7682         * objfiles.c (get_objfile_bfd_data): Allocate
7683         objfile_per_bfd_storage with obstack_new when allocating on
7684         obstack.
7685
7686 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7687
7688         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7689         OBSTACK_ZALLOC.
7690         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7691         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7692         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7693         (add_pending): Likewise.
7694         (parse_symbol): Likewise.
7695         (parse_partial_symbols): Likewise.
7696         (psymtab_to_symtab_1): Likewise.
7697         (new_psymtab): Likewise.
7698         (elfmdebug_build_psymtabs): Likewise.
7699         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7700         * objfiles.c (get_objfile_bfd_data): Likewise.
7701         (objfile_register_static_link): Likewise.
7702         * psymtab.c (allocate_psymtab): Likewise.
7703         * stabsread.c (read_member_functions): Likewise.
7704         * xcoffread.c (xcoff_end_psymtab): Likewise.
7705
7706 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7707
7708         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7709         compiler supports std::is_trivially_constructible.
7710         * common/poison.h: Include obstack.h.
7711         (IsMallocable): Define to is_trivially_constructible if the
7712         compiler supports it, define to true_type otherwise.
7713         (xobnew): New.
7714         (XOBNEW): Redefine.
7715         (xobnewvec): New.
7716         (XOBNEWVEC): Redefine.
7717         * gdb_obstack.h (obstack_zalloc): New.
7718         (OBSTACK_ZALLOC): Redefine.
7719         (obstack_calloc): New.
7720         (OBSTACK_CALLOC): Redefine.
7721         (obstack_new): New.
7722         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7723         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7724         gdbarch.c.
7725         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7726         obstack_calloc/obstack_zalloc.
7727         (gdbarch_obstack_zalloc): Remove.
7728         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7729
7730 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7731
7732         * stack.c (backtrace_command_1): Remove useless variable int i.
7733
7734 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7735
7736         * stack.c (print_frame_info): Fix comment.
7737
7738 2018-05-18  Tom Tromey  <tom@tromey.com>
7739
7740         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7741         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7742         (~dwarf2_per_objfile): Update
7743         (dwarf2_get_dwz_file): Use new.
7744         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7745         unique_ptr.
7746
7747 2018-05-18  Tom Tromey  <tom@tromey.com>
7748
7749         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7750         unique_ptr.
7751         * dwarf2read.c (struct dwp_file): Add constructor and
7752         initializers.
7753         (open_and_init_dwp_file): Return a unique_ptr.
7754         (dwarf2_per_objfile, create_dwp_hash_table)
7755         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7756         (lookup_dwo_unit_in_dwp): Update.
7757         (open_and_init_dwp_file, get_dwp_file): Update.
7758
7759 2018-05-18  Tom Tromey  <tom@tromey.com>
7760
7761         * dwarf2read.c (dwarf2_per_objfile): Update.
7762         (struct mapped_index): Add initializers.
7763         (dwarf2_read_index): Use new.
7764         (dw2_symtab_iter_init): Update.
7765         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7766         unique_ptr.
7767
7768 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7769
7770         * dwarf2read.c (mapped_index) <total_size>: Remove.
7771
7772 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7773
7774         * unittests/format_pieces-selftests.c (test_format_specifier):
7775         Add ARI comments.
7776
7777 2018-05-18  Tom Tromey  <tom@tromey.com>
7778
7779         * c-typeprint.c (maybe_print_hole): New function.
7780         (c_print_type_struct_field_offset): Update.
7781         (c_type_print_base_struct_union): Call maybe_print_hole.
7782
7783 2018-05-17  Keith Seitz  <keiths@redhat.com>
7784
7785         * breakpoint.c (build_bpstat_chain): New function, moved from
7786         bpstat_stop_status.
7787         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7788         If no stop chain is passed, call build_bpstat_chain to build it.
7789         * breakpoint.h (build_bpstat_chain): Declare.
7790         (bpstat_stop_status): Move documentation here from breakpoint.c.
7791         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7792         build the stop chain and pass it to skip_inline_frames.
7793         Pass this stop chain to bpstat_stop_status.
7794         * inline-frame.c: Include breakpoint.h.
7795         (stopped_by_user_bp_inline_frame): New function.
7796         (skip_inline_frames): Add parameter `stop_chain'.
7797         Move documention to inline-frame.h.
7798         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7799         whether the frame should be elided.
7800         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7801         Add moved documentation and update for new parameter.
7802
7803 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7804
7805         PR cli/14975
7806         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7807         unittests/format_pieces-selftests.c.
7808         * common/format.h (format_piece) <operator==>: New.
7809         (format_pieces) <operator[]>: Remove.
7810         * common/format.c (format_pieces::format_pieces): Handle \e.
7811         * unittests/format_pieces-selftests.c: New.
7812
7813 2018-05-17  Tom Tromey  <tom@tromey.com>
7814
7815         PR symtab/23010:
7816         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7817         (dw2_instantiate_symtab): Add skip_partial parameter.
7818         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7819         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7820         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7821         (dw2_expand_symtabs_matching_one)
7822         (dw2_find_pc_sect_compunit_symtab)
7823         (dw2_debug_names_lookup_symbol)
7824         (dw2_debug_names_expand_symtabs_for_function): Update.
7825         (init_cutu_and_read_dies): Add skip_partial parameter.
7826         (process_psymtab_comp_unit, build_type_psymtabs_1)
7827         (process_skeletonless_type_unit, load_partial_comp_unit)
7828         (psymtab_to_symtab_1): Update.
7829         (load_full_comp_unit): Add skip_partial parameter.
7830         (process_imported_unit_die, dwarf2_read_addr_index)
7831         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7832         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7833         (read_signatured_type): Update.
7834
7835 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7836
7837         * value.c (release_value): Remove unused variable.
7838         (record_latest_value): Likewise.
7839         (access_value_history): Likewise.
7840         (preserve_values): Likewise.
7841
7842 2018-05-17  Tom Tromey  <tom@tromey.com>
7843
7844         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7845         Initialize.
7846
7847 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7848
7849         PR gdb/22286
7850         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7851         Also handle registers whose width is not a multiple of
7852         PTRACE_TYPE_RET.
7853         (linux_nat_trad_target::store_register): Likewise.
7854
7855 2018-05-16  Tom Tromey  <tom@tromey.com>
7856
7857         * gdbcore.h (core_bfd): Redefine.
7858         * corelow.c (core_target::close): Update.
7859         (core_target_open): Update.
7860         * progspace.h (struct program_space) <cbfd>: Now a
7861         gdb_bfd_ref_ptr.
7862
7863 2018-05-16  Tom Tromey  <tom@tromey.com>
7864
7865         PR cli/19551:
7866         * symfile-add-flags.h (enum symfile_add_flags)
7867         <SYMFILE_NOT_FILENAME>: New constant.
7868         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7869         objfile name from BFD.
7870         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7871         * minidebug.c (find_separate_debug_file_in_section): Put
7872         ".gnu_debugdata" into BFD's file name.
7873
7874 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7875
7876         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7877         Remove.
7878
7879 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7880
7881         PR binutils/21446
7882         * aarch64-tdep.c (aarch64_analyze_prologue,
7883         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7884         Indicate not interested in errors.
7885
7886 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7887
7888         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7889         Supply the MIPS_ZERO_REGNUM register.
7890
7891 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7892
7893         * mips-tdep.c (mask_address_var): Make variable static.
7894
7895 2018-05-14  Tom Tromey  <tom@tromey.com>
7896
7897         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7898
7899 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7900
7901         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7902         FXSAVE_ADDR for the mxcsr register.
7903
7904 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7905
7906         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7907
7908 2018-05-11  Pedro Alves  <palves@redhat.com>
7909
7910         * corelow.c (core_target) <core_target>: No longer inline.
7911         Initialize m_core_gdbarch, m_core_vec and build the section table
7912         here.
7913         <~core_target>: New.
7914         <core_gdbarch, get_core_register_section>: New methods.
7915         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7916         factored out from ...
7917         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7918         (core_ops): Delete.
7919         (sniff_core_bfd): Add gdbarch parameter.
7920         (core_close): Delete, merged into ...
7921         (core_target::close): ... here.  Delete self.
7922         (core_close_cleanup): Delete.
7923         (core_target_open): Allocate a core_target on the heap.  Use a
7924         unique_ptr instead of a cleanup.  Bits moved into the core_target
7925         ctor.  Adjust to use core_target methods instead of globals.
7926         (get_core_register_section): Rename to ...
7927         (core_target::get_core_register_section): ... this and adjust.
7928         (struct get_core_registers_cb_data): New.
7929         (get_core_registers_cb): Use it.  Use bool.
7930         (core_target::fetch_registers, core_target::files_info)
7931         (core_target::xfer_partial, core_target::read_description)
7932         (core_target::pid_to, core_target::thread_name): Adjust to
7933         reference class fields instead of globals.
7934         * target.h (struct target_ops_deleter, target_ops_up): New.
7935
7936 2018-05-11  Pedro Alves  <palves@redhat.com>
7937
7938         * corefile.c (core_file_command): Move to corelow.c.
7939         * corelow.c (the_core_target): Delete.
7940         (core_file_command): Moved from corefile.c.  Check exec_bfd
7941         instead of the_core_target.  Use target_detach instead of calling
7942         into the_core_target directly.
7943         (maybe_say_no_core_file_now): New.
7944         (core_target::detach): Use it.
7945         (_initialize_corelow): Remove references to the_core_target.
7946         * gdbcore.h (the_core_target): Delete.
7947
7948 2018-05-11  Tom Tromey  <tromey@redhat.com>
7949             Pedro Alves  <palves@redhat.com>
7950
7951         * corefile.c (core_bfd): Remove.
7952         * gdbcore.h (core_bfd): Now a macro.
7953         * progspace.h (struct program_space) <cbfd>: New field.
7954
7955 2018-05-11  Tom Tromey  <tom@tromey.com>
7956
7957         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7958         gdb::def_vector.
7959
7960 2018-05-10  Tom Tromey  <tom@tromey.com>
7961
7962         * configure: Rebuild.
7963         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7964
7965 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7966
7967         PR server/23158:
7968         * regformats/regdat.sh: Adjust script, following the addition
7969         of the new expedite_regs parameter to init_target_desc.
7970
7971 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7972     
7973         PR gdb/23127
7974         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7975         set_gdbarch_significant_addr_bit.
7976         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7977         set_gdbarch_significant_addr_bit.
7978         * utils.c (address_significant): Update to sign extend addr.
7979
7980 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7981
7982         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7983         (xtensa_linux_init_abi): Limit tdep->num_regs by
7984         tdep->num_nopriv_regs.
7985         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7986         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7987         not initialized.
7988
7989 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7990
7991         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7992
7993 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7994
7995         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7996         (I387_MXCSR_INIT_VAL): New constant.
7997         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7998         buffer if it was supplied by the inferior.
7999         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8000         (i387_xsave_get_clear_bv): New function.
8001         (i387_supply_xsave): Only read x87 control registers from the
8002         xsave buffer if the feature is enabled, and the state will have
8003         been written, otherwise, provide a suitable default.
8004         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8005         including x87 control registers.  Update control registers if they
8006         have changed from the default value, and mark features as enabled
8007         as required.
8008         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8009
8010 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8011
8012         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8013
8014 2018-05-07  Tom Tromey  <tom@tromey.com>
8015
8016         * configure: Rebuild.
8017         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8018
8019 2018-05-07  Tom Tromey  <tom@tromey.com>
8020
8021         PR tdep/20362:
8022         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8023         bit.  Use correct value for VDIV.
8024
8025 2018-05-04  Tom Tromey  <tom@tromey.com>
8026
8027         * configure: Rebuild.
8028         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8029
8030 2018-05-04  Tom Tromey  <tom@tromey.com>
8031
8032         * linux-record.c (record_linux_system_call) <case
8033         RECORD_SYS_RECVFROM>: Add "break".
8034
8035 2018-05-04  Tom Tromey  <tom@tromey.com>
8036
8037         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8038         Add missing "break".
8039         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8040         Add missing "break".
8041
8042 2018-05-04  Tom Tromey  <tom@tromey.com>
8043
8044         * rs6000-tdep.c (ppc_process_record_op4)
8045         (ppc_process_record_op63): Add fall-through comment.
8046
8047 2018-05-04  Tom Tromey  <tom@tromey.com>
8048
8049         * i386-tdep.c (i386_process_record): Add fall-through comment.
8050
8051 2018-05-04  Tom Tromey  <tom@tromey.com>
8052
8053         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8054         comment.
8055
8056 2018-05-04  Tom Tromey  <tom@tromey.com>
8057
8058         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8059         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8060         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8061         comment.
8062         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8063         comment.
8064         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8065         comment.
8066
8067 2018-05-04  Tom Tromey  <tom@tromey.com>
8068
8069         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8070
8071 2018-05-04  Tom Tromey  <tom@tromey.com>
8072
8073         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8074         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8075         * symfile.c (section_is_mapped): Fix fall-through comment.
8076         * stabsread.c (define_symbol, read_member_functions): Fix
8077         fall-through comment.
8078         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8079         comment.
8080         * remote.c (remote_wait_as): Fix fall-through comment.
8081         * p-exp.y (yylex): Fix fall-through comment.
8082         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8083         comment.
8084         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8085         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8086         * jv-exp.y (yylex): Fix fall-through comment.
8087         * go-exp.y (lex_one_token): Fix fall-through comment.
8088         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8089         fall-through comment.
8090         * f-exp.y (yylex): Fix fall-through comment.
8091         * dwarf2read.c (process_die): Fix fall-through comments.
8092         * dbxread.c (process_one_symbol): Fix fall-through comment.
8093         * d-exp.y (lex_one_token): Fix fall-through comment.
8094         * cp-name-parser.y (yylex): Fix fall-through comment.
8095         * coffread.c (coff_symtab_read): Fix fall-through comment.
8096         * c-exp.y (lex_one_token): Fix fall-through comment.
8097         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8098         comment.
8099         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8100         comment.
8101
8102 2018-05-04  Tom Tromey  <tom@tromey.com>
8103
8104         PR python/22730:
8105         * NEWS: Mention gdb.execute change.
8106         * gdbcmd.h (execute_control_command): Don't declare.
8107         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8108         execute_control_commands, execute_control_commands_to_string.
8109         * cli/cli-script.h (execute_control_commands)
8110         (execute_control_commands_to_string): Declare.
8111         (execute_control_command): Add from_tty parameter.
8112         * cli/cli-script.c (execute_control_commands)
8113         (execute_control_commands_to_string): New functions.
8114         (execute_user_command): Use execute_control_commands.
8115         (execute_control_command_1): Add "from_tty" parameter.  Update.
8116         (execute_control_command): Likewise.
8117
8118 2018-05-04  Tom Tromey  <tom@tromey.com>
8119
8120         PR python/22731:
8121         * NEWS: Mention that breakpoint commands are writable.
8122         * python/py-breakpoint.c (bppy_set_commands): New function.
8123         (breakpoint_object_getset) <"commands">: Use it.
8124
8125 2018-05-04  Tom Tromey  <tom@tromey.com>
8126
8127         * tracepoint.c (actions_command): Update.
8128         * mi/mi-cmd-break.c (mi_command_line_array)
8129         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8130         (mi_read_next_line): Remove.
8131         (mi_cmd_break_commands): Update.
8132         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8133         function_view.
8134         * cli/cli-script.c (get_command_line): Update.
8135         (process_next_line): Use function_view.  Constify.
8136         (recurse_read_control_structure, read_command_lines)
8137         (read_command_lines_1): Change argument types to function_view.
8138         (do_define_command, document_command): Update.
8139         * breakpoint.h (check_tracepoint_command): Don't declare.
8140         * breakpoint.c (check_tracepoint_command): Remove.
8141         (commands_command_1, create_tracepoint_from_upload): Update.
8142
8143 2018-05-04  Tom Tromey  <tom@tromey.com>
8144
8145         PR gdb/11750:
8146         * cli/cli-script.h (enum command_control_type) <define_control>:
8147         New constant.
8148         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8149         (build_command_line, execute_control_command_1)
8150         (process_next_line): Likewise.
8151         (do_define_command): New function, extracted from define_command.
8152         (define_command): Use it.
8153
8154 2018-05-04  Tom Tromey  <tom@tromey.com>
8155
8156         * tracepoint.c (actions_command): Update.
8157         * cli/cli-script.h (read_command_lines): Update.
8158         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8159         (MAX_TMPBUF): Remove define.
8160         (define_command): Use string_printf.
8161         (document_command): Likewise.
8162         * breakpoint.c (commands_command_1): Update.
8163
8164 2018-05-04  Tom Tromey  <tom@tromey.com>
8165
8166         * top.c (execute_command): Update.
8167         * cli/cli-script.h (print_command_lines): Now varargs.
8168         * cli/cli-script.c (print_command_lines): Now varargs.
8169         (execute_control_command_1) <case while_control, case if_control>:
8170         Update.
8171
8172 2018-05-04  Tom Tromey  <tom@tromey.com>
8173
8174         * tracepoint.c (all_tracepoint_actions): Rename from
8175         all_tracepoint_actions_and_cleanup.  Change return type.
8176         (actions_command, encode_actions_1, encode_actions)
8177         (trace_dump_actions, tdump_command): Update.
8178         * remote.c (remote_download_command_source): Update.
8179         * python/python.c (gdbpy_eval_from_control_command)
8180         (python_command, python_interactive_command): Update.
8181         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8182         * guile/guile.c (guile_command)
8183         (gdbscm_eval_from_control_command, guile_command): Update.
8184         * compile/compile.c (compile_code_command)
8185         (compile_print_command, compile_to_object): Update.
8186         * cli/cli-script.h (struct command_lines_deleter): New.
8187         (counted_command_line): New typedef.
8188         (struct command_line): Add constructor, destructor.
8189         <body_list>: Remove.
8190         <body_list_0, body_list_1>: New members.
8191         (command_line_up): Remove typedef.
8192         (read_command_lines, read_command_lines_1, get_command_line):
8193         Update.
8194         (copy_command_lines): Don't declare.
8195         * cli/cli-script.c (build_command_line): Use "new".
8196         (get_command_line): Return counted_command_line.
8197         (print_command_lines, execute_user_command)
8198         (execute_control_command_1, while_command, if_command): Update.
8199         (realloc_body_list): Remove.
8200         (process_next_line, recurse_read_control_structure): Update.
8201         (read_command_lines, read_command_lines_1): Return counted_command_line.
8202         (free_command_lines): Use "delete".
8203         (copy_command_lines): Remove.
8204         (define_command, document_command, show_user_1): Update.
8205         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8206         a counted_command_line.
8207         * breakpoint.h (counted_command_line): Remove typedef.
8208         (breakpoint_set_commands): Update.
8209         * breakpoint.c (check_no_tracepoint_commands)
8210         (validate_commands_for_breakpoint): Update.
8211         (breakpoint_set_commands): Change commands to be a
8212         counted_command_line.
8213         (commands_command_1, update_dprintf_command_list)
8214         (create_tracepoint_from_upload): Update.
8215
8216 2018-05-04  Tom Tromey  <tom@tromey.com>
8217
8218         * cli/cli-decode.h (cmd_list_element): New constructor.
8219         (~cmd_list_element): New destructor.
8220         (struct cmd_list_element): Add initializers.
8221         * cli/cli-decode.c (do_add_cmd): Use "new".
8222         (delete_cmd): Use "delete".
8223
8224 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8225             Pedro Alves <palves@redhat.com>
8226
8227         PR breakpoints/19806 and support for PR external/20207.
8228         * NEWS: Mention Aarch64 watchpoint improvements.
8229         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8230         watchpoints and PR external/20207 watchpoints.
8231         * nat/aarch64-linux-hw-point.c
8232         (kernel_supports_any_contiguous_range): New.
8233         (aarch64_watchpoint_offset): New.
8234         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8235         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8236         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8237         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8238         next_addr_orig_p.  Support PR external/20207 watchpoints.
8239         (aarch64_downgrade_regs): New.
8240         (aarch64_dr_state_insert_one_point): New parameters offset and
8241         addr_orig.
8242         (aarch64_dr_state_remove_one_point): Likewise.
8243         (aarch64_handle_breakpoint): Update caller.
8244         (aarch64_handle_aligned_watchpoint): Likewise.
8245         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8246         aligned_offset.
8247         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8248         aarch64_downgrade_regs.
8249         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8250         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8251         (DR_CONTROL_MASK): ... this.
8252         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8253         (unsigned int aarch64_watchpoint_offset): New prototype.
8254         (aarch64_linux_set_debug_regs): Remove const from state.
8255         * utils.c (align_up, align_down): Move to ...
8256         * common/common-utils.c (align_up, align_down): ... here.
8257         * utils.h (align_up, align_down): Move to ...
8258         * common/common-utils.h (align_up, align_down): ... here.
8259
8260 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8261
8262         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8263         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8264         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8265         Re-implement to match the ABI as summarized in GCC's
8266         gcc/config/sparc/sparc.c.  All callers updated.
8267         (sparc32_store_arguments): Remove assertion.
8268
8269 2018-05-04  Tom Tromey  <tom@tromey.com>
8270
8271         * printcmd.c: Don't include tui.h.
8272         (decode_format): Use skip_spaces.
8273
8274 2018-05-04  Tom Tromey  <tom@tromey.com>
8275
8276         PR gdb/22619:
8277         * printcmd.c (last_count): New global.
8278         (x_command): Use saved count when repeating.
8279
8280 2018-05-04  Tom Tromey  <tom@tromey.com>
8281
8282         * nto-procfs.c (do_closedir_cleanup): Remove.
8283         (procfs_pidlist): Use gdb_dir_up.
8284         * procfs.c (do_closedir_cleanup): Remove.
8285         (proc_update_threads): Use gdb_dir_up.
8286         * common/filestuff.h (struct gdb_dir_deleter): New.
8287         (gdb_dir_up): New typedef.
8288
8289 2018-05-04  Tom Tromey  <tom@tromey.com>
8290
8291         * ada-lang.c (print_mention_exception): Use std::string.
8292
8293 2018-05-04  Tom Tromey  <tom@tromey.com>
8294
8295         * ada-lang.c (create_excep_cond_exprs): Update.
8296         (ada_exception_catchpoint_cond_string): Use std::string.
8297
8298 2018-05-04  Tom Tromey  <tom@tromey.com>
8299
8300         * ada-lang.c (xget_renaming_scope): Return std::string.
8301         (old_renaming_is_invisible): Update.
8302
8303 2018-05-04  Tom Tromey  <tom@tromey.com>
8304
8305         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8306         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8307
8308 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8309
8310         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8311
8312 2018-05-04  Tom Tromey  <tom@tromey.com>
8313
8314         * remote.c (remote_query_supported_append): Change type.
8315         (remote_check_symbols): Update.
8316
8317 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8318
8319         PR gdb/11420
8320         * configure.ac: Prepend libpython.
8321         * python/python-config.py: Likewise.
8322         * configure: Regenerate.
8323
8324 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8325
8326         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8327
8328 2018-05-03  Pedro Alves  <palves@redhat.com>
8329
8330         * s390-linux-nat.c
8331         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8332         override.  Write 'true' instead of '1'.
8333         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8334         declaration.
8335
8336 2018-05-02  Pedro Alves  <palves@redhat.com>
8337
8338         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8339         add_inf_child_target.
8340         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8341         add_inf_child_target.
8342         * aix-thread.c (aix_thread_target_info): New.
8343         (aix_thread_target) <shortname, longname, doc>: Delete.
8344         <info>: New.
8345         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8346         add_inf_child_target.
8347         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8348         add_inf_child_target.
8349         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8350         add_inf_child_target.
8351         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8352         add_inf_child_target.
8353         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8354         add_inf_child_target.
8355         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8356         add_inf_child_target.
8357         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8358         add_inf_child_target.
8359         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8360         add_inf_child_target.
8361         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8362         add_inf_child_target.
8363         * bfd-target.c (target_bfd_target_info): New.
8364         (target_bfd) <shortname, longname, doc>: Delete.
8365         <info>: New.
8366         * bsd-kvm.c (bsd_kvm_target_info): New.
8367         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8368         <info>: New.
8369         (bsd_kvm_target::open): Rename to ...
8370         (bsd_kvm_target_open): ... this.  Adjust.
8371         * bsd-uthread.c (bsd_uthread_target_info): New.
8372         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8373         <info>: New.
8374         * corefile.c (core_file_command): Adjust.
8375         * corelow.c (core_target_info): New.
8376         (core_target) <shortname, longname, doc>: Delete.
8377         <info>: New.
8378         (core_target::open): Rename to ...
8379         (core_target_open): ... this.  Adjust.
8380         * ctf.c (ctf_target_info): New.
8381         (ctf_target) <shortname, longname, doc>: Delete.
8382         <info>: New.
8383         (ctf_target::open): Rename to ...
8384         (ctf_target_open): ... this.
8385         (_initialize_ctf): Adjust.
8386         * exec.c (exec_target_info): New.
8387         (exec_target) <shortname, longname, doc>: Delete.
8388         <info>: New.
8389         (exec_target::open): Rename to ...
8390         (exec_target_open): ... this.
8391         * gdbcore.h (core_target_open): Declare.
8392         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8393         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8394         add_inf_child_target.
8395         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8396         add_inf_child_target.
8397         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8398         add_inf_child_target.
8399         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8400         add_inf_child_target.
8401         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8402         add_inf_child_target.
8403         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8404         add_inf_child_target.
8405         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8406         add_inf_child_target.
8407         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8408         add_inf_child_target.
8409         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8410         add_inf_child_target.
8411         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8412         add_inf_child_target.
8413         * inf-child.c (inf_child_target_info): New.
8414         (inf_child_target::info): New.
8415         (inf_child_open_target): Remove 'target' parameter.  Use
8416         get_native_target instead.
8417         (inf_child_target::open): Delete.
8418         (add_inf_child_target): New.
8419         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8420         Delete.
8421         <info>: New.
8422         (add_inf_child_target): Declare.
8423         (inf_child_open_target): Declare.
8424         * linux-thread-db.c (thread_db_target_info): New.
8425         (thread_db_target) <shortname, longname, doc>: Delete.
8426         <info>: New.
8427         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8428         add_inf_child_target.
8429         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8430         add_inf_child_target.
8431         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8432         add_inf_child_target.
8433         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8434         add_inf_child_target.
8435         * make-target-delegates (print_class): Adjust.
8436         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8437         add_inf_child_target.
8438         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8439         add_inf_child_target.
8440         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8441         add_inf_child_target.
8442         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8443         add_inf_child_target.
8444         * nto-procfs.c (nto_native_target_info): New.
8445         (nto_procfs_target_native) <shortname, longname, doc>:
8446         Delete.
8447         <info>: New.
8448         (nto_procfs_target_info): New.
8449         (nto_procfs_target_procfs) <shortname, longname, doc>:
8450         Delete.
8451         <info>: New.
8452         (init_procfs_targets): Adjust.
8453         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8454         add_inf_child_target.
8455         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8456         add_inf_child_target.
8457         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8458         add_inf_child_target.
8459         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8460         add_inf_child_target.
8461         * ravenscar-thread.c (ravenscar_target_info): New.
8462         (ravenscar_thread_target) <shortname, longname, doc>:
8463         Delete.
8464         <info>: New.
8465         * record-btrace.c (record_btrace_target_info):
8466         (record_btrace_target) <shortname, longname, doc>: Delete.
8467         <info>: New.
8468         (record_btrace_target::open): Rename to ...
8469         (record_btrace_target_open): ... this.  Adjust.
8470         * record-full.c (record_longname, record_doc): New.
8471         (record_full_base_target) <shortname, longname, doc>: Delete.
8472         <info>: New.
8473         (record_full_target_info): New.
8474         (record_full_target): <shortname>: Delete.
8475         <info>: New.
8476         (record_full_core_open_1, record_full_open_1): Update comments.
8477         (record_full_base_target::open): Rename to ...
8478         (record_full_open): ... this.
8479         (cmd_record_full_restore): Update.
8480         (_initialize_record_full): Update.
8481         * remote-sim.c (remote_sim_target_info): New.
8482         (gdbsim_target) <shortname, longname, doc>: Delete.
8483         <info>: New.
8484         (gdbsim_target::open): Rename to ...
8485         (gdbsim_target_open): ... this.
8486         (_initialize_remote_sim): Adjust.
8487         * remote.c (remote_doc): New.
8488         (remote_target_info): New.
8489         (remote_target) <shortname, longname, doc>: Delete.
8490         <info>: New.
8491         (extended_remote_target_info): New.
8492         (extended_remote_target) <shortname, longname, doc>: Delete.
8493         <info>: New.
8494         (remote_target::open_1): Make static.  Adjust.
8495         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8496         * s390-linux-nat.c (_initialize_s390_nat): Use
8497         add_inf_child_target.
8498         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8499         add_inf_child_target.
8500         * sol-thread.c (thread_db_target_info): New.
8501         (sol_thread_target) <shortname, longname, doc>: Delete.
8502         <info>: New.
8503         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8504         add_inf_child_target.
8505         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8506         add_inf_child_target.
8507         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8508         add_inf_child_target.
8509         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8510         add_inf_child_target.
8511         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8512         add_inf_child_target.
8513         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8514         add_inf_child_target.
8515         * spu-linux-nat.c (_initialize_spu_nat): Use
8516         add_inf_child_target.
8517         * spu-multiarch.c (spu_multiarch_target_info): New.
8518         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8519         <info>: New.
8520         * target-delegates.c: Regenerate.
8521         * target.c: Include <unordered_map>.
8522         (target_ops_p): Delete.
8523         (DEF_VEC_P(target_ops_p)): Delete.
8524         (target_factories): New.
8525         (test_target_info): New.
8526         (test_target_ops::info): New.
8527         (open_target): Adjust to use target_factories.
8528         (add_target_with_completer): Rename to ...
8529         (add_target): ... this.  Change prototype.  Register target_info
8530         and open callback in target_factories.  Register target_info in
8531         command context instead of target_ops.
8532         (add_target): Delete old implementation.
8533         (add_deprecated_target_alias): Change prototype.  Adjust.
8534         (the_native_target): New.
8535         (set_native_target, get_native_target): New.
8536         (find_default_run_target): Use the_native_target.
8537         (find_attach_target, find_run_target): Simplify.
8538         (target_ops::open): Delete.
8539         (dummy_target_info): New.
8540         (dummy_target::shortname, dummy_target::longname)
8541         (dummy_target::doc): Delete.
8542         (dummy_target::info): New.
8543         (debug_target::shortname, debug_target::longname)
8544         (debug_target::doc): Delete.
8545         (debug_target::info): New.
8546         * target.h (struct target_info): New.
8547         (target_ops::~target_ops): Add comment.
8548         (target_ops::info): New.
8549         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8550         longer virtual.  Implement in terms of target_info.
8551         (set_native_target, get_native_target): Declare.
8552         (target_open_ftype): New.
8553         (add_target, add_target_with_completer)
8554         (add_deprecated_target_alias): Change prototype.
8555         (test_target) <shortname, longname, doc>: Delete.
8556         <info>: New.
8557         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8558         add_inf_child_target.
8559         * tracefile-tfile.c (tfile_target_info): New.
8560         (tfile_target) <shortname, longname, doc>: Delete.
8561         <info>: New.
8562         (tfile_target::open): Rename to ...
8563         (tfile_target_open): ... this.
8564         (_initialize_tracefile_tfile): Adjust.
8565         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8566         add_inf_child_target.
8567         * windows-nat.c (_initialize_windows_nat): Use
8568         add_inf_child_target.
8569         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8570         add_inf_child_target.
8571
8572 2018-05-02  Pedro Alves  <palves@redhat.com>
8573
8574         * linux-nat.h (linux_nat_target) <low_new_thread,
8575         low_delete_thread, low_new_fork, low_forget_process,
8576         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8577         New virtual methods.
8578         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8579         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8580         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8581         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8582         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8583         Delete.
8584         * linux-fork.c (delete_fork): Adjust to call low method.
8585         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8586         (linux_nat_new_fork, linux_nat_forget_process_hook)
8587         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8588         (linux_nat_status_is_event):
8589         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8590         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8591         to call low method.
8592         (sigtrap_is_event): Rename to ...
8593         (linux_nat_target::low_status_is_event): ... this.
8594         (linux_nat_set_status_is_event): Delete.
8595         (save_stop_reason, linux_nat_wait_1)
8596         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8597         low methods.
8598         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8599         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8600         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8601         (linux_nat_set_prepare_to_resume): Delete.
8602         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8603         low virtual methods.
8604         * amd64-linux-nat.c: Likewise.
8605         * arm-linux-nat.c: Likewise.
8606         * i386-linux-nat.c: Likewise.
8607         * ia64-linux-nat.c: Likewise.
8608         * mips-linux-nat.c: Likewise.
8609         * ppc-linux-nat.c: Likewise.
8610         * s390-linux-nat.c: Likewise.
8611         * sparc64-linux-nat.c: Likewise.
8612         * x86-linux-nat.c: Likewise.
8613         * x86-linux-nat.h: Include "nat/x86-linux.h".
8614         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8615         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8616         Override methods.
8617
8618 2018-05-02  Pedro Alves  <palves@redhat.com>
8619
8620         * target.h (target_ops)
8621         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8622         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8623         stopped_by_watchpoint, have_continuable_watchpoint,
8624         stopped_data_address, watchpoint_addr_within_range,
8625         can_accel_watchpoint_condition, can_run, thread_alive,
8626         has_all_memory, has_memory, has_stack, has_registers,
8627         has_execution, can_async_p, is_async_p, supports_non_stop,
8628         always_non_stop_p, can_execute_reverse, supports_multi_process,
8629         supports_enable_disable_tracepoint,
8630         supports_disable_randomization, supports_string_tracing,
8631         supports_evaluation_of_breakpoint_conditions,
8632         can_run_breakpoint_commands, filesystem_is_local,
8633         can_download_tracepoint, get_trace_state_variable_value,
8634         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8635         record_is_replaying, record_will_replay,
8636         augmented_libraries_svr4_read>: Adjust to return bool.
8637         * aarch64-linux-nat.c: All implementations adjusted.
8638         * aix-thread.c: All implementations adjusted.
8639         * arm-linux-nat.c: All implementations adjusted.
8640         * breakpoint.c: All implementations adjusted.
8641         * bsd-kvm.c: All implementations adjusted.
8642         * bsd-uthread.c: All implementations adjusted.
8643         * corelow.c: All implementations adjusted.
8644         * ctf.c: All implementations adjusted.
8645         * darwin-nat.c: All implementations adjusted.
8646         * darwin-nat.h: All implementations adjusted.
8647         * exec.c: All implementations adjusted.
8648         * fbsd-nat.c: All implementations adjusted.
8649         * fbsd-nat.h: All implementations adjusted.
8650         * gnu-nat.c: All implementations adjusted.
8651         * gnu-nat.h: All implementations adjusted.
8652         * go32-nat.c: All implementations adjusted.
8653         * ia64-linux-nat.c: All implementations adjusted.
8654         * inf-child.c: All implementations adjusted.
8655         * inf-child.h: All implementations adjusted.
8656         * inf-ptrace.c: All implementations adjusted.
8657         * inf-ptrace.h: All implementations adjusted.
8658         * linux-nat.c: All implementations adjusted.
8659         * linux-nat.h: All implementations adjusted.
8660         * mips-linux-nat.c: All implementations adjusted.
8661         * nto-procfs.c: All implementations adjusted.
8662         * ppc-linux-nat.c: All implementations adjusted.
8663         * procfs.c: All implementations adjusted.
8664         * ravenscar-thread.c: All implementations adjusted.
8665         * record-btrace.c: All implementations adjusted.
8666         * record-full.c: All implementations adjusted.
8667         * remote-sim.c: All implementations adjusted.
8668         * remote.c: All implementations adjusted.
8669         * s390-linux-nat.c: All implementations adjusted.
8670         * sol-thread.c: All implementations adjusted.
8671         * spu-multiarch.c: All implementations adjusted.
8672         * target-delegates.c: All implementations adjusted.
8673         * target.c: All implementations adjusted.
8674         * target.h: All implementations adjusted.
8675         * tracefile-tfile.c: All implementations adjusted.
8676         * tracefile.c: All implementations adjusted.
8677         * tracefile.h: All implementations adjusted.
8678         * windows-nat.c: All implementations adjusted.
8679         * x86-linux-nat.h: All implementations adjusted.
8680         * x86-nat.h: All implementations adjusted.
8681
8682 2018-05-02  Pedro Alves  <palves@redhat.com>
8683
8684         * make-target-delegates (scan_target_h): Don't trim lines here.
8685         Replace sequences of tabs and/or whitespace with a single
8686         whitespace.
8687         (top level, parsing methods): Trim each line before processing it
8688         here.
8689
8690 2018-05-02  Pedro Alves  <palves@redhat.com>
8691             John Baldwin  <jhb@freebsd.org>
8692
8693         * target.h (enum strata) <debug_stratum>: New.
8694         (struct target_ops) <all delegation methods>: Replace by C++
8695         virtual methods, and drop "to_" prefix.  All references updated
8696         throughout.
8697         <to_shortname, to_longname, to_doc, to_data,
8698         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8699         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8700         virtual methods.  All references updated throughout.
8701         <can_attach, supports_terminal_ours, can_create_inferior,
8702         get_thread_control_capabilities, attach_no_wait>: New
8703         virtual methods.
8704         <insert_breakpoint, remove_breakpoint>: Now
8705         TARGET_DEFAULT_NORETURN methods.
8706         <info_proc>: Now returns bool.
8707         <to_magic>: Delete.
8708         (OPS_MAGIC): Delete.
8709         (current_target): Delete.  All references replaced by references
8710         to ...
8711         (target_stack): ... this.  New.
8712         (target_shortname, target_longname): Adjust.
8713         (target_can_run): Now a function declaration.
8714         (default_child_has_all_memory, default_child_has_memory)
8715         (default_child_has_stack, default_child_has_registers)
8716         (default_child_has_execution): Remove target_ops parameter.
8717         (complete_target_initialization): Delete.
8718         (memory_breakpoint_target): New template class.
8719         (test_target_ops): Refactor as a C++ class with virtual methods.
8720         * make-target-delegates (NAME_PART): Tighten.
8721         (POINTER_PART, CP_SYMBOL): New.
8722         (SIMPLE_RETURN_PART): Reimplement.
8723         (VEC_RETURN_PART): Expect less.
8724         (RETURN_PART, VIRTUAL_PART): New.
8725         (METHOD): Adjust to C++ virtual methods.
8726         (scan_target_h): Remove reference to C99.
8727         (dname): Output "target_ops::" prefix.
8728         (write_function_header): Adjust to output a C++ class method.
8729         (write_declaration): New.
8730         (write_delegator): Adjust to output a C++ class method.
8731         (tdname): Output "dummy_target::" prefix.
8732         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8733         method.
8734         (tdefault_names, debug_names): Delete.
8735         (return_types, tdefaults, styles, argtypes_array): New.
8736         (top level): All methods are delegators.
8737         (print_class): New.
8738         (top level): Print dummy_target and debug_target classes.
8739         * target-delegates.c: Regenerate.
8740         * target-debug.h (target_debug_print_enum_info_proc_what)
8741         (target_debug_print_thread_control_capabilities)
8742         (target_debug_print_thread_info_p): New.
8743         * target.c (dummy_target): Delete.
8744         (the_dummy_target, the_debug_target): New.
8745         (target_stack): Now extern.
8746         (set_targetdebug): Push/unpush debug target.
8747         (default_child_has_all_memory, default_child_has_memory)
8748         (default_child_has_stack, default_child_has_registers)
8749         (default_child_has_execution): Remove target_ops parameter.
8750         (complete_target_initialization): Delete.
8751         (add_target_with_completer): No longer call
8752         complete_target_initialization.
8753         (target_supports_terminal_ours): Use regular delegation.
8754         (update_current_target): Delete.
8755         (push_target): No longer check magic number.  Don't call
8756         update_current_target.
8757         (unpush_target): Don't call update_current_target.
8758         (target_is_pushed): No longer check magic number.
8759         (target_require_runnable): Skip for all stratums over
8760         process_stratum.
8761         (target_ops::info_proc): New.
8762         (target_info_proc): Use find_target_at and
8763         find_default_run_target.
8764         (target_supports_disable_randomization): Use regular delegation.
8765         (target_get_osdata): Use find_target_at.
8766         (target_ops::open, target_ops::close, target_ops::can_attach)
8767         (target_ops::attach, target_ops::can_create_inferior)
8768         (target_ops::create_inferior, target_ops::can_run)
8769         (target_can_run): New.
8770         (default_fileio_target): Use regular delegation.
8771         (target_ops::fileio_open, target_ops::fileio_pwrite)
8772         (target_ops::fileio_pread, target_ops::fileio_fstat)
8773         (target_ops::fileio_close, target_ops::fileio_unlink)
8774         (target_ops::fileio_readlink): New.
8775         (target_fileio_open_1, target_fileio_unlink)
8776         (target_fileio_readlink): Always call the target method.  Handle
8777         FILEIO_ENOSYS.
8778         (return_zero, return_zero_has_execution): Delete.
8779         (init_dummy_target): Delete.
8780         (dummy_target::dummy_target, dummy_target::shortname)
8781         (dummy_target::longname, dummy_target::doc)
8782         (debug_target::debug_target, debug_target::shortname)
8783         (debug_target::longname, debug_target::doc): New.
8784         (target_supports_delete_record): Use regular delegation.
8785         (setup_target_debug): Delete.
8786         (maintenance_print_target_stack): Skip debug_stratum.
8787         (initialize_targets): Instantiate the_dummy_target and
8788         the_debug_target.
8789         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8790         use target_stack.
8791         (target_auxv_search, fprint_target_auxv): Adjust.
8792         (info_auxv_command): Adjust to use target_stack.
8793         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8794         * exceptions.c (print_flush): Handle a NULL target_stack.
8795         * regcache.c (target_ops_no_register): Refactor as class with
8796         virtual methods.
8797
8798         * exec.c (exec_target): New class.
8799         (exec_ops): Now an exec_target.
8800         (exec_open, exec_close_1, exec_get_section_table)
8801         (exec_xfer_partial, exec_files_info, exec_has_memory)
8802         (exec_make_note_section): Refactor as exec_target methods.
8803         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8804         Delete.
8805         (exec_target::find_memory_regions): New.
8806         (_initialize_exec): Don't call init_exec_ops.
8807         * gdbcore.h (exec_file_clear): Delete.
8808
8809         * corefile.c (core_target): Delete.
8810         (core_file_command): Adjust.
8811         * corelow.c (core_target): New class.
8812         (the_core_target): New.
8813         (core_close): Remove target_ops parameter.
8814         (core_close_cleanup): Adjust.
8815         (core_target::close): New.
8816         (core_open, core_detach, get_core_registers, core_files_info)
8817         (core_xfer_partial, core_thread_alive, core_read_description)
8818         (core_pid_to_str, core_thread_name, core_has_memory)
8819         (core_has_stack, core_has_registers, core_info_proc): Rework as
8820         core_target methods.
8821         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8822         (_initialize_corelow): Initialize the_core_target.
8823         * gdbcore.h (core_target): Delete.
8824         (the_core_target): New.
8825
8826         * ctf.c: (ctf_target): New class.
8827         (ctf_ops): Now a ctf_target.
8828         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8829         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8830         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8831         methods.
8832         (init_ctf_ops): Delete.
8833         (_initialize_ctf): Don't call it.
8834         * tracefile-tfile.c (tfile_target): New class.
8835         (tfile_ops): Now a tfile_target.
8836         (tfile_open, tfile_close, tfile_files_info)
8837         (tfile_get_tracepoint_status, tfile_trace_find)
8838         (tfile_fetch_registers, tfile_xfer_partial)
8839         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8840         Refactor as tfile_target methods.
8841         (tfile_xfer_partial_features): Remove target_ops parameter.
8842         (init_tfile_ops): Delete.
8843         (_initialize_tracefile_tfile): Don't call it.
8844         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8845         (tracefile_has_stack, tracefile_has_registers)
8846         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8847         tracefile_target methods.
8848         (init_tracefile_ops): Delete.
8849         (tracefile_target::tracefile_target): New.
8850         * tracefile.h: Include "target.h".
8851         (tracefile_target): New class.
8852         (init_tracefile_ops): Delete.
8853
8854         * spu-multiarch.c (spu_multiarch_target): New class.
8855         (spu_ops): Now a spu_multiarch_target.
8856         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8857         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8858         (spu_search_memory, spu_mourn_inferior): Refactor as
8859         spu_multiarch_target methods.
8860         (init_spu_ops): Delete.
8861         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8862         complete_target_initialization.
8863
8864         * ravenscar-thread.c (ravenscar_thread_target): New class.
8865         (ravenscar_ops): Now a ravenscar_thread_target.
8866         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8867         (ravenscar_thread_alive, ravenscar_pid_to_str)
8868         (ravenscar_fetch_registers, ravenscar_store_registers)
8869         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8870         (ravenscar_stopped_by_hw_breakpoint)
8871         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8872         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8873         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8874         methods.
8875         (init_ravenscar_thread_ops): Delete.
8876         (_initialize_ravenscar): Remove references to
8877         init_ravenscar_thread_ops and complete_target_initialization.
8878
8879         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8880         (bsd_uthread_target): New class.
8881         (bsd_uthread_ops): Now a bsd_uthread_target.
8882         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8883         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8884         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8885         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8886         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8887         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8888         (bsd_uthread_target): Delete function.
8889         (_initialize_bsd_uthread): Remove reference to
8890         complete_target_initialization.
8891
8892         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8893         (target_bfd): ... this new class.
8894         (target_bfd_xfer_partial, target_bfd_get_section_table)
8895         (target_bfd_close): Refactor as target_bfd methods.
8896         (target_bfd::~target_bfd): New.
8897         (target_bfd_reopen): Adjust.
8898         (target_bfd::close): New.
8899
8900         * record-btrace.c (record_btrace_target): New class.
8901         (record_btrace_ops): Now a record_btrace_target.
8902         (record_btrace_open, record_btrace_stop_recording)
8903         (record_btrace_disconnect, record_btrace_close)
8904         (record_btrace_async, record_btrace_info)
8905         (record_btrace_insn_history, record_btrace_insn_history_range)
8906         (record_btrace_insn_history_from, record_btrace_call_history)
8907         (record_btrace_call_history_range)
8908         (record_btrace_call_history_from, record_btrace_record_method)
8909         (record_btrace_is_replaying, record_btrace_will_replay)
8910         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8911         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8912         (record_btrace_store_registers, record_btrace_prepare_to_store)
8913         (record_btrace_to_get_unwinder)
8914         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8915         (record_btrace_commit_resume, record_btrace_wait)
8916         (record_btrace_stop, record_btrace_can_execute_reverse)
8917         (record_btrace_stopped_by_sw_breakpoint)
8918         (record_btrace_supports_stopped_by_sw_breakpoint)
8919         (record_btrace_stopped_by_hw_breakpoint)
8920         (record_btrace_supports_stopped_by_hw_breakpoint)
8921         (record_btrace_update_thread_list, record_btrace_thread_alive)
8922         (record_btrace_goto_begin, record_btrace_goto_end)
8923         (record_btrace_goto, record_btrace_stop_replaying_all)
8924         (record_btrace_execution_direction)
8925         (record_btrace_prepare_to_generate_core)
8926         (record_btrace_done_generating_core): Refactor as
8927         record_btrace_target methods.
8928         (init_record_btrace_ops): Delete.
8929         (_initialize_record_btrace): Remove reference to
8930         init_record_btrace_ops.
8931         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8932         the execution_direction global.
8933         (record_full_base_target, record_full_target)
8934         (record_full_core_target): New classes.
8935         (record_full_ops): Now a record_full_target.
8936         (record_full_core_ops): Now a record_full_core_target.
8937         (record_full_target::detach, record_full_target::disconnect)
8938         (record_full_core_target::disconnect)
8939         (record_full_target::mourn_inferior, record_full_target::kill):
8940         New.
8941         (record_full_open, record_full_close, record_full_async): Refactor
8942         as methods of the record_full_base_target class.
8943         (record_full_resume, record_full_commit_resume): Refactor
8944         as methods of the record_full_target class.
8945         (record_full_wait, record_full_stopped_by_watchpoint)
8946         (record_full_stopped_data_address)
8947         (record_full_stopped_by_sw_breakpoint)
8948         (record_full_supports_stopped_by_sw_breakpoint)
8949         (record_full_stopped_by_hw_breakpoint)
8950         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8951         methods of the record_full_base_target class.
8952         (record_full_store_registers, record_full_xfer_partial)
8953         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8954         Refactor as methods of the record_full_target class.
8955         (record_full_can_execute_reverse, record_full_get_bookmark)
8956         (record_full_goto_bookmark, record_full_execution_direction)
8957         (record_full_record_method, record_full_info, record_full_delete)
8958         (record_full_is_replaying, record_full_will_replay)
8959         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8960         (record_full_stop_replaying): Refactor as methods of the
8961         record_full_base_target class.
8962         (record_full_core_resume, record_full_core_kill)
8963         (record_full_core_fetch_registers)
8964         (record_full_core_prepare_to_store)
8965         (record_full_core_store_registers, record_full_core_xfer_partial)
8966         (record_full_core_insert_breakpoint)
8967         (record_full_core_remove_breakpoint)
8968         (record_full_core_has_execution): Refactor
8969         as methods of the record_full_core_target class.
8970         (record_full_base_target::supports_delete_record): New.
8971         (init_record_full_ops): Delete.
8972         (init_record_full_core_ops): Delete.
8973         (record_full_save): Refactor as method of the
8974         record_full_base_target class.
8975         (_initialize_record_full): Remove references to
8976         init_record_full_ops and init_record_full_core_ops.
8977
8978         * remote.c (remote_target, extended_remote_target): New classes.
8979         (remote_ops): Now a remote_target.
8980         (extended_remote_ops): Now an extended_remote_target.
8981         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8982         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8983         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8984         (remote_pass_signals, remote_set_syscall_catchpoint)
8985         (remote_program_signals, )
8986         (remote_thread_always_alive): Remove target_ops parameter.
8987         (remote_thread_alive, remote_thread_name)
8988         (remote_update_thread_list, remote_threads_extra_info)
8989         (remote_static_tracepoint_marker_at)
8990         (remote_static_tracepoint_markers_by_strid)
8991         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8992         (remote_open): Refactor as methods of remote_target.
8993         (extended_remote_open, extended_remote_detach)
8994         (extended_remote_attach, extended_remote_post_attach):
8995         (extended_remote_supports_disable_randomization)
8996         (extended_remote_create_inferior): : Refactor as method of
8997         extended_remote_target.
8998         (remote_set_permissions, remote_open_1, remote_detach)
8999         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9000         (remote_resume, remote_commit_resume, remote_stop)
9001         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9002         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9003         (remote_prepare_to_store, remote_store_registers)
9004         (remote_flash_erase, remote_flash_done, remote_files_info)
9005         (remote_kill, remote_mourn, remote_insert_breakpoint)
9006         (remote_remove_breakpoint, remote_insert_watchpoint)
9007         (remote_watchpoint_addr_within_range)
9008         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9009         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9010         (remote_supports_stopped_by_sw_breakpoint)
9011         (remote_stopped_by_hw_breakpoint)
9012         (remote_supports_stopped_by_hw_breakpoint)
9013         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9014         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9015         (remote_verify_memory): Refactor as methods of remote_target.
9016         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9017         parameter.
9018         (remote_xfer_partial, remote_get_memory_xfer_limit)
9019         (remote_search_memory, remote_rcmd, remote_memory_map)
9020         (remote_pid_to_str, remote_get_thread_local_address)
9021         (remote_get_tib_address, remote_read_description): Refactor as
9022         methods of remote_target.
9023         (remote_target::fileio_open, remote_target::fileio_pwrite)
9024         (remote_target::fileio_pread, remote_target::fileio_close): New.
9025         (remote_hostio_readlink, remote_hostio_fstat)
9026         (remote_filesystem_is_local, remote_can_execute_reverse)
9027         (remote_supports_non_stop, remote_supports_disable_randomization)
9028         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9029         (remote_supports_enable_disable_tracepoint)
9030         (remote_supports_string_tracing)
9031         (remote_can_run_breakpoint_commands, remote_trace_init)
9032         (remote_download_tracepoint, remote_can_download_tracepoint)
9033         (remote_download_trace_state_variable, remote_enable_tracepoint)
9034         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9035         (remote_trace_start, remote_get_trace_status)
9036         (remote_get_tracepoint_status, remote_trace_stop)
9037         (remote_trace_find, remote_get_trace_state_variable_value)
9038         (remote_save_trace_data, remote_get_raw_trace_data)
9039         (remote_set_disconnected_tracing, remote_core_of_thread)
9040         (remote_set_circular_trace_buffer, remote_traceframe_info)
9041         (remote_get_min_fast_tracepoint_insn_len)
9042         (remote_set_trace_buffer_size, remote_set_trace_notes)
9043         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9044         (remote_disable_btrace, remote_teardown_btrace)
9045         (remote_read_btrace, remote_btrace_conf)
9046         (remote_augmented_libraries_svr4_read, remote_load)
9047         (remote_pid_to_exec_file, remote_can_do_single_step)
9048         (remote_execution_direction, remote_thread_handle_to_thread_info):
9049         Refactor as methods of remote_target.
9050         (init_remote_ops, init_extended_remote_ops): Delete.
9051         (remote_can_async_p, remote_is_async_p, remote_async)
9052         (remote_thread_events, remote_upload_tracepoints)
9053         (remote_upload_trace_state_variables): Refactor as methods of
9054         remote_target.
9055         (_initialize_remote): Remove references to init_remote_ops and
9056         init_extended_remote_ops.
9057
9058         * remote-sim.c (gdbsim_target): New class.
9059         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9060         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9061         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9062         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9063         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9064         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9065         Refactor as methods of gdbsim_target.
9066         (gdbsim_ops): Now a gdbsim_target.
9067         (init_gdbsim_ops): Delete.
9068         (gdbsim_cntrl_c): Adjust.
9069         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9070
9071         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9072         (the_amd64_linux_nat_target): New.
9073         (amd64_linux_fetch_inferior_registers)
9074         (amd64_linux_store_inferior_registers): Refactor as methods of
9075         amd64_linux_nat_target.
9076         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9077         * i386-linux-nat.c: Don't include "linux-nat.h".
9078         (i386_linux_nat_target): New class.
9079         (the_i386_linux_nat_target): New.
9080         (i386_linux_fetch_inferior_registers)
9081         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9082         as methods of i386_linux_nat_target.
9083         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9084         * inf-child.c (inf_child_ops): Delete.
9085         (inf_child_fetch_inferior_registers)
9086         (inf_child_store_inferior_registers): Delete.
9087         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9088         methods of inf_child_target.
9089         (inf_child_target::supports_terminal_ours)
9090         (inf_child_target::terminal_init)
9091         (inf_child_target::terminal_inferior)
9092         (inf_child_target::terminal_ours_for_output)
9093         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9094         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9095         New.
9096         (inf_child_open, inf_child_disconnect, inf_child_close)
9097         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9098         (inf_child_post_startup_inferior, inf_child_can_run)
9099         (inf_child_pid_to_exec_file): Refactor as methods of
9100         inf_child_target.
9101         (inf_child_follow_fork): Delete.
9102         (inf_child_target::can_create_inferior)
9103         (inf_child_target::can_attach): New.
9104         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9105         (inf_child_target::has_stack, inf_child_target::has_registers)
9106         (inf_child_target::has_execution): New.
9107         (inf_child_fileio_open, inf_child_fileio_pwrite)
9108         (inf_child_fileio_pread, inf_child_fileio_fstat)
9109         (inf_child_fileio_close, inf_child_fileio_unlink)
9110         (inf_child_fileio_readlink, inf_child_use_agent)
9111         (inf_child_can_use_agent): Refactor as methods of
9112         inf_child_target.
9113         (return_zero, inf_child_target): Delete.
9114         (inf_child_target::inf_child_target): New.
9115         * inf-child.h: Include "target.h".
9116         (inf_child_target): Delete function prototype.
9117         (inf_child_target): New class.
9118         (inf_child_open_target, inf_child_mourn_inferior)
9119         (inf_child_maybe_unpush_target): Delete.
9120         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9121         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9122         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9123         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9124         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9125         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9126         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9127         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9128         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9129         methods of inf_ptrace_target.
9130         (inf_ptrace_target): Delete function.
9131         * inf-ptrace.h: Include "inf-child.h".
9132         (inf_ptrace_target): Delete function declaration.
9133         (inf_ptrace_target): New class.
9134         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9135         * linux-nat.c (linux_target): New.
9136         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9137         (linux_nat_target::~linux_nat_target): New.
9138         (linux_child_post_attach, linux_child_post_startup_inferior)
9139         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9140         (linux_child_remove_fork_catchpoint)
9141         (linux_child_insert_vfork_catchpoint)
9142         (linux_child_remove_vfork_catchpoint)
9143         (linux_child_insert_exec_catchpoint)
9144         (linux_child_remove_exec_catchpoint)
9145         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9146         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9147         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9148         (linux_nat_stopped_data_address)
9149         (linux_nat_stopped_by_sw_breakpoint)
9150         (linux_nat_supports_stopped_by_sw_breakpoint)
9151         (linux_nat_stopped_by_hw_breakpoint)
9152         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9153         (linux_nat_kill, linux_nat_mourn_inferior)
9154         (linux_nat_xfer_partial, linux_nat_thread_alive)
9155         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9156         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9157         (linux_child_static_tracepoint_markers_by_strid)
9158         (linux_nat_is_async_p, linux_nat_can_async_p)
9159         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9160         (linux_nat_supports_multi_process)
9161         (linux_nat_supports_disable_randomization, linux_nat_async)
9162         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9163         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9164         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9165         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9166         methods of linux_nat_target.
9167         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9168         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9169         parameter.
9170         (check_stopped_by_watchpoint): Adjust.
9171         (linux_xfer_partial): Delete.
9172         (linux_target_install_ops, linux_target, linux_nat_add_target):
9173         Delete.
9174         (linux_nat_target::linux_nat_target): New.
9175         * linux-nat.h: Include "inf-ptrace.h".
9176         (linux_nat_target): New.
9177         (linux_target, linux_target_install_ops, linux_nat_add_target):
9178         Delete function declarations.
9179         (linux_target): Declare global.
9180         * linux-thread-db.c (thread_db_target): New.
9181         (thread_db_target::thread_db_target): New.
9182         (thread_db_ops): Delete.
9183         (the_thread_db_target): New.
9184         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9185         (thread_db_update_thread_list, thread_db_pid_to_str)
9186         (thread_db_extra_thread_info)
9187         (thread_db_thread_handle_to_thread_info)
9188         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9189         (thread_db_resume): Refactor as methods of thread_db_target.
9190         (init_thread_db_ops): Delete.
9191         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9192         * x86-linux-nat.c: Don't include "linux-nat.h".
9193         (super_post_startup_inferior): Delete.
9194         (x86_linux_nat_target::~x86_linux_nat_target): New.
9195         (x86_linux_child_post_startup_inferior)
9196         (x86_linux_read_description, x86_linux_enable_btrace)
9197         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9198         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9199         methods of x86_linux_nat_target.
9200         (x86_linux_create_target): Delete.  Bits folded ...
9201         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9202         pointer.
9203         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9204         (x86_linux_nat_target): New class.
9205         (x86_linux_create_target): Delete.
9206         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9207         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9208         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9209         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9210         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9211         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9212         make extern.
9213         (x86_use_watchpoints): Delete.
9214         * x86-nat.h: Include "breakpoint.h" and "target.h".
9215         (x86_use_watchpoints): Delete.
9216         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9217         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9218         (x86_insert_watchpoint, x86_remove_watchpoint)
9219         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9220         (x86_stopped_by_hw_breakpoint): New declarations.
9221         (x86_nat_target): New template class.
9222
9223         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9224         (the_ppc_linux_nat_target): New.
9225         (ppc_linux_fetch_inferior_registers)
9226         (ppc_linux_can_use_hw_breakpoint)
9227         (ppc_linux_region_ok_for_hw_watchpoint)
9228         (ppc_linux_ranged_break_num_registers)
9229         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9230         (ppc_linux_insert_mask_watchpoint)
9231         (ppc_linux_remove_mask_watchpoint)
9232         (ppc_linux_can_accel_watchpoint_condition)
9233         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9234         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9235         (ppc_linux_watchpoint_addr_within_range)
9236         (ppc_linux_masked_watch_num_registers)
9237         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9238         (ppc_linux_read_description): Refactor as methods of
9239         ppc_linux_nat_target.
9240         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9241
9242         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9243         (procfs_target): New class.
9244         (the_procfs_target): New.
9245         (procfs_target): Delete function.
9246         (procfs_auxv_parse, procfs_attach, procfs_detach)
9247         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9248         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9249         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9250         (procfs_create_inferior, procfs_update_thread_list)
9251         (procfs_thread_alive, procfs_pid_to_str)
9252         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9253         (procfs_stopped_data_address, procfs_insert_watchpoint)
9254         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9255         (proc_find_memory_regions, procfs_info_proc)
9256         (procfs_make_note_section): Refactor as methods of procfs_target.
9257         (_initialize_procfs): Adjust.
9258         * sol-thread.c (sol_thread_target): New class.
9259         (sol_thread_ops): Now a sol_thread_target.
9260         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9261         (sol_thread_fetch_registers, sol_thread_store_registers)
9262         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9263         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9264         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9265         (init_sol_thread_ops): Delete.
9266         (_initialize_sol_thread): Adjust.  Remove references to
9267         init_sol_thread_ops and complete_target_initialization.
9268
9269         * windows-nat.c (windows_nat_target): New class.
9270         (windows_fetch_inferior_registers)
9271         (windows_store_inferior_registers, windows_resume, windows_wait)
9272         (windows_attach, windows_detach, windows_pid_to_exec_file)
9273         (windows_files_info, windows_create_inferior)
9274         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9275         (windows_close, windows_pid_to_str, windows_xfer_partial)
9276         (windows_get_tib_address, windows_get_ada_task_ptid)
9277         (windows_thread_name, windows_thread_alive): Refactor as
9278         windows_nat_target methods.
9279         (do_initial_windows_stuff): Adjust.
9280         (windows_target): Delete function.
9281         (_initialize_windows_nat): Adjust.
9282
9283         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9284         (darwin_mourn_inferior, darwin_kill_inferior)
9285         (darwin_create_inferior, darwin_attach, darwin_detach)
9286         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9287         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9288         (darwin_supports_multi_process): Refactor as darwin_nat_target
9289         methods.
9290         (darwin_resume_to, darwin_files_info): Delete.
9291         (_initialize_darwin_inferior): Rename to ...
9292         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9293         * darwin-nat.h: Include "inf-child.h".
9294         (darwin_nat_target): New class.
9295         (darwin_complete_target): Delete.
9296         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9297         (darwin_target): New.
9298         (i386_darwin_fetch_inferior_registers)
9299         (i386_darwin_store_inferior_registers): Refactor as methods of
9300         darwin_nat_target.
9301         (darwin_complete_target): Delete, with ...
9302         (_initialize_i386_darwin_nat): ... bits factored out here.
9303
9304         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9305         (the_alpha_linux_nat_target): New.
9306         (alpha_linux_register_u_offset): Refactor as
9307         alpha_linux_nat_target method.
9308         (_initialize_alpha_linux_nat): Adjust.
9309         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9310         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9311         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9312         methods of linux_nat_trad_target.
9313         (linux_trad_target): Delete.
9314         * linux-nat-trad.h (linux_trad_target): Delete function.
9315         (linux_nat_trad_target): New class.
9316         * mips-linux-nat.c (mips_linux_nat_target): New class.
9317         (super_fetch_registers, super_store_registers, super_close):
9318         Delete.
9319         (the_mips_linux_nat_target): New.
9320         (mips64_linux_regsets_fetch_registers)
9321         (mips64_linux_regsets_store_registers)
9322         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9323         (mips_linux_register_u_offset, mips_linux_read_description)
9324         (mips_linux_can_use_hw_breakpoint)
9325         (mips_linux_stopped_by_watchpoint)
9326         (mips_linux_stopped_data_address)
9327         (mips_linux_region_ok_for_hw_watchpoint)
9328         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9329         (mips_linux_close): Refactor as methods of mips_linux_nat.
9330         (_initialize_mips_linux_nat): Adjust to C++ification.
9331
9332         * aix-thread.c (aix_thread_target): New class.
9333         (aix_thread_ops): Now an aix_thread_target.
9334         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9335         (aix_thread_fetch_registers, aix_thread_store_registers)
9336         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9337         (aix_thread_thread_alive, aix_thread_pid_to_str)
9338         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9339         Refactor as methods of aix_thread_target.
9340         (init_aix_thread_ops): Delete.
9341         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9342         and complete_target_initialization.
9343         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9344         (rs6000_nat_target): New class.
9345         (the_rs6000_nat_target): New.
9346         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9347         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9348         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9349         (super_create_inferior): Delete.
9350         (_initialize_rs6000_nat): Adjust to C++ification.
9351
9352         * arm-linux-nat.c (arm_linux_nat_target): New class.
9353         (the_arm_linux_nat_target): New.
9354         (arm_linux_fetch_inferior_registers)
9355         (arm_linux_store_inferior_registers, arm_linux_read_description)
9356         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9357         (arm_linux_remove_hw_breakpoint)
9358         (arm_linux_region_ok_for_hw_watchpoint)
9359         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9360         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9361         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9362         arm_linux_nat_target.
9363         (_initialize_arm_linux_nat): Adjust to C++ification.
9364
9365         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9366         (the_aarch64_linux_nat_target): New.
9367         (aarch64_linux_fetch_inferior_registers)
9368         (aarch64_linux_store_inferior_registers)
9369         (aarch64_linux_child_post_startup_inferior)
9370         (aarch64_linux_read_description)
9371         (aarch64_linux_can_use_hw_breakpoint)
9372         (aarch64_linux_insert_hw_breakpoint)
9373         (aarch64_linux_remove_hw_breakpoint)
9374         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9375         (aarch64_linux_region_ok_for_hw_watchpoint)
9376         (aarch64_linux_stopped_data_address)
9377         (aarch64_linux_stopped_by_watchpoint)
9378         (aarch64_linux_watchpoint_addr_within_range)
9379         (aarch64_linux_can_do_single_step): Refactor as methods of
9380         aarch64_linux_nat_target.
9381         (super_post_startup_inferior): Delete.
9382         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9383
9384         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9385         (the_hppa_linux_nat_target): New.
9386         (hppa_linux_fetch_inferior_registers)
9387         (hppa_linux_store_inferior_registers): Refactor as methods of
9388         hppa_linux_nat_target.
9389         (_initialize_hppa_linux_nat): Adjust to C++ification.
9390
9391         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9392         (the_ia64_linux_nat_target): New.
9393         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9394         (ia64_linux_stopped_data_address)
9395         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9396         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9397         ia64_linux_nat_target methods.
9398         (super_xfer_partial): Delete.
9399         (_initialize_ia64_linux_nat): Adjust to C++ification.
9400
9401         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9402         (the_m32r_linux_nat_target): New.
9403         (m32r_linux_fetch_inferior_registers)
9404         (m32r_linux_store_inferior_registers): Refactor as
9405         m32r_linux_nat_target methods.
9406         (_initialize_m32r_linux_nat): Adjust to C++ification.
9407
9408         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9409         (the_m68k_linux_nat_target): New.
9410         (m68k_linux_fetch_inferior_registers)
9411         (m68k_linux_store_inferior_registers): Refactor as
9412         m68k_linux_nat_target methods.
9413         (_initialize_m68k_linux_nat): Adjust to C++ification.
9414
9415         * s390-linux-nat.c (s390_linux_nat_target): New class.
9416         (the_s390_linux_nat_target): New.
9417         (s390_linux_fetch_inferior_registers)
9418         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9419         (s390_insert_watchpoint, s390_remove_watchpoint)
9420         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9421         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9422         (s390_auxv_parse, s390_read_description): Refactor as methods of
9423         s390_linux_nat_target.
9424         (_initialize_s390_nat): Adjust to C++ification.
9425
9426         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9427         (the_sparc_linux_nat_target): New.
9428         (_initialize_sparc_linux_nat): Adjust to C++ification.
9429         * sparc-nat.c (sparc_fetch_inferior_registers)
9430         (sparc_store_inferior_registers): Remove target_ops parameter.
9431         * sparc-nat.h (sparc_fetch_inferior_registers)
9432         (sparc_store_inferior_registers): Remove target_ops parameter.
9433         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9434         (the_sparc64_linux_nat_target): New.
9435         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9436
9437         * spu-linux-nat.c (spu_linux_nat_target): New class.
9438         (the_spu_linux_nat_target): New.
9439         (spu_child_post_startup_inferior, spu_child_post_attach)
9440         (spu_child_wait, spu_fetch_inferior_registers)
9441         (spu_store_inferior_registers, spu_xfer_partial)
9442         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9443         methods.
9444         (_initialize_spu_nat): Adjust to C++ification.
9445
9446         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9447         (the_tilegx_linux_nat_target): New.
9448         (fetch_inferior_registers, store_inferior_registers):
9449         Refactor as methods.
9450         (_initialize_tile_linux_nat): Adjust to C++ification.
9451
9452         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9453         (the_xtensa_linux_nat_target): New.
9454         (xtensa_linux_fetch_inferior_registers)
9455         (xtensa_linux_store_inferior_registers): Refactor as
9456         xtensa_linux_nat_target methods.
9457         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9458
9459         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9460         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9461         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9462         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9463         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9464         (fbsd_stopped_by_sw_breakpoint)
9465         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9466         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9467         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9468         (fbsd_post_startup_inferior, fbsd_post_attach)
9469         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9470         (fbsd_set_syscall_catchpoint)
9471         (super_xfer_partial, super_resume, super_wait)
9472         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9473         (fbsd_handle_debug_trap): Remove target_ops parameter.
9474         (fbsd_nat_add_target): Delete.
9475         * fbsd-nat.h: Include "inf-ptrace.h".
9476         (fbsd_nat_add_target): Delete.
9477         (USE_SIGTRAP_SIGINFO): Define.
9478         (fbsd_nat_target): New class.
9479
9480         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9481         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9482         (amd64bsd_target): Delete.
9483         * amd64-bsd-nat.h: New file.
9484         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9485         "x86-bsd-nat.h".
9486         (amd64_fbsd_nat_target): New class.
9487         (the_amd64_fbsd_nat_target): New.
9488         (amd64fbsd_read_description): Refactor as method of
9489         amd64_fbsd_nat_target.
9490         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9491         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9492         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9493         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9494         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9495         (i386bsd_target): Delete.
9496         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9497         (i386bsd_fetch_inferior_registers)
9498         (i386bsd_store_inferior_registers): Declare.
9499         (i386_bsd_nat_target): New class.
9500         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9501         (the_i386_fbsd_nat_target): New.
9502         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9503         i386_fbsd_nat_target methods.
9504         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9505         (_initialize_i386fbsd_nat): Adjust to C++ification.
9506         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9507         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9508         (_initialize_x86_bsd_nat): Adjust to C++ification.
9509         * x86-bsd-nat.h: Include "x86-nat.h".
9510         (x86bsd_target): Delete declaration.
9511         (x86bsd_nat_target): New class.
9512
9513         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9514         (the_aarch64_fbsd_nat_target): New.
9515         (aarch64_fbsd_fetch_inferior_registers)
9516         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9517         aarch64_fbsd_nat_target.
9518         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9519         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9520         (the_alpha_bsd_nat_target): New.
9521         (alphabsd_fetch_inferior_registers)
9522         (alphabsd_store_inferior_registers): Refactor as
9523         alpha_bsd_nat_target methods.
9524         (_initialize_alphabsd_nat): Refactor as methods of
9525         alpha_bsd_nat_target.
9526         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9527         (the_amd64_nbsd_nat_target): New.
9528         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9529         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9530         (the_amd64_obsd_nat_target): New.
9531         (_initialize_amd64obsd_nat): Adjust to C++ification.
9532         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9533         (the_arm_fbsd_nat_target): New.
9534         (arm_fbsd_fetch_inferior_registers)
9535         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9536         (_initialize_arm_fbsd_nat): Refactor as methods of
9537         arm_fbsd_nat_target.
9538         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9539         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9540         (the_arm_netbsd_nat_target): New.
9541         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9542         arm_netbsd_nat_target.
9543         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9544         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9545         (the_hppa_nbsd_nat_target): New.
9546         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9547         hppa_nbsd_nat_target methods.
9548         (_initialize_hppanbsd_nat): Adjust to C++ification.
9549         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9550         (the_hppa_obsd_nat_target): New.
9551         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9552         methods of hppa_obsd_nat_target.
9553         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9554         add_target.
9555         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9556         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9557         add_target.
9558         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9559         (_initialize_i386obsd_nat): Use add_target.
9560         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9561         (the_m68k_bsd_nat_target): New.
9562         (m68kbsd_fetch_inferior_registers)
9563         (m68kbsd_store_inferior_registers): Refactor as methods of
9564         m68k_bsd_nat_target.
9565         (_initialize_m68kbsd_nat): Adjust to C++ification.
9566         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9567         (the_mips_fbsd_nat_target): New.
9568         (mips_fbsd_fetch_inferior_registers)
9569         (mips_fbsd_store_inferior_registers): Refactor as methods of
9570         mips_fbsd_nat_target.
9571         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9572         add_target.
9573         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9574         (the_mips_nbsd_nat_target): New.
9575         (mipsnbsd_fetch_inferior_registers)
9576         (mipsnbsd_store_inferior_registers): Refactor as methods of
9577         mips_nbsd_nat_target.
9578         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9579         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9580         (the_mips64_obsd_nat_target): New.
9581         (mips64obsd_fetch_inferior_registers)
9582         (mips64obsd_store_inferior_registers): Refactor as methods of
9583         mips64_obsd_nat_target.
9584         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9585         add_target.
9586         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9587         nbsd_nat_target.
9588         * nbsd-nat.h: Include "inf-ptrace.h".
9589         (nbsd_nat_target): New class.
9590         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9591         (obsd_wait): Refactor as methods of obsd_nat_target.
9592         (obsd_add_target): Delete.
9593         * obsd-nat.h: Include "inf-ptrace.h".
9594         (obsd_nat_target): New class.
9595         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9596         (the_ppc_fbsd_nat_target): New.
9597         (ppcfbsd_fetch_inferior_registers)
9598         (ppcfbsd_store_inferior_registers): Refactor as methods of
9599         ppc_fbsd_nat_target.
9600         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9601         add_target.
9602         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9603         (the_ppc_nbsd_nat_target): New.
9604         (ppcnbsd_fetch_inferior_registers)
9605         (ppcnbsd_store_inferior_registers): Refactor as methods of
9606         ppc_nbsd_nat_target.
9607         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9608         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9609         (the_ppc_obsd_nat_target): New.
9610         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9611         methods of ppc_obsd_nat_target.
9612         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9613         add_target.
9614         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9615         (the_sh_nbsd_nat_target): New.
9616         (shnbsd_fetch_inferior_registers)
9617         (shnbsd_store_inferior_registers): Refactor as methods of
9618         sh_nbsd_nat_target.
9619         (_initialize_shnbsd_nat): Adjust to C++ification.
9620         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9621         (inf_ptrace_xfer_partial): Delete.
9622         (sparc_xfer_partial, sparc_target): Delete.
9623         * sparc-nat.h (sparc_fetch_inferior_registers)
9624         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9625         (sparc_target): Delete function declaration.
9626         (sparc_target): New template class.
9627         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9628         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9629         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9630         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9631         add_target.
9632         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9633         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9634         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9635         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9636         add_target.
9637         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9638         (the_vax_bsd_nat_target): New.
9639         (vaxbsd_fetch_inferior_registers)
9640         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9641         methods.
9642         (_initialize_vaxbsd_nat): Adjust to C++ification.
9643
9644         * bsd-kvm.c (bsd_kvm_target): New class.
9645         (bsd_kvm_ops): Now a bsd_kvm_target.
9646         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9647         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9648         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9649         bsd_kvm_target.
9650         (bsd_kvm_return_one): Delete.
9651         (bsd_kvm_add_target): Adjust to C++ification.
9652
9653         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9654         (nto_procfs_target_procfs): New classes.
9655         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9656         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9657         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9658         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9659         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9660         (procfs_remove_hw_breakpoint, procfs_resume)
9661         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9662         (procfs_kill_inferior, procfs_store_registers)
9663         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9664         as methods of nto_procfs_target.
9665         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9666         (nto_native_ops): Delete.
9667         (procfs_open, procfs_native_open): Delete.
9668         (nto_native_ops): Now an nto_procfs_target_native.
9669         (init_procfs_targets): Adjust to C++ification.
9670         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9671         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9672         Refactor as methods of nto_procfs_target.
9673
9674         * go32-nat.c (go32_nat_target): New class.
9675         (the_go32_nat_target): New.
9676         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9677         (go32_store_registers, go32_xfer_partial, go32_files_info)
9678         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9679         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9680         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9681         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9682         (go32_target): Delete.
9683         (_initialize_go32_nat): Adjust to C++ification.
9684
9685         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9686         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9687         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9688         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9689         gnu_nat_target.
9690         (gnu_target): Delete.
9691         * gnu-nat.h (gnu_target): Delete.
9692         (gnu_nat_target): New class.
9693         * i386-gnu-nat.c (gnu_base_target): New.
9694         (i386_gnu_nat_target): New class.
9695         (the_i386_gnu_nat_target): New.
9696         (_initialize_i386gnu_nat): Adjust to C++ification.
9697
9698 2018-05-02  Pedro Alves  <palves@redhat.com>
9699
9700         * bfd-target.c (target_bfd_xclose): Rename to ...
9701         (target_bfd_close): ... this.
9702         (target_bfd_reopen): Adjust.
9703         * target.c (target_close): Remove references to to_xclose.
9704         * target.h (target_ops::to_xclose): Delete.
9705         (target_ops::to_close): Update comments.
9706
9707 2018-05-02  Pedro Alves  <palves@redhat.com>
9708
9709         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9710         "linux-nat.h".
9711         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9712         * inf-ptrace.c (inf_ptrace_register_u_offset)
9713         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9714         (inf_ptrace_store_register, inf_ptrace_store_registers)
9715         (inf_ptrace_trad_target): Move to ...
9716         * linux-nat-trad.c: ... this new file.
9717         * linux-nat-trad.h: New file.
9718         * linux-nat.c (linux_target_install_ops): Make extern.
9719         (linux_trad_target): Delete.
9720         * linux-nat.h (linux_trad_target): Delete declaration.
9721         (linux_target_install_ops): Declare.
9722         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9723         "linux-nat.h".
9724
9725 2018-05-02  Pedro Alves  <palves@redhat.com>
9726
9727         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9728         procfs_target/add_target here.
9729         * procfs.c (procfs_target): Make static.
9730         (_initialize_procfs): Call add_target here.
9731         * procfs.h (struct target_ops): Remove forward declaration.
9732         (procfs_target): Remove declaration.
9733         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9734
9735 2018-05-02  Pedro Alves  <palves@redhat.com>
9736
9737         * procfs.c (procfs_stopped_by_watchpoint)
9738         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9739         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9740         Forward declare.
9741         (procfs_use_watchpoints): Delete, move contents...
9742         (procfs_target): ... here.
9743         * procfs.h (procfs_use_watchpoints): Delete declaration.
9744         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9745         procfs_use_watchpoints.
9746         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9747         procfs_use_watchpoints.
9748
9749 2018-05-02  Tom Tromey  <tom@tromey.com>
9750
9751         PR python/20084:
9752         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9753         and var_zuinteger_unlimited.
9754         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9755         and PARAM_ZUINTEGER_UNLIMITED.
9756         (set_parameter_value): Handle var_zuinteger and
9757         var_zuinteger_unlimited.
9758         (add_setshow_generic): Likewise.
9759         (parmpy_init): Likewise.
9760
9761 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9762
9763         PR rust/23124
9764         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9765         pointer is not null before dereferencing it.
9766
9767 2018-04-30  Tom Tromey  <tom@tromey.com>
9768
9769         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9770         is_mi_like_p.
9771
9772 2018-04-30  Tom Tromey  <tom@tromey.com>
9773
9774         * breakpoint.c (mention): Remove use of is_mi_like_p.
9775         (print_mention_ranged_breakpoint): Likewise.
9776         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9777         of is_mi_like_p.
9778
9779 2018-04-30  Tom Tromey  <tom@tromey.com>
9780
9781         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9782
9783 2018-04-30  Tom Tromey  <tom@tromey.com>
9784
9785         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9786         (info_spu_event_command): Remove some uses of is_mi_like_p.
9787
9788 2018-04-30  Tom Tromey  <tom@tromey.com>
9789
9790         * python/py-framefilter.c (py_print_single_arg)
9791         (enumerate_locals, py_print_args, py_print_frame): Remove some
9792         uses of is_mi_like_p.
9793
9794 2018-04-30  Tom Tromey  <tom@tromey.com>
9795
9796         * ui-out.c: Update.
9797         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9798         * ui-out.h (ui_out::is_mi_like_p): Now const.
9799         (ui_out::do_is_mi_like_p): Now const.
9800         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9801
9802 2018-04-30  Tom Tromey  <tom@tromey.com>
9803
9804         * varobj.c (varobj_set_visualizer): Use new_reference.
9805         * python/python.c (gdbpy_decode_line): Use new_reference.
9806         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9807         new_reference.
9808
9809 2018-04-30  Tom Tromey  <tom@tromey.com>
9810
9811         * varobj.c (install_new_value): Use new_reference.
9812         * value.h (value_incref): Return void.  Swap intro comment with
9813         value_decref.
9814         * value.c (set_value_parent): Use new_reference.
9815         (value_incref): Return void.  Update intro comment.
9816         (release_value): Use new_reference.
9817         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9818
9819 2018-04-30  Tom Tromey  <tom@tromey.com>
9820
9821         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9822         * gdb_bfd.h (new_bfd_ref): Remove.
9823         (gdb_bfd_open): Update comment.
9824         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9825         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9826         (gdb_bfd_fdopenr): Use new_reference.
9827         * exec.c (exec_file_attach): Use new_reference.
9828
9829 2018-04-30  Tom Tromey  <tom@tromey.com>
9830
9831         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9832         method.
9833
9834 2018-04-30  Tom Tromey  <tom@tromey.com>
9835
9836         * jit.c (jit_read_code_entry): Use type_align.
9837         * i386-tdep.c (i386_gdbarch_init): Don't call
9838         set_gdbarch_long_long_align_bit.
9839         * gdbarch.sh: Remove long_long_align_bit.
9840         * gdbarch.c, gdbarch.h: Rebuild.
9841         * arc-tdep.c (arc_type_align): New function.
9842         (arc_gdbarch_init): Use arc_type_align.  Don't call
9843         set_gdbarch_long_long_align_bit.
9844
9845 2018-04-30  Tom Tromey  <tom@tromey.com>
9846
9847         * rust-lang.c (rust_type_alignment): Remove.
9848         (rust_composite_type): Use type_align.
9849
9850 2018-04-30  Tom Tromey  <tom@tromey.com>
9851
9852         * NEWS: Mention Type.align.
9853         * python/py-type.c (typy_get_alignof): New function.
9854         (type_object_getset): Add "alignof".
9855
9856 2018-04-30  Tom Tromey  <tom@tromey.com>
9857
9858         PR exp/17095:
9859         * NEWS: Update.
9860         * std-operator.def (UNOP_ALIGNOF): New operator.
9861         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9862         New.
9863         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9864         * c-lang.c (c_op_print_tab): Add alignof.
9865         * c-exp.y (ALIGNOF): New token.
9866         (exp): Add "ALIGNOF" production.
9867         (ident_tokens): Add _Alignof and alignof.
9868
9869 2018-04-30  Tom Tromey  <tom@tromey.com>
9870
9871         * i386-tdep.c (i386_type_align): New function.
9872         (i386_gdbarch_init): Update.
9873         * gdbarch.sh (type_align): New method.
9874         * gdbarch.c, gdbarch.h: Rebuild.
9875         * arch-utils.h (default_type_align): Declare.
9876         * arch-utils.c (default_type_align): New function.
9877         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9878         (struct type) <align_log2>: New field.
9879         <instance_flags>: Now a bitfield.
9880         (TYPE_RAW_ALIGN): New macro.
9881         (type_align, type_raw_align, set_type_align): Declare.
9882         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9883         functions.
9884         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9885         (get_alignment, maybe_set_alignment): New functions.
9886         (read_structure_type, read_enumeration_type, read_array_type)
9887         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9888         (read_subrange_type, read_base_type): Set type alignment.
9889
9890 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9891
9892         * dwarf2read.c (read_index_from_section): Use bool.
9893
9894 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9895
9896         PR gdb/22950
9897         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9898         with #ifdef.
9899
9900 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9901
9902         PR build/22873
9903         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9904         last step, and do it atomically.
9905
9906 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9907
9908         * compile/compile-c-types.c (convert_int, convert_float):
9909         Update for C FE v1.
9910
9911 2018-04-27  Tom Tromey  <tom@tromey.com>
9912
9913         PR rust/22545:
9914         * rust-lang.c (rust_inclusive_range_type_p): New function.
9915         (rust_range): Handle inclusive ranges.
9916         (rust_compute_range): Likewise.
9917         * rust-exp.y (struct rust_op) <inclusive>: New field.
9918         (DOTDOTEQ): New constant.
9919         (range_expr): Add "..=" productions.
9920         (operator_tokens): Add "..=" token.
9921         (ast_range): Add "inclusive" parameter.
9922         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9923         ranges.
9924         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9925         bounds values.
9926         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9927         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9928         Update comments.
9929         * expprint.c (print_subexp_standard): Handle new bounds values.
9930         (dump_subexp_body_standard): Likewise.
9931
9932 2018-04-27  Tom Tromey  <tom@tromey.com>
9933
9934         * configure: Rebuild.
9935         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9936         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9937         "OVERRIDE".
9938         (class symbol_needs_eval_context): Likewise.
9939         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9940         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9941         "virtual".
9942         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9943         "override".
9944         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9945         * aarch64-tdep.c (instruction_reader::read): Use "override".
9946         (instruction_reader_test::read): Likewise.
9947         * arm-tdep.c (instruction_reader::read): Use "override".
9948         (instruction_reader_thumb::read): Likewise.
9949
9950 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9951
9952         PR remote/9665
9953         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9954         instead of remote_send.
9955         (remote_send): Remove.
9956
9957 2018-04-26  Pedro Alves  <palves@redhat.com>
9958
9959         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9960         find_function_start_sal instead of find_pc_line.
9961
9962 2018-04-26  Pedro Alves  <palves@redhat.com>
9963
9964         * breakpoint.c (set_breakpoint_location_function): Handle
9965         mst_data_gnu_ifunc.
9966         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9967         * elfread.c (elf_symtab_read): Give data symbols with
9968         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9969         (elf_rel_plt_read): Update comment.
9970         * linespec.c (convert_linespec_to_sals): Handle
9971         mst_data_gnu_ifunc.
9972         (minsym_found): Handle mst_data_gnu_ifunc.
9973         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9974         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9975         * parse.c (find_minsym_type_and_address): Handle
9976         mst_data_gnu_ifunc.
9977         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9978         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9979         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9980         comment.
9981         <mst_data_gnu_ifunc>: New enumerator.
9982
9983 2018-04-26  Pedro Alves  <palves@redhat.com>
9984
9985         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9986         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9987         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9988         Handle it.
9989         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9990         (lookup_minimal_symbol_by_pc): Adjust.
9991         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9992         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9993         * minsyms.h (lookup_msym_prefer): New enum.
9994         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9995         parameter by a lookup_msym_prefer parameter.
9996
9997 2018-04-26  Pedro Alves  <palves@redhat.com>
9998
9999         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10000         ends in "@plt" instead of looking at the symbol's section.
10001
10002 2018-04-26  Pedro Alves  <palves@redhat.com>
10003
10004         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10005         all references.
10006         (find_pc_partial_function_gnu_ifunc): Rename to ...
10007         (find_pc_partial_function): ... this, and remove references to
10008         'is_gnu_ifunc_p'.
10009         (find_pc_partial_function): Delete old implementation.
10010         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10011
10012 2018-04-26  Pedro Alves  <palves@redhat.com>
10013
10014         * linespec.c (struct bound_minimal_symbol_search_key): New.
10015         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10016         skip first line if we found a GNU ifunc minimal symbol by name.
10017         (compare_msymbols): Change parameters to work with a destructured
10018         lhs minsym.
10019         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10020         functions.
10021
10022 2018-04-26  Pedro Alves  <palves@redhat.com>
10023
10024         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10025         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10026         address/name.
10027         (add_location_to_breakpoint): Store the minsym and the objfile in
10028         the breakpoint location.
10029         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10030         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10031         Record the minsym in the sal.
10032         * symtab.h (symtab_and_line) <msymbol>: New field.
10033
10034 2018-04-26  Pedro Alves  <palves@redhat.com>
10035
10036         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10037         unless we actually resolved the ifunc.
10038
10039 2018-04-26  Pedro Alves  <palves@redhat.com>
10040
10041         * c-exp.y (variable production): Prefer ifunc minsyms over
10042         regular function symbols.
10043         * symtab.c (find_gnu_ifunc): New function.
10044         * minsyms.h (lookup_msym_prefer): New enum.
10045         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10046         parameter by a lookup_msym_prefer parameter.
10047         * symtab.h (find_gnu_ifunc): New declaration.
10048
10049 2018-04-26  Pedro Alves  <palves@redhat.com>
10050
10051         * blockframe.c (find_gnu_ifunc_target_type): New function.
10052         (find_function_type): New.
10053         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10054         return a value with a memory address.
10055         (eval_call): For calls to GNU ifunc functions, try to find the
10056         type of the target function from the type that the resolver
10057         returns.
10058         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10059         symbols.
10060         * infcall.c (find_function_return_type): Delete.
10061         (find_function_addr): Add 'function_type' parameter.  For calls to
10062         GNU ifunc functions, try to find the type of the target function
10063         from the type that the resolver returns, and return it via
10064         FUNCTION_TYPE.
10065         (call_function_by_hand_dummy): Adjust to use the function type
10066         returned by find_function_addr.
10067         (find_function_addr): Add 'function_type' parameter and move
10068         description here.
10069         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10070         declarations.
10071
10072 2018-04-26  Pedro Alves  <palves@redhat.com>
10073
10074         * c-exp.y (variable production): Skip finding an alias for ifunc
10075         symbols.
10076
10077 2018-04-26  Pedro Alves  <palves@redhat.com>
10078
10079         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10080
10081 2018-04-25  Pedro Alves  <palves@redhat.com>
10082
10083         * infcmd.c (kill_command): Print the pid as string, not the whole
10084         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10085         message.
10086         * remote.c (remote_detach_1): Print the pid as string, not the
10087         whole thread's ptid.
10088
10089 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10090             Sergio Durigan Junior  <sergiodj@redhat.com>
10091             Pedro Alves  <palves@redhat.com>
10092
10093         * infcmd.c (kill_command): Print message when inferior has
10094         been killed.
10095         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10096         '1'.
10097         (add_inferior): Improve message printed when
10098         'print_inferior_events' is on.
10099         (exit_inferior): Remove message printed when
10100         'print_inferior_events' is on.
10101         (detach_inferior): Improve message printed when
10102         'print_inferior_events' is on.
10103         (initialize_inferiors): Use 'add_inferior_silent' to set
10104         'current_inferior_'.
10105         * inferior.h (print_inferior_events): Declare here as
10106         'extern'.
10107         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10108         '[Detaching...]' messages when 'print_inferior_events' is on.
10109         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10110         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10111         'Detaching after fork from child...', replace it by '... from
10112         parent...'.
10113         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10114         prefix/suffix when printing 'Detaching...' messages.  Print
10115         them when 'print_inferior_events' is on.
10116         * remote.c (remote_detach_1): Print message when detaching
10117         from inferior and '!is_fork_parent'.
10118
10119 2018-04-24  Tom Tromey  <tom@tromey.com>
10120
10121         * cli-out.h: Reindent.
10122
10123 2018-04-24  Tom Tromey  <tom@tromey.com>
10124
10125         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10126         (cli_ui_out::do_field_string): Use fputs_filtered.
10127         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10128
10129 2018-04-23  Tom Tromey  <tom@tromey.com>
10130
10131         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10132         gdb::unique_xmalloc_ptr.
10133
10134 2018-04-23  Tom Tromey  <tom@tromey.com>
10135
10136         * configure: Rebuild.
10137
10138 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10139
10140         PR gdb/23095
10141         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10142         prepare_for_testing.  Set normal_bp to r_debug_state if target
10143         is bsd.
10144
10145 2018-04-21  Pedro Alves  <palves@redhat.com>
10146             Rajendra SY  <rajendra.sy@gmail.com>
10147
10148         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10149         * remote.c (extended_remote_attach): In all-stop mode, mark the
10150         thread as executing.
10151
10152 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10153
10154         * thread.c (thread_apply_all_command): Fix comment.
10155         (thread_command): Fix comment.
10156
10157 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10158
10159         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10160         parameter.
10161         * features/aarch64-core.c (create_feature_aarch64_core):
10162         Regenerate.
10163         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10164         Likewise.
10165         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10166         Likewise.
10167         * features/i386/32bit-avx512.c
10168         (create_feature_i386_32bit_avx512): Likewise.
10169         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10170         Likewise.
10171         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10172         Likewise.
10173         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10174         Likewise.
10175         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10176         Likewise.
10177         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10178         Likewise.
10179         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10180         Likewise.
10181         * features/i386/64bit-avx512.c
10182         (create_feature_i386_64bit_avx512): Likewise.
10183         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10184         Likewise.
10185         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10186         Likewise.
10187         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10188         Likewise.
10189         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10190         Likewise.
10191         * features/i386/64bit-segments.c
10192         (create_feature_i386_64bit_segments): Likewise.
10193         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10194         Likewise.
10195         * features/i386/x32-core.c
10196         (create_feature_i386_x32_core): Likewise.
10197         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10198         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10199         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10200         * target-descriptions.c: In generated code, don't pass xml
10201         filename.
10202
10203 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10204
10205         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10206         (print_xml_feature::visit_post): Likewise.
10207         (print_xml_feature::visit): Likewise.
10208         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10209         (print_xml_feature): Add new class.
10210         * regformats/regdat.sh: Null xmltarget on feature targets.
10211         * target-descriptions.c (struct target_desc): Add xmltarget.
10212         (maintenance_check_tdesc_xml_convert): Add unittest function.
10213         (tdesc_get_features_xml): Add function to get xml.
10214         (maintenance_check_xml_descriptions): Test xml generation.
10215         * xml-tdesc.c (string_read_description_xml): Add function.
10216         * xml-tdesc.h (string_read_description_xml): Add declaration.
10217
10218 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10219
10220         * features/Makefile: Add feature marker to targets with new style
10221         target descriptions.
10222         * regformats/aarch64.dat: Regenerate.
10223         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10224         * regformats/i386/amd64-avx-linux.dat: Likewise.
10225         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10226         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10227         * regformats/i386/amd64-linux.dat: Likewise.
10228         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10229         * regformats/i386/amd64.dat: Likewise.
10230         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10231         * regformats/i386/i386-avx-linux.dat: Likewise.
10232         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10233         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10234         * regformats/i386/i386-linux.dat: Likewise.
10235         * regformats/i386/i386-mmx-linux.dat: Likewise.
10236         * regformats/i386/i386-mpx-linux.dat: Likewise.
10237         * regformats/i386/i386.dat: Likewise.
10238         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10239         * regformats/i386/x32-avx-linux.dat: Likewise.
10240         * regformats/i386/x32-linux.dat: Likewise.
10241         * regformats/tic6x-c62x-linux.dat: Likewise.
10242         * regformats/tic6x-c64x-linux.dat: Likewise.
10243         * regformats/tic6x-c64xp-linux.dat: Likewise.
10244         * regformats/regdat.sh: Parse feature marker.
10245
10246 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10247
10248         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10249         (tdesc_osabi_name): Likewise.
10250         * target-descriptions.c (tdesc_architecture_name): Add new
10251         function.
10252         (tdesc_osabi_name): Likewise.
10253
10254 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10255
10256         * common/tdesc.c (tdesc_predefined_type): Move to here.
10257         (tdesc_named_type): Likewise.
10258         (tdesc_create_vector): Likewise.
10259         (tdesc_create_struct): Likewise.
10260         (tdesc_set_struct_size): Likewise.
10261         (tdesc_create_union): Likewise.
10262         (tdesc_create_flags): Likewise.
10263         (tdesc_create_enum): Likewise.
10264         (tdesc_add_field): Likewise.
10265         (tdesc_add_typed_bitfield): Likewise.
10266         (tdesc_add_bitfield): Likewise.
10267         (tdesc_add_flag): Likewise.
10268         (tdesc_add_enum_value): Likewise.
10269         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10270         (struct tdesc_type_vector): Likewise.
10271         (struct tdesc_type_field): Likewise.
10272         (struct tdesc_type_with_fields): Likewise.
10273         (tdesc_create_enum): Add declaration.
10274         (tdesc_add_typed_bitfield): Likewise.
10275         (tdesc_add_enum_value): Likewise.
10276         * target-descriptions.c (tdesc_type_field): Move from here.
10277         (tdesc_type_builtin): Likewise.
10278         (tdesc_type_vector): Likewise.
10279         (tdesc_type_with_fields): Likewise.
10280         (tdesc_predefined_types): Likewise.
10281         (tdesc_named_type): Likewise.
10282         (tdesc_create_vector): Likewise.
10283         (tdesc_create_struct): Likewise.
10284         (tdesc_set_struct_size): Likewise.
10285         (tdesc_create_union): Likewise.
10286         (tdesc_create_flags): Likewise.
10287         (tdesc_create_enum): Likewise.
10288         (tdesc_add_field): Likewise.
10289         (tdesc_add_typed_bitfield): Likewise.
10290         (tdesc_add_bitfield): Likewise.
10291         (tdesc_add_flag): Likewise.
10292         (tdesc_add_enum_value): Likewise.
10293         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10294         (tdesc_add_typed_bitfield): Likewise.
10295         (tdesc_add_enum_value): Likewise.
10296
10297 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10298
10299         * common/tdesc.c (tdesc_feature::accept): Move to here.
10300         (tdesc_feature::operator==): Likewise.
10301         (tdesc_create_reg): Likewise.
10302         * common/tdesc.h (tdesc_type_kind): Likewise.
10303         (struct tdesc_type): Likewise.
10304         (struct tdesc_feature): Likewise.
10305         * regformats/regdat.sh: Create a feature.
10306         * target-descriptions.c (tdesc_type_kind): Move from here.
10307         (tdesc_type): Likewise.
10308         (tdesc_type_up): Likewise.
10309         (tdesc_feature): Likewise.
10310         (tdesc_create_reg): Likewise.
10311
10312 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10313
10314         * Makefile.in: Add arch/tdesc.c
10315         * common/tdesc.c: New file.
10316         * common/tdesc.h (tdesc_element_visitor): Move to here.
10317         (tdesc_element): Likewise.
10318         (tdesc_reg): Likewise.
10319         (tdesc_reg_up): Likewise.
10320         * regformats/regdef.h (reg): Add offset to constructors.
10321         * target-descriptions.c (tdesc_element_visitor): Move from here.
10322         (tdesc_element): Likewise.
10323         (tdesc_reg): Likewise.
10324         (tdesc_reg_up): Likewise.
10325
10326 2018-04-17  Tom Tromey  <tom@tromey.com>
10327
10328         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10329         discriminant field.
10330
10331 2018-04-17  Tom Tromey  <tom@tromey.com>
10332
10333         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10334
10335 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10336
10337         * symtab.c (print_symbol_info): Skip printing filename and line
10338         number when `last' is NULL.
10339         (symtab_symbol_info): Use empty string instead of NULL for first
10340         invocation of print_symbol_info.
10341         (rbreak_command): Pass NULL to `last' parameter of
10342         print_symbol_info.
10343
10344 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10345
10346         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10347         instead of nullptr.
10348
10349 2018-04-16  Pedro Alves  <palves@redhat.com>
10350
10351         * MAINTAINERS (sh): Remove.
10352         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10353         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10354         (ALLDEPFILES): Remove sh64-tdep.c.
10355         * NEWS: Mentions that support for SH-5/SH64 is removed.
10356         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10357         (sh*-*-openbsd*): Ditto.
10358         (sh64-*-elf*): Remove.
10359         (sh*): Remove.
10360         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10361         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10362         * sh-tdep.c: No longer include "sh64-tdep.h".
10363         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10364         * sh64-tdep.c, sh64-tdep.h: Remove files.
10365
10366 2018-04-16  Pedro Alves  <palves@redhat.com>
10367
10368         * MAINTAINERS: Remove m88k.
10369         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10370         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10371         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10372         * NEWS: Mention that support for m88k was removed.
10373         * configure.host (m88*-*-*): Remove support.
10374         * configure.nat (m88k-*-*): Remove support.
10375         * configure.tgt (m88*-*-openbsd*): Remove.
10376         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10377
10378 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10379
10380         * configure.tgt (x86_tobjs): New variable.
10381         (amd64_tobjs, i386_tobjs): Use it.
10382
10383 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10384
10385         * symtab.c (print_symbol_info): Precede the symbol definition by
10386         the line number when available.
10387         * NEWS: Advertise this enhancement.
10388
10389 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10390
10391         * NEWS (New options): announce set/show record btrace cpu.
10392         * btrace.c: Include record-btrace.h.
10393         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10394         the vendor is unknown.
10395         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10396         Maybe overwrite the btrace configuration's cpu.
10397         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10398         (btrace_fetch): Add cpu parameter.  Update callers.
10399         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10400         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10401         errata workarounds if the vendor is unknown.
10402         * python/py-record-btrace.c: Include record-btrace.h.
10403         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10404         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10405         * record-btrace.c (record_btrace_cpu_state_kind): New.
10406         (record_btrace_cpu): New.
10407         (set_record_btrace_cpu_cmdlist): New.
10408         (record_btrace_get_cpu): New.
10409         (require_btrace_thread, record_btrace_info)
10410         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10411         (cmd_set_record_btrace_cpu_none): New.
10412         (cmd_set_record_btrace_cpu_auto): New.
10413         (cmd_set_record_btrace_cpu): New.
10414         (cmd_show_record_btrace_cpu): New.
10415         (_initialize_record_btrace): Initialize set/show record btrace cpu
10416         commands.
10417         * record-btrace.h (record_btrace_get_cpu): New.
10418
10419 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10420
10421         * record.c (set_record_command): Fix typo in message.
10422
10423 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10424
10425         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10426
10427 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10428
10429         * infrun.c (process_event_stop_test): Call
10430         gdbarch_in_indirect_branch_thunk.
10431         * gdbarch.sh (in_indirect_branch_thunk): New.
10432         * gdbarch.c: Regenerated.
10433         * gdbarch.h: Regenerated.
10434         * x86-tdep.h: New.
10435         * x86-tdep.c: New.
10436         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10437         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10438         (ALLDEPFILES): Add x86-tdep.c.
10439         * arch-utils.h (default_in_indirect_branch_thunk): New.
10440         * arch-utils.c (default_in_indirect_branch_thunk): New.
10441         * i386-tdep: Include x86-tdep.h.
10442         (i386_in_indirect_branch_thunk): New.
10443         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10444         function.
10445         * amd64-tdep: Include x86-tdep.h.
10446         (amd64_in_indirect_branch_thunk): New.
10447         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10448
10449 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10450
10451         PR gdb/23053
10452         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10453         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10454         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10455         regression.
10456
10457 2018-04-12  Tom Tromey  <tom@tromey.com>
10458
10459         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10460         (rust_evaluate_subexp): Likewise.
10461
10462 2018-04-12  Pedro Alves  <palves@redhat.com>
10463
10464         * procfs.c (procfs_detach): Make forward declaration's prototype
10465         match definition's protototype.
10466         (proc_get_LDT_entry): Remove stale do_cleanups call.
10467
10468 2018-04-12  Pedro Alves  <palves@redhat.com>
10469
10470         * target.h (target_ops::to_has_exited): Delete.
10471         (target_has_exited): Delete.
10472         * target-delegates.c: Regenerate.
10473
10474 2018-04-11  Pedro Alves  <palves@redhat.com>
10475
10476         * target.c (fileio_fh_t::t): Add comment.
10477         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10478         (target_fileio_close): Handle a NULL target.
10479         (invalidate_fileio_fh): New.
10480         (target_close): Call it.
10481         * remote.c (remote_hostio_send_command): No longer check whether
10482         remote_desc is open.
10483
10484 2018-04-11  Pedro Alves  <palves@redhat.com>
10485
10486         * target.c (fileio_fh_t): Make it a named struct instead of a
10487         typedef.
10488         (fileio_fh_t::is_closed): New method.
10489         (DEF_VEC_O (fileio_fh_t)): Remove.
10490         (fileio_fhandles): Now a std::vector.
10491         (is_closed_fileio_fh): Delete.
10492         (acquire_fileio_fd): Adjust.  Rename parameters.
10493         (release_fileio_fd): Adjust.
10494         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10495         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10496         (target_fileio_close): Adjust.
10497
10498 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10499
10500         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10501         index.
10502
10503 2018-04-10  Pedro Alves  <palves@redhat.com>
10504
10505         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10506         (scoped_finish_thread_state): New class.
10507         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10508         cleanup.
10509         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10510         (fetch_inferior_event, normal_stop): Likewise.
10511         * thread.c (finish_thread_state_cleanup): Delete.
10512
10513 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10514             Pedro Alves  <palves@redhat.com>
10515
10516         * value.c: Include "selftest.h" and "common/array-view.h".
10517         (struct range) <operator ==>: New.
10518         (test_ranges_contain): New.
10519         (check_ranges_vector): New.
10520         (test_insert_into_bit_range_vector): New.
10521         (_initialize_values): Register selftests.
10522         * common/array-view.h (operator==, operator!=): New.
10523
10524 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10525
10526         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10527         an iterator.
10528         * inline-frame.c: Include <algorithm>.
10529         (struct inline_state): Add constructor.
10530         (inline_state_s): Remove.
10531         (DEF_VEC_O(inline_state_s)): Remove.
10532         (inline_states): Change type to std::vector.
10533         (find_inline_frame_state): Adjust to std::vector.
10534         (allocate_inline_frame_state): Remove.
10535         (clear_inline_frame_state): Adjust to std::vector.
10536         (skip_inline_frames): Adjust to std::vector.
10537
10538 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10539
10540         * tracepoint.h (struct trace_state_variable): Add constructor.
10541         <name>: Change type to std::string.
10542         * tracepoint.c (tsv_s): Remove.
10543         (DEF_VEC_O(tsv_s)): Remove.
10544         (tvariables): Change to std::vector.
10545         (create_trace_state_variable): Adjust to std::vector.
10546         (find_trace_state_variable): Likewise.
10547         (find_trace_state_variable_by_number): Likewise.
10548         (delete_trace_state_variable): Likewise.
10549         (trace_variable_command): Adjust to std::string.
10550         (delete_trace_variable_command): Likewise.
10551         (tvariables_info_1): Adjust to std::vector.
10552         (save_trace_state_variables): Likewise.
10553         (start_tracing): Likewise.
10554         (merge_uploaded_trace_state_variables): Adjust to std::vector
10555         and std::string.
10556         * target.h (struct target_ops)
10557         <to_download_trace_state_variable>: Pass reference to
10558         trace_state_variable.
10559         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10560         * target-delegates.c: Re-generate.
10561         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10562         (mi_tsv_deleted): Likewise.
10563         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10564         * remote.c (remote_download_trace_state_variable): Change
10565         pointer to reference and adjust.
10566         * make-target-delegates (parse_argtypes): Handle references.
10567         (write_function_header): Likewise.
10568         (munge_type): Likewise.
10569
10570 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10571
10572         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10573         string_view-selftests.c.
10574         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10575         testsuite.
10576         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10577         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10578         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10579         * unittests/basic_string_view/element_access/char/1.cc:
10580         Likewise.
10581         * unittests/basic_string_view/element_access/char/empty.cc:
10582         Likewise.
10583         * unittests/basic_string_view/element_access/char/front_back.cc:
10584         Likewise.
10585         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10586         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10587         Likewise.
10588         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10589         Likewise.
10590         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10591         Likewise.
10592         * unittests/basic_string_view/operations/compare/char/1.cc:
10593         Likewise.
10594         * unittests/basic_string_view/operations/compare/char/13650.cc:
10595         Likewise.
10596         * unittests/basic_string_view/operations/copy/char/1.cc:
10597         Likewise.
10598         * unittests/basic_string_view/operations/data/char/1.cc:
10599         Likewise.
10600         * unittests/basic_string_view/operations/find/char/1.cc:
10601         Likewise.
10602         * unittests/basic_string_view/operations/find/char/2.cc:
10603         Likewise.
10604         * unittests/basic_string_view/operations/find/char/3.cc:
10605         Likewise.
10606         * unittests/basic_string_view/operations/find/char/4.cc:
10607         Likewise.
10608         * unittests/basic_string_view/operations/rfind/char/1.cc:
10609         Likewise.
10610         * unittests/basic_string_view/operations/rfind/char/2.cc:
10611         Likewise.
10612         * unittests/basic_string_view/operations/rfind/char/3.cc:
10613         Likewise.
10614         * unittests/basic_string_view/operations/substr/char/1.cc:
10615         Likewise.
10616         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10617         * unittests/string_view-selftests.c: New file.
10618
10619 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10620
10621         * unittests/basic_string_view/capacity/1.cc: New file.
10622         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10623         * unittests/basic_string_view/cons/char/1.cc: New file.
10624         * unittests/basic_string_view/cons/char/2.cc: New file.
10625         * unittests/basic_string_view/cons/char/3.cc: New file.
10626         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10627         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10628         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10629         * unittests/basic_string_view/element_access/char/1.cc: New file.
10630         * unittests/basic_string_view/element_access/char/2.cc: New file.
10631         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10632         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10633         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10634         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10635         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10636         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10637         * unittests/basic_string_view/include.cc: New file.
10638         * unittests/basic_string_view/inserters/char/1.cc: New file.
10639         * unittests/basic_string_view/inserters/char/2.cc: New file.
10640         * unittests/basic_string_view/inserters/char/3.cc: New file.
10641         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10642         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10643         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10644         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10645         * unittests/basic_string_view/literals/types.cc: New file.
10646         * unittests/basic_string_view/literals/values.cc: New file.
10647         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10648         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10649         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10650         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10651         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10652         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10653         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10654         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10655         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10656         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10657         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10658         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10659         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10660         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10661         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10662         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10663         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10664         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10665         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10666         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10667         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10668         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10669         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10670         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10671         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10672         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10673         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10674         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10675         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10676         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10677         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10678         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10679         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10680         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10681         * unittests/basic_string_view/operators/char/2.cc: New file.
10682         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10683         * unittests/basic_string_view/range_access/char/1.cc: New file.
10684         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10685         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10686         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10687         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10688         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10689         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10690         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10691         * unittests/basic_string_view/typedefs.cc: New file.
10692         * unittests/basic_string_view/types/1.cc: New file.
10693
10694 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10695
10696         * common/gdb_string_view.h: Remove libstdc++ implementation
10697         details, adjust to gdb reality.
10698         * common/gdb_string_view.tcc: Likewise.
10699         * cli/cli-script.c (struct string_view): Remove.
10700         (user_args) <m_args>: Change element type to gdb::string_view.
10701         (user_args::insert_args): Adjust.
10702
10703 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10704
10705         * common/gdb_string_view.h: New file.
10706         * common/gdb_string_view.tcc: New file.
10707
10708 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10709
10710         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10711         * configure: Re-generate.
10712
10713 2018-04-09  Pedro Alves  <palves@redhat.com>
10714
10715         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10716         (set_target_gdbarch): Call
10717         gdb::observers::architecture_changed.notify instead of
10718         observer_notify_architecture_changed.
10719
10720 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10721
10722         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10723         (do_restore_current_traceframe_cleanup): Remove.
10724         (restore_current_traceframe_cleanup_dtor): Remove.
10725         (make_cleanup_restore_current_traceframe): Remove.
10726         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10727         New.
10728         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10729         * infrun.c (fetch_inferior_event): Use
10730         scoped_restore_current_traceframe.
10731
10732 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10733
10734         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10735         Remove.
10736         <n_allocated_type_units>: Remove.
10737         <all_type_units>: Change to std::vector.
10738         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10739         to std::vector change.
10740         (dwarf2_per_objfile::get_cutu): Likewise.
10741         (dwarf2_per_objfile::get_tu): Likewise.
10742         (create_signatured_type_table_from_index): Likewise.
10743         (create_signatured_type_table_from_debug_names): Likewise.
10744         (dw2_symtab_iter_next): Likewise.
10745         (dw2_print_stats): Likewise.
10746         (dw2_expand_all_symtabs): Likewise.
10747         (dw2_expand_marked_cus): Likewise.
10748         (dw2_debug_names_iterator::next): Likewise.
10749         (dwarf2_initialize_objfile): Likewise.
10750         (add_signatured_type_cu_to_table): Likewise.
10751         (create_all_type_units): Likewise.
10752         (add_type_unit): Likewise.
10753         (struct tu_abbrev_offset): Add constructor.
10754         (build_type_psymtabs_1): Adjust to std::vector change.
10755         (print_tu_stats): Likewise.
10756         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10757         (write_debug_names): Likewise.
10758
10759 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10760
10761         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10762         Make an std::vector.
10763         <n_comp_units>: Remove.
10764         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10765         to std::vector change.
10766         (dwarf2_per_objfile::get_cutu): Likewise.
10767         (dwarf2_per_objfile::get_cu): Likewise.
10768         (create_cus_from_index): Likewise.
10769         (create_addrmap_from_index): Likewise.
10770         (create_addrmap_from_aranges): Likewise.
10771         (dwarf2_read_index): Likewise.
10772         (dw2_find_last_source_symtab): Likewise.
10773         (dw2_map_symtabs_matching_filename): Likewise.
10774         (dw2_symtab_iter_next): Likewise.
10775         (dw2_print_stats): Likewise.
10776         (dw2_expand_all_symtabs): Likewise.
10777         (dw2_expand_symtabs_with_fullname): Likewise.
10778         (dw2_expand_marked_cus): Likewise.
10779         (dw2_map_symbol_filenames): Likewise.
10780         (create_cus_from_debug_names): Likewise.
10781         (dwarf2_read_debug_names): Likewise.
10782         (dw2_debug_names_iterator::next): Likewise.
10783         (dwarf2_initialize_objfile): Likewise.
10784         (set_partial_user): Likewise.
10785         (dwarf2_build_psymtabs_hard): Likewise.
10786         (read_comp_units_from_section): Remove arguments, adjust to
10787         std::vector change.
10788         (create_all_comp_units): Adjust to std::vector and
10789         read_comp_units_from_section changes.
10790         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10791         change.
10792         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10793         (psyms_seen_size): Likewise.
10794         (write_gdbindex): Likewise.
10795         (write_debug_names): Likewise.
10796
10797 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10798
10799         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10800         with dwarf2_per_objfile.
10801         (create_cus_from_index): Likewise.
10802         (create_signatured_type_table_from_index): Likewise.
10803         (dwarf2_read_index): Likewise.
10804         (dwarf2_initialize_objfile): Likewise.
10805         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10806         per_cu rather than get_dwarf2_per_objfile.
10807
10808 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10809
10810         * dwarf2read.h (struct signatured_type): Forward declare.
10811         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10812         New methods.
10813         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10814         (dw2_get_cutu): ...this.
10815         (dwarf2_per_objfile::get_cu): Rename from...
10816         (dw2_get_cu): ...this.
10817         (dwarf2_per_objfile::get_tu): New.
10818         (create_addrmap_from_index): Adjust.
10819         (create_addrmap_from_aranges): Adjust.
10820         (dw2_find_last_source_symtab): Adjust.
10821         (dw2_map_symtabs_matching_filename): Adjust.
10822         (dw2_symtab_iter_next): Adjust.
10823         (dw2_print_stats): Adjust.
10824         (dw2_expand_all_symtabs): Adjust.
10825         (dw2_expand_symtabs_with_fullname): Adjust.
10826         (dw2_expand_marked_cus): Adjust.
10827         (dw_expand_symtabs_matching_file_matcher): Adjust.
10828         (dw2_map_symbol_filenames): Adjust.
10829         (dw2_debug_names_iterator::next): Adjust.
10830         (dwarf2_initialize_objfile): Adjust.
10831         (set_partial_user): Adjust.
10832         (dwarf2_build_psymtabs_hard): Adjust.
10833
10834 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10835
10836         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10837         Remove unused variables.
10838         (dw2_map_symtabs_matching_filename): Likewise.
10839         (dwarf2_record_block_ranges): Likewise.
10840         (dwarf2_read_addr_index): Likewise.
10841         (follow_die_offset): Likewise.
10842
10843 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10844
10845         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10846         to symbol_file_add_main.
10847
10848 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10849
10850         PR mi/22299
10851         * mi/mi-console.c (do_fputc_async_safe): New.
10852         (mi_console_file::write_async_safe): New.
10853         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10854         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10855         New.
10856         * ui-file.c (ui_file::putstrn): Adjust call to
10857         fputstrn_unfiltered.
10858         * utils.c (printchar): Replace do_fputs and do_fprintf
10859         parameters by do_fputc.
10860         (fputstr_filtered): Adjust call to printchar.
10861         (fputstr_unfiltered): Likewise.
10862         (fputstrn_filtered): Likewise.
10863         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10864         printchar.
10865         * utils.h (do_fputc_ftype): New typedef.
10866         (fputstrn_unfiltered): Add do_fputc parameter.
10867
10868 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10869
10870         * regformats/i386/i386-avx.dat: Remove.
10871
10872 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10873
10874         PR gdb/22979
10875         * amd64-tdep.c (amd64_none_init_abi): New function.
10876         (amd64_x32_none_init_abi): New function.
10877         (_initialize_amd64_tdep): Register handlers for x86-64 and
10878         x64_32 with GDB_OSABI_NONE.
10879         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10880         GDB_OSABI_NONE osabi.
10881
10882 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10883
10884         PR gdb/22980
10885         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10886         GDB_OSABI_NONE.
10887         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10888         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10889
10890 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10891
10892         * common/byte-vector.h (char_vector): New type.
10893         * target.h (target_read_alloc): Return
10894         gdb::optional<byte_vector>.
10895         (target_read_stralloc): Return gdb::optional<char_vector>.
10896         (target_get_osdata): Return gdb::optional<char_vector>.
10897         * target.c (target_read_alloc_1): Templatize.  Replacement
10898         manual memory management with vector.
10899         (target_read_alloc): Change return type, adjust.
10900         (target_read_stralloc): Change return type, adjust.
10901         (target_get_osdata): Change return type, adjust.
10902         * auxv.c (struct auxv_info) <length>: Remove.
10903         <data>: Change type to gdb::optional<byte_vector>.
10904         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10905         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10906         (target_auxv_search): Adjust.
10907         (fprint_target_auxv): Adjust.
10908         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10909         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10910         (linux_make_corefile_notes): Adjust.
10911         * osdata.c (get_osdata): Adjust.
10912         * remote.c (remote_get_threads_with_qxfer): Adjust.
10913         (remote_memory_map): Adjust.
10914         (remote_traceframe_info): Adjust.
10915         (btrace_read_config): Adjust.
10916         (remote_read_btrace): Adjust.
10917         (remote_pid_to_exec_file): Adjust.
10918         * solib-aix.c (solib_aix_get_library_list): Adjust.
10919         * solib-dsbt.c (decode_loadmap): Don't free buf.
10920         (dsbt_get_initial_loadmaps): Adjust.
10921         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10922         * solib-target.c (solib_target_current_sos): Adjust.
10923         * tracepoint.c (sdata_make_value): Adjust.
10924         * xml-support.c (xinclude_start_include): Adjust.
10925         (xml_fetch_content_from_file): Adjust.
10926         * xml-support.h (xml_fetch_another): Change return type.
10927         (xml_fetch_content_from_file): Change return type.
10928         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10929         * xml-tdesc.c (file_read_description_xml): Adjust.
10930         (fetch_available_features_from_target): Change return type.
10931         (target_fetch_description_xml): Adjust.
10932         (target_read_description_xml): Adjust.
10933
10934 2018-04-06  Tom Tromey  <tom@tromey.com>
10935
10936         * value.c (~value): Update.
10937         (struct value) <contents>: Now unique_xmalloc_ptr.
10938         (value_contents_bits_eq, allocate_value_contents)
10939         (value_contents_raw, value_contents_all_raw)
10940         (value_contents_for_printing, value_contents_for_printing_const)
10941         (set_value_enclosing_type): Update.
10942
10943 2018-04-06  Tom Tromey  <tom@tromey.com>
10944
10945         * value.c (range_s): Remove typedef, VEC.
10946         (struct range): Add operator<.
10947         (range_lessthan): Remove.
10948         (ranges_contain): Change type.
10949         (~value): Update.
10950         (struct value) <unavailable, optimized_out>: Now std::vector.
10951         (value_entirely_available)
10952         (value_entirely_covered_by_range_vector)
10953         (value_entirely_unavailable, value_entirely_optimized_out):
10954         Update.
10955         (insert_into_bit_range_vector): Change argument type.
10956         (find_first_range_overlap): Likewise.
10957         (struct ranges_and_idx, value_contents_bits_eq)
10958         (require_not_optimized_out, require_available): Update.
10959         (ranges_copy_adjusted): Change argument types.
10960         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10961
10962 2018-04-06  Tom Tromey  <tom@tromey.com>
10963
10964         * value.c (~value): Update.
10965         (struct value) <parent>: Now a value_ref_ptr.
10966         (value_parent, set_value_parent, value_address, value_copy):
10967         Update.
10968
10969 2018-04-06  Tom Tromey  <tom@tromey.com>
10970
10971         * value.c (struct value): Add constructor, destructor, and member
10972         initializers.
10973         (allocate_value_lazy, value_decref): Update.
10974
10975 2018-04-06  Tom Tromey  <tom@tromey.com>
10976
10977         * value.c (struct value) <released, next>: Remove.
10978         (all_values): Now a std::vector.
10979         (allocate_value_lazy): Update.
10980         (value_next): Remove.
10981         (value_mark, value_free_to_mark, release_value)
10982         (value_release_to_mark): Update.
10983
10984 2018-04-06  Tom Tromey  <tom@tromey.com>
10985
10986         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10987         (free_value_chain): Remove.
10988         * value.c (free_value_chain): Remove.
10989         (value_release_to_mark): Return a std::vector.
10990         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10991         std::vector.
10992         (check_condition): Update.
10993         * eval.c (fetch_subexp_value): Change "val_chain" to a
10994         std::vector.
10995         * breakpoint.c (update_watchpoint): Update.
10996         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10997
10998 2018-04-06  Tom Tromey  <tom@tromey.com>
10999
11000         * value.h (free_all_values): Remove.
11001         * value.c (free_all_values): Remove.
11002
11003 2018-04-06  Tom Tromey  <tom@tromey.com>
11004
11005         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11006         (value_history_chain, value_history_count): Remove.
11007         (value_history): New global.
11008         (record_latest_value, access_value_history, show_values)
11009         (preserve_values): Update.
11010
11011 2018-04-06  Tom Tromey  <tom@tromey.com>
11012
11013         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11014         * varobj.c (varobj_set_display_format, varobj_set_value)
11015         (install_default_visualizer, construct_visualizer)
11016         (install_new_value, ~varobj, varobj_get_value_type)
11017         (my_value_of_variable, varobj_editable_p): Update.
11018         * c-varobj.c (c_describe_child, c_value_of_variable)
11019         (cplus_number_of_children, cplus_describe_child): Update.
11020         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11021         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11022         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11023
11024 2018-04-06  Tom Tromey  <tom@tromey.com>
11025
11026         * printcmd.c (last_examine_address): Change type to
11027         value_ref_ptr.
11028         (do_examine, x_command): Update.
11029
11030 2018-04-06  Tom Tromey  <tom@tromey.com>
11031
11032         * value.c (release_value): Update.
11033         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11034         (struct bpstats) <val>: Now a value_ref_ptr.
11035         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11036         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11037         (~watchpoint, print_it_watchpoint, watch_command_1)
11038         (invalidate_bp_value_on_memory_change): Update.
11039
11040 2018-04-06  Tom Tromey  <tom@tromey.com>
11041
11042         * varobj.c (varobj_clear_saved_item)
11043         (update_dynamic_varobj_children, install_new_value, ~varobj):
11044         Update.
11045         * value.h (value_incref): Move declaration earlier.
11046         (value_decref): Rename from value_free.
11047         (struct value_ref_policy): New.
11048         (value_ref_ptr): New typedef.
11049         (struct value_deleter): Remove.
11050         (gdb_value_up): Remove typedef.
11051         (release_value): Change return type.
11052         (release_value_or_incref): Remove.
11053         * value.c (set_value_parent): Update.
11054         (value_incref): Change return type.
11055         (value_decref): Rename from value_free.
11056         (value_free_to_mark, free_all_values, free_value_chain): Update.
11057         (release_value): Return value_ref_ptr.
11058         (release_value_or_incref): Remove.
11059         (record_latest_value, set_internalvar, clear_internalvar):
11060         Update.
11061         * stack.c (info_frame_command): Don't call value_free.
11062         * python/py-value.c (valpy_dealloc, valpy_new)
11063         (value_to_value_object): Update.
11064         * printcmd.c (do_examine): Update.
11065         * opencl-lang.c (lval_func_free_closure): Update.
11066         * mi/mi-main.c (register_changed_p): Don't call value_free.
11067         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11068         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11069         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11070         value_free.
11071         * guile/scm-value.c (vlscm_free_value_smob)
11072         (vlscm_scm_from_value): Update.
11073         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11074         (frame_unwind_register_unsigned, get_frame_register_bytes)
11075         (put_frame_register_bytes): Don't call value_free.
11076         * findvar.c (address_from_register): Don't call value_free.
11077         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11078         * dwarf2loc.c (entry_data_value_free_closure)
11079         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11080         (dwarf2_evaluate_loc_desc_full): Update.
11081         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11082         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11083         (~watchpoint, watch_command_1)
11084         (invalidate_bp_value_on_memory_change): Update.
11085         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11086
11087 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11088
11089         PR gdb/23022
11090         * warning.m4: Add -Wno-error=deprecated-register.
11091         * configure: Re-generate.
11092
11093 2018-04-05  Tom Tromey  <tom@tromey.com>
11094
11095         * linespec.h: Remove include of "vec.h".
11096
11097 2018-04-05  Tom Tromey  <tom@tromey.com>
11098
11099         * linespec.c (typep): Remove typedef.
11100         (find_methods, find_superclass_methods): Take a std::vector.
11101         (find_method): Use std::vector.
11102
11103 2018-04-05  Tom Tromey  <tom@tromey.com>
11104
11105         * utils.c (compare_strings): Remove.
11106         * utils.h (compare_strings): Remove.
11107         * objc-lang.h (find_imps): Update.
11108         * objc-lang.c (find_methods): Take a std::vector.
11109         (uniquify_strings, find_imps): Likewise.
11110         * linespec.c (find_methods): Take a std::vector.
11111         (decode_objc): Use std::vector.
11112         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11113         a std::vector.
11114         (find_method, find_function_symbols): Use std::vector.
11115
11116 2018-04-05  Tom Tromey  <tom@tromey.com>
11117
11118         * completer.c (completion_tracker::completion_tracker): Remove
11119         cast.
11120         (completion_tracker::discard_completions): Likewise.
11121         * breakpoint.c (ambiguous_names_p): Remove cast.
11122         * ada-lang.c (_initialize_ada_language): Remove cast.
11123         * utils.h (streq): Update.
11124         (streq_hash): Add new declaration.
11125         * utils.c (streq): Return bool.
11126         (streq_hash): New function.
11127
11128 2018-04-05  Tom Tromey  <tom@tromey.com>
11129
11130         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11131         Remove a string copy.
11132
11133 2018-04-05  Tom Tromey  <tom@tromey.com>
11134
11135         * linespec.c (filter_results): Use std::vector.
11136         (decode_line_2, decode_line_full): Update.
11137
11138 2018-04-05  Tom Tromey  <tom@tromey.com>
11139
11140         * linespec.c (canonical_to_fullform): Return std::string.
11141         (filter_results): Update.
11142         (struct decode_line_2_item): Add constructor.
11143         <fullform, displayform>: Now std::string.
11144         (decode_line_2_compare_items): Now a std::sort comparator.
11145         (decode_line_2): Update.
11146
11147 2018-04-05  Tom Tromey  <tom@tromey.com>
11148
11149         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11150         (unexpected_linespec_error): Update.
11151         (linespec_parse_basic, parse_linespec): Update.
11152
11153 2018-04-05  Tom Tromey  <tom@tromey.com>
11154
11155         * linespec.c (linespec_parse_basic): Reindent.
11156
11157 2018-04-05  Tom Tromey  <tom@tromey.com>
11158
11159         * minsyms.h (iterate_over_minimal_symbols): Update.
11160         * minsyms.c (iterate_over_minimal_symbols): Take a
11161         gdb::function_view.
11162         * linespec.c (struct collect_minsyms): Remove.
11163         (compare_msyms): Now a std::sort comparator.
11164         (add_minsym): Add parameters.
11165         (search_minsyms_for_name): Update.  Use std::vector.
11166
11167 2018-04-03  Tom Tromey  <tom@tromey.com>
11168
11169         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11170         gdb::byte_vector.
11171
11172 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11173
11174         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11175
11176 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11177
11178         PR gdb/16959
11179         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11180         printing static type.
11181
11182 2018-04-01  Tom Tromey  <tom@tromey.com>
11183
11184         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11185         (rs6000_xfer_shared_libraries): Update.
11186
11187 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11188
11189         * common/gdb_vecs.h (char_ptr): Remove.
11190         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11191
11192 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11193
11194         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11195         with std::vector.
11196         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11197
11198 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11199
11200         * tracepoint.h (struct uploaded_tp): Initialize fields.
11201         <actions, step_actions, cmd_strings>: Change type to
11202         std::vector<char *>.
11203         * tracepoint.c (get_uploaded_tp): Allocate with new.
11204         (free_uploaded_tps): Free with delete.
11205         (parse_tracepoint_definition): Adjust to std::vector change.
11206         * breakpoint.c (read_uploaded_action): Likewise.
11207         (create_tracepoint_from_upload): Likewise.
11208         * ctf.c (ctf_write_uploaded_tp): Likewise.
11209         (SET_ARRAY_FIELD): Likewise.
11210         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11211
11212 2018-03-30  Tom Tromey  <tom@tromey.com>
11213
11214         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11215         std::unique_ptr.
11216         (svr4_keep_data_in_core): Update.
11217         (svr4_read_so_list): Update.
11218
11219 2018-03-30  Tom Tromey  <tom@tromey.com>
11220
11221         * windows-nat.c (handle_output_debug_string, handle_exception):
11222         Update.
11223         * target.h (target_read_string): Update.
11224         * target.c (target_read_string): Change "string" to
11225         unique_xmalloc_ptr.
11226         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11227         Update.
11228         * solib-frv.c (frv_current_sos): Update.
11229         * solib-dsbt.c (dsbt_current_sos): Update.
11230         * solib-darwin.c (darwin_current_sos): Update.
11231         * linux-thread-db.c (inferior_has_bug): Update.
11232         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11233         Update.  Remove alloca.
11234         * ada-lang.c (ada_main_name): Update.
11235
11236 2018-03-30  Tom Tromey  <tom@tromey.com>
11237
11238         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11239         (struct dwo_file_deleter): New.
11240         (dwo_file_up): New typedef.
11241         (open_and_init_dwo_file): Use dwo_file_up.
11242         (free_dwo_file_cleanup): Remove.
11243
11244 2018-03-30  Tom Tromey  <tom@tromey.com>
11245
11246         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11247         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11248
11249 2018-03-30  Tom Tromey  <tom@tromey.com>
11250
11251         * dwarf2read.c (class free_cached_comp_units): New class.
11252         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11253         (free_cached_comp_units): Remove function.
11254
11255 2018-03-30  Tom Tromey  <tom@tromey.com>
11256
11257         * utils.h (make_cleanup_unpush_target): Remove.
11258         * inf-ptrace.c (struct target_unpusher): New.
11259         (target_unpush_up) New typedef.
11260         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11261         target_unpush_up.
11262         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11263
11264 2018-03-27  Tom Tromey  <tom@tromey.com>
11265
11266         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11267
11268 2018-03-27  Pedro Alves  <palves@redhat.com>
11269             Tom Tromey  <tom@tromey.com>
11270
11271         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11272         destructor.  Now a class.
11273         (gdb_readline_wrapper_cleanup): Remove function.
11274         (gdb_readline_wrapper): Remove cleanups.
11275
11276 2018-03-27  Tom Tromey  <tom@tromey.com>
11277
11278         * typeprint.h (struct type_print_options) <local_typedefs,
11279         global_typedefs>: Remove "struct" keyword.
11280         (class typedef_hash_table): New class.
11281         (recursively_update_typedef_hash, add_template_parameters)
11282         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11283         (find_typedef_in_hash): Don't declare.
11284         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11285         (typedef_hash_table::recursively_update): Rename from
11286         recursively_update_typedef_hash.  Now a member.
11287         (typedef_hash_table::add_template_parameters): Rename from
11288         add_template_parameters.  Now a member.
11289         (typedef_hash_table::typedef_hash_table): Now a constructor;
11290         rename from create_typedef_hash.
11291         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11292         rename from free_typedef_hash.
11293         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11294         (do_free_global_table): Remove.
11295         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11296         from copy_type_recursive.
11297         (create_global_typedef_table): Remove.
11298         (typedef_hash_table::find_global_typedef): Now a member of
11299         typedef_hash_table.
11300         (typedef_hash_table::find_typedef): Rename from
11301         find_typedef_in_hash; now a member.
11302         (whatis_exp): Update.
11303         * extension.h (struct ext_lang_type_printers): Add constructor and
11304         destructor.
11305         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11306         declare.
11307         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11308         Now a constructor; rename from start_ext_lang_type_printers.
11309         (ext_lang_type_printers): Now a destructor; rename from
11310         free_ext_lang_type_printers.
11311         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11312         Update.
11313         (c_type_print_base_struct_union): Update.  Remove cleanups.
11314
11315 2018-03-27  Tom Tromey  <tom@tromey.com>
11316
11317         * dwarf-index-write.c: Include <cmath>.
11318
11319 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11320
11321         * NEWS: Add entry describing new "set|show varsize-limit" command.
11322         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11323         command.
11324         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11325         "set variable".
11326
11327 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11328
11329         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11330         dwarf-index-write.c
11331         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11332         * dwarf-index-common.c: New file.
11333         * dwarf-index-common.h: New file.
11334         * dwarf-index-write.c: New file.
11335         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11336         (struct dwarf2_section_info): Move from here.
11337         (dwarf2_section_info_def): Likewise.
11338         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11339         (offset_type): Likewise.
11340         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11341         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11342         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11343         (byte_swap): Likewise.
11344         (MAYBE_SWAP): Likewise.
11345         (dwarf2_per_cu_ptr): Likewise.
11346         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11347         (struct tu_stats): Likewise.
11348         (struct dwarf2_per_objfile): Likewise.
11349         (struct dwarf2_per_cu_data): Likewise.
11350         (struct signatured_type): Likewise.
11351         (sig_type_ptr): Likewise.
11352         (DEF_VEC_P (sig_type_ptr)): Likewise.
11353         (INDEX4_SUFFIX): Likewise.
11354         (INDEX5_SUFFIX): Likewise.
11355         (DEBUG_STR_SUFFIX): Likewise.
11356         (dwarf2_read_section): Make non-static.
11357         (mapped_index_string_hash): Move from here.
11358         (dwarf5_djb_hash): Likewise.
11359         (file_write): Likewise.
11360         (class data_buf): Likewise.
11361         (struct symtab_index_entry): Likewise.
11362         (struct mapped_symtab): Likewise.
11363         (find_slot): Likewise.
11364         (hash_expand): Likewise.
11365         (add_index_entry): Likewise.
11366         (uniquify_cu_indices): Likewise.
11367         (class c_str_view): Likewise.
11368         (class c_str_view_hasher): Likewise.
11369         (class vector_hasher): Likewise.
11370         (write_hash_table): Likewise.
11371         (psym_index_map): Likewise.
11372         (struct addrmap_index_data): Likewise.
11373         (add_address_entry): Likewise.
11374         (add_address_entry_worker): Likewise.
11375         (write_address_map): Likewise.
11376         (symbol_kind): Likewise.
11377         (write_psymbols): Likewise.
11378         (struct signatured_type_index_data): Likewise.
11379         (write_one_signatured_type): Likewise.
11380         (recursively_count_psymbols): Likewise.
11381         (recursively_write_psymbols): Likewise.
11382         (class debug_names): Likewise.
11383         (check_dwarf64_offsets): Likewise.
11384         (psyms_seen_size): Likewise.
11385         (write_gdbindex): Likewise.
11386         (write_debug_names): Likewise.
11387         (assert_file_size): Likewise.
11388         (write_psymtabs_to_index): Likewise.
11389         (save_gdb_index_command): Likewise.
11390         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11391         command.
11392         * dwarf2read.h: New file.
11393
11394 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11395
11396         PR gdb/22670
11397         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11398         symbol name if the CU's language stores symbol names in linkage
11399         format.
11400         * language.h (struct language_defn)
11401         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11402         all instances of this struct.
11403
11404 2018-03-26  Tom Tromey  <tom@tromey.com>
11405
11406         * stack.c (backtrace_command_1): Remove verbose code.
11407
11408 2018-03-26  Tom Tromey  <tom@tromey.com>
11409
11410         * python/py-framefilter.c (py_print_type): Don't catch
11411         exceptions.  Return void.
11412         (py_print_value): Likewise.
11413         (py_print_single_arg): Likewise.
11414         (enumerate_args): Don't catch exceptions.
11415         (py_print_args): Likewise.
11416         (py_print_frame): Likewise.
11417         (gdbpy_apply_frame_filter): Catch exceptions here.
11418
11419 2018-03-26  Tom Tromey  <tom@tromey.com>
11420
11421         * stack.c (_initialize_stack): Remove trailing newlines from help
11422         text.  Add "Usage" line to "backtrace" help.
11423
11424 2018-03-26  Tom Tromey  <tom@tromey.com>
11425
11426         PR python/16486:
11427         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11428
11429 2018-03-26  Tom Tromey  <tom@tromey.com>
11430
11431         * python/py-framefilter.c (py_print_single_arg): Return
11432         EXT_LANG_BT_ERROR from catch.
11433
11434 2018-03-26  Tom Tromey  <tom@tromey.com>
11435
11436         PR backtrace/15584:
11437         * stack.c (backtrace_command_1): Move some code into no-filters
11438         "if".
11439
11440 2018-03-26  Tom Tromey  <tom@tromey.com>
11441
11442         * python/py-framefilter.c (throw_quit_or_print_exception): New
11443         function.
11444         (gdbpy_apply_frame_filter): Use it.
11445
11446 2018-03-26  Tom Tromey  <tom@tromey.com>
11447
11448         PR cli/17716:
11449         * python/py-framefilter.c (py_print_type, py_print_value)
11450         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11451         RETURN_MASK_ERROR.
11452
11453 2018-03-26  Tom Tromey  <tom@tromey.com>
11454
11455         * python/py-framefilter.c (enumerate_args): Use
11456         gdb::unique_xmalloc_ptr.
11457
11458 2018-03-26  Tom Tromey  <tom@tromey.com>
11459
11460         * python/py-framefilter.c (py_print_frame): Return
11461         EXT_LANG_BT_OK.
11462         (gdbpy_apply_frame_filter): Update comment.
11463         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11464         Remove.
11465         <EXT_LANG_BT_NO_FILTERS>: Change value.
11466
11467 2018-03-26  Tom Tromey  <tom@tromey.com>
11468
11469         PR backtrace/15582:
11470         * stack.c (backtrace_command): Parse "hide" argument.
11471         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11472         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11473         constant.
11474
11475 2018-03-26  Tom Tromey  <tom@tromey.com>
11476
11477         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11478         add "flags".
11479         (backtrace_command): Remove "fulltrace", add "flags".
11480
11481 2018-03-26  Tom Tromey  <tom@tromey.com>
11482
11483         * stack.c (backtrace_command): Rewrite command line parsing.
11484
11485 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11486
11487         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11488
11489 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11490
11491         * filename-seen-cache.h: Add include guard.
11492
11493 2018-03-26  Keith Seitz  <keiths@redhat.com>
11494
11495         * symfile.c (place_section): Remove "struct" from section_addr_info
11496         in comment.
11497         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11498         "struct" keyword from section_addr_info.
11499
11500 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11501
11502         * regformats/regdef.h (reg): Add constructors.
11503
11504 2018-03-25  Pedro Alves  <palves@redhat.com>
11505
11506         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11507         if then/else bodies in var_func_name extraction.
11508
11509 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11510
11511         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11512         lookup_minimal_symbol() to find symbol entry.
11513         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11514
11515 2018-03-23  Keith Seitz  <keiths@redhat.com>
11516
11517         PR c++/22968
11518         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11519         nested type definitions for C++, too.
11520
11521 2018-03-23  Tom Tromey  <tom@tromey.com>
11522
11523         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11524         a typedef.
11525         (macho_register_oso): Remove.
11526         (macho_symtab_read): Take a std::vector.
11527         (oso_el_compare_name): Now a std::sort comparator.
11528         (macho_symfile_read_all_oso): Take a std::vector.
11529         (macho_symfile_read): Use std::vector.  Remove cleanups.
11530
11531 2018-03-22  Tom Tromey  <tom@tromey.com>
11532
11533         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11534         (record_full_goto_bookmark): Use std::string.
11535
11536 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11537
11538         PR tdep/18295
11539         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11540         a single mask.
11541
11542 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11543
11544         * rs6000-tdep.c (store_insn_p): New function.
11545         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11546         and cr_reg to their unshifted values. Use store_insn_p to
11547         match LR saves using either R1 or fdata->alloca_reg. Use
11548         store_insn_p to match CR saves. Set alloca_reg_offset
11549         when alloca_reg and framep are set. Remove lr_reg shift
11550         when assigning to fdata->lr_register.
11551
11552 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11553
11554         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11555         command line args instead of emitting a warning.
11556
11557 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11558
11559         * tracepoint.h (struct static_tracepoint_marker): Initialize
11560         fields, define default constructor, move constructor and move
11561         assignment, disable the rest.
11562         <str_id, extra>: Make std::string.
11563         (release_static_tracepoint_marker): Remove.
11564         (free_current_marker): Remove.
11565         * tracepoint.c (free_current_marker): Remove.
11566         (parse_static_tracepoint_marker_definition): Adjust to
11567         std::string, use new hex2str overload.
11568         (release_static_tracepoint_marker): Remove.
11569         (print_one_static_tracepoint_marker): Get marker by reference
11570         and adjust to std::string.
11571         (info_static_tracepoint_markers_command): Adjust to std::vector
11572         changes
11573         * target.h (static_tracepoint_marker_p): Remove typedef.
11574         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11575         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11576         bool.
11577         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11578         * target-debug.h
11579         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11580         (target_debug_print_std_vector_static_tracepoint_marker): New.
11581         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11582         to...
11583         (target_debug_print_static_tracepoint_marker_p): ... this.
11584         * target-delegates.c: Re-generate.
11585         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11586         Make std::string.
11587         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11588         (decode_static_tracepoint_spec): Adjust to std::vector.
11589         (tracepoint_print_one_detail): Adjust to std::string.
11590         (strace_marker_decode_location): Adjust to std::string.
11591         (update_static_tracepoint): Adjust to std::string, remove call
11592         to release_static_tracepoint_marker.
11593         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11594         Adjust to std::vector.
11595         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11596         (remote_static_tracepoint_markers_by_strid): Adjust to
11597         std::vector.
11598         * common/rsp-low.h (hex2str): New overload with explicit count
11599         of bytes.
11600         * common/rsp-low.c (hex2str): New overload with explicit count
11601         of bytes.
11602         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11603         (_initialize_rsp_low_selftests): Add test_hex2str test.
11604         * unittests/tracepoint-selftests.c
11605         (test_parse_static_tracepoint_marker_definition): Adjust to
11606         std::string.
11607
11608 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11609
11610         * tracepoint.c (parse_static_tracepoint_marker_definition):
11611         Consider case where the definition is followed by more
11612         definitions.
11613         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11614         tracepoint-selftests.c.
11615         * unittests/tracepoint-selftests.c: New.
11616
11617 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11618
11619         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11620         Carvalho.
11621
11622 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11623
11624         * symtab.c (find_pc_sect_line): fixed indentation.
11625
11626 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11627
11628         * symtab.c (find_pc_sect_line): now uses binary search.
11629
11630 2018-03-19  Tom Tromey  <tom@tromey.com>
11631
11632         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11633         "IDENT" production.
11634
11635 2018-03-19  Pedro Alves  <palves@redhat.com>
11636             Tom Tromey  <tom@tromey.com>
11637
11638         * unittests/observable-selftests.c: New file.
11639         * common/observable.h: New file.
11640         * observable.h: New file.
11641         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11642         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11643         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11644         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11645         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11646         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11647         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11648         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11649         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11650         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11651         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11652         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11653         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11654         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11655         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11656         tui/tui-interp.c, valops.c: Update all users.
11657         * tui/tui-hooks.c (tui_bp_created_observer)
11658         (tui_bp_deleted_observer, tui_bp_modified_observer)
11659         (tui_inferior_exit_observer, tui_before_prompt_observer)
11660         (tui_normal_stop_observer, tui_register_changed_observer):
11661         Remove.
11662         (tui_observers_token): New global.
11663         (attach_or_detach, tui_attach_detach_observers): New functions.
11664         (tui_install_hooks, tui_remove_hooks): Use
11665         tui_attach_detach_observers.
11666         * record-btrace.c (record_btrace_thread_observer): Remove.
11667         (record_btrace_thread_observer_token): New global.
11668         * observer.sh: Remove.
11669         * observer.c: Rename to observable.c.
11670         * observable.c (namespace gdb_observers): Define new objects.
11671         (observer_debug): Move into gdb_observers namespace.
11672         (struct observer, struct observer_list, xalloc_observer_list_node)
11673         (xfree_observer_list_node, generic_observer_attach)
11674         (generic_observer_detach, generic_observer_notify): Remove.
11675         (_initialize_observer): Update.
11676         Don't include observer.inc.
11677         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11678         (clean mostlyclean): Likewise.
11679         (observer.h, observer.inc): Remove targets.
11680         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11681         (COMMON_SFILES): Use observable.c, not observer.c.
11682         * .gitignore: Remove observer.h.
11683
11684 2018-03-18  Tom Tromey  <tom@tromey.com>
11685
11686         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11687         gdb::def_vector.
11688         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11689
11690 2018-03-17  Tom Tromey  <tom@tromey.com>
11691
11692         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11693
11694 2018-03-17  Tom Tromey  <tom@tromey.com>
11695
11696         * target.c (class scoped_target_fd): New.
11697         (target_fileio_close_cleanup): Remove.
11698         (target_fileio_read_alloc_1): Use scoped_target_fd.
11699
11700 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11701
11702         * silent-rules.mk: New.
11703         * Makefile.in: Include silent-rules.mk
11704         (srcdir, VPATH, top_srcdir): Move up.
11705         (COMPILE): Add ECHO_CXX.
11706         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11707         (init.c): Add ECHO_INIT_C.
11708         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11709         (version.c): Add ECHO_GEN.
11710         (printcmd.o): Add ECHO_CXX.
11711         (target-float.o): Add ECHO_CXX.
11712         (ada-exp.o): Add ECHO_CXX.
11713         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11714         (insight$(EXEEXT)): Add ECHO_CXXLD.
11715         * gnulib/configure.ac: Add AM_SILENT_RULES.
11716         * gnulib/aclocal.m4: Re-generate.
11717         * gnulib/configure: Re-generate.
11718         * gnulib/import/Makefile.in: Re-generate.
11719
11720 2018-03-16  Tom Tromey  <tom@tromey.com>
11721
11722         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11723         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11724         * utils.c (do_free_section_addr_info)
11725         (make_cleanup_free_section_addr_info): Remove.
11726         * symfile.h (struct other_sections): Add constructor.
11727         (struct section_addr_info): Remove.
11728         (section_addr_info): New typedef.
11729         (struct sym_fns) <sym_offsets>: Change type of parameter.
11730         (build_section_addr_info_from_objfile)
11731         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11732         (default_symfile_offsets, symbol_file_add)
11733         (symbol_file_add_from_bfd)
11734         (build_section_addr_info_from_section_table): Update.
11735         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11736         * symfile.c (alloc_section_addr_info): Remove.
11737         (build_section_addr_info_from_section_table): Change return type.
11738         Update.
11739         (build_section_addr_info_from_bfd)
11740         (build_section_addr_info_from_objfile): Likewise.
11741         (free_section_addr_info): Remove.
11742         (relative_addr_info_to_section_offsets): Change type of "addrs".
11743         (addrs_section_compar): Now a std::sort comparator.
11744         (addrs_section_sort): Change return type.
11745         (addr_info_make_relative): Change type of "addrs".  Update.
11746         (default_symfile_offsets, syms_from_objfile_1)
11747         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11748         (symbol_file_add_separate): Update.
11749         (symbol_file_add): Change type of "addrs".  Update.
11750         (add_symbol_file_command): Update.  Remove cleanups.
11751         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11752         cleanups.
11753         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11754         * solib.c (solib_read_symbols): Update.
11755         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11756         * machoread.c (macho_symfile_offsets): Update.
11757         * jit.c (jit_bfd_try_read_symtab): Update.
11758
11759 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11760
11761         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11762         unittests/utils-selftests.c.
11763         * unittests/utils-selftests.c: New file.
11764
11765 2018-03-14  Tom Tromey  <tom@tromey.com>
11766
11767         PR cli/14977:
11768         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11769         for NULL.
11770
11771 2018-03-14  Tom Tromey  <tom@tromey.com>
11772
11773         PR cli/19918:
11774         * printcmd.c (printf_pointer): Allow "-" in format.
11775
11776 2018-03-14  Tom Tromey  <tom@tromey.com>
11777
11778         * printcmd.c (_initialize_printcmd): Add usage to printf.
11779
11780 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11781
11782         * MAINTAINERS: Update my email address.
11783
11784 2018-03-13  Tom Tromey  <tom@tromey.com>
11785
11786         * machoread.c (macho_check_dsym): Change filenamep to a
11787         std::string*.
11788         (macho_symfile_read): Update.
11789         * symfile.c (load_command): Use std::string.
11790
11791 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11792
11793         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11794         to error message string.
11795         (riscv_register_name): Use xsnprintf instead of sprintf.
11796         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11797         internal_error.
11798         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11799         error.
11800         (riscv_push_dummy_call): Likewise.
11801
11802 2018-03-12  Tom Tromey  <tom@tromey.com>
11803
11804         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11805         Use gdb::byte_vector.
11806         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11807
11808 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11809
11810         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11811         parameter type to readable_regcache.
11812         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11813         the declaration.
11814
11815 2018-03-11  Tom Tromey  <tom@tromey.com>
11816
11817         * dwarf2read.c (struct nextfield): Add initializers.
11818         (struct nextfnfield): Remove.
11819         (struct fnfieldlist): Add initializers.  Remove "length" and
11820         "head", use std::vector.
11821         (struct decl_field_list): Remove.
11822         (struct field_info): Add initializers.
11823         <fields, baseclasses>: Now std::vector.
11824         <nbaseclasses, nfnfields, typedef_field_list_count,
11825         nested_types_list_count>: Remove.
11826         (dwarf2_add_field, dwarf2_add_type_defn)
11827         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11828         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11829         (process_structure_scope): Update.
11830
11831 2018-03-11  Tom Tromey  <tom@tromey.com>
11832
11833         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11834         for use by std::sort.
11835         (build_type_psymtabs_1): Use std::vector.
11836
11837 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11838
11839         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11840         and LIBMPFR in the printed configuration.
11841
11842 2018-03-08  Tom Tromey  <tom@tromey.com>
11843
11844         * source.c (get_filename_and_charpos): Use scoped_fd.
11845         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11846         (procfs_pidlist): Likewise.
11847         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11848         (iterate_over_mappings): Likewise.
11849
11850 2018-03-08  Tom Tromey  <tom@tromey.com>
11851
11852         * infcall.c (struct call_return_meta_info)
11853         <stack_temporaries_enabled>: Remove.
11854         (get_call_return_value, call_function_by_hand_dummy): Update.
11855         * thread.c (disable_thread_stack_temporaries): Remove.
11856         (enable_thread_stack_temporaries): Remove.
11857         (thread_stack_temporaries_enabled_p): Return bool.
11858         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11859         (get_last_thread_stack_temporary): Update.
11860         * eval.c (evaluate_subexp): Update.
11861         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11862         class, not a function.
11863         (value_ptr, value_vec): Remove typedefs.
11864         (class thread_info) <stack_temporaries_enabled>: Now bool.
11865         <stack_temporaries>: Now a std::vector.
11866         (thread_stack_temporaries_enabled_p)
11867         (value_in_thread_stack_temporaries): Return bool.
11868
11869 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11870
11871         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11872         (getpkt_or_notif_sane_1): Likewise.
11873
11874 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11875
11876         * build-id.c (build_id_to_debug_bfd): Use std::string.
11877
11878 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11879
11880         * build-id.c (find_separate_debug_file_by_buildid): Return
11881         std::string.
11882         * build-id.h (find_separate_debug_file_by_buildid): Return
11883         std::string.
11884         * coffread.c (coff_symfile_read): Adjust to std::string.
11885         * elfread.c (elf_symfile_read): Adjust to std::string.
11886         * symfile.c (separate_debug_file_exists): Change parameter to
11887         std::string.
11888         (find_separate_debug_file): Return std::string.
11889         (find_separate_debug_file_by_debuglink): Return std::string.
11890         * symfile.h (find_separate_debug_file_by_debuglink): Return
11891         std::string.
11892
11893 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11894
11895         * common/xml-utils.c (xml_escape_text): Move code to...
11896         (xml_escape_text_append): ... this new function.
11897         * common/xml-utils.h (xml_escape_text_append): New declaration.
11898         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11899         New function.
11900         (_initialize_xml_utils): register test_xml_escape_text_append as
11901         a selftest.
11902
11903 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11904
11905         * defs.h: Remove MAX_REGISTER_SIZE.
11906         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11907         asserts.
11908         * python/py-unwind.c (pyuw_sniffer): Likewise.
11909
11910 2018-03-07  Tom Tromey  <tom@tromey.com>
11911
11912         * linux-tdep.c (linux_info_proc): Update.
11913         * target.h (struct target_ops) <to_fileio_readlink>: Return
11914         optional<string>.
11915         (target_fileio_readlink): Return optional<string>.
11916         * remote.c (remote_hostio_readlink): Return optional<string>.
11917         * inf-child.c (inf_child_fileio_readlink): Return
11918         optional<string>.
11919         * target.c (target_fileio_readlink): Return optional<string>.
11920
11921 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11922
11923         * regcache.c (cooked_read_test): Add riscv to the list of
11924         architectures that have a save_reggroup.
11925
11926 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11927
11928         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11929         value is not a dynamic class object.
11930
11931 2018-03-06  Tom Tromey  <tom@tromey.com>
11932
11933         * rust-exp.y: Formatting fixes.
11934
11935 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11936
11937         * riscv-tdep.c (riscv_register_name): Remove target description
11938         support.
11939         (riscv_gdbarch_init): Remove target description check.
11940
11941 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11942
11943         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11944         comment.
11945         * riscv-tdep.h: Likewise.
11946
11947 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11948
11949         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11950         (riscv_pseudo_register_write): Delete.
11951         (riscv_gdbarch_init): Remove all use of pseudo registers.
11952
11953 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11954
11955         * record-btrace.c (btrace_print_lines): Replace cleanup
11956         parameter with RAII equivalents.
11957         (btrace_insn_history): Replace cleanup with RAII equivalents.
11958         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11959         make_cleanup_ui_out_tuple_begin_end): Remove.
11960         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11961         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11962         make_cleanup_ui_out_list_begin_end): Remove.
11963
11964 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11965
11966         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11967         parameter types to std::vector.  Use bool.
11968         (record_btrace_wait): Replace VEC(tp_t) with
11969         std::vector<thread_info *>.
11970         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11971
11972 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11973
11974         * record-btrace.c (record_btrace_disable_callback): Remove.
11975         (struct scoped_btrace_disable): New.
11976         (record_btrace_open): Use scoped_btrace_disable.
11977
11978 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11979
11980         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11981         reading values from registers.
11982
11983 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11984
11985         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11986         where appropriate.
11987
11988 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11989
11990         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11991         change parameter type.  Use GDB's print functions, and use
11992         core_addr_to_string where appropriate.
11993         (riscv_push_dummy_call): Use core_addr_to_string where
11994         appropriate, update call to riscv_print_arg_location, and reindent
11995         a few lines.
11996         (riscv_return_value): Update call to riscv_print_arg_location.
11997
11998 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11999             Tim Newsome <tim@sifive.com>
12000             Albert Ou <a0u@eecs.berkeley.edu>
12001             Darius Rad <darius@bluespec.com>
12002
12003         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12004         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12005         (ALLDEPFILES): Add riscv-tdep.c
12006         * configure.tgt: Add riscv support.
12007         * riscv-tdep.c: New file.
12008         * riscv-tdep.h: New file.
12009         * NEWS: Mention new target.
12010         * MAINTAINERS: Add entry for riscv.
12011
12012 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12013
12014         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12015         fields within aggregates.
12016
12017 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12018
12019         * record-btrace.c (btrace_print_lines): Change type of flags to
12020         gdb_disassembly_flags.
12021
12022 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12023
12024         * fbsd-nat.c: Include "inf-ptrace.h".
12025         (USE_SIGTRAP_SIGINFO): Conditionally define.
12026         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12027         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12028         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12029         function.
12030         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12031         Likewise.
12032         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12033         Likewise.
12034         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12035         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12036         "supports_stopped_by_hw_breakpoint" target methods.
12037
12038 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12039
12040         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12041         * fbsd-nat.c (debug_fbsd_nat): New variable.
12042         (show_fbsd_nat_debug): New function.
12043         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12044         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12045
12046 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12047
12048         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12049         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12050         prototype.
12051         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12052         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12053         method.
12054
12055 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12056
12057         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12058         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12059
12060 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12061
12062         * charset.c (struct charset_vector): New.
12063         (charsets): Change type to charset_vector.
12064         (find_charset_names): Adjust.
12065         (add_one): Adjust.
12066         (_initialize_charset): Adjust.
12067
12068 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12069
12070         * progspace.h (struct program_space) <deleted_solibs>: Change
12071         type to std::vector<std::string>.
12072         * progspace.c (clear_program_space_solib_cache): Adjust.
12073         * breakpoint.c (print_solib_event): Adjust.
12074         (check_status_catch_solib): Adjust.
12075         * solib.c (update_solib_list): Adjust.
12076         * ui-out.h (class ui_out) <field_string>: New overload.
12077         * ui-out.c (ui_out::field_string): New overload.
12078
12079 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12080
12081         * progspace.h (struct program_space): Add constructor and
12082         destructor, initialize fields.
12083         (add_program_space): Remove.
12084         * progspace.c (add_program_space): Rename to...
12085         (program_space::program_space): ... this.
12086         (release_program_space): Rename to...
12087         (program_space::~program_space): ... this.
12088         (delete_program_space): Use delete to delete program_space.
12089         (initialize_progspace): Use new to allocate program_space.
12090         * inferior.c (add_inferior_with_spaces): Likewise.
12091         (clone_inferior_command): Likewise.
12092         * infrun.c (follow_fork_inferior): Likewise.
12093         (handle_vfork_child_exec_or_exit): Likewise.
12094
12095 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12096
12097         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12098         (delim_string_to_char_ptr_vec): Return std::vector of
12099         gdb::unique_xmalloc_ptr.
12100         (dirnames_to_char_ptr_vec_append): Take std::vector of
12101         gdb::unique_xmalloc_ptr.
12102         (dirnames_to_char_ptr_vec): Return std::vector of
12103         gdb::unique_xmalloc_ptr.
12104         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12105         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12106         (delim_string_to_char_ptr_vec): Return an std::vector of
12107         gdb::unique_xmalloc_ptr, adjust the code.
12108         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12109         gdb::unique_xmalloc_ptr, adjust the code.
12110         (dirnames_to_char_ptr_vec): Return an std::vector of
12111         gdb::unique_xmalloc_ptr, adjust the code.
12112         * auto-load.c (auto_load_safe_path_vec): Change type to
12113         std::vector of gdb::unique_xmalloc_ptr.
12114         (auto_load_expand_dir_vars): Return an std::vector of
12115         gdb::unique_xmalloc_ptr, adjust the code.
12116         (auto_load_safe_path_vec_update): Adjust.
12117         (filename_is_in_auto_load_safe_path_vec): Adjust.
12118         (auto_load_objfile_script_1): Adjust.
12119         * build-id.c (build_id_to_debug_bfd): Adjust.
12120         * linux-thread-db.c (thread_db_load_search): Adjust.
12121         * source.c (add_path): Adjust.
12122         (openp): Adjust.
12123         * symfile.c (find_separate_debug_file): Adjust.
12124         * utils.c (do_free_char_ptr_vec): Remove.
12125         (make_cleanup_free_char_ptr_vec): Remove.
12126
12127 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12128
12129         PR gdb/22907
12130         * common/pathstuff.c: Conditionally include "<windows.h>".
12131
12132 2018-03-01  Georg Sauthoff  <mail@georg.so>
12133
12134         PR gdb/22888
12135         * gcore.in: Quote variables and switch interpreter to bash.
12136
12137 2018-03-01  Tom Tromey  <tom@tromey.com>
12138
12139         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12140         assertion.  Add assertion for discriminant_index.
12141         (quirk_rust_enum): Use correct base type name in univariant case.
12142
12143 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12144
12145         * record.c (get_call_history_modifiers): Return a
12146         record_print_flags.
12147         (cmd_record_call_history): Adjust.
12148         * record-btrace.c (record_btrace_call_history): Adjust.
12149         (record_btrace_call_history_range): Adjust.
12150         (record_btrace_call_history_from): Adjust.
12151         * target-debug.h (target_debug_print_record_print_flags): New.
12152         * target-delegates.c: Re-generate.
12153         * target.c (target_call_history): Change flags type.
12154         (target_call_history_from): Likewise.
12155         (target_call_history_range): Likewise.
12156         * target.h (struct target_ops) <target_call_history>: Likewise.
12157         (target_call_history_from): Likewise.
12158         (target_call_history_range): Likewise.
12159
12160 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12161             Simon Marchi  <simon.marchi@polymtl.ca>
12162
12163         * common/common-utils.c: Include "sys/stat.h".
12164         (is_regular_file): Move here from "source.c"; change return
12165         type to "bool".
12166         * common/common-utils.h (is_regular_file): New prototype.
12167         * common/pathstuff.c (contains_dir_separator): New function.
12168         * common/pathstuff.h (contains_dir_separator): New prototype.
12169         * source.c: Don't include "sys/stat.h".
12170         (is_regular_file): Move to "common/common-utils.c".
12171
12172 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12173
12174         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12175         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12176         * auto-load.c: Include "common/pathstuff.h".
12177         * common/common-def.h (current_directory): Move here.
12178         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12179         function.
12180         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12181         prototype.
12182         * common/pathstuff.c: New file.
12183         * common/pathstuff.h: New file.
12184         * compile/compile.c: Include "common/pathstuff.h".
12185         * defs.h (current_directory): Move to "common/common-defs.h".
12186         * dwarf2read.c: Include "common/pathstuff.h".
12187         * exec.c: Likewise.
12188         * guile/scm-safe-call.c: Likewise.
12189         * linux-thread-db.c: Likewise.
12190         * main.c: Likewise.
12191         * nto-tdep.c: Likewise.
12192         * objfiles.c: Likewise.
12193         * source.c: Likewise.
12194         * symtab.c: Likewise.
12195         * utils.c: Include "common/pathstuff.h".
12196         (gdb_realpath): Move to "common/pathstuff.c".
12197         (gdb_realpath_keepfile): Likewise.
12198         (gdb_abspath): Likewise.
12199         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12200         (gdb_realpath_keepfile): Likewise.
12201         (gdb_abspath): Likewise.
12202
12203 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12204
12205         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12206         wildcard process pid for super_resume for kernels with a
12207         specific bug.
12208
12209 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12210
12211         * compile/compile.c (get_args): Add additional comments
12212         explaining function.
12213
12214 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12215             Tom Tromey  <tom@tromey.com>
12216
12217         * target.h (memory_write_request_s): Remove typedef.  Don't define
12218         VEC.
12219         (target_write_memory_blocks): Change argument to std::vector.
12220         (struct memory_write_request): Add constructor.
12221         * target-memory.c (compare_block_starting_address): Return bool.
12222         Change argument types.
12223         (claim_memory): Change arguments to use std::vector.
12224         (split_regular_and_flash_blocks, blocks_to_erase)
12225         (compute_garbled_blocks): Likewise.
12226         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12227         (target_write_memory_blocks): Change argument to std::vector.
12228         * symfile.c (struct load_section_data): Add constructor and
12229         destructor.  Use std::vector for "requests".
12230         (struct load_progress_data): Add initializers.
12231         (load_section_callback): Update.  Use "new".
12232         (clear_memory_write_data): Remove.
12233         (generic_load): Update.
12234
12235 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12236
12237         * arch/aarch64.h: Use common/tdesc.h.
12238
12239 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12240
12241         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12242         architecture with a 64-bit ABI.
12243
12244 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12245
12246         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12247         ahead of target description loading.
12248
12249 2018-02-26  Tom Tromey  <tom@tromey.com>
12250
12251         * stack.c (backtrace_command_1): Update.
12252         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12253         of "flags".
12254         * python/py-framefilter.c (py_print_frame)
12255         (gdbpy_apply_frame_filter): Change type of "flags".
12256         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12257         of "flags".
12258         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12259         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12260         * extension.h (enum frame_filter_flag): Rename from
12261         frame_filter_flags.
12262         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12263         (apply_ext_lang_frame_filter): Change type of "flags".
12264         * extension.c (apply_ext_lang_frame_filter): Change type of
12265         "flags".
12266         * extension-priv.h (struct extension_language_ops)
12267         <apply_frame_filter>: Change type of "flags".
12268
12269 2018-02-26  Tom Tromey  <tom@tromey.com>
12270
12271         PR python/16497:
12272         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12273         off-by-one in py_end computation.
12274         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12275         PRINT_MORE_FRAMES.
12276         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12277         constant.
12278
12279 2018-02-26  Tom Tromey  <tom@tromey.com>
12280
12281         * dwarf2read.c (struct variant_field): New.
12282         (struct nextfield) <variant>: New field.
12283         (dwarf2_add_field): Handle DW_TAG_variant_part.
12284         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12285         discriminated union.
12286         (read_structure_type): Handle DW_TAG_variant_part.
12287         (handle_struct_member_die): New function, extracted from
12288         process_structure_scope.  Handle DW_TAG_variant.
12289         (process_structure_scope): Handle discriminated unions.  Call
12290         handle_struct_member_die.
12291
12292 2018-02-26  Tom Tromey  <tom@tromey.com>
12293
12294         * rust-lang.h (rust_last_path_segment): Declare.
12295         * rust-lang.c (rust_last_path_segment): Now public.  Change
12296         contract.
12297         (struct disr_info): Remove.
12298         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12299         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12300         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12301         (rust_enum_p, rust_enum_variant): New function.
12302         (rust_underscore_fields): Remove "offset" parameter.
12303         (rust_print_enum): New function.
12304         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12305         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12306         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12307         enums.
12308         (rust_internal_print_type): New function, from rust_print_type.
12309         Remove enum code.
12310         (rust_print_type): Call rust_internal_print_type.
12311         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12312         Update enum handling.
12313         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12314         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12315         (rust_union_quirks): New functions.
12316         (process_full_comp_unit, process_full_type_unit): Call
12317         rust_union_quirks.
12318         (process_structure_scope): Update rust_unions if necessary.
12319
12320 2018-02-26  Tom Tromey  <tom@tromey.com>
12321
12322         * value.h (value_union_variant): Declare.
12323         * valops.c (value_union_variant): New function.
12324         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12325         (struct discriminant_info): New.
12326         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12327         enumerator.
12328         (struct main_type) <flag_discriminated_union>: New field.
12329
12330 2018-02-26  Tom Tromey  <tom@tromey.com>
12331
12332         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12333         unittests/unpack-selftests.c.
12334         * unittests/unpack-selftests.c: New file.
12335         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12336
12337 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12338
12339         * dwarf2read.c (struct partial_die_info) <read>: New method.
12340         (read_partial_die): Remove the declaration.
12341         (load_partial_dies): Update.
12342         (partial_die_info::partial_die_info):
12343         (read_partial_die): Change it to partial_die_info::read.
12344
12345 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12346
12347         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12348         (fixup_partial_die): Remove declaration.
12349         (scan_partial_symbols): Update.
12350         (partial_die_parent_scope): Likewise.
12351         (partial_die_full_name): Likewise.
12352         (fixup_partial_die): Change it to partial_die_info::fixup.
12353
12354 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12355
12356         * dwarf2read.c (read_partial_die): Update the declaration.
12357         (load_partial_dies): Caller update.
12358         (read_partial_die): Remove one argument abbrev_len.
12359
12360 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12361
12362         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12363         assignment operator.
12364         (load_partial_dies): Use ctor and copy ctor.
12365         (read_partial_die): Update.
12366         (dwarf2_cu::find_partial_die): Use ctor.
12367
12368 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12369
12370         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12371         (find_partial_die_in_comp_unit): Change it to
12372         dwarf2_cu::find_partial_die.
12373         (find_partial_die): Update.
12374
12375 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12376
12377         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12378         is NULL.
12379
12380 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12381
12382         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12383
12384 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12385
12386         * arch/amd64.h: Use common/tdesc.h.
12387         * arch/i386.c: Likewise.
12388         * arch/i386.h: Likewise.
12389         * arch/tic6x.c: Likewise.
12390         * arch/tdesc.h: Move file from here...
12391         * common/tdesc.h: ...to here.
12392         * features/aarch64-core.c: Regenerate.
12393         * features/aarch64-fpu.c: Regenerate.
12394         * features/i386/32bit-avx.c: Regenerate.
12395         * features/i386/32bit-avx512.c: Regenerate.
12396         * features/i386/32bit-core.c: Regenerate.
12397         * features/i386/32bit-linux.c: Regenerate.
12398         * features/i386/32bit-mpx.c: Regenerate.
12399         * features/i386/32bit-pkeys.c: Regenerate.
12400         * features/i386/32bit-sse.c: Regenerate.
12401         * features/i386/64bit-avx.c: Regenerate.
12402         * features/i386/64bit-avx512.c: Regenerate.
12403         * features/i386/64bit-core.c: Regenerate.
12404         * features/i386/64bit-linux.c: Regenerate.
12405         * features/i386/64bit-mpx.c: Regenerate.
12406         * features/i386/64bit-pkeys.c: Regenerate.
12407         * features/i386/64bit-segments.c: Regenerate.
12408         * features/i386/64bit-sse.c: Regenerate.
12409         * features/i386/x32-core.c: Regenerate.
12410         * features/tic6x-c6xp.c: Regenerate.
12411         * features/tic6x-core.c: Regenerate.
12412         * features/tic6x-gp.c: Regenerate.
12413         * target-descriptions.c: Use common/tdesc.h.
12414         * target-descriptions.h: Likewise.
12415
12416 2018-02-24  Tom Tromey  <tom@tromey.com>
12417
12418         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12419         (try_thread_db_load_from_dir, thread_db_load_search): Use
12420         std::string.
12421         (info_auto_load_libthread_db_compare): Return bool.  Change
12422         argument types.
12423         (info_auto_load_libthread_db): Use std::vector, std::string.
12424         Remove cleanups.
12425
12426 2018-02-24  Tom Tromey  <tom@tromey.com>
12427
12428         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12429         std::string.
12430         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12431         std::string*.
12432         * gdbarch.c: Rebuild.
12433         * gdbarch.h: Rebuild.
12434         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12435         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12436         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12437         std::string*.
12438
12439 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12440
12441         * gdbtypes.h (sect_offset): Change type to uint64_t.
12442         (sect_offset_str): New function.
12443         * dwarf2read.c (create_addrmap_from_aranges): Use
12444         sect_offset_str.
12445         (error_check_comp_unit_head): Likewise.
12446         (create_debug_type_hash_table): Likewise.
12447         (read_cutu_die_from_dwo): Likewise.
12448         (init_cutu_and_read_dies): Likewise.
12449         (init_cutu_and_read_dies_no_follow): Likewise.
12450         (process_psymtab_comp_unit_reader): Likewise.
12451         (partial_die_parent_scope): Likewise.
12452         (peek_die_abbrev): Likewise.
12453         (process_queue): Likewise.
12454         (dwarf2_physname): Likewise.
12455         (read_namespace_alias): Likewise.
12456         (read_import_statement): Likewise.
12457         (create_dwo_cu_reader): Likewise.
12458         (create_cus_hash_table): Likewise.
12459         (lookup_dwo_cutu): Likewise.
12460         (inherit_abstract_dies): Likewise.
12461         (read_func_scope): Likewise.
12462         (read_call_site_scope): Likewise.
12463         (dwarf2_add_member_fn): Likewise.
12464         (read_common_block): Likewise.
12465         (read_module_type): Likewise.
12466         (read_typedef): Likewise.
12467         (read_subrange_type): Likewise.
12468         (load_partial_dies): Likewise.
12469         (read_partial_die): Likewise.
12470         (find_partial_die): Likewise.
12471         (read_str_index): Likewise.
12472         (dwarf2_string_attr): Likewise.
12473         (build_error_marker_type): Likewise.
12474         (lookup_die_type): Likewise.
12475         (dump_die_shallow): Likewise.
12476         (follow_die_ref): Likewise.
12477         (dwarf2_fetch_die_loc_sect_off): Likewise.
12478         (dwarf2_fetch_constant_bytes): Likewise.
12479         (follow_die_sig): Likewise.
12480         (get_signatured_type): Likewise.
12481         (get_DW_AT_signature_type): Likewise.
12482         (dwarf2_find_containing_comp_unit): Likewise.
12483         (set_die_type): Likewise.
12484
12485 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12486
12487         * arch/aarch64.c: Include "common-defs.h".
12488         * arch/amd64.c: Likewise.
12489         * arch/i386.c: Likewise.
12490
12491 2018-02-21  Tom Tromey  <tom@tromey.com>
12492
12493         * value.h: (extract_field_op): Update.
12494         * eval.c (extract_field_op): Return a const char *.
12495         * expression.h (parse_expression_for_completion): Update.
12496         * completer.c (complete_expression): Update.
12497         (add_struct_fields): Make fieldname const.
12498         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12499         (mark_completion_tag, parse_exp_in_context_1): Update.
12500         (parse_expression_for_completion): Change "name" to
12501         unique_xmalloc_ptr*.
12502
12503 2018-02-21  Tom Tromey  <tom@tromey.com>
12504
12505         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12506
12507 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12508
12509         * avr-tdep.c (avr_read_pc): Change parameter type to
12510         readable_regcache.
12511         * gdbarch.sh (read_pc): Likewise.
12512         * gdbarch.c: Re-generated.
12513         * gdbarch.h: Re-generated.
12514         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12515         readable_regcache.
12516         * ia64-tdep.c (ia64_read_pc): Likewise.
12517         * mips-tdep.c (mips_read_pc): Likewise.
12518         * spu-tdep.c (spu_read_pc): Likewise.
12519
12520 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12521
12522         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12523         * regcache-dump.c: New file.
12524         * regcache.c: Move register_dump to regcache-dump.c.
12525         (maintenance_print_registers): Likewise.
12526         (maintenance_print_raw_registers): Likewise.
12527         (maintenance_print_cooked_registers): Likewise.
12528         (maintenance_print_register_groups): Likewise.
12529         (maintenance_print_remote_registers): Likewise.
12530         (_initialize_regcache): Likewise.
12531         * regcache.h (register_dump): Moved from regcache.c.
12532
12533 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12534
12535         * regcache.c (regcache::regcache): Update.
12536         (regcache::invalidate): Move it to detached_regcache::invalidate.
12537         (get_thread_arch_aspace_regcache): Update.
12538         (regcache::raw_update): Update.
12539         (regcache::cooked_read): Remove some code.
12540         (regcache::cooked_read_value): Likewise.
12541         (regcache::raw_write): Remove assert on m_readonly_p.
12542         (regcache::raw_supply_integer): Move it to
12543         detached_regcache::raw_supply_integer.
12544         (regcache::raw_supply_zeroed): Likewise.
12545         * regcache.h (detached_regcache) <raw_supply_integer>: New
12546         declaration.
12547         <raw_supply_zeroed, invalidate>: Likewise.
12548         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12549         <invalidate>: Likewise.
12550         <m_readonly_p>: Removed.
12551
12552 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12553
12554         * infcmd.c (get_return_value): Let stop_regs point to
12555         get_current_regcache.
12556         * regcache.c (regcache::regcache): Remove.
12557         (register_dump_reg_buffer): New class.
12558         (regcache_print): Adjust.
12559         * regcache.h (regcache): Remove constructors.
12560
12561 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12562
12563         * regcache.c (class register_dump): New class.
12564         (register_dump_regcache, register_dump_none): New class.
12565         (register_dump_remote, register_dump_groups): New class.
12566         (regcache_print): Update.
12567         * regcache.h (regcache_dump_what): Move it to regcache.c.
12568         (regcache) <dump>: Remove.
12569
12570 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12571
12572         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12573          reg_buffer_rw *.
12574         (jit_unwind_reg_set_impl): Call raw_supply.
12575         (jit_frame_sniffer): Use reg_buffer_rw.
12576         * record-full.c (record_full_core_regbuf): Change its type.
12577         (record_full_core_open_1): Use reg_buffer_rw.
12578         (record_full_close): Likewise.
12579         (record_full_core_fetch_registers): Use regcache->raw_supply.
12580         (record_full_core_store_registers): Likewise.
12581         * regcache.c (regcache::get_register_status): Move it to
12582         reg_buffer.
12583         (regcache_raw_set_cached_value): Remove.
12584         (regcache::raw_set_cached_value): Remove.
12585         (regcache::raw_write): Call raw_supply.
12586         (regcache::raw_supply): Move it to reg_buffer_rw.
12587         * regcache.h (regcache_raw_set_cached_value): Remove.
12588         (reg_buffer_rw): New class.
12589
12590 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12591
12592         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12593         readonly_detached_regcache.
12594         (dummy_frame_prev_register): Use regcache->cooked_read.
12595         * frame.c (frame_save_as_regcache): Change return type.
12596         (frame_pop): Update.
12597         * frame.h (frame_save_as_regcache): Update declaration.
12598         * inferior.h (get_infcall_suspend_state_regcache): Update
12599         declaration.
12600         * infrun.c (infcall_suspend_state) <registers>: use
12601         readonly_detached_regcache.
12602         (save_infcall_suspend_state): Don't use regcache_dup.
12603         (get_infcall_suspend_state_regcache): Change return type.
12604         * linux-fork.c (struct fork_info) <savedregs>: Change to
12605         readonly_detached_regcache.
12606         <pc>: New field.
12607         (fork_save_infrun_state): Don't use regcache_dup.
12608         (info_checkpoints_command): Adjust.
12609         * mi/mi-main.c (register_changed_p): Update declaration.
12610         (mi_cmd_data_list_changed_registers): Use
12611         readonly_detached_regcache.
12612         (register_changed_p): Change parameter type to
12613         readonly_detached_regcache.
12614         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12615         readonly_detached_regcache.
12616         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12617         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12618         New.
12619         (regcache::save): Move it to reg_buffer.
12620         (regcache::restore): Change parameter type.
12621         (regcache_dup): Remove.
12622         * regcache.h (reg_buffer) <save>: New method.
12623         (readonly_detached_regcache): New class.
12624         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12625         readonly_detached_regcache.
12626         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12627
12628 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12629
12630         * frame.c (frame_save_as_regcache): Use regcache method save.
12631         (frame_pop): Use regcache method restore.
12632         * infrun.c (restore_infcall_suspend_state): Likewise.
12633         * linux-fork.c (fork_load_infrun_state): Likewise.
12634         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12635         save.
12636         * regcache.c (regcache_save): Remove.
12637         (regcache::restore): More asserts.
12638         (regcache_cpy): Remove.
12639         * regcache.h (regcache_save): Remove the declaration.
12640         (regcache::restore): Move from private to public.
12641         Remove the friend declaration of regcache_cpy.
12642         (regcache_cpy): Remove declaration.
12643
12644 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12645
12646         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12647         parameter type to 'readable_regcache *'.
12648         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12649         * arm-tdep.c (arm_neon_quad_read): Likewise.
12650         (arm_pseudo_read): Likewise.
12651         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12652         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12653         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12654         * gdbarch.c: Re-generated.
12655         * gdbarch.h: Re-generated.
12656         * gdbarch.sh (pseudo_register_read): Change parameter type to
12657         'readable_regcache *'.
12658         (pseudo_register_read_value): Likewise.
12659         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12660         (h8300_pseudo_register_read): Likewise.
12661         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12662         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12663         (i386_pseudo_register_read_into_value): Likewise.
12664         (i386_pseudo_register_read_value): Likewise.
12665         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12666         declaration.
12667         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12668         * m32c-tdep.c (m32c_raw_read): Likewise.
12669         (m32c_read_flg): Likewise.
12670         (m32c_banked_register): Likewise.
12671         (m32c_banked_read): Likewise.
12672         (m32c_sb_read): Likewise.
12673         (m32c_part_read): Likewise.
12674         (m32c_cat_read): Likewise.
12675         (m32c_r3r2r1r0_read): Likewise.
12676         (m32c_pseudo_register_read): Likewise.
12677         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12678         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12679         (mep_pseudo_cr64_read): Likewise.
12680         (mep_pseudo_register_read): Likewise.
12681         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12682         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12683         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12684         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12685         (regcache::cooked_read): Likewise.
12686         (regcache::cooked_read_value): Likewise.
12687         (regcache_cooked_read_signed):
12688         (regcache::cooked_read): Likewise.
12689         * regcache.h (readable_regcache): New class.
12690         (regcache): Inherit readable_regcache.  Move some methods to
12691         readable_regcache.
12692         * rl78-tdep.c (rl78_pseudo_register_read): Change
12693         parameter type to 'readable_regcache *'.
12694         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12695         (e500_pseudo_register_read): Change parameter type to
12696         'readable_regcache *'.
12697         (dfp_pseudo_register_read): Likewise.
12698         (vsx_pseudo_register_read): Likewise.
12699         (efpr_pseudo_register_read): Likewise.
12700         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12701         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12702         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12703         (sh64_pseudo_register_read): Likewise.
12704         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12705         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12706         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12707         (spu_pseudo_register_read): Likewise.
12708         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12709         (xtensa_pseudo_register_read): Likewise.
12710
12711 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12712
12713         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12714         (regcache::arch): Move it to reg_buffer::arch.
12715         (regcache::register_buffer): Likewise.
12716         (regcache::assert_regnum): Likewise.
12717         (regcache::num_raw_registers): Likewise.
12718         * regcache.h (reg_buffer): New class.
12719         (regcache): Inherit reg_buffer.
12720
12721 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12722
12723         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12724         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12725
12726 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12727
12728         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12729
12730 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12731
12732         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12733         (SFILES): Remove common/*.c files.
12734         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12735         * common/common.host: Add common reference.
12736         * configure.ac: Likewise.
12737         * configure: Regenerate.
12738
12739 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12740
12741         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12742         (block_initialize_namespace): Use new.
12743         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12744         (dwarf2_free_objfile): Use delete.
12745         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12746         (copy_type_recursive): Use new.
12747         * gdb_obstack.h (allocate_on_obstack): New.
12748
12749 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12750
12751         PR gdb/22849
12752         * inferior.c (exit_inferior_1): Reset inf->control.
12753
12754 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12755
12756         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12757         declaration.
12758
12759 2018-02-14  Pedro Alves  <palves@redhat.com>
12760
12761         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12762         frame_cleanup_after_sniffer on exception.
12763
12764 2018-02-14  Tom Tromey  <tom@tromey.com>
12765
12766         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12767         const.
12768         (solib_bfd_open): Make pathname const.
12769         * solib.c (solib_bfd_open): Make pathname const.
12770         * solib-spu.c (spu_bfd_fopen): Make name const.
12771         (spu_bfd_open): Make pathname const.
12772         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12773         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12774
12775 2018-02-14  Tom Tromey  <tom@tromey.com>
12776
12777         * symfile.c (symfile_bfd_open): Update.
12778         * source.h (openp, source_full_path_of, find_and_open_source):
12779         Change argument type to unique_xmalloc_ptr.
12780         * source.c (openp): Take a unique_xmalloc_ptr.
12781         (source_full_path_of, find_and_open_source): Likewise.
12782         (open_source_file, symtab_to_fullname): Update.
12783         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12784         unique_xmalloc_ptr.
12785         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12786         (exec_file_find): Update.
12787         * psymtab.c (psymtab_to_fullname): Update.
12788         * nto-tdep.h (nto_find_and_open_solib): Update.
12789         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12790         unique_xmalloc_ptr.
12791         * exec.c (exec_file_attach): Update.
12792         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12793         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12794
12795 2018-02-14  Tom Tromey  <tom@tromey.com>
12796
12797         * solib.c: Include source.h.
12798         * nto-tdep.c: Include source.h.
12799         * mi/mi-cmd-env.c: Include source.h.
12800         * infcmd.c: Include source.h.
12801         * exec.c: Include source.h.
12802         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12803         (add_path, directory_switch, source_path, init_source_path): Move
12804         declarations...
12805         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12806         (add_path, directory_switch, source_path, init_source_path):
12807         ...here.
12808
12809 2018-02-14  Tom Tromey  <tom@tromey.com>
12810
12811         * solist.h (exec_file_find, solib_find): Return
12812         unique_xmalloc_ptr.
12813         (solib_bfd_fopen): Take a const char *.
12814         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12815         (exec_file_find, solib_find): Likewise.
12816         (solib_bfd_fopen): Do not take ownership of "pathname".
12817         (solib_bfd_open): Use unique_xmalloc_ptr.
12818         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12819         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12820         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12821         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12822
12823 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12824
12825         * ada-lang.c (name_match_type_from_name): Remove reference to
12826         ada_name_for_lookup in function's documentation.
12827         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12828
12829 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12830
12831         * defs.h (enum openp_flags): New enum.
12832         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12833         Move to enum openp_flags.
12834         (openp_flags): New enum flags.
12835         (openp): Change parameter type to openp_flags.
12836         * source.c (openp): Change parameter type to openp_flags.
12837         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12838         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12839
12840 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12841
12842         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12843         per-command.
12844
12845 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12846
12847         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12848         into...
12849         (class dwarf2_queue_guard): ...the destructor of this new class.
12850         (dw2_do_instantiate_symtab): Create instance of the new class
12851         dwarf2_queue_guard, remove cleanup.
12852
12853 2018-02-09  Tom Tromey  <tom@tromey.com>
12854
12855         * source.c (find_source_lines): Don't reference past the end of
12856         the vector.
12857
12858 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12859
12860         * remote.c (remote_btrace_maybe_reopen): Change error message.
12861         * btrace.c (btrace_enable): Likewise.
12862         (parse_xml_btrace): Likewise.
12863         (parse_xml_btrace_conf): Likewise.
12864
12865 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12866
12867         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12868         (linux_enable_pt, linux_enable_bts): Call
12869         diagnose_perf_event_open_fail.
12870
12871 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12872
12873         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12874         Remove parameter and change return type.  Update callers.  Move it.
12875         (linux_enable_bts, linux_enable_pt): Improve error message.
12876         (linux_enable_pt): Remove zero buffer size check.
12877         (linux_enable_btrace): Improve error messages.  Remove NULL return
12878         check.
12879
12880 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12881
12882         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12883         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12884         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12885         (linux_supports_pt, linux_supports_btrace): Remove.
12886         (linux_enable_bts): Call cpu_supports_bts.
12887         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12888         * remote.c (remote_supports_btrace): Remove.
12889         (init_remote_ops): Remove remote_supports_btrace.
12890         * target-delegates.c: Regenerated.
12891         * target.c (target_supports_btrace): Remove.
12892         * target.h (target_ops) <to_supports_btrace>: Remove
12893         (target_supports_btrace): Remove.
12894         * x86-linux-nat.c (x86_linux_create_target): Remove
12895         linux_supports_btrace.
12896
12897 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12898
12899         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12900         btrace failed.
12901         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12902         exception and use message in own exception.
12903
12904 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12905
12906         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12907         (perf_event_pt_event_type): Use gdb_file_up.
12908         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12909         scoped_fd, and scoped_mmap.
12910
12911 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12912
12913         * common/scoped_mmap.h: New.
12914         * unittests/scoped_mmap-selftest.c: New.
12915         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12916         unittests/scoped_mmap-selftest.c.
12917
12918 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12919
12920         * common/scoped_fd.h: New.
12921         * unittests/scoped_fd-selftest.c: New.
12922         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12923         unittests/scoped_fd-selftest.c.
12924
12925 2018-02-09  Tom Tromey  <tom@tromey.com>
12926
12927         * auto-load.c (auto_load_section_scripts): Use
12928         gdb::unique_xmalloc_ptr.
12929
12930 2018-02-09  Tom Tromey  <tom@tromey.com>
12931
12932         * auto-load.c (execute_script_contents): Use std::string.
12933
12934 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12935
12936         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12937         Python function, rather than a new command.
12938
12939 2018-02-08  Tom Tromey  <tom@tromey.com>
12940
12941         * solib.c (solib_find_1): Use std::string.
12942         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12943
12944 2018-02-08  Tom Tromey  <tom@tromey.com>
12945
12946         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12947
12948 2018-02-08  Tom Tromey  <tom@tromey.com>
12949
12950         * source.c (find_source_lines): Use gdb::def_vector.
12951
12952 2018-02-08  Tom Tromey  <tom@tromey.com>
12953
12954         * macrocmd.c (struct temporary_macro_definition): New.
12955         (macro_define_command): Use temporary_macro_definition.  Remove
12956         cleanups.
12957         (free_macro_definition_ptr): Remove.
12958
12959 2018-02-08  Tom Tromey  <tom@tromey.com>
12960
12961         * macroexp.c (maybe_expand): Use std::string.
12962
12963 2018-02-08  Tom Tromey  <tom@tromey.com>
12964
12965         * macroexp.c (struct macro_buffer): Add initializers for some
12966         members.
12967         (init_buffer, init_shared_buffer, free_buffer)
12968         (free_buffer_return_text): Remove.
12969         (macro_buffer): New constructors.
12970         (~macro_buffer): New destructor.
12971         (macro_buffer::set_shared): New method.
12972         (macro_buffer::resize_buffer, macro_buffer::appendc)
12973         (macro_buffer::appendmem): Now methods, not free functions.
12974         (set_token, append_tokens_without_splicing, stringify)
12975         (macro_stringify): Update.
12976         (gather_arguments): Change return type.  Remove argc_p argument,
12977         add args_ptr argument.  Use std::vector.
12978         (substitute_args): Remove argc argument.  Accept std::vector.
12979         (expand): Update.  Use std::vector.
12980         (scan, macro_expand, macro_expand_next): Update.
12981
12982 2018-02-08  Tom Tromey  <tom@tromey.com>
12983
12984         * symtab.c (default_collect_symbol_completion_matches_break_on):
12985         Use unique_xmalloc_ptr.
12986         * macroscope.h: (sal_macro_scope, user_macro_scope)
12987         (default_macro_scope): Return unique_xmalloc_ptr.
12988         * macroscope.c (sal_macro_scope, user_macro_scope)
12989         (default_macro_scope): Return unique_xmalloc_ptr.
12990         * macroexp.h (macro_expand, macro_expand_once): Return
12991         unique_xmalloc_ptr.
12992         * macroexp.c (macro_expand, macro_expand_once): Return
12993         unique_xmalloc_ptr.
12994         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12995         (info_macro_command, info_macros_command): Use
12996         unique_xmalloc_ptr.
12997         * compile/compile-c-support.c (write_macro_definitions): Use
12998         unique_xmalloc_ptr.
12999         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13000
13001 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13002
13003         * value.c (value_static_field): Assign field type instead of
13004         containing type when returning an optimized out value.
13005
13006 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13007
13008         * ft32-tdep.c (ft32_read_pc): Remove.
13009         (ft32_write_pc): Remove.
13010         (ft32_gdbarch_init): Update.
13011         * m32r-tdep.c (m32r_read_pc): Remove.
13012         (m32r_gdbarch_init): Update.
13013         * mep-tdep.c (mep_read_pc): Remove.
13014         (mep_gdbarch_init): Update.
13015         * microblaze-tdep.c (microblaze_write_pc): Remove.
13016         (microblaze_gdbarch_init): Update.
13017         * mn10300-tdep.c (mn10300_read_pc): Remove.
13018         (mn10300_write_pc): Remove.
13019         (mn10300_gdbarch_init): Update.
13020         * moxie-tdep.c (moxie_read_pc): Remove.
13021         (moxie_write_pc): Remove.
13022         (moxie_gdbarch_init): Update.
13023
13024 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13025
13026         * expprint.c (print_subexp_standard): Handle
13027         OP_F77_UNDETERMINED_ARGLIST.
13028         (dump_subexp_body_standard): Likewise.
13029
13030 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13031
13032         * target-descriptions.c (tdesc_element_visitor) Add empty
13033         implementations.
13034         (tdesc_type): Move make_gdb_type from here.
13035         (tdesc_type_builtin): Likewise.
13036         (tdesc_type_vector): Likewise.
13037         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13038         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13039         (make_gdb_type_union): Likewise.
13040         (make_gdb_type_flags): Likewise.
13041         (make_gdb_type_enum): Likewise.
13042         (make_gdb_type): New function.
13043         (tdesc_register_type): Use static make_gdb_type.
13044
13045 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13046
13047         * infcmd.c (default_print_one_register_info): Align natural-format
13048         column values consistently one under another.
13049         (pad_to_column): New function.
13050
13051 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13052
13053         * dwarf2read.c (dwarf2_physname): Move commment.
13054
13055 2018-02-01  Leszek Swirski  <leszeks@google.com>
13056
13057         * varobj.c (varobj_formatted_print_options): Allow recursive
13058         pretty printing if pretty printing is enabled.
13059
13060 2018-02-01  Leszek Swirski  <leszeks@google.com>
13061
13062         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13063         names after a structop as a filename.
13064
13065 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13066
13067         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13068         (arm_record_coproc_data_proc): Likewise.
13069
13070 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13071
13072         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13073
13074 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13075
13076         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13077         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13078
13079 2018-01-31  Pedro Alves  <palves@redhat.com>
13080
13081         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13082         * inflow.c (child_terminal_save_inferior): Wrap reference to
13083         tcgetpgrp in HAVE_TERMIOS_H.
13084         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13085         _WIN32.
13086         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13087         always iterate over all inferiors.
13088         (gdbsim_cntrl_c): Adjust.
13089         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13090
13091 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13092
13093         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13094         index type is objfile-owned if the element type is as well.
13095
13096 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13097
13098         GDB 8.1 released.
13099
13100 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13101
13102         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13103         "features/s390x-linux64.c".
13104         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13105         s390_linux32 and s390x_linux64.
13106         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13107         default tdesc.
13108         * s390-tdep.c: Include "features/s390-linux32.c" and
13109         "features/s390x-linux64.c".
13110         (s390_tdesc_valid): Add check for tdesc_has_registers.
13111         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13112         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13113         tdesc_s390x_linux64.
13114         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13115         tdesc_s390x_linux64 to...
13116         * s390-tdep.h: ...here.
13117
13118 2018-01-30  Pedro Alves  <palves@redhat.com>
13119
13120         PR gdb/13211
13121         * config.in, configure: Regenerate.
13122         * configure.ac: Check for getpgid.
13123         * go32-nat.c (go32_pass_ctrlc): New.
13124         (go32_target): Install it.
13125         * inf-child.c (inf_child_target): Install
13126         child_terminal_save_inferior, child_pass_ctrlc and
13127         child_interrupt.
13128         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13129         (inf_ptrace_target): No longer install it.
13130         * infcmd.c (interrupt_target_1): Adjust.
13131         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13132         (child_interrupt): Declare.
13133         (inferior::terminal_state): New.
13134         * inflow.c (struct terminal_info): Update comments.
13135         (inferior_process_group): Delete.
13136         (terminal_is_ours): Delete.
13137         (gdb_tty_state): New.
13138         (child_terminal_init): Adjust.
13139         (is_gdb_terminal, sharing_input_terminal_1)
13140         (sharing_input_terminal): New functions.
13141         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13142         Set the process's actual process group in the foreground if
13143         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13144         mark terminal as the inferior's if not sharing GDB's terminal.
13145         Don't check attach_flag.
13146         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13147         pass down a target_terminal_state.
13148         (child_terminal_save_inferior): New, factored out from ...
13149         (child_terminal_ours_1): ... this.  Handle
13150         target_terminal_state::is_ours_for_output.
13151         (child_interrupt, child_pass_ctrlc): New.
13152         (inflow_inferior_exit): Clear the inferior's terminal_state.
13153         (copy_terminal_info): Copy the inferior's terminal state.
13154         (_initialize_inflow): Remove reference to terminal_is_ours.
13155         * inflow.h (inferior_process_group): Delete.
13156         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13157         * procfs.c (procfs_target): Don't install procfs_interrupt.
13158         (procfs_interrupt): Delete.
13159         * remote.c (remote_serial_quit_handler): Adjust.
13160         (remote_interrupt): Remove ptid parameter.  Adjust.
13161         * target-delegates.c: Regenerate.
13162         * target.c: Include "terminal.h".
13163         (target_terminal::terminal_state): Rename to ...
13164         (target_terminal::m_terminal_state): ... this.
13165         (target_terminal::init): Adjust.
13166         (target_terminal::inferior): Adjust to per-inferior
13167         terminal_state.
13168         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13169         (target_terminal::ours, target_terminal::ours_for_output): Use
13170         target_terminal_is_ours_kind.
13171         (target_interrupt): Remove ptid parameter.  Adjust.
13172         (default_target_pass_ctrlc): Adjust.
13173         * target.h (target_ops::to_terminal_save_inferior): New field.
13174         (target_ops::to_interrupt): Remove ptid_t parameter.
13175         (target_interrupt): Remove ptid_t parameter.  Update comment.
13176         (target_pass_ctrlc): Update comment.
13177         * target/target.h (target_terminal_state): New scoped enum,
13178         factored out of ...
13179         (target_terminal::terminal_state): ... here.
13180         (target_terminal::inferior): Update comments.
13181         (target_terminal::restore_inferior): New.
13182         (target_terminal::is_inferior, target_terminal::is_ours)
13183         (target_terminal::is_ours_for_output): Adjust.
13184         (target_terminal::scoped_restore_terminal_state): Adjust to
13185         rename, and call restore_inferior() instead of inferior().
13186         (target_terminal::scoped_restore_terminal_state::m_state): Change
13187         type.
13188         (target_terminal::terminal_state): Rename to ...
13189         (target_terminal::m_terminal_state): ... this and change type.
13190
13191 2018-01-30  Pedro Alves  <palves@redhat.com>
13192
13193         * linux-nat.c (wait_for_signal): New function.
13194         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13195         directly.
13196         (async_terminal_is_ours)
13197         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13198         (linux_nat_add_target): Don't override
13199         to_terminal_inferior/to_terminal_ours.
13200
13201 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13202
13203         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13204
13205 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13206
13207         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13208         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13209         dwarf2_per_objfile_free here.
13210         (dwarf2_per_objfile_free): Remove.
13211         (_initialize_dwarf2_read): Don't register
13212         dwarf2_per_objfile_free as a registry cleanup.
13213
13214 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13215
13216         Avoid compilation errors in MinGW native builds
13217
13218         The error is triggered by including python-internal.h, and the
13219         error message is:
13220
13221              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13222                       from build-gnulib/import/math.h:27,
13223                       from d:/usr/Python26/include/pyport.h:235,
13224                       from d:/usr/Python26/include/Python.h:58,
13225                       from python/python-internal.h:94,
13226                       from python/py-arch.c:24:
13227              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13228         using ::hypot;
13229                 ^~~~~
13230
13231         This happens because Python headers define 'hypot' to expand t
13232         '_hypot' in the Windows builds.
13233         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13234         'hypoth'.  This avoids a compilation error.
13235
13236 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13237
13238         * MAINTAINERS (Write After Approval): Fix ordering.
13239
13240 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13241
13242         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13243
13244 2018-01-26  Alan Modra  <amodra@gmail.com>
13245
13246         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13247         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13248         Remove nop.  Make const.  Comment.
13249         (powerpc32_plt_stub_so_2): New.
13250         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13251         Correct count.  Update uses.
13252         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13253         Move common code reading PLT entry word.  Correct
13254         powerpc32_plt_stub PLT address calculation.
13255         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13256         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13257         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13258         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13259         (ppc64_standard_linkage8): Likewise.
13260         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13261         Correct insns description.
13262         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13263
13264 2018-01-24  Pedro Alves  <palves@redhat.com>
13265
13266         GCC PR libstdc++/83906
13267         * gdbtypes.c (operator==(const dynamic_prop &,
13268         const dynamic_prop &)): New.
13269         (operator==(const range_bounds &, const range_bounds &)): New.
13270         (check_types_equal): Use them instead of memcmp.
13271         * gdbtypes.h (operator==(const dynamic_prop &,
13272         const dynamic_prop &)): Declare.
13273         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13274         (operator==(const range_bounds &, const range_bounds &)): Declare.
13275         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13276
13277 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13278
13279         * s390-linux-tdep.c (s390_record_address_mask)
13280         (s390_record_calc_disp_common, s390_record_calc_disp)
13281         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13282         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13283         (s390_process_record): Move to s390-tdep.c.
13284         (s390_linux_init_abi_any): Adjust.
13285         * s390-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): Moved from s390-linux-tdep.c
13290         (s390_gdbarch_init): Adjust.
13291
13292 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13293
13294         * s390-linux-nat.c (s390-tdep.h): New include.
13295         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13296         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13297         (ALLDEPFILES): Add s390-tdep.c.
13298         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13299         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13300         * s390-tdep.h: ...this.  New file.
13301         * s390-linux-tdep.c (s390-tdep.h): New include.
13302         (_initialize_s390_tdep): Rename to...
13303         (_initialize_s390_linux_tdep): ...this and adjust.
13304         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13305         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13306         s390-tdep.h.
13307         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13308         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13309         (s390_is_partial_instruction, s390_software_single_step)
13310         (is_non_branch_ril, s390_displaced_step_copy_insn)
13311         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13312         (s390_prologue_data, s390_addr, s390_store, s390_load)
13313         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13314         (s390_register_call_saved, s390_guess_tracepoint_registers)
13315         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13316         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13317         (s390_pseudo_register_name, s390_pseudo_register_type)
13318         (s390_pseudo_register_read, s390_pseudo_register_write)
13319         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13320         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13321         (s390_addr_bits_remove, s390_address_class_type_flags)
13322         (s390_address_class_type_flags_to_name)
13323         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13324         (s390_function_arg_float, s390_function_arg_vector)
13325         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13326         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13327         (s390_frame_align, s390_register_return_value, s390_return_value)
13328         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13329         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13330         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13331         (s390_trad_frame_prev_register, s390_unwind_cache)
13332         (s390_prologue_frame_unwind_cache)
13333         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13334         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13335         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13336         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13337         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13338         (s390_frame_base_address, s390_local_base_address)
13339         (s390_frame_base, s390_gcc_target_options)
13340         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13341         (s390_validate_reg_range, s390_tdesc_valid)
13342         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13343         * s390-tdep.c: ...this.  New file.
13344
13345 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13346
13347         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13348         (s390_process_record, s390_gdbarch_tdep_alloc)
13349         (s390_linux_init_abi_any): Use/set new hook.
13350
13351 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13352
13353         * s390-linux-tdep.c (osabi.h): New include.
13354         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13355         (s390_linux_init_abi_any): New functions.
13356         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13357
13358 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13359
13360         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13361         tdesc_has_registers check
13362
13363 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13364
13365         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13366         (s390_validate_reg_range): New macro.
13367         (s390_gdbarch_init): Adjust.
13368
13369 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13370
13371         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13372         (s390_gdbarch_tdep_alloc): Adjust.
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) <have_linux_v1, have_linux_v2>
13378         <have_tdb>: Change type to bool.
13379         (s390_gdbarch_tdep_alloc): Adjust.
13380         (s390_gdbarch_init): Adjust.
13381
13382 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13383
13384         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13385         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13386         (s390_gdbarch_tdep_alloc): New function.
13387         (s390_gdbarch_init): Allocate tdep at start and use its fields
13388         instead of separate variables.
13389
13390 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13391
13392         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13393         when looking for cached gdbarch and add comment for remaining.
13394
13395 2018-01-22  Pedro Alves  <palves@redhat.com>
13396             Sergio Durigan Junior  <sergiodj@redhat.com>
13397
13398         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13399         case.
13400
13401 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13402
13403         * MAINTAINERS: Update my company e-mail address.
13404
13405 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13406
13407         * regcache.c (cooked_write_test): New function.
13408         (_initialize_regcache): Register the test.
13409
13410 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13411
13412         * ia64-tdep.c (ia64_pseudo_register_read): Call
13413         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13414         * m32c-tdep.c (m32c_cat_read): Likewise.
13415         (m32c_r3r2r1r0_read): Likewise.
13416         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13417         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13418
13419 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13420
13421         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13422         method raw_read instead of regcache_raw_read.
13423         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13424         * arm-tdep.c (arm_neon_quad_read): Likewise.
13425         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13426         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13427         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13428         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13429         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13430         (i386_pseudo_register_read_into_value): Likewise.
13431         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13432         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13433         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13434         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13435         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13436         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13437         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13438         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13439         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13440
13441 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13442
13443         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13444         * configure.tgt: Remove target mt.
13445         * mt-tdep.c: Remove.
13446         * regcache.c (cooked_read_test): Remove the check for mt.
13447
13448 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13449
13450         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13451         instead of gdbarch_pseudo_register_read_value.
13452
13453 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13454
13455         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13456         language is Ada.
13457
13458 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13459
13460         * linespec.c (create_sals_line_offset): Remove code that preserved
13461         the symtab_and_line's line number.
13462
13463 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13464
13465         * varobj.c (varobj_create): Don't set valid_block when creating a
13466         floating varobj.
13467
13468 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13469
13470         * varobj.c (varobj_create): Remove out of date comment.
13471
13472 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13473
13474         PR mi/20395
13475         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13476         updating innermost block.
13477         * parse.c (innermost_block_tracker::update): Take extra type
13478         parameter, and check types match before updating innermost block.
13479         (write_dollar_variable): Update innermost block for registers.
13480         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13481         (innermost_block_tracker::innermost_block_tracker): Initialise
13482         m_types member.
13483         (innermost_block_tracker::reset): Take type parameter.
13484         (innermost_block_tracker::update): Take type parameter, and pass
13485         type through as needed.
13486         (innermost_block_tracker::m_types): New member.
13487         * varobj.c (varobj_create): Pass type when reseting innermost
13488         block.
13489
13490 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13491
13492         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13493         * ada-lang.c (resolve_subexp): Likewise.
13494         * breakpoint.c (set_breakpoint_condition) Likewise.
13495         (watch_command_1) Likewise.
13496         * c-exp.y (variable): Likewise.
13497         * d-exp.y (PrimaryExpression): Likewise.
13498         * f-exp.y (variable): Likewise.
13499         * go-exp.y (variable): Likewise.
13500         * m2-exp.y (variable): Likewise.
13501         * objfiles.c (objfile::~objfile): Likewise.
13502         * p-exp.y (variable): Likewise.
13503         * parse.c (innermost_block): Change type.
13504         * parser-defs.h (class innermost_block_tracker): New.
13505         (innermost_block): Change to innermost_block_tracker.
13506         * printcmd.c (display_command): Switch to innermost_block API.
13507         (do_one_display): Likewise.
13508         * rust-exp.y (do_one_display): Likewise.
13509         * symfile.c (clear_symtab_users): Likewise.
13510         * varobj.c (varobj_create): Switch to innermost_block API, replace
13511         use of innermost_block with block stored on varobj object.
13512
13513 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13514
13515         * expression.h (innermost_block): Remove declaration.
13516         * varobj.c: Add 'parser-defs.h' include.
13517
13518 2018-01-19  Tom Tromey  <tom@tromey.com>
13519
13520         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13521         symbols in the static and global blocks.
13522
13523 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13524
13525         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13526         gdb_ptrace.h, and move including gdb_wait.h ...
13527         * nat/linux-ptrace.h: ... to here.
13528
13529 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13530
13531         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13532         inf_ptrace_detach_success.
13533         (inf_ptrace_detach_success): Add inferior parameter, use it
13534         instead of inferior_ptid, pass it to detach_inferior.
13535         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13536         parameter.
13537         * inferior.c (detach_inferior): Add overload that takes an
13538         inferior object.
13539         * inferior.h (detach_inferior): Likewise.
13540         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13541         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13542         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13543
13544 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13545
13546         * target.h (struct target_ops) <to_detach>: Add inferior
13547         parameter.
13548         (target_detach): Likewise.
13549         * target.c (dispose_inferior): Pass inferior down.
13550         (target_detach): Pass inferior down.  Assert that it is equal to
13551         the current inferior.
13552         * aix-thread.c (aix_thread_detach): Pass inferior down.
13553         * corefile.c (core_file_command): Pass current_inferior() down.
13554         * corelow.c (core_detach): Add inferior parameter.
13555         * darwin-nat.c (darwin_detach): Likewise.
13556         * gnu-nat.c (gnu_detach): Likewise.
13557         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13558         * infcmd.c (detach_command): Pass current_inferior() down to
13559         target_detach.
13560         * infrun.c (follow_fork_inferior): Pass parent_inf to
13561         target_detach.
13562         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13563         target_detach.
13564         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13565         * linux-thread-db.c (thread_db_detach): Likewise.
13566         * nto-procfs.c (procfs_detach): Likewise.
13567         * procfs.c (procfs_detach): Likewise.
13568         * record.c (record_detach): Likewise.
13569         * record.h (struct inferior): Forward-declare.
13570         (record_detach): Add inferior parameter.
13571         * remote-sim.c (gdbsim_detach): Likewise.
13572         * remote.c (remote_detach_1): Likewise.
13573         (remote_detach): Likewise.
13574         (extended_remote_detach): Likewise.
13575         * sol-thread.c (sol_thread_detach): Likewise.
13576         * target-debug.h (target_debug_print_inferior_p): New macro.
13577         * target-delegates.c: Re-generate.
13578         * top.c (kill_or_detach): Pass inferior down to target_detach.
13579         * windows-nat.c (windows_detach): Add inferior parameter.
13580
13581 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13582
13583         * target.h (struct target_ops) <to_detach>: Remove args
13584         parameter.
13585         (target_detach): Likewise.
13586         * target.c (dispose_inferior): Adjust.
13587         (target_detach): Remove args parameter, adjust.
13588         * aix-thread.c (aix_thread_detach): Adjust.
13589         * corefile.c (core_file_command): Adjust.
13590         * corelow.c (core_detach): Adjust.
13591         * darwin-nat.c (darwin_detach): Adjust.
13592         * gnu-nat.c (gnu_detach): Adjust.
13593         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13594         * infcmd.c (detach_command): Adjust
13595         * infrun.c (follow_fork_inferior): Adjust.
13596         (handle_vfork_child_exec_or_exit): Adjust.
13597         * linux-fork.c (linux_fork_detach): Remove args parameter.
13598         * linux-fork.h (linux_fork_detach): Likewise.
13599         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13600         * linux-thread-db.c (thread_db_detach): Likewise.
13601         * nto-procfs.c (procfs_detach): Likewise.
13602         * procfs.c (procfs_detach): Likewise.
13603         (do_detach): Remove signo parameter.
13604         * record.c (record_detach): Remove args parameter.
13605         * record.h (record_detach): Likewise.
13606         * remote-sim.c (gdbsim_detach): Likewise.
13607         * remote.c (remote_detach_1): Likewise.
13608         (remote_detach): Likewise.
13609         (extended_remote_detach): Likewise.
13610         * sol-thread.c (sol_thread_detach): Likewise.
13611         * target-delegates.c: Re-generate.
13612         * top.c (struct qt_args) <args>: Remove field.
13613         (kill_or_detach): Don't pass args.
13614         (quit_force): Don't set args.
13615         * windows-nat.c (windows_detach): Remove args parameter.
13616
13617 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13618
13619         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13620         (arm_linux_init_abi): Install it.
13621
13622 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13623
13624         * osabi.c (gdb_osabi_names): Extend the regexp for
13625         arm-linux-gnueabihf.
13626
13627 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13628
13629         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13630         m_abbrevs.
13631         (abbrev_table::add_abbrev): Update.
13632         (abbrev_table::lookup_abbrev): Update.
13633
13634 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13635
13636         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13637
13638 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13639
13640         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13641         to "std::string".
13642
13643 2018-01-17  Tom Tromey  <tom@tromey.com>
13644
13645         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13646
13647 2018-01-17  Tom Tromey  <tom@tromey.com>
13648
13649         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13650         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13651         (create_array_type_with_stride): Update.
13652         * dwarf2read.c (set_die_type): Update.
13653
13654 2018-01-17  Tom Tromey  <tom@tromey.com>
13655
13656         * dwarf2read.c (delayed_method_info): Remove typedef.
13657         (dwarf2_cu::method_info): Now a std::vector.
13658         (add_to_method_list): Update.
13659         (free_delayed_list): Remove.
13660         (compute_delayed_physnames): Update.
13661         (process_full_comp_unit, process_full_type_unit): Clear the method
13662         list.  Remove cleanups.
13663         (psymtab_include_file_name): Add name_holder parameter.  Use
13664         unique_xmalloc_ptr.
13665         (dwarf_decode_lines): Update.
13666
13667 2018-01-17  Tom Tromey  <tom@tromey.com>
13668             Simon Marchi  <simon.marchi@ericsson.com>
13669
13670         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13671         (dwarf2_per_objfile::free_cached_comp_units)
13672         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13673         (init_cutu_and_read_dies_no_follow): Update.
13674         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13675         (dwarf2_cu::~dwarf2_cu): New.
13676         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13677         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13678
13679 2018-01-17  Tom Tromey  <tom@tromey.com>
13680             Simon Marchi  <simon.marchi@ericsson.com>
13681
13682         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13683         (struct die_reader_specs) <abbrev_table>: New member.
13684         (struct abbrev_table): Add constructor.
13685         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13686         <abbrev_obstack>: Now an auto_obstack.
13687         (abbrev_table_up): New typedef.
13688         (init_cu_die_reader): Add abbrev_table parameter.
13689         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13690         Add result_dwo_abbrev_table.
13691         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13692         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13693         Update.
13694         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13695         parameter.
13696         (skip_children): Update.
13697         (abbrev_table::alloc_abbrev): Rename from
13698         abbrev_table_alloc_abbrev.
13699         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13700         (abbrev_table::lookup_abbrev): Rename from
13701         abbrev_table_lookup_abbrev.
13702         (abbrev_table_read_table): Return abbrev_table_up.
13703         (abbrev_table_free, abbrev_table_free_cleanup)
13704         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13705         (load_partial_dies): Update.
13706
13707 2018-01-17  Tom Tromey  <tom@tromey.com>
13708
13709         * dwarf2read.c (dwarf2_compute_name): Update comment.
13710         (read_func_scope, read_variable): Update.
13711         (new_symbol): Remove.
13712         (new_symbol_full): Rename to new_symbol.
13713
13714 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13715
13716         PR gdb/16577
13717         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13718         a warning instead of throwing an error, set section size to 0 and return
13719         NULL.
13720         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13721
13722 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13723
13724         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13725         std::string.
13726         (linux_ptrace_attach_fail_reason_string): Likewise.
13727         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13728         Likewise.
13729         (linux_ptrace_attach_fail_reason_string): Likewise.
13730         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13731
13732 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13733
13734         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13735
13736 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13737
13738         PR gdb/21559
13739         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13740         checking for fs_base/gs_base fields in struct user_regs_struct.
13741         * configure: Regenerate.
13742
13743 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13744
13745         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13746         function.
13747         (aarch64_linux_init_abi): Install it to gdbarch hook
13748         gcc_target_options.
13749
13750 2018-01-15  Pedro Alves  <palves@redhat.com>
13751
13752         * common/signals-state-save-restore.c
13753         (save_original_signals_state): Fix typos.
13754
13755 2017-01-12  Tom Tromey  <tom@tromey.com>
13756             Sergio Durigan Junior  <sergiodj@redhat.com>
13757
13758         * Makefile.in (install-only): Install gdb-add-index.
13759
13760 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13761
13762         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13763
13764 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13765
13766         * infrun.c (keep_going_pass_signal): Clear step-over info when
13767         insert_breakpoints fails.
13768
13769 2018-01-11  Pedro Alves  <palves@redhat.com>
13770
13771         PR gdb/22583
13772         * infrun.c (resume): Rename to ...
13773         (resume_1): ... this.
13774         (resume): Reimplement as wrapper around resume_1.
13775
13776 2018-01-11  Pedro Alves  <palves@redhat.com>
13777
13778         PR remote/22597
13779         * remote.c (remote_parse_stop_reply): Default to the last-set
13780         general thread instead of to 'magic_null_ptid'.
13781
13782 2018-01-10  Pedro Alves  <palves@redhat.com>
13783
13784         * language.h (language_get_symbol_name_matcher): Rename ...
13785         (get_symbol_name_matcher): ... this.
13786         * language.c (language_get_symbol_name_matcher): Ditto.
13787         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13788         callers adjusted.
13789
13790 2018-01-10  Pedro Alves  <palves@redhat.com>
13791
13792         PR gdb/22670
13793         * dwarf2read.c
13794         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13795         Adjust to use language_get_symbol_name_matcher instead of
13796         language_defn::la_get_symbol_name_matcher.
13797         * language.c (language_get_symbol_name_matcher): If in Ada mode
13798         and the lookup name is a verbatim match, return Ada's matcher.
13799         * language.h (language_get_symbol_name_matcher): Adjust comment.
13800         (ada_lookup_name_info::verbatim_p):: New method.
13801
13802 2018-01-10  Pedro Alves  <palves@redhat.com>
13803
13804         PR gdb/22670
13805         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13806         minsym's language is language_auto or language_cplus, pass down
13807         language_ada instead.
13808         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13809
13810 2018-01-10  Pedro Alves  <palves@redhat.com>
13811
13812         PR gdb/22670
13813         * minsyms.c (linkage_name_str): New function.
13814         (iterate_over_minimal_symbols): Use it.
13815
13816 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13817
13818         * NEWS: Document that 'info proc' now works on FreeBSD.
13819
13820 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13821
13822         * configure.ac: Check for kinfo_getfile in libutil.
13823         * configure: Regenerate.
13824         * config.in: Regenerate.
13825         * fbsd-nat.c: Include "fbsd-tdep.h".
13826         (fbsd_fetch_cmdline): New.
13827         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13828         rather than calling error.
13829         (fbsd_info_proc): New.
13830         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13831         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13832         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13833
13834 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13835
13836         * fbsd-nat.c (struct free_deleter): Remove.
13837         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13838
13839 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13840
13841         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13842         NULL for an empty pathname.
13843
13844 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13845
13846         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13847         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13848         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13849         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13850         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13851         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13852         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13853         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13854         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13855         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13856         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13857         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13858         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13859         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13860         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13861
13862 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13863
13864         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13865         (gnu_xfer_auxv): New function.
13866         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13867         TARGET_OBJECT_AUXV.
13868
13869 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13870             Simon Marchi  <simon.marchi@ericsson.com>
13871
13872         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13873         common/selftest.c.
13874         (COMMON_OBS): Remove selftest.o.
13875         * configure.ac: Append selftest-arch.c and common/selftest.c to
13876         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13877         * configure: Re-generated.
13878         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13879         GDB_SELF_TEST.
13880         (maintenance_info_selftests): Likewise.
13881
13882 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13883
13884         * ada-valprint.c (val_print_packed_array_elements): Use
13885         proper number of elements when printing an array indexed
13886         by an enumeration type.
13887
13888 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13889
13890         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13891         (dw2_get_file_names_reader): Adjust.
13892         (lookup_dwo_signatured_type): Adjust.
13893         (lookup_dwp_signatured_type): Adjust.
13894         (lookup_signatured_type): Adjust.
13895         (create_type_unit_group): Adjust.
13896         (get_type_unit_group): Adjust.
13897         (process_psymtab_comp_unit_reader): Adjust.
13898         (build_type_psymtabs_reader): Adjust.
13899         (scan_partial_symbols): Adjust.
13900         (add_partial_symbol): Adjust.
13901         (add_partial_subprogram): Adjust.
13902         (peek_die_abbrev): Adjust.
13903         (fixup_go_packaging): Adjust.
13904         (process_imported_unit_die): Adjust.
13905         (dwarf2_compute_name): Adjust.
13906         (dwarf2_physname): Adjust.
13907         (read_import_statement): Adjust.
13908         (handle_DW_AT_stmt_list): Adjust.
13909         (read_file_scope): Adjust.
13910         (read_func_scope): Adjust.
13911         (read_lexical_block_scope): Adjust.
13912         (read_call_site_scope): Adjust.
13913         (read_variable): Adjust.
13914         (dwarf2_rnglists_process): Adjust.
13915         (dwarf2_ranges_process): Adjust.
13916         (dwarf2_ranges_read): Adjust.
13917         (dwarf2_get_pc_bounds): Adjust.
13918         (dwarf2_record_block_ranges): Adjust.
13919         (dwarf2_add_field): Adjust.
13920         (dwarf2_add_member_fn): Adjust.
13921         (read_structure_type): Adjust.
13922         (process_structure_scope): Adjust.
13923         (read_enumeration_type): Adjust.
13924         (read_array_type): Adjust.
13925         (mark_common_block_symbol_computed): Adjust.
13926         (read_common_block): Adjust.
13927         (read_namespace_type): Adjust.
13928         (read_namespace): Adjust.
13929         (read_module_type): Adjust.
13930         (read_tag_pointer_type): Adjust.
13931         (read_tag_ptr_to_member_type): Adjust.
13932         (read_tag_string_type): Adjust.
13933         (read_subroutine_type): Adjust.
13934         (read_typedef): Adjust.
13935         (read_base_type): Adjust.
13936         (attr_to_dynamic_prop): Adjust.
13937         (read_subrange_type): Adjust.
13938         (read_unspecified_type): Adjust.
13939         (dwarf2_read_abbrevs): Adjust.
13940         (load_partial_dies): Adjust.
13941         (read_partial_die): Adjust.
13942         (find_partial_die): Adjust.
13943         (guess_partial_die_structure_name): Adjust.
13944         (fixup_partial_die): Adjust.
13945         (read_attribute_value): Adjust.
13946         (read_addr_index): Adjust.
13947         (read_addr_index_from_leb128): Adjust.
13948         (read_str_index): Adjust.
13949         (dwarf2_string_attr): Adjust.
13950         (get_debug_line_section): Adjust.
13951         (dwarf_decode_line_header): Adjust.
13952         (lnp_state_machine::check_line_address): Adjust.
13953         (dwarf_decode_lines_1): Adjust.
13954         (dwarf_decode_lines): Adjust.
13955         (dwarf2_start_symtab): Adjust.
13956         (var_decode_location): Adjust.
13957         (new_symbol_full): Adjust.
13958         (dwarf2_const_value_data): Adjust.
13959         (dwarf2_const_value_attr): Adjust.
13960         (dwarf2_const_value): Adjust.
13961         (die_type): Adjust.
13962         (die_containing_type): Adjust.
13963         (build_error_marker_type): Adjust.
13964         (lookup_die_type): Adjust.
13965         (guess_full_die_structure_name): Adjust.
13966         (anonymous_struct_prefix): Adjust.
13967         (determine_prefix): Adjust.
13968         (dwarf2_name): Adjust.
13969         (follow_die_ref_or_sig): Adjust.
13970         (follow_die_offset): Adjust.
13971         (follow_die_ref): Adjust.
13972         (follow_die_sig_1): Adjust.
13973         (follow_die_sig): Adjust.
13974         (get_signatured_type): Adjust.
13975         (get_DW_AT_signature_type): Adjust.
13976         (decode_locdesc): Adjust.
13977         (dwarf_decode_macros): Adjust.
13978         (cu_debug_loc_section): Adjust.
13979         (fill_in_loclist_baton): Adjust.
13980         (dwarf2_symbol_mark_computed): Adjust.
13981         (init_one_comp_unit): Don't assign
13982         dwarf2_cu::dwarf2_per_objfile.
13983         (set_die_type): Adjust.
13984
13985 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13986
13987         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13988         <dwarf2_per_objfile>: New field.
13989         (dwarf2_per_objfile): Remove global.
13990         (get_dwarf2_per_objfile): New function.
13991         (set_dwarf2_per_objfile): New function.
13992         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13993         dwarf2_per_objfile.
13994         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13995         (read_abbrev_offset): Likewise.
13996         (read_indirect_string): Likewise.
13997         (read_indirect_line_string): Likewise.
13998         (read_indirect_string_at_offset): Likewise.
13999         (read_indirect_string_from_dwz): Likewise.
14000         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14001         dwarf2_per_objfile.
14002         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14003         (create_all_comp_units): Change objfile parameter to
14004         dwarf2_per_objfile.
14005         (create_all_type_units): Likewise.
14006         (process_queue): Add dwarf2_per_objfile parameter.
14007         (read_and_check_comp_unit_head): Likewise.
14008         (lookup_dwo_unit_in_dwp): Likewise.
14009         (get_dwp_file): Likewise.
14010         (process_cu_includes): Likewise.
14011         (struct free_dwo_file_cleanup_data): New struct.
14012         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14013         set_dwarf2_per_objfile.
14014         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14015         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14016         context, adjust calls.
14017         (dw2_instantiate_symtab): Likewise.
14018         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14019         (dw2_get_cu): Likewise.
14020         (create_cu_from_index_list): Change objfile parameter to
14021         dwarf2_per_objfile.
14022         (create_cus_from_index_list): Get dwarf2_per_objfile from
14023         context, adjust calls.
14024         (create_cus_from_index): Likewise.
14025         (create_signatured_type_table_from_index): Change objfile
14026         parameter to dwarf2_per_objfile.
14027         (create_signatured_type_table_from_debug_names): Change objfile
14028         parameter to dwarf2_per_objfile.
14029         (create_addrmap_from_index): Likewise.
14030         (create_addrmap_from_aranges): Likewise.
14031         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14032         (dw2_setup): Remove.
14033         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14034         context.
14035         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14036         get_dwarf2_per_objfile.
14037         (dw2_forget_cached_source_info): Likewise.
14038         (dw2_map_symtabs_matching_filename): Likewise.
14039         (struct dw2_symtab_iterator) <index>: Remove.
14040         <dwarf2_per_objfile>: New field.
14041         (dw2_symtab_iter_init): Replace index parameter with
14042         dwarf2_per_objfile.
14043         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14044         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14045         (dw2_print_stats): Likewise.
14046         (dw2_dump): Likewise.
14047         (dw2_expand_symtabs_for_function): Likewise.
14048         (dw2_expand_all_symtabs): Likewise.
14049         (dw2_expand_symtabs_with_fullname): Likewise.
14050         (dw2_expand_marked_cus): Replace index and objfile parameters
14051         with dwarf2_per_objfile.
14052         (dw_expand_symtabs_matching_file_matcher): Add
14053         dwarf2_per_objfile parameter and adjust calls.
14054         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14055         adjust calls.
14056         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14057         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14058         adjust calls.
14059         (create_cus_from_debug_names_list): Replace objfile parameter
14060         with dwarf2_per_objfile and adjust calls.
14061         (create_cus_from_debug_names): Likewise.
14062         (dwarf2_read_debug_names): Likewise.
14063         (mapped_debug_names::namei_to_name): Adjust call.
14064         (dw2_debug_names_iterator::next): Likewise.
14065         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14066         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14067         (dw2_debug_names_dump): Likewise.
14068         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14069         (dw2_debug_names_expand_symtabs_matching): Likewise.
14070         (dwarf2_initialize_objfile): Likewise.
14071         (dwarf2_build_psymtabs): Likewise.
14072         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14073         this_cu.
14074         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14075         (read_and_check_comp_unit_head): Likewise.
14076         (read_abbrev_offset): Likewise.
14077         (create_debug_type_hash_table): Likewise.
14078         (create_debug_types_hash_table): Likewise.
14079         (create_all_type_units): Replace objfile parameter with
14080         dwarf2_per_objfile.
14081         (add_type_unit): Add dwarf2_per_objfile parameter.
14082         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14083         with dwarf2_per_objfile.
14084         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14085         (lookup_dwp_signatured_type): Likewise.
14086         (lookup_signatured_type): Likewise.
14087         (read_cutu_die_from_dwo): Likewise.
14088         (init_tu_and_read_dwo_dies): Likewise.
14089         (init_cutu_and_read_dies): Likewise.
14090         (init_cutu_and_read_dies_no_follow): Likewise.
14091         (allocate_type_unit_groups_table): Add objfile parameter.
14092         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14093         (get_type_unit_group): Likewise.
14094         (process_psymtab_comp_unit): Update call.
14095         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14096         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14097         (print_tu_stats): Likewise.
14098         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14099         in void* parameter.
14100         (build_type_psymtabs): Change objfile parameter to
14101         dwarf2_per_objfile.
14102         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14103         passed in void* parameter.
14104         (process_skeletonless_type_units): Change objfile parameter to
14105         dwarf2_per_objfile.
14106         (set_partial_user): Likewise.
14107         (dwarf2_build_psymtabs_hard): Likewise.
14108         (read_comp_units_from_section): Likewise.
14109         (create_all_comp_units): Likewise.
14110         (scan_partial_symbols): Update calls.
14111         (add_partial_symbol): Likewise.
14112         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14113         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14114         (process_queue): Add dwarf2_per_objfile parameter.
14115         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14116         (compute_compunit_symtab_includes): Likewise.
14117         (process_cu_includes): Add dwarf2_per_objfile parameter.
14118         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14119         (process_full_type_unit): Likewise.
14120         (process_imported_unit_die): Update call.
14121         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14122         (read_file_scope): Likewise.
14123         (allocate_dwo_file_hash_table): Add objfile parameter.
14124         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14125         (create_cus_hash_table): Likewise.
14126         (create_dwp_hash_table): Likewise.
14127         (create_dwo_unit_in_dwp_v1): Likewise.
14128         (create_dwp_v2_section): Likewise.
14129         (create_dwo_unit_in_dwp_v2): Likewise.
14130         (lookup_dwo_unit_in_dwp): Likewise.
14131         (try_open_dwop_file): Likewise.
14132         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14133         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14134         cleanup to include a reference to dwarf2_per_objfile.
14135         (open_dwp_file): Add dwarf2_per_objfile parameter.
14136         (open_and_init_dwp_file): Likewise.
14137         (get_dwp_file): Likewise.
14138         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14139         (queue_and_load_all_dwo_tus): Update call.
14140         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14141         data.
14142         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14143         (dwarf2_ranges_process): Likewise.
14144         (dwarf2_get_pc_bounds): Likewise.
14145         (mark_common_block_symbol_computed): Likewise.
14146         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14147         (dwarf2_read_abbrevs): Update call.
14148         (read_partial_die): Use dwarf2_per_objfile from cu.
14149         (find_partial_die): Likewise.
14150         (fixup_partial_die): Likewise.
14151         (read_attribute_value): Likewise.
14152         (read_indirect_string_at_offset_from): Add objfile parameter.
14153         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14154         parameter.
14155         (read_indirect_string_from_dwz): Add objfile parameter.
14156         (read_indirect_string): Add objfile parameter.
14157         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14158         (read_addr_index): Use dwarf2_per_objfile from cu.
14159         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14160         call dw2_setup.
14161         (read_str_index): Use dwarf2_per_objfile from cu.
14162         (get_debug_line_section): Likewise.
14163         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14164         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14165         (new_symbol_full): Use dwarf2_per_objfile from cu.
14166         (build_error_marker_type): Likewise.
14167         (lookup_die_type): Likewise.
14168         (determine_prefix): Likewise.
14169         (follow_die_offset): Likewise.
14170         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14171         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14172         (dwarf2_fetch_die_type_sect_off): Likewise.
14173         (dwarf2_get_die_type): Likewise.
14174         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14175         (get_signatured_type): Likewise.
14176         (get_DW_AT_signature_type): Likewise.
14177         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14178         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14179         (cu_debug_loc_section): Likewise.
14180         (fill_in_loclist_baton): Likewise.
14181         (dwarf2_symbol_mark_computed): Likewise.
14182         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14183         dwarf2_per_objfile.
14184         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14185         parameter.
14186         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14187         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14188         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14189         (set_die_type): Use dwarf2_free_objfile from cu.
14190         (get_die_type_at_offset): Likewise.
14191         (dwarf2_per_objfile_free): Don't assign global variable.
14192         (debug_names) <constructor>: Add dwarf2_per_objfile
14193         parameter, update m_debugstrlookup construction.
14194         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14195         parameter.
14196         <m_dwarf2_per_objfile>: New field.
14197         <lookup>: Use m_dwarf2_per_objfile.
14198         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14199         (psyms_seen_size): Likewise.
14200         (write_gdbindex): Replace objfile parameter with
14201         dwarf2_per_objfile.
14202         (write_debug_names): Likewise.
14203         (write_psymtabs_to_index): Likewise.
14204         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14205         calls.
14206
14207 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14208
14209         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14210         <dwarf2_per_objfile>: New field.
14211         (struct dwarf2_per_cu_data) <objfile>: Remove.
14212         <dwarf2_per_objfile>: New field.
14213         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14214         of objfile.
14215         (create_signatured_type_table_from_index): Likewise.
14216         (create_debug_type_hash_table): Likewise.
14217         (fill_in_sig_entry_from_dwo_entry): Likewise.
14218         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14219         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14220         objfile.
14221         (create_partial_symtab): Access objfile through
14222         dwarf2_per_objfile.
14223         (process_psymtab_comp_unit_reader): Likewise.
14224         (read_comp_units_from_section): Likewise.
14225         (scan_partial_symbols): Likewise.
14226         (add_partial_symbol): Likewise.
14227         (add_partial_subprogram): Likewise.
14228         (peek_die_abbrev): Likewise.
14229         (fixup_go_packaging): Likewise.
14230         (process_full_comp_unit): Likewise.
14231         (process_full_type_unit): Likewise.
14232         (process_imported_unit_die): Likewise.
14233         (dwarf2_compute_name): Likewise.
14234         (dwarf2_physname): Likewise.
14235         (read_import_statement): Likewise.
14236         (create_cus_hash_table): Assign dwarf2_physname instead of
14237         objfile.
14238         (read_func_scope): Access objfile through dwarf2_per_objfile.
14239         (read_lexical_block_scope): Likewise.
14240         (read_call_site_scope): Likewise.
14241         (read_variable): Likewise.
14242         (dwarf2_rnglists_process): Likewise.
14243         (dwarf2_ranges_process): Likewise.
14244         (dwarf2_ranges_read): Likewise.
14245         (dwarf2_record_block_ranges): Likewise.
14246         (dwarf2_add_field): Likewise.
14247         (dwarf2_add_member_fn): Likewise.
14248         (read_structure_type): Likewise.
14249         (process_structure_scope): Likewise.
14250         (read_enumeration_type): Likewise.
14251         (read_array_type): Likewise.
14252         (read_common_block): Likewise.
14253         (read_namespace_type): Likewise.
14254         (read_namespace): Likewise.
14255         (read_module_type): Likewise.
14256         (read_tag_pointer_type): Likewise.
14257         (read_tag_ptr_to_member_type): Likewise.
14258         (read_tag_string_type): Likewise.
14259         (read_subroutine_type): Likewise.
14260         (read_typedef): Likewise.
14261         (read_base_type): Likewise.
14262         (attr_to_dynamic_prop): Likewise.
14263         (read_subrange_type): Likewise.
14264         (read_unspecified_type): Likewise.
14265         (load_partial_dies): Likewise.
14266         (read_partial_die): Likewise.
14267         (find_partial_die): Likewise.
14268         (guess_partial_die_structure_name): Likewise.
14269         (fixup_partial_die): Likewise.
14270         (read_attribute_value): Likewise.
14271         (read_addr_index_from_leb128): Likewise.
14272         (dwarf2_read_addr_index): Likewise.
14273         (dwarf2_string_attr): Likewise.
14274         (lnp_state_machine::check_line_address): Likewise.
14275         (dwarf_decode_lines_1): Likewise.
14276         (dwarf_decode_lines): Likewise.
14277         (dwarf2_start_symtab): Likewise.
14278         (var_decode_location): Likewise.
14279         (new_symbol_full): Likewise.
14280         (dwarf2_const_value_data): Likewise.
14281         (dwarf2_const_value_attr): Likewise.
14282         (dwarf2_const_value): Likewise.
14283         (die_type): Likewise.
14284         (die_containing_type): Likewise.
14285         (lookup_die_type): Likewise.
14286         (guess_full_die_structure_name): Likewise.
14287         (anonymous_struct_prefix): Likewise.
14288         (dwarf2_name): Likewise.
14289         (follow_die_ref_or_sig): Likewise.
14290         (follow_die_offset): Likewise.
14291         (follow_die_ref): Likewise.
14292         (dwarf2_fetch_die_loc_sect_off): Likewise.
14293         (dwarf2_fetch_constant_bytes): Likewise.
14294         (dwarf2_fetch_die_type_sect_off): Likewise.
14295         (dwarf2_get_die_type): Likewise.
14296         (follow_die_sig): Likewise.
14297         (decode_locdesc): Likewise.
14298         (dwarf2_per_cu_objfile): Likewise.
14299         (dwarf2_per_cu_text_offset): Likewise.
14300         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14301         objfile.
14302         (set_die_type): Access objfile through
14303         dwarf2_per_objfile.
14304
14305 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14306
14307         * valprint.c (converted_character_d): Remove typedef.
14308         (DEF_VEC_O (converted_character_d)): Remove.
14309         (count_next_character): Use std::vector.
14310         (print_converted_chars_to_obstack): Likewise.
14311         (generic_printstr): Likewise.
14312
14313 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14314
14315         * xml-support.h (struct gdb_xml_value): Add constructor.
14316         <value>: Change type to unique_xmalloc_ptr.
14317         (gdb_xml_value_s): Remove typedef.
14318         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14319         (gdb_xml_element_start_handler): Change parameter type to
14320         std::vector.
14321         (xml_find_attribute): Likewise.
14322         * xml-support.c (xml_find_attribute): Change parameter type to
14323         std::vector and adjust.
14324         (gdb_xml_values_cleanup): Remove.
14325         (gdb_xml_parser::start_element): Adjust to std::vector.
14326         (xinclude_start_include): Change paraeter type to std::vector
14327         and adjust.
14328         * btrace.c (check_xml_btrace_version): Likewise.
14329         (parse_xml_btrace_block): Likewise.
14330         (parse_xml_btrace_pt_config_cpu): Likewise.
14331         (parse_xml_btrace_pt): Likewise.
14332         (parse_xml_btrace_conf_bts): Likewise.
14333         (parse_xml_btrace_conf_pt): Likewise.
14334         * memory-map.c (memory_map_start_memory): Likewise.
14335         (memory_map_start_property): Likewise.
14336         * osdata.c (osdata_start_osdata): Likewise.
14337         (osdata_start_item): Likewise.
14338         (osdata_start_column): Likewise.
14339         * remote.c (start_thread): Likewise.
14340         * solib-aix.c (library_list_start_library): Likewise.
14341         (library_list_start_list): Likewise.
14342         * solib-svr4.c (library_list_start_library): Likewise.
14343         (svr4_library_list_start_list): Likewise.
14344         * solib-target.c (library_list_start_segment): Likewise.
14345         (library_list_start_section): Likewise.
14346         (library_list_start_library): Likewise.
14347         (library_list_start_list): Likewise.
14348         * tracepoint.c (traceframe_info_start_memory): Likewise.
14349         (traceframe_info_start_tvar): Likewise.
14350         * xml-syscall.c (syscall_start_syscall): Likewise.
14351         * xml-tdesc.c (tdesc_start_target): Likewise.
14352         (tdesc_start_feature): Likewise.
14353         (tdesc_start_reg): Likewise.
14354         (tdesc_start_union): Likewise.
14355         (tdesc_start_struct): Likewise.
14356         (tdesc_start_flags): Likewise.
14357         (tdesc_start_enum): Likewise.
14358         (tdesc_start_field): Likewise.
14359         (tdesc_start_enum_value): Likewise.
14360         (tdesc_start_vector): Likewise.
14361
14362 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14363
14364         * extension.h (struct xmethod_worker) <clone>: Remove.
14365         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14366         Remove.
14367         (python_xmethod_worker::clone): Remove.
14368         * valops.c (find_overload_match): Use std::move instead of
14369         clone.
14370
14371 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14372
14373         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14374         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14375         <free_xmethod_worker_data>: Remove.
14376         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14377         <get_xmethod_arg_types>: Remove.
14378         <get_xmethod_result_type>: Remove.
14379         <invoke_xmethod>: Remove.
14380         * extension.c (new_xmethod_worker): Remove.
14381         (clone_xmethod_worker): Remove.
14382         (get_matching_xmethod_workers): Return void, pass std::vector by
14383         pointer.
14384         (get_xmethod_arg_types): Rename to...
14385         (xmethod_worker::get_arg_types): ... this, and adjust.
14386         (get_xmethod_result_type): Rename to...
14387         (xmethod_worker::get_result_type): ... this, and adjust.
14388         (invoke_xmethod): Remove.
14389         (free_xmethod_worker): Remove.
14390         (free_xmethod_worker_vec): Remove.
14391         * extension.h (enum ext_lang_rc): Move here from
14392         extension-priv.h.
14393         (struct xmethod_worker): Add constructor and destructor.
14394         <data>: Remove.
14395         <value>: Remove.
14396         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14397         virtual pure methods.
14398         <get_arg_types, get_result_type>: New methods.
14399         (xmethod_worker_ptr): Remove typedef.
14400         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14401         (xmethod_worker_vec): Remove typedef.
14402         (xmethod_worker_up): New typedef.
14403         (invoke_xmethod): Remove.
14404         (clone_xmethod_worker): Remove.
14405         (free_xmethod_worker): Remove.
14406         (free_xmethod_worker_vec): Remove.
14407         (get_xmethod_arg_types): Remove.
14408         (get_xmethod_result_type): Remove.
14409         * valops.c (find_method_list): Use std::vector, don't use
14410         intermediate vector.
14411         (value_find_oload_method_list): Use std::vector.
14412         (find_overload_match): Use std::vector.
14413         (find_oload_champ): Use std::vector.
14414         * value.c (value_free): Use operator delete.
14415         (value_of_xmethod): Rename to...
14416         (value_from_xmethod): ... this.  Don't assign
14417         xmethod_worker::value, take rvalue-reference.
14418         (result_type_of_xmethod): Adjust.
14419         (call_xmethod): Adjust.
14420         * value.h: Include extension.h.
14421         (struct xmethod_worker): Don't forward-declare.
14422         (value_of_xmethod): Rename to...
14423         (value_from_xmethod): ... this, take rvalue-reference.
14424         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14425         (struct python_xmethod_worker): ... this, add constructor and
14426         destructor.
14427         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14428         (gdbpy_free_xmethod_worker_data): Rename to...
14429         (python_xmethod_worker::~python_xmethod_worker): ... this and
14430         adjust.
14431         (gdbpy_clone_xmethod_worker_data): Rename to...
14432         (python_xmethod_worker::clone): ... this and adjust.
14433         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14434         temporary vector.
14435         (gdbpy_get_xmethod_arg_types): Rename to...
14436         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14437         (gdbpy_get_xmethod_result_type): Rename to...
14438         (python_xmethod_worker::do_get_result_type): ... this and
14439         adjust.
14440         (gdbpy_invoke_xmethod): Rename to...
14441         (python_xmethod_worker::invoke): ... this and adjust.
14442         (new_python_xmethod_worker): Rename to...
14443         (python_xmethod_worker::python_xmethod_worker): ... this and
14444         adjust.
14445         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14446         Remove.
14447         (gdbpy_free_xmethod_worker_data): Remove.
14448         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14449         (gdbpy_get_xmethod_arg_types): Remove.
14450         (gdbpy_get_xmethod_result_type): Remove.
14451         (gdbpy_invoke_xmethod): Remove.
14452         * python/python.c (python_extension_ops): Remove obsolete
14453         callbacks.
14454
14455 2018-01-05  Pedro Alves  <palves@redhat.com>
14456
14457         PR gdb/18653
14458         * common/signals-state-save-restore.c
14459         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14460         find a custom handler preinstalled, instead of internal erroring.
14461         But only warn if !quiet.
14462         * common/signals-state-save-restore.h
14463         (save_original_signals_state): New parameter 'quiet'.
14464         * main.c (captured_main_1): Move save_original_signals_state call
14465         after option handling, and pass QUIET.
14466
14467 2018-01-05  Pedro Alves  <palves@redhat.com>
14468
14469         * spu-tdep.c (spu_catch_start): Pass
14470         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14471
14472 2018-01-05  Pedro Alves  <palves@redhat.com>
14473
14474         PR gdb/22670
14475         * ada-lang.c (literal_symbol_name_matcher): New function.
14476         (ada_get_symbol_name_matcher): Use it for
14477         symbol_name_match_type::SEARCH_NAME.
14478         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14479         it down instead of assuming symbol_name_match_type::FULL.
14480         * block.h (block_lookup_symbol): New parameter 'match_type'.
14481         * c-valprint.c (print_unpacked_pointer): Use
14482         lookup_symbol_search_name instead of lookup_symbol.
14483         * compile/compile-object-load.c (get_out_value_type): Pass down
14484         symbol_name_match_type::SEARCH_NAME.
14485         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14486         symbol_name_match_type::FULL.
14487         * cp-support.c (cp_get_symbol_name_matcher): Handle
14488         symbol_name_match_type::SEARCH_NAME.
14489         * infrun.c (insert_exception_resume_breakpoint): Use
14490         lookup_symbol_search_name.
14491         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14492         * psymtab.c (maintenance_check_psymtabs): Use
14493         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14494         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14495         SYMBOL_SEARCH_NAME.
14496         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14497         if symbol_name_match_type::SEARCH_NAME.
14498         (lookup_symbol_in_language): Pass down
14499         symbol_name_match_type::FULL.
14500         (lookup_symbol_search_name): New.
14501         (lookup_language_this): Pass down
14502         symbol_name_match_type::SEARCH_NAME.
14503         (lookup_symbol_aux, lookup_local_symbol): New parameter
14504         'match_type'.  Pass it down.
14505         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14506         (lookup_symbol_search_name): New declaration.
14507         (lookup_symbol_in_block): New 'match_type' parameter.
14508
14509 2018-01-05  Pedro Alves  <palves@redhat.com>
14510
14511         PR gdb/22670
14512         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14513         ada_lookup_symbol.
14514         (ada_lookup_symbol): Reimplement in terms of
14515         ada_lookup_symbol_list, bits factored out from
14516         ada_lookup_encoded_symbol.
14517
14518 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14519
14520         * ada-exp.y (write_object_renaming): When subscripting an array
14521         using a symbol as the index, pass the block in call to
14522         ada_lookup_encoded_symbol when looking that symbol up.
14523
14524 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14525
14526         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14527         TYPE_INDEX_TYPE.
14528
14529 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14530
14531         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14532         the case where VALUE_LVAL (val0) is not lval_memory.
14533
14534 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14535
14536         * ada-valprint.c (print_optional_low_bound): Handle
14537         character-indexed array printing like boolean-indexed array
14538         printing.
14539
14540 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14541
14542         * NEWS: Create a new section for the next release branch.
14543         Rename the section of the current branch, now that it has
14544         been cut.
14545
14546 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14547
14548         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14549         * version.in: Bump version to 8.1.50.DATE-git.
14550
14551 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14552
14553         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14554         Add field.
14555         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14556         Add field.
14557         (default_exception_support_info) <catch_handlers_sym>: Add field.
14558         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14559         (ada_exception_name_addr_1): Add "catch handlers" handling.
14560         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14561         Update all callers.
14562         (create_excep_cond_exprs) <ex>: Add parameter.
14563         (re_set_exception): Update create_excep_cond_exprs call.
14564         (print_it_exception, print_one_exception, print_mention_exception)
14565         (print_recreate_exception): Add "catch handler" handling.
14566         (allocate_location_catch_handlers, re_set_catch_handlers)
14567         (check_status_catch_handlers, print_it_catch_handlers)
14568         (print_one_catch_handlers, print_mention_catch_handlers)
14569         (print_recreate_catch_handlers): New function.
14570         (catch_handlers_breakpoint_ops): New variable.
14571         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14572         Add parameter.  Add "catch handler" handling.
14573         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14574         Add "catch handler" handling.
14575         (ada_exception_catchpoint_cond_string): Add "catch handler"
14576         handling.
14577         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14578         call.
14579         (catch_ada_handlers_command): New function.
14580         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14581         operations structure.
14582         (_initialize_ada_language): Add "catch handlers" command entry.
14583         * NEWS: Document "catch handlers" feature.
14584
14585 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14586
14587         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14588         account when creating the array type of the slice.
14589         (ada_value_slice): Likewise.
14590
14591 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14592
14593         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14594         New enum value.
14595         (create_array_type_with_stride): Add byte_stride_prop parameter.
14596         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14597         New parameter.  Update all callers in this file.
14598         (array_type_has_dynamic_stride): New function.
14599         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14600         of arrays with dynamic byte strides.
14601         * dwarf2read.c (read_array_type): Add support for dynamic
14602         DW_AT_byte_stride attributes.
14603
14604 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14605
14606         * dwarf2read.c (read_unspecified_type): Treat
14607         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14608
14609 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14610
14611         Update copyright year range in all GDB files.
14612
14613 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14614
14615         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14616         and gdb/testsuite/gdb.base/step-line.c.
14617
14618 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14619
14620         * copyright.py (main): Dump the contents of
14621         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14622         even if BY_HAND is empty.
14623
14624 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14625
14626         * top.c (print_gdb_version): Update Copyright year in version
14627         message.
14628
14629 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14630
14631         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14632
14633 For older changes see ChangeLog-2017.
14634 \f
14635 Local Variables:
14636 mode: change-log
14637 left-margin: 8
14638 fill-column: 74
14639 version-control: never
14640 coding: utf-8
14641 End: