Fix interp::m_name resource leak found by Coverity
[external/binutils.git] / gdb / ChangeLog
1 2018-10-11  Gary Benson <gbenson@redhat.com>
2
3         * interps.h (interp::m_name): Make private and mutable.
4         * interps.c (interp::~interp): Free m_name.
5
6 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
7             Simon Marchi <simark@simark.ca>
8
9         * README (`configure' options): Add documentation for new
10         "--enable-unit-tests" option.
11         * acinclude.m4: Include "selftest.m4".
12         * configure: Regenerate.
13         * configure.ac: Use "GDB_AC_SELFTEST".
14         * maint.c (maintenance_selftest): Update message informing
15         that selftests have been disabled.
16         (maintenance_info_selftests): Likewise.
17         * selftest.m4: New file.
18
19 2018-10-10  Gary Benson <gbenson@redhat.com>
20
21         * remote.c (remote_target::remote_send_printf): Add
22         missing va_end found by Coverity.
23
24 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
25
26         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
27
28 2018-10-09  Tom Tromey  <tom@tromey.com>
29
30         * configure: Rebuild.
31         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
32         * NEWS: Update --enable-ubsan documentation.
33
34 2018-10-09  Gary Benson <gbenson@redhat.com>
35
36         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
37         found by Coverity.
38
39 2018-10-08  Tom Tromey  <tom@tromey.com>
40
41         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
42         variable.
43         (riscv_fbsd_init_abi): Likewise.
44
45 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
46         * valops.c (value_struct_elt_for_reference): Rename local variable
47         to work around the shadowing a previous local warning.
48
49 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
50
51         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
52         * NEWS: Mention new FreeBSD/riscv native configuration.
53         * configure.host: Add riscv*-*-freebsd*.
54         * configure.nat: Likewise.
55         * riscv-fbsd-nat.c: New file.
56
57 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
58
59         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
60         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
61         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
62         * NEWS: Mention new FreeBSD/riscv target.
63         * configure.tgt: Add riscv*-*-freebsd*.
64         * riscv-fbsd-tdep.c: New file.
65         * riscv-fbsd-tdep.h: New file.
66
67 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
68
69         * regcache.h (struct regcache_map_entry): Note that this type can
70         be used with traditional frame caches.
71         * trad-frame.c (trad_frame_set_reg_regmap): New.
72         * trad-frame.h (trad_frame_set_reg_regmap): New.
73
74 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
75
76         PR c++/16841
77         * valops.c (get_virtual_base_offset): New function.
78         (value_struct_elt_for_reference): Use it to get virtual base offset
79         and add it in calculating class member address.
80
81 2018-10-08   John Darrington <john@darrington.wattle.id.au>
82
83     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
84       (check_producer): Check if the producer is codewarrior.
85       (producer_is_codewarrior): New function.
86       (lnp_state_machine::record_line): Ignore is_stmt flag for records
87        produced by codewarrior.
88       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
89
90 2018-10-06  Tom Tromey  <tom@tromey.com>
91
92         PR python/19399:
93         * python/py-inferior.c: Add "architecture" entry.
94         (infpy_architecture): New function.
95
96 2018-10-06  Tom Tromey  <tom@tromey.com>
97
98         PR python/21765:
99         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
100         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
101         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
102         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
103
104 2018-10-06  Tom Tromey  <tom@tromey.com>
105
106         PR build/17077:
107         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
108         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
109         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
110         #include.
111
112 2018-10-06  Tom Tromey  <tom@tromey.com>
113
114         * python/py-breakpoint.c (bppy_get_location): Handle a
115         bp_breakpoint without a location.
116
117 2018-10-06  Tom Tromey  <tom@tromey.com>
118
119         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
120         (_RegEx): Reformat help text.
121         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
122         (AnyCallerIs, AnyCallerMatches): Reformat help text.
123         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
124         text.
125         * python/lib/gdb/command/xmethods.py (InfoXMethod)
126         (EnableXMethod, DisableXMethod): Remove help indentation.
127         Capitalize meta-syntactic variables.
128         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
129         (EnableUnwinder, DisableUnwinder): Remove help indentation.
130         Capitalize meta-syntactic variables.
131         * python/lib/gdb/command/explore.py (ExploreCommand)
132         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
133         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
134         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
135         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
136         Remove help indentation.
137         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
138         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
139         (DisableFrameFilter, SetFrameFilterPriority)
140         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
141
142 2018-10-06  Tom Tromey  <tom@tromey.com>
143
144         PR tui/28819:
145         * tui/tui-io.c (gdb_wgetch): New function.
146         (tui_mld_getc, tui_getc): Use it.
147
148 2018-10-05  Tom Tromey  <tom@tromey.com>
149
150         * sol-thread.c (sol_thread_target::wait): Rename inner
151         "save_ptid".
152
153 2018-10-04  Tom Tromey  <tom@tromey.com>
154
155         * configure: Rebuild.
156         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
157
158 2018-10-04  Tom Tromey  <tom@tromey.com>
159
160         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
161         declaration of "block".
162
163 2018-10-04  Tom Tromey  <tom@tromey.com>
164
165         * common/filestuff.c (fdwalk): Remove inner declaration of
166         "result".
167
168 2018-10-04  Tom Tromey  <tom@tromey.com>
169
170         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
171         "structs_addr" and hoist declaration.
172
173 2018-10-04  Tom Tromey  <tom@tromey.com>
174
175         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
176         variable "size".
177
178 2018-10-04  Tom Tromey  <tom@tromey.com>
179
180         * mdebugread.c (parse_partial_symbols): Use std::string.
181
182 2018-10-04  Tom Tromey  <tom@tromey.com>
183
184         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
185         * p-valprint.c (pascal_val_print): Split inner "i" variable.
186         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
187         header.
188         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
189         more inner scope.
190         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
191         * varobj.c (varobj_update): Rename inner "newobj",
192         "type_changed".
193         * valprint.c (generic_emit_char): Rename inner "buf".
194         * valops.c (find_overload_match): Rename inner "temp".
195         (value_struct_elt_for_reference): Declare "v" in more inner
196         scope.
197         * v850-tdep.c (v850_push_dummy_call): Rename "len".
198         * unittests/array-view-selftests.c (run_tests): Rename inner
199         "vec".
200         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
201         header.
202         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
203         "tsv" in more inner scope.
204         (print_one_static_tracepoint_marker): Rename inner
205         "tuple_emitter".
206         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
207         (tic6x_push_dummy_call): Don't redeclare "addr".
208         * target-float.c: Declare "dto" lower.
209         * symtab.c (lookup_local_symbol): Rename inner "sym".
210         (find_pc_sect_line): Rename inner "pc".
211         * stack.c (print_frame): Don't redeclare "gdbarch".
212         (return_command): Rename inner "gdbarch".
213         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
214         "sp".
215         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
216         header.
217         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
218         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
219         scope.
220         * remote.c (remote_target::update_thread_list): Don't redeclare
221         "tp".
222         (remote_target::process_initial_stop_replies): Rename inner
223         "thread".
224         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
225         (remote_target::wait_as): Don't redeclare "stop_reply".
226         (remote_target::get_thread_local_address): Rename inner
227         "result".
228         (remote_target::get_tib_address): Likewise.
229
230         * regcache.c (cooked_read_test): Rename "regnum".
231         * record-btrace.c (cmd_record_btrace_start): Rename inner
232         "exception".
233         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
234         loop header.
235         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
236         header.
237         (ppu2spu_sniffer): Rename inner "buf".
238         * parse.c (operator_check_standard): Rename inner "type",
239         "objfile".
240         * p-valprint.c (pascal_val_print): Introduce new scope for
241         "low_bound", "high_bound".
242         * p-exp.y (yylex): Declare "i" in loop header.
243         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
244         Lower declaration of "s".
245         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
246         header.
247         (nios2_push_dummy_call): Rename "len".
248         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
249         "buf".
250         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
251         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
252         (linux_xfer_osdata_modules): Likewise.
253         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
254         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
255         (mips_o64_push_dummy_call): Likewise.
256         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
257         "op".
258         * mi/mi-main.c (list_available_thread_groups): Rename inner
259         "tuple_emitter".
260         (mi_cmd_data_read_memory): Rename inner "opts".
261         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
262         "tuple_emitter".
263         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
264         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
265         more inner scope.
266         (parse_partial_symbols): Rename inner "pst", "p", "name"
267         * main.c (captured_main_1): Rename inner "i"s.
268         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
269         "oso2".
270         * linux-tdep.c (linux_info_proc): Rename inner "filename".
271         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
272         * infrun.c (handle_no_resumed): Don't redeclare "thread".
273         (handle_signal_stop): Rename inner "gdbarch".
274         (handle_command): Declare "signum" in loop header.
275         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
276         "status".
277         (examine_prologue): Rename inner "sol" and "sof".
278         (ia64_extract_return_value): Rename inner "val".  Declare another
279         "val" in a more inner scope.
280         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
281         inner scope.
282         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
283         "except".
284         * findvar.c (default_read_var_value): Don't redeclare "addr".
285         * f-exp.y (yylex): Declare "i" in loop header.
286         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
287         Rename inner "type", "expect_type".
288         (evaluate_subexp_for_sizeof): Rename inner "pc".
289         * elfread.c (elf_symfile_read): Rename inner "abfd".
290         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
291         "bytes_read".
292         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
293         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
294         (dwarf_decode_line_header): Rename inner "lh".
295         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
296         "offset".  Declare "i" in loop header.
297         (disassemble_dwarf_expression): Rename inner "addr_size".
298         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
299         inner "result".
300         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
301         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
302         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
303         "inner_list_emitter".
304         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
305         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
306         declaration in a block.
307         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
308         * cp-valprint.c (cp_print_value_fields): Don't redeclare
309         "obstack_final_size".
310         * cp-support.c (inspect_type): Declare "i" in loop header.
311         * compile/compile.c (compile_instance::insert_symbol_error):
312         Rename inner "e".
313         * common/agent.c (agent_run_command): Remove inner "ret"
314         declaration.
315         * coffread.c (coff_symfile_read): Rename inner "name".
316         (coff_symfile_read): Rename inner "abfd".
317         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
318         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
319         "high".
320         * c-exp.y (lex_one_token): Move "len" declaration lower.
321         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
322         "gdbarch".
323         (create_exception_master_breakpoint): Likewise.  Don't redeclare
324         "b".
325         (watch_command_1): Declare "mark" later.
326         (clear_command): Don't shadow "a" or "b".
327         (delete_command): Rename inner "b".
328         (delete_trace_command): Likewise.
329         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
330         "op".
331         (arm_gdbarch_init): Remove inner "e_flags".
332         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
333         "offset" in inner blocks.
334
335 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
336
337         * dwarf-index-write.c (file_write): Don't write if the vector is
338         empty.
339
340 2018-10-05  Tom de Vries  <tdevries@suse.de>
341
342         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
343         PyArg_ParseTuple call.
344
345 2018-10-05  Tom de Vries  <tdevries@suse.de>
346
347         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
348         PyArg_ParseTuple call.
349
350 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
351
352         * psymtab.c (recursively_search_psymtabs): Reformat parameters
353         to avoid exceeding 80 characters per line limit.
354
355 2018-10-04  Tom Tromey  <tom@tromey.com>
356
357         * symfile.c (syms_from_objfile_1, finish_new_objfile)
358         (reread_symbols): Update.
359         * complaints.h (clear_complaints): Remove argument.
360         * complaints.c (enum complaint_series): Remove.
361         (series): Remove global.
362         (complaint_internal): Update.
363         (clear_complaints): Remove argument.
364
365 2018-10-04  Tom Tromey  <tom@tromey.com>
366
367         * symfile.c (symbol_file_add_with_addrs): Do not print "no
368         debugging symbols" message if there is a separate debug objfile.
369
370 2018-10-04  Tom Tromey  <tom@tromey.com>
371
372         PR cli/19551:
373         * symfile.c (symbol_file_add_with_addrs): Update output.
374         * psymtab.c (require_partial_symbols): Update output.
375
376 2018-10-04  Tom Tromey  <tom@tromey.com>
377
378         PR cli/22234:
379         * complaints.c: Emit \n.
380
381 2018-10-04  Tom Tromey  <tom@tromey.com>
382
383         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
384         (separate_debug_file_exists, find_separate_debug_file)
385         (add_symbol_file_command, reread_symbols, allocate_symtab)
386         (allocate_compunit_symtab): Use filtered printing, not
387         unfiltered.
388         * psymtab.c (require_partial_symbols, dump_psymtab)
389         (allocate_psymtab): Use filtered printing, not unfiltered.
390
391 2018-10-04  Tom Tromey  <tom@tromey.com>
392
393         * complaints.c (complaint_internal): Correctly check complaint
394         count.
395
396 2018-10-04  Tom Tromey  <tom@tromey.com>
397
398         * complaints.h (struct complaints): Remove declaration.
399         * complaints.c (clear_complaints): Remove an unused variable.
400
401 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
402
403         * MAINTAINERS (Write After Approval): Add self.
404
405 2018-10-03  Tom Tromey  <tom@tromey.com>
406
407         * guile/scm-value.c (gdbscm_value_to_string): Initialize
408         "buffer_contents".
409         * coffread.c (coff_symtab_read): Initialize "newobj".
410
411 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
412
413         * dwarf2read.c (read_func_scope): Remove struct keyword in
414         range-based for.
415
416 2018-10-03  Tom Tromey  <tom@tromey.com>
417
418         * README: Mention --enable-ubsan.
419         * NEWS: Mention --enable-ubsan.
420         * acinclude.m4: Include sanitize.m4.
421         * configure: Rebuild.
422         * configure.ac: Call AM_GDB_UBSAN.
423         * sanitize.m4: New file.
424
425 2018-10-03  Tom Tromey  <tom@tromey.com>
426
427         * expression.h (enum exp_opcode): Use uint8_t as base type.
428         * expprint.c (op_name): Handle invalid opcodes.
429
430 2018-10-03  Tom Tromey  <tom@tromey.com>
431
432         * parse.c (prefixify_expression): Add assert.
433         (parse_exp_in_context_1): Throw exception if the expression is
434         empty.
435
436 2018-10-03  Tom Tromey  <tom@tromey.com>
437
438         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
439
440 2018-10-03  Tom Tromey  <tom@tromey.com>
441
442         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
443
444 2018-10-03  Tom Tromey  <tom@tromey.com>
445
446         * dwarf2read.c (read_subrange_type): Make "negative_mask"
447         unsigned.
448
449 2018-10-03  Tom Tromey  <tom@tromey.com>
450
451         * findvar.c (extract_integer): Do work in an unsigned type.
452
453 2018-10-03  Tom Tromey  <tom@tromey.com>
454
455         * common/enum-flags.h (enum_flags::operator~): Add static assert.
456         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
457         base type.
458         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
459         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
460         type.
461         * c-lang.h (enum c_string_type_values): Use unsigned as base
462         type.
463         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
464
465 2018-10-03  Tom Tromey  <tom@tromey.com>
466
467         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
468         <~dwarf2_frame_state_reg_info>: Update.
469         <dwarf2_frame_state_reg_info>: Update.
470         <alloc_regs>: Add assertion.  Update.
471         <reg>: Now a std::vector.
472         <num_regs>: Remove.
473         <swap>: Update.
474         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
475         (execute_cfa_program_test, dwarf2_frame_cache): Update.
476
477 2018-10-03  Tom Tromey  <tom@tromey.com>
478
479         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
480
481 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
482
483         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
484
485 2018-10-02  Tom Tromey  <tom@tromey.com>
486
487         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
488
489 2018-10-02  John Darrington <john@darrington.wattle.id.au>
490
491         * NEWS: Mention changed commands.
492         * ser-uds.c: New file.
493         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
494         * configure: Regenerate.
495         * Makefile.in: Add new file.
496         * serial.c (serial_open): Check if filename is a socket
497           and lookup the appropriate interface accordingly.
498
499 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
500
501         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
502         define.
503         (AARCH64_EXTRA_MAGIC): Likewise.
504         (AARCH64_FPSIMD_MAGIC): Likewise.
505         (AARCH64_SVE_MAGIC): Likewise.
506         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
507         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
508         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
509         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
510         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
511         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
512         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
513         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
514         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
515         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
516         (read_aarch64_ctx): Add function.
517         (aarch64_linux_sigframe_init): Detect FP registers.
518
519 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
520
521         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
522         (AARCH64_D0_REGNUM): Likewise.
523         (AARCH64_S0_REGNUM): Likewise.
524         (AARCH64_H0_REGNUM): Likewise.
525         (AARCH64_B0_REGNUM): Likewise.
526         (AARCH64_SVE_V0_REGNUM): Likewise.
527         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
528         (AARCH64_D0_REGNUM): Likewise.
529         (AARCH64_S0_REGNUM): Likewise.
530         (AARCH64_H0_REGNUM): Likewise.
531         (AARCH64_B0_REGNUM): Likewise.
532         (AARCH64_SVE_V0_REGNUM): Likewise.
533
534 2018-10-01  Gary Benson <gbenson@redhat.com>
535
536         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
537         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
538         prfpregset_t instead of gdb_prfpregset_t.
539         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
540         * configure, config.in: Rebuild.
541
542 2018-10-01  Gary Benson <gbenson@redhat.com>
543
544         * common/gdb_proc_service.h: New file, factored out from...
545         * gdb_proc_service.h: Moved common code to the above file.
546         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
547
548 2018-10-01  Gary Benson <gbenson@redhat.com>
549
550         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
551         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
552
553 2018-10-01  Gary Benson <gbenson@redhat.com>
554
555         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
556         (AC_CHECK_HEADERS): Check for linux/elf.h.
557         * configure, config.in: Rebuild.
558         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
559         doesn't define elf_fpregset_t.
560
561 2018-10-01  Gary Benson <gbenson@redhat.com>
562
563         * gdb_proc_service.h: Whitespace change.
564
565 2018-10-01  Tom Tromey  <tom@tromey.com>
566
567         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
568         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
569         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
570
571 2018-10-01  Tom Tromey  <tom@tromey.com>
572
573         * README: Minor change.
574
575 2018-09-30  Pedro Alves  <palves@redhat.com>
576
577         * darwin-nat-info.c (darwin_debug_regions_recurse)
578         (info_mach_exceptions_command): Remove unused local variables.
579         * darwin-nat.c (darwin_decode_notify_message)
580         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
581         (darwin_stop_inferior, darwin_setup_exceptions)
582         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
583         (darwin_nat_target::attach, darwin_nat_target::detach)
584         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
585         local variables.
586         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
587         variables.
588
589 2018-09-29  Tom Tromey  <tom@tromey.com>
590
591         * README: Remove some leftover text.
592
593 2018-09-29  Tom Tromey  <tom@tromey.com>
594
595         * PROBLEMS: Rewrite.
596         * README: Update.
597
598 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
599
600         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
601         case with explicit breakpoint kind.
602         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
603         'additional_info' and related logic.
604         (riscv_debug_breakpoints): New variable.
605         (riscv_breakpoint_kind_from_pc): Use the length of the existing
606         instruction to determine the breakpoint kind.
607         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
608         flag.  Update description of 'set/show riscv
609         use-compressed-breakpoints' flag.
610
611 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
612
613         (NEWS): Mention changes to frame related commands.
614         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
615         (add_prefix_cmd_suppress_notification): New function.
616         (add_com_suppress_notification): Call
617         add_cmd_suppress_notification.
618         * command.h (add_cmd_suppress_notification): Declare.
619         (add_prefix_cmd_suppress_notification): Declare.
620         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
621         (parse_frame_specification): Moved from stack.c, with
622         simplification to handle a single argument.
623         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
624         switch to the selected frame.  Add a header comment.
625         * stack.c: Remove 'safe-ctype.h' include.
626         (find_frame_for_function): Add declaration.
627         (find_frame_for_address): New function.
628         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
629         (frame_selection_by_function_completer): New function.
630         (info_frame_command): Rename to...
631         (info_frame_command_core): ...this, and update parameter types.
632         (select_frame_command): Rename to...
633         (select_frame_command_core): ...this, and update parameter types.
634         (frame_command): Rename to...
635         (frame_command_core): ...this, and update parameter types.
636         (class frame_command_helper): New class to wrap implementations of
637         frame related sub-commands.
638         (frame_apply_cmd_list): New static global.
639         (frame_cmd_list): Make static.
640         (select_frame_cmd_list): New global for sub-commands.
641         (info_frame_cmd_list): New global for sub-commands.
642         (_initialize_stack): Register sub-commands for 'frame',
643         'select-frame', and 'info frame'.  Update 'frame apply' commands
644         to use frame_apply_cmd_list.  Move function local static
645         frame_apply_list to file static frame_apply_cmd_list for
646         consistency.
647         * stack.h (select_frame_command): Delete declarationn.
648         (select_frame_for_mi): Declare new function.
649
650 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
651
652         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
653         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
654         and NOP.
655
656 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
657
658         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
659
660 2018-09-26  Tom Tromey  <tom@tromey.com>
661
662         * valops.c (auto_abandon): Remove dead code.
663
664 2018-09-26  Tom Tromey  <tom@tromey.com>
665
666         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
667
668 2018-09-24  Tom Tromey  <tom@tromey.com>
669
670         * common/pathstuff.c (get_standard_cache_dir): Make
671         "xdg_cache_home" and "home" const.
672         * top.c (init_history): Make "tmpenv" const.
673         * main.c (get_init_files): Make "homedir" const.
674
675 2018-09-23  Tom Tromey  <tom@tromey.com>
676
677         PR python/18852:
678         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
679
680 2018-09-23  Tom Tromey  <tom@tromey.com>
681
682         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
683         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
684         * python/python-internal.h (gdbpy_handle_exception): Declare.
685         * python/py-utils.c (gdbpy_handle_exception): New function.
686
687 2018-09-23  Tom Tromey  <tom@tromey.com>
688
689         PR python/17284:
690         * python/py-type.c (typy_template_argument): Check for negative
691         argument number.
692
693 2018-09-23  Tom Tromey  <tom@tromey.com>
694
695         PR python/14062:
696         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
697
698 2018-09-23  Tom Tromey  <tom@tromey.com>
699
700         PR python/18170:
701         * python/py-value.c (valpy_int): Allow conversion from pointer
702         type.
703
704 2018-09-23  Tom Tromey  <tom@tromey.com>
705
706         PR python/20126:
707         * python/py-value.c (valpy_int): Respect type sign.
708
709 2018-09-23  Tom Tromey  <tom@tromey.com>
710
711         PR python/18352;
712         * python/py-value.c (valpy_float): Allow conversions from int or
713         char.
714         (valpy_int, valpy_long): Allow conversions from float.
715
716 2018-09-23  Tom Tromey  <tom@tromey.com>
717
718         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
719         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
720
721 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
722
723         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
724         __sighndlr.
725         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
726
727 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
728
729         * windows-nat.c (windows_nat_target::wait): Remove a spurious
730         target_terminal::ours().
731
732 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
733
734         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
735         of vl to ULONGEST.
736
737 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
738
739         * breakpoint.c (update_inserted_breakpoint_locations): Remove
740         redundant condition.
741
742 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
743
744         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
745
746         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
747         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
748         * sol-thread.c (ps_pdmodel): Don't guard definition.
749
750         * procfs.c: Fix formatting.
751
752         * procfs.c (sysset_t_alloc): Remove.
753         (create_procinfo): Use XNEW instead of sysset_t_alloc.
754         (procfs_debug_inferior): Likewise.
755         (procfs_set_exec_trap): Likewise.
756         (proc_set_traced_sysentry): Don't allocate argp dynamically.
757         (proc_set_traced_sysexit): Likewise.
758
759         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
760         (dead_procinfo): Likewise.
761         (proc_warn): Likewise.
762         (proc_error): Likewise.
763         (proc_get_LDT_entry): Likewise.
764         (do_attach): Likewise.
765         (procfs_target::pid_to_str): Likewise.
766         (iterate_over_mappings): Likewise.
767
768         * procfs.c (create_procinfo): Fix ARI warning.
769         (proc_get_status): Likewise.
770         (proc_stop_process): Likewise.
771         (proc_run_process): Likewise.
772         (proc_kill): Likewise.
773         (proc_get_LDT_entry): Likewise.
774         (procfs_find_LDT_entry): Likewise.
775         (proc_update_threads): Likewise.
776         (proc_iterate_over_threads): Likewise.
777         (do_attach): Likewise.
778         (procfs_xfer_memory): Likewise.
779         (invalidate_cache): Likewise.
780         (procfs_target::resume): Likewise.
781         (procfs_init_inferior): Likewise.
782         (procfs_set_exec_trap): Likewise.
783         (procfs_target::thread_alive): Likewise.
784         (procfs_target::pid_to_exec_file): Likewise.
785         (iterate_over_mappings): Likewise.
786         (procfs_target::make_corefile_notes): Likewise.
787         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
788
789         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
790         (procfs_find_LDT_entry): Likewise.
791         * sol-thread.c (ps_lgetLDT): Likewise.
792
793 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
794
795         PR tdep/17903
796         * procfs.c (procfs_target): Declare pid_to_exec_file.
797         (procfs_target::pid_to_exec_file): New.
798
799 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
800
801         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
802         renaming.
803         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
804         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
805
806 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
807
808         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
809         (supply_fpregset, fill_fpregset): Move ...
810         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
811         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
812         Remove references to ioctl-based procfs.
813         Include <sys/reg.h>.
814         Remove PR_MODEL_NATIVE guards.
815         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
816         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
817
818 2018-09-19  Xavier Roirand  <roirand@adacore.com>
819
820         PR gdb/20981:
821         * solib-darwin.c (darwin_get_dyld_bfd): New function.
822         (darwin_solib_get_all_image_info_addr_at_init): Update call.
823         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
824
825 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
826
827         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
828         (fbsd_print_sockaddr_in6): Likewise.
829
830 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
831             Chris January  <chris.january@arm.com>
832
833         * eval.c (skip_undetermined_arglist): Skip argument list helper.
834         (evaluate_subexp_standard): Return a dummy type when
835         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
836         OP_F77_UNDETERMINED_ARGLIST case.
837         * expression.h (enum noside): Update comment.
838
839 2018-09-19  George Vasick <george.vasick@oracle.com>
840
841         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
842
843 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
844             April Chin <april.chin@oracle.com>
845             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
846
847         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
848         uint_t lwpid_t.
849         (create_procinfo): Print pids in /proc without leading zeros.
850
851 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
852
853         * nios2-tdep.c (nios2_gcc_target_options): New.
854         (nios2_gdb_arch_init): Install new hook.
855
856 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
857
858         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
859         New file.
860         * update-gnulib.sh: Apply patch.
861         * configure: Re-generate.
862
863 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
864
865         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
866         description.  Make "info proc" command descriptions more
867         consistent.
868
869 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
870
871         * NEWS: Mention 'info proc files' command.
872
873 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
874
875         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
876         descriptors for IP_FILES and IP_ALL.
877
878 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
879
880         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
881         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
882         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
883         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
884         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
885         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
886         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
887         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
888         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
889         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
890         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
891         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
892         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
893         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
894         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
895         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
896         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
897         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
898         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
899         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
900         (struct fbsd_sockaddr_un): New types.
901         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
902         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
903         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
904         (fbsd_core_info_proc_files): New functions.
905         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
906         IP_ALL.
907         * fbsd-tdep.h (fbsd_info_proc_files_header)
908         (fbsd_info_proc_files_entry): New.
909
910 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
911
912         * defs.h (enum info_proc_what) [IP_FILES]: New value.
913         * infcmd.c (info_proc_cmd_files): New function.
914         (_initialize_infcmd): Register 'info proc files' command.
915
916 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
917
918         * gnulib/aclocal-m4-deps.mk: Re-generate.
919         * gnulib/aclocal.m4: Re-generate.
920         * gnulib/config.in: Re-generate.
921         * gnulib/configure: Re-generate.
922         * gnulib/import/Makefile.am: Re-generate.
923         * gnulib/import/Makefile.in: Re-generate.
924         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
925         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
926         * gnulib/import/arpa_inet.in.h: New file.
927         * gnulib/import/inet_ntop.c: New file.
928         * gnulib/import/m4/arpa_inet_h.m4: New file.
929         * gnulib/import/m4/inet_ntop.m4: New file.
930         * gnulib/import/m4/netinet_in_h.m4: New file.
931         * gnulib/import/m4/socklen.m4: New file.
932         * gnulib/import/m4/sockpfaf.m4: New file.
933         * gnulib/import/m4/stdalign.m4: New file.
934         * gnulib/import/m4/sys_uio_h.m4: New file.
935         * gnulib/import/netinet_in.in.h: New file.
936         * gnulib/import/stdalign.in.h: New file.
937         * gnulib/import/sys_socket.c: New file.
938         * gnulib/import/sys_socket.in.h: New file.
939         * gnulib/import/sys_uio.in.h: New file.
940         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
941         module.
942
943 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
944
945         * gnulib/aclocal-m4-deps.mk: New file.
946         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
947         deterministically.
948
949 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
950
951         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
952         KVE_PATH.
953
954 2018-09-18  Tom Tromey  <tom@tromey.com>
955
956         * compile/compile-object-load.c (struct
957         link_hash_table_cleanup_data): Add constructor and destructor.
958         Use DISABLE_COPY_AND_ASSIGN.
959         (~link_hash_table_cleanup_data): Rename from
960         link_hash_table_free.  Now a destructor.
961         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
962
963 2018-09-18  Tom Tromey  <tom@tromey.com>
964
965         * compile/compile-object-run.c (do_module_cleanup): Use delete.
966         * compile/compile-object-load.c (struct munmap_list): Move to
967         header file.
968         (munmap_list::add): Rename from munmap_list_add; rewrite.
969         (munmap_list::~munmap_list): Rename from munmap_list_free.
970         (munmap_listp_free_cleanup): Remove.
971         (compile_object_load): Update.
972         * compile/compile-object-load.h (struct munmap_list): Move from
973         compile-object-load.c.  Rewrite.
974
975 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
976
977         * aarch64-tdep.c (pass_in_v): Use register size.
978         (aarch64_extract_return_value): Likewise.
979         (aarch64_store_return_value): Likewise.
980
981 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
982
983         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
984         rlim_t.
985
986 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
987
988         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
989         Fix short help line.
990
991 2018-09-17  Tom Tromey  <tom@tromey.com>
992
993         PR python/20445:
994         * configure: Rebuild.
995         * configure.ac: Conditionally use -DNDEBUG for Python.
996
997 2018-09-17  Tom Tromey  <tom@tromey.com>
998
999         * configure: Rebuild.
1000         * configure.ac: Use gmp as a library dependency when checking for
1001         mpfr.
1002
1003 2018-09-17  Pedro Alves  <palves@redhat.com>
1004
1005         * python/py-inferior.c (find_inferior_object): Delete.
1006
1007 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1008
1009         * compile/compile-cplus-types.c
1010         (compile_cplus_instance::enter_scope): Don't use new_scope after
1011         std::move.
1012
1013 2018-09-17  Tom Tromey  <tom@tromey.com>
1014
1015         * common/pathstuff.c (get_standard_cache_dir): Use
1016         ~/Library/Caches on macOS.
1017         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1018
1019 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1020
1021         PR python/23669
1022         * breakpoint.c (commands_cmd_element): New.
1023         (_initialize_breakpoint): Assign commands_cmd_element.
1024         * breakpoint.h (commands_cmd_element): New.
1025         * cli/cli-script.c (while_cmd_element, if_command,
1026         define_cmd_element): New.
1027         (command_name_equals): Remove.
1028         (process_next_line): Compare commands by pointer, not by name.
1029         (_initialize_cli_script): Assign the various cmd_list_element
1030         variables.
1031         * compile/compile.c (compile_cmd_element): New.
1032         (_initialize_compile): Assign compile_cmd_element.
1033         * compile/compile.h (compile_cmd_element): New.
1034         * guile/guile.c (guile_cmd_element): New.
1035         (install_gdb_commands): Assign guile_cmd_element.
1036         * guile/guile.h (guile_cmd_element): New.
1037         * python/python.c (python_cmd_element): New.
1038         (_initialize_python): Assign python_cmd_element.
1039         * python/python.h (python_cmd_element): New.
1040         * tracepoint.c (while_stepping_cmd_element): New.
1041         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1042         * tracepoint.h (while_stepping_cmd_element): New.
1043
1044 2018-09-17  Tom Tromey  <tom@tromey.com>
1045
1046         * infrun.c (save_infcall_suspend_state): Return
1047         infcall_suspend_state_up.
1048         (save_infcall_control_state): Return infcall_control_state_up.
1049         * inferior.h (save_infcall_suspend_state)
1050         (save_infcall_control_state): Declare later.  Return unique
1051         pointers.
1052
1053 2018-09-17  Tom Tromey  <tom@tromey.com>
1054
1055         * infrun.c (struct stop_context): Declare constructor,
1056         destructor, "changed" method.
1057         (stop_context::stop_context): Rename from save_stop_context.
1058         (stop_context::~stop_context): Rename from
1059         release_stop_context_cleanup.
1060         (normal_stop): Update.
1061         (stop_context::changed): Rename from stop_context_changed.  Return
1062         bool.
1063
1064 2018-09-17  Tom Tromey  <tom@tromey.com>
1065
1066         * inferior.h (struct infcall_suspend_state_deleter): New.
1067         (infcall_suspend_state_up): New typedef.
1068         (struct infcall_control_state_deleter): New.
1069         (infcall_control_state_up): New typedef.
1070         (make_cleanup_restore_infcall_suspend_state)
1071         (make_cleanup_restore_infcall_control_state): Don't declare.
1072         * infcall.c (call_function_by_hand_dummy): Update.
1073         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1074         (make_cleanup_restore_infcall_suspend_state): Remove.
1075         (do_restore_infcall_control_state_cleanup)
1076         (make_cleanup_restore_infcall_control_state): Remove.
1077
1078 2018-09-17  Tom Tromey  <tom@tromey.com>
1079
1080         * gdbthread.h (struct thread_control_state): Add initializer.
1081         (class thread_info) <control>: Remove initializer.
1082         * inferior.h (struct inferior_control_state): Add initializer.
1083         (class inferior) <control>: Remove initializer.
1084         (exit_inferior_1): Update.
1085         * infrun.c (struct infcall_control_state): Add constructors.
1086         (save_infcall_control_state): Use new.
1087         (restore_infcall_control_state, discard_infcall_control_state):
1088         Use delete.
1089
1090 2018-09-17  Tom Tromey  <tom@tromey.com>
1091
1092         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1093         unique_ptr.
1094         <siginfo_data>: Now a unique_xmalloc_ptr.
1095         (save_infcall_suspend_state, restore_infcall_suspend_state)
1096         (discard_infcall_suspend_state)
1097         (get_infcall_suspend_state_regcache): Update.
1098
1099 2018-09-17  Tom Tromey  <tom@tromey.com>
1100
1101         * gdbthread.h (struct thread_suspend_state): Add initializers.
1102         (class thread_info) <suspend>: Remove initializer.
1103         * infrun.c (struct infcall_suspend_state): Add initializers.
1104         (save_infcall_suspend_state): Use new.
1105         (discard_infcall_suspend_state): Use delete.
1106
1107 2018-09-16  Tom Tromey  <tom@tromey.com>
1108
1109         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1110         Remove.
1111         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1112         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1113         (py_varobj_iter_new): Likewise.
1114         (py_varobj_get_iterator): Use gdbpy_ref.
1115
1116 2018-09-16  Tom Tromey  <tom@tromey.com>
1117
1118         * python/py-threadevent.c (py_get_event_thread): Simplify.
1119         * python/py-inferior.c (infpy_thread_from_thread_handle):
1120         Return immediately after calling thread_to_thread_object.  Use
1121         Py_RETURN_NONE.
1122         (thread_to_thread_object): Set the exception on a NULL return.
1123
1124 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1125
1126         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1127
1128 2018-09-16  Tom Tromey  <tom@tromey.com>
1129
1130         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1131         Remove.
1132
1133 2018-09-16  Tom Tromey  <tom@tromey.com>
1134
1135         * python/python-internal.h (thread_to_thread_object): Change
1136         return type.
1137         * python/py-inferior.c (thread_to_thread_object): Return a new
1138         reference.
1139         (infpy_thread_from_thread_handle): Update.
1140         * python/py-infthread.c (gdbpy_selected_thread): Update.
1141         * python/py-stopevent.c (create_stop_event_object): Update.
1142         * python/py-threadevent.c (py_get_event_thread): Return a new
1143         reference.
1144         (py_get_event_thread): Update.
1145         * python/py-event.h (py_get_event_thread): Change return type.
1146         * python/py-continueevent.c (create_continue_event_object):
1147         Update.
1148
1149 2018-09-16  Tom Tromey  <tom@tromey.com>
1150
1151         * python/py-progspace.c (pspy_get_objfiles): Update.
1152         * python/python-internal.h (objfile_to_objfile_object): Change
1153         return type.
1154         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1155         Update.
1156         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1157         Update.
1158         * python/python.c (gdbpy_get_current_objfile): Update.
1159         (gdbpy_objfiles): Update.
1160         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1161         Update.
1162         (objfile_to_objfile_object): Return a new reference.
1163         * python/py-symtab.c (stpy_get_objfile): Update.
1164         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1165         Update.
1166
1167 2018-09-16  Tom Tromey  <tom@tromey.com>
1168
1169         * python/py-inferior.c (infpy_get_progspace): Update.
1170         * python/python-internal.h (pspace_to_pspace_object): Change
1171         return type.
1172         * python/py-newobjfileevent.c
1173         (create_clear_objfiles_event_object): Update.
1174         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1175         Update.
1176         * python/python.c (gdbpy_get_current_progspace): Update.
1177         (gdbpy_progspaces): Update.
1178         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1179         reference.
1180         * python/py-objfile.c (objfpy_get_progspace): Update.
1181         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1182         Update.
1183
1184 2018-09-16  Tom Tromey  <tom@tromey.com>
1185
1186         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1187         (solib_name, block_for_pc, find_pc_line): New functions.
1188         (execute_unwinders): Update.
1189         * python/py-block.c (gdbpy_block_for_pc): Remove.
1190         * python/py-inferior.c (infpy_get_progspace): New function.
1191         (inferior_object_getset) <progspace>: Add.
1192         * python/py-progspace.c (pspy_objfiles): Rewrite.
1193         (pspy_solib_name, pspy_block_for_pc)
1194         (pspy_find_pc_line, pspy_is_valid): New functions.
1195         (progspace_object_methods): Add entries for solib_name,
1196         block_for_pc, find_pc_line, is_valid.
1197         * python/python-internal.h (gdbpy_block_for_pc)
1198         (build_objfiles_list): Don't declare.
1199         * python/python.c: Don't include solib.h.
1200         (gdbpy_solib_name, gdbpy_find_pc_line)
1201         (gdbpy_get_current_progspace, build_objfiles_list)
1202         (gdbpy_objfiles): Remove.
1203         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1204         solib_name, find_pc_line>: Remove entries.
1205
1206 2018-09-16  Tom Tromey  <tom@tromey.com>
1207
1208         * top.c (new_ui_command): Use GNU style for metasyntactic
1209         variables.
1210         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1211         variables.
1212         * maint.c (maintenance_translate_address): Remove "<>" around
1213         text.
1214         * interps.c (interpreter_exec_cmd): Use GNU style for
1215         metasyntactic variables.
1216         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1217         metasyntactic variables.
1218         * tracepoint.c (tfind_range_command): Use GNU style for
1219         metasyntactic variables.
1220         (tfind_outside_command): Likewise.
1221         (_initialize_tracepoint): Likewise.
1222         * remote.c (extended_remote_target::create_inferior): Use GNU
1223         style for metasyntactic variables.
1224         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1225         metasyntactic variables.
1226         (adi_assign_command): Likewise.
1227
1228 2018-09-16  Tom Tromey  <tom@tromey.com>
1229
1230         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1231         metasyntactic variables.  Print message if no disassembler options
1232         are available.
1233
1234 2018-09-15  Tom Tromey  <tom@tromey.com>
1235
1236         * infcmd.c (get_inferior_args): Return const char *.
1237         * inferior.h (get_inferior_args): Return type now const.
1238         * linux-tdep.c (linux_fill_prpsinfo): Update.
1239         * procfs.c (procfs_target::make_corefile_notes): Update.
1240
1241 2018-09-07  Tom Tromey  <tom@tromey.com>
1242
1243         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1244         inside the TRY.
1245
1246 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1247
1248         * nios2-tdep.c (nios2_type_align): New.
1249         (nios2_gdb_arch_init): Install type_align hook.
1250
1251 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1252
1253         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1254         type that is neither object file owned, nor gdbarch owned.
1255         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1256         gdbarch is non-NULL.
1257         (alloc_type_instance): Allocate non-objfile owned types on the
1258         gdbarch obstack.
1259         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1260         using TYPE_ALLOC to ensure memory is allocated on the correct
1261         obstack.
1262         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1263         obstack, or the gdbarch obstack.
1264         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1265
1266 2018-09-14  Tom Tromey  <tom@tromey.com>
1267
1268         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1269         block.
1270
1271 2018-09-14  Tom Tromey  <tom@tromey.com>
1272
1273         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1274
1275 2018-09-13  Tom Tromey  <tom@tromey.com>
1276
1277         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1278         static.
1279
1280 2018-09-13  Tom Tromey  <tom@tromey.com>
1281
1282         * exec.c (try_open_exec_file): Use std::string.
1283
1284 2018-09-13  Tom Tromey  <tom@tromey.com>
1285
1286         * utils.h (gdb_bfd_errmsg): Return std::string.
1287         * exec.c (exec_file_attach): Update.
1288         * compile/compile-object-load.c (compile_object_load): Update.
1289         * utils.c (gdb_bfd_errmsg): Return std::string.
1290
1291 2018-09-13  Tom Tromey  <tom@tromey.com>
1292
1293         * procfs.c (struct procinfo_deleter): New.
1294         (procinfo_up): New typedef.
1295         (do_destroy_procinfo_cleanup): Remove.
1296         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1297
1298 2018-09-13  Tom Tromey  <tom@tromey.com>
1299
1300         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1301
1302 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1303 2018-09-13  Tom Tromey  <tom@tromey.com>
1304
1305         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1306         (pspy_get_objfiles): New function.
1307         (progspace_object_methods): New.
1308         (pspace_object_type): Add tp_methods callback.
1309         * python/python-internal.h (build_objfiles_list): New
1310         declaration.
1311         * python/python.c (build_objfiles_list): New function.
1312         (gdbpy_objfiles): Implement using build_objfiles_list.
1313         * NEWS: Mention the Progspace.objfiles method.
1314
1315 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1316
1317         * python/py-inferior.c (infpy_get_progspace): New function.
1318         (inferior_object_getset): Add progspace property.
1319         * NEWS: Mention the new property.
1320
1321 2018-09-13  Tom Tromey  <tom@tromey.com>
1322
1323         PR rust/23650:
1324         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1325
1326 2018-09-13  Tom Tromey  <tom@tromey.com>
1327
1328         PR rust/23626:
1329         * rust-lang.c (rust_enum_variant): Now static.
1330         (rust_empty_enum_p): New function.
1331         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1332         Handle empty enum.
1333
1334 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1335
1336         * python/py-inferior.c (infpy_repr): New.
1337         (inferior_object_type): Register infpy_repr.
1338         * python/py-objfile.c (objfpy_repr): New.
1339         (objfile_object_type): Register objfpy_repr.
1340
1341 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1342
1343         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1344
1345 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1346
1347         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1348         typo.
1349
1350 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1351
1352         * common/common-utils.c: Don't include '<sys/stat.h>'.
1353         (is_regular_file): Move to...
1354         * common/filestuff.c (is_regular_file): ... here.
1355         * common/common-utils.h (is_regular_file): Move to...
1356         * common/filestuff.h (is_regular_file): ... here.
1357
1358 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1359
1360         * skip.c (debug_skip): New variable.
1361         (skiplist_entry::do_skip_file_p): Add debug output.
1362         (skiplist_entry::do_skip_gfile_p): Likewise.
1363         (skiplist_entry::skip_function_p): Likewise.
1364         (_initialize_step_skip): Create debug command.
1365         * NEWS: Mention set/show debug skip.
1366
1367 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1368
1369         * darwin-nat.c (should_disable_startup_with_shell):
1370         New function.
1371         (darwin_nat_target::create_inferior): Add call.
1372
1373 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1374
1375         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1376         inf_port, msg_state>: Initialize.
1377         (struct darwin_thread_info) <signaled, single_step>: Change
1378         type and initialize.
1379         (struct darwin_thread_info) <event>: Initialize.
1380
1381 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1382
1383         PR gdb/23555
1384         PR gdb/23558
1385         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1386         guesses.
1387
1388 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1389
1390         Revert:
1391         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1392
1393         PR gdb/23555
1394         PR gdb/23558
1395         * gnulib/aclocal.m4: Regenerate.
1396         * gnulib/config.in: Regenerate.
1397         * gnulib/configure: Regenerate.
1398         * gnulib/import/Makefile.am: Update.
1399         * gnulib/import/Makefile.in: Update.
1400         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1401         * gnulib/import/_Noreturn.h: ... this.
1402         * gnulib/import/alloca.in.h: Update.
1403         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1404         * gnulib/import/arg-nonnull.h: ... this.
1405         * gnulib/import/assure.h: Update.
1406         * gnulib/import/at-func.c: Update.
1407         * gnulib/import/basename-lgpl.c: Update.
1408         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1409         * gnulib/import/c++defs.h: ... this.
1410         * gnulib/import/canonicalize-lgpl.c: Update.
1411         * gnulib/import/cdefs.h: Update.
1412         * gnulib/import/chdir-long.c: Update.
1413         * gnulib/import/chdir-long.h: Update.
1414         * gnulib/import/cloexec.c: Update.
1415         * gnulib/import/cloexec.h: Update.
1416         * gnulib/import/close.c: Update.
1417         * gnulib/import/closedir.c: Update.
1418         * gnulib/import/config.charset: Update.
1419         * gnulib/import/dirent-private.h: Update.
1420         * gnulib/import/dirent.in.h: Update.
1421         * gnulib/import/dirfd.c: Update.
1422         * gnulib/import/dirname-lgpl.c: Update.
1423         * gnulib/import/dirname.h: Update.
1424         * gnulib/import/dosname.h: Update.
1425         * gnulib/import/dup-safer-flag.c: Update.
1426         * gnulib/import/dup-safer.c: Update.
1427         * gnulib/import/dup.c: Update.
1428         * gnulib/import/dup2.c: Update.
1429         * gnulib/import/errno.in.h: Update.
1430         * gnulib/import/error.c: Update.
1431         * gnulib/import/error.h: Update.
1432         * gnulib/import/exitfail.c: Update.
1433         * gnulib/import/exitfail.h: Update.
1434         * gnulib/import/extra/update-copyright: Update.
1435         * gnulib/import/fchdir.c: Update.
1436         * gnulib/import/fcntl.c: Update.
1437         * gnulib/import/fcntl.in.h: Update.
1438         * gnulib/import/fd-hook.c: Update.
1439         * gnulib/import/fd-hook.h: Update.
1440         * gnulib/import/fd-safer-flag.c: Update.
1441         * gnulib/import/fd-safer.c: Update.
1442         * gnulib/import/fdopendir.c: Update.
1443         * gnulib/import/filename.h: Update.
1444         * gnulib/import/filenamecat-lgpl.c: Update.
1445         * gnulib/import/filenamecat.h: Update.
1446         * gnulib/import/flexmember.h: Update.
1447         * gnulib/import/float+.h: Update.
1448         * gnulib/import/float.c: Update.
1449         * gnulib/import/float.in.h: Update.
1450         * gnulib/import/fnmatch.c: Update.
1451         * gnulib/import/fnmatch.in.h: Update.
1452         * gnulib/import/fnmatch_loop.c: Update.
1453         * gnulib/import/fpucw.h: Update.
1454         * gnulib/import/frexp.c: Update.
1455         * gnulib/import/frexpl.c: Update.
1456         * gnulib/import/fstat.c: Update.
1457         * gnulib/import/fstatat.c: Update.
1458         * gnulib/import/getcwd-lgpl.c: Update.
1459         * gnulib/import/getcwd.c: Update.
1460         * gnulib/import/getdtablesize.c: Update.
1461         * gnulib/import/getlogin_r.c: Update.
1462         * gnulib/import/getprogname.c: Update.
1463         * gnulib/import/getprogname.h: Update.
1464         * gnulib/import/gettext.h: Update.
1465         * gnulib/import/gettimeofday.c: Update.
1466         * gnulib/import/glob-libc.h: Update.
1467         * gnulib/import/glob.c: Update.
1468         * gnulib/import/glob.in.h: Update.
1469         * gnulib/import/glob_internal.h: Update.
1470         * gnulib/import/glob_pattern_p.c: Update.
1471         * gnulib/import/globfree.c: Update.
1472         * gnulib/import/hard-locale.c: Update.
1473         * gnulib/import/hard-locale.h: Update.
1474         * gnulib/import/intprops.h: Update.
1475         * gnulib/import/inttypes.in.h: Update.
1476         * gnulib/import/isnan.c: Update.
1477         * gnulib/import/isnand-nolibm.h: Update.
1478         * gnulib/import/isnand.c: Update.
1479         * gnulib/import/isnanl-nolibm.h: Update.
1480         * gnulib/import/isnanl.c: Update.
1481         * gnulib/import/itold.c: Update.
1482         * gnulib/import/libc-config.h: Update.
1483         * gnulib/import/limits.in.h: Update.
1484         * gnulib/import/localcharset.c: Update.
1485         * gnulib/import/localcharset.h: Update.
1486         * gnulib/import/localtime-buffer.c: Update.
1487         * gnulib/import/localtime-buffer.h: Update.
1488         * gnulib/import/lstat.c: Update.
1489         * gnulib/import/m4/00gnulib.m4: Update.
1490         * gnulib/import/m4/__inline.m4: Update.
1491         * gnulib/import/m4/absolute-header.m4: Update.
1492         * gnulib/import/m4/alloca.m4: Update.
1493         * gnulib/import/m4/builtin-expect.m4: Update.
1494         * gnulib/import/m4/canonicalize.m4: Update.
1495         * gnulib/import/m4/chdir-long.m4: Update.
1496         * gnulib/import/m4/close.m4: Update.
1497         * gnulib/import/m4/closedir.m4: Update.
1498         * gnulib/import/m4/configmake.m4: Update.
1499         * gnulib/import/m4/d-ino.m4: Update.
1500         * gnulib/import/m4/d-type.m4: Update.
1501         * gnulib/import/m4/dirent_h.m4: Update.
1502         * gnulib/import/m4/dirfd.m4: Update.
1503         * gnulib/import/m4/dirname.m4: Update.
1504         * gnulib/import/m4/double-slash-root.m4: Update.
1505         * gnulib/import/m4/dup.m4: Update.
1506         * gnulib/import/m4/dup2.m4: Update.
1507         * gnulib/import/m4/eealloc.m4: Update.
1508         * gnulib/import/m4/environ.m4: Update.
1509         * gnulib/import/m4/errno_h.m4: Update.
1510         * gnulib/import/m4/error.m4: Update.
1511         * gnulib/import/m4/exponentd.m4: Update.
1512         * gnulib/import/m4/exponentl.m4: Update.
1513         * gnulib/import/m4/extensions.m4: Update.
1514         * gnulib/import/m4/extern-inline.m4: Update.
1515         * gnulib/import/m4/fchdir.m4: Update.
1516         * gnulib/import/m4/fcntl-o.m4: Update.
1517         * gnulib/import/m4/fcntl.m4: Update.
1518         * gnulib/import/m4/fcntl_h.m4: Update.
1519         * gnulib/import/m4/fdopendir.m4: Update.
1520         * gnulib/import/m4/filenamecat.m4: Update.
1521         * gnulib/import/m4/flexmember.m4: Update.
1522         * gnulib/import/m4/float_h.m4: Update.
1523         * gnulib/import/m4/fnmatch.m4: Update.
1524         * gnulib/import/m4/fnmatch_h.m4: Update.
1525         * gnulib/import/m4/fpieee.m4: Update.
1526         * gnulib/import/m4/frexp.m4: Update.
1527         * gnulib/import/m4/frexpl.m4: Update.
1528         * gnulib/import/m4/fstat.m4: Update.
1529         * gnulib/import/m4/fstatat.m4: Update.
1530         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1531         * gnulib/import/m4/getcwd-path-max.m4: Update.
1532         * gnulib/import/m4/getcwd.m4: Update.
1533         * gnulib/import/m4/getdtablesize.m4: Update.
1534         * gnulib/import/m4/getlogin.m4: Update.
1535         * gnulib/import/m4/getlogin_r.m4: Update.
1536         * gnulib/import/m4/getpagesize.m4: Update.
1537         * gnulib/import/m4/getprogname.m4: Update.
1538         * gnulib/import/m4/gettimeofday.m4: Update.
1539         * gnulib/import/m4/glibc21.m4: Update.
1540         * gnulib/import/m4/glob.m4: Update.
1541         * gnulib/import/m4/glob_h.m4: Update.
1542         * gnulib/import/m4/gnulib-cache.m4: Update.
1543         * gnulib/import/m4/gnulib-common.m4: Update.
1544         * gnulib/import/m4/gnulib-comp.m4: Update.
1545         * gnulib/import/m4/gnulib-tool.m4: Update.
1546         * gnulib/import/m4/hard-locale.m4: Update.
1547         * gnulib/import/m4/include_next.m4: Update.
1548         * gnulib/import/m4/inttypes-pri.m4: Update.
1549         * gnulib/import/m4/inttypes.m4: Update.
1550         * gnulib/import/m4/isnand.m4: Update.
1551         * gnulib/import/m4/isnanl.m4: Update.
1552         * gnulib/import/m4/largefile.m4: Update.
1553         * gnulib/import/m4/limits-h.m4: Update.
1554         * gnulib/import/m4/localcharset.m4: Update.
1555         * gnulib/import/m4/locale-fr.m4: Update.
1556         * gnulib/import/m4/locale-ja.m4: Update.
1557         * gnulib/import/m4/locale-zh.m4: Update.
1558         * gnulib/import/m4/localtime-buffer.m4: Update.
1559         * gnulib/import/m4/longlong.m4: Update.
1560         * gnulib/import/m4/lstat.m4: Update.
1561         * gnulib/import/m4/malloc.m4: Update.
1562         * gnulib/import/m4/malloca.m4: Update.
1563         * gnulib/import/m4/math_h.m4: Update.
1564         * gnulib/import/m4/mbrtowc.m4: Update.
1565         * gnulib/import/m4/mbsinit.m4: Update.
1566         * gnulib/import/m4/mbsrtowcs.m4: Update.
1567         * gnulib/import/m4/mbstate_t.m4: Update.
1568         * gnulib/import/m4/memchr.m4: Update.
1569         * gnulib/import/m4/memmem.m4: Update.
1570         * gnulib/import/m4/mempcpy.m4: Update.
1571         * gnulib/import/m4/memrchr.m4: Update.
1572         * gnulib/import/m4/mkdir.m4: Update.
1573         * gnulib/import/m4/mkstemp.m4: Update.
1574         * gnulib/import/m4/mmap-anon.m4: Update.
1575         * gnulib/import/m4/mode_t.m4: Update.
1576         * gnulib/import/m4/msvc-inval.m4: Update.
1577         * gnulib/import/m4/msvc-nothrow.m4: Update.
1578         * gnulib/import/m4/multiarch.m4: Update.
1579         * gnulib/import/m4/nocrash.m4: Update.
1580         * gnulib/import/m4/off_t.m4: Update.
1581         * gnulib/import/m4/onceonly.m4: Update.
1582         * gnulib/import/m4/open-cloexec.m4: Update.
1583         * gnulib/import/m4/open.m4: Update.
1584         * gnulib/import/m4/openat.m4: Update.
1585         * gnulib/import/m4/opendir.m4: Update.
1586         * gnulib/import/m4/pathmax.m4: Update.
1587         * gnulib/import/m4/rawmemchr.m4: Update.
1588         * gnulib/import/m4/readdir.m4: Update.
1589         * gnulib/import/m4/readlink.m4: Update.
1590         * gnulib/import/m4/realloc.m4: Update.
1591         * gnulib/import/m4/rename.m4: Update.
1592         * gnulib/import/m4/rewinddir.m4: Update.
1593         * gnulib/import/m4/rmdir.m4: Update.
1594         * gnulib/import/m4/save-cwd.m4: Update.
1595         * gnulib/import/m4/secure_getenv.m4: Update.
1596         * gnulib/import/m4/setenv.m4: Update.
1597         * gnulib/import/m4/signal_h.m4: Update.
1598         * gnulib/import/m4/ssize_t.m4: Update.
1599         * gnulib/import/m4/stat-time.m4: Update.
1600         * gnulib/import/m4/stat.m4: Update.
1601         * gnulib/import/m4/std-gnu11.m4: Update.
1602         * gnulib/import/m4/stdbool.m4: Update.
1603         * gnulib/import/m4/stddef_h.m4: Update.
1604         * gnulib/import/m4/stdint.m4: Update.
1605         * gnulib/import/m4/stdio_h.m4: Update.
1606         * gnulib/import/m4/stdlib_h.m4: Update.
1607         * gnulib/import/m4/strchrnul.m4: Update.
1608         * gnulib/import/m4/strdup.m4: Update.
1609         * gnulib/import/m4/strerror.m4: Update.
1610         * gnulib/import/m4/string_h.m4: Update.
1611         * gnulib/import/m4/strstr.m4: Update.
1612         * gnulib/import/m4/strtok_r.m4: Update.
1613         * gnulib/import/m4/sys_socket_h.m4: Update.
1614         * gnulib/import/m4/sys_stat_h.m4: Update.
1615         * gnulib/import/m4/sys_time_h.m4: Update.
1616         * gnulib/import/m4/sys_types_h.m4: Update.
1617         * gnulib/import/m4/tempname.m4: Update.
1618         * gnulib/import/m4/time_h.m4: Update.
1619         * gnulib/import/m4/unistd-safer.m4: Update.
1620         * gnulib/import/m4/unistd_h.m4: Update.
1621         * gnulib/import/m4/warn-on-use.m4: Update.
1622         * gnulib/import/m4/wchar_h.m4: Update.
1623         * gnulib/import/m4/wchar_t.m4: Update.
1624         * gnulib/import/m4/wctype_h.m4: Update.
1625         * gnulib/import/m4/wint_t.m4: Update.
1626         * gnulib/import/malloc.c: Update.
1627         * gnulib/import/malloc/scratch_buffer.h: Update.
1628         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1629         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1630         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1631         * gnulib/import/malloca.c: Update.
1632         * gnulib/import/malloca.h: Update.
1633         * gnulib/import/malloca.valgrind: Update.
1634         * gnulib/import/math.in.h: Update.
1635         * gnulib/import/mbrtowc.c: Update.
1636         * gnulib/import/mbsinit.c: Update.
1637         * gnulib/import/mbsrtowcs-impl.h: Update.
1638         * gnulib/import/mbsrtowcs-state.c: Update.
1639         * gnulib/import/mbsrtowcs.c: Update.
1640         * gnulib/import/memchr.c: Update.
1641         * gnulib/import/memmem.c: Update.
1642         * gnulib/import/mempcpy.c: Update.
1643         * gnulib/import/memrchr.c: Update.
1644         * gnulib/import/mkdir.c: Update.
1645         * gnulib/import/mkstemp.c: Update.
1646         * gnulib/import/msvc-inval.c: Update.
1647         * gnulib/import/msvc-inval.h: Update.
1648         * gnulib/import/msvc-nothrow.c: Update.
1649         * gnulib/import/msvc-nothrow.h: Update.
1650         * gnulib/import/open.c: Update.
1651         * gnulib/import/openat-die.c: Update.
1652         * gnulib/import/openat-priv.h: Update.
1653         * gnulib/import/openat-proc.c: Update.
1654         * gnulib/import/openat.c: Update.
1655         * gnulib/import/openat.h: Update.
1656         * gnulib/import/opendir.c: Update.
1657         * gnulib/import/pathmax.h: Update.
1658         * gnulib/import/pipe-safer.c: Update.
1659         * gnulib/import/rawmemchr.c: Update.
1660         * gnulib/import/readdir.c: Update.
1661         * gnulib/import/readlink.c: Update.
1662         * gnulib/import/realloc.c: Update.
1663         * gnulib/import/ref-add.sin: Update.
1664         * gnulib/import/ref-del.sin: Update.
1665         * gnulib/import/rename.c: Update.
1666         * gnulib/import/rewinddir.c: Update.
1667         * gnulib/import/rmdir.c: Update.
1668         * gnulib/import/same-inode.h: Update.
1669         * gnulib/import/save-cwd.c: Update.
1670         * gnulib/import/save-cwd.h: Update.
1671         * gnulib/import/scratch_buffer.h: Update.
1672         * gnulib/import/secure_getenv.c: Update.
1673         * gnulib/import/setenv.c: Update.
1674         * gnulib/import/signal.in.h: Update.
1675         * gnulib/import/stat-time.c: Update.
1676         * gnulib/import/stat-time.h: Update.
1677         * gnulib/import/stat-w32.c: Update.
1678         * gnulib/import/stat-w32.h: Update.
1679         * gnulib/import/stat.c: Update.
1680         * gnulib/import/stdbool.in.h: Update.
1681         * gnulib/import/stddef.in.h: Update.
1682         * gnulib/import/stdint.in.h: Update.
1683         * gnulib/import/stdio.in.h: Update.
1684         * gnulib/import/stdlib.in.h: Update.
1685         * gnulib/import/str-two-way.h: Update.
1686         * gnulib/import/strchrnul.c: Update.
1687         * gnulib/import/strdup.c: Update.
1688         * gnulib/import/streq.h: Update.
1689         * gnulib/import/strerror-override.c: Update.
1690         * gnulib/import/strerror-override.h: Update.
1691         * gnulib/import/strerror.c: Update.
1692         * gnulib/import/string.in.h: Update.
1693         * gnulib/import/stripslash.c: Update.
1694         * gnulib/import/strnlen1.c: Update.
1695         * gnulib/import/strnlen1.h: Update.
1696         * gnulib/import/strstr.c: Update.
1697         * gnulib/import/strtok_r.c: Update.
1698         * gnulib/import/sys_stat.in.h: Update.
1699         * gnulib/import/sys_time.in.h: Update.
1700         * gnulib/import/sys_types.in.h: Update.
1701         * gnulib/import/tempname.c: Update.
1702         * gnulib/import/tempname.h: Update.
1703         * gnulib/import/time.in.h: Update.
1704         * gnulib/import/unistd--.h: Update.
1705         * gnulib/import/unistd-safer.h: Update.
1706         * gnulib/import/unistd.in.h: Update.
1707         * gnulib/import/unsetenv.c: Update.
1708         * gnulib/import/verify.h: Update.
1709         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1710         * gnulib/import/wchar.in.h: Update.
1711         * gnulib/import/wctype.in.h: Update.
1712         * gnulib/import/xalloc-oversized.h: Update.
1713         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1714         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1715
1716 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1717
1718         * record-btrace.c (get_thread_current_frame): Remove
1719         old_inferior_ptid.
1720
1721 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1722
1723         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1724         with check_tag to 1 if and only if the type is tagged and the
1725         component being searched cannot been found in the current
1726         view. Otherwise, always call ada_to_fixed_type with
1727         check_tag to 0.
1728
1729 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1730
1731         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1732         declaration.
1733         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1734         * ada-varobj.c (ada_varobj_get_number_of_children,
1735         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1736
1737 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1738
1739         * ada-valprint.c (ada_value_print): Use type instead of
1740         enclosing type.
1741
1742 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1743
1744         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1745         an array of access to unconstrained array.
1746
1747 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1748
1749         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1750         (ada_check_typedef): Use it.
1751
1752 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1753
1754         * ada-varobj.c (ada_varobj_describe_struct_child)
1755         (ada_varobj_describe_child): Handle union case like struct one.
1756
1757 2018-09-10  Tom Tromey  <tom@tromey.com>
1758
1759         PR python/18380:
1760         * python/python.c (_initialize_python): Make example in "python"
1761         help work in Python 3.
1762
1763 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1764
1765         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1766         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1767         $(EXEEXT) to the script, as it is not a program.
1768
1769 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1770
1771         * python/py-prettyprint.c (pretty_print_one_value): Return
1772         gdbpy_ref<>.
1773         (print_string_repr): Adjust.
1774         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1775         * python/python-internal.h (apply_varobj_pretty_printer): Return
1776         gdbpy_ref<>.
1777         * varobj.c (varobj_value_get_print_value): Adjust.
1778
1779 2018-09-08  Tom Tromey  <tom@tromey.com>
1780
1781         PR python/16047:
1782         * python/py-prettyprint.c (pretty_print_one_value): Check for
1783         to_string method.
1784
1785 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1786
1787         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1788         replace_operator_with_call.
1789
1790 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1791
1792         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1793
1794 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1795
1796         * ada-typeprint.c (print_range): Print the bounds using TYPE
1797         rather than its TYPE_TARGET_TYPE.
1798
1799 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1800
1801         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1802         call to ada_to_fixed_value_create.
1803
1804 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1805
1806         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1807
1808 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1809
1810         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1811         by calls to error.
1812
1813 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1814
1815         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1816         Move update of loop variable "fi".
1817
1818 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1819
1820         * ada-lang.c (value_assign_to_component): In the case of
1821         big-endian targets, extract the bits of the given VAL
1822         using an src_offset of zero if container is not a scalar.
1823
1824 2018-09-06  Simon Ser  <contact@emersion.fr>
1825
1826         PR gdb/23105
1827         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1828         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1829         * fbsd-tdep.c (fbsd_make_note_desc): New.
1830         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1831         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1832         * target.h (enum target_object) Add FreeBSD-specific
1833         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1834
1835 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1836
1837         * compile/compile-c.h (generate_c_for_variable_locations):
1838         Change reference to pointer.
1839         * compile/compile-c-support.c (compile_program) <compute>:
1840         Likewise.
1841         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1842         (generate_c_for_for_one_variable): Likewise
1843         (generate_c_for_variable_locations): Likewise
1844         * compile/compile-c-types.c (compile_c_instance::convert_type):
1845         Likewise
1846         * compile/compile-cplus-symbols.c (convert_one_symbol):
1847         std::move the scope passed to enter_scope.
1848         * compile/compile-cplus-types.c
1849         (compile_cplus_instance::enter_scope): Make parameter
1850         rvalue-reference.
1851         (compile_cplus_instance::new_scope): Change reference to
1852         pointer.
1853         (compile_cplus_instance::convert_type): Likewise
1854         (compile_cplus_convert_typedef): std::move the scope passed to
1855         enter_scope.
1856         (compile_cplus_convert_struct_or_union): Likewise.
1857         (compile_cplus_convert_enum): Likewise.
1858         (compile_cplus_convert_namespace): Likewise.
1859         * compile/compile-cplus.h (compile_cplus_instance)
1860         <enter_scope>: Make parameter rvalue-reference.
1861         * compile/compile-internal.h (compile_instance)
1862         <get_cached_type>: Likewise
1863         * compile/compile-loc2c.c (push): Likewise
1864         (pushf): Likewise
1865         (unary): Likewise
1866         (binary): Likewise
1867         (print_label): Likewise
1868         (pushf_register_address): Likewise
1869         (pushf_register): Likewise
1870         (do_compile_dwarf_expr_to_c): Likewise
1871         (compile_dwarf_expr_to_c): Likewise
1872         (compile_dwarf_bounds_to_c): Likewise
1873         * compile/compile.c (compile_instance::get_cached_type):
1874         Likewise
1875         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1876         (compile_dwarf_bounds_to_c): Likewise
1877         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1878         (dwarf2_compile_property_to_c): Likewise
1879         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1880         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1881         Likewise
1882
1883 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1884
1885         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1886         * tui/tui-data.c (init_content_element): Don't initialize it.
1887
1888 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1889
1890         * tui/tui-data.h (struct tui_win_info)
1891         <detail::opaque>: Remove.
1892         * tui/tui-data.c (init_win_info): Remove assignment.
1893
1894 2018-09-05  Tom Tromey  <tom@tromey.com>
1895
1896         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1897         -Wformat-nonliteral.
1898         * target-float.c (host_float_ops<T>::to_string)
1899         (host_float_ops<T>::from_string): Use
1900         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1901         * configure: Rebuild.
1902
1903 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1904
1905         * printcmd.c (printf_c_string): Use
1906         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1907         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1908
1909 2018-09-05  Tom Tromey  <tom@tromey.com>
1910
1911         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1912
1913 2018-09-05  Tom de Vries  <tdevries@suse.de>
1914
1915         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1916         with resolve_abstract_p == true.
1917         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1918         defaulting to false. Propagate resolve_abstract_p to
1919         dwarf2_fetch_die_loc_sect_off.
1920         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1921         parameter, defaulting to false.
1922         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1923         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1924         parameter.
1925         * dwarf2read.h (struct die_info): Forward-declare.
1926         (die_info_ptr): New typedef.
1927         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1928
1929 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1930
1931         GDB 8.2 released.
1932
1933 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1934             Pedro Alves  <palves@redhat.com>
1935
1936         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1937         "aclocal-m4-deps.mk".  Include file here.
1938         $(srcdir)/aclocal.m4: Add "configure.ac".
1939         * gnulib/aclocal-m4-deps.mk: New file.
1940         * gnulib/update-gnulib.sh: Automatically update
1941         "aclocal-m4-deps.mk".
1942
1943 2018-09-04  Tom Tromey  <tom@tromey.com>
1944
1945         * configure: Rebuild.
1946         * configure.ac: Remove multi-ice code.
1947
1948 2018-09-04  Tom Tromey  <tom@tromey.com>
1949
1950         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1951         (ada-exp.o): Update.
1952
1953 2018-09-04  Tom Tromey  <tom@tromey.com>
1954
1955         * Makefile.in (printcmd.o, target-float.o): Remove.
1956         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1957
1958 2018-09-04  Tom Tromey  <tom@tromey.com>
1959
1960         * gnulib/Makefile.in: Remove obsolete comment.
1961         * Makefile.in: Remove obsolete comment.
1962
1963 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1964
1965         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1966         line with '+'.
1967
1968 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1969
1970         * riscv-tdep.c: Add 'prologue-value.h' include.
1971         (struct riscv_unwind_cache): New struct.
1972         (riscv_debug_unwinder): New global.
1973         (riscv_scan_prologue): Update arguments, capture register details
1974         from prologue scan.
1975         (riscv_skip_prologue): Reformat arguments line, move end of
1976         prologue calculation into riscv_scan_prologue.
1977         (riscv_frame_cache): Update return type, create
1978         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1979         details.
1980         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1981         (riscv_frame_prev_register): Use the trad_frame within the
1982         riscv_unwind_cache.
1983         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1984         flag.
1985
1986 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1987
1988         * trad-frame.h (trad_frame_set_realreg): Declare.
1989         (trad_frame_set_addr): Declare.
1990         * trad-frame.c (trad_frame_set_realreg): Define new function.
1991         (trad_frame_set_addr): Define new function.
1992         (trad_frame_set_reg_realreg): Use new function.
1993         (trad_frame_set_reg_addr): Use new function.
1994
1995 2018-09-01  Keith Seitz  <keiths@redhat.com>
1996
1997         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1998         pulongest instead of "%lld".
1999         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2000         ATTRIBUTE_UNUSED.
2001
2002 2018-08-31  Tom Tromey  <tom@tromey.com>
2003
2004         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2005         variant part type.
2006
2007 2018-08-31  Pedro Alves  <palves@redhat.com>
2008
2009         * gdbarch.h: Regenerate.
2010
2011 2018-08-31  Pedro Alves  <palves@redhat.com>
2012
2013         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2014         * target.h (Hardware watchpoint interfaces): Describe
2015         continuable/steppable/non-steppable watchpoints.
2016         * gdbarch.h, gdbarch.c: Regenerate.
2017
2018 2018-08-31  Pedro Alves  <palves@redhat.com>
2019
2020         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2021         Delete.
2022         * s390-linux-nat.c
2023         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2024         * target.h (target_ops::have_continuable_watchpoint): Delete.
2025         (target_have_continuable_watchpoint): Delete.
2026         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2027         * target-delegates.c: Regenerate.
2028
2029 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2030
2031         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2032         the files present in "gnulib/import/m4/".
2033
2034 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2035
2036         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2037         c.sw, c.swsp, and c.sdsp.
2038
2039 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2040
2041         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2042         (riscv_read_misa_reg): Don't cache value read into inferior data.
2043         (riscv_new_inferior_data): Delete.
2044         (riscv_inferior_data_cleanup): Delete.
2045         (riscv_inferior_data): Delete.
2046         (riscv_invalidate_inferior_data): Delete.
2047         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2048
2049 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2050
2051         * compile/compile-cplus-types.c
2052         (compile_cplus_instance::leave_scope): Take the address of scope
2053         object.
2054         (compile_cplus_instance::convert_qualified_base): Compare quals
2055         to 0.
2056
2057 2018-08-30  Keith Seitz  <keiths@redhat.com>
2058
2059         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2060         Use "%s" and host_address_to_string instead of "%p" in printf.
2061
2062 2018-08-29  Keith Seitz  <keiths@redhat.com>
2063
2064         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2065         and compile-cplus-types.c.
2066         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2067         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2068         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2069         Declare.
2070         * compile/compile-c-support.c: Include compile-cplus.h.
2071         (load_libcompile): Templatize.
2072         (get_compile_context): "New" function.
2073         (c_get_compile_context): Use get_compile_context.
2074         (cplus_get_compile_context): New function.
2075         (cplus_push_user_expression, cplus_pop_user_expression)
2076         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2077         (cplus_compute_program): Define new structs/functions.
2078         * compile/compile-cplus-symmbols.c: New file.
2079         * compile/compile-cplus-types.c: New file.
2080         * compile/compile-cplus.h: New file.
2081         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2082         Declare.
2083         * compile/compile-object-load.c (get_out_value_type): Use
2084         strncmp_iw when comparing symbol names.
2085         (compile_object_load): Add mst_bss and mst_data.
2086         * compile/compile.c (_initialize_compile): Remove
2087         -Wno-implicit-function-declaration from `compile_args'.
2088         * compile/gcc-cp-plugin.h: New file.
2089         * NEWS: Mention C++ compile support and new debug options.
2090
2091 2018-08-29  Keith Seitz  <keiths@redhat.com>
2092
2093         * linespec.c (collect_info::add_symbol): Make virtual.
2094         (struct symbol_searcher_collect_info): New struct.
2095         (symbol_searcher::find_all_symbols): New method.
2096         * symtab.h (class symbol_searcher): New class.
2097
2098 2018-08-29  Keith Seitz  <keiths@redhat.com>
2099
2100         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2101         Change to vector of block_symbol.  Update all users.
2102         (struct collect_info) <symbols>: Likewise.
2103         (collect_info::add_symbol): Take block_symbol as argument.
2104         Update all callers.
2105         (decode_compound_collector) <m_symbols>: Change type to vector
2106         of block_symbol.  Update all users.
2107         (decode_compound_collector::operator ()): Change parameter type
2108         to block_symbol.
2109         (find_method, find_function_symbols, find_linespec_symbols)
2110         (find_label_symbols_in_block, find_label_symbols): Change symbol
2111         vectors to block_symbol vectors.
2112         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2113         block_symbol.
2114
2115 2018-08-29  Keith Seitz  <keiths@redhat.com>
2116
2117         * linespec.c (symbolp): Remove typedef and VEC definitions.
2118         (bound_minimal_symbol_d): Likewise.
2119
2120 2018-08-29  Keith Seitz  <keiths@redhat.com>
2121
2122         * linespec.c (decode_compound_collector::decode_compound_collector):
2123         Remove initialization for `m_symtabs'.
2124         (decode_compound_collector::release_symbols): Change return type
2125         to std::vector.  Update all callers.
2126         (class decode_compound_collector) <m_symbols>: Change type to
2127         std::vector.
2128         (lookup_prefix_sym): Change return type to std::vector.  Update all
2129         callers.
2130         (compare_symbols): Remove.
2131         (std_compare_symbols): Rename to `compare_symbols'.
2132         (find_method): Change `sym_classes' parameter to std::vector.
2133         Update all callers.  Use std::sort to sort sym_classes.
2134         (find_linespec_symbols): Remove cleanup.
2135
2136 2018-08-29  Keith Seitz  <keiths@redhat.com>
2137
2138         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2139         std::vector.  Update all users.
2140         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2141         (struct collect_info) <minimal_symbols>: Likewise.
2142         (compare_msymbols): Return bool.  Change parameters to const
2143         bound_minimal_symbol references.
2144         (find_method, find_function_symbols, find_linespec_symbols): Change
2145         `minsyms' parameter to std::vector.  Update all callers.
2146
2147 2018-08-29  Keith Seitz  <keiths@redhat.com>
2148
2149         * linespec.c (struct linespec) <label_symbols>: Change type to
2150         std::vector.  Update all users.
2151         (find_label_symbols_in_block): Change `result' parameter to
2152         std::vector.  Update all callers.
2153         (find_label_symbols): Return std::vector.  Update all callers.
2154
2155 2018-08-29  Keith Seitz  <keiths@redhat.com>
2156
2157         * linespec.c (struct linespec) <function_symbols>: Change type to
2158         std::vector.  Update all users.
2159         (struct collect_info) <function_symbols>: Likewise.
2160         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2161         (std_compare_symbols): New function.
2162         (find_method, find_function_symbols, find_linespec_symbols)
2163         (find_label_symbols_in_block): Change `symbols' parameter to
2164         std::vector.  Update all callers.
2165         (find_label_symbols): Likewise for `function_symbols' and
2166         `label_funcs_ret'.
2167
2168 2018-08-29  Keith Seitz  <keiths@redhat.com>
2169
2170         * linespec.c (symtab_vector_up): Define.
2171         (struct linespec) <file_symtabs>: Change type to std::vector *.
2172         Update all uses.
2173         (struct collect_info) <file_symtabs>: Likewise.
2174         (collect_symtabs_from_filename): Return symtab_vector_up.
2175         Update all callers.
2176         (decode_objc): Remove cleanup.
2177         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2178         (symtab_collector::release_symtabs): Return symtab_vector_up.
2179         Update all callers.
2180         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2181         Update all users.
2182         (collect_symtabs_from_filename, symtabs_from_filename): Return
2183         symtab_vector_up.  Update all callers.
2184
2185 2018-08-29  Tom Tromey  <tom@tromey.com>
2186
2187         * csky-tdep.c (csky_analyze_prologue): Use
2188         core_addr_to_string_nz.
2189
2190 2018-08-29  Tom Tromey  <tom@tromey.com>
2191
2192         * windows-nat.c (struct xlate_exception) <them>: Change type to
2193         DWORD.
2194         (xlate): Fix formatting.  Remove last entry.
2195         (struct xlate_exception, xlate): Comment out.
2196         (windows_nat_target::resume): Use ranged for.
2197
2198 2018-08-29  Jim Wilson  <jimw@sifive.com>
2199
2200         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2201         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2202         of NT_PRFPREG.
2203         (riscv_linux_nat_target::store_registers): Likewise.
2204
2205 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2206
2207         PR gdb/23555
2208         PR gdb/23558
2209         * gnulib/aclocal.m4: Regenerate.
2210         * gnulib/config.in: Regenerate.
2211         * gnulib/configure: Regenerate.
2212         * gnulib/import/Makefile.am: Update.
2213         * gnulib/import/Makefile.in: Update.
2214         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2215         * gnulib/import/_Noreturn.h: ... this.
2216         * gnulib/import/alloca.in.h: Update.
2217         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2218         * gnulib/import/arg-nonnull.h: ... this.
2219         * gnulib/import/assure.h: Update.
2220         * gnulib/import/at-func.c: Update.
2221         * gnulib/import/basename-lgpl.c: Update.
2222         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2223         * gnulib/import/c++defs.h: ... this.
2224         * gnulib/import/canonicalize-lgpl.c: Update.
2225         * gnulib/import/cdefs.h: Update.
2226         * gnulib/import/chdir-long.c: Update.
2227         * gnulib/import/chdir-long.h: Update.
2228         * gnulib/import/cloexec.c: Update.
2229         * gnulib/import/cloexec.h: Update.
2230         * gnulib/import/close.c: Update.
2231         * gnulib/import/closedir.c: Update.
2232         * gnulib/import/config.charset: Update.
2233         * gnulib/import/dirent-private.h: Update.
2234         * gnulib/import/dirent.in.h: Update.
2235         * gnulib/import/dirfd.c: Update.
2236         * gnulib/import/dirname-lgpl.c: Update.
2237         * gnulib/import/dirname.h: Update.
2238         * gnulib/import/dosname.h: Update.
2239         * gnulib/import/dup-safer-flag.c: Update.
2240         * gnulib/import/dup-safer.c: Update.
2241         * gnulib/import/dup.c: Update.
2242         * gnulib/import/dup2.c: Update.
2243         * gnulib/import/errno.in.h: Update.
2244         * gnulib/import/error.c: Update.
2245         * gnulib/import/error.h: Update.
2246         * gnulib/import/exitfail.c: Update.
2247         * gnulib/import/exitfail.h: Update.
2248         * gnulib/import/extra/update-copyright: Update.
2249         * gnulib/import/fchdir.c: Update.
2250         * gnulib/import/fcntl.c: Update.
2251         * gnulib/import/fcntl.in.h: Update.
2252         * gnulib/import/fd-hook.c: Update.
2253         * gnulib/import/fd-hook.h: Update.
2254         * gnulib/import/fd-safer-flag.c: Update.
2255         * gnulib/import/fd-safer.c: Update.
2256         * gnulib/import/fdopendir.c: Update.
2257         * gnulib/import/filename.h: Update.
2258         * gnulib/import/filenamecat-lgpl.c: Update.
2259         * gnulib/import/filenamecat.h: Update.
2260         * gnulib/import/flexmember.h: Update.
2261         * gnulib/import/float+.h: Update.
2262         * gnulib/import/float.c: Update.
2263         * gnulib/import/float.in.h: Update.
2264         * gnulib/import/fnmatch.c: Update.
2265         * gnulib/import/fnmatch.in.h: Update.
2266         * gnulib/import/fnmatch_loop.c: Update.
2267         * gnulib/import/fpucw.h: Update.
2268         * gnulib/import/frexp.c: Update.
2269         * gnulib/import/frexpl.c: Update.
2270         * gnulib/import/fstat.c: Update.
2271         * gnulib/import/fstatat.c: Update.
2272         * gnulib/import/getcwd-lgpl.c: Update.
2273         * gnulib/import/getcwd.c: Update.
2274         * gnulib/import/getdtablesize.c: Update.
2275         * gnulib/import/getlogin_r.c: Update.
2276         * gnulib/import/getprogname.c: Update.
2277         * gnulib/import/getprogname.h: Update.
2278         * gnulib/import/gettext.h: Update.
2279         * gnulib/import/gettimeofday.c: Update.
2280         * gnulib/import/glob-libc.h: Update.
2281         * gnulib/import/glob.c: Update.
2282         * gnulib/import/glob.in.h: Update.
2283         * gnulib/import/glob_internal.h: Update.
2284         * gnulib/import/glob_pattern_p.c: Update.
2285         * gnulib/import/globfree.c: Update.
2286         * gnulib/import/hard-locale.c: Update.
2287         * gnulib/import/hard-locale.h: Update.
2288         * gnulib/import/intprops.h: Update.
2289         * gnulib/import/inttypes.in.h: Update.
2290         * gnulib/import/isnan.c: Update.
2291         * gnulib/import/isnand-nolibm.h: Update.
2292         * gnulib/import/isnand.c: Update.
2293         * gnulib/import/isnanl-nolibm.h: Update.
2294         * gnulib/import/isnanl.c: Update.
2295         * gnulib/import/itold.c: Update.
2296         * gnulib/import/libc-config.h: Update.
2297         * gnulib/import/limits.in.h: Update.
2298         * gnulib/import/localcharset.c: Update.
2299         * gnulib/import/localcharset.h: Update.
2300         * gnulib/import/localtime-buffer.c: Update.
2301         * gnulib/import/localtime-buffer.h: Update.
2302         * gnulib/import/lstat.c: Update.
2303         * gnulib/import/m4/00gnulib.m4: Update.
2304         * gnulib/import/m4/__inline.m4: Update.
2305         * gnulib/import/m4/absolute-header.m4: Update.
2306         * gnulib/import/m4/alloca.m4: Update.
2307         * gnulib/import/m4/builtin-expect.m4: Update.
2308         * gnulib/import/m4/canonicalize.m4: Update.
2309         * gnulib/import/m4/chdir-long.m4: Update.
2310         * gnulib/import/m4/close.m4: Update.
2311         * gnulib/import/m4/closedir.m4: Update.
2312         * gnulib/import/m4/configmake.m4: Update.
2313         * gnulib/import/m4/d-ino.m4: Update.
2314         * gnulib/import/m4/d-type.m4: Update.
2315         * gnulib/import/m4/dirent_h.m4: Update.
2316         * gnulib/import/m4/dirfd.m4: Update.
2317         * gnulib/import/m4/dirname.m4: Update.
2318         * gnulib/import/m4/double-slash-root.m4: Update.
2319         * gnulib/import/m4/dup.m4: Update.
2320         * gnulib/import/m4/dup2.m4: Update.
2321         * gnulib/import/m4/eealloc.m4: Update.
2322         * gnulib/import/m4/environ.m4: Update.
2323         * gnulib/import/m4/errno_h.m4: Update.
2324         * gnulib/import/m4/error.m4: Update.
2325         * gnulib/import/m4/exponentd.m4: Update.
2326         * gnulib/import/m4/exponentl.m4: Update.
2327         * gnulib/import/m4/extensions.m4: Update.
2328         * gnulib/import/m4/extern-inline.m4: Update.
2329         * gnulib/import/m4/fchdir.m4: Update.
2330         * gnulib/import/m4/fcntl-o.m4: Update.
2331         * gnulib/import/m4/fcntl.m4: Update.
2332         * gnulib/import/m4/fcntl_h.m4: Update.
2333         * gnulib/import/m4/fdopendir.m4: Update.
2334         * gnulib/import/m4/filenamecat.m4: Update.
2335         * gnulib/import/m4/flexmember.m4: Update.
2336         * gnulib/import/m4/float_h.m4: Update.
2337         * gnulib/import/m4/fnmatch.m4: Update.
2338         * gnulib/import/m4/fnmatch_h.m4: Update.
2339         * gnulib/import/m4/fpieee.m4: Update.
2340         * gnulib/import/m4/frexp.m4: Update.
2341         * gnulib/import/m4/frexpl.m4: Update.
2342         * gnulib/import/m4/fstat.m4: Update.
2343         * gnulib/import/m4/fstatat.m4: Update.
2344         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2345         * gnulib/import/m4/getcwd-path-max.m4: Update.
2346         * gnulib/import/m4/getcwd.m4: Update.
2347         * gnulib/import/m4/getdtablesize.m4: Update.
2348         * gnulib/import/m4/getlogin.m4: Update.
2349         * gnulib/import/m4/getlogin_r.m4: Update.
2350         * gnulib/import/m4/getpagesize.m4: Update.
2351         * gnulib/import/m4/getprogname.m4: Update.
2352         * gnulib/import/m4/gettimeofday.m4: Update.
2353         * gnulib/import/m4/glibc21.m4: Update.
2354         * gnulib/import/m4/glob.m4: Update.
2355         * gnulib/import/m4/glob_h.m4: Update.
2356         * gnulib/import/m4/gnulib-cache.m4: Update.
2357         * gnulib/import/m4/gnulib-common.m4: Update.
2358         * gnulib/import/m4/gnulib-comp.m4: Update.
2359         * gnulib/import/m4/gnulib-tool.m4: Update.
2360         * gnulib/import/m4/hard-locale.m4: Update.
2361         * gnulib/import/m4/include_next.m4: Update.
2362         * gnulib/import/m4/inttypes-pri.m4: Update.
2363         * gnulib/import/m4/inttypes.m4: Update.
2364         * gnulib/import/m4/isnand.m4: Update.
2365         * gnulib/import/m4/isnanl.m4: Update.
2366         * gnulib/import/m4/largefile.m4: Update.
2367         * gnulib/import/m4/limits-h.m4: Update.
2368         * gnulib/import/m4/localcharset.m4: Update.
2369         * gnulib/import/m4/locale-fr.m4: Update.
2370         * gnulib/import/m4/locale-ja.m4: Update.
2371         * gnulib/import/m4/locale-zh.m4: Update.
2372         * gnulib/import/m4/localtime-buffer.m4: Update.
2373         * gnulib/import/m4/longlong.m4: Update.
2374         * gnulib/import/m4/lstat.m4: Update.
2375         * gnulib/import/m4/malloc.m4: Update.
2376         * gnulib/import/m4/malloca.m4: Update.
2377         * gnulib/import/m4/math_h.m4: Update.
2378         * gnulib/import/m4/mbrtowc.m4: Update.
2379         * gnulib/import/m4/mbsinit.m4: Update.
2380         * gnulib/import/m4/mbsrtowcs.m4: Update.
2381         * gnulib/import/m4/mbstate_t.m4: Update.
2382         * gnulib/import/m4/memchr.m4: Update.
2383         * gnulib/import/m4/memmem.m4: Update.
2384         * gnulib/import/m4/mempcpy.m4: Update.
2385         * gnulib/import/m4/memrchr.m4: Update.
2386         * gnulib/import/m4/mkdir.m4: Update.
2387         * gnulib/import/m4/mkstemp.m4: Update.
2388         * gnulib/import/m4/mmap-anon.m4: Update.
2389         * gnulib/import/m4/mode_t.m4: Update.
2390         * gnulib/import/m4/msvc-inval.m4: Update.
2391         * gnulib/import/m4/msvc-nothrow.m4: Update.
2392         * gnulib/import/m4/multiarch.m4: Update.
2393         * gnulib/import/m4/nocrash.m4: Update.
2394         * gnulib/import/m4/off_t.m4: Update.
2395         * gnulib/import/m4/onceonly.m4: Update.
2396         * gnulib/import/m4/open-cloexec.m4: Update.
2397         * gnulib/import/m4/open.m4: Update.
2398         * gnulib/import/m4/openat.m4: Update.
2399         * gnulib/import/m4/opendir.m4: Update.
2400         * gnulib/import/m4/pathmax.m4: Update.
2401         * gnulib/import/m4/rawmemchr.m4: Update.
2402         * gnulib/import/m4/readdir.m4: Update.
2403         * gnulib/import/m4/readlink.m4: Update.
2404         * gnulib/import/m4/realloc.m4: Update.
2405         * gnulib/import/m4/rename.m4: Update.
2406         * gnulib/import/m4/rewinddir.m4: Update.
2407         * gnulib/import/m4/rmdir.m4: Update.
2408         * gnulib/import/m4/save-cwd.m4: Update.
2409         * gnulib/import/m4/secure_getenv.m4: Update.
2410         * gnulib/import/m4/setenv.m4: Update.
2411         * gnulib/import/m4/signal_h.m4: Update.
2412         * gnulib/import/m4/ssize_t.m4: Update.
2413         * gnulib/import/m4/stat-time.m4: Update.
2414         * gnulib/import/m4/stat.m4: Update.
2415         * gnulib/import/m4/std-gnu11.m4: Update.
2416         * gnulib/import/m4/stdbool.m4: Update.
2417         * gnulib/import/m4/stddef_h.m4: Update.
2418         * gnulib/import/m4/stdint.m4: Update.
2419         * gnulib/import/m4/stdio_h.m4: Update.
2420         * gnulib/import/m4/stdlib_h.m4: Update.
2421         * gnulib/import/m4/strchrnul.m4: Update.
2422         * gnulib/import/m4/strdup.m4: Update.
2423         * gnulib/import/m4/strerror.m4: Update.
2424         * gnulib/import/m4/string_h.m4: Update.
2425         * gnulib/import/m4/strstr.m4: Update.
2426         * gnulib/import/m4/strtok_r.m4: Update.
2427         * gnulib/import/m4/sys_socket_h.m4: Update.
2428         * gnulib/import/m4/sys_stat_h.m4: Update.
2429         * gnulib/import/m4/sys_time_h.m4: Update.
2430         * gnulib/import/m4/sys_types_h.m4: Update.
2431         * gnulib/import/m4/tempname.m4: Update.
2432         * gnulib/import/m4/time_h.m4: Update.
2433         * gnulib/import/m4/unistd-safer.m4: Update.
2434         * gnulib/import/m4/unistd_h.m4: Update.
2435         * gnulib/import/m4/warn-on-use.m4: Update.
2436         * gnulib/import/m4/wchar_h.m4: Update.
2437         * gnulib/import/m4/wchar_t.m4: Update.
2438         * gnulib/import/m4/wctype_h.m4: Update.
2439         * gnulib/import/m4/wint_t.m4: Update.
2440         * gnulib/import/malloc.c: Update.
2441         * gnulib/import/malloc/scratch_buffer.h: Update.
2442         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2443         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2444         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2445         * gnulib/import/malloca.c: Update.
2446         * gnulib/import/malloca.h: Update.
2447         * gnulib/import/malloca.valgrind: Update.
2448         * gnulib/import/math.in.h: Update.
2449         * gnulib/import/mbrtowc.c: Update.
2450         * gnulib/import/mbsinit.c: Update.
2451         * gnulib/import/mbsrtowcs-impl.h: Update.
2452         * gnulib/import/mbsrtowcs-state.c: Update.
2453         * gnulib/import/mbsrtowcs.c: Update.
2454         * gnulib/import/memchr.c: Update.
2455         * gnulib/import/memmem.c: Update.
2456         * gnulib/import/mempcpy.c: Update.
2457         * gnulib/import/memrchr.c: Update.
2458         * gnulib/import/mkdir.c: Update.
2459         * gnulib/import/mkstemp.c: Update.
2460         * gnulib/import/msvc-inval.c: Update.
2461         * gnulib/import/msvc-inval.h: Update.
2462         * gnulib/import/msvc-nothrow.c: Update.
2463         * gnulib/import/msvc-nothrow.h: Update.
2464         * gnulib/import/open.c: Update.
2465         * gnulib/import/openat-die.c: Update.
2466         * gnulib/import/openat-priv.h: Update.
2467         * gnulib/import/openat-proc.c: Update.
2468         * gnulib/import/openat.c: Update.
2469         * gnulib/import/openat.h: Update.
2470         * gnulib/import/opendir.c: Update.
2471         * gnulib/import/pathmax.h: Update.
2472         * gnulib/import/pipe-safer.c: Update.
2473         * gnulib/import/rawmemchr.c: Update.
2474         * gnulib/import/readdir.c: Update.
2475         * gnulib/import/readlink.c: Update.
2476         * gnulib/import/realloc.c: Update.
2477         * gnulib/import/ref-add.sin: Update.
2478         * gnulib/import/ref-del.sin: Update.
2479         * gnulib/import/rename.c: Update.
2480         * gnulib/import/rewinddir.c: Update.
2481         * gnulib/import/rmdir.c: Update.
2482         * gnulib/import/same-inode.h: Update.
2483         * gnulib/import/save-cwd.c: Update.
2484         * gnulib/import/save-cwd.h: Update.
2485         * gnulib/import/scratch_buffer.h: Update.
2486         * gnulib/import/secure_getenv.c: Update.
2487         * gnulib/import/setenv.c: Update.
2488         * gnulib/import/signal.in.h: Update.
2489         * gnulib/import/stat-time.c: Update.
2490         * gnulib/import/stat-time.h: Update.
2491         * gnulib/import/stat-w32.c: Update.
2492         * gnulib/import/stat-w32.h: Update.
2493         * gnulib/import/stat.c: Update.
2494         * gnulib/import/stdbool.in.h: Update.
2495         * gnulib/import/stddef.in.h: Update.
2496         * gnulib/import/stdint.in.h: Update.
2497         * gnulib/import/stdio.in.h: Update.
2498         * gnulib/import/stdlib.in.h: Update.
2499         * gnulib/import/str-two-way.h: Update.
2500         * gnulib/import/strchrnul.c: Update.
2501         * gnulib/import/strdup.c: Update.
2502         * gnulib/import/streq.h: Update.
2503         * gnulib/import/strerror-override.c: Update.
2504         * gnulib/import/strerror-override.h: Update.
2505         * gnulib/import/strerror.c: Update.
2506         * gnulib/import/string.in.h: Update.
2507         * gnulib/import/stripslash.c: Update.
2508         * gnulib/import/strnlen1.c: Update.
2509         * gnulib/import/strnlen1.h: Update.
2510         * gnulib/import/strstr.c: Update.
2511         * gnulib/import/strtok_r.c: Update.
2512         * gnulib/import/sys_stat.in.h: Update.
2513         * gnulib/import/sys_time.in.h: Update.
2514         * gnulib/import/sys_types.in.h: Update.
2515         * gnulib/import/tempname.c: Update.
2516         * gnulib/import/tempname.h: Update.
2517         * gnulib/import/time.in.h: Update.
2518         * gnulib/import/unistd--.h: Update.
2519         * gnulib/import/unistd-safer.h: Update.
2520         * gnulib/import/unistd.in.h: Update.
2521         * gnulib/import/unsetenv.c: Update.
2522         * gnulib/import/verify.h: Update.
2523         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2524         * gnulib/import/wchar.in.h: Update.
2525         * gnulib/import/wctype.in.h: Update.
2526         * gnulib/import/xalloc-oversized.h: Update.
2527         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2528         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2529
2530 2018-08-16  Gary Benson <gbenson@redhat.com>
2531
2532         PR gdb/13000:
2533         * gdb/main.c (captured_main_1): Exit with nonzero status
2534         in batch mode if the last command to be executed failed.
2535         * NEWS: Mention the above.
2536
2537 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2538
2539         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2540         end of warning message.
2541
2542 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2543
2544         PR gdb/22943:
2545         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2546         (aarch64_extract_return_value): Use
2547         aapcs_is_vfp_call_or_return_candidate.
2548         (aarch64_return_in_memory): Likewise.
2549         (aarch64_store_return_value): Likewise.
2550
2551 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2552
2553         * aarch64-tdep.c
2554         (aapcs_is_vfp_call_or_return_candidate): Make static
2555         (pass_in_v_or_stack): Remove function.
2556         (pass_in_v_vfp_candidate): New function.
2557         (aarch64_push_dummy_call): Check for float register candidates.
2558
2559 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2560
2561         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2562         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2563         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2564
2565 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2566
2567         PR build/23399
2568         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2569         (struct ipa_sym_addresses): Rename to...
2570         (struct ipa_sym_addresses_common): ... this.
2571         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2572
2573 2018-08-28  Tom Tromey  <tom@tromey.com>
2574
2575         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2576         (token_fifo): Now a std::vector.
2577         (yylex, c_parse): Update.
2578         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2579         (token_fifo): Now a std::vector.
2580         (yylex, d_parse): Update.
2581         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2582         (token_fifo): Now a std::vector.
2583         (yylex, go_parse): Update.
2584
2585 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2586
2587         * parser-defs.h (struct type_stack) <elements>: Change type to
2588         std::vector<union type_stack_elt>.
2589         <depth, size>: Remove.
2590         * parse.c (parse_exp_in_context_1): Adjust.
2591         (type_stack_reserve): Remove.
2592         (check_type_stack_depth): Remove.
2593         (insert_into_type_stack): Adjust to std::vector.
2594         (insert_type): Likewise.
2595         (push_type): Likewise.
2596         (push_type_int): Likewise.
2597         (insert_type_address_space): Likewise.
2598         (pop_type): Likewise.
2599         (pop_type_int): Likewise.
2600         (pop_typelist): Likewise.
2601         (pop_type_stack): Likewise.
2602         (append_type_stack): Likewise.
2603         (push_type_stack): Likewise.
2604         (get_type_stack): Likewise.
2605         (type_stack_cleanup): Likewise.
2606         (push_typelist): Likewise.
2607         (follow_types): Likewise.
2608         (_initialize_parse): Likewise.
2609
2610 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2611
2612         * NEWS: Mention csky target.
2613
2614 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2615             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2616             Don Breazeal  <donb@codesourcery.com>
2617
2618         * csky-linux-tdep.c: New file.
2619         * csky-tdep.c: Likewise.
2620         * csky-tdep.h: Likewise.
2621         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2622         csky-tdep.o.
2623         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2624         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2625         * configure.tgt: Add csky support.
2626
2627 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2628
2629         * python/py-framefilter.c (py_print_frame): Print frame architecture
2630         when printing on an MI output.
2631
2632 2018-08-27  Tom Tromey  <tom@tromey.com>
2633
2634         PR build/23087:
2635         * configure: Rebuild.
2636         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2637
2638 2018-08-27  Tom Tromey  <tom@tromey.com>
2639
2640         * aarch64-linux-tdep.c
2641         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2642         casts to int.
2643
2644 2018-08-27  Tom Tromey  <tom@tromey.com>
2645
2646         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2647         unsigned.
2648         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2649         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2650         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2651         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2652         unsigned.
2653
2654 2018-08-27  Tom Tromey  <tom@tromey.com>
2655
2656         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2657         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2658
2659 2018-08-27  Tom Tromey  <tom@tromey.com>
2660
2661         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2662         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2663         ULONGEST_MAX.
2664         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2665         ULONGEST_MAX.
2666         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2667         ULONGEST_MAX.
2668         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2669         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2670         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2671         ULONGEST_MAX.
2672         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2673         (ppc64_linux_sigaction_tramp_frame)
2674         (ppc32_linux_sighandler_tramp_frame)
2675         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2676         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2677         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2678         * mn10300-linux-tdep.c (am33_linux_sigframe)
2679         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2680         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2681         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2682         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2683         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2684         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2685         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2686         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2687         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2688         * microblaze-linux-tdep.c
2689         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2690         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2691         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2692         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2693         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2694         * common/common-types.h (ULONGEST_MAX): New define.
2695         (CORE_ADDR_MAX): Fix formatting.
2696         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2697         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2698         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2699         (arm_linux_rt_sigreturn_tramp_frame)
2700         (arm_eabi_linux_sigreturn_tramp_frame)
2701         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2702         (thumb2_eabi_linux_sigreturn_tramp_frame)
2703         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2704         (arm_linux_restart_syscall_tramp_frame)
2705         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2706         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2707         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2708         ULONGEST_MAX.
2709         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2710
2711 2018-08-27  Tom Tromey  <tom@tromey.com>
2712
2713         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2714         CORE_ADDR_MAX.
2715         * mips-tdep.c (mips_deal_with_atomic_sequence)
2716         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2717         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2718         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2719         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2720         CORE_ADDR_MAX.
2721         * aarch64-tdep.c (aarch64_software_single_step): Use
2722         CORE_ADDR_MAX.
2723
2724 2018-08-27  Tom Tromey  <tom@tromey.com>
2725
2726         * linespec.c (complete_linespec_component): Add cast to "char".
2727         * completer.c (completion_tracker::build_completion_result): Add
2728         cast to "char".
2729
2730 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2731
2732         * solist.h (struct solist, struct target_so_ops): Fix
2733         indentation.
2734
2735 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2736
2737         * ada-tasks.c (ada_task_info_s): Remove typedef.
2738         (DEF_VEC_O(ada_task_info_s)): Remove.
2739         (struct ada_tasks_inferior_data): Initialize fields.
2740         <task_list>: Make an std::vector.
2741         (get_ada_tasks_inferior_data): Allocate with new.
2742         (ada_get_task_number): Adjust.
2743         (get_task_number_from_id): Likewise.
2744         (valid_task_id): Likewise.
2745         (ada_get_task_info_from_ptid): Likewise.
2746         (iterate_over_live_ada_tasks): Likewise.
2747         (add_ada_task): Likewise.
2748         (read_known_tasks): Likewise.
2749         (ada_build_task_list): Likewise.
2750         (print_ada_task_info): Likewise.
2751         (info_task): Likewise.
2752         (task_command_1): Likewise.
2753
2754 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2755
2756         * ada-lang.c (add_angle_brackets): Return std::string.
2757
2758 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2759
2760         * python/py-threadevent.c (py_get_event_thread): Initialize
2761         pythread.
2762
2763 2018-08-24  Pedro Alves  <palves@redhat.com>
2764
2765         * python/py-bpevent.c (create_breakpoint_event_object): Use
2766         copy-initialization.
2767         * python/py-continueevent.c (emit_continue_event): Use
2768         copy-initialization.
2769         * python/py-exitedevent.c (create_exited_event_object): Return a
2770         gdbpy_ref<>.
2771         (emit_exited_event): Use copy-initialization.
2772         * python/py-inferior.c (python_new_inferior)
2773         (python_inferior_deleted, add_thread_object): Use
2774         copy-initialization.
2775         * python/py-infevents.c (create_inferior_call_event_object)
2776         (create_register_changed_event_object)
2777         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2778         (emit_inferior_call_event, emit_memory_changed_event)
2779         (emit_register_changed_event): Use copy-initialization.
2780         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2781         Return a gdbpy_ref<>.
2782         (emit_new_objfile_event): Use copy-initialization.
2783         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2784         (emit_clear_objfiles_event): Use copy-initialization.
2785         * python/py-signalevent.c (create_signal_event_object): Use
2786         copy-initialization.
2787         * python/py-threadevent.c (create_thread_event_object): Use
2788         copy-initialization.
2789
2790 2018-08-24  Pedro Alves  <palves@redhat.com>
2791             Simon Marchi  <simon.marchi@ericsson.com>
2792
2793         PR gdb/23379
2794         * python/py-continueevent.c: Include "gdbthread.h".
2795         (create_continue_event_object): Add intro comment.  Add 'ptid'
2796         parameter.  Use it to find thread to pass to
2797         create_thread_event_object.
2798         (emit_continue_event): Pass PTID down to
2799         create_continue_event_object.
2800         * python/py-event.h (py_get_event_thread): Declare.
2801         (create_thread_event_object): Remove default from 'thread'
2802         parameter.
2803         * python/py-stopevent.c (create_stop_event_object): Use
2804         py_get_event_thread.
2805         * python/py-threadevent.c (get_event_thread): Rename to ...
2806         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2807         and use it to find the thread.
2808         (create_thread_event_object): Assert that THREAD isn't null.
2809         Don't find the event thread here.
2810
2811 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2812
2813         * block.h (blockrange, blockranges): New struct declarations.
2814         (struct block): Add new field named `ranges'.
2815         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2816         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2817         macros for accessing ranges in struct block.
2818         (make_blockranges): New declaration.
2819         block.c (make_blockranges): New function.
2820         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2821         for block.
2822         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2823         * blockframe.c (cache_pc_function_block): New static global.
2824         (clear_pc_function_cache): Clear cache_pc_function_block.
2825         (find_pc_partial_function): Move comment to symtab.h.  Add
2826         support for non-contiguous blocks.
2827         * cli/cli-cmds.c (block.h): Include.
2828         (print_disassembly): Handle printing of non-contiguous blocks.
2829         (disassemble_current_function): Likewise.
2830         (disassemble_command): Likewise.
2831
2832         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2833         BLOCK_START.
2834         * blockframe.c (get_pc_function_start): Likewise.
2835         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2836         (gcc_symbol_address): Likewise.
2837         * compile/compile-object-run.c (compile_object_run): Likewise.
2838         * compile/compile.c (get_expr_block_and_pc): Likewise.
2839         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2840         (func_addr_to_tail_call_list): Likewise.
2841         * findvar.c (default_read_var_value): Likewise.
2842         * inline-frame.c (inline_frame_this_id): Likewise.
2843         (skip-inline_frames): Likewise.
2844         * infcmd.c (until_next_command): Likewise.
2845         * linespec.c (convert_linespec_to_sals): Likewise.
2846         * parse.c (parse_exp_in_context_1): Likewise.
2847         * printcmd.c (build_address_symbolic): likewise.
2848         (info_address_command): Likewise.
2849         symtab.c (find_function_start_sal): Likewise.
2850         (skip_prologue_sal): Likewise.
2851         (find_function_alias_target): Likewise.
2852         (find_gnu_ifunc): Likewise.
2853         * stack.c (find_frame_funname): Likewise.
2854         * symtab.c (fixup_symbol_section): Likewise.
2855         (find_function_start_sal): Likewise.
2856         (skip_prologue_sal): Likewsie.
2857         (find_function_alias_target): Likewise.
2858         (find_gnu_ifunc): Likewise.
2859         * tracepoint.c (info_scope_command): Likewise.
2860         * value.c (value_fn_field): Likewise.
2861
2862         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2863         in place of find_pc_partial_function.
2864         * blockframe.c (find_function_entry_range_from_pc): New function.
2865         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2866         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2867         for each range in a block.
2868
2869
2870 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2871
2872         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2873         incrementation.
2874
2875 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2876
2877         * solib-svr4.c (read_program_headers_from_bfd): Return
2878         gdb::optional<gdb::byte_vector>.
2879         (svr4_exec_displacement): Adjust.
2880
2881 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2882
2883         * solib-svr4.c (read_program_header): Return
2884         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2885         (find_program_interpreter): Return
2886         gdb::optional<gdb::byte_vector>.
2887         (scan_dyntag_auxv): Adjust.
2888         (enable_break): Adjust.
2889         (svr4_exec_displacement): Adjust.
2890
2891 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2892
2893         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2894         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2895
2896 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2897
2898         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2899         string_vprintf.
2900         * guile/scm-utils.c (gdbscm_printf): Likewise.
2901         * serial.c (serial_printf): Likewise.
2902         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2903
2904 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2905
2906         * stack.c (print_frame): Print frame architecture when printing on
2907         an MI output.
2908         * NEWS: Mention new "arch" attribute in frame output.
2909
2910 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2911
2912         * arch/aarch64.h (aarch64_regnum): Update comment.
2913
2914 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2915
2916         * NEWS: Add SVE to 8.2 section.
2917
2918 2018-08-21  Pedro Alves  <palves@redhat.com>
2919
2920         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2921         out from gdbscm_parse_function_args.
2922         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2923         gdbscm_parse_function_args_1.
2924
2925 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2926
2927         PR gdb/17816
2928         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2929         operator.
2930
2931 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2932
2933         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2934
2935 2018-08-19  Michael Spang  <spang@google.com>
2936
2937         PR gdb/11786
2938         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2939         for PT_TLS segments.
2940
2941 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2942
2943         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2944         dwarf_variable_value.
2945         * dwarf2-frame.c (class dwarf_expr_executor):
2946         Add override for dwarf_variable_value.
2947         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2948         (class symbol_needs_eval_context): Likewise.
2949         (indirect_synthetic_pointer): Add forward declaration.
2950         (sect_variable_value): New function.
2951         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2952         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2953         for DW_OP_GNU_variable_value.
2954
2955 2018-08-16  Tom Tromey  <tom@tromey.com>
2956
2957         * top.c (read_command_file): Update.
2958         (command_line_input): Remove "repeat" argument.
2959         * ada-lang.c (get_selections): Update.
2960         * linespec.c (decode_line_2): Update.
2961         * defs.h (command_line_input): Remove argument.
2962         * cli/cli-script.c (read_next_line): Update.
2963         * python/py-gdb-readline.c: Update.
2964
2965 2018-08-17  Tom Tromey  <tom@tromey.com>
2966
2967         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2968         command_line_input.
2969
2970 2018-08-15  Tom Tromey  <tom@tromey.com>
2971
2972         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2973
2974 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2975
2976         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2977         If used, use find_pc_partial_function to find address range
2978         to disassemble.
2979         * mi/mi-main.c (mi_cmd_list_features): Report
2980         "data-disassemble-a-option" feature.
2981         * NEWS: Mention new -data-disassemble option -a.
2982
2983 2018-08-13  Tom Tromey  <tom@tromey.com>
2984
2985         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2986
2987 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2988
2989         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2990         (aarch64_linux_collect_sve_regset): Likewise.
2991         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2992         * regcache.h (regcache_map_entry_size): New function.
2993
2994 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2995
2996         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2997         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2998         (SVE_HEADER_VL_LENGTH): Likewise.
2999         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3000         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3001         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3002         (SVE_HEADER_SIZE_OFFSET): Likewise.
3003         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3004         (SVE_HEADER_VL_OFFSET): Likewise.
3005         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3006         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3007         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3008         (SVE_HEADER_SIZE): Likewise.
3009         (aarch64_linux_core_read_vq): Add function.
3010         (aarch64_linux_core_read_description): Check for SVE section.
3011
3012 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3013
3014         * aarch64-fbsd-tdep.c
3015         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3016         collect_size.
3017         * aarch64-linux-tdep.c
3018         (aarch64_linux_iterate_over_regset_sections): Likewise.
3019         * alpha-linux-tdep.c
3020         (alpha_linux_iterate_over_regset_sections):
3021         * alpha-nbsd-tdep.c
3022         (alphanbsd_iterate_over_regset_sections): Likewise.
3023         * amd64-fbsd-tdep.c
3024         (amd64fbsd_iterate_over_regset_sections): Likewise.
3025         * amd64-linux-tdep.c
3026         (amd64_linux_iterate_over_regset_sections): Likewise.
3027         * arm-bsd-tdep.c
3028         (armbsd_iterate_over_regset_sections): Likewise.
3029         * arm-fbsd-tdep.c
3030         (arm_fbsd_iterate_over_regset_sections): Likewise.
3031         * arm-linux-tdep.c
3032         (arm_linux_iterate_over_regset_sections): Likewise.
3033         * corelow.c (get_core_registers_cb): Likewise.
3034         (core_target::fetch_registers): Likewise.
3035         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3036         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3037         * gdbarch.h (void): Regenerate.
3038         * gdbarch.sh: Add supply_size and collect_size.
3039         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3040         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3041         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3042         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3043         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3044         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3045         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3046         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3047         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3048         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3049         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3050         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3051         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3052         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3053         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3054         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3055         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3056         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3057         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3058         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3059         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3060         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3061         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3062         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3063         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3064         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3065         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3066         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3067         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3068         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3069
3070 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3071
3072         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3073         with string_printf.
3074
3075 2018-08-10  Keith Seitz  <keiths@redhat.com>
3076
3077         * compile/compile-c-support.c (add_code_header, add_code_footer):
3078         Move into policy class.
3079         (c_push_user_expression, pop_user_expression_nop)
3080         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3081         (compile_program): New host class.
3082         (c_compile_program): New typedef.
3083         (c_compute_porgram): Use c_compile_program.
3084
3085 2018-08-10  Keith Seitz  <keiths@redhat.com>
3086
3087         * compile/compile-internal.h (compile_instance::~compile_instance):
3088         Remove calls to htab_delete.
3089         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3090         * compile.c (compile_instance::compile_instance): Initialize
3091         htab unique pointers.
3092         (compile_instance::get_cached_type, compile_instance::insert_type)
3093         (compile_instance::error_symbol_once): Update for unique_ptr.
3094
3095 2018-08-10  Keith Seitz  <keiths@redhat.com>
3096
3097         * compile/compile-c-symbols.c (struct symbol_error)
3098         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3099         (compile_instance::insert_symbol_error)
3100         (compile_instance::error_symbol_once): Move to ...
3101         * compile/compile.c: ... here.
3102
3103 2018-08-10  Keith Seitz  <keiths@redhat.com>
3104
3105         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3106         instead of `new_compile_instance'.
3107         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3108         Update description.
3109         If the symbol error map is not initialized, create it.
3110         (generate_c_for_for_one_symbol): Do not check/initialize
3111         the symbol error map.
3112         * compile/compile-c-types.c (compile_c_instance): Make a class.
3113         Update all callers.
3114         (compile_instance::compile_instance): Initialize the type cache.
3115         (get_cached_type): New function.
3116         (insert_type): Update description.
3117         (compile_c_instance::m_default_cflags): Define.
3118         (convert_type): Update description.  Use get_cached_type.
3119         (delete_instance): Moved to destructor.
3120         (new_compile_instance): Moved to constructor.
3121         * compile/compile-c.h (compile_c_instance): Make class inheriting
3122         from compile_instance.
3123         <base>: Remove field.
3124         <type_map, symbol_err_map>: Move to base class.
3125         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3126         * compile/compile-internal.h (compile_instance): Make class.
3127         <type_map_t, symbol_err_map_t>: Define.
3128         <fe>: Rename to `m_gcc_fe'.
3129         <scope, block, gcc_target_options>: Add `m_' prefix.
3130         <m_type_map, m_symbol_err_map>: New fields, moved from
3131         compile_c_instance.
3132         <destroy>: Remove.
3133         (convert_type, new_compile_instance): Remove.
3134         * compile/compile.c (cleanup_compile_instance): Remove.
3135         (compile_to_object): Use unique_ptr to eliminate cleanups.
3136         (compile_instance::set_print_callback, compile_instance::version)
3137         (compile_instance::set_verbose)
3138         (compile_instance::set_driver_filename)
3139         (compile_instance::set_triplet_regexp)
3140         (compile_instance::set_arguments)
3141         (compile_instance::set_source_file)
3142         (compile_instance::compile): Define.
3143
3144 2018-08-10  Keith Seitz  <keiths@redhat.com>
3145
3146         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3147         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3148         gcc-c-fe.def to define C plugin.
3149         (delete_instance): Delete `c_plugin'.
3150         (new_compile_instance): Initialize `c_plugin'.
3151         * compile/compile-c.h: Include gcc_c_plugin.h.
3152         (struct compile_c_instance) <c_plugin>: New member.
3153         * gcc-c-plugin.h: New file.
3154         Update all callers with API change.
3155
3156 2018-08-10  Keith Seitz  <keiths@redhat.com>
3157
3158         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3159         (HFILES_NO_SRCDIR): ... to here.
3160         Add compile-internal.h and compile-c.h.
3161         * compile/compile-c-support.c: Include compile-c.h.
3162         * compile/compile-c-symbols.c: Include compile-c.h.
3163         (generate_c_for_variable_locations): Update comment.
3164         * compile/compile-c-types.c: Include compile-c.h.
3165         * compile/compile-c.h: New file -- moved C language declarations
3166         from other files here.
3167         * compile/compile-internal.h: Do not include hashtab.h or
3168         common/enum-flags.h.
3169         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3170         (gcc_convert_symbol, gcc_symbol_address)
3171         (generate_c_for_variable_locations, c_get_mode_for_size)
3172         (c_get_range_decl_name): Definitions moved to compile-c.h.
3173         * compile/compile-loc2c.c: Include compile-c.h.
3174
3175 2018-08-10  Keith Seitz  <keiths@redhat.com>
3176
3177         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3178         (c_symbol_substitution_name): ... this.
3179         Update all callers.
3180
3181 2018-08-10  Keith Seitz  <keiths@redhat.com>
3182
3183         * compile/compile-c-support.c (c_compute_program): Use
3184         unique_xmalloc_ptr to eliminate cleanup.
3185         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3186         Return a unique_xmalloc_ptr and eliminate cleanup.
3187         * compile/compile-internal.h (generate_c_for_variable_locations):
3188         Return unique_xmalloc_ptr and update description.
3189
3190 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3191
3192         * corelow.c (core_target::get_core_register_section): Rename
3193         min_size to section_min_size.
3194
3195 2018-08-09  Jim Wilson  <jimw@sifive.com>
3196
3197         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3198         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3199         * NEWS: Mention new GNU/Linux RISC-V target.
3200         * configure.host: Add riscv*-*-linux*.
3201         * configure.nat: Add riscv*.
3202         * configure.tgt: Add riscv*-*-linux*.
3203         * riscv-linux-nat.c: New file.
3204         * riscv-linux-tdep.c: New file.
3205
3206 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3207
3208         * infrun.c (resume): Make static, add forward declaration.
3209         (proceed): Update header comment.
3210         * infrun.h (resume): Delete declaration.
3211
3212 2018-08-09  Tom Tromey  <tom@tromey.com>
3213
3214         * riscv-tdep.h: Minor formatting fixes.
3215
3216 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3217
3218         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3219         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3220         (test_mkdir_recursive): Likewise.
3221         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3222
3223 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3224
3225         * valarith.c (value_subscripted_rvalue): If an array is not in
3226         memory, and we don't know the upper bound, then we can't know that
3227         the requested element exists or not.
3228
3229 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3230
3231         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3232         (target_options_to_string): Add comment.
3233
3234 2018-08-08  Tom Tromey  <tom@tromey.com>
3235
3236         * unittests/scoped_mmap-selftests.c: Check result of "write".
3237
3238 2018-08-08  Jim Wilson  <jimw@sifive.com>
3239
3240         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3241         (decode_register_index_short): New.
3242         (decode_j_type_insn, decode_cj_type_insn): New.
3243         (decode_b_type_insn, decode_cb_type_insn): New.
3244         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3245         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3246         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3247         is_c_sw_insn instead of is_sw_insn.
3248         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3249         (riscv_software_single_step): New.
3250         * riscv-tdep.h (riscv_software_single_step): Declare.
3251
3252         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3253         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3254
3255 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3256
3257         PR gdb/18050:
3258         * target.c (dispose_inferior): Don't dispose of inferiors that are
3259         already killed.
3260
3261 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3262
3263         * remote.c (remote_target::download_tracepoint): Change char* to
3264         const char*.
3265
3266 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3267
3268         * target.h (target_options_to_string): Return an std::string.
3269         * target.c (str_comma_list_concat_elem): Return void, use
3270         std::string.
3271         (do_option): Likewise.
3272         (target_options_to_string): Return an std::string.
3273         * linux-nat.c (linux_nat_target::wait): Adjust.
3274         * target-debug.h (target_debug_print_options): Adjust.
3275
3276 2018-08-07  Tom Tromey  <tom@tromey.com>
3277
3278         * Makefile.in (CPPFLAGS): New variable.
3279         (INTERNAL_CPPFLAGS): Use it.
3280
3281 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3282
3283         * NEWS: Mention the index cache.
3284
3285 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3286
3287         * common/pathstuff.h (get_standard_cache_dir): New.
3288         * common/pathstuff.c (get_standard_cache_dir): New.
3289         * build-id.h (build_id_to_string): New.
3290         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3291         DEBUG_STR_SUFFIX): Move to here.
3292         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3293         DEBUG_STR_SUFFIX): Move from there.
3294         (write_psymtabs_to_index): Make non-static, add basename
3295         parameter.  Write to temporary files, rename when done.
3296         (save_gdb_index_command): Adjust call to
3297         write_psymtabs_to_index.
3298         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3299         field.
3300         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3301         (get_gdb_index_contents_from_cache): New.
3302         (get_gdb_index_contents_from_cache_dwz): New.
3303         (dwarf2_initialize_objfile): Read index from cache.
3304         (dwarf2_build_psymtabs): Save to index.
3305         * dwarf-index-cache.h: New file.
3306         * dwarf-index-cache.c: New file.
3307         * dwarf-index-write.h: New file.
3308
3309 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3310
3311         * gnulib/aclocal.m4: Re-generate.
3312         * gnulib/config.in: Re-generate.
3313         * gnulib/configure: Re-generate.
3314         * gnulib/import/Makefile.am: Re-generate.
3315         * gnulib/import/Makefile.in: Re-generate.
3316         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3317         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3318         * gnulib/import/m4/mkdir.m4: New file.
3319         * gnulib/import/mkdir.c: New file.
3320         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3321         module.
3322
3323 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3324
3325         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3326         * common/scoped_mmap.c: New file.
3327         * common/scoped_mmap.h (destroy): New method.
3328         (~scoped_mmap, reset): Use destroy.
3329         (scoped_mmap): New move constructor.
3330         (mmap_file): New declaration.
3331         * unittests/scoped_mmap-selftests.c (test_normal,
3332         test_invalid_filename, run_tests): New functions.
3333         (_initialize_scoped_mmap_selftests): Register selftest.
3334
3335 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3336
3337         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3338         (read_gdb_index_from_buffer): ... this.  Remove section
3339         parameter, add buffer parameter.
3340         (get_gdb_index_contents_ftype,
3341         get_gdb_index_contents_dwz_ftype): New typedefs.
3342         (dwarf2_read_gdb_index): Add callback parameters to get the
3343         index contents.
3344         (get_gdb_index_contents_from_section): New.
3345         (dwarf2_initialize_objfile): Update call to
3346         dwarf2_read_gdb_index.
3347
3348 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3349
3350         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3351         (gdb_open_cloexec): Likewise.
3352         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3353         (commandline_from_pid): Likewise.
3354         (linux_xfer_osdata_threads): Likewise.
3355         (linux_xfer_osdata_fds): Likewise.
3356         * ada-lang.c (is_package_name): Likewise.
3357         * auxv.c (procfs_xfer_auxv): Likewise.
3358         * breakpoint.c (print_one_breakpoint_location): Use
3359         uiout::field_fmt.
3360         (print_one_catch_solib): Use string_printf.
3361         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3362         (add_pe_forwarded_sym): Likewise.
3363         * dwarf2read.c (create_type_unit_group): Likewise.
3364         (build_error_marker_type): Likewise.
3365         * infcall.c (get_function_name): Likewise.
3366         * valprint.c (print_converted_chars_to_obstack): Likewise.
3367         * xtensa-tdep.c (xtensa_register_type): Likewise.
3368
3369 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3370
3371         * remote.c (remote_target::download_tracepoint): Fix format
3372         string errors.
3373
3374 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3375
3376         * tracefile.c: Include common/byte-vector.h.
3377         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3378         with trace_regblock_size if needed.  Update uses of buf.
3379
3380 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3381
3382         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3383         std::vector<unsigned char>.
3384         * tracepoint.c (collection_list::collection_list): Remove
3385         m_regs_mask initializer from initializer list.  Resize
3386         m_regs_mask using the largest remote register number.
3387         (collection_list::add_remote_register): Remove size check on
3388         m_regs_mask.  Use at to access element.
3389         (collection_list::stringify): Change type of temp_buf to
3390         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3391         stringify the register mask.  Use pack_hex_byte for the register
3392         mask.
3393
3394 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3395
3396         * tracepoint.h (class collection_list) <add_register>: Remove.
3397         <add_remote_register, add_ax_registers, add_local_register>:
3398         Declare.
3399         <add_memrange>: Add scope parameter.
3400         * tracepoint.c (encode_actions_1): Likewise.
3401         (collection_list::add_register): Rename to ...
3402         (collection_list::add_remote_register): ... this.  Update
3403         comment.
3404         (collection_list::add_ax_registers, add_local_register): New
3405         methods.
3406         (collection_list::add_memrange): Add scope parameter.  Call
3407         add_local_register instead of add_register.
3408         (finalize_tracepoint_aexpr): New function.
3409         (collection_list::collect_symbol): Update calls to add_memrange.
3410         Call add_local_register instead of add_register.  Call
3411         add_ax_registers.  Call finalize_tracepoint_aexpr.
3412         (encode_actions_1): Get remote regnos for $reg action.  Call
3413         add_remote_register, add_ax_registers, and add_local_register.
3414         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3415         (validate_actionline): Call finalize_tracepoint_aexpr.
3416
3417 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3418
3419         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3420         Replace array buf with gdb::char_vector buf, of size
3421         get_remote_packet_size ().  Replace references to buf and
3422         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3423         and xsnprintf with snprintf.  Raise errors if the buffer is too
3424         small.
3425
3426 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3427
3428         * remote.c (remote_target::download_tracepoint): Fix the has_more
3429         predicate in the QTDP action list iteration.
3430
3431 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3432
3433         * remote.c (remote_target::download_tracepoint): Fix indentation
3434         in for block.
3435
3436 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3437
3438         * proc-api.c (_initialize_proc_api): Remove c, unused.
3439         * procfs.c (procfs_init_inferior): Remove signals, unused.
3440         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3441         unused.
3442
3443 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3444             Andrew Burgess  <andrew.burgess@embecosm.com>
3445
3446         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3447         'W_STOPCODE (0)' as this could be ambiguous.
3448
3449 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3450
3451         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3452         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3453         "ai_socktype").
3454
3455 2018-08-02  Tom Tromey  <tom@tromey.com>
3456
3457         PR symtab/16842.
3458         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3459         symbols.
3460         (process_structure_scope): Likewise.
3461
3462 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3463
3464         PR gdb/22629:
3465         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3466         kill inferior.
3467
3468 2018-08-02  Tom Tromey  <tom@tromey.com>
3469
3470         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3471         (darwin_suspend_inferior, darwin_resume_inferior)
3472         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3473         (darwin_check_new_threads): Check result of get_darwin_inferior.
3474
3475 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3476
3477         GDB 8.1.1 released.
3478
3479 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3480
3481         * varobj.c (varobj_get_path_expr_parent): Report an error if
3482         parent is a dynamic varobj.
3483
3484 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3485
3486         * gnulib/aclocal.m4: Re-generate.
3487         * gnulib/config.in: Re-generate.
3488         * gnulib/configure: Re-generate.
3489         * gnulib/import/Makefile.in: Re-generate.
3490         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3491         * gnulib/import/m4/onceonly.m4: Re-generate.
3492
3493 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         * target-descriptions.c (struct xml_test_tdesc): New.
3496         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3497         (record_xml_tdesc): Update.
3498         (maintenance_check_xml_descriptions): Update.
3499         * target-descriptions.h (record_xml_tdesc): Update comment.
3500
3501 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3502
3503         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3504         checking array bounds are defined.
3505
3506 2018-07-30  Tom Tromey  <tom@tromey.com>
3507
3508         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3509         irreflexivity violation.
3510
3511 2018-07-30  Tom Tromey  <tom@tromey.com>
3512
3513         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3514         * value.c (unpack_long): Remove lint code.
3515         * valops.c (value_ind): Remove lint code.
3516         * valarith.c (value_x_binop, value_x_unop, value_equal)
3517         (value_pos): Remove lint code.
3518
3519 2018-07-28  Tom de Vries  <tdevries@suse.de>
3520
3521         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3522         with undefined upper bound as <optimized out>.
3523
3524 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3525
3526         * gcore.in: Rename variable "name" to "prefix".  Expand
3527         "usage" text.
3528
3529 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3530
3531         * windows-nat.c (windows_nat_target::create_inferior): Update to
3532         call close() in global namespace.
3533
3534 2018-07-26  Tom Tromey  <tom@tromey.com>
3535
3536         * dwarf-index-write.c (add_address_entry): Don't add objfile
3537         offsets.
3538         * dbxread.c (find_stab_function): Rename from
3539         find_stab_function_addr.  Return a bound_minimal_symbol.
3540         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3541         Don't add objfile offsets.
3542         (end_psymtab): Use raw_text_low, raw_text_high,
3543         MSYMBOL_VALUE_RAW_ADDRESS.
3544         (read_ofile_symtab): Update.
3545         (process_one_symbol): Update.
3546         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3547         offsets.
3548         (dw2_relocate): Remove.
3549         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3550         searching addrmap.
3551         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3552         Update.
3553         (process_psymtab_comp_unit_reader, add_partial_symbol)
3554         (add_partial_subprogram, dwarf2_ranges_read): Update.
3555         (load_partial_dies): Update.
3556         (add_address_entry): Don't add objfile offsets.
3557         (dwarf2_build_include_psymtabs): Update.
3558         (create_addrmap_from_aranges): Don't add objfile offsets.
3559         (dw2_find_pc_sect_compunit_symtab): Update.
3560         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3561         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3562         Update.
3563         (parse_partial_symbols): Don't add objfile offsets.  Use
3564         raw_text_low, raw_text_high.  Update.
3565         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3566         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3567         or call 'relocate' quick function.  Clear psymbol_map.
3568         * psympriv.h (struct partial_symbol) <address>: Add section
3569         offset.
3570         <set_unrelocated_address>: Rename from set_address.
3571         <raw_text_low, raw_text_high>: New methods.
3572         <text_low, text_high>: Add objfile parameter.
3573         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3574         set_unrelocated_address.
3575         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3576         (find_pc_psymbol): Update.
3577         (fixup_psymbol_section, relocate_psymtabs): Remove.
3578         (dump_psymtab, psym_functions): Update.
3579         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3580         parameter.
3581         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3582         (start_psymtab_common): Update.
3583         * symfile-debug.c (debug_qf_relocate): Remove.
3584         (debug_sym_quick_functions): Update.
3585         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3586         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3587         Update.
3588
3589 2018-07-26  Tom Tromey  <tromey@redhat.com>
3590
3591         * dbxread.c (end_psymtab): Use text_high_valid and
3592         text_low_valid.
3593         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3594         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3595         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3596         Update comment.
3597         <text_low_valid, text_high_valid>: New fields.
3598         <set_text_low, set_text_high>: Update.
3599         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3600
3601 2018-07-26  Tom Tromey  <tom@tromey.com>
3602
3603         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3604         Update.
3605         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3606         textlow and texthigh fields.
3607         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3608         Update.
3609         * mdebugread.c (parse_lines, parse_partial_symbols)
3610         (psymtab_to_symtab_1): Update.
3611         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3612         Rename fields.  Update comment.  Now private.
3613         <text_low, text_high, set_text_low, set_text_high>: New methods.
3614         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3615         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3616         (start_psymtab_common, maintenance_info_psymtabs)
3617         (maintenance_check_psymtabs): Update.
3618         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3619         texthigh fields.
3620         (scan_xcoff_symtab): Update.
3621
3622 2018-07-26  Tom Tromey  <tromey@redhat.com>
3623
3624         * psympriv.h (struct partial_symbol) <unrelocated_address,
3625         address, set_address>: New methods.
3626         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3627         (fixup_psymbol_section, relocate_psymtabs): Update.
3628         (print_partial_symbols): Add 'objfile' parameter.  Update.
3629         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3630         Update.
3631
3632 2018-07-26  Tom Tromey  <tom@tromey.com>
3633
3634         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3635         (debug_names::write_psymbols): Update.
3636         * psympriv.h (struct partial_symbol): Derive from
3637         general_symbol_info.
3638         <obj_section>: New method.
3639         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3640         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3641         (find_pc_sect_psymbol, fixup_psymbol_section)
3642         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3643         (print_partial_symbols, recursively_search_psymtabs)
3644         (compare_psymbols, psymbol_hash, psymbol_compare)
3645         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3646         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3647
3648 2018-07-26  Tom Tromey  <tromey@redhat.com>
3649
3650         * dbxread.c (end_psymtab): Remove dead code.
3651
3652 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3653
3654         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3655         DWARF unwinders are disabled.
3656         * dwarf2-frame.c: Add dwarf2read.h include.
3657         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3658         disabled.
3659         (dwarf2_frame_unwinders_enabled_p): Define.
3660         (show_dwarf_unwinders_enabled_p): New function.
3661         (_initialize_dwarf2_frame): Register switch to control DWARF
3662         unwinder use.
3663         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3664         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3665         (show_dwarf_cmdlist): Remove static keyword.
3666         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3667         (show_dwarf_cmdlist): Declare.
3668         * NEWS: Document new feature.
3669
3670 2018-07-26  Tom de Vries  <tdevries@suse.de>
3671
3672         PR breakpoints/23366
3673         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3674
3675 2018-07-26  Tom de Vries  <tdevries@suse.de>
3676
3677         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3678         DW_AT_count can't be translated to a dynamic prop.
3679
3680 2018-07-25  Tom de Vries  <tdevries@suse.de>
3681
3682         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3683         try/catch.
3684
3685 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3686
3687         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3688
3689 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3690
3691         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3692
3693 2018-07-24  Keith Seitz  <keiths@redhat.comt
3694
3695         PR symtab/23010
3696         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3697         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3698         instead of add_symbol_to_list.
3699         (read_file_scope): Call prepare_one_comp_unit before reading
3700         any other DIEs.
3701
3702 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3703
3704         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3705
3706 2018-07-24  Tom Tromey  <tom@tromey.com>
3707
3708         * utils.c (malloc, realloc, free): Don't declare.
3709         * configure, config.in: Rebuild.
3710         * configure.ac: Don't check for declarations of free, malloc, or
3711         realloc.
3712
3713 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3714
3715         * aarch64-linux-nat.c
3716         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3717         variable.
3718         * arm-linux-nat.c (fetch_regs): Likewise.
3719         (store_regs): Likewise.
3720         (fetch_vfp_regs): Likewise.
3721         (store_vfp_regs): Likewise.
3722         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3723         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3724         (arm_linux_nat_target::insert_watchpoint): Likewise.
3725         (arm_linux_nat_target::remove_watchpoint): Likewise.
3726         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3727         Likewise.
3728         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3729         Likewise.
3730         * ppc-linux-nat.c (fetch_register): Likewise.
3731         (fetch_all_gp_regs): Likewise.
3732         (fetch_ppc_registers): Likewise.
3733         (store_all_gp_regs): Likewise.
3734         (store_ppc_registers): Likewise.
3735         (hwdebug_insert_point): Likewise.
3736         (can_use_watchpoint_cond_accel): Likewise.
3737         * remote-sim.c (gdb_os_write_stdout): Likewise.
3738
3739 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3740             Tom Tromey  <tom@tromey.com>
3741
3742         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3743         test for it.
3744         * configure: Rebuild.
3745
3746 2018-07-22  Tom Tromey  <tom@tromey.com>
3747
3748         * regformats/regdat.sh: Define xmltarget_${name} inside
3749         #ifndef IN_PROCESS_AGENT.
3750
3751 2018-07-22  Tom Tromey  <tom@tromey.com>
3752
3753         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3754
3755 2018-07-22  Tom Tromey  <tom@tromey.com>
3756
3757         * symfile.c (reread_symbols): Notify iter, not objfile.
3758
3759 2018-07-22  Tom Tromey  <tom@tromey.com>
3760
3761         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3762         Use arch_ops.
3763         (ravenscar_thread_target::prepare_to_store): Likewise.
3764
3765 2018-07-22  Tom Tromey  <tom@tromey.com>
3766
3767         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3768         unused variable.  Call value_fetch_lazy when needed.
3769         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3770         Remove unused variable.  Call value_fetch_lazy when needed.
3771
3772 2018-07-22  Tom Tromey  <tom@tromey.com>
3773
3774         * m32c-tdep.c (mark_dma): Return void.
3775         (make_regs): Remove unused declarations.
3776
3777 2018-07-22  Tom Tromey  <tom@tromey.com>
3778
3779         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3780         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3781         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3782         bkscm_get_valid_block_smob_arg_unsafe for effect.
3783
3784 2018-07-22  Tom Tromey  <tom@tromey.com>
3785
3786         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3787         value_type.
3788
3789 2018-07-22  Tom Tromey  <tom@tromey.com>
3790
3791         * windows-nat.c (saved_context): Conditionally define.
3792         * remote.c (remote_target::remote_btrace_maybe_reopen):
3793         Conditionally declare "warned".
3794         * inflow.c (sigquit_ours): Conditionally define.
3795         (new_tty): Move "tty" declaration inside #if.
3796         * guile/guile.c (guile_datadir): Conditionally define.
3797         * charset.c (set_be_le_names): Move some declarations inside #if.
3798         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3799         #if.
3800         (parse_xml_btrace_conf): Likewise.
3801
3802 2018-07-22  Tom Tromey  <tom@tromey.com>
3803
3804         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3805
3806 2018-07-22  Tom Tromey  <tom@tromey.com>
3807
3808         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3809         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3810         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3811         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3812         * stack.c (frame_apply_level_command): Remove unused variable.
3813         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3814         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3815         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3816         unused variable.
3817         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3818         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3819         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3820         variable.
3821         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3822         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3823         variable.
3824         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3825         Remove unused variable.
3826         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3827         variable.
3828         * common/tdesc.c (print_xml_feature::visit): Remove unused
3829         variable.
3830         * compile/compile-object-load.c (store_regs): Remove unused
3831         variables.
3832         * complaints.c (clear_complaints): Remove unused variable.
3833         * corelow.c (core_target_open): Remove unused variable.
3834         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3835         variable.
3836         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3837         variable.
3838         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3839         variable.
3840         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3841         variable.
3842         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3843         variable.
3844         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3845         variable.
3846         * ia64-tdep.c (examine_prologue): Remove unused variable.
3847         * infcall.c (run_inferior_call): Remove unused variable.
3848         * inferior.c (exit_inferior): Remove unused variable.
3849         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3850         * linespec.c (decode_line_2): Remove unused variable.
3851         * linux-nat.c (super_close): Remove.
3852         * linux-tdep.c (linux_info_proc): Remove unused variable.
3853         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3854         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3855         Remove unused variable.
3856         * parse.c (find_minsym_type_and_address): Remove unused variable.
3857         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3858         variable.
3859         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3860         variable.
3861         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3862         variables.
3863         * record-btrace.c (record_btrace_target::store_registers): Remove
3864         unused variable.
3865         (cmd_show_record_btrace_cpu): Remove unused variable.
3866         * riscv-tdep.c (riscv_register_reggroup_p)
3867         (riscv_push_dummy_call, riscv_return_value): Remove unused
3868         variable.
3869         * rust-exp.y (literal): Remove unused variable.
3870         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3871         unused variable.
3872         <STRUCTOP_ANONYMOUS>: Likewise.
3873         * s390-linux-tdep.c (s390_linux_init_abi_31)
3874         (s390_linux_init_abi_64): Remove unused variable.
3875         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3876         (file_select_thread, net_windows_open, _initialize_ser_windows):
3877         Remove unused variables.
3878         * symtab.c (find_pc_sect_line): Remove unused variable.
3879         * target-memory.c (compute_garbled_blocks): Remove unused
3880         variable.
3881         (target_write_memory_blocks): Remove unused variable.
3882         * target.c (target_stack::unpush): Remove unused variables.
3883         * tracepoint.c (start_tracing, all_tracepoint_actions)
3884         (merge_uploaded_trace_state_variables)
3885         (print_one_static_tracepoint_marker): Remove unused variable.
3886         * unittests/basic_string_view/element_access/char/1.cc (test01):
3887         Remove unused variable.
3888         * windows-nat.c (windows_continue, windows_add_all_dlls)
3889         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3890         Remove unused variables.
3891
3892 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3893
3894         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3895         attr_profile in HAVE_ELF.
3896         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3897         HAVE_ELF.
3898
3899 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3900
3901         * frame.c (frame_register_unwind): Change parameter name.
3902         (frame_unwind_register): Likewise.
3903         (frame_unwind_register_value): Likewise.
3904         (frame_unwind_register_signed): Likewise.
3905         (frame_unwind_register_unsigned): Likewise.
3906         * frame.h (frame_register_unwind): Likewise.
3907         (frame_unwind_register): Likewise.
3908         (frame_unwind_register_value): Likewise.
3909         (frame_unwind_register_signed): Likewise.
3910         (frame_unwind_register_unsigned): Likewise.
3911         (frame_unwind_arch): Likewise.
3912
3913 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3914
3915         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3916         ISA maintenance.
3917
3918 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3919
3920         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3921         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3922         hand.
3923
3924 2018-07-20  Keith Seitz  <keiths@redhat.com>
3925
3926         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3927         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3928         m_compunit_symtab, m_language>: Add "m_" prefix.
3929         Update all uses.
3930         * buildsym.c: Update all uses.
3931
3932 2018-07-20  Tom Tromey  <tom@tromey.com>
3933
3934         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3935         * buildsym.h (record_line_ftype): Remove typedef.
3936
3937 2018-07-20  Tom Tromey  <tom@tromey.com>
3938
3939         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3940         (end_expandable_symtab): Likewise.
3941         (end_symtab_get_static_block): Likewise.
3942         (end_symtab_from_static_block): Likewise.
3943         * buildsym-legacy.c (augment_type_symtab): Remove.
3944         (end_expandable_symtab): Remove.
3945         (end_symtab_get_static_block): Remove.
3946         (end_symtab_from_static_block): Remove.
3947
3948 2018-07-20  Tom Tromey  <tom@tromey.com>
3949
3950         * dwarf2read.c: Include buildsym.h.
3951         (struct dwarf2_cu) <builder>: New method.
3952         (fixup_go_packaging): Update.
3953         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3954         use scoped_free_pendings.
3955         (using_directives): Add "cu" parameter, remove "language".
3956         (read_import_statement, setup_type_unit_groups, )
3957         (read_func_scope, read_lexical_block_scope)
3958         (dwarf2_record_block_ranges, read_namespace): Update.
3959         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3960         (lnp_state_machine::handle_end_sequence): Update.
3961         (class lnp_state_machine) <m_cu>: New member.
3962         <m_record_line_callback>: Remove.
3963         <m_currently_recording_lines>: New member.
3964         (lnp_state_machine::handle_set_file): Update.
3965         (noop_record_line): Remove.
3966         (dwarf_record_line_p): Add cu parameter.
3967         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3968         (lnp_state_machine::record_line)
3969         (lnp_state_machine::lnp_state_machine)
3970         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3971         (dwarf_decode_lines): Update.
3972         (dwarf2_start_subfile): Add cu parameter.
3973         (dwarf2_start_symtab, new_symbol): Update.
3974         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3975         Remove dwarf2_per_objfile parameter.
3976         (dwarf_decode_macros): Update.
3977
3978 2018-07-20  Tom Tromey  <tom@tromey.com>
3979
3980         * stabsread.c (define_symbol): Update.
3981         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3982         * dwarf2read.c (new_symbol): Update.
3983         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3984         * cp-namespace.c: Include buildsym.h.
3985         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3986         * buildsym-legacy.c (get_buildsym_compunit): New function.
3987
3988 2018-07-20  Tom Tromey  <tom@tromey.com>
3989
3990         * xcoffread.c: Include buildsym-legacy.h.
3991         * windows-nat.c: Include buildsym-legacy.h.
3992         * stabsread.c: Include buildsym-legacy.h.
3993         * mdebugread.c: Include buildsym-legacy.h.
3994         * buildsym-legacy.h: New file.
3995         * buildsym-legacy.c: New file, from buildsym.c.
3996         * go32-nat.c: Include buildsym-legacy.h.
3997         * dwarf2read.c: Include buildsym-legacy.h.
3998         * dbxread.c: Include buildsym-legacy.h.
3999         * cp-namespace.c: Include buildsym-legacy.h.
4000         * coffread.c: Include buildsym-legacy.h.
4001         * buildsym.h: Move some contents to buildsym-legacy.h.
4002         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4003         buildsym-legacy.c.
4004         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4005
4006 2018-07-20  Tom Tromey  <tom@tromey.com>
4007
4008         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4009         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4010         (buildsym_compunit::buildsym_compunit)
4011         (buildsym_compunit::~buildsym_compunit)
4012         (buildsym_compunit::get_macro_table): Define.
4013
4014 2018-07-20  Tom Tromey  <tom@tromey.com>
4015
4016         * buildsym.c (reset_symtab_globals): Remove.
4017         (buildsym_compunit::end_symtab_from_static_block): Update.
4018         (buildsym_compunit::augment_type_symtab): Update.
4019         (end_symtab_from_static_block): Call free_buildsym_compunit.
4020         (augment_type_symtab, end_symtab, end_expandable_symtab):
4021         Likewise.
4022
4023 2018-07-20  Tom Tromey  <tom@tromey.com>
4024
4025         * arch-utils.c: Do not include buildsym.h.
4026         * mipsread.c: Do not include buildsym.h.
4027         * machoread.c: Do not include buildsym.h.
4028         * elfread.c: Do not include buildsym.h.
4029
4030 2018-07-20  Tom Tromey  <tom@tromey.com>
4031
4032         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4033         initialization.
4034         (buildsym_compunit): Add new constructor.
4035         (struct buildsym_compunit) <get_last_source_file, finish_block,
4036         record_block_range, start_subfile, patch_subfile_names,
4037         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4038         set_last_source_start_addr, get_last_source_start_addr,
4039         get_local_using_directives, set_local_using_directives,
4040         get_global_using_directives, outermost_context_p,
4041         get_current_context_stack, get_context_stack_depth,
4042         get_current_subfile, get_local_symbols, get_file_symbols,
4043         get_global_symbols, record_debugformat, record_producer,
4044         push_context, pop_context, end_symtab_get_static_block,
4045         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4046         New public methods.
4047         <record_pending_block, finish_block_internal, make_blockvector,
4048         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4049         private methods.
4050         Update all users.
4051
4052 2018-05-22  Tom Tromey  <tom@tromey.com>
4053
4054         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4055         parameter.
4056         (finish_block_internal): Update.
4057
4058 2018-07-20  Tom Tromey  <tom@tromey.com>
4059
4060         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4061         parameter.
4062         (finish_block_internal): Update.
4063
4064 2018-07-20  Tom Tromey  <tom@tromey.com>
4065
4066         * buildsym.h (EXTERN): Don't define or undef.
4067         * buildsym.c (EXTERN): Don't define.
4068
4069 2018-07-20  Tom Tromey  <tom@tromey.com>
4070
4071         * buildsym.c: Remove TODO comment.
4072
4073 2018-07-20  Tom Tromey  <tom@tromey.com>
4074
4075         * coffread.c (coff_symtab_read): Update.
4076         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4077         (xcoff_new_init): Update.
4078         * mipsread.c (mipscoff_new_init): Update.
4079         * mdebugread.c (mdebug_build_psymtabs): Update.
4080         * elfread.c (elf_new_init): Update.
4081         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4082         Update.
4083         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4084         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4085         (stabsect_build_psymtabs): Update.
4086         * buildsym.h (buildsym_init): Don't declare.
4087         * buildsym.c: Update comment.
4088         (prepare_for_building): Remove.
4089         (start_symtab, restart_symtab): Update.
4090         (reset_symtab_globals): Update comment.
4091         (buildsym_init): Remove.
4092
4093 2018-07-20  Tom Tromey  <tom@tromey.com>
4094
4095         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4096         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4097         (read_enum_type, common_block_start, common_block_end)
4098         (cleanup_undefined_types_1, finish_global_stabs): Update.
4099         * mdebugread.c (psymtab_to_symtab_1): Update.
4100         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4101         (read_lexical_block_scope, new_symbol): Update.
4102         * dbxread.c (process_one_symbol): Update.
4103         * coffread.c (coff_symtab_read, process_coff_symbol)
4104         (coff_read_enum_type): Update.
4105         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4106         declare.
4107         (get_local_symbols, get_file_symbols, get_global_symbols): New
4108         functions.
4109         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4110         m_global_symbols.
4111         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4112         (~scoped_free_pendings): Update.
4113         (finish_block, prepare_for_building, reset_symtab_globals)
4114         (end_symtab_get_static_block, end_symtab_with_blockvector)
4115         (augment_type_symtab, push_context): Update.
4116         (get_local_symbols, get_file_symbols, get_global_symbols): New
4117         functions.
4118         (buildsym_init): Update.
4119
4120 2018-07-20  Tom Tromey  <tom@tromey.com>
4121
4122         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4123         (process_full_type_unit): Likewise.
4124         (dwarf2_start_symtab): Set list_in_scope.
4125
4126 2018-07-20  Tom Tromey  <tom@tromey.com>
4127
4128         * dwarf2read.c (process_psymtab_comp_unit_reader)
4129         (build_type_psymtabs_reader): Do not set list_in_scope.
4130
4131 2018-07-20  Tom Tromey  <tom@tromey.com>
4132
4133         * buildsym.c (free_pendings): Remove.
4134         (add_symbol_to_list, scoped_free_pendings)
4135         (finish_block_internal, buildsym_init): Update.
4136
4137 2018-07-20  Tom Tromey  <tom@tromey.com>
4138
4139         * xcoffread.c (read_xcoff_symtab): Update.
4140         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4141         Update.
4142         * dbxread.c (process_one_symbol): Update.
4143         * coffread.c (coff_symtab_read): Update.
4144         * buildsym.h (finish_block): Update.
4145         * buildsym.c (finish_block): Remove "listhead" argument.
4146         (end_symtab_get_static_block): Update.
4147
4148 2018-07-20  Tom Tromey  <tom@tromey.com>
4149
4150         * buildsym.h (class scoped_free_pendings): Remove constructor.
4151         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4152         method.
4153         <m_pending_block_obstack, m_pending_blocks>: New members.
4154         (pending_block_obstack, pending_blocks): Remove.
4155         (scoped_free_pendings::scoped_free_pendings): Default.
4156         (~scoped_free_pendings): Update.
4157         (free_pending_blocks): Remove.
4158         (finish_block_internal, record_pending_block, make_blockvector)
4159         (end_symtab_get_static_block, augment_type_symtab, push_context)
4160         (buildsym_init): Update.
4161
4162 2018-07-20  Tom Tromey  <tom@tromey.com>
4163
4164         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4165         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4166         members.
4167         (pending_addrmap, pending_addrmap_obstack)
4168         (pending_addrmap_interesting): Remove.
4169         (scoped_free_pendings, record_block_range, make_blockvector)
4170         (prepare_for_building, reset_symtab_globals, buildsym_init):
4171         Update.
4172
4173 2018-07-20  Tom Tromey  <tom@tromey.com>
4174
4175         * xcoffread.c (process_linenos): Update.
4176         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4177         * mdebugread.c (psymtab_to_symtab_1): Update.
4178         * dwarf2read.c (setup_type_unit_groups)
4179         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4180         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4181         * dbxread.c (process_one_symbol): Update.
4182         * coffread.c (coff_symtab_read, enter_linenos)
4183         (process_coff_symbol): Update.
4184         * buildsym.h (current_subfile): Don't declare.
4185         (get_current_subfile): Declare.
4186         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4187         member.
4188         (start_subfile, free_buildsym_compunit, push_subfile)
4189         (prepare_for_building, start_symtab): Update.
4190         (get_current_subfile): New function.
4191
4192 2018-07-20  Tom Tromey  <tom@tromey.com>
4193
4194         * coffread.c (coff_symtab_read): Update.
4195         * xcoffread.c (read_xcoff_symtab): Update.
4196         * dwarf2read.c (new_symbol): Update.
4197         (read_func_scope, read_lexical_block_scope): Update.
4198         * dbxread.c (process_one_symbol): Update.
4199         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4200         (outermost_context_p): Remove macro.
4201         (outermost_context_p, get_current_context_stack)
4202         (get_context_stack_depth): Declare.
4203         (pop_context): Return struct context_stack.
4204         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4205         member.
4206         (context_stack_size): Remove.
4207         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4208         (prepare_for_building, end_symtab_get_static_block)
4209         (augment_type_symtab, push_context): Update.
4210         (pop_context): Return struct context_stack.
4211         (outermost_context_p, get_current_context_stack)
4212         (get_context_stack_depth): New functions.
4213         (buildsym_init): Update.
4214
4215 2018-07-20  Tom Tromey  <tom@tromey.com>
4216
4217         * rust-exp.y: Now a pure parser.  Update all rules.
4218         (%union): Move earlier.
4219         (current_parser, work_obstack): Remove globals.
4220         (rust_parser, ~rust_parser): Update.
4221         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4222         lex_character, lex_number, lex_string, lex_identifier,
4223         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4224         convert_name, convert_params_to_expression,
4225         convert_ast_to_expression, ast_basic_type, ast_operation,
4226         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4227         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4228         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4229         ast_array_type, ast_slice_type, ast_reference_type,
4230         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4231         (rust_parse): Update.
4232         (rustyyerror, rustyylex): Add parser parameter.
4233         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4234         (rust_lex_stringish_test, rust_lex_test_sequence)
4235         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4236         (rust_lex_test_push_back, rust_lex_tests): Update.
4237
4238 2018-07-19  Pedro Alves  <palves@redhat.com>
4239
4240         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4241         gdb::unique_xmalloc_ptr.
4242         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4243         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4244         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4245         copy-initialization.
4246         * guile/scm-pretty-print.c (ppscm_print_children): Use
4247         gdb::unique_xmalloc_ptr instead of cleanups.
4248         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4249         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4250         gdb::unique_xmalloc_ptr.
4251         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4252         Adjust to use gdb::unique_xmalloc_ptr.
4253         * guile/scm-utils.c (extract_arg): Adjust.
4254         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4255         gdb::unique_xmalloc_ptr instead of a cleanup.
4256
4257 2018-07-19  Tom Tromey  <tom@tromey.com>
4258
4259         * utils.c (do_value_free_to_mark)
4260         (make_cleanup_value_free_to_mark): Remove.
4261         * utils.h (make_cleanup_value_free_to_mark): Remove.
4262
4263 2018-07-19  Pedro Alves  <palves@redhat.com>
4264
4265         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4266         forwarding reference.
4267
4268 2018-07-18  Pedro Alves  <palves@redhat.com>
4269
4270         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4271         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4272         cleanup.
4273
4274 2018-07-18  Pedro Alves  <palves@redhat.com>
4275
4276         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4277         exceptions.
4278         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4279         (gdbscm_wrap): New.
4280         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4281         directly instead of a cleanup.
4282         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4283         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4284         (vlscm_binop_gdbthrow): New, factored out from ...
4285         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4286         (vlscm_rich_compare): Use gdbscm_wrap.
4287         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4288         instead of a cleanup.
4289         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4290         cleanup.
4291         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4292         Use xfree directly instead of a cleanup.
4293         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4294         Adjust to use gdbscm_wrap and scoped_value_mark.
4295         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4296         (gdbscm_value_address, gdbscm_value_dereference)
4297         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4298         scoped_value_mark.
4299         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4300         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4301         scoped_value_mark.
4302         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4303         gdbscm_wrap and scoped_value_mark.
4304         (gdbscm_value_to_string): Use xfree directly instead of a
4305         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4306         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4307         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4308         scoped_value_mark.
4309         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4310         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4311         scoped_value_mark.
4312         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4313         gdbscm_wrap.
4314
4315 2018-07-18  Tom de Vries  <tdevries@suse.de>
4316
4317         * findvar.c (default_read_var_value): Also resolve dynamic type for
4318         LOC_OPTIMIZED_OUT vars.
4319
4320 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4321
4322         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4323         decoding.
4324
4325 2018-07-17  Tom Tromey  <tom@tromey.com>
4326
4327         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4328         (compute_enum_list, pascm_set_param_value_x)
4329         (gdbscm_parameter_value): Update.
4330         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4331         (gdbscm_scm_to_host_string): Update.
4332         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4333         Update.
4334         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4335         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4336         * guile/scm-string.c (gdbscm_scm_to_string): Return
4337         unique_xmalloc_ptr.
4338         (gdbscm_scm_to_host_string): Likewise.
4339
4340 2018-07-17  Tom Tromey  <tom@tromey.com>
4341
4342         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4343         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4344         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4345         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4346         unique_xmalloc_ptr.
4347
4348 2018-07-17  Tom Tromey  <tom@tromey.com>
4349
4350         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4351         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4352         Update.
4353         * guile/scm-cmd.c (cmdscm_function): Update.
4354         * guile/scm-pretty-print.c
4355         (ppscm_print_exception_unless_memory_error): Update.
4356         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4357         Return unique_xmalloc_ptr.
4358
4359 2018-07-17  Tom Tromey  <tom@tromey.com>
4360
4361         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4362         Use string_printf.
4363
4364 2018-07-17  Jim Wilson  <jimw@sifive.com>
4365
4366         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4367         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4368         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4369         unecessary braces after EF_RISCV_RVC test.  Delete call to
4370         set_gdbarch_decr_pc_after_break.
4371
4372         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4373         RISCV_LAST_FP_REGNUM + 1.
4374         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4375
4376 2018-07-17  Tom Tromey  <tom@tromey.com>
4377
4378         * configure.ac: Remove --disable-gdbcli.
4379         * configure: Rebuild.
4380         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4381         (SUBDIR_CLI_CFLAGS): Remove.
4382         (SFILES): Use SUBDIR_CLI_SRCS.
4383         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4384
4385 2018-07-17  Tom Tromey  <tom@tromey.com>
4386
4387         PR gdb/18624:
4388         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4389
4390 2018-07-16  Jim Wilson  <jimw@sifive.com>
4391
4392         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4393
4394 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4395
4396         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4397         variable.
4398         (libunwind_frame_sniffer): Likewise.
4399         (libunwind_frame_prev_register): Likewise.
4400         (libunwind_sigtramp_frame_sniffer): Likewise.
4401         * ia64-tdep.c (ia64_access_reg): Likewise.
4402         (ia64_access_rse_reg): Likewise.
4403         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4404         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4405
4406 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4407
4408         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4409
4410 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * remote-sim.c (gdbsim_target::close,
4413         gdbsim_target::mourn_inferior): Remove unused variables.
4414
4415 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4416
4417         * ia64-tdep.c (ktab_buf): New global.
4418         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4419         (get_kernel_table): Adjust.
4420
4421 2018-07-16  Tom Tromey  <tom@tromey.com>
4422
4423         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4424         * dwarf2read.c (using_directives, new_symbol): Use
4425         outermost_context_p.
4426         * dbxread.c (process_one_symbol): Use outermost_context_p.
4427         * coffread.c (coff_symtab_read): Use outermost_context_p.
4428
4429 2018-07-16  Tom Tromey  <tom@tromey.com>
4430
4431         * dwarf2read.c (using_directives, read_func_scope)
4432         (read_lexical_block_scope): Update.
4433         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4434         * buildsym.h (local_using_directives, global_using_directives):
4435         Don't declare.
4436         (get_local_using_directives, set_local_using_directives)
4437         (get_global_using_directives): Declare.
4438         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4439         m_global_using_directives>: New members.
4440         (finish_block_internal, prepare_for_building)
4441         (reset_symtab_globals, end_symtab_get_static_block)
4442         (push_context): Update.
4443         (get_local_using_directives, set_local_using_directives)
4444         (get_global_using_directives): New functions.
4445         (buildsym_init): Update.
4446
4447 2018-07-16  Tom Tromey  <tom@tromey.com>
4448
4449         * xcoffread.c (xcoff_initial_scan): Don't call
4450         free_pending_blocks.
4451         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4452         * buildsym.h (class scoped_free_pendings): Add constructor.
4453         (free_pending_blocks): Don't declare.
4454         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4455         (free_pending_blocks): Now static.
4456
4457 2018-07-16  Tom Tromey  <tom@tromey.com>
4458
4459         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4460         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4461         member.
4462         (struct subfile_stack): Remove.
4463         (subfile_stack): Remove.
4464         (push_subfile, pop_subfile, buildsym_init): Update.
4465
4466 2018-07-16  Tom Tromey  <tom@tromey.com>
4467
4468         * buildsym.c (push_subfile): Use gdb_assert.
4469         (pop_subfile): Use gdb_assert.
4470
4471 2018-07-16  Tom Tromey  <tom@tromey.com>
4472
4473         * buildsym.h (merge_symbol_lists): Remove.
4474         * buildsym.c (merge_symbol_lists): Remove.
4475
4476 2018-07-16  Tom Tromey  <tom@tromey.com>
4477
4478         * stabsread.c (scan_file_globals): Update comment.
4479         * stabsread.h (scan_file_globals): Move from buildsym.h.
4480         * buildsym.h (scan_file_globals): Move to stabsread.h.
4481
4482 2018-07-16  Tom Tromey  <tom@tromey.com>
4483
4484         * xcoffread.c (xcoff_new_init): Update.
4485         * mipsread.c (mipscoff_new_init): Update.
4486         * mdebugread.c (mdebug_build_psymtabs): Update.
4487         * elfread.c (elf_new_init): Update.
4488         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4489         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4490         * buildsym.h (buildsym_new_init): Don't declare.
4491         * buildsym.c (buildsym_new_init): Remove.
4492
4493 2018-07-16  Tom Tromey  <tom@tromey.com>
4494
4495         * stabsread.h (within_function): Move from buildsym.h.
4496         * stabsread.c (start_stabs): Clear within_function.
4497         * coffread.c (coff_start_symtab): Clear within_function.
4498         * buildsym.h (within_function): Move to stabsread.h.
4499         * buildsym.c (prepare_for_building): Update.
4500
4501 2018-07-16  Tom Tromey  <tom@tromey.com>
4502
4503         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4504         * dwarf2read.c (dwarf2_start_symtab): Don't set
4505         processing_gcc_compilation.
4506         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4507
4508 2018-07-16  Tom Tromey  <tom@tromey.com>
4509
4510         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4511         (next_symbol_text_func): Move from buildsym.h.
4512         * stabsread.c (hashname): Move from buildsym.c.
4513         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4514         (next_symbol_text_func, hashname): Move to stabsread.h.
4515         * buildsym.c: Don't include bcache.h
4516         (hashname): Move to stasbread.c.
4517
4518 2018-07-16  Tom Tromey  <tom@tromey.com>
4519
4520         * buildsym.h (context_stack_size): Don't declare.
4521         * buildsym.c (context_stack_size): New global.
4522
4523 2018-07-16  Tom Tromey  <tom@tromey.com>
4524
4525         * dbxread.c (processing_acc_compilation): New global.
4526         * buildsym.h (processing_acc_compilation): Don't declare.
4527
4528 2018-07-16  Tom Tromey  <tom@tromey.com>
4529
4530         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4531         * dbxread.c (read_ofile_symtab): Update.
4532         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4533         * buildsym.h (last_source_start_addr): Remove.
4534         (set_last_source_start_addr, get_last_source_start_addr):
4535         Declare.
4536         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4537         parameter.
4538         (struct buildsym_compunit) <m_last_source_start_addr>: New
4539         member.
4540         (prepare_for_building): Remove start_addr parameter.
4541         (start_symtab, restart_symtab, end_symtab_get_static_block)
4542         (end_symtab_with_blockvector): Update.
4543         (set_last_source_start_addr, get_last_source_start_addr): New
4544         functions.
4545
4546 2018-07-16  Tom Tromey  <tom@tromey.com>
4547
4548         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4549         member.
4550         (have_line_numbers): Remove.
4551         (record_line, prepare_for_building, end_symtab_get_static_block)
4552         (augment_type_symtab): Update.
4553
4554 2018-07-16  Tom Tromey  <tom@tromey.com>
4555
4556         * buildsym.c (~buildsym_compunit): Free the macro table.
4557         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4558         methods.
4559         <m_pending_macros>: New member.
4560         (pending_macros): Remove.
4561         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4562         (reset_symtab_globals, end_symtab_get_static_block)
4563         (end_symtab_with_blockvector, augment_type_symtab)
4564         (buildsym_init): Update.
4565
4566 2018-07-16  Tom Tromey  <tom@tromey.com>
4567
4568         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4569         parameter.
4570         (buildsym_compunit::set_last_source_file): New method.
4571         <m_last_source_file>: New member.
4572         (prepare_for_building): Remove "name" parameter.
4573         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4574         (last_source_file): Remove.
4575         (set_last_source_file, get_last_source_file): Update.
4576
4577 2018-07-16  Tom Tromey  <tom@tromey.com>
4578
4579         * buildsym.c (prepare_for_building): Add assert.
4580
4581 2018-07-16  Tom Tromey  <tom@tromey.com>
4582
4583         * buildsym.c (~buildsym_compunit): Update.
4584         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4585         (start_subfile, patch_subfile_names)
4586         (end_symtab_with_blockvector): Update.
4587
4588 2018-07-16  Tom Tromey  <tom@tromey.com>
4589
4590         * buildsym.c (struct buildsym_compunit): Add constructor,
4591         destructor, initializers.
4592         (start_buildsym_compunit): Remove.
4593         (free_buildsym_compunit): Use "delete".
4594         (start_symtab, restart_symtab): Use "new".
4595
4596 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4597
4598         * symfile.c (set_objfile_default_section_offset): Remove struct
4599         keyword.
4600
4601 2018-07-14  Stafford Horne  <shorne@gmail.com>
4602
4603         * (Responsible Maintainers): Add myself as or1k maintainer.
4604
4605 2018-07-13  Tom Tromey  <tom@tromey.com>
4606
4607         * symfile.c (set_objfile_default_section_offset): Use extra braces
4608         around initializer.
4609
4610 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4611
4612         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4613         non-branching basr.
4614
4615 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4616
4617         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4618         unittests/cli-utils-selftests.c
4619         * unittests/cli-utils-selftests.c: New file.
4620
4621 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4622
4623         * NEWS: Mention new commands. Mention change to 'thread apply'.
4624
4625 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4626
4627         * thread.c (thr_try_catch_cmd): New function.
4628         (thread_apply_all_command): Handle qcs flags.
4629         (thread_apply_command): Handle qcs flags.
4630         (taas_command): New function.
4631         (tfaas_command): New function.
4632         (_initialize_thread): Update to setup the new commands 'taas
4633         and 'tfaas'. Change doc string for 'thread apply'.
4634
4635 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4636
4637         * stack.c: (trailing_outermost_frame): New function, mostly
4638         extracted from backtrace_command_1.
4639         (leading_innermost_frame): New function.
4640         (backtrace_command_1): Update to call trailing_outermost_frame.
4641         (frame_apply_command_count): New function.
4642         (frame_apply_level_command): New function.
4643         (frame_apply_all_command): New function.
4644         (frame_apply_command): New function.
4645         (faas_command): New function.
4646         (frame_cmd_list): New variable.
4647         (_initialize_stack): Update to setup the new commands 'frame apply'
4648         and 'faas'.
4649
4650 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4651
4652         * cli-utils.c (number_or_range_parser::get_number): Only handle
4653         numbers or convenience var as numbers.
4654         (parse_flags): New function.
4655         (parse_flags_qcs): New function.
4656         (number_or_range_parser::finished): Ensure parsing end is detected
4657         before end of string.
4658         * cli-utils.h (parse_flags): New function.
4659         (parse_flags_qcs): New function.
4660         (number_or_range_parser): Remove m_finished bool.
4661         (number_or_range_parser::skip_range): Set m_in_range to false.
4662
4663 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4664
4665         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4666         on Windows.
4667
4668 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4669             Jan Kratochvil  <jan.kratochvil@redhat.com>
4670             Paul Fertser  <fercerpav@gmail.com>
4671             Tsutomu Seki  <sekiriki@gmail.com>
4672             Pedro Alves  <palves@redhat.com>
4673
4674         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4675         'unittests/parse-connection-spec-selftests.c'.
4676         (COMMON_SFILES): Add 'common/netstuff.c'.
4677         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4678         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4679         * common/netstuff.c: New file.
4680         * common/netstuff.h: New file.
4681         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4682         (wait_for_connect): Update comment.  New parameter
4683         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4684         Use 'sock' directly instead of 'scb->fd'.
4685         (try_connect): New function, with code from 'net_open'.
4686         (net_open): Rewrite main loop to deal with multiple
4687         sockets/addresses.  Handle IPv6-style hostnames; implement
4688         support for IPv6 connections.
4689         * unittests/parse-connection-spec-selftests.c: New file.
4690
4691 2018-07-11  Pedro Alves  <palves@redhat.com>
4692
4693         PR gdb/23377
4694         * remote.c (remote_target::remote_detach_pid): Call
4695         set_current_process.
4696
4697 2018-07-11  Pedro Alves  <palves@redhat.com>
4698
4699         * h8300-tdep.c (h8300_gdbarch_init): Remove
4700         set_gdbarch_ecoff_reg_to_regnum calls.
4701
4702 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4703
4704         PR c++/23373
4705         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4706         offsets/sizes for static members of a class/struct.
4707
4708 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4709
4710         * target-descriptions.c (tdesc_register_bitsize): Rename.
4711         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4712         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4713         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4714
4715 2018-07-10  Tom Tromey  <tom@tromey.com>
4716
4717         * breakpoint.c (moribund_locations): Now static and a
4718         std::vector.
4719         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4720         (build_bpstat_chain, update_global_location_list)
4721         (breakpoint_retire_moribund): Update.
4722         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4723         VEC.
4724
4725 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4726
4727         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4728         (riscv_register_reggroup_p): Use new function, remove unneeded
4729         parenthesis.
4730         (riscv_push_dummy_call): Extend assert to compare against xlen or
4731         flen based on register type.
4732
4733 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4734
4735         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4736
4737 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4738
4739         * remote.c (show_hardware_watchpoint_limit): New function.
4740         (show_hardware_watchpoint_length_limit): New function.
4741         (show_hardware_breakpoint_limit): New function.
4742         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4743         where appropriate, update help text.
4744
4745 2018-07-09  Tom Tromey  <tom@tromey.com>
4746
4747         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4748         (CLIBS): Don't mention NAT_CLIBS.
4749
4750 2018-07-09  Tom Tromey  <tom@tromey.com>
4751
4752         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4753         (LIBGDB_OBS, clean mostlyclean): Update.
4754         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4755
4756 2018-07-09  Tom Tromey  <tom@tromey.com>
4757
4758         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4759         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4760         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4761
4762 2018-07-09  Tom Tromey  <tom@tromey.com>
4763
4764         * Makefile.in (ALLDEPFILES): Remove exec.c.
4765         (COMMON_OBS): Remove exec.o.
4766         (COMMON_SFILES): Add exec.c.
4767
4768 2018-07-09  Tom Tromey  <tom@tromey.com>
4769
4770         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4771
4772 2018-07-09  Tom Tromey  <tom@tromey.com>
4773
4774         * Makefile.in (clean mostlyclean): Remove stamp-version.
4775         (version.c): Depend on stamp-version.
4776         (stamp-version): New rule, from version.c rule.
4777
4778 2018-07-09  Tom Tromey  <tom@tromey.com>
4779
4780         * Makefile.in (init.c): Depend on stamp-init.
4781         (stamp-init): New rule, from init.c rule.
4782         (clean mostlyclean): Remove stamp-init.
4783
4784 2018-07-09  Tom Tromey  <tom@tromey.com>
4785
4786         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4787         SUBDIR_GCC_COMPILE_SRCS.
4788
4789 2018-07-09  Tom Tromey  <tom@tromey.com>
4790
4791         * Makefile.in (init.c): Remove some unused sed rules.
4792
4793 2018-07-09  Tom Tromey  <tom@tromey.com>
4794
4795         * Makefile.in (TSOBS): Remove.
4796         (INIT_FILES): Update.
4797         (LIBGDB_OBS): Update.
4798         (COMMON_SFILES): Add inflow.c.
4799         (SFILES): Remove inflow.c.
4800
4801 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4802
4803         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4804
4805 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4806
4807         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4808         get_saveloc_name, is_signal_frame_name, step_name,
4809         init_remote_name, create_addr_space_name,
4810         destroy_addr_space_name, search_unwind_table_name,
4811         find_dyn_list_name): Constify.
4812
4813 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4814
4815         * darwin-nat.c (darwin_pthread_kill): New function.
4816         (darwin_resume_thread): Use darwin_pthread_kill.
4817
4818 2018-07-05  Tom de Vries  <tdevries@suse.de>
4819
4820         * macroexp.c (macro_buffer) <operator=>: New member function.
4821
4822 2018-07-04  Tom Tromey  <tom@tromey.com>
4823
4824         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4825
4826 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4827
4828         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4829         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4830         * maint.c: Likewise.
4831         * top.c: Likewise.
4832
4833 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4834
4835         * NEWS: Create a new section for the next release branch.
4836         Rename the section of the current branch, now that it has
4837         been cut.
4838
4839 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4840
4841         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4842         * version.in: Bump version to 8.2.50.DATE-git.
4843
4844 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4845             Pedro Alves  <palves@redhat.com>
4846
4847         * linux-nat.c (linux_init_ptrace): Rename to ...
4848         (linux_init_ptrace_procfs): ... this.  Call
4849         linux_proc_init_warnings.
4850         (linux_nat_target::post_attach)
4851         (linux_nat_target::post_startup_inferior): Adjust.
4852         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4853         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4854
4855 2018-07-04  Tom de Vries  <tdevries@suse.de>
4856
4857         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4858         check ...
4859         (read_comp_unit_head): ... here.
4860
4861 2018-07-03  Tom Tromey  <tom@tromey.com>
4862
4863         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4864         (stop_tracing, tstatus_command)
4865         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4866         (print_one_static_tracepoint_marker): Update.
4867         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4868         std::vector.
4869         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4870         VEC.
4871         (all_tracepoints, static_tracepoints_here): Return std::vector.
4872
4873 2018-07-03  Tom Tromey  <tom@tromey.com>
4874
4875         * common/ptid.c (ptid_equal): Remove.
4876         * common/ptid.h (ptid_equal): Don't declare.
4877         * ada-tasks.c: Update.
4878         * breakpoint.c: Update.
4879         * common/agent.c: Update.
4880         * corelow.c: Update.
4881         * darwin-nat-info.c: Update.
4882         * darwin-nat.c: Update.
4883         * dcache.c: Update.
4884         * dtrace-probe.c: Update.
4885         * dummy-frame.c: Update.
4886         * fbsd-nat.c: Update.
4887         * frame.c: Update.
4888         * gdbthread.h: Update.
4889         * gnu-nat.c: Update.
4890         * go32-nat.c: Update.
4891         * inf-loop.c: Update.
4892         * inf-ptrace.c: Update.
4893         * infcall.c: Update.
4894         * infcmd.c: Update.
4895         * inflow.c: Update.
4896         * infrun.c: Update.
4897         * linux-fork.c: Update.
4898         * linux-nat.c: Update.
4899         * linux-thread-db.c: Update.
4900         * mi/mi-cmd-var.c: Update.
4901         * mi/mi-interp.c: Update.
4902         * mi/mi-main.c: Update.
4903         * nto-procfs.c: Update.
4904         * ppc-linux-tdep.c: Update.
4905         * procfs.c: Update.
4906         * python/py-inferior.c: Update.
4907         * python/py-record-btrace.c: Update.
4908         * python/py-record.c: Update.
4909         * ravenscar-thread.c: Update.
4910         * regcache.c: Update.
4911         * remote-sim.c: Update.
4912         * remote.c: Update.
4913         * sol-thread.c: Update.
4914         * solib.c: Update.
4915         * target.c: Update.
4916         * tui/tui-stack.c: Update.
4917         * varobj.c: Update.
4918         * windows-nat.c: Update.
4919         * windows-tdep.c: Update.
4920
4921 2018-07-03  Tom Tromey  <tom@tromey.com>
4922
4923         * common/ptid.c (ptid_match): Remove.
4924         * common/ptid.h (ptid_match): Don't declare.
4925         * fbsd-nat.c: Update.
4926         * infcmd.c: Update.
4927         * infrun.c: Update.
4928         * linux-nat.c: Update.
4929         * record-btrace.c: Update.
4930         * regcache.c: Update.
4931         * remote.c: Update.
4932
4933 2018-07-03  Tom Tromey  <tom@tromey.com>
4934
4935         * common/ptid.c (ptid_tid_p): Remove.
4936         * common/ptid.h (ptid_tid_p): Don't declare.
4937         * sol-thread.c: Update.
4938
4939 2018-07-03  Tom Tromey  <tom@tromey.com>
4940
4941         * common/ptid.c (ptid_lwp_p): Remove.
4942         * common/ptid.h (ptid_lwp_p): Don't declare.
4943         * fbsd-nat.c: Update.
4944         * linux-nat.c: Update.
4945         * nat/linux-procfs.c: Update.
4946         * nat/x86-linux-dregs.c: Update.
4947         * sol-thread.c: Update.
4948
4949 2018-07-03  Tom Tromey  <tom@tromey.com>
4950
4951         * common/ptid.c (ptid_is_pid): Remove.
4952         * common/ptid.h (ptid_is_pid): Don't declare.
4953         * infrun.c: Update.
4954         * linux-nat.c: Update.
4955         * mi/mi-interp.c: Update.
4956         * remote.c: Update.
4957         * thread.c: Update.
4958
4959 2018-07-03  Tom Tromey  <tom@tromey.com>
4960
4961         * common/ptid.c (ptid_get_tid): Remove.
4962         * common/ptid.h (ptid_get_tid): Don't declare.
4963         * ada-tasks.c: Update.
4964         * aix-thread.c: Update.
4965         * bsd-uthread.c: Update.
4966         * darwin-nat.c: Update.
4967         * fbsd-nat.c: Update.
4968         * i386-darwin-nat.c: Update.
4969         * infrun.c: Update.
4970         * linux-tdep.c: Update.
4971         * nto-procfs.c: Update.
4972         * ppc-ravenscar-thread.c: Update.
4973         * python/py-infthread.c: Update.
4974         * ravenscar-thread.c: Update.
4975         * sol-thread.c: Update.
4976         * sparc-ravenscar-thread.c: Update.
4977         * windows-nat.c: Update.
4978
4979 2018-07-03  Tom Tromey  <tom@tromey.com>
4980
4981         * common/ptid.c (ptid_get_lwp): Remove.
4982         * common/ptid.h (ptid_get_lwp): Don't declare.
4983         * aarch64-linux-nat.c: Update.
4984         * ada-tasks.c: Update.
4985         * aix-thread.c: Update.
4986         * amd64-linux-nat.c: Update.
4987         * arm-linux-nat.c: Update.
4988         * corelow.c: Update.
4989         * fbsd-nat.c: Update.
4990         * fbsd-tdep.c: Update.
4991         * gnu-nat.c: Update.
4992         * i386-cygwin-tdep.c: Update.
4993         * i386-gnu-nat.c: Update.
4994         * i386-linux-nat.c: Update.
4995         * ia64-linux-nat.c: Update.
4996         * inf-ptrace.c: Update.
4997         * infrun.c: Update.
4998         * linux-fork.c: Update.
4999         * linux-nat.c: Update.
5000         * linux-tdep.c: Update.
5001         * linux-thread-db.c: Update.
5002         * mips-linux-nat.c: Update.
5003         * nat/aarch64-linux-hw-point.c: Update.
5004         * nat/aarch64-linux.c: Update.
5005         * nat/linux-btrace.c: Update.
5006         * nat/linux-osdata.c: Update.
5007         * nat/linux-procfs.c: Update.
5008         * nat/x86-linux-dregs.c: Update.
5009         * obsd-nat.c: Update.
5010         * ppc-fbsd-nat.c: Update.
5011         * ppc-linux-nat.c: Update.
5012         * procfs.c: Update.
5013         * python/py-infthread.c: Update.
5014         * ravenscar-thread.c: Update.
5015         * remote.c: Update.
5016         * s390-linux-nat.c: Update.
5017         * sol-thread.c: Update.
5018         * sol2-tdep.c: Update.
5019         * spu-linux-nat.c: Update.
5020         * x86-linux-nat.c: Update.
5021         * xtensa-linux-nat.c: Update.
5022
5023 2018-07-03  Tom Tromey  <tom@tromey.com>
5024
5025         * common/ptid.c (ptid_get_pid): Remove.
5026         * common/ptid.h (ptid_get_pid): Don't declare.
5027         * aarch64-linux-nat.c: Update.
5028         * ada-lang.c: Update.
5029         * aix-thread.c: Update.
5030         * alpha-bsd-nat.c: Update.
5031         * amd64-fbsd-nat.c: Update.
5032         * amd64-linux-nat.c: Update.
5033         * arm-linux-nat.c: Update.
5034         * arm-nbsd-nat.c: Update.
5035         * auxv.c: Update.
5036         * break-catch-syscall.c: Update.
5037         * breakpoint.c: Update.
5038         * bsd-uthread.c: Update.
5039         * corelow.c: Update.
5040         * ctf.c: Update.
5041         * darwin-nat.c: Update.
5042         * fbsd-nat.c: Update.
5043         * fbsd-tdep.c: Update.
5044         * gcore.c: Update.
5045         * gnu-nat.c: Update.
5046         * hppa-nbsd-nat.c: Update.
5047         * hppa-obsd-nat.c: Update.
5048         * i386-fbsd-nat.c: Update.
5049         * ia64-linux-nat.c: Update.
5050         * inf-ptrace.c: Update.
5051         * infcmd.c: Update.
5052         * inferior.c: Update.
5053         * inferior.h: Update.
5054         * inflow.c: Update.
5055         * infrun.c: Update.
5056         * linux-fork.c: Update.
5057         * linux-nat.c: Update.
5058         * linux-tdep.c: Update.
5059         * linux-thread-db.c: Update.
5060         * m68k-bsd-nat.c: Update.
5061         * mi/mi-interp.c: Update.
5062         * mi/mi-main.c: Update.
5063         * mips-linux-nat.c: Update.
5064         * mips-nbsd-nat.c: Update.
5065         * mips64-obsd-nat.c: Update.
5066         * nat/aarch64-linux-hw-point.c: Update.
5067         * nat/aarch64-linux.c: Update.
5068         * nat/linux-btrace.c: Update.
5069         * nat/linux-osdata.c: Update.
5070         * nat/linux-procfs.c: Update.
5071         * nat/x86-linux-dregs.c: Update.
5072         * nto-procfs.c: Update.
5073         * obsd-nat.c: Update.
5074         * ppc-linux-nat.c: Update.
5075         * ppc-nbsd-nat.c: Update.
5076         * ppc-obsd-nat.c: Update.
5077         * proc-service.c: Update.
5078         * procfs.c: Update.
5079         * python/py-inferior.c: Update.
5080         * python/py-infthread.c: Update.
5081         * ravenscar-thread.c: Update.
5082         * record.c: Update.
5083         * remote-sim.c: Update.
5084         * remote.c: Update.
5085         * rs6000-nat.c: Update.
5086         * s390-linux-nat.c: Update.
5087         * sh-nbsd-nat.c: Update.
5088         * sol-thread.c: Update.
5089         * sparc-nat.c: Update.
5090         * sparc64-tdep.c: Update.
5091         * spu-linux-nat.c: Update.
5092         * spu-tdep.c: Update.
5093         * target-debug.h: Update.
5094         * target.c: Update.
5095         * thread.c: Update.
5096         * tid-parse.c: Update.
5097         * tracefile-tfile.c: Update.
5098         * vax-bsd-nat.c: Update.
5099         * windows-nat.c: Update.
5100         * x86-linux-nat.c: Update.
5101         * x86-nat.c: Update.
5102
5103 2018-07-03  Tom Tromey  <tom@tromey.com>
5104
5105         * common/ptid.c (pid_to_ptid): Remove.
5106         * common/ptid.h (pid_to_ptid): Don't declare.
5107         * aix-thread.c: Update.
5108         * arm-linux-nat.c: Update.
5109         * common/ptid.c: Update.
5110         * common/ptid.h: Update.
5111         * corelow.c: Update.
5112         * ctf.c: Update.
5113         * darwin-nat.c: Update.
5114         * fbsd-nat.c: Update.
5115         * fork-child.c: Update.
5116         * gnu-nat.c: Update.
5117         * go32-nat.c: Update.
5118         * inf-ptrace.c: Update.
5119         * infcmd.c: Update.
5120         * inferior.c: Update.
5121         * infrun.c: Update.
5122         * linux-fork.c: Update.
5123         * linux-nat.c: Update.
5124         * nat/aarch64-linux-hw-point.c: Update.
5125         * nat/fork-inferior.c: Update.
5126         * nat/x86-linux-dregs.c: Update.
5127         * nto-procfs.c: Update.
5128         * obsd-nat.c: Update.
5129         * procfs.c: Update.
5130         * progspace.c: Update.
5131         * remote.c: Update.
5132         * rs6000-nat.c: Update.
5133         * s390-linux-nat.c: Update.
5134         * sol-thread.c: Update.
5135         * spu-linux-nat.c: Update.
5136         * target.c: Update.
5137         * top.c: Update.
5138         * tracefile-tfile.c: Update.
5139         * windows-nat.c: Update.
5140
5141 2018-07-03  Tom Tromey  <tom@tromey.com>
5142
5143         * common/ptid.h (ptid_build): Don't declare.
5144         * common/ptid.c (ptid_build): Remove.
5145         * aix-thread.c: Update.
5146         * bsd-kvm.c: Update.
5147         * bsd-uthread.c: Update.
5148         * common/agent.c: Update.
5149         * common/ptid.c: Update.
5150         * common/ptid.h: Update.
5151         * corelow.c: Update.
5152         * darwin-nat.c: Update.
5153         * fbsd-nat.c: Update.
5154         * gnu-nat.c: Update.
5155         * linux-fork.c: Update.
5156         * linux-nat.c: Update.
5157         * linux-thread-db.c: Update.
5158         * nat/linux-osdata.c: Update.
5159         * nat/linux-procfs.c: Update.
5160         * nto-procfs.c: Update.
5161         * obsd-nat.c: Update.
5162         * proc-service.c: Update.
5163         * procfs.c: Update.
5164         * ravenscar-thread.c: Update.
5165         * remote-sim.c: Update.
5166         * remote.c: Update.
5167         * sol-thread.c: Update.
5168         * target.c: Update.
5169         * windows-nat.c: Update.
5170
5171 2018-07-03  Tom Tromey  <tom@tromey.com>
5172
5173         * infrun.c (follow_exec): Use exit_inferior_silent.
5174         * inferior.c (exit_inferior_num_silent): Remove.
5175         * inferior.h (exit_inferior_num_silent): Don't declare.
5176
5177 2018-07-03  Tom Tromey  <tom@tromey.com>
5178
5179         PR cli/23340:
5180         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5181         inferior_ptid on error.
5182
5183 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5184             Simon Marchi  <simon.marchi@polymtl.ca>
5185
5186         PR tdep/8282
5187         * disasm.h (gdb_disassembler): Add
5188         `m_disassembler_options_holder'. member
5189         * disasm.c (get_all_disassembler_options): New function.
5190         (gdb_disassembler::gdb_disassembler): Use it.
5191         (gdb_buffered_insn_length_init_dis): Likewise.
5192         (gdb_buffered_insn_length): Adjust accordingly.
5193         (set_disassembler_options): Handle options with arguments.
5194         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5195         line if showing options with descriptions.
5196         (disassembler_options_completer): Adapt to using the
5197         `disasm_options_and_args_t' structure.
5198         * mips-tdep.c (mips_disassembler_options): New variable.
5199         (mips_disassembler_options_o32): Likewise.
5200         (mips_disassembler_options_n32): Likewise.
5201         (mips_disassembler_options_n64): Likewise.
5202         (gdb_print_insn_mips): Don't set `disassembler_options'.
5203         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5204         functions.
5205         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5206         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5207         `gdbarch_disassembler_options_implicit' and
5208         `gdbarch_valid_disassembler_options'.
5209         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5210         `disasm_options_and_args_t' structure.
5211         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5212         method.
5213         (valid_disassembler_options): Switch from `disasm_options_t' to
5214         the `disasm_options_and_args_t' structure.
5215         * NEWS: Document `set disassembler-options' support for the MIPS
5216         target.
5217         * gdbarch.h: Regenerate.
5218         * gdbarch.c: Regenerate.
5219
5220 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5221
5222         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5223
5224 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5225
5226         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5227         parameter in call to amd64_target_description.
5228         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5229         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5230         (amd64fbsd_init_abi): Likewise.
5231         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5232         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5233         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5234         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5235
5236 2018-06-29  Pedro Alves  <palves@redhat.com>
5237
5238         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5239         "segments" parameter.
5240         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5241         (_initialize_amd64_tdep): Update call to
5242         amd64_create_target_description.
5243         (amd64_target_description): Add "segments" parameter.  Adjust
5244         the implementation to use it.
5245         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5246         call to amd64_create_target_description.
5247         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5248         * gdb/arch/amd64.h (amd64_create_target_description): Add
5249         "segments" register.
5250         * gdb/arch/amd64.c (amd64_create_target_description): Add
5251         "segments" parameter.  Call create_feature_i386_64bit_segments
5252         only if SEGMENTS is true.
5253         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5254         call to amd64_create_target_description.
5255
5256 2018-06-29  Pedro Alves  <palves@redhat.com>
5257
5258         * thread.c (thread_target_id_str): New, factored out from ...
5259         (print_thread_info_1): ... here.  Use it to compute the max
5260         "Target Id" column width.
5261
5262 2018-06-29  Pedro Alves  <palves@redhat.com>
5263
5264         * remote.c (remote_target::extra_thread_info): Delete
5265         'display_buf' and 'n' locals.  from the cache, regardless of
5266         packet mechanims is in use.  Use cache for qThreadExtra and qP
5267         methods too.
5268
5269 2018-06-29  Pedro Alves  <palves@redhat.com>
5270
5271         * blockframe.c (find_pc_sect_containing_function): New function.
5272         * breakpoint.c (print_breakpoint_location): Don't call
5273         find_pc_sect_function.
5274         * linespec.c (create_sals_line_offset): Record the location's
5275         symbol in the sal.
5276         * linespec.c (convert_address_location_to_sals): Fill in sal's
5277         symbol with find_pc_sect_containing_function.
5278         * symtab.c (find_function_start_sal): Rename to ...
5279         (find_function_start_sal_1): ... this.
5280         (find_function_start_sal): Reimplement as wrapper around
5281         find_function_start_sal_1, and use
5282         find_pc_sect_containing_function to fill in the sal's symbol.
5283         (find_function_start_sal(symbol*, bool)): Adjust.
5284         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5285         comments.
5286         (find_pc_sect_containing_function): Declare.
5287
5288 2018-06-29  Pedro Alves  <palves@redhat.com>
5289
5290         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5291         true if the the location has no symbol.
5292
5293 2018-06-28  Tom Tromey  <tom@tromey.com>
5294
5295         * NEWS: Mention --enable-codesign.
5296         * silent-rules.mk (ECHO_SIGN): New variable.
5297         * configure.ac: Add --enable-codesign.
5298         * configure: Rebuild.
5299         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5300         (gdb$(EXEEXT)): Optionally invoke codesign.
5301
5302 2018-06-28  Pedro Alves  <palves@redhat.com>
5303
5304         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5305         comments.
5306         (switch_to_thread_no_regs): Adjust comment.
5307         * infcmd.c (stop_pc): Delete.
5308         (post_create_inferior, info_program_command): Replace references
5309         to stop_pc with references to thread_info->suspend.stop_pc.
5310         * inferior.h (stop_pc): Delete declaration.
5311         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5312         (handle_inferior_event_1, handle_signal_stop)
5313         (process_event_stop_test, keep_going_stepped_thread)
5314         (handle_step_into_function, handle_step_into_function_backward)
5315         (print_stop_location): Replace references to stop_pc with
5316         references to thread_info->suspend.stop_pc.
5317         (struct infcall_suspend_state) <stop_pc>: Delete field.
5318         (save_infcall_suspend_state, restore_infcall_suspend_state):
5319         Remove references to inf_stat->stop_pc.
5320         * linux-fork.c (fork_load_infrun_state): Likewise.
5321         * record-btrace.c (record_btrace_set_replay): Likewise.
5322         * record-full.c (record_full_goto_entry): Likewise.
5323         * remote.c (print_one_stopped_thread): Likewise.
5324         * target.c (target_resume): Extend comment.
5325         * thread.c (set_executing_thread): New.
5326         (set_executing): Use it.
5327         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5328         Remove references to stop_pc.
5329
5330 2018-06-28  Pedro Alves  <palves@redhat.com>
5331
5332         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5333         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5334
5335 2018-06-28  Tom Tromey  <tom@tromey.com>
5336
5337         * coffread.c (coff_symfile_finish): Update.
5338         * xcoffread.c (xcoff_symfile_finish): Update.
5339         * elfread.c (elf_symfile_finish): Update.
5340         * symfile.h (dwarf2_free_objfile): Don't declare.
5341         * dwarf2read.c (_initialize_dwarf2_read): Use
5342         register_objfile_data_with_cleanup.
5343         (dwarf2_free_objfile): Now static.  Change signature.
5344
5345 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5346
5347         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5348         option "-o" to add-symbol-file-load to add an offset to each
5349         section's load address.
5350         * symfile.c (set_objfile_default_section_offset): New function.
5351
5352 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5353
5354         * symfile.c (add_symbol_file_command): Make sure that sections
5355         with the same name are sorted in the same order.
5356
5357 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5358
5359         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5360         require the second argument.  If omitted, load sections at the
5361         addresses specified in the file.
5362
5363 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5364
5365         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5366         (_initialize_symfile): Add option "-o" to symbol-file to add an
5367         offset to each section of the symbol file.
5368
5369 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5370
5371         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5372
5373 2018-06-27  Tom Tromey  <tom@tromey.com>
5374
5375         * stack.c (_initialize_stack): Update "func" help text.
5376
5377 2018-06-27  Tom Tromey  <tom@tromey.com>
5378
5379         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5380         std::vector.
5381         (unwind_infopy_str, pyuw_create_unwind_info)
5382         (unwind_infopy_add_saved_register, pyuw_sniffer)
5383         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5384         Update.
5385         (struct saved_reg): Add constructor.
5386         <value>: Now a gdbpy_ref<>.
5387
5388 2018-06-27  Tom Tromey  <tom@tromey.com>
5389
5390         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5391
5392 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5393
5394         * gdb-gdb.py.in: Format using autopep8.
5395
5396 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5397
5398         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5399         (type_lookup_function): Recognize CORE_ADDR values.
5400
5401 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5402
5403         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5404         print tag_name.
5405
5406 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5407
5408         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5409         <__lt__>: Add.
5410
5411 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5412
5413         * gdb-gdb.py: Move to...
5414         * gdb-gdb.py.in: ... here.
5415         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5416         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5417         dependencies.
5418         (distclean): Remove gdb-gdb.py when cleaning.
5419         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5420         * configure: Re-generate.
5421
5422 2018-06-27  Pedro Alves  <palves@redhat.com>
5423
5424         * proc-service.c (get_ps_regcache): New.
5425         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5426         (ps_lsetfpregs): Use it.
5427
5428 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5429
5430         PR gdb/21695
5431         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5432         (dwarf_decode_lines_1): Adjust.
5433
5434 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5435
5436         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5437         override.
5438         <info_proc>: Likewise.
5439
5440 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5441
5442         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5443         to windows_fetch_one_register, and only handle the case of
5444         fetching one register.  Move the code that reloads the context
5445         and iterates over all registers if R is negative to...
5446         (windows_nat_target::fetch_registers): ... here.
5447         (do_windows_store_inferior_registers): Rename to
5448         windows_store_one_register, and only handle the case of storing
5449         one register.  Move the code that handles the case where r is
5450         negative to...
5451         (windows_nat_target::store_registers) ... here.
5452
5453 2018-06-26  Tom Tromey  <tom@tromey.com>
5454
5455         PR rust/22574:
5456         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5457         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5458         Update.
5459         (rust_internal_print_type): Add podata parameter.
5460         (rust_print_type): Update.
5461
5462 2018-06-26  Tom Tromey  <tom@tromey.com>
5463
5464         * typeprint.h (struct print_offset_data) <update, finish,
5465         maybe_print_hole>: New methods.
5466         <indentation>: New constant.
5467         * typeprint.c (print_offset_data::indentation): Define.
5468         (print_offset_data::maybe_print_hole, print_offset_data::update)
5469         (print_offset_data::finish): Move from c-typeprint.c and rename.
5470         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5471         (print_spaces_filtered_with_print_options): Update.
5472         (c_print_type_union_field_offset, maybe_print_hole)
5473         (c_print_type_struct_field_offset): Move to typeprint.c and
5474         rename.
5475         (c_type_print_base_struct_union): Update.
5476
5477 2018-06-25  Pedro Alves  <palves@redhat.com>
5478
5479         * gdbthread.h (thread_info_ref, delete_thread)
5480         (delete_thread_silent, first_thread_of_inferior)
5481         (any_thread_of_inferior, switch_to_thread)
5482         (enable_thread_stack_temporaries)
5483         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5484         (get_last_thread_stack_temporary)
5485         (value_in_thread_stack_temporaries, can_access_registers_thread):
5486         Spell out "struct thread_info" instead of just "thread_info".
5487         * inferior.h (notice_new_inferior): Likewise.
5488
5489 2018-06-25  Pedro Alves  <palves@redhat.com>
5490
5491         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5492         pass thread_info pointer to delete_thread.
5493         (windows_nat_target::detach): Pass inferior pointer to
5494         detach_inferior.
5495         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5496         delete_thread.
5497         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5498         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5499         and pass a thread_info pointer to delete_thread.
5500         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5501         pass thread_info pointer to delete_thread.
5502         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5503         delete_thread_silent call.
5504         * procfs.c (procfs_target::detach): Pass inferior pointer to
5505         detach_inferior.
5506         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5507         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5508         delete_thread_silent call.
5509         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5510         pass thread_info pointer to delete_thread.
5511         (windows_nat_target::detach): Pass inferior pointer to
5512         delete_inferior.
5513
5514 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5515
5516         * regcache.c (readable_regcache::read_part): Fix asserts.
5517         (reg_buffer::raw_collect_part): New function.
5518         (regcache::write_part): Fix asserts.
5519         (reg_buffer::raw_supply_part): New function.
5520         (regcache::transfer_regset_register): New helper function.
5521         (regcache::transfer_regset): Call new functions.
5522         (regcache_supply_regset): Use gdb_byte*.
5523         (regcache::supply_regset): Likewise.
5524         (regcache_collect_regset): Likewise.
5525         (regcache::collect_regset): Likewise.
5526         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5527         (reg_buffer::raw_supply_part): Likewise.
5528         (regcache::transfer_regset_register): Likewise.
5529         (regcache::transfer_regset): Use gdb_byte*.
5530
5531 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5532
5533         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5534
5535 2018-06-21  Pedro Alves  <palves@redhat.com>
5536
5537         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5538         instead of a ptid_t.  All callers adjusted.
5539         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5540         adjusted.
5541         (print_ada_task_info, display_current_task_id, task_command_1):
5542         Adjust.
5543         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5544         inferior_thread.
5545         (breakpoint_kind): Adjust.
5546         (remove_breakpoints_pid): Rename to ...
5547         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5548         pointer.  All callers adjusted.
5549         (bpstat_clear_actions): Use inferior_thread.
5550         (get_bpstat_thread): New.
5551         (bpstat_do_actions): Use it.
5552         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5553         to take a thread_info pointer.  All callers adjusted.
5554         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5555         (breakpoint_re_set_thread): Use inferior_thread.
5556         * breakpoint.h (struct inferior): Forward declare.
5557         (bpstat_stop_status): Update.
5558         (remove_breakpoints_pid): Delete.
5559         (remove_breakpoints_inf): New.
5560         * bsd-uthread.c (bsd_uthread_target::wait)
5561         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5562         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5563         (maint_btrace_packet_history_cmd)
5564         (maint_btrace_clear_packet_history_cmd): Adjust.
5565         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5566         inferior_thread.
5567         * cli/cli-interp.c: Include "inferior.h".
5568         * common/refcounted-object.h (struct
5569         refcounted_object_ref_policy): New.
5570         * compile/compile-object-load.c: Include gdbthread.h.
5571         (store_regs): Use inferior_thread.
5572         * corelow.c (core_target::close): Use current_inferior.
5573         (core_target_open): Adjust to use first_thread_of_inferior and use
5574         the current inferior.
5575         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5576         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5577         <thread>: ... this new field.  All references adjusted.
5578         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5579         Take a thread_info pointer instead of a ptid_t.
5580         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5581         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5582         thread_info pointer instead of a ptid_t.
5583         * elfread.c: Include "inferior.h".
5584         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5585         Use inferior_thread.
5586         * eval.c (evaluate_subexp): Likewise.
5587         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5588         inferior_thread.
5589         * gdb_proc_service.h (struct thread_info): Forward declare.
5590         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5591         <thread>: ... this new field.  All references adjusted.
5592         * gdbarch.h, gdbarch.c: Regenerate.
5593         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5594         'thread' parameter.  All implementations and callers adjusted.
5595         * gdbthread.h (thread_info) <set_running>: New method.
5596         (delete_thread, delete_thread_silent): Take a thread_info pointer
5597         instead of a ptid.
5598         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5599         (first_thread_of_process): Delete, replaced by ...
5600         (first_thread_of_inferior): ... this new function.  All callers
5601         adjusted.
5602         (any_live_thread_of_process): Delete, replaced by ...
5603         (any_live_thread_of_inferior): ... this new function.  All callers
5604         adjusted.
5605         (switch_to_thread, switch_to_no_thread): Declare.
5606         (is_executing): Delete.
5607         (enable_thread_stack_temporaries): Update comment.
5608         <enable_thread_stack_temporaries>: Take a thread_info pointer
5609         instead of a ptid_t.  Incref the thread.
5610         <~enable_thread_stack_temporaries>: Decref the thread.
5611         <m_ptid>: Delete
5612         <m_thr>: New.
5613         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5614         (get_last_thread_stack_temporary)
5615         (value_in_thread_stack_temporaries, can_access_registers_thread):
5616         Take a thread_info pointer instead of a ptid_t.  All callers
5617         adjusted.
5618         * infcall.c (get_call_return_value): Use inferior_thread.
5619         (run_inferior_call): Work with thread pointers instead of ptid_t.
5620         (call_function_by_hand_dummy): Work with thread pointers instead
5621         of ptid_t.  Use thread_info_ref.
5622         * infcmd.c (proceed_thread_callback): Access thread's state
5623         directly.
5624         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5625         access thread's state directly.
5626         (continue_command): Use inferior_thread.
5627         (info_program_command): Use find_thread_ptid and access thread
5628         state directly.
5629         (proceed_after_attach_callback): Use thread state directly.
5630         (notice_new_inferior): Take a thread_info pointer instead of a
5631         ptid_t.  All callers adjusted.
5632         (exit_inferior): Take an inferior pointer instead of a pid.  All
5633         callers adjusted.
5634         (exit_inferior_silent): New.
5635         (detach_inferior): Delete.
5636         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5637         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5638         (detach_inferior_command, kill_inferior_command): Use
5639         find_inferior_id instead of valid_gdb_inferior_id and
5640         gdb_inferior_id_to_pid.
5641         (inferior_command): Use inferior and thread pointers.
5642         * inferior.h (struct thread_info): Forward declare.
5643         (notice_new_inferior): Take a thread_info pointer instead of a
5644         ptid_t.  All callers adjusted.
5645         (detach_inferior): Delete declaration.
5646         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5647         instead of a pid.  All callers adjusted.
5648         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5649         (valid_gdb_inferior_id): Delete.
5650         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5651         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5652         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5653         ...
5654         <inf>: ... this new field.
5655         <step_ptid>: Delete, replaced by ...
5656         <step_thread>: ... this new field.
5657         (get_displaced_stepping_state): Take an inferior pointer instead
5658         of a pid.  All callers adjusted.
5659         (displaced_step_in_progress_any_inferior): Adjust.
5660         (displaced_step_in_progress_thread): Take a thread pointer instead
5661         of a ptid_t.  All callers adjusted.
5662         (displaced_step_in_progress, add_displaced_stepping_state): Take
5663         an inferior pointer instead of a pid.  All callers adjusted.
5664         (get_displaced_step_closure_by_addr): Adjust.
5665         (remove_displaced_stepping_state): Take an inferior pointer
5666         instead of a pid.  All callers adjusted.
5667         (displaced_step_prepare_throw, displaced_step_prepare)
5668         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5669         All callers adjusted.
5670         (start_step_over): Adjust.
5671         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5672         displaced step queue.
5673         (do_target_resume): Adjust.
5674         (fetch_inferior_event): Use inferior_thread.
5675         (context_switch, get_inferior_stop_soon): Take an
5676         execution_control_state pointer instead of a ptid_t.  All callers
5677         adjusted.
5678         (switch_to_thread_cleanup): Delete.
5679         (stop_all_threads): Use scoped_restore_current_thread.
5680         * inline-frame.c: Include "gdbthread.h".
5681         (inline_state) <inline_state>: Take a thread pointer instead of a
5682         ptid_t.  All callers adjusted.
5683         <ptid>: Delete, replaced by ...
5684         <thread>: ... this new field.
5685         (find_inline_frame_state): Take a thread pointer instead of a
5686         ptid_t.  All callers adjusted.
5687         (skip_inline_frames, step_into_inline_frame)
5688         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5689         pointer instead of a ptid_t.  All callers adjusted.
5690         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5691         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5692         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5693         pointers directly.
5694         * linux-nat.c (get_detach_signal): Likewise.
5695         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5696         (thread_db_notice_clone): Adjust.
5697         (thread_db_find_new_threads_silently)
5698         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5699         a thread pointer instead of a ptid_t.  All callers adjusted.
5700         * mi/mi-cmd-var.c: Include "inferior.h".
5701         (mi_cmd_var_update_iter): Update to use thread pointers.
5702         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5703         inferior directly.
5704         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5705         out to ...
5706         (mi_output_running): ... this new function.
5707         (mi_on_resume_1): Adjust to use it.
5708         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5709         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5710         directly.
5711         (interrupt_thread_callback): : Adjust to use thread and inferior
5712         pointers.
5713         * proc-service.c: Include "gdbthread.h".
5714         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5715         * progspace-and-thread.c: Include "inferior.h".
5716         * progspace.c: Include "inferior.h".
5717         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5718         hold a reference to an inferior_object.
5719         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5720         inferior_thread.
5721         * python/py-inferior.c (struct inferior_object): Give the type a
5722         tag name instead of a typedef.
5723         (python_on_normal_stop): No need to check if the current thread is
5724         listed.
5725         (inferior_to_inferior_object): Change return type to
5726         inferior_object.  All callers adjusted.
5727         (find_thread_object): Delete, bits factored out to ...
5728         (thread_to_thread_object): ... this new function.
5729         * python/py-infthread.c (create_thread_object): Use
5730         inferior_to_inferior_object.
5731         (thpy_is_stopped): Use thread pointer directly.
5732         (gdbpy_selected_thread): Use inferior_thread.
5733         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5734         field, replaced with ...
5735         <thread>: ... this new field.  All users adjusted.
5736         (btpy_insn_or_gap_new): Drop const.
5737         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5738         callers adjusted.
5739         * python/py-record.c: Include "gdbthread.h".
5740         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5741         a ptid_t.  All callers adjusted.
5742         (gdbpy_current_recording): Use inferior_thread.
5743         * python/py-record.h (recpy_record_object) <ptid>: Delete
5744         field, replaced with ...
5745         <thread>: ... this new field.  All users adjusted.
5746         (recpy_element_object) <ptid>: Delete
5747         field, replaced with ...
5748         <thread>: ... this new field.  All users adjusted.
5749         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5750         a ptid_t.  All callers adjusted.
5751         * python/py-threadevent.c: Include "gdbthread.h".
5752         (get_event_thread): Use thread_to_thread_object.
5753         * python/python-internal.h (struct inferior_object): Forward
5754         declare.
5755         (find_thread_object, find_inferior_object): Delete declarations.
5756         (thread_to_thread_object, inferior_to_inferior_object): New
5757         declarations.
5758         * record-btrace.c: Include "inferior.h".
5759         (require_btrace_thread): Use inferior_thread.
5760         (record_btrace_frame_sniffer)
5761         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5762         (get_thread_current_frame): Use scoped_restore_current_thread and
5763         switch_to_thread.
5764         (get_thread_current_frame): Use thread pointer directly.
5765         (record_btrace_replay_at_breakpoint): Use thread's inferior
5766         pointer directly.
5767         * record-full.c: Include "inferior.h".
5768         * regcache.c: Include "gdbthread.h".
5769         (get_thread_arch_regcache): Use the inferior's address space
5770         directly.
5771         (get_thread_regcache, registers_changed_thread): New.
5772         * regcache.h (get_thread_regcache(thread_info *thread)): New
5773         overload.
5774         (registers_changed_thread): New.
5775         (remote_target) <remote_detach_1>: Swap order of parameters.
5776         (remote_add_thread): <remote_add_thread>: Return the new thread.
5777         (get_remote_thread_info(ptid_t)): New overload.
5778         (remote_target::remote_notice_new_inferior): Use thread pointers
5779         directly.
5780         (remote_target::process_initial_stop_replies): Use
5781         thread_info::set_running.
5782         (remote_target::remote_detach_1, remote_target::detach)
5783         (extended_remote_target::detach): Adjust.
5784         * stack.c (frame_show_address): Use inferior_thread.
5785         * target-debug.h (target_debug_print_thread_info_pp): New.
5786         * target-delegates.c: Regenerate.
5787         * target.c (default_thread_address_space): Delete.
5788         (memory_xfer_partial_1): Use current_inferior.
5789         (target_detach): Use current_inferior.
5790         (target_thread_address_space): Delete.
5791         (generic_mourn_inferior): Use current_inferior.
5792         * target.h (struct target_ops) <thread_address_space>: Delete.
5793         (target_thread_address_space): Delete.
5794         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5795         pointers directly.
5796         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5797         thread pointer instead of a ptid_t.  Adjust all callers.
5798         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5799         (first_thread_of_process): Delete, replaced by ...
5800         (first_thread_of_inferior): ... this new function.  All callers
5801         adjusted.
5802         (any_thread_of_process): Rename to ...
5803         (any_thread_of_inferior): ... this, and take an inferior pointer.
5804         (any_live_thread_of_process): Rename to ...
5805         (any_live_thread_of_inferior): ... this, and take an inferior
5806         pointer.
5807         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5808         (value_in_thread_stack_temporaries)
5809         (get_last_thread_stack_temporary): Take a thread pointer instead
5810         of a ptid_t.  Adjust all callers.
5811         (thread_info::set_running): New.
5812         (validate_registers_access): Use inferior_thread.
5813         (can_access_registers_ptid): Rename to ...
5814         (can_access_registers_thread): ... this, and take a thread
5815         pointer.
5816         (print_thread_info_1): Adjust to compare thread pointers instead
5817         of ptids.
5818         (switch_to_no_thread, switch_to_thread): Make extern.
5819         (scoped_restore_current_thread::~scoped_restore_current_thread):
5820         Use m_thread pointer directly.
5821         (scoped_restore_current_thread::scoped_restore_current_thread):
5822         Use inferior_thread.
5823         (thread_command): Use thread pointer directly.
5824         (thread_num_make_value_helper): Use inferior_thread.
5825         * top.c (execute_command): Use inferior_thread.
5826         * tui/tui-interp.c: Include "inferior.h".
5827         * varobj.c (varobj_create): Use inferior_thread.
5828         (value_of_root_1): Use find_thread_global_id instead of
5829         global_thread_id_to_ptid.
5830
5831 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5832
5833         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5834         possible.
5835         (regcache::write_part): Likewise.
5836         (readable_regcache::cooked_read_part): Update comment.
5837         (readable_regcache::cooked_write_part): Likewise.
5838         * regcache.h: (readable_regcache::read_part): Likewise.
5839         (regcache::write_part): Likewise.
5840
5841 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5842             Dirk Schubert  <dirk.schubert@arm.com>
5843
5844         * aarch64-linux-nat.c (post_attach): New.
5845         (aarch64_linux_nat_target::post_attach): Override post_attach to
5846         record the number of hardware debug registers.
5847
5848 2018-06-20  Tom Tromey  <tom@tromey.com>
5849
5850         * python/py-param.c (add_setshow_generic): Make parameters const.
5851         (parmpy_init): Update.
5852
5853 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5854
5855         * regcache.h (regcache_cooked_read_ftype): Rename to...
5856         (register_read_ftype): ...this, change type to function_view.
5857         (class reg_buffer) <save>: Remove src parameter.
5858         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5859         parameter non-const in first overload.  Remove src parameter in
5860         second overload.
5861         * regcache.c (do_cooked_read): Remove.
5862         (readonly_detached_regcache::readonly_detached_regcache): Make
5863         parameter non-const, adjust call to other constructor.
5864         (reg_buffer::save): Remove src parameter.
5865         * frame.c (do_frame_register_read): Remove.
5866         (frame_save_as_regcache): Use lambda function.
5867         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5868         parameter to ppu2spu_data *.
5869         (ppu2spu_sniffer): Use lambda function.
5870
5871 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5872
5873         * record-full.c (record_full_target::insert_breakpoint): Remove
5874         "struct" keyword, add const.
5875
5876 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5877
5878         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5879         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5880         * configure.ac: Remove AC_PREREQ, add missing quoting.
5881         * gnulib/configure.ac: Modernize usage of
5882         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5883         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5884         (AUTOMAKE_VERSION): Bump to 1.15.1.
5885         * configure: Re-generate.
5886         * config.in: Re-generate.
5887         * aclocal.m4: Re-generate.
5888         * gnulib/aclocal.m4: Re-generate.
5889         * gnulib/config.in: Re-generate.
5890         * gnulib/configure: Re-generate.
5891         * gnulib/import/Makefile.in: Re-generate.
5892
5893 2018-06-19  Pedro Alves  <palves@redhat.com>
5894
5895         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5896         (lookup_minimal_symbol_by_pc_section): ... here with
5897         gdb_assert_not_reached added.
5898
5899 2018-06-19  Pedro Alves  <palves@redhat.com>
5900
5901         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5902         parameter with a block parameter.  Compare location's block symbol
5903         with the frame's block instead of addresses.
5904         (skip_inline_frames): Pass the current block instead of the
5905         frame's address.  Break out as soon as we determine the frame
5906         should not be skipped.
5907
5908 2018-06-18  Tom Tromey  <tom@tromey.com>
5909
5910         * solib-aix.c (solib_aix_get_section_offsets): Return
5911         unique_xmalloc_ptr.
5912         (solib_aix_solib_create_inferior_hook): Update.
5913
5914 2018-06-18  Tom Tromey  <tom@tromey.com>
5915
5916         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5917
5918 2018-06-18  Tom Tromey  <tom@tromey.com>
5919
5920         * solib-frv.c (frv_relocate_main_executable): Use
5921         unique_xmalloc_ptr.
5922         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5923         unique_xmalloc_ptr.
5924
5925 2018-06-18  Tom Tromey  <tom@tromey.com>
5926
5927         * objfiles.h (inhibit_section_map_updates): Update.
5928         (resume_section_map_updates, resume_section_map_updates_cleanup):
5929         Remove.
5930         * solib-svr4.c (svr4_handle_solib_event): Update.
5931         * objfiles.c (inhibit_section_map_updates): Return
5932         scoped_restore_tmpl<int>.
5933         (resume_section_map_updates, resume_section_map_updates_cleanup):
5934         Remove.
5935
5936 2018-06-18  Tom Tromey  <tom@tromey.com>
5937
5938         * valprint.h (read_string): Update.
5939         * valprint.c (read_string): Change type of "buffer".
5940         (val_print_string): Update.
5941         * python/py-value.c (valpy_string): Update.
5942         * language.h (struct language_defn) <la_get_string>: Change
5943         type of "buffer".
5944         (default_get_string, c_get_string): Update.
5945         * language.c (default_get_string): Change type of "buffer".
5946         * guile/scm-value.c (gdbscm_value_to_string): Update.
5947         * c-lang.c (c_get_string): Change type of "buffer".
5948
5949 2018-06-18  Tom Tromey  <tom@tromey.com>
5950
5951         * ser-mingw.c (struct pipe_state_destroyer): New.
5952         (pipe_state_up): New typedef.
5953         (cleanup_pipe_state): Remove.
5954         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5955
5956 2018-06-18  Tom Tromey  <tom@tromey.com>
5957
5958         * rust-lang.h (rust_yyerror): Don't declare.
5959         * rust-lang.c (rust_language_defn): Update.
5960         * rust-exp.y (yyerror): Now static.
5961         * parse.c (parse_exp_in_context_1): Update.
5962         * p-lang.h (p_yyerror): Don't declare.
5963         * p-lang.c (p_language_defn): Update.
5964         * p-exp.y (yyerror): Now static.
5965         * opencl-lang.c (opencl_language_defn): Update.
5966         * objc-lang.c (objc_language_defn): Update.
5967         * m2-lang.h (m2_yyerror): Don't declare.
5968         * m2-lang.c (m2_language_defn): Update.
5969         * m2-exp.y (yyerror): Now static.
5970         * language.h (struct language_defn) <la_error>: Remove.
5971         * language.c (unk_lang_error): Remove.
5972         (unknown_language_defn, auto_language_defn): Remove.
5973         * go-lang.h (go_yyerror): Don't declare.
5974         * go-lang.c (go_language_defn): Update.
5975         * go-exp.y (yyerror): Now static.
5976         * f-lang.h (f_yyerror): Don't declare.
5977         * f-lang.c (f_language_defn): Update.
5978         * f-exp.y (yyerror): Now static.
5979         * d-lang.h (d_yyerror): Don't declare.
5980         * d-lang.c (d_language_defn): Update.
5981         * d-exp.y (yyerror): Now static.
5982         * c-lang.h (c_yyerror): Don't declare.
5983         * c-lang.c (c_language_defn, cplus_language_defn)
5984         (asm_language_defn, minimal_language_defn): Update.
5985         * c-exp.y (yyerror): Now static.
5986         * ada-lang.h (ada_yyerror): Don't declare.
5987         * ada-lang.c (ada_language_defn): Update.
5988         * ada-exp.y (yyerror): Now static.
5989
5990 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5991
5992         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5993         (store_sveregs_to_thread): Likewise.
5994         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5995         (aarch64_linux_store_inferior_registers): Likewise.
5996         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5997         function.
5998         (aarch64_sve_regs_copy_to_regcache): Likewise.
5999         (aarch64_sve_regs_copy_from_regcache): Likewise.
6000         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6001         declaration.
6002         (aarch64_sve_regs_copy_to_regcache): Likewise.
6003         (aarch64_sve_regs_copy_from_regcache): Likewise.
6004         (sve_context): Structure from Linux headers.
6005         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6006         (SVE_SIG_ZREG_SIZE): Likewise.
6007         (SVE_SIG_PREG_SIZE): Likewise.
6008         (SVE_SIG_FFR_SIZE): Likewise.
6009         (SVE_SIG_REGS_OFFSET): Likewise.
6010         (SVE_SIG_ZREGS_OFFSET): Likewise.
6011         (SVE_SIG_ZREG_OFFSET): Likewise.
6012         (SVE_SIG_ZREGS_SIZE): Likewise.
6013         (SVE_SIG_PREGS_OFFSET): Likewise.
6014         (SVE_SIG_PREG_OFFSET): Likewise.
6015         (SVE_SIG_PREGS_SIZE): Likewise.
6016         (SVE_SIG_FFR_OFFSET): Likewise.
6017         (SVE_SIG_REGS_SIZE): Likewise.
6018         (SVE_SIG_CONTEXT_SIZE): Likewise.
6019         (SVE_PT_REGS_MASK): Likewise.
6020         (SVE_PT_REGS_FPSIMD): Likewise.
6021         (SVE_PT_REGS_SVE): Likewise.
6022         (SVE_PT_VL_INHERIT): Likewise.
6023         (SVE_PT_VL_ONEXEC): Likewise.
6024         (SVE_PT_REGS_OFFSET): Likewise.
6025         (SVE_PT_FPSIMD_OFFSET): Likewise.
6026         (SVE_PT_FPSIMD_SIZE): Likewise.
6027         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6028         (SVE_PT_SVE_PREG_SIZE): Likewise.
6029         (SVE_PT_SVE_FFR_SIZE): Likewise.
6030         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6031         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6032         (__SVE_SIG_TO_PT): Likewise.
6033         (SVE_PT_SVE_OFFSET): Likewise.
6034         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6035         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6036         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6037         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6038         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6039         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6040         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6041         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6042         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6043         (SVE_PT_SVE_SIZE): Likewise.
6044         (SVE_PT_SIZE): Likewise.
6045         (HAS_SVE_STATE): New define.
6046
6047 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6048
6049         * nat/aarch64-sve-linux-sigcontext.h: New file.
6050         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6051         new files.
6052         (SVE_VQ_MIN): Likewise.
6053         (SVE_VQ_MAX): Likewise.
6054         (SVE_VL_MIN): Likewise.
6055         (SVE_VL_MAX): Likewise.
6056         (SVE_NUM_ZREGS): Likewise.
6057         (SVE_NUM_PREGS): Likewise.
6058         (sve_vl_valid): Likewise.
6059         (struct user_sve_header): Likewise.
6060
6061 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6062             Richard Bunt <Richard.Bunt@arm.com>
6063
6064         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6065         was requested by GDB.
6066
6067 2018-06-15  Tom de Vries  <tdevries@suse.de>
6068
6069         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6070
6071 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6072
6073         * gnulib/update-gnulib.sh: Print expected versions of
6074         autoconf/aclocal.
6075
6076 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6077
6078         * arch-utils.c (default_type_align): Use type_length_units.
6079         * gdbtypes.c (type_align): Use type_length_units.
6080
6081 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6082
6083         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6084         of 'define' command.
6085
6086 2018-06-14  Tom de Vries  <tdevries@suse.de>
6087
6088         PR cli/22573
6089         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6090         get_no_prettyformat_print_options.
6091
6092 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6093
6094         * sparc-nat.h: Include target.h.
6095         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6096         <fetch_registers>: Remove this argument in function call.
6097         <store_registers>: Remove this argument in function call, remove
6098         extra semicolon.
6099         <low_forget_process>: Call sparc64_forget_process instead of
6100         sparc_forget_process.
6101
6102 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6103
6104         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6105         (procfs_target::make_corefile_notes): Adjust to new
6106         target_read_alloc return type.
6107
6108 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6109             Stephen Roberts  <stephen.roberts@arm.com>
6110
6111         PR gdb/22882
6112         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6113         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6114         Move should_notify_stop local into more inner scope.
6115
6116 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6117             Stephen Roberts  <stephen.roberts@arm.com>
6118
6119         PR gdb/22882
6120         * infrun.c (resume_1): Add call to mark_async_event_handler.
6121
6122 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6123
6124         * infrun.c (do_target_wait): Change old version of $pc printed.
6125
6126 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6127
6128         * dwarf2read.c (read_index_from_section): Rename to...
6129         (read_gdb_index_from_section): ... this, update all callers.
6130         (dwarf2_read_index): Rename to...
6131         (dwarf2_read_gdb_index): ... this, update all callers.
6132
6133 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6134
6135         * gdb/hppa-linux-nat.c
6136         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6137         hppa_linux_nat_target::fetch_registers.
6138
6139 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6140
6141         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6142         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6143         (AARCH64_DWARF_SVE_FFR): Likewise.
6144         (AARCH64_DWARF_SVE_P0): Likewise.
6145         (AARCH64_DWARF_SVE_Z0): Likewise.
6146
6147 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6148
6149         * common/common-regcache.h (raw_compare): New function.
6150         * regcache.c (regcache::raw_compare): Likewise.
6151         * regcache.h (regcache::raw_compare): New declaration.
6152
6153 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6154
6155         * common/common-regcache.h (reg_buffer_common): New structure.
6156         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6157         (reg_buffer::raw_supply): Likewise.
6158         (reg_buffer::raw_supply_integer): Likewise.
6159         (reg_buffer::raw_supply_zeroed): Likewise.
6160         (reg_buffer::raw_collect): Likewise.
6161         (reg_buffer::raw_collect_integer): Likewise.
6162         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6163         (reg_buffer::raw_supply): Likewise.
6164         (reg_buffer::raw_supply_integer): Likewise.
6165         (reg_buffer::raw_supply_zeroed): Likewise.
6166         (reg_buffer::raw_collect): Likewise.
6167         (reg_buffer::raw_collect_integer): Likewise.
6168
6169 2018-06-10  Tom Tromey  <tom@tromey.com>
6170
6171         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6172         (class remote_state) <stop_reply_queue>: Now std::vector.
6173         (remote_state::~remote_state)
6174         (remote_target::stop_reply_queue_length): Update.
6175         (struct queue_iter_param, remove_child_of_pending_fork)
6176         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6177         (check_pending_event_prevents_wildcard_vcont_callback)
6178         (remove_stop_reply_for_inferior)
6179         (remove_stop_reply_of_remote_state)
6180         (remote_notif_remove_once_on_match)
6181         (stop_reply_match_ptid_and_ws)
6182         (remote_kill_child_of_pending_fork): Remove.
6183         (remote_target::remove_new_fork_children)
6184         (remote_target::check_pending_events_prevent_wildcard_vcont)
6185         (remote_target::discard_pending_stop_replies)
6186         (remote_target::discard_pending_stop_replies_in_queue)
6187         (remote_target::remote_notif_remove_queued_reply)
6188         (remote_target::queued_stop_reply)
6189         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6190         (remote_target::wait, remote_target::kill_new_fork_children)
6191         (remote_target::async): Update.
6192
6193 2018-06-10  Tom Tromey  <tom@tromey.com>
6194
6195         * record-full.c (record_full_arch_list_cleanups): Remove.
6196         (record_full_message): Use try/catch.
6197         (record_full_wait_cleanups): Remove.
6198         (record_full_wait_1): Use try/catch.
6199         (record_full_restore): Likewise.
6200
6201 2018-06-10  Tom Tromey  <tom@tromey.com>
6202
6203         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6204         declare VEC.  Add constructor.
6205         <in_target_beneath>: Now bool.
6206         (record_full_breakpoints): Now a std::vector, static.
6207         (record_full_sync_record_breakpoints)
6208         (record_full_init_record_breakpoints)
6209         (record_full_target::insert_breakpoint)
6210         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6211
6212 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6213
6214         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6215         * serial.c (serial_interface_lookup): Remove struct keyword.
6216
6217 2018-06-10  Tom Tromey  <tom@tromey.com>
6218
6219         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6220         method.
6221         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6222         a method.
6223         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6224         method.
6225         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6226         "beneath" as a method.
6227         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6228         Use "beneath" as a method.
6229
6230 2018-06-10  Tom Tromey  <tom@tromey.com>
6231
6232         * tracefile.c (struct trace_file_writer_deleter): New.
6233         <operator()>: Rename from trace_file_writer_xfree.
6234         (trace_file_writer_up): New typedef.
6235         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6236
6237 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6238
6239         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6240         <m_registers, m_register_status>: Change type to
6241         std::unique_ptr.
6242         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6243         XCNEWVEC.
6244
6245 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6246
6247         * common/common-regcache.h (enum register_status): Add
6248         underlying type "signed char".
6249         * regcache.h (reg_buffer) <m_register_status>: Change type to
6250         register_status *.
6251         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6252         register_status instead of signed char.
6253         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6254         (reg_buffer::get_register_status): Remove cast.
6255         (readable_regcache::raw_read): Remove cast.
6256         (readable_regcache::cooked_read): Remove cast.
6257
6258 2018-06-09  Tom Tromey  <tom@tromey.com>
6259
6260         * source.c (reverse_search_command, forward_search_command): Use
6261         scoped_fd.
6262
6263 2018-06-09  Tom Tromey  <tom@tromey.com>
6264
6265         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6266         (serial_ops_list): Now static, std::vector.
6267         (serial_interface_lookup, serial_add_interface): Update.
6268
6269 2018-06-09  Tom Tromey  <tom@tromey.com>
6270
6271         * dwarf2read.c (process_cu_includes): Update.
6272         (process_full_comp_unit): Update.
6273         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6274         std::vector.
6275
6276 2018-06-08  Paul Koning  <paul_koning@dell.com>
6277
6278         PR gdb/23252
6279
6280         * python/python.c (do_start_initialization):
6281         Avoid call to internal Python API.
6282         (init__gdb_module): New function.
6283
6284 2018-06-08  Gary Benson <gbenson@redhat.com>
6285
6286         * linux-thread-db.c (valprint.h): New include.
6287         (struct check_thread_db_info): New structure.
6288         (check_thread_db_on_load, tdb_testinfo): New static globals.
6289         (check_thread_db, check_thread_db_callback): New functions.
6290         (try_thread_db_load_1): Run integrity checks if requested.
6291         (maintenance_check_libthread_db): New function.
6292         (_initialize_thread_db): Register "maint check libthread-db"
6293         and "maint set/show check-libthread-db".
6294         * NEWS: Mention the above new commands.
6295
6296 2018-06-08  Tom Tromey  <tom@tromey.com>
6297
6298         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6299         now a method.
6300
6301 2018-06-08  Tom Tromey  <tom@tromey.com>
6302
6303         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6304
6305 2018-06-08  Tom Tromey  <tom@tromey.com>
6306
6307         * common/btrace-common.h (struct btrace_data): Add constructor,
6308         destructor, move assignment operator.
6309         <empty, clear, fini>: New methods.
6310         <format>: Initialize.
6311         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6312         (btrace_data_empty): Don't declare.
6313         * common/btrace-common.c (btrace_data_init): Remove.
6314         (btrace_data::fini): Rename from btrace_data_fini.
6315         (btrace_data::empty): Rename from btrace_data_empty.
6316         (btrace_data::clear): Rename from btrace_data_clear.  Return
6317         bool.
6318         * btrace.h (make_cleanup_btrace_data): Don't declare.
6319         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6320         (parse_xml_btrace): Update.
6321         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6322         (maint_btrace_clear_packet_history_cmd): Update.
6323
6324 2018-06-07  Pedro Alves  <palves@redhat.com>
6325
6326         * target.h (target_ops) <beneath>: Now a method.  All references
6327         updated.
6328         (class target_stack): New.
6329         * target.c (g_target_stack): New.
6330         (g_current_top_target): Delete.
6331         (current_top_target): Get the top target out of g_target_stack.
6332         (target_stack::push, target_stack::unpush): New.
6333         (push_target, unpush_target): Reimplement.
6334         (target_is_pushed): Reimplement in terms of g_target_stack.
6335         (target_ops::beneath, target_stack::find_beneath): New.
6336
6337 2018-06-07  Pedro Alves  <palves@redhat.com>
6338
6339         * target.h (find_target_beneath): Delete declaration.
6340         * target.c (find_target_beneath): Delete definition.
6341         * aix-thread.c: All callers of find_target_beneath adjusted to
6342         call target_ops::beneath instead.
6343         * bsd-uthread.c: Likewise.
6344         * linux-thread-db.c: Likewise.
6345         * ravenscar-thread.c: Likewise.
6346         * sol-thread.c: Likewise.
6347         * spu-multiarch.c: Likewise.
6348
6349 2018-06-07  Pedro Alves  <palves@redhat.com>
6350
6351         * target.h (target_ops) <beneath>: Now a method.  All references
6352         updated.
6353         (target_ops) <m_beneath>: New.
6354         * target.c (target_ops::beneath): New.
6355         * corelow.c: Adjust all references to target_ops::beneath.
6356         * linux-thread-db.c: Likewise.
6357         * make-target-delegates: Likewise.
6358         * record-btrace.c: Likewise.
6359         * record-full.c: Likewise.
6360         * remote.c: Likewise.
6361         * target.c: Likewise.
6362         * target-delegates.c: Regenerate.
6363
6364 2018-06-07  Pedro Alves  <palves@redhat.com>
6365
6366         * target.h (target_stack): Delete.
6367         (current_top_target): Declare function.
6368         * target.c (target_stack): Delete.
6369         (g_current_top_target): New.
6370         (current_top_target): New function.
6371         * auxv.c: Use current_top_target instead of target_stack
6372         throughout.
6373         * avr-tdep.c: Likewise.
6374         * breakpoint.c: Likewise.
6375         * corefile.c: Likewise.
6376         * elfread.c: Likewise.
6377         * eval.c: Likewise.
6378         * exceptions.c: Likewise.
6379         * frame.c: Likewise.
6380         * gdbarch-selftests.c: Likewise.
6381         * gnu-v3-abi.c: Likewise.
6382         * ia64-tdep.c: Likewise.
6383         * ia64-vms-tdep.c: Likewise.
6384         * infcall.c: Likewise.
6385         * infcmd.c: Likewise.
6386         * infrun.c: Likewise.
6387         * linespec.c: Likewise.
6388         * linux-tdep.c: Likewise.
6389         * minsyms.c: Likewise.
6390         * ppc-linux-nat.c: Likewise.
6391         * ppc-linux-tdep.c: Likewise.
6392         * procfs.c: Likewise.
6393         * regcache.c: Likewise.
6394         * remote.c: Likewise.
6395         * rs6000-tdep.c: Likewise.
6396         * s390-linux-nat.c: Likewise.
6397         * s390-tdep.c: Likewise.
6398         * solib-aix.c: Likewise.
6399         * solib-darwin.c: Likewise.
6400         * solib-dsbt.c: Likewise.
6401         * solib-spu.c: Likewise.
6402         * solib-svr4.c: Likewise.
6403         * solib-target.c: Likewise.
6404         * sparc-tdep.c: Likewise.
6405         * sparc64-tdep.c: Likewise.
6406         * spu-tdep.c: Likewise.
6407         * symfile.c: Likewise.
6408         * symtab.c: Likewise.
6409         * target-descriptions.c: Likewise.
6410         * target-memory.c: Likewise.
6411         * target.c: Likewise.
6412         * target.h: Likewise.
6413         * tracefile-tfile.c: Likewise.
6414         * tracepoint.c: Likewise.
6415         * valops.c: Likewise.
6416         * valprint.c: Likewise.
6417         * value.c: Likewise.
6418         * windows-tdep.c: Likewise.
6419         * mi/mi-main.c: Likewise.
6420
6421 2018-06-07  Tom Tromey  <tom@tromey.com>
6422
6423         * valprint.h (build_address_symbolic): Declare.
6424         * printcmd.c (print_address_symbolic): Update.
6425         (build_address_symbolic): Change "name" and "filename" to
6426         std::string.
6427         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6428         Update.
6429         * defs.h (build_address_symbolic): Remove declaration.
6430
6431 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6432
6433         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6434         (aarch64_vnv_type): Add function.
6435         (aarch64_pseudo_register_name): Add V regs for SVE.
6436         (aarch64_pseudo_register_type): Likewise.
6437         (aarch64_pseudo_register_reggroup_p): Likewise.
6438         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6439         (aarch64_pseudo_read_value): Add V regs for SVE.
6440         (aarch64_pseudo_write_2): Use V0 offset for SVE
6441         (aarch64_pseudo_write): Add V regs for SVE.
6442         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6443
6444 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6445
6446         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6447         (sve_vl_from_vq): Likewise.
6448
6449 2018-06-05  Tom Tromey  <tom@tromey.com>
6450
6451         * cli/cli-cmds.c (show_version): Update.
6452         * top.c (print_gdb_version): Add "interactive" parameter.
6453         Update.
6454         * main.c (captured_main_1): Update.
6455         * top.h (print_gdb_version): Add "interactive" parameter and a
6456         comment.
6457
6458 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6459
6460         * common/enum-flags.h: Add trailing semicolon to example in
6461         comment.
6462
6463 2018-06-05  Tom Tromey  <tom@tromey.com>
6464
6465         PR cli/12326:
6466         * NEWS: Add entry about pager.
6467         * utils.c (pagination_disabled_for_command): New global.
6468         (prompt_for_continue): Allow "c" response to prompt.
6469         (reinitialize_more_filter): Clear
6470         pagination_disabled_for_command.
6471         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6472
6473 2018-06-04  Tom Tromey  <tom@tromey.com>
6474
6475         * ada-lang.h (ada_lookup_symbol_list): Update.
6476         * ada-lang.c (resolve_subexp): Update.
6477         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6478         parameter.
6479         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6480         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6481         results parameter to std::vector.
6482         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6483         Update.
6484         * ada-exp.y (block_lookup): Update.
6485         (select_possible_type_sym): Change type of syms.  Remove nsyms
6486         parameter.
6487         (write_var_or_type, write_name_assoc): Update.
6488
6489 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6490
6491         * windows-nat.c (windows_nat_target::xfer_partial): Return
6492         TARGET_XFER_E_IO if we need to delegate to the target beneath
6493         but BENEATH is NULL.
6494
6495 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6496
6497         * Makefile.in (config.status): Add configure.nat as a
6498         dependency.
6499
6500 2018-06-04  Tom Tromey  <tom@tromey.com>
6501
6502         * cp-name-parser.y (cpname_state): Add method declarations.
6503         (HANDLE_QUAL): Update.
6504         (cpname_state::d_grab, cpname_state::fill_comp)
6505         (cpname_state::make_operator, cpname_state::make_dtor)
6506         (cpname_state::make_builtin_type, cpname_state::make_name)
6507         (cpname_state::d_qualify, cpname_state::d_int_type)
6508         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6509         (%union): Move earlier.
6510
6511 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6512
6513         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6514
6515 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6516
6517         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6518         (aarch64_pseudo_write_1): Likewise.
6519         (aarch64_pseudo_read_value): Use helper.
6520         (aarch64_pseudo_write): Likewise.
6521
6522 2018-06-04  Pedro Alves  <palves@redhat.com>
6523
6524         * darwin-nat.c (darwin_ops): Delete.
6525         (darwin_attach_pid): Use get_native_target.
6526
6527 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6528
6529         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6530         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6531
6532 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6533
6534         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6535         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6536         (aarch64_gdbarch_init): Check for SVE.
6537         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6538
6539 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6540
6541         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6542         * aarch64-tdep.h (aarch64_read_description): Likewise.
6543         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6544         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6545         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6546         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6547         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6548
6549 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6550
6551         * value.c (value_fetch_lazy_bitfield): New.
6552         (value_fetch_lazy_memory): New.
6553         (value_fetch_lazy_register): New.
6554         (value_fetch_lazy): Factor out to smaller functions.
6555
6556 2018-06-01  Tom Tromey  <tom@tromey.com>
6557
6558         * cp-name-parser.y (backslashable, represented): Now const.
6559
6560 2018-06-01  Tom Tromey  <tom@tromey.com>
6561
6562         * cp-name-parser.y: Include parser-defs.h.
6563         (parser_fprintf): Remove declaration.
6564
6565 2018-06-01  Tom Tromey  <tom@tromey.com>
6566
6567         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6568         %parse-param.
6569         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6570         (global_result): Remove globals.
6571         (struct cpname_state): New.
6572         (yyparse): Don't declare.
6573         (yylex, yyerror): Move declarations after %union.
6574         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6575         (make_name): Add state parameter.
6576         Update all callers.
6577         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6578         parameter.
6579         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6580         Update.
6581         (yylex): Add lvalp, state parameters.
6582         (yyerror): Add state parameter.
6583         (cp_demangled_name_to_comp): Update.
6584
6585 2018-06-01  Tom Tromey  <tom@tromey.com>
6586
6587         * cp-name-parser.y (parser_fprintf): Declare.
6588         (GDB_YY_REMAP_PREFIX): Define.
6589         Include yy-remap.h.  Don't redefine yy* identifiers.
6590
6591 2018-06-01  Tom Tromey  <tom@tromey.com>
6592
6593         * python/py-type.c (typy_legacy_template_argument): Update.
6594         * cp-support.h (cp_demangled_name_to_comp): Update.
6595         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6596         parameter to be a "std::string *".
6597         (main): Update.
6598
6599 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6600
6601         * ada-lex.l: Include "diagnostics.h" instead of
6602         "common/diagnostics.h".
6603         * unittests/environ-selftests.c: Likewise.
6604         * common/diagnostics.h: Moved to ../include.
6605
6606 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6607
6608         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6609         to language_mode_manual while calling breakpoint_re_set_one.
6610
6611 2018-06-01  Tom Tromey  <tom@tromey.com>
6612
6613         * valops.c (value_cast_structs, destructor_name_p): Update.
6614         * symtab.c (gdb_mangle_name): Update.
6615         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6616         Update.
6617         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6618         (pascal_object_print_value_fields, pascal_object_print_value):
6619         Update.
6620         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6621         * linespec.c (find_methods): Update.
6622         * gdbtypes.h (type_name_no_tag): Remove.
6623         (type_name_or_error): Rename from type_name_no_tag_or_error.
6624         * gdbtypes.c (type_name_no_tag): Remove.
6625         (type_name_or_error): Rename from type_name_no_tag_or_error.
6626         (lookup_struct_elt_type, check_typedef): Update.
6627         * expprint.c (print_subexp_standard): Update.
6628         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6629         * d-namespace.c (d_lookup_nested_symbol): Update.
6630         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6631         (cp_print_class_member): Update.
6632         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6633         * completer.c (add_struct_fields): Update.
6634         * c-typeprint.c (cp_type_print_derivation_info)
6635         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6636         Update.
6637         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6638         (ada_prefer_type, ada_is_exception_sym): Update.
6639
6640 2018-06-01  Tom Tromey  <tom@tromey.com>
6641
6642         * valops.c (enum_constant_from_type, value_namespace_elt)
6643         (value_maybe_namespace_elt): Update.
6644         * valarith.c (find_size_for_pointer_math): Update.
6645         * target-descriptions.c (make_gdb_type): Update.
6646         * symmisc.c (print_symbol): Update.
6647         * stabsread.c (define_symbol, read_type)
6648         (complain_about_struct_wipeout, add_undefined_type)
6649         (cleanup_undefined_types_1): Update.
6650         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6651         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6652         (rust_internal_print_type, rust_composite_type)
6653         (rust_evaluate_funcall, rust_evaluate_subexp)
6654         (rust_inclusive_range_type_p): Update.
6655         * python/py-type.c (typy_get_tag): Update.
6656         * p-typeprint.c (pascal_type_print_base): Update.
6657         * mdebugread.c (parse_symbol, parse_type): Update.
6658         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6659         Update.
6660         * guile/scm-type.c (gdbscm_type_tag): Update.
6661         * go-lang.c (sixg_string_p): Update.
6662         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6663         Update.
6664         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6665         (TYPE_TAG_NAME): Remove.
6666         * gdbtypes.c (type_name_no_tag): Simplify.
6667         (check_typedef, check_types_equal, recursive_dump_type)
6668         (copy_type_recursive, arch_composite_type): Update.
6669         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6670         in summary mode when needed.
6671         * eval.c (evaluate_funcall): Update.
6672         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6673         (process_structure_scope, read_enumeration_type)
6674         (read_namespace_type, read_module_type, determine_prefix): Update.
6675         * cp-support.c (inspect_type): Update.
6676         * coffread.c (process_coff_symbol, decode_base_type): Update.
6677         * c-varobj.c (c_is_path_expr_parent): Update.
6678         * c-typeprint.c (c_type_print_base_struct_union): Update.
6679         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6680         summary when using C language.
6681         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6682         (gen_maybe_namespace_elt): Update.
6683         * ada-lang.c (ada_type_name): Simplify.
6684         (empty_record, ada_template_to_fixed_record_type_1)
6685         (template_to_static_fixed_type)
6686         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6687
6688 2018-06-01  Tom Tromey  <tom@tromey.com>
6689
6690         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6691         c_print_type.
6692         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6693         (c_print_type): Update.
6694         (c_print_type): New overload.
6695         (c_type_print_varspec_prefix, c_type_print_args)
6696         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6697         (c_type_print_base_struct_union, c_type_print_base_1)
6698         (cp_type_print_method_args): Add "language" parameter.
6699         (c_type_print_base): Update.
6700         * c-lang.h (c_print_type): Add new overload.
6701
6702 2018-06-01  Tom Tromey  <tom@tromey.com>
6703
6704         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6705         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6706
6707 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6708
6709         * aarch64-tdep.c (aarch64_sve_register_names): New const
6710         var.
6711         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6712         (AARCH64_SVE_Z_REGS_NUM): New define.
6713         (AARCH64_SVE_P_REGS_NUM): Likewise.
6714         (AARCH64_SVE_NUM_REGS): Likewise.
6715
6716 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6717
6718         * nat/linux-ptrace.h [__alpha__]
6719         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6720         definitions.
6721
6722 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6723
6724         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6725         the endianness selected.
6726         * NEWS: Document `set endian auto' mode operation update.
6727
6728 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6729
6730         * Makefile.in: Add new header.
6731         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6732         (sve_vl_from_vg): Likewise.
6733         (sve_vq_from_vl): Likewise.
6734         (sve_vl_from_vq): Likewise.
6735         (sve_vq_from_vg): Likewise.
6736         (sve_vg_from_vq): Likewise.
6737         * configure.nat: Add new c file.
6738         * nat/aarch64-sve-linux-ptrace.c: New file.
6739         * nat/aarch64-sve-linux-ptrace.h: New file.
6740
6741 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6742
6743         * aarch64-linux-nat.c (aarch64_linux_read_description):
6744         Add parmeter zero.
6745         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6746         Likewise.
6747         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6748         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6749         (aarch64_gdbarch_init): Add parmeter zero.
6750         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6751         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6752         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6753         parmeter.
6754         * doc/gdb.texinfo: Describe SVE feature
6755         * features/aarch64-sve.c: New file.
6756
6757 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6758
6759         PR gdb/23210
6760         * gdbarch.sh (significant_addr_bit): Default to zero when
6761         not set by target architecture.
6762         * gdbarch.c: Re-generated.
6763         * utils.c (address_significant): Update.
6764
6765 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6766
6767         * stack.c (func_command): Remove trailing newline in call to error.
6768
6769 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6770
6771         * regcache.h (regcache_raw_collect): Remove, update callers to
6772         use regcache::raw_collect.
6773         * regcache.c (regcache_raw_collect): Remove.
6774
6775 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6776
6777         * regcache.h (regcache_raw_supply): Remove, update callers to
6778         use detached_regcache::raw_supply.
6779         * regcache.c (regcache_raw_supply): Remove.
6780
6781 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6782
6783         * regcache.h (regcache_cooked_write_part): Remove, update
6784         callers to use regcache::cooked_write_part.
6785         * regcache.c (regcache_cooked_write_part): Remove.
6786
6787 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6788
6789         * regcache.h (regcache_cooked_read_part): Remove, update callers
6790         to use readable_regcache::cooked_read_part.
6791         * regcache.c (regcache_cooked_read_part): Remove.
6792
6793 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6794
6795         * regcache.h (regcache_cooked_read_value): Remove, update
6796         callers to use readable_regcache::cooked_read_value.
6797         * regcache.c (regcache_cooked_read_value): Remove.
6798
6799 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6800
6801         * regcache.h (regcache_cooked_write): Remove, update callers to
6802         use regcache::cooked_write.
6803         * regcache.c (regcache_cooked_write): Remove.
6804
6805 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6806
6807         * regcache.h (regcache_invalidate): Remove, update callers to
6808         use detached_regcache::invalidate instead.
6809         * regcache.c (regcache_invalidate): Remove.
6810
6811 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6812
6813         * regcache.h (regcache_raw_write_part): Remove, update callers
6814         to use regcache::raw_write_part instead.
6815         * regcache.c (regcache_raw_write_part): Remove.
6816
6817 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6818
6819         * regcache.h (regcache_raw_read_part): Remove, update callers to
6820         use readable_regcache::raw_read_part instead.
6821         * regcache.c (regcache_raw_read_part): Remove.
6822
6823 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6824
6825         * regcache.h (regcache_cooked_read): Remove, update callers to
6826         use readable_regcache::cooked_read instead.
6827         * regcache.c (regcache_cooked_read): Remove.
6828
6829 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6830
6831         * regcache.h (regcache_raw_write): Remove, update callers to use
6832         regcache::raw_write instead.
6833         * regcache.c (regcache_raw_write): Remove.
6834
6835 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6836
6837         * regcache.h (regcache_raw_read): Remove, update callers to use
6838         readable_regcache::raw_read instead.
6839         * regcache.c (regcache_raw_read): Remove.
6840
6841 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6842
6843         * regcache.h (regcache_raw_update): Remove, update callers to
6844         use readable_regcache::raw_update instead.
6845         * regcache.c (regcache_raw_update): Remove.
6846
6847 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6848
6849         * regcache.h (regcache_register_status): Remove, update callers
6850         to use reg_buffer::get_register_status directly instead.
6851         * regcache.c (regcache_register_status): Remove.
6852
6853 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6854
6855         * regcache.h (regcache_get_ptid): Remove, update all callers to
6856         call regcache::ptid instead.
6857         * regcache.c (regcache_get_ptid): Remove.
6858
6859 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6860
6861         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6862
6863 2018-05-30  Pedro Alves  <palves@redhat.com>
6864
6865         * common/common-exceptions.h (exception_rethrow): Use
6866         ATTRIBUTE_NORETURN.
6867
6868 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6869
6870         * breakpoint.c (print_solib_event, check_status_catch_solib):
6871         Remove struct keyword in range-based for loops.
6872         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6873         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6874         Likewise.
6875         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6876         Likewise.
6877         * symfile.c (addr_info_make_relative): Likewise.
6878         * thread.c (value_in_thread_stack_temporaries): Likewise.
6879
6880 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6881
6882         PR gdb/16841
6883         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6884         aggregate type to get its real type before accessing it.
6885
6886 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6887
6888         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6889         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6890         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6891         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6892         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6893         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6894         * printcmd.c (info_address_command): Likewise.
6895
6896 2018-05-29  Tom Tromey  <tom@tromey.com>
6897
6898         * windows-nat.c (handle_exception): Update fall-through comment.
6899
6900 2018-05-29  Tom Tromey  <tom@tromey.com>
6901
6902         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6903         (struct program_space) <added_solibs>: Now a std::vector.
6904         * breakpoint.c (print_solib_event): Update.
6905         (check_status_catch_solib): Update.
6906         * progspace.c (clear_program_space_solib_cache): Update.
6907         * solib.c (update_solib_list): Update.
6908
6909 2018-05-29  Tom Tromey  <tom@tromey.com>
6910
6911         * python/py-type.c (typy_richcompare): Update.
6912         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6913         * gdbtypes.h (types_deeply_equal): Return bool.
6914         (types_equal): Likewise.
6915         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6916         declare VEC.
6917         (check_types_equal): Change worklist to std::vector.  Return
6918         bool.
6919         (struct type_equality_entry): Add constructor.
6920         (compare_maybe_null_strings): Return bool.
6921         (check_types_worklist): Return bool.  Change worklist to
6922         std::vector.
6923         (types_deeply_equal): Use std::vector.
6924         (types_equal): Return bool.
6925         (compare_maybe_null_strings): Simplify.
6926
6927 2018-05-29  Tom Tromey  <tom@tromey.com>
6928
6929         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6930
6931 2018-05-29  Tom Tromey  <tom@tromey.com>
6932
6933         * objc-lang.h: Don't include cp-support.h.
6934         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6935         declare VEC.
6936
6937 2018-05-27  Tom Tromey  <tom@tromey.com>
6938
6939         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6940
6941 2018-05-25  Tom Tromey  <tom@tromey.com>
6942
6943         * value.c (value::location): Initialize.
6944
6945 2018-05-25  Tom Tromey  <tom@tromey.com>
6946
6947         * dbxread.c (init_bincl_list): Remove.
6948         (bincl_list): Now a std::vector.
6949         (bincls_allocated, next_bincl): Remove.
6950         (free_bincl_list, do_free_bincl_list_cleanup)
6951         (make_cleanup_free_bincl_list): Remove.
6952         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6953         unique_xmalloc_ptr.
6954         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6955         (struct header_file_location): Add constructor.
6956         (add_bincl_to_list): Remove.
6957
6958 2018-05-25  Tom Tromey  <tom@tromey.com>
6959
6960         * tui/tui.c (tui_enable): Update.
6961         * mi/mi-interp.c (mi_interp::init): Update.
6962         * interps.h (class interp) <name>: New method.
6963         <m_name>: Rename from name.
6964         (~scoped_restore_interp): Update.
6965         * interps.c (interp::interp): Update.
6966         (interp_add, interp_set, interp_lookup_existing)
6967         (current_interp_named_p): Update.
6968
6969 2018-05-25  Tom Tromey  <tom@tromey.com>
6970
6971         * interps.c (interp_name): Remove.
6972         * mi/mi-interp.c (mi_interp::init): Update.
6973         * interps.h (interp_name): Remove.
6974         (~scoped_restore_interp): Update.
6975         * tui/tui.c (tui_enable): Update.
6976
6977 2018-05-25  Tom Tromey  <tom@tromey.com>
6978
6979         * utils.c (fputs_maybe_filtered): Update.
6980         * linespec.c (decode_line_full): Update.
6981         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6982         (mi_print_breakpoint_for_event, mi_solib_loaded)
6983         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6984         (mi_user_selected_context_changed): Update.
6985         * mi/mi-main.c (mi_execute_command): Update.
6986         * cli/cli-script.c (execute_control_command): Update.
6987         * python/python.c (execute_gdb_command): Update.
6988         * solib.c (info_sharedlibrary_command): Update.
6989         * interps.c (interp_ui_out): Remove.
6990         * interps.h (interp_ui_out): Remove.
6991
6992 2018-05-25  Tom Tromey  <tom@tromey.com>
6993
6994         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6995         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6996         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6997
6998 2018-05-25  Tom Tromey  <tom@tromey.com>
6999
7000         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7001         * interps.c (interp_exec): Use scoped_restore.
7002
7003 2018-05-25  Tom Tromey  <tom@tromey.com>
7004
7005         * remote.c (remote_target::remote_file_get): Use
7006         gdb::byte_vector.
7007         (remote_target::remote_file_put): Likewise.
7008
7009 2018-05-25  Tom Tromey  <tom@tromey.com>
7010
7011         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7012         a std::string.
7013         (get_pe_section_index, add_pe_exported_sym): Update.
7014         (read_pe_exported_syms): Use gdb::def_vector.
7015
7016 2018-05-25  Tom Tromey  <tom@tromey.com>
7017
7018         * frame.c (remove_prev_frame): Remove.
7019         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7020
7021 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7022
7023         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7024         Remove prototypes.
7025         * mips-linux-nat.c (supply_fpregset): Always call
7026         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7027         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7028         `mips_fill_fpregset'.
7029         * mips-linux-tdep.c (mips_supply_fpregset)
7030         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7031         (mips_fill_fpregset_wrapper): Remove functions.
7032         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7033         (mips_linux_fpregset): Remove variable.
7034         (mips_linux_iterate_over_regset_sections): Use
7035         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7036         (mips_linux_o32_sigframe_init): Remove comment.
7037
7038 2018-05-25  Pedro Alves  <palves@redhat.com>
7039
7040         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7041         (struct readahead_cache, struct packet_reg, struct
7042         remote_arch_state, class remote_state): Move higher up in the
7043         file.
7044         (remote_target::m_remote_state): Now an object instead of a pointer.
7045         (remote_target::get_remote_state): Adjust.
7046
7047 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7048
7049         * stack.c (select_and_print_frame): Delete.
7050         (struct function_bounds): Move struct within function.
7051         (func_command): Most content moved into new function
7052         find_frame_for_function, use new function, print result, add
7053         function comment.
7054         (find_frame_for_function): New function, now returns a result.
7055
7056 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7057
7058         * stack.c (iterate_over_block_arg_vars): Fix comment.
7059         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7060
7061 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7062
7063         PR gdb/23203
7064         * frame.c
7065         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7066         Define.
7067         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7068         Define.
7069         * frame.h (class scoped_restore_selected_frame): New class.
7070         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7071         of any exception, use scoped_restore_selected_frame to restore the
7072         frame instead.
7073
7074 2018-05-24  Pedro Alves  <palves@redhat.com>
7075
7076         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7077         override.
7078
7079 2018-05-23  Tom Tromey  <tom@tromey.com>
7080
7081         * complaints.c (struct complaints): Remove.
7082         (symfile_complaint_book): Remove.
7083         (series): New global.
7084         (complaint_internal): Update.
7085         (clear_complaints): Update.
7086
7087 2018-05-23  Tom Tromey  <tom@tromey.com>
7088
7089         * complaints.c (counters): New global.
7090         (struct complain): Remove.
7091         (struct complaints) <root>: Remove.
7092         (complaint_sentinel): Remove.
7093         (symfile_complaint_book): Update.
7094         (find_complaint) Remove.
7095         (complaint_internal, clear_complaints): Update.
7096
7097 2018-05-23  Tom Tromey  <tom@tromey.com>
7098
7099         * complaints.c (struct complain) <file, line>: Remove.
7100         (find_complaint): Remove file, line parameters.
7101         (complaint_internal): Update.
7102
7103 2018-05-23  Tom Tromey  <tom@tromey.com>
7104
7105         * complaints.c (vcomplaint): Remove.
7106         (complaint_internal) Merge in contents of vcomplaint.
7107
7108 2018-05-23  Tom Tromey  <tom@tromey.com>
7109
7110         * complaints.c (struct complaints) <explanation>: Remove.
7111         (symfile_explanations): Remove.
7112         (symfile_complaint_book): Update.
7113         (vcomplaint): Update.
7114         (struct explanation): Remove.
7115
7116 2018-05-23  Tom Tromey  <tom@tromey.com>
7117
7118         * complaints.c (symfile_complaints): Remove.
7119         (complaint_internal): Remove "complaints" parameter.
7120         (clear_complaints, vcomplaint): Remove "c" parameter.
7121         (get_complaints): Remove.
7122         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7123         (dwarf2_debug_line_missing_file_complaint)
7124         (dwarf2_debug_line_missing_end_sequence_complaint)
7125         (dwarf2_complex_location_expr_complaint)
7126         (dwarf2_const_value_length_mismatch_complaint)
7127         (dwarf2_section_buffer_overflow_complaint)
7128         (dwarf2_macro_malformed_definition_complaint)
7129         (dwarf2_invalid_attrib_class_complaint)
7130         (create_addrmap_from_index, dw2_symtab_iter_next)
7131         (dw2_expand_marked_cus)
7132         (dw2_debug_names_iterator::find_vec_in_debug_names)
7133         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7134         (create_debug_type_hash_table, init_cutu_and_read_dies)
7135         (partial_die_parent_scope, add_partial_enumeration)
7136         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7137         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7138         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7139         (create_cus_hash_table, create_dwp_hash_table)
7140         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7141         (dwarf2_rnglists_process, dwarf2_ranges_process)
7142         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7143         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7144         (handle_struct_member_die, process_structure_scope)
7145         (read_array_type, read_common_block, read_module_type)
7146         (read_tag_pointer_type, read_typedef, read_base_type)
7147         (read_subrange_type, load_partial_dies, partial_die_info::read)
7148         (partial_die_info::read, partial_die_info::read)
7149         (partial_die_info::read, read_checked_initial_length_and_offset)
7150         (dwarf2_string_attr, read_formatted_entries)
7151         (dwarf_decode_line_header)
7152         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7153         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7154         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7155         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7156         (get_signatured_type, get_DW_AT_signature_type)
7157         (decode_locdesc, file_file_name, consume_improper_spaces)
7158         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7159         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7160         (dwarf2_symbol_mark_computed, set_die_type)
7161         (read_attribute_value): Update.
7162         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7163         Update.
7164         * dbxread.c (unknown_symtype_complaint)
7165         (lbrac_mismatch_complaint, repeated_header_complaint)
7166         (set_namestring, function_outside_compilation_unit_complaint)
7167         (read_dbx_symtab, process_one_symbol): Update.
7168         * gdbtypes.c (stub_noname_complaint): Update.
7169         * windows-nat.c (handle_unload_dll): Update.
7170         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7171         (decode_base_type): Update.
7172         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7173         (eb_complaint, record_include_begin, record_include_end)
7174         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7175         (process_xcoff_symbol, read_symbol)
7176         (function_outside_compilation_unit_complaint)
7177         (scan_xcoff_symtab): Update.
7178         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7179         * buildsym.c (finish_block_internal, make_blockvector)
7180         (end_symtab_get_static_block, augment_type_symtab): Update.
7181         * dtrace-probe.c (dtrace_process_dof)
7182         (dtrace_static_probe_ops::get_probes): Update.
7183         * complaints.h (struct complaint): Don't declare.
7184         (symfile_complaints): Remove.
7185         (complaint_internal): Remove "complaints" parameter.
7186         (complaint): Likewise.
7187         (clear_complaints): Likewise.
7188         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7189         (reread_symbols): Update.
7190         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7191         (dwarf2_frame_cache, decode_frame_entry): Update.
7192         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7193         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7194         (info_selectors_command): Update.
7195         * macrotab.c (macro_include, check_for_redefinition)
7196         (macro_undef): Update.
7197         * objfiles.c (filter_overlapping_sections): Update.
7198         * stabsread.c (invalid_cpp_abbrev_complaint)
7199         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7200         (define_symbol, error_type, read_type, rs6000_builtin_type)
7201         (stabs_method_name_from_physname, read_member_functions)
7202         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7203         (attach_fields_to_type, complain_about_struct_wipeout)
7204         (read_range_type, read_args, common_block_start)
7205         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7206         Update.
7207         * mdebugread.c (index_complaint, unknown_ext_complaint)
7208         (basic_type_complaint, bad_tag_guess_complaint)
7209         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7210         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7211         (parse_procedure, parse_lines)
7212         (function_outside_compilation_unit_complaint)
7213         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7214         (bad_tag_guess_complaint, reg_value_complaint): Update.
7215         * cp-support.c (demangled_name_complaint): Update.
7216         * macroscope.c (sal_macro_scope): Update.
7217         * dwarf-index-write.c (class debug_names): Update.
7218
7219 2018-05-23  Tom Tromey  <tom@tromey.com>
7220
7221         * complaints.c (clear_complaints): Remove "noisy" parameter.
7222         * complaints.h (clear_complaints): Update.
7223         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7224         (reread_symbols): Update.
7225
7226 2018-05-23  Tom Tromey  <tom@tromey.com>
7227
7228         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7229         SUBSEQUENT_MESSAGE.
7230         (vcomplaint, clear_complaints): Update.
7231         (symfile_explanations): Remove some messages.
7232
7233 2018-05-23  Tom Tromey  <tom@tromey.com>
7234
7235         * complaints.c (internal_complaint): Remove.
7236         * complaints.h (internal_complaint): Remove.
7237
7238 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7239
7240         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7241
7242 2018-05-22  Pedro Alves  <palves@redhat.com>
7243
7244         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7245         (remote_fileio_badfd, remote_fileio_return_errno)
7246         (remote_fileio_return_success, remote_fileio_func_open)
7247         (remote_fileio_func_open, remote_fileio_func_close)
7248         (remote_fileio_func_read, remote_fileio_func_write)
7249         (remote_fileio_func_lseek, remote_fileio_func_rename)
7250         (remote_fileio_func_unlink, remote_fileio_func_stat)
7251         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7252         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7253         remote_target parameter.
7254         (remote_fio_func_map) <func>: Add remote_target parameter.
7255         (do_remote_fileio_request, remote_fileio_request):
7256         * remote-fileio.h (remote_fileio_request):
7257         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7258         remote_target parameter.
7259         (remote_notif_process, handle_notification): Adjust to pass down
7260         the remote.
7261         (remote_notif_state_allocate): Add remote_target parameter.  Save
7262         it.
7263         * remote-notif.h (struct remote_target): Forward declare.
7264         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7265         remote_target parameter.
7266         (struct remote_notif_state) <remote>: New field.
7267         (remote_notif_ack, remote_notif_parse): Add remote_target
7268         parameter.
7269         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7270         remote_target parameter.
7271         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7272         (threads_listing_context, rmt_thread_action, protocol_feature)
7273         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7274         (packet_result, struct threads_listing_context, remote_state):
7275         Move definitions and declarations higher up.
7276         (remote_target) <~remote_target>: Declare.
7277         (remote_download_command_source, remote_file_put, remote_file_get)
7278         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7279         (remote_hostio_pread_vFile, remote_hostio_send_command)
7280         (remote_hostio_set_filesystem, remote_hostio_open)
7281         (remote_hostio_close, remote_hostio_unlink, remote_state)
7282         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7283         (get_memory_write_packet_size, get_memory_read_packet_size)
7284         (append_pending_thread_resumptions, remote_detach_1)
7285         (append_resumption, remote_resume_with_vcont)
7286         (add_current_inferior_and_thread, wait_ns, wait_as)
7287         (process_stop_reply, remote_notice_new_inferior)
7288         (process_initial_stop_replies, remote_add_thread)
7289         (btrace_sync_conf, remote_btrace_maybe_reopen)
7290         (remove_new_fork_children, kill_new_fork_children)
7291         (discard_pending_stop_replies, stop_reply_queue_length)
7292         (check_pending_events_prevent_wildcard_vcont)
7293         (discard_pending_stop_replies_in_queue, stop_reply)
7294         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7295         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7296         (remote_interrupt_as, remote_interrupt_ns)
7297         (remote_get_noisy_reply, remote_query_attached)
7298         (remote_add_inferior, remote_current_thread, get_current_thread)
7299         (set_thread, set_general_thread, set_continue_thread)
7300         (set_general_process, write_ptid)
7301         (remote_unpack_thread_info_response, remote_get_threadinfo)
7302         (parse_threadlist_response, remote_get_threadlist)
7303         (remote_threadlist_iterator, remote_get_threads_with_ql)
7304         (remote_get_threads_with_qxfer)
7305         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7306         (get_offsets, remote_check_symbols, remote_supported_packet)
7307         (remote_query_supported, remote_packet_size)
7308         (remote_serial_quit_handler, remote_detach_pid)
7309         (remote_vcont_probe, remote_resume_with_hc)
7310         (send_interrupt_sequence, interrupt_query)
7311         (remote_notif_get_pending_events, fetch_register_using_p)
7312         (send_g_packet, process_g_packet, fetch_registers_using_g)
7313         (store_register_using_P, store_registers_using_G)
7314         (set_remote_traceframe, check_binary_download)
7315         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7316         (remote_xfer_live_readonly_partial, remote_read_bytes)
7317         (remote_send_printf, remote_flash_write, readchar)
7318         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7319         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7320         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7321         (extended_remote_disable_randomization, extended_remote_run)
7322         (send_environment_packet, extended_remote_environment_support)
7323         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7324         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7325         (packet_command): Now methods of ...
7326         (remote_target): ... this class.
7327         (m_remote_state) <remote_target>: New field.
7328         (struct remote_state) <stop_reply_queue,
7329         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7330         fields.
7331         (remote_state::remote_state): Allocate stop_reply_queue.
7332         (remote_state): Delete global.
7333         (get_remote_state_raw): Delete.
7334         (remote_target::get_remote_state): Allocate m_remote_state on
7335         demand.
7336         (get_current_remote_target): New.
7337         (remote_ops, extended_remote_ops): Delete.
7338         (wait_forever_enabled_p, remote_async_inferior_event_token):
7339         Delete, moved to struct remote_state.
7340         (remote_target::close): Delete self.  Destruction bits split to
7341         ...
7342         (remote_target::~remote_target): ... this.
7343         (show_memory_packet_size): Adjust to use
7344         get_current_remote_target.
7345         (struct protocol_feature) <func>: Add remote_target parameter.
7346         All callers adjusted.
7347         (curr_quit_handler_target): New.
7348         (remote_serial_quit_handler): Reimplement.
7349         (remote_target::open_1): Adjust to use get_current_remote_target.
7350         Heap-allocate remote_target/extended_remote_target instances.
7351         (vcont_builder::vcont_builder): Add remote_target parameter, and
7352         save it in m_remote.  All callers adjusted.
7353         (vcont_builder::m_remote): New field.
7354         (vcont_builder::restart, vcont_builder::flush)
7355         (vcont_builder::push_action): Use it.
7356         (remote_target::commit_resume): Use it.
7357         (struct queue_iter_param) <remote>: New field.
7358         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7359         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7360         (check_pending_event_prevents_wildcard_vcont_callback)
7361         (remote_target::check_pending_events_prevent_wildcard_vcont)
7362         (remote_target::discard_pending_stop_replies)
7363         (remote_target::discard_pending_stop_replies_in_queue)
7364         (remote_target::remote_notif_remove_queued_reply): Fill in
7365         'remote' field.
7366         (remote_notif_get_pending_events): New.
7367         (remote_target::readchar, remote_target::remote_serial_write):
7368         Save/restore curr_quit_handler_target.
7369         (putpkt): New.
7370         (kill_new_fork_children): Fill in 'remote' field.
7371         (packet_command): Use get_current_remote_target, defer to
7372         remote_target method of same name.
7373         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7374         parameter, and save it in m_remote.  All callers adjusted.
7375         (scoped_remote_fd::release): Use m_remote.
7376         (scoped_remote_fd::m_remote): New field.
7377         (remote_file_put, remote_file_get, remote_file_delete): Use
7378         get_current_remote_target, defer to remote_target method of same
7379         name.
7380         (remote_btrace_reset): Add remote_state paremeter.  Update all
7381         callers.
7382         (remote_async_inferior_event_handler). Pass down 'data'.
7383         (remote_new_objfile): Use get_current_remote_target.
7384         (remote_target::vcont_r_supported): New.
7385         (set_range_stepping): Use get_current_remote_target and
7386         remote_target::vcont_r_supported.
7387         (_initialize_remote): Don't allocate 'remote_state' and
7388         'stop_reply_queue' globals.
7389         * remote.h (struct remote_target): Forward declare.
7390         (getpkt, putpkt, remote_notif_get_pending_events): Add
7391         'remote_target' parameter.
7392
7393 2018-05-22  Pedro Alves  <palves@redhat.com>
7394
7395         * remote.c (vcont_builder): Now a class.  Make all data members
7396         private.
7397         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7398         Declare methods.
7399         (vcont_builder_restart): Rename to ...
7400         (vcont_builder::restart): ... this.
7401         (vcont_builder_flush): Rename to ...
7402         (vcont_builder::flush): ... this.
7403         (vcont_builder_push_action): Rename to ...
7404         (vcont_builder::push_action): ... this.
7405         (remote_target::commit_resume): Adjust.
7406
7407 2018-05-22  Pedro Alves  <palves@redhat.com>
7408
7409         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7410         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7411         (get_fixed_memory_packet_size): New.
7412         (get_memory_packet_size): Use it.
7413         (set_memory_packet_size): Don't override the config size with
7414         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7415         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7416         Don't refer to get_memory_packet_size if not connected to a remote
7417         target.  Show "(default)" if configured size is 0.
7418
7419 2018-05-22  Pedro Alves  <palves@redhat.com>
7420
7421         * remote.c (remote_target::mourn_inferior): Move
7422         discard_pending_stop_replies call here from ...
7423         (_initialize_remote): ... here.
7424
7425 2018-05-22  Pedro Alves  <palves@redhat.com>
7426
7427         * remote.c (compare_section_command): Remove set_general_process
7428         call.
7429
7430 2018-05-22  Pedro Alves  <palves@redhat.com>
7431
7432         * remote.c (struct packet_reg, struct remote_arch_state):
7433         Move higher up in the file.
7434         (remote_state) <m_arch_states>: Store remote_arch_state values
7435         instead of remote_arch_state pointers.
7436         (remote_state::get_remote_arch_state): Adjust.
7437
7438 2018-05-22  Pedro Alves  <palves@redhat.com>
7439
7440         * remote.c: Include <unordered_map>.
7441         (remote_state): Now a class.
7442         (remote_state) <get_remote_arch_state>: Declare method.
7443         <get_remote_arch_state>: New field.
7444         (remote_arch_state) <remote_arch_state>: Declare ctor.
7445         <regs>: Now a unique_ptr.
7446         (remote_gdbarch_data_handle): Delete.
7447         (get_remote_arch_state): Delete.
7448         (remote_state::get_remote_arch_state): New.
7449         (get_remote_state): Adjust to call remote_state's
7450         get_remote_arch_state method.
7451         (init_remote_state): Delete, bits factored out to ...
7452         (remote_arch_state::remote_arch_state): ... this new method.
7453         (get_remote_packet_size, get_memory_packet_size)
7454         (process_g_packet, remote_target::fetch_registers)
7455         (remote_target::prepare_to_store, store_registers_using_G)
7456         (remote_target::store_registers, remote_target::get_trace_status):
7457         Adjust to call remote_state's method.
7458         (_initialize_remote): Remove reference to
7459         remote_gdbarch_data_handle.
7460
7461 2018-05-22  Pedro Alves  <palves@redhat.com>
7462
7463         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7464         pread>: New method declarations.
7465         (remote_target::open_1): Adjust.
7466         (readahead_cache_invalidate): Rename to ...
7467         (readahead_cache::invalidate): ... this, and adjust to be a class
7468         method.
7469         (readahead_cache_invalidate_fd): Rename to ...
7470         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7471         class method.
7472         (remote_hostio_pwrite): Adjust.
7473         (remote_hostio_pread_from_cache): Rename to ...
7474         (readahead_cache::pread): ... this, and adjust to be a class
7475         method.
7476         (remote_hostio_close): Adjust.
7477
7478 2018-05-22  Pedro Alves  <palves@redhat.com>
7479
7480         * remote.c (remote_hostio_close_cleanup): Delete.
7481         (class scoped_remote_fd): New.
7482         (remote_file_put, remote_file_get): Use it.
7483
7484 2018-05-22  Pedro Alves  <palves@redhat.com>
7485
7486         (struct vCont_action_support): Use bool and initialize all fields.
7487         (struct readahead_cache): Initialize all fields.
7488         (remote_state): Use bool and initialize all fields.
7489         (remote_state::remote_state, remote_state::~remote_state): New.
7490         (new_remote_state): Delete.
7491         (_initialize_remote): Use new to allocate remote_state.
7492
7493 2018-05-22  Pedro Alves  <palves@redhat.com>
7494             張俊芝  <zjz@zjz.name>
7495
7496         PR gdb/22973
7497         * c-exp.y: Include "c-support.h".
7498         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7499         of tolower.  Use c_ident_is_alpha to scan names.
7500         * c-lang.c: Include "c-support.h".
7501         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7502         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7503         * c-support.h: New file, with bits factored out from ...
7504         * cp-name-parser.y: ... this file.
7505         Include "c-support.h".
7506         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7507         c-support.h and renamed.
7508         (symbol_end, yylex): Adjust.
7509
7510 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7511
7512         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7513         parameter type to CORE_ADDR.
7514         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7515         parameter type in declaration to CORE_ADDR.
7516         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7517         target_auxv_search to get AT_HWCAP and use the result to get the
7518         target description.
7519         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7520         to CORE_ADDR. Remove the cast of the return value to unsigned
7521         long. Fix error predicate of target_auxv_search.
7522         (ppc_linux_nat_target::read_description): Change the type of the
7523         hwcap variable to CORE_ADDR.
7524
7525 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7526
7527         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7528         if the size of fpscr is larger than 32 bits.
7529
7530 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7531
7532         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7533         (ppc32_linux_vsxregmap): New global.
7534         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7535         regcache_supply_regset, and regcache_collect_regset.
7536         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7537         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7538         (fetch_vsx_register, store_vsx_register): Remove.
7539         (fetch_vsx_registers): Add regno parameter. Get regset using
7540         ppc_linux_vsxregset. Use regset to supply registers.
7541         (store_vsx_registers): Add regno parameter. Get regset using
7542         ppc_linux_vsxregset. Use regset to collect registers.
7543         (fetch_register): Call fetch_vsx_registers instead of
7544         fetch_vsx_register.
7545         (store_register): Call store_vsx_registers instead of
7546         store_vsx_register.
7547         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7548         new regno parameter.
7549         (store_ppc_registers): Call store_vsx_registers with -1 for the
7550         new regno parameter.
7551         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7552         (ppc_collect_vsxregset): Remove.
7553
7554 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7555
7556         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7557         offset fields.
7558         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7559         for vector register offset fields.
7560         (ppc64_fbsd_reg_offsets): Likewise.
7561         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7562         to vector register offset fields.
7563         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7564         to vector register offset fields.
7565         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7566         vector register offset fields.
7567         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7568         initializers for vector register offset fields.
7569         (rs6000_aix64_reg_offsets): Likewise.
7570         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7571         (ppc_supply_vrregset): Remove.
7572         (ppc_collect_vrregset): Remove.
7573         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7574         (ppc_linux_vrregset) : New function.
7575         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7576         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7577         (ppc32_linux_vrregset): Remove.
7578         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7579         and use result instead of ppc32_linux_vrregset.
7580         (ppc32_linux_reg_offsets): Remove initializers for vector register
7581         offset fields.
7582         (ppc64_linux_reg_offsets): Likewise.
7583         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7584         * ppc-linux-nat.c: Include regset.h.
7585         (gdb_vrregset_t): Adjust comment to account for little-endian
7586         mode.
7587         (supply_vrregset, fill_vrregset): Remove.
7588         (fetch_altivec_register, store_altivec_register): Remove.
7589         (fetch_altivec_registers): Add regno parameter. Get regset using
7590         ppc_linux_vrregset. Use regset to supply registers.
7591         (store_altivec_registers): Add regno parameter. Get regset using
7592         ppc_linux_vrregset. Use regset to collect registers.
7593         (fetch_register): Call fetch_altivec_registers instead of
7594         fetch_altivec_register.
7595         (store_register): Call store_altivec_registers instead of
7596         store_altivec_register.
7597         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7598         the new regno parameter.
7599         (store_ppc_registers): Call store_altivec_registers with -1 for
7600         the new regno parameter.
7601
7602 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7603
7604         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7605         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7606         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7607         (gdb_vrregset_t): Change array type size to
7608         PPC_LINUX_SIZEOF_VRREGSET.
7609         (gdb_vsxregset_t): Change array type size to
7610         PPC_LINUX_SIZEOF_VSXREGSET.
7611         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7612         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7613         PPC_LINUX_SIZEOF_VSXREGSET.
7614
7615 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7616
7617         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7618         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7619         nat/ppc-linux.c.
7620         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7621         ppc_linux_target_wordsize with tid.
7622         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7623         wordsize with tid.
7624         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7625         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7626         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7627         tid parameter. Remove static specifier.
7628         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7629         (ppc_linux_target_wordsize): New declaration.
7630
7631 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7632
7633         * arch/ppc-linux-common.c: New file.
7634         * arch/ppc-linux-common.h: New file.
7635         * arch/ppc-linux-tdesc.h: New file.
7636         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7637         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7638         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7639         arch/ppc-linux-tdesc.h.
7640         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7641         arch/ppc-linux-tdesc.h.
7642         (ppc_linux_nat_target::read_description): Remove target
7643         description matching code. Fill a ppc_linux_features struct and
7644         call ppc_linux_match_description with it. Move comment about ISA
7645         2.05 to ppc-linux-common.c.
7646         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7647         arch/ppc-linux-tdesc.h.
7648         (ppc_linux_core_read_description): Remove target description
7649         matching code. Fill a ppc_linux_features struct and call
7650         ppc_linux_match_description with it.
7651         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7652         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7653         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7654         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7655         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7656         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7657         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7658         (tdesc_powerpc_e500l): Remove.
7659
7660 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7661
7662         * ada-lang.c (catch_assert_command): Pass empty string instead
7663         of NULL for excep_string argument.
7664
7665 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7666
7667         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7668         the width of the requested register exceeds the width of the
7669         `ptrace' data type.
7670
7671 2018-05-21  Tom Tromey  <tom@tromey.com>
7672
7673         * printcmd.c (output_command): Remove.
7674         (output_command_const): Rename to output_command.
7675         * valprint.h (output_command): Rename from output_command_const.
7676         * tracepoint.c (trace_dump_actions): Call output_command.
7677
7678 2018-05-21  Tom Tromey  <tom@tromey.com>
7679
7680         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7681         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7682         * ada-lang.h (create_ada_exception_catchpoint): Update.
7683         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7684         std::string.
7685         (create_excep_cond_exprs, ~ada_catchpoint)
7686         (should_stop_exception, print_one_exception)
7687         (print_mention_exception, print_recreate_exception): Update.
7688         (ada_get_next_arg): Remove.
7689         (catch_ada_exception_command_split): Use std::string.  Change type
7690         of "excep_string", "cond_string".
7691         (catch_ada_exception_command): Update.
7692         (create_ada_exception_catchpoint): Change type of excep_string.
7693         (ada_exception_sal): Remove excep_string parameter.
7694         (~ada_catchpoint): Remove.
7695
7696 2018-05-21  Tom Tromey  <tom@tromey.com>
7697
7698         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7699         cleanup.
7700
7701 2018-05-21  Tom Tromey  <tom@tromey.com>
7702
7703         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7704         Return unique_xmalloc_ptr.
7705         (print_it_exception): Update.
7706
7707 2018-05-21  Tom Tromey  <tom@tromey.com>
7708
7709         * tracepoint.c (trace_dump_actions): Use std::string.
7710
7711 2018-05-21  Tom Tromey  <tom@tromey.com>
7712
7713         * symfile.c (reread_symbols): Use std::string for original_name.
7714
7715 2018-05-21  Tom Tromey  <tom@tromey.com>
7716
7717         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7718         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7719         constructor.
7720
7721 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7722
7723         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7724         instance to...
7725         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7726         * objfiles.c (get_objfile_bfd_data): Allocate
7727         objfile_per_bfd_storage with obstack_new when allocating on
7728         obstack.
7729
7730 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7731
7732         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7733         OBSTACK_ZALLOC.
7734         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7735         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7736         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7737         (add_pending): Likewise.
7738         (parse_symbol): Likewise.
7739         (parse_partial_symbols): Likewise.
7740         (psymtab_to_symtab_1): Likewise.
7741         (new_psymtab): Likewise.
7742         (elfmdebug_build_psymtabs): Likewise.
7743         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7744         * objfiles.c (get_objfile_bfd_data): Likewise.
7745         (objfile_register_static_link): Likewise.
7746         * psymtab.c (allocate_psymtab): Likewise.
7747         * stabsread.c (read_member_functions): Likewise.
7748         * xcoffread.c (xcoff_end_psymtab): Likewise.
7749
7750 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7751
7752         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7753         compiler supports std::is_trivially_constructible.
7754         * common/poison.h: Include obstack.h.
7755         (IsMallocable): Define to is_trivially_constructible if the
7756         compiler supports it, define to true_type otherwise.
7757         (xobnew): New.
7758         (XOBNEW): Redefine.
7759         (xobnewvec): New.
7760         (XOBNEWVEC): Redefine.
7761         * gdb_obstack.h (obstack_zalloc): New.
7762         (OBSTACK_ZALLOC): Redefine.
7763         (obstack_calloc): New.
7764         (OBSTACK_CALLOC): Redefine.
7765         (obstack_new): New.
7766         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7767         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7768         gdbarch.c.
7769         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7770         obstack_calloc/obstack_zalloc.
7771         (gdbarch_obstack_zalloc): Remove.
7772         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7773
7774 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7775
7776         * stack.c (backtrace_command_1): Remove useless variable int i.
7777
7778 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7779
7780         * stack.c (print_frame_info): Fix comment.
7781
7782 2018-05-18  Tom Tromey  <tom@tromey.com>
7783
7784         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7785         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7786         (~dwarf2_per_objfile): Update
7787         (dwarf2_get_dwz_file): Use new.
7788         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7789         unique_ptr.
7790
7791 2018-05-18  Tom Tromey  <tom@tromey.com>
7792
7793         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7794         unique_ptr.
7795         * dwarf2read.c (struct dwp_file): Add constructor and
7796         initializers.
7797         (open_and_init_dwp_file): Return a unique_ptr.
7798         (dwarf2_per_objfile, create_dwp_hash_table)
7799         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7800         (lookup_dwo_unit_in_dwp): Update.
7801         (open_and_init_dwp_file, get_dwp_file): Update.
7802
7803 2018-05-18  Tom Tromey  <tom@tromey.com>
7804
7805         * dwarf2read.c (dwarf2_per_objfile): Update.
7806         (struct mapped_index): Add initializers.
7807         (dwarf2_read_index): Use new.
7808         (dw2_symtab_iter_init): Update.
7809         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7810         unique_ptr.
7811
7812 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7813
7814         * dwarf2read.c (mapped_index) <total_size>: Remove.
7815
7816 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7817
7818         * unittests/format_pieces-selftests.c (test_format_specifier):
7819         Add ARI comments.
7820
7821 2018-05-18  Tom Tromey  <tom@tromey.com>
7822
7823         * c-typeprint.c (maybe_print_hole): New function.
7824         (c_print_type_struct_field_offset): Update.
7825         (c_type_print_base_struct_union): Call maybe_print_hole.
7826
7827 2018-05-17  Keith Seitz  <keiths@redhat.com>
7828
7829         * breakpoint.c (build_bpstat_chain): New function, moved from
7830         bpstat_stop_status.
7831         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7832         If no stop chain is passed, call build_bpstat_chain to build it.
7833         * breakpoint.h (build_bpstat_chain): Declare.
7834         (bpstat_stop_status): Move documentation here from breakpoint.c.
7835         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7836         build the stop chain and pass it to skip_inline_frames.
7837         Pass this stop chain to bpstat_stop_status.
7838         * inline-frame.c: Include breakpoint.h.
7839         (stopped_by_user_bp_inline_frame): New function.
7840         (skip_inline_frames): Add parameter `stop_chain'.
7841         Move documention to inline-frame.h.
7842         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7843         whether the frame should be elided.
7844         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7845         Add moved documentation and update for new parameter.
7846
7847 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7848
7849         PR cli/14975
7850         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7851         unittests/format_pieces-selftests.c.
7852         * common/format.h (format_piece) <operator==>: New.
7853         (format_pieces) <operator[]>: Remove.
7854         * common/format.c (format_pieces::format_pieces): Handle \e.
7855         * unittests/format_pieces-selftests.c: New.
7856
7857 2018-05-17  Tom Tromey  <tom@tromey.com>
7858
7859         PR symtab/23010:
7860         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7861         (dw2_instantiate_symtab): Add skip_partial parameter.
7862         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7863         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7864         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7865         (dw2_expand_symtabs_matching_one)
7866         (dw2_find_pc_sect_compunit_symtab)
7867         (dw2_debug_names_lookup_symbol)
7868         (dw2_debug_names_expand_symtabs_for_function): Update.
7869         (init_cutu_and_read_dies): Add skip_partial parameter.
7870         (process_psymtab_comp_unit, build_type_psymtabs_1)
7871         (process_skeletonless_type_unit, load_partial_comp_unit)
7872         (psymtab_to_symtab_1): Update.
7873         (load_full_comp_unit): Add skip_partial parameter.
7874         (process_imported_unit_die, dwarf2_read_addr_index)
7875         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7876         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7877         (read_signatured_type): Update.
7878
7879 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7880
7881         * value.c (release_value): Remove unused variable.
7882         (record_latest_value): Likewise.
7883         (access_value_history): Likewise.
7884         (preserve_values): Likewise.
7885
7886 2018-05-17  Tom Tromey  <tom@tromey.com>
7887
7888         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7889         Initialize.
7890
7891 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7892
7893         PR gdb/22286
7894         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7895         Also handle registers whose width is not a multiple of
7896         PTRACE_TYPE_RET.
7897         (linux_nat_trad_target::store_register): Likewise.
7898
7899 2018-05-16  Tom Tromey  <tom@tromey.com>
7900
7901         * gdbcore.h (core_bfd): Redefine.
7902         * corelow.c (core_target::close): Update.
7903         (core_target_open): Update.
7904         * progspace.h (struct program_space) <cbfd>: Now a
7905         gdb_bfd_ref_ptr.
7906
7907 2018-05-16  Tom Tromey  <tom@tromey.com>
7908
7909         PR cli/19551:
7910         * symfile-add-flags.h (enum symfile_add_flags)
7911         <SYMFILE_NOT_FILENAME>: New constant.
7912         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7913         objfile name from BFD.
7914         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7915         * minidebug.c (find_separate_debug_file_in_section): Put
7916         ".gnu_debugdata" into BFD's file name.
7917
7918 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7919
7920         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7921         Remove.
7922
7923 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7924
7925         PR binutils/21446
7926         * aarch64-tdep.c (aarch64_analyze_prologue,
7927         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7928         Indicate not interested in errors.
7929
7930 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7931
7932         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7933         Supply the MIPS_ZERO_REGNUM register.
7934
7935 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7936
7937         * mips-tdep.c (mask_address_var): Make variable static.
7938
7939 2018-05-14  Tom Tromey  <tom@tromey.com>
7940
7941         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7942
7943 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7944
7945         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7946         FXSAVE_ADDR for the mxcsr register.
7947
7948 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7949
7950         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7951
7952 2018-05-11  Pedro Alves  <palves@redhat.com>
7953
7954         * corelow.c (core_target) <core_target>: No longer inline.
7955         Initialize m_core_gdbarch, m_core_vec and build the section table
7956         here.
7957         <~core_target>: New.
7958         <core_gdbarch, get_core_register_section>: New methods.
7959         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7960         factored out from ...
7961         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7962         (core_ops): Delete.
7963         (sniff_core_bfd): Add gdbarch parameter.
7964         (core_close): Delete, merged into ...
7965         (core_target::close): ... here.  Delete self.
7966         (core_close_cleanup): Delete.
7967         (core_target_open): Allocate a core_target on the heap.  Use a
7968         unique_ptr instead of a cleanup.  Bits moved into the core_target
7969         ctor.  Adjust to use core_target methods instead of globals.
7970         (get_core_register_section): Rename to ...
7971         (core_target::get_core_register_section): ... this and adjust.
7972         (struct get_core_registers_cb_data): New.
7973         (get_core_registers_cb): Use it.  Use bool.
7974         (core_target::fetch_registers, core_target::files_info)
7975         (core_target::xfer_partial, core_target::read_description)
7976         (core_target::pid_to, core_target::thread_name): Adjust to
7977         reference class fields instead of globals.
7978         * target.h (struct target_ops_deleter, target_ops_up): New.
7979
7980 2018-05-11  Pedro Alves  <palves@redhat.com>
7981
7982         * corefile.c (core_file_command): Move to corelow.c.
7983         * corelow.c (the_core_target): Delete.
7984         (core_file_command): Moved from corefile.c.  Check exec_bfd
7985         instead of the_core_target.  Use target_detach instead of calling
7986         into the_core_target directly.
7987         (maybe_say_no_core_file_now): New.
7988         (core_target::detach): Use it.
7989         (_initialize_corelow): Remove references to the_core_target.
7990         * gdbcore.h (the_core_target): Delete.
7991
7992 2018-05-11  Tom Tromey  <tromey@redhat.com>
7993             Pedro Alves  <palves@redhat.com>
7994
7995         * corefile.c (core_bfd): Remove.
7996         * gdbcore.h (core_bfd): Now a macro.
7997         * progspace.h (struct program_space) <cbfd>: New field.
7998
7999 2018-05-11  Tom Tromey  <tom@tromey.com>
8000
8001         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8002         gdb::def_vector.
8003
8004 2018-05-10  Tom Tromey  <tom@tromey.com>
8005
8006         * configure: Rebuild.
8007         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8008
8009 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8010
8011         PR server/23158:
8012         * regformats/regdat.sh: Adjust script, following the addition
8013         of the new expedite_regs parameter to init_target_desc.
8014
8015 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8016     
8017         PR gdb/23127
8018         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8019         set_gdbarch_significant_addr_bit.
8020         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8021         set_gdbarch_significant_addr_bit.
8022         * utils.c (address_significant): Update to sign extend addr.
8023
8024 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8025
8026         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8027         (xtensa_linux_init_abi): Limit tdep->num_regs by
8028         tdep->num_nopriv_regs.
8029         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8030         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8031         not initialized.
8032
8033 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8034
8035         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8036
8037 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8038
8039         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8040         (I387_MXCSR_INIT_VAL): New constant.
8041         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8042         buffer if it was supplied by the inferior.
8043         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8044         (i387_xsave_get_clear_bv): New function.
8045         (i387_supply_xsave): Only read x87 control registers from the
8046         xsave buffer if the feature is enabled, and the state will have
8047         been written, otherwise, provide a suitable default.
8048         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8049         including x87 control registers.  Update control registers if they
8050         have changed from the default value, and mark features as enabled
8051         as required.
8052         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8053
8054 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8055
8056         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8057
8058 2018-05-07  Tom Tromey  <tom@tromey.com>
8059
8060         * configure: Rebuild.
8061         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8062
8063 2018-05-07  Tom Tromey  <tom@tromey.com>
8064
8065         PR tdep/20362:
8066         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8067         bit.  Use correct value for VDIV.
8068
8069 2018-05-04  Tom Tromey  <tom@tromey.com>
8070
8071         * configure: Rebuild.
8072         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8073
8074 2018-05-04  Tom Tromey  <tom@tromey.com>
8075
8076         * linux-record.c (record_linux_system_call) <case
8077         RECORD_SYS_RECVFROM>: Add "break".
8078
8079 2018-05-04  Tom Tromey  <tom@tromey.com>
8080
8081         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8082         Add missing "break".
8083         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8084         Add missing "break".
8085
8086 2018-05-04  Tom Tromey  <tom@tromey.com>
8087
8088         * rs6000-tdep.c (ppc_process_record_op4)
8089         (ppc_process_record_op63): Add fall-through comment.
8090
8091 2018-05-04  Tom Tromey  <tom@tromey.com>
8092
8093         * i386-tdep.c (i386_process_record): Add fall-through comment.
8094
8095 2018-05-04  Tom Tromey  <tom@tromey.com>
8096
8097         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8098         comment.
8099
8100 2018-05-04  Tom Tromey  <tom@tromey.com>
8101
8102         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8103         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8104         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8105         comment.
8106         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8107         comment.
8108         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8109         comment.
8110
8111 2018-05-04  Tom Tromey  <tom@tromey.com>
8112
8113         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8114
8115 2018-05-04  Tom Tromey  <tom@tromey.com>
8116
8117         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8118         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8119         * symfile.c (section_is_mapped): Fix fall-through comment.
8120         * stabsread.c (define_symbol, read_member_functions): Fix
8121         fall-through comment.
8122         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8123         comment.
8124         * remote.c (remote_wait_as): Fix fall-through comment.
8125         * p-exp.y (yylex): Fix fall-through comment.
8126         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8127         comment.
8128         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8129         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8130         * jv-exp.y (yylex): Fix fall-through comment.
8131         * go-exp.y (lex_one_token): Fix fall-through comment.
8132         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8133         fall-through comment.
8134         * f-exp.y (yylex): Fix fall-through comment.
8135         * dwarf2read.c (process_die): Fix fall-through comments.
8136         * dbxread.c (process_one_symbol): Fix fall-through comment.
8137         * d-exp.y (lex_one_token): Fix fall-through comment.
8138         * cp-name-parser.y (yylex): Fix fall-through comment.
8139         * coffread.c (coff_symtab_read): Fix fall-through comment.
8140         * c-exp.y (lex_one_token): Fix fall-through comment.
8141         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8142         comment.
8143         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8144         comment.
8145
8146 2018-05-04  Tom Tromey  <tom@tromey.com>
8147
8148         PR python/22730:
8149         * NEWS: Mention gdb.execute change.
8150         * gdbcmd.h (execute_control_command): Don't declare.
8151         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8152         execute_control_commands, execute_control_commands_to_string.
8153         * cli/cli-script.h (execute_control_commands)
8154         (execute_control_commands_to_string): Declare.
8155         (execute_control_command): Add from_tty parameter.
8156         * cli/cli-script.c (execute_control_commands)
8157         (execute_control_commands_to_string): New functions.
8158         (execute_user_command): Use execute_control_commands.
8159         (execute_control_command_1): Add "from_tty" parameter.  Update.
8160         (execute_control_command): Likewise.
8161
8162 2018-05-04  Tom Tromey  <tom@tromey.com>
8163
8164         PR python/22731:
8165         * NEWS: Mention that breakpoint commands are writable.
8166         * python/py-breakpoint.c (bppy_set_commands): New function.
8167         (breakpoint_object_getset) <"commands">: Use it.
8168
8169 2018-05-04  Tom Tromey  <tom@tromey.com>
8170
8171         * tracepoint.c (actions_command): Update.
8172         * mi/mi-cmd-break.c (mi_command_line_array)
8173         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8174         (mi_read_next_line): Remove.
8175         (mi_cmd_break_commands): Update.
8176         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8177         function_view.
8178         * cli/cli-script.c (get_command_line): Update.
8179         (process_next_line): Use function_view.  Constify.
8180         (recurse_read_control_structure, read_command_lines)
8181         (read_command_lines_1): Change argument types to function_view.
8182         (do_define_command, document_command): Update.
8183         * breakpoint.h (check_tracepoint_command): Don't declare.
8184         * breakpoint.c (check_tracepoint_command): Remove.
8185         (commands_command_1, create_tracepoint_from_upload): Update.
8186
8187 2018-05-04  Tom Tromey  <tom@tromey.com>
8188
8189         PR gdb/11750:
8190         * cli/cli-script.h (enum command_control_type) <define_control>:
8191         New constant.
8192         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8193         (build_command_line, execute_control_command_1)
8194         (process_next_line): Likewise.
8195         (do_define_command): New function, extracted from define_command.
8196         (define_command): Use it.
8197
8198 2018-05-04  Tom Tromey  <tom@tromey.com>
8199
8200         * tracepoint.c (actions_command): Update.
8201         * cli/cli-script.h (read_command_lines): Update.
8202         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8203         (MAX_TMPBUF): Remove define.
8204         (define_command): Use string_printf.
8205         (document_command): Likewise.
8206         * breakpoint.c (commands_command_1): Update.
8207
8208 2018-05-04  Tom Tromey  <tom@tromey.com>
8209
8210         * top.c (execute_command): Update.
8211         * cli/cli-script.h (print_command_lines): Now varargs.
8212         * cli/cli-script.c (print_command_lines): Now varargs.
8213         (execute_control_command_1) <case while_control, case if_control>:
8214         Update.
8215
8216 2018-05-04  Tom Tromey  <tom@tromey.com>
8217
8218         * tracepoint.c (all_tracepoint_actions): Rename from
8219         all_tracepoint_actions_and_cleanup.  Change return type.
8220         (actions_command, encode_actions_1, encode_actions)
8221         (trace_dump_actions, tdump_command): Update.
8222         * remote.c (remote_download_command_source): Update.
8223         * python/python.c (gdbpy_eval_from_control_command)
8224         (python_command, python_interactive_command): Update.
8225         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8226         * guile/guile.c (guile_command)
8227         (gdbscm_eval_from_control_command, guile_command): Update.
8228         * compile/compile.c (compile_code_command)
8229         (compile_print_command, compile_to_object): Update.
8230         * cli/cli-script.h (struct command_lines_deleter): New.
8231         (counted_command_line): New typedef.
8232         (struct command_line): Add constructor, destructor.
8233         <body_list>: Remove.
8234         <body_list_0, body_list_1>: New members.
8235         (command_line_up): Remove typedef.
8236         (read_command_lines, read_command_lines_1, get_command_line):
8237         Update.
8238         (copy_command_lines): Don't declare.
8239         * cli/cli-script.c (build_command_line): Use "new".
8240         (get_command_line): Return counted_command_line.
8241         (print_command_lines, execute_user_command)
8242         (execute_control_command_1, while_command, if_command): Update.
8243         (realloc_body_list): Remove.
8244         (process_next_line, recurse_read_control_structure): Update.
8245         (read_command_lines, read_command_lines_1): Return counted_command_line.
8246         (free_command_lines): Use "delete".
8247         (copy_command_lines): Remove.
8248         (define_command, document_command, show_user_1): Update.
8249         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8250         a counted_command_line.
8251         * breakpoint.h (counted_command_line): Remove typedef.
8252         (breakpoint_set_commands): Update.
8253         * breakpoint.c (check_no_tracepoint_commands)
8254         (validate_commands_for_breakpoint): Update.
8255         (breakpoint_set_commands): Change commands to be a
8256         counted_command_line.
8257         (commands_command_1, update_dprintf_command_list)
8258         (create_tracepoint_from_upload): Update.
8259
8260 2018-05-04  Tom Tromey  <tom@tromey.com>
8261
8262         * cli/cli-decode.h (cmd_list_element): New constructor.
8263         (~cmd_list_element): New destructor.
8264         (struct cmd_list_element): Add initializers.
8265         * cli/cli-decode.c (do_add_cmd): Use "new".
8266         (delete_cmd): Use "delete".
8267
8268 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8269             Pedro Alves <palves@redhat.com>
8270
8271         PR breakpoints/19806 and support for PR external/20207.
8272         * NEWS: Mention Aarch64 watchpoint improvements.
8273         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8274         watchpoints and PR external/20207 watchpoints.
8275         * nat/aarch64-linux-hw-point.c
8276         (kernel_supports_any_contiguous_range): New.
8277         (aarch64_watchpoint_offset): New.
8278         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8279         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8280         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8281         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8282         next_addr_orig_p.  Support PR external/20207 watchpoints.
8283         (aarch64_downgrade_regs): New.
8284         (aarch64_dr_state_insert_one_point): New parameters offset and
8285         addr_orig.
8286         (aarch64_dr_state_remove_one_point): Likewise.
8287         (aarch64_handle_breakpoint): Update caller.
8288         (aarch64_handle_aligned_watchpoint): Likewise.
8289         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8290         aligned_offset.
8291         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8292         aarch64_downgrade_regs.
8293         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8294         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8295         (DR_CONTROL_MASK): ... this.
8296         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8297         (unsigned int aarch64_watchpoint_offset): New prototype.
8298         (aarch64_linux_set_debug_regs): Remove const from state.
8299         * utils.c (align_up, align_down): Move to ...
8300         * common/common-utils.c (align_up, align_down): ... here.
8301         * utils.h (align_up, align_down): Move to ...
8302         * common/common-utils.h (align_up, align_down): ... here.
8303
8304 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8305
8306         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8307         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8308         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8309         Re-implement to match the ABI as summarized in GCC's
8310         gcc/config/sparc/sparc.c.  All callers updated.
8311         (sparc32_store_arguments): Remove assertion.
8312
8313 2018-05-04  Tom Tromey  <tom@tromey.com>
8314
8315         * printcmd.c: Don't include tui.h.
8316         (decode_format): Use skip_spaces.
8317
8318 2018-05-04  Tom Tromey  <tom@tromey.com>
8319
8320         PR gdb/22619:
8321         * printcmd.c (last_count): New global.
8322         (x_command): Use saved count when repeating.
8323
8324 2018-05-04  Tom Tromey  <tom@tromey.com>
8325
8326         * nto-procfs.c (do_closedir_cleanup): Remove.
8327         (procfs_pidlist): Use gdb_dir_up.
8328         * procfs.c (do_closedir_cleanup): Remove.
8329         (proc_update_threads): Use gdb_dir_up.
8330         * common/filestuff.h (struct gdb_dir_deleter): New.
8331         (gdb_dir_up): New typedef.
8332
8333 2018-05-04  Tom Tromey  <tom@tromey.com>
8334
8335         * ada-lang.c (print_mention_exception): Use std::string.
8336
8337 2018-05-04  Tom Tromey  <tom@tromey.com>
8338
8339         * ada-lang.c (create_excep_cond_exprs): Update.
8340         (ada_exception_catchpoint_cond_string): Use std::string.
8341
8342 2018-05-04  Tom Tromey  <tom@tromey.com>
8343
8344         * ada-lang.c (xget_renaming_scope): Return std::string.
8345         (old_renaming_is_invisible): Update.
8346
8347 2018-05-04  Tom Tromey  <tom@tromey.com>
8348
8349         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8350         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8351
8352 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8353
8354         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8355
8356 2018-05-04  Tom Tromey  <tom@tromey.com>
8357
8358         * remote.c (remote_query_supported_append): Change type.
8359         (remote_check_symbols): Update.
8360
8361 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8362
8363         PR gdb/11420
8364         * configure.ac: Prepend libpython.
8365         * python/python-config.py: Likewise.
8366         * configure: Regenerate.
8367
8368 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8369
8370         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8371
8372 2018-05-03  Pedro Alves  <palves@redhat.com>
8373
8374         * s390-linux-nat.c
8375         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8376         override.  Write 'true' instead of '1'.
8377         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8378         declaration.
8379
8380 2018-05-02  Pedro Alves  <palves@redhat.com>
8381
8382         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8383         add_inf_child_target.
8384         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8385         add_inf_child_target.
8386         * aix-thread.c (aix_thread_target_info): New.
8387         (aix_thread_target) <shortname, longname, doc>: Delete.
8388         <info>: New.
8389         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8390         add_inf_child_target.
8391         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8392         add_inf_child_target.
8393         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8394         add_inf_child_target.
8395         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8396         add_inf_child_target.
8397         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8398         add_inf_child_target.
8399         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8400         add_inf_child_target.
8401         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8402         add_inf_child_target.
8403         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8404         add_inf_child_target.
8405         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8406         add_inf_child_target.
8407         * bfd-target.c (target_bfd_target_info): New.
8408         (target_bfd) <shortname, longname, doc>: Delete.
8409         <info>: New.
8410         * bsd-kvm.c (bsd_kvm_target_info): New.
8411         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8412         <info>: New.
8413         (bsd_kvm_target::open): Rename to ...
8414         (bsd_kvm_target_open): ... this.  Adjust.
8415         * bsd-uthread.c (bsd_uthread_target_info): New.
8416         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8417         <info>: New.
8418         * corefile.c (core_file_command): Adjust.
8419         * corelow.c (core_target_info): New.
8420         (core_target) <shortname, longname, doc>: Delete.
8421         <info>: New.
8422         (core_target::open): Rename to ...
8423         (core_target_open): ... this.  Adjust.
8424         * ctf.c (ctf_target_info): New.
8425         (ctf_target) <shortname, longname, doc>: Delete.
8426         <info>: New.
8427         (ctf_target::open): Rename to ...
8428         (ctf_target_open): ... this.
8429         (_initialize_ctf): Adjust.
8430         * exec.c (exec_target_info): New.
8431         (exec_target) <shortname, longname, doc>: Delete.
8432         <info>: New.
8433         (exec_target::open): Rename to ...
8434         (exec_target_open): ... this.
8435         * gdbcore.h (core_target_open): Declare.
8436         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8437         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8438         add_inf_child_target.
8439         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8440         add_inf_child_target.
8441         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8442         add_inf_child_target.
8443         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8444         add_inf_child_target.
8445         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8446         add_inf_child_target.
8447         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8448         add_inf_child_target.
8449         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8450         add_inf_child_target.
8451         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8452         add_inf_child_target.
8453         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8454         add_inf_child_target.
8455         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8456         add_inf_child_target.
8457         * inf-child.c (inf_child_target_info): New.
8458         (inf_child_target::info): New.
8459         (inf_child_open_target): Remove 'target' parameter.  Use
8460         get_native_target instead.
8461         (inf_child_target::open): Delete.
8462         (add_inf_child_target): New.
8463         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8464         Delete.
8465         <info>: New.
8466         (add_inf_child_target): Declare.
8467         (inf_child_open_target): Declare.
8468         * linux-thread-db.c (thread_db_target_info): New.
8469         (thread_db_target) <shortname, longname, doc>: Delete.
8470         <info>: New.
8471         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8472         add_inf_child_target.
8473         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8474         add_inf_child_target.
8475         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8476         add_inf_child_target.
8477         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8478         add_inf_child_target.
8479         * make-target-delegates (print_class): Adjust.
8480         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8481         add_inf_child_target.
8482         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8483         add_inf_child_target.
8484         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8485         add_inf_child_target.
8486         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8487         add_inf_child_target.
8488         * nto-procfs.c (nto_native_target_info): New.
8489         (nto_procfs_target_native) <shortname, longname, doc>:
8490         Delete.
8491         <info>: New.
8492         (nto_procfs_target_info): New.
8493         (nto_procfs_target_procfs) <shortname, longname, doc>:
8494         Delete.
8495         <info>: New.
8496         (init_procfs_targets): Adjust.
8497         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8498         add_inf_child_target.
8499         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8500         add_inf_child_target.
8501         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8502         add_inf_child_target.
8503         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8504         add_inf_child_target.
8505         * ravenscar-thread.c (ravenscar_target_info): New.
8506         (ravenscar_thread_target) <shortname, longname, doc>:
8507         Delete.
8508         <info>: New.
8509         * record-btrace.c (record_btrace_target_info):
8510         (record_btrace_target) <shortname, longname, doc>: Delete.
8511         <info>: New.
8512         (record_btrace_target::open): Rename to ...
8513         (record_btrace_target_open): ... this.  Adjust.
8514         * record-full.c (record_longname, record_doc): New.
8515         (record_full_base_target) <shortname, longname, doc>: Delete.
8516         <info>: New.
8517         (record_full_target_info): New.
8518         (record_full_target): <shortname>: Delete.
8519         <info>: New.
8520         (record_full_core_open_1, record_full_open_1): Update comments.
8521         (record_full_base_target::open): Rename to ...
8522         (record_full_open): ... this.
8523         (cmd_record_full_restore): Update.
8524         (_initialize_record_full): Update.
8525         * remote-sim.c (remote_sim_target_info): New.
8526         (gdbsim_target) <shortname, longname, doc>: Delete.
8527         <info>: New.
8528         (gdbsim_target::open): Rename to ...
8529         (gdbsim_target_open): ... this.
8530         (_initialize_remote_sim): Adjust.
8531         * remote.c (remote_doc): New.
8532         (remote_target_info): New.
8533         (remote_target) <shortname, longname, doc>: Delete.
8534         <info>: New.
8535         (extended_remote_target_info): New.
8536         (extended_remote_target) <shortname, longname, doc>: Delete.
8537         <info>: New.
8538         (remote_target::open_1): Make static.  Adjust.
8539         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8540         * s390-linux-nat.c (_initialize_s390_nat): Use
8541         add_inf_child_target.
8542         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8543         add_inf_child_target.
8544         * sol-thread.c (thread_db_target_info): New.
8545         (sol_thread_target) <shortname, longname, doc>: Delete.
8546         <info>: New.
8547         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8548         add_inf_child_target.
8549         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8550         add_inf_child_target.
8551         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8552         add_inf_child_target.
8553         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8554         add_inf_child_target.
8555         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8556         add_inf_child_target.
8557         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8558         add_inf_child_target.
8559         * spu-linux-nat.c (_initialize_spu_nat): Use
8560         add_inf_child_target.
8561         * spu-multiarch.c (spu_multiarch_target_info): New.
8562         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8563         <info>: New.
8564         * target-delegates.c: Regenerate.
8565         * target.c: Include <unordered_map>.
8566         (target_ops_p): Delete.
8567         (DEF_VEC_P(target_ops_p)): Delete.
8568         (target_factories): New.
8569         (test_target_info): New.
8570         (test_target_ops::info): New.
8571         (open_target): Adjust to use target_factories.
8572         (add_target_with_completer): Rename to ...
8573         (add_target): ... this.  Change prototype.  Register target_info
8574         and open callback in target_factories.  Register target_info in
8575         command context instead of target_ops.
8576         (add_target): Delete old implementation.
8577         (add_deprecated_target_alias): Change prototype.  Adjust.
8578         (the_native_target): New.
8579         (set_native_target, get_native_target): New.
8580         (find_default_run_target): Use the_native_target.
8581         (find_attach_target, find_run_target): Simplify.
8582         (target_ops::open): Delete.
8583         (dummy_target_info): New.
8584         (dummy_target::shortname, dummy_target::longname)
8585         (dummy_target::doc): Delete.
8586         (dummy_target::info): New.
8587         (debug_target::shortname, debug_target::longname)
8588         (debug_target::doc): Delete.
8589         (debug_target::info): New.
8590         * target.h (struct target_info): New.
8591         (target_ops::~target_ops): Add comment.
8592         (target_ops::info): New.
8593         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8594         longer virtual.  Implement in terms of target_info.
8595         (set_native_target, get_native_target): Declare.
8596         (target_open_ftype): New.
8597         (add_target, add_target_with_completer)
8598         (add_deprecated_target_alias): Change prototype.
8599         (test_target) <shortname, longname, doc>: Delete.
8600         <info>: New.
8601         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8602         add_inf_child_target.
8603         * tracefile-tfile.c (tfile_target_info): New.
8604         (tfile_target) <shortname, longname, doc>: Delete.
8605         <info>: New.
8606         (tfile_target::open): Rename to ...
8607         (tfile_target_open): ... this.
8608         (_initialize_tracefile_tfile): Adjust.
8609         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8610         add_inf_child_target.
8611         * windows-nat.c (_initialize_windows_nat): Use
8612         add_inf_child_target.
8613         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8614         add_inf_child_target.
8615
8616 2018-05-02  Pedro Alves  <palves@redhat.com>
8617
8618         * linux-nat.h (linux_nat_target) <low_new_thread,
8619         low_delete_thread, low_new_fork, low_forget_process,
8620         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8621         New virtual methods.
8622         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8623         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8624         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8625         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8626         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8627         Delete.
8628         * linux-fork.c (delete_fork): Adjust to call low method.
8629         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8630         (linux_nat_new_fork, linux_nat_forget_process_hook)
8631         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8632         (linux_nat_status_is_event):
8633         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8634         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8635         to call low method.
8636         (sigtrap_is_event): Rename to ...
8637         (linux_nat_target::low_status_is_event): ... this.
8638         (linux_nat_set_status_is_event): Delete.
8639         (save_stop_reason, linux_nat_wait_1)
8640         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8641         low methods.
8642         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8643         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8644         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8645         (linux_nat_set_prepare_to_resume): Delete.
8646         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8647         low virtual methods.
8648         * amd64-linux-nat.c: Likewise.
8649         * arm-linux-nat.c: Likewise.
8650         * i386-linux-nat.c: Likewise.
8651         * ia64-linux-nat.c: Likewise.
8652         * mips-linux-nat.c: Likewise.
8653         * ppc-linux-nat.c: Likewise.
8654         * s390-linux-nat.c: Likewise.
8655         * sparc64-linux-nat.c: Likewise.
8656         * x86-linux-nat.c: Likewise.
8657         * x86-linux-nat.h: Include "nat/x86-linux.h".
8658         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8659         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8660         Override methods.
8661
8662 2018-05-02  Pedro Alves  <palves@redhat.com>
8663
8664         * target.h (target_ops)
8665         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8666         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8667         stopped_by_watchpoint, have_continuable_watchpoint,
8668         stopped_data_address, watchpoint_addr_within_range,
8669         can_accel_watchpoint_condition, can_run, thread_alive,
8670         has_all_memory, has_memory, has_stack, has_registers,
8671         has_execution, can_async_p, is_async_p, supports_non_stop,
8672         always_non_stop_p, can_execute_reverse, supports_multi_process,
8673         supports_enable_disable_tracepoint,
8674         supports_disable_randomization, supports_string_tracing,
8675         supports_evaluation_of_breakpoint_conditions,
8676         can_run_breakpoint_commands, filesystem_is_local,
8677         can_download_tracepoint, get_trace_state_variable_value,
8678         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8679         record_is_replaying, record_will_replay,
8680         augmented_libraries_svr4_read>: Adjust to return bool.
8681         * aarch64-linux-nat.c: All implementations adjusted.
8682         * aix-thread.c: All implementations adjusted.
8683         * arm-linux-nat.c: All implementations adjusted.
8684         * breakpoint.c: All implementations adjusted.
8685         * bsd-kvm.c: All implementations adjusted.
8686         * bsd-uthread.c: All implementations adjusted.
8687         * corelow.c: All implementations adjusted.
8688         * ctf.c: All implementations adjusted.
8689         * darwin-nat.c: All implementations adjusted.
8690         * darwin-nat.h: All implementations adjusted.
8691         * exec.c: All implementations adjusted.
8692         * fbsd-nat.c: All implementations adjusted.
8693         * fbsd-nat.h: All implementations adjusted.
8694         * gnu-nat.c: All implementations adjusted.
8695         * gnu-nat.h: All implementations adjusted.
8696         * go32-nat.c: All implementations adjusted.
8697         * ia64-linux-nat.c: All implementations adjusted.
8698         * inf-child.c: All implementations adjusted.
8699         * inf-child.h: All implementations adjusted.
8700         * inf-ptrace.c: All implementations adjusted.
8701         * inf-ptrace.h: All implementations adjusted.
8702         * linux-nat.c: All implementations adjusted.
8703         * linux-nat.h: All implementations adjusted.
8704         * mips-linux-nat.c: All implementations adjusted.
8705         * nto-procfs.c: All implementations adjusted.
8706         * ppc-linux-nat.c: All implementations adjusted.
8707         * procfs.c: All implementations adjusted.
8708         * ravenscar-thread.c: All implementations adjusted.
8709         * record-btrace.c: All implementations adjusted.
8710         * record-full.c: All implementations adjusted.
8711         * remote-sim.c: All implementations adjusted.
8712         * remote.c: All implementations adjusted.
8713         * s390-linux-nat.c: All implementations adjusted.
8714         * sol-thread.c: All implementations adjusted.
8715         * spu-multiarch.c: All implementations adjusted.
8716         * target-delegates.c: All implementations adjusted.
8717         * target.c: All implementations adjusted.
8718         * target.h: All implementations adjusted.
8719         * tracefile-tfile.c: All implementations adjusted.
8720         * tracefile.c: All implementations adjusted.
8721         * tracefile.h: All implementations adjusted.
8722         * windows-nat.c: All implementations adjusted.
8723         * x86-linux-nat.h: All implementations adjusted.
8724         * x86-nat.h: All implementations adjusted.
8725
8726 2018-05-02  Pedro Alves  <palves@redhat.com>
8727
8728         * make-target-delegates (scan_target_h): Don't trim lines here.
8729         Replace sequences of tabs and/or whitespace with a single
8730         whitespace.
8731         (top level, parsing methods): Trim each line before processing it
8732         here.
8733
8734 2018-05-02  Pedro Alves  <palves@redhat.com>
8735             John Baldwin  <jhb@freebsd.org>
8736
8737         * target.h (enum strata) <debug_stratum>: New.
8738         (struct target_ops) <all delegation methods>: Replace by C++
8739         virtual methods, and drop "to_" prefix.  All references updated
8740         throughout.
8741         <to_shortname, to_longname, to_doc, to_data,
8742         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8743         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8744         virtual methods.  All references updated throughout.
8745         <can_attach, supports_terminal_ours, can_create_inferior,
8746         get_thread_control_capabilities, attach_no_wait>: New
8747         virtual methods.
8748         <insert_breakpoint, remove_breakpoint>: Now
8749         TARGET_DEFAULT_NORETURN methods.
8750         <info_proc>: Now returns bool.
8751         <to_magic>: Delete.
8752         (OPS_MAGIC): Delete.
8753         (current_target): Delete.  All references replaced by references
8754         to ...
8755         (target_stack): ... this.  New.
8756         (target_shortname, target_longname): Adjust.
8757         (target_can_run): Now a function declaration.
8758         (default_child_has_all_memory, default_child_has_memory)
8759         (default_child_has_stack, default_child_has_registers)
8760         (default_child_has_execution): Remove target_ops parameter.
8761         (complete_target_initialization): Delete.
8762         (memory_breakpoint_target): New template class.
8763         (test_target_ops): Refactor as a C++ class with virtual methods.
8764         * make-target-delegates (NAME_PART): Tighten.
8765         (POINTER_PART, CP_SYMBOL): New.
8766         (SIMPLE_RETURN_PART): Reimplement.
8767         (VEC_RETURN_PART): Expect less.
8768         (RETURN_PART, VIRTUAL_PART): New.
8769         (METHOD): Adjust to C++ virtual methods.
8770         (scan_target_h): Remove reference to C99.
8771         (dname): Output "target_ops::" prefix.
8772         (write_function_header): Adjust to output a C++ class method.
8773         (write_declaration): New.
8774         (write_delegator): Adjust to output a C++ class method.
8775         (tdname): Output "dummy_target::" prefix.
8776         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8777         method.
8778         (tdefault_names, debug_names): Delete.
8779         (return_types, tdefaults, styles, argtypes_array): New.
8780         (top level): All methods are delegators.
8781         (print_class): New.
8782         (top level): Print dummy_target and debug_target classes.
8783         * target-delegates.c: Regenerate.
8784         * target-debug.h (target_debug_print_enum_info_proc_what)
8785         (target_debug_print_thread_control_capabilities)
8786         (target_debug_print_thread_info_p): New.
8787         * target.c (dummy_target): Delete.
8788         (the_dummy_target, the_debug_target): New.
8789         (target_stack): Now extern.
8790         (set_targetdebug): Push/unpush debug target.
8791         (default_child_has_all_memory, default_child_has_memory)
8792         (default_child_has_stack, default_child_has_registers)
8793         (default_child_has_execution): Remove target_ops parameter.
8794         (complete_target_initialization): Delete.
8795         (add_target_with_completer): No longer call
8796         complete_target_initialization.
8797         (target_supports_terminal_ours): Use regular delegation.
8798         (update_current_target): Delete.
8799         (push_target): No longer check magic number.  Don't call
8800         update_current_target.
8801         (unpush_target): Don't call update_current_target.
8802         (target_is_pushed): No longer check magic number.
8803         (target_require_runnable): Skip for all stratums over
8804         process_stratum.
8805         (target_ops::info_proc): New.
8806         (target_info_proc): Use find_target_at and
8807         find_default_run_target.
8808         (target_supports_disable_randomization): Use regular delegation.
8809         (target_get_osdata): Use find_target_at.
8810         (target_ops::open, target_ops::close, target_ops::can_attach)
8811         (target_ops::attach, target_ops::can_create_inferior)
8812         (target_ops::create_inferior, target_ops::can_run)
8813         (target_can_run): New.
8814         (default_fileio_target): Use regular delegation.
8815         (target_ops::fileio_open, target_ops::fileio_pwrite)
8816         (target_ops::fileio_pread, target_ops::fileio_fstat)
8817         (target_ops::fileio_close, target_ops::fileio_unlink)
8818         (target_ops::fileio_readlink): New.
8819         (target_fileio_open_1, target_fileio_unlink)
8820         (target_fileio_readlink): Always call the target method.  Handle
8821         FILEIO_ENOSYS.
8822         (return_zero, return_zero_has_execution): Delete.
8823         (init_dummy_target): Delete.
8824         (dummy_target::dummy_target, dummy_target::shortname)
8825         (dummy_target::longname, dummy_target::doc)
8826         (debug_target::debug_target, debug_target::shortname)
8827         (debug_target::longname, debug_target::doc): New.
8828         (target_supports_delete_record): Use regular delegation.
8829         (setup_target_debug): Delete.
8830         (maintenance_print_target_stack): Skip debug_stratum.
8831         (initialize_targets): Instantiate the_dummy_target and
8832         the_debug_target.
8833         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8834         use target_stack.
8835         (target_auxv_search, fprint_target_auxv): Adjust.
8836         (info_auxv_command): Adjust to use target_stack.
8837         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8838         * exceptions.c (print_flush): Handle a NULL target_stack.
8839         * regcache.c (target_ops_no_register): Refactor as class with
8840         virtual methods.
8841
8842         * exec.c (exec_target): New class.
8843         (exec_ops): Now an exec_target.
8844         (exec_open, exec_close_1, exec_get_section_table)
8845         (exec_xfer_partial, exec_files_info, exec_has_memory)
8846         (exec_make_note_section): Refactor as exec_target methods.
8847         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8848         Delete.
8849         (exec_target::find_memory_regions): New.
8850         (_initialize_exec): Don't call init_exec_ops.
8851         * gdbcore.h (exec_file_clear): Delete.
8852
8853         * corefile.c (core_target): Delete.
8854         (core_file_command): Adjust.
8855         * corelow.c (core_target): New class.
8856         (the_core_target): New.
8857         (core_close): Remove target_ops parameter.
8858         (core_close_cleanup): Adjust.
8859         (core_target::close): New.
8860         (core_open, core_detach, get_core_registers, core_files_info)
8861         (core_xfer_partial, core_thread_alive, core_read_description)
8862         (core_pid_to_str, core_thread_name, core_has_memory)
8863         (core_has_stack, core_has_registers, core_info_proc): Rework as
8864         core_target methods.
8865         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8866         (_initialize_corelow): Initialize the_core_target.
8867         * gdbcore.h (core_target): Delete.
8868         (the_core_target): New.
8869
8870         * ctf.c: (ctf_target): New class.
8871         (ctf_ops): Now a ctf_target.
8872         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8873         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8874         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8875         methods.
8876         (init_ctf_ops): Delete.
8877         (_initialize_ctf): Don't call it.
8878         * tracefile-tfile.c (tfile_target): New class.
8879         (tfile_ops): Now a tfile_target.
8880         (tfile_open, tfile_close, tfile_files_info)
8881         (tfile_get_tracepoint_status, tfile_trace_find)
8882         (tfile_fetch_registers, tfile_xfer_partial)
8883         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8884         Refactor as tfile_target methods.
8885         (tfile_xfer_partial_features): Remove target_ops parameter.
8886         (init_tfile_ops): Delete.
8887         (_initialize_tracefile_tfile): Don't call it.
8888         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8889         (tracefile_has_stack, tracefile_has_registers)
8890         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8891         tracefile_target methods.
8892         (init_tracefile_ops): Delete.
8893         (tracefile_target::tracefile_target): New.
8894         * tracefile.h: Include "target.h".
8895         (tracefile_target): New class.
8896         (init_tracefile_ops): Delete.
8897
8898         * spu-multiarch.c (spu_multiarch_target): New class.
8899         (spu_ops): Now a spu_multiarch_target.
8900         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8901         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8902         (spu_search_memory, spu_mourn_inferior): Refactor as
8903         spu_multiarch_target methods.
8904         (init_spu_ops): Delete.
8905         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8906         complete_target_initialization.
8907
8908         * ravenscar-thread.c (ravenscar_thread_target): New class.
8909         (ravenscar_ops): Now a ravenscar_thread_target.
8910         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8911         (ravenscar_thread_alive, ravenscar_pid_to_str)
8912         (ravenscar_fetch_registers, ravenscar_store_registers)
8913         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8914         (ravenscar_stopped_by_hw_breakpoint)
8915         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8916         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8917         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8918         methods.
8919         (init_ravenscar_thread_ops): Delete.
8920         (_initialize_ravenscar): Remove references to
8921         init_ravenscar_thread_ops and complete_target_initialization.
8922
8923         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8924         (bsd_uthread_target): New class.
8925         (bsd_uthread_ops): Now a bsd_uthread_target.
8926         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8927         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8928         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8929         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8930         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8931         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8932         (bsd_uthread_target): Delete function.
8933         (_initialize_bsd_uthread): Remove reference to
8934         complete_target_initialization.
8935
8936         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8937         (target_bfd): ... this new class.
8938         (target_bfd_xfer_partial, target_bfd_get_section_table)
8939         (target_bfd_close): Refactor as target_bfd methods.
8940         (target_bfd::~target_bfd): New.
8941         (target_bfd_reopen): Adjust.
8942         (target_bfd::close): New.
8943
8944         * record-btrace.c (record_btrace_target): New class.
8945         (record_btrace_ops): Now a record_btrace_target.
8946         (record_btrace_open, record_btrace_stop_recording)
8947         (record_btrace_disconnect, record_btrace_close)
8948         (record_btrace_async, record_btrace_info)
8949         (record_btrace_insn_history, record_btrace_insn_history_range)
8950         (record_btrace_insn_history_from, record_btrace_call_history)
8951         (record_btrace_call_history_range)
8952         (record_btrace_call_history_from, record_btrace_record_method)
8953         (record_btrace_is_replaying, record_btrace_will_replay)
8954         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8955         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8956         (record_btrace_store_registers, record_btrace_prepare_to_store)
8957         (record_btrace_to_get_unwinder)
8958         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8959         (record_btrace_commit_resume, record_btrace_wait)
8960         (record_btrace_stop, record_btrace_can_execute_reverse)
8961         (record_btrace_stopped_by_sw_breakpoint)
8962         (record_btrace_supports_stopped_by_sw_breakpoint)
8963         (record_btrace_stopped_by_hw_breakpoint)
8964         (record_btrace_supports_stopped_by_hw_breakpoint)
8965         (record_btrace_update_thread_list, record_btrace_thread_alive)
8966         (record_btrace_goto_begin, record_btrace_goto_end)
8967         (record_btrace_goto, record_btrace_stop_replaying_all)
8968         (record_btrace_execution_direction)
8969         (record_btrace_prepare_to_generate_core)
8970         (record_btrace_done_generating_core): Refactor as
8971         record_btrace_target methods.
8972         (init_record_btrace_ops): Delete.
8973         (_initialize_record_btrace): Remove reference to
8974         init_record_btrace_ops.
8975         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8976         the execution_direction global.
8977         (record_full_base_target, record_full_target)
8978         (record_full_core_target): New classes.
8979         (record_full_ops): Now a record_full_target.
8980         (record_full_core_ops): Now a record_full_core_target.
8981         (record_full_target::detach, record_full_target::disconnect)
8982         (record_full_core_target::disconnect)
8983         (record_full_target::mourn_inferior, record_full_target::kill):
8984         New.
8985         (record_full_open, record_full_close, record_full_async): Refactor
8986         as methods of the record_full_base_target class.
8987         (record_full_resume, record_full_commit_resume): Refactor
8988         as methods of the record_full_target class.
8989         (record_full_wait, record_full_stopped_by_watchpoint)
8990         (record_full_stopped_data_address)
8991         (record_full_stopped_by_sw_breakpoint)
8992         (record_full_supports_stopped_by_sw_breakpoint)
8993         (record_full_stopped_by_hw_breakpoint)
8994         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8995         methods of the record_full_base_target class.
8996         (record_full_store_registers, record_full_xfer_partial)
8997         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8998         Refactor as methods of the record_full_target class.
8999         (record_full_can_execute_reverse, record_full_get_bookmark)
9000         (record_full_goto_bookmark, record_full_execution_direction)
9001         (record_full_record_method, record_full_info, record_full_delete)
9002         (record_full_is_replaying, record_full_will_replay)
9003         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9004         (record_full_stop_replaying): Refactor as methods of the
9005         record_full_base_target class.
9006         (record_full_core_resume, record_full_core_kill)
9007         (record_full_core_fetch_registers)
9008         (record_full_core_prepare_to_store)
9009         (record_full_core_store_registers, record_full_core_xfer_partial)
9010         (record_full_core_insert_breakpoint)
9011         (record_full_core_remove_breakpoint)
9012         (record_full_core_has_execution): Refactor
9013         as methods of the record_full_core_target class.
9014         (record_full_base_target::supports_delete_record): New.
9015         (init_record_full_ops): Delete.
9016         (init_record_full_core_ops): Delete.
9017         (record_full_save): Refactor as method of the
9018         record_full_base_target class.
9019         (_initialize_record_full): Remove references to
9020         init_record_full_ops and init_record_full_core_ops.
9021
9022         * remote.c (remote_target, extended_remote_target): New classes.
9023         (remote_ops): Now a remote_target.
9024         (extended_remote_ops): Now an extended_remote_target.
9025         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9026         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9027         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9028         (remote_pass_signals, remote_set_syscall_catchpoint)
9029         (remote_program_signals, )
9030         (remote_thread_always_alive): Remove target_ops parameter.
9031         (remote_thread_alive, remote_thread_name)
9032         (remote_update_thread_list, remote_threads_extra_info)
9033         (remote_static_tracepoint_marker_at)
9034         (remote_static_tracepoint_markers_by_strid)
9035         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9036         (remote_open): Refactor as methods of remote_target.
9037         (extended_remote_open, extended_remote_detach)
9038         (extended_remote_attach, extended_remote_post_attach):
9039         (extended_remote_supports_disable_randomization)
9040         (extended_remote_create_inferior): : Refactor as method of
9041         extended_remote_target.
9042         (remote_set_permissions, remote_open_1, remote_detach)
9043         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9044         (remote_resume, remote_commit_resume, remote_stop)
9045         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9046         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9047         (remote_prepare_to_store, remote_store_registers)
9048         (remote_flash_erase, remote_flash_done, remote_files_info)
9049         (remote_kill, remote_mourn, remote_insert_breakpoint)
9050         (remote_remove_breakpoint, remote_insert_watchpoint)
9051         (remote_watchpoint_addr_within_range)
9052         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9053         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9054         (remote_supports_stopped_by_sw_breakpoint)
9055         (remote_stopped_by_hw_breakpoint)
9056         (remote_supports_stopped_by_hw_breakpoint)
9057         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9058         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9059         (remote_verify_memory): Refactor as methods of remote_target.
9060         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9061         parameter.
9062         (remote_xfer_partial, remote_get_memory_xfer_limit)
9063         (remote_search_memory, remote_rcmd, remote_memory_map)
9064         (remote_pid_to_str, remote_get_thread_local_address)
9065         (remote_get_tib_address, remote_read_description): Refactor as
9066         methods of remote_target.
9067         (remote_target::fileio_open, remote_target::fileio_pwrite)
9068         (remote_target::fileio_pread, remote_target::fileio_close): New.
9069         (remote_hostio_readlink, remote_hostio_fstat)
9070         (remote_filesystem_is_local, remote_can_execute_reverse)
9071         (remote_supports_non_stop, remote_supports_disable_randomization)
9072         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9073         (remote_supports_enable_disable_tracepoint)
9074         (remote_supports_string_tracing)
9075         (remote_can_run_breakpoint_commands, remote_trace_init)
9076         (remote_download_tracepoint, remote_can_download_tracepoint)
9077         (remote_download_trace_state_variable, remote_enable_tracepoint)
9078         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9079         (remote_trace_start, remote_get_trace_status)
9080         (remote_get_tracepoint_status, remote_trace_stop)
9081         (remote_trace_find, remote_get_trace_state_variable_value)
9082         (remote_save_trace_data, remote_get_raw_trace_data)
9083         (remote_set_disconnected_tracing, remote_core_of_thread)
9084         (remote_set_circular_trace_buffer, remote_traceframe_info)
9085         (remote_get_min_fast_tracepoint_insn_len)
9086         (remote_set_trace_buffer_size, remote_set_trace_notes)
9087         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9088         (remote_disable_btrace, remote_teardown_btrace)
9089         (remote_read_btrace, remote_btrace_conf)
9090         (remote_augmented_libraries_svr4_read, remote_load)
9091         (remote_pid_to_exec_file, remote_can_do_single_step)
9092         (remote_execution_direction, remote_thread_handle_to_thread_info):
9093         Refactor as methods of remote_target.
9094         (init_remote_ops, init_extended_remote_ops): Delete.
9095         (remote_can_async_p, remote_is_async_p, remote_async)
9096         (remote_thread_events, remote_upload_tracepoints)
9097         (remote_upload_trace_state_variables): Refactor as methods of
9098         remote_target.
9099         (_initialize_remote): Remove references to init_remote_ops and
9100         init_extended_remote_ops.
9101
9102         * remote-sim.c (gdbsim_target): New class.
9103         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9104         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9105         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9106         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9107         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9108         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9109         Refactor as methods of gdbsim_target.
9110         (gdbsim_ops): Now a gdbsim_target.
9111         (init_gdbsim_ops): Delete.
9112         (gdbsim_cntrl_c): Adjust.
9113         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9114
9115         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9116         (the_amd64_linux_nat_target): New.
9117         (amd64_linux_fetch_inferior_registers)
9118         (amd64_linux_store_inferior_registers): Refactor as methods of
9119         amd64_linux_nat_target.
9120         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9121         * i386-linux-nat.c: Don't include "linux-nat.h".
9122         (i386_linux_nat_target): New class.
9123         (the_i386_linux_nat_target): New.
9124         (i386_linux_fetch_inferior_registers)
9125         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9126         as methods of i386_linux_nat_target.
9127         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9128         * inf-child.c (inf_child_ops): Delete.
9129         (inf_child_fetch_inferior_registers)
9130         (inf_child_store_inferior_registers): Delete.
9131         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9132         methods of inf_child_target.
9133         (inf_child_target::supports_terminal_ours)
9134         (inf_child_target::terminal_init)
9135         (inf_child_target::terminal_inferior)
9136         (inf_child_target::terminal_ours_for_output)
9137         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9138         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9139         New.
9140         (inf_child_open, inf_child_disconnect, inf_child_close)
9141         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9142         (inf_child_post_startup_inferior, inf_child_can_run)
9143         (inf_child_pid_to_exec_file): Refactor as methods of
9144         inf_child_target.
9145         (inf_child_follow_fork): Delete.
9146         (inf_child_target::can_create_inferior)
9147         (inf_child_target::can_attach): New.
9148         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9149         (inf_child_target::has_stack, inf_child_target::has_registers)
9150         (inf_child_target::has_execution): New.
9151         (inf_child_fileio_open, inf_child_fileio_pwrite)
9152         (inf_child_fileio_pread, inf_child_fileio_fstat)
9153         (inf_child_fileio_close, inf_child_fileio_unlink)
9154         (inf_child_fileio_readlink, inf_child_use_agent)
9155         (inf_child_can_use_agent): Refactor as methods of
9156         inf_child_target.
9157         (return_zero, inf_child_target): Delete.
9158         (inf_child_target::inf_child_target): New.
9159         * inf-child.h: Include "target.h".
9160         (inf_child_target): Delete function prototype.
9161         (inf_child_target): New class.
9162         (inf_child_open_target, inf_child_mourn_inferior)
9163         (inf_child_maybe_unpush_target): Delete.
9164         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9165         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9166         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9167         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9168         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9169         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9170         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9171         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9172         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9173         methods of inf_ptrace_target.
9174         (inf_ptrace_target): Delete function.
9175         * inf-ptrace.h: Include "inf-child.h".
9176         (inf_ptrace_target): Delete function declaration.
9177         (inf_ptrace_target): New class.
9178         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9179         * linux-nat.c (linux_target): New.
9180         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9181         (linux_nat_target::~linux_nat_target): New.
9182         (linux_child_post_attach, linux_child_post_startup_inferior)
9183         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9184         (linux_child_remove_fork_catchpoint)
9185         (linux_child_insert_vfork_catchpoint)
9186         (linux_child_remove_vfork_catchpoint)
9187         (linux_child_insert_exec_catchpoint)
9188         (linux_child_remove_exec_catchpoint)
9189         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9190         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9191         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9192         (linux_nat_stopped_data_address)
9193         (linux_nat_stopped_by_sw_breakpoint)
9194         (linux_nat_supports_stopped_by_sw_breakpoint)
9195         (linux_nat_stopped_by_hw_breakpoint)
9196         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9197         (linux_nat_kill, linux_nat_mourn_inferior)
9198         (linux_nat_xfer_partial, linux_nat_thread_alive)
9199         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9200         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9201         (linux_child_static_tracepoint_markers_by_strid)
9202         (linux_nat_is_async_p, linux_nat_can_async_p)
9203         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9204         (linux_nat_supports_multi_process)
9205         (linux_nat_supports_disable_randomization, linux_nat_async)
9206         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9207         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9208         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9209         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9210         methods of linux_nat_target.
9211         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9212         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9213         parameter.
9214         (check_stopped_by_watchpoint): Adjust.
9215         (linux_xfer_partial): Delete.
9216         (linux_target_install_ops, linux_target, linux_nat_add_target):
9217         Delete.
9218         (linux_nat_target::linux_nat_target): New.
9219         * linux-nat.h: Include "inf-ptrace.h".
9220         (linux_nat_target): New.
9221         (linux_target, linux_target_install_ops, linux_nat_add_target):
9222         Delete function declarations.
9223         (linux_target): Declare global.
9224         * linux-thread-db.c (thread_db_target): New.
9225         (thread_db_target::thread_db_target): New.
9226         (thread_db_ops): Delete.
9227         (the_thread_db_target): New.
9228         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9229         (thread_db_update_thread_list, thread_db_pid_to_str)
9230         (thread_db_extra_thread_info)
9231         (thread_db_thread_handle_to_thread_info)
9232         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9233         (thread_db_resume): Refactor as methods of thread_db_target.
9234         (init_thread_db_ops): Delete.
9235         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9236         * x86-linux-nat.c: Don't include "linux-nat.h".
9237         (super_post_startup_inferior): Delete.
9238         (x86_linux_nat_target::~x86_linux_nat_target): New.
9239         (x86_linux_child_post_startup_inferior)
9240         (x86_linux_read_description, x86_linux_enable_btrace)
9241         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9242         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9243         methods of x86_linux_nat_target.
9244         (x86_linux_create_target): Delete.  Bits folded ...
9245         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9246         pointer.
9247         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9248         (x86_linux_nat_target): New class.
9249         (x86_linux_create_target): Delete.
9250         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9251         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9252         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9253         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9254         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9255         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9256         make extern.
9257         (x86_use_watchpoints): Delete.
9258         * x86-nat.h: Include "breakpoint.h" and "target.h".
9259         (x86_use_watchpoints): Delete.
9260         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9261         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9262         (x86_insert_watchpoint, x86_remove_watchpoint)
9263         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9264         (x86_stopped_by_hw_breakpoint): New declarations.
9265         (x86_nat_target): New template class.
9266
9267         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9268         (the_ppc_linux_nat_target): New.
9269         (ppc_linux_fetch_inferior_registers)
9270         (ppc_linux_can_use_hw_breakpoint)
9271         (ppc_linux_region_ok_for_hw_watchpoint)
9272         (ppc_linux_ranged_break_num_registers)
9273         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9274         (ppc_linux_insert_mask_watchpoint)
9275         (ppc_linux_remove_mask_watchpoint)
9276         (ppc_linux_can_accel_watchpoint_condition)
9277         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9278         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9279         (ppc_linux_watchpoint_addr_within_range)
9280         (ppc_linux_masked_watch_num_registers)
9281         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9282         (ppc_linux_read_description): Refactor as methods of
9283         ppc_linux_nat_target.
9284         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9285
9286         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9287         (procfs_target): New class.
9288         (the_procfs_target): New.
9289         (procfs_target): Delete function.
9290         (procfs_auxv_parse, procfs_attach, procfs_detach)
9291         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9292         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9293         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9294         (procfs_create_inferior, procfs_update_thread_list)
9295         (procfs_thread_alive, procfs_pid_to_str)
9296         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9297         (procfs_stopped_data_address, procfs_insert_watchpoint)
9298         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9299         (proc_find_memory_regions, procfs_info_proc)
9300         (procfs_make_note_section): Refactor as methods of procfs_target.
9301         (_initialize_procfs): Adjust.
9302         * sol-thread.c (sol_thread_target): New class.
9303         (sol_thread_ops): Now a sol_thread_target.
9304         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9305         (sol_thread_fetch_registers, sol_thread_store_registers)
9306         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9307         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9308         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9309         (init_sol_thread_ops): Delete.
9310         (_initialize_sol_thread): Adjust.  Remove references to
9311         init_sol_thread_ops and complete_target_initialization.
9312
9313         * windows-nat.c (windows_nat_target): New class.
9314         (windows_fetch_inferior_registers)
9315         (windows_store_inferior_registers, windows_resume, windows_wait)
9316         (windows_attach, windows_detach, windows_pid_to_exec_file)
9317         (windows_files_info, windows_create_inferior)
9318         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9319         (windows_close, windows_pid_to_str, windows_xfer_partial)
9320         (windows_get_tib_address, windows_get_ada_task_ptid)
9321         (windows_thread_name, windows_thread_alive): Refactor as
9322         windows_nat_target methods.
9323         (do_initial_windows_stuff): Adjust.
9324         (windows_target): Delete function.
9325         (_initialize_windows_nat): Adjust.
9326
9327         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9328         (darwin_mourn_inferior, darwin_kill_inferior)
9329         (darwin_create_inferior, darwin_attach, darwin_detach)
9330         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9331         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9332         (darwin_supports_multi_process): Refactor as darwin_nat_target
9333         methods.
9334         (darwin_resume_to, darwin_files_info): Delete.
9335         (_initialize_darwin_inferior): Rename to ...
9336         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9337         * darwin-nat.h: Include "inf-child.h".
9338         (darwin_nat_target): New class.
9339         (darwin_complete_target): Delete.
9340         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9341         (darwin_target): New.
9342         (i386_darwin_fetch_inferior_registers)
9343         (i386_darwin_store_inferior_registers): Refactor as methods of
9344         darwin_nat_target.
9345         (darwin_complete_target): Delete, with ...
9346         (_initialize_i386_darwin_nat): ... bits factored out here.
9347
9348         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9349         (the_alpha_linux_nat_target): New.
9350         (alpha_linux_register_u_offset): Refactor as
9351         alpha_linux_nat_target method.
9352         (_initialize_alpha_linux_nat): Adjust.
9353         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9354         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9355         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9356         methods of linux_nat_trad_target.
9357         (linux_trad_target): Delete.
9358         * linux-nat-trad.h (linux_trad_target): Delete function.
9359         (linux_nat_trad_target): New class.
9360         * mips-linux-nat.c (mips_linux_nat_target): New class.
9361         (super_fetch_registers, super_store_registers, super_close):
9362         Delete.
9363         (the_mips_linux_nat_target): New.
9364         (mips64_linux_regsets_fetch_registers)
9365         (mips64_linux_regsets_store_registers)
9366         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9367         (mips_linux_register_u_offset, mips_linux_read_description)
9368         (mips_linux_can_use_hw_breakpoint)
9369         (mips_linux_stopped_by_watchpoint)
9370         (mips_linux_stopped_data_address)
9371         (mips_linux_region_ok_for_hw_watchpoint)
9372         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9373         (mips_linux_close): Refactor as methods of mips_linux_nat.
9374         (_initialize_mips_linux_nat): Adjust to C++ification.
9375
9376         * aix-thread.c (aix_thread_target): New class.
9377         (aix_thread_ops): Now an aix_thread_target.
9378         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9379         (aix_thread_fetch_registers, aix_thread_store_registers)
9380         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9381         (aix_thread_thread_alive, aix_thread_pid_to_str)
9382         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9383         Refactor as methods of aix_thread_target.
9384         (init_aix_thread_ops): Delete.
9385         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9386         and complete_target_initialization.
9387         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9388         (rs6000_nat_target): New class.
9389         (the_rs6000_nat_target): New.
9390         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9391         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9392         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9393         (super_create_inferior): Delete.
9394         (_initialize_rs6000_nat): Adjust to C++ification.
9395
9396         * arm-linux-nat.c (arm_linux_nat_target): New class.
9397         (the_arm_linux_nat_target): New.
9398         (arm_linux_fetch_inferior_registers)
9399         (arm_linux_store_inferior_registers, arm_linux_read_description)
9400         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9401         (arm_linux_remove_hw_breakpoint)
9402         (arm_linux_region_ok_for_hw_watchpoint)
9403         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9404         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9405         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9406         arm_linux_nat_target.
9407         (_initialize_arm_linux_nat): Adjust to C++ification.
9408
9409         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9410         (the_aarch64_linux_nat_target): New.
9411         (aarch64_linux_fetch_inferior_registers)
9412         (aarch64_linux_store_inferior_registers)
9413         (aarch64_linux_child_post_startup_inferior)
9414         (aarch64_linux_read_description)
9415         (aarch64_linux_can_use_hw_breakpoint)
9416         (aarch64_linux_insert_hw_breakpoint)
9417         (aarch64_linux_remove_hw_breakpoint)
9418         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9419         (aarch64_linux_region_ok_for_hw_watchpoint)
9420         (aarch64_linux_stopped_data_address)
9421         (aarch64_linux_stopped_by_watchpoint)
9422         (aarch64_linux_watchpoint_addr_within_range)
9423         (aarch64_linux_can_do_single_step): Refactor as methods of
9424         aarch64_linux_nat_target.
9425         (super_post_startup_inferior): Delete.
9426         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9427
9428         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9429         (the_hppa_linux_nat_target): New.
9430         (hppa_linux_fetch_inferior_registers)
9431         (hppa_linux_store_inferior_registers): Refactor as methods of
9432         hppa_linux_nat_target.
9433         (_initialize_hppa_linux_nat): Adjust to C++ification.
9434
9435         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9436         (the_ia64_linux_nat_target): New.
9437         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9438         (ia64_linux_stopped_data_address)
9439         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9440         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9441         ia64_linux_nat_target methods.
9442         (super_xfer_partial): Delete.
9443         (_initialize_ia64_linux_nat): Adjust to C++ification.
9444
9445         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9446         (the_m32r_linux_nat_target): New.
9447         (m32r_linux_fetch_inferior_registers)
9448         (m32r_linux_store_inferior_registers): Refactor as
9449         m32r_linux_nat_target methods.
9450         (_initialize_m32r_linux_nat): Adjust to C++ification.
9451
9452         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9453         (the_m68k_linux_nat_target): New.
9454         (m68k_linux_fetch_inferior_registers)
9455         (m68k_linux_store_inferior_registers): Refactor as
9456         m68k_linux_nat_target methods.
9457         (_initialize_m68k_linux_nat): Adjust to C++ification.
9458
9459         * s390-linux-nat.c (s390_linux_nat_target): New class.
9460         (the_s390_linux_nat_target): New.
9461         (s390_linux_fetch_inferior_registers)
9462         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9463         (s390_insert_watchpoint, s390_remove_watchpoint)
9464         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9465         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9466         (s390_auxv_parse, s390_read_description): Refactor as methods of
9467         s390_linux_nat_target.
9468         (_initialize_s390_nat): Adjust to C++ification.
9469
9470         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9471         (the_sparc_linux_nat_target): New.
9472         (_initialize_sparc_linux_nat): Adjust to C++ification.
9473         * sparc-nat.c (sparc_fetch_inferior_registers)
9474         (sparc_store_inferior_registers): Remove target_ops parameter.
9475         * sparc-nat.h (sparc_fetch_inferior_registers)
9476         (sparc_store_inferior_registers): Remove target_ops parameter.
9477         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9478         (the_sparc64_linux_nat_target): New.
9479         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9480
9481         * spu-linux-nat.c (spu_linux_nat_target): New class.
9482         (the_spu_linux_nat_target): New.
9483         (spu_child_post_startup_inferior, spu_child_post_attach)
9484         (spu_child_wait, spu_fetch_inferior_registers)
9485         (spu_store_inferior_registers, spu_xfer_partial)
9486         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9487         methods.
9488         (_initialize_spu_nat): Adjust to C++ification.
9489
9490         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9491         (the_tilegx_linux_nat_target): New.
9492         (fetch_inferior_registers, store_inferior_registers):
9493         Refactor as methods.
9494         (_initialize_tile_linux_nat): Adjust to C++ification.
9495
9496         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9497         (the_xtensa_linux_nat_target): New.
9498         (xtensa_linux_fetch_inferior_registers)
9499         (xtensa_linux_store_inferior_registers): Refactor as
9500         xtensa_linux_nat_target methods.
9501         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9502
9503         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9504         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9505         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9506         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9507         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9508         (fbsd_stopped_by_sw_breakpoint)
9509         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9510         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9511         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9512         (fbsd_post_startup_inferior, fbsd_post_attach)
9513         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9514         (fbsd_set_syscall_catchpoint)
9515         (super_xfer_partial, super_resume, super_wait)
9516         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9517         (fbsd_handle_debug_trap): Remove target_ops parameter.
9518         (fbsd_nat_add_target): Delete.
9519         * fbsd-nat.h: Include "inf-ptrace.h".
9520         (fbsd_nat_add_target): Delete.
9521         (USE_SIGTRAP_SIGINFO): Define.
9522         (fbsd_nat_target): New class.
9523
9524         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9525         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9526         (amd64bsd_target): Delete.
9527         * amd64-bsd-nat.h: New file.
9528         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9529         "x86-bsd-nat.h".
9530         (amd64_fbsd_nat_target): New class.
9531         (the_amd64_fbsd_nat_target): New.
9532         (amd64fbsd_read_description): Refactor as method of
9533         amd64_fbsd_nat_target.
9534         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9535         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9536         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9537         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9538         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9539         (i386bsd_target): Delete.
9540         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9541         (i386bsd_fetch_inferior_registers)
9542         (i386bsd_store_inferior_registers): Declare.
9543         (i386_bsd_nat_target): New class.
9544         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9545         (the_i386_fbsd_nat_target): New.
9546         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9547         i386_fbsd_nat_target methods.
9548         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9549         (_initialize_i386fbsd_nat): Adjust to C++ification.
9550         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9551         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9552         (_initialize_x86_bsd_nat): Adjust to C++ification.
9553         * x86-bsd-nat.h: Include "x86-nat.h".
9554         (x86bsd_target): Delete declaration.
9555         (x86bsd_nat_target): New class.
9556
9557         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9558         (the_aarch64_fbsd_nat_target): New.
9559         (aarch64_fbsd_fetch_inferior_registers)
9560         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9561         aarch64_fbsd_nat_target.
9562         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9563         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9564         (the_alpha_bsd_nat_target): New.
9565         (alphabsd_fetch_inferior_registers)
9566         (alphabsd_store_inferior_registers): Refactor as
9567         alpha_bsd_nat_target methods.
9568         (_initialize_alphabsd_nat): Refactor as methods of
9569         alpha_bsd_nat_target.
9570         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9571         (the_amd64_nbsd_nat_target): New.
9572         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9573         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9574         (the_amd64_obsd_nat_target): New.
9575         (_initialize_amd64obsd_nat): Adjust to C++ification.
9576         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9577         (the_arm_fbsd_nat_target): New.
9578         (arm_fbsd_fetch_inferior_registers)
9579         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9580         (_initialize_arm_fbsd_nat): Refactor as methods of
9581         arm_fbsd_nat_target.
9582         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9583         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9584         (the_arm_netbsd_nat_target): New.
9585         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9586         arm_netbsd_nat_target.
9587         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9588         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9589         (the_hppa_nbsd_nat_target): New.
9590         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9591         hppa_nbsd_nat_target methods.
9592         (_initialize_hppanbsd_nat): Adjust to C++ification.
9593         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9594         (the_hppa_obsd_nat_target): New.
9595         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9596         methods of hppa_obsd_nat_target.
9597         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9598         add_target.
9599         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9600         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9601         add_target.
9602         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9603         (_initialize_i386obsd_nat): Use add_target.
9604         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9605         (the_m68k_bsd_nat_target): New.
9606         (m68kbsd_fetch_inferior_registers)
9607         (m68kbsd_store_inferior_registers): Refactor as methods of
9608         m68k_bsd_nat_target.
9609         (_initialize_m68kbsd_nat): Adjust to C++ification.
9610         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9611         (the_mips_fbsd_nat_target): New.
9612         (mips_fbsd_fetch_inferior_registers)
9613         (mips_fbsd_store_inferior_registers): Refactor as methods of
9614         mips_fbsd_nat_target.
9615         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9616         add_target.
9617         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9618         (the_mips_nbsd_nat_target): New.
9619         (mipsnbsd_fetch_inferior_registers)
9620         (mipsnbsd_store_inferior_registers): Refactor as methods of
9621         mips_nbsd_nat_target.
9622         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9623         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9624         (the_mips64_obsd_nat_target): New.
9625         (mips64obsd_fetch_inferior_registers)
9626         (mips64obsd_store_inferior_registers): Refactor as methods of
9627         mips64_obsd_nat_target.
9628         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9629         add_target.
9630         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9631         nbsd_nat_target.
9632         * nbsd-nat.h: Include "inf-ptrace.h".
9633         (nbsd_nat_target): New class.
9634         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9635         (obsd_wait): Refactor as methods of obsd_nat_target.
9636         (obsd_add_target): Delete.
9637         * obsd-nat.h: Include "inf-ptrace.h".
9638         (obsd_nat_target): New class.
9639         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9640         (the_ppc_fbsd_nat_target): New.
9641         (ppcfbsd_fetch_inferior_registers)
9642         (ppcfbsd_store_inferior_registers): Refactor as methods of
9643         ppc_fbsd_nat_target.
9644         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9645         add_target.
9646         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9647         (the_ppc_nbsd_nat_target): New.
9648         (ppcnbsd_fetch_inferior_registers)
9649         (ppcnbsd_store_inferior_registers): Refactor as methods of
9650         ppc_nbsd_nat_target.
9651         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9652         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9653         (the_ppc_obsd_nat_target): New.
9654         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9655         methods of ppc_obsd_nat_target.
9656         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9657         add_target.
9658         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9659         (the_sh_nbsd_nat_target): New.
9660         (shnbsd_fetch_inferior_registers)
9661         (shnbsd_store_inferior_registers): Refactor as methods of
9662         sh_nbsd_nat_target.
9663         (_initialize_shnbsd_nat): Adjust to C++ification.
9664         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9665         (inf_ptrace_xfer_partial): Delete.
9666         (sparc_xfer_partial, sparc_target): Delete.
9667         * sparc-nat.h (sparc_fetch_inferior_registers)
9668         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9669         (sparc_target): Delete function declaration.
9670         (sparc_target): New template class.
9671         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9672         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9673         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9674         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9675         add_target.
9676         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9677         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9678         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9679         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9680         add_target.
9681         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9682         (the_vax_bsd_nat_target): New.
9683         (vaxbsd_fetch_inferior_registers)
9684         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9685         methods.
9686         (_initialize_vaxbsd_nat): Adjust to C++ification.
9687
9688         * bsd-kvm.c (bsd_kvm_target): New class.
9689         (bsd_kvm_ops): Now a bsd_kvm_target.
9690         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9691         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9692         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9693         bsd_kvm_target.
9694         (bsd_kvm_return_one): Delete.
9695         (bsd_kvm_add_target): Adjust to C++ification.
9696
9697         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9698         (nto_procfs_target_procfs): New classes.
9699         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9700         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9701         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9702         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9703         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9704         (procfs_remove_hw_breakpoint, procfs_resume)
9705         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9706         (procfs_kill_inferior, procfs_store_registers)
9707         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9708         as methods of nto_procfs_target.
9709         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9710         (nto_native_ops): Delete.
9711         (procfs_open, procfs_native_open): Delete.
9712         (nto_native_ops): Now an nto_procfs_target_native.
9713         (init_procfs_targets): Adjust to C++ification.
9714         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9715         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9716         Refactor as methods of nto_procfs_target.
9717
9718         * go32-nat.c (go32_nat_target): New class.
9719         (the_go32_nat_target): New.
9720         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9721         (go32_store_registers, go32_xfer_partial, go32_files_info)
9722         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9723         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9724         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9725         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9726         (go32_target): Delete.
9727         (_initialize_go32_nat): Adjust to C++ification.
9728
9729         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9730         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9731         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9732         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9733         gnu_nat_target.
9734         (gnu_target): Delete.
9735         * gnu-nat.h (gnu_target): Delete.
9736         (gnu_nat_target): New class.
9737         * i386-gnu-nat.c (gnu_base_target): New.
9738         (i386_gnu_nat_target): New class.
9739         (the_i386_gnu_nat_target): New.
9740         (_initialize_i386gnu_nat): Adjust to C++ification.
9741
9742 2018-05-02  Pedro Alves  <palves@redhat.com>
9743
9744         * bfd-target.c (target_bfd_xclose): Rename to ...
9745         (target_bfd_close): ... this.
9746         (target_bfd_reopen): Adjust.
9747         * target.c (target_close): Remove references to to_xclose.
9748         * target.h (target_ops::to_xclose): Delete.
9749         (target_ops::to_close): Update comments.
9750
9751 2018-05-02  Pedro Alves  <palves@redhat.com>
9752
9753         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9754         "linux-nat.h".
9755         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9756         * inf-ptrace.c (inf_ptrace_register_u_offset)
9757         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9758         (inf_ptrace_store_register, inf_ptrace_store_registers)
9759         (inf_ptrace_trad_target): Move to ...
9760         * linux-nat-trad.c: ... this new file.
9761         * linux-nat-trad.h: New file.
9762         * linux-nat.c (linux_target_install_ops): Make extern.
9763         (linux_trad_target): Delete.
9764         * linux-nat.h (linux_trad_target): Delete declaration.
9765         (linux_target_install_ops): Declare.
9766         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9767         "linux-nat.h".
9768
9769 2018-05-02  Pedro Alves  <palves@redhat.com>
9770
9771         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9772         procfs_target/add_target here.
9773         * procfs.c (procfs_target): Make static.
9774         (_initialize_procfs): Call add_target here.
9775         * procfs.h (struct target_ops): Remove forward declaration.
9776         (procfs_target): Remove declaration.
9777         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9778
9779 2018-05-02  Pedro Alves  <palves@redhat.com>
9780
9781         * procfs.c (procfs_stopped_by_watchpoint)
9782         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9783         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9784         Forward declare.
9785         (procfs_use_watchpoints): Delete, move contents...
9786         (procfs_target): ... here.
9787         * procfs.h (procfs_use_watchpoints): Delete declaration.
9788         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9789         procfs_use_watchpoints.
9790         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9791         procfs_use_watchpoints.
9792
9793 2018-05-02  Tom Tromey  <tom@tromey.com>
9794
9795         PR python/20084:
9796         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9797         and var_zuinteger_unlimited.
9798         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9799         and PARAM_ZUINTEGER_UNLIMITED.
9800         (set_parameter_value): Handle var_zuinteger and
9801         var_zuinteger_unlimited.
9802         (add_setshow_generic): Likewise.
9803         (parmpy_init): Likewise.
9804
9805 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9806
9807         PR rust/23124
9808         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9809         pointer is not null before dereferencing it.
9810
9811 2018-04-30  Tom Tromey  <tom@tromey.com>
9812
9813         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9814         is_mi_like_p.
9815
9816 2018-04-30  Tom Tromey  <tom@tromey.com>
9817
9818         * breakpoint.c (mention): Remove use of is_mi_like_p.
9819         (print_mention_ranged_breakpoint): Likewise.
9820         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9821         of is_mi_like_p.
9822
9823 2018-04-30  Tom Tromey  <tom@tromey.com>
9824
9825         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9826
9827 2018-04-30  Tom Tromey  <tom@tromey.com>
9828
9829         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9830         (info_spu_event_command): Remove some uses of is_mi_like_p.
9831
9832 2018-04-30  Tom Tromey  <tom@tromey.com>
9833
9834         * python/py-framefilter.c (py_print_single_arg)
9835         (enumerate_locals, py_print_args, py_print_frame): Remove some
9836         uses of is_mi_like_p.
9837
9838 2018-04-30  Tom Tromey  <tom@tromey.com>
9839
9840         * ui-out.c: Update.
9841         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9842         * ui-out.h (ui_out::is_mi_like_p): Now const.
9843         (ui_out::do_is_mi_like_p): Now const.
9844         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9845
9846 2018-04-30  Tom Tromey  <tom@tromey.com>
9847
9848         * varobj.c (varobj_set_visualizer): Use new_reference.
9849         * python/python.c (gdbpy_decode_line): Use new_reference.
9850         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9851         new_reference.
9852
9853 2018-04-30  Tom Tromey  <tom@tromey.com>
9854
9855         * varobj.c (install_new_value): Use new_reference.
9856         * value.h (value_incref): Return void.  Swap intro comment with
9857         value_decref.
9858         * value.c (set_value_parent): Use new_reference.
9859         (value_incref): Return void.  Update intro comment.
9860         (release_value): Use new_reference.
9861         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9862
9863 2018-04-30  Tom Tromey  <tom@tromey.com>
9864
9865         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9866         * gdb_bfd.h (new_bfd_ref): Remove.
9867         (gdb_bfd_open): Update comment.
9868         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9869         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9870         (gdb_bfd_fdopenr): Use new_reference.
9871         * exec.c (exec_file_attach): Use new_reference.
9872
9873 2018-04-30  Tom Tromey  <tom@tromey.com>
9874
9875         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9876         method.
9877
9878 2018-04-30  Tom Tromey  <tom@tromey.com>
9879
9880         * jit.c (jit_read_code_entry): Use type_align.
9881         * i386-tdep.c (i386_gdbarch_init): Don't call
9882         set_gdbarch_long_long_align_bit.
9883         * gdbarch.sh: Remove long_long_align_bit.
9884         * gdbarch.c, gdbarch.h: Rebuild.
9885         * arc-tdep.c (arc_type_align): New function.
9886         (arc_gdbarch_init): Use arc_type_align.  Don't call
9887         set_gdbarch_long_long_align_bit.
9888
9889 2018-04-30  Tom Tromey  <tom@tromey.com>
9890
9891         * rust-lang.c (rust_type_alignment): Remove.
9892         (rust_composite_type): Use type_align.
9893
9894 2018-04-30  Tom Tromey  <tom@tromey.com>
9895
9896         * NEWS: Mention Type.align.
9897         * python/py-type.c (typy_get_alignof): New function.
9898         (type_object_getset): Add "alignof".
9899
9900 2018-04-30  Tom Tromey  <tom@tromey.com>
9901
9902         PR exp/17095:
9903         * NEWS: Update.
9904         * std-operator.def (UNOP_ALIGNOF): New operator.
9905         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9906         New.
9907         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9908         * c-lang.c (c_op_print_tab): Add alignof.
9909         * c-exp.y (ALIGNOF): New token.
9910         (exp): Add "ALIGNOF" production.
9911         (ident_tokens): Add _Alignof and alignof.
9912
9913 2018-04-30  Tom Tromey  <tom@tromey.com>
9914
9915         * i386-tdep.c (i386_type_align): New function.
9916         (i386_gdbarch_init): Update.
9917         * gdbarch.sh (type_align): New method.
9918         * gdbarch.c, gdbarch.h: Rebuild.
9919         * arch-utils.h (default_type_align): Declare.
9920         * arch-utils.c (default_type_align): New function.
9921         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9922         (struct type) <align_log2>: New field.
9923         <instance_flags>: Now a bitfield.
9924         (TYPE_RAW_ALIGN): New macro.
9925         (type_align, type_raw_align, set_type_align): Declare.
9926         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9927         functions.
9928         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9929         (get_alignment, maybe_set_alignment): New functions.
9930         (read_structure_type, read_enumeration_type, read_array_type)
9931         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9932         (read_subrange_type, read_base_type): Set type alignment.
9933
9934 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9935
9936         * dwarf2read.c (read_index_from_section): Use bool.
9937
9938 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9939
9940         PR gdb/22950
9941         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9942         with #ifdef.
9943
9944 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9945
9946         PR build/22873
9947         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9948         last step, and do it atomically.
9949
9950 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9951
9952         * compile/compile-c-types.c (convert_int, convert_float):
9953         Update for C FE v1.
9954
9955 2018-04-27  Tom Tromey  <tom@tromey.com>
9956
9957         PR rust/22545:
9958         * rust-lang.c (rust_inclusive_range_type_p): New function.
9959         (rust_range): Handle inclusive ranges.
9960         (rust_compute_range): Likewise.
9961         * rust-exp.y (struct rust_op) <inclusive>: New field.
9962         (DOTDOTEQ): New constant.
9963         (range_expr): Add "..=" productions.
9964         (operator_tokens): Add "..=" token.
9965         (ast_range): Add "inclusive" parameter.
9966         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9967         ranges.
9968         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9969         bounds values.
9970         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9971         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9972         Update comments.
9973         * expprint.c (print_subexp_standard): Handle new bounds values.
9974         (dump_subexp_body_standard): Likewise.
9975
9976 2018-04-27  Tom Tromey  <tom@tromey.com>
9977
9978         * configure: Rebuild.
9979         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9980         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9981         "OVERRIDE".
9982         (class symbol_needs_eval_context): Likewise.
9983         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9984         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9985         "virtual".
9986         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9987         "override".
9988         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9989         * aarch64-tdep.c (instruction_reader::read): Use "override".
9990         (instruction_reader_test::read): Likewise.
9991         * arm-tdep.c (instruction_reader::read): Use "override".
9992         (instruction_reader_thumb::read): Likewise.
9993
9994 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9995
9996         PR remote/9665
9997         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9998         instead of remote_send.
9999         (remote_send): Remove.
10000
10001 2018-04-26  Pedro Alves  <palves@redhat.com>
10002
10003         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10004         find_function_start_sal instead of find_pc_line.
10005
10006 2018-04-26  Pedro Alves  <palves@redhat.com>
10007
10008         * breakpoint.c (set_breakpoint_location_function): Handle
10009         mst_data_gnu_ifunc.
10010         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10011         * elfread.c (elf_symtab_read): Give data symbols with
10012         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10013         (elf_rel_plt_read): Update comment.
10014         * linespec.c (convert_linespec_to_sals): Handle
10015         mst_data_gnu_ifunc.
10016         (minsym_found): Handle mst_data_gnu_ifunc.
10017         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10018         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10019         * parse.c (find_minsym_type_and_address): Handle
10020         mst_data_gnu_ifunc.
10021         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10022         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10023         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10024         comment.
10025         <mst_data_gnu_ifunc>: New enumerator.
10026
10027 2018-04-26  Pedro Alves  <palves@redhat.com>
10028
10029         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10030         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10031         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10032         Handle it.
10033         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10034         (lookup_minimal_symbol_by_pc): Adjust.
10035         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10036         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10037         * minsyms.h (lookup_msym_prefer): New enum.
10038         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10039         parameter by a lookup_msym_prefer parameter.
10040
10041 2018-04-26  Pedro Alves  <palves@redhat.com>
10042
10043         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10044         ends in "@plt" instead of looking at the symbol's section.
10045
10046 2018-04-26  Pedro Alves  <palves@redhat.com>
10047
10048         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10049         all references.
10050         (find_pc_partial_function_gnu_ifunc): Rename to ...
10051         (find_pc_partial_function): ... this, and remove references to
10052         'is_gnu_ifunc_p'.
10053         (find_pc_partial_function): Delete old implementation.
10054         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10055
10056 2018-04-26  Pedro Alves  <palves@redhat.com>
10057
10058         * linespec.c (struct bound_minimal_symbol_search_key): New.
10059         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10060         skip first line if we found a GNU ifunc minimal symbol by name.
10061         (compare_msymbols): Change parameters to work with a destructured
10062         lhs minsym.
10063         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10064         functions.
10065
10066 2018-04-26  Pedro Alves  <palves@redhat.com>
10067
10068         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10069         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10070         address/name.
10071         (add_location_to_breakpoint): Store the minsym and the objfile in
10072         the breakpoint location.
10073         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10074         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10075         Record the minsym in the sal.
10076         * symtab.h (symtab_and_line) <msymbol>: New field.
10077
10078 2018-04-26  Pedro Alves  <palves@redhat.com>
10079
10080         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10081         unless we actually resolved the ifunc.
10082
10083 2018-04-26  Pedro Alves  <palves@redhat.com>
10084
10085         * c-exp.y (variable production): Prefer ifunc minsyms over
10086         regular function symbols.
10087         * symtab.c (find_gnu_ifunc): New function.
10088         * minsyms.h (lookup_msym_prefer): New enum.
10089         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10090         parameter by a lookup_msym_prefer parameter.
10091         * symtab.h (find_gnu_ifunc): New declaration.
10092
10093 2018-04-26  Pedro Alves  <palves@redhat.com>
10094
10095         * blockframe.c (find_gnu_ifunc_target_type): New function.
10096         (find_function_type): New.
10097         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10098         return a value with a memory address.
10099         (eval_call): For calls to GNU ifunc functions, try to find the
10100         type of the target function from the type that the resolver
10101         returns.
10102         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10103         symbols.
10104         * infcall.c (find_function_return_type): Delete.
10105         (find_function_addr): Add 'function_type' parameter.  For calls to
10106         GNU ifunc functions, try to find the type of the target function
10107         from the type that the resolver returns, and return it via
10108         FUNCTION_TYPE.
10109         (call_function_by_hand_dummy): Adjust to use the function type
10110         returned by find_function_addr.
10111         (find_function_addr): Add 'function_type' parameter and move
10112         description here.
10113         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10114         declarations.
10115
10116 2018-04-26  Pedro Alves  <palves@redhat.com>
10117
10118         * c-exp.y (variable production): Skip finding an alias for ifunc
10119         symbols.
10120
10121 2018-04-26  Pedro Alves  <palves@redhat.com>
10122
10123         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10124
10125 2018-04-25  Pedro Alves  <palves@redhat.com>
10126
10127         * infcmd.c (kill_command): Print the pid as string, not the whole
10128         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10129         message.
10130         * remote.c (remote_detach_1): Print the pid as string, not the
10131         whole thread's ptid.
10132
10133 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10134             Sergio Durigan Junior  <sergiodj@redhat.com>
10135             Pedro Alves  <palves@redhat.com>
10136
10137         * infcmd.c (kill_command): Print message when inferior has
10138         been killed.
10139         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10140         '1'.
10141         (add_inferior): Improve message printed when
10142         'print_inferior_events' is on.
10143         (exit_inferior): Remove message printed when
10144         'print_inferior_events' is on.
10145         (detach_inferior): Improve message printed when
10146         'print_inferior_events' is on.
10147         (initialize_inferiors): Use 'add_inferior_silent' to set
10148         'current_inferior_'.
10149         * inferior.h (print_inferior_events): Declare here as
10150         'extern'.
10151         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10152         '[Detaching...]' messages when 'print_inferior_events' is on.
10153         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10154         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10155         'Detaching after fork from child...', replace it by '... from
10156         parent...'.
10157         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10158         prefix/suffix when printing 'Detaching...' messages.  Print
10159         them when 'print_inferior_events' is on.
10160         * remote.c (remote_detach_1): Print message when detaching
10161         from inferior and '!is_fork_parent'.
10162
10163 2018-04-24  Tom Tromey  <tom@tromey.com>
10164
10165         * cli-out.h: Reindent.
10166
10167 2018-04-24  Tom Tromey  <tom@tromey.com>
10168
10169         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10170         (cli_ui_out::do_field_string): Use fputs_filtered.
10171         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10172
10173 2018-04-23  Tom Tromey  <tom@tromey.com>
10174
10175         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10176         gdb::unique_xmalloc_ptr.
10177
10178 2018-04-23  Tom Tromey  <tom@tromey.com>
10179
10180         * configure: Rebuild.
10181
10182 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10183
10184         PR gdb/23095
10185         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10186         prepare_for_testing.  Set normal_bp to r_debug_state if target
10187         is bsd.
10188
10189 2018-04-21  Pedro Alves  <palves@redhat.com>
10190             Rajendra SY  <rajendra.sy@gmail.com>
10191
10192         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10193         * remote.c (extended_remote_attach): In all-stop mode, mark the
10194         thread as executing.
10195
10196 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10197
10198         * thread.c (thread_apply_all_command): Fix comment.
10199         (thread_command): Fix comment.
10200
10201 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10202
10203         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10204         parameter.
10205         * features/aarch64-core.c (create_feature_aarch64_core):
10206         Regenerate.
10207         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10208         Likewise.
10209         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10210         Likewise.
10211         * features/i386/32bit-avx512.c
10212         (create_feature_i386_32bit_avx512): Likewise.
10213         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10214         Likewise.
10215         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10216         Likewise.
10217         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10218         Likewise.
10219         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10220         Likewise.
10221         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10222         Likewise.
10223         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10224         Likewise.
10225         * features/i386/64bit-avx512.c
10226         (create_feature_i386_64bit_avx512): Likewise.
10227         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10228         Likewise.
10229         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10230         Likewise.
10231         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10232         Likewise.
10233         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10234         Likewise.
10235         * features/i386/64bit-segments.c
10236         (create_feature_i386_64bit_segments): Likewise.
10237         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10238         Likewise.
10239         * features/i386/x32-core.c
10240         (create_feature_i386_x32_core): Likewise.
10241         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10242         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10243         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10244         * target-descriptions.c: In generated code, don't pass xml
10245         filename.
10246
10247 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10248
10249         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10250         (print_xml_feature::visit_post): Likewise.
10251         (print_xml_feature::visit): Likewise.
10252         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10253         (print_xml_feature): Add new class.
10254         * regformats/regdat.sh: Null xmltarget on feature targets.
10255         * target-descriptions.c (struct target_desc): Add xmltarget.
10256         (maintenance_check_tdesc_xml_convert): Add unittest function.
10257         (tdesc_get_features_xml): Add function to get xml.
10258         (maintenance_check_xml_descriptions): Test xml generation.
10259         * xml-tdesc.c (string_read_description_xml): Add function.
10260         * xml-tdesc.h (string_read_description_xml): Add declaration.
10261
10262 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10263
10264         * features/Makefile: Add feature marker to targets with new style
10265         target descriptions.
10266         * regformats/aarch64.dat: Regenerate.
10267         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10268         * regformats/i386/amd64-avx-linux.dat: Likewise.
10269         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10270         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10271         * regformats/i386/amd64-linux.dat: Likewise.
10272         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10273         * regformats/i386/amd64.dat: Likewise.
10274         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10275         * regformats/i386/i386-avx-linux.dat: Likewise.
10276         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10277         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10278         * regformats/i386/i386-linux.dat: Likewise.
10279         * regformats/i386/i386-mmx-linux.dat: Likewise.
10280         * regformats/i386/i386-mpx-linux.dat: Likewise.
10281         * regformats/i386/i386.dat: Likewise.
10282         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10283         * regformats/i386/x32-avx-linux.dat: Likewise.
10284         * regformats/i386/x32-linux.dat: Likewise.
10285         * regformats/tic6x-c62x-linux.dat: Likewise.
10286         * regformats/tic6x-c64x-linux.dat: Likewise.
10287         * regformats/tic6x-c64xp-linux.dat: Likewise.
10288         * regformats/regdat.sh: Parse feature marker.
10289
10290 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10291
10292         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10293         (tdesc_osabi_name): Likewise.
10294         * target-descriptions.c (tdesc_architecture_name): Add new
10295         function.
10296         (tdesc_osabi_name): Likewise.
10297
10298 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10299
10300         * common/tdesc.c (tdesc_predefined_type): Move to here.
10301         (tdesc_named_type): Likewise.
10302         (tdesc_create_vector): Likewise.
10303         (tdesc_create_struct): Likewise.
10304         (tdesc_set_struct_size): Likewise.
10305         (tdesc_create_union): Likewise.
10306         (tdesc_create_flags): Likewise.
10307         (tdesc_create_enum): Likewise.
10308         (tdesc_add_field): Likewise.
10309         (tdesc_add_typed_bitfield): Likewise.
10310         (tdesc_add_bitfield): Likewise.
10311         (tdesc_add_flag): Likewise.
10312         (tdesc_add_enum_value): Likewise.
10313         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10314         (struct tdesc_type_vector): Likewise.
10315         (struct tdesc_type_field): Likewise.
10316         (struct tdesc_type_with_fields): Likewise.
10317         (tdesc_create_enum): Add declaration.
10318         (tdesc_add_typed_bitfield): Likewise.
10319         (tdesc_add_enum_value): Likewise.
10320         * target-descriptions.c (tdesc_type_field): Move from here.
10321         (tdesc_type_builtin): Likewise.
10322         (tdesc_type_vector): Likewise.
10323         (tdesc_type_with_fields): Likewise.
10324         (tdesc_predefined_types): Likewise.
10325         (tdesc_named_type): Likewise.
10326         (tdesc_create_vector): Likewise.
10327         (tdesc_create_struct): Likewise.
10328         (tdesc_set_struct_size): Likewise.
10329         (tdesc_create_union): Likewise.
10330         (tdesc_create_flags): Likewise.
10331         (tdesc_create_enum): Likewise.
10332         (tdesc_add_field): Likewise.
10333         (tdesc_add_typed_bitfield): Likewise.
10334         (tdesc_add_bitfield): Likewise.
10335         (tdesc_add_flag): Likewise.
10336         (tdesc_add_enum_value): Likewise.
10337         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10338         (tdesc_add_typed_bitfield): Likewise.
10339         (tdesc_add_enum_value): Likewise.
10340
10341 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10342
10343         * common/tdesc.c (tdesc_feature::accept): Move to here.
10344         (tdesc_feature::operator==): Likewise.
10345         (tdesc_create_reg): Likewise.
10346         * common/tdesc.h (tdesc_type_kind): Likewise.
10347         (struct tdesc_type): Likewise.
10348         (struct tdesc_feature): Likewise.
10349         * regformats/regdat.sh: Create a feature.
10350         * target-descriptions.c (tdesc_type_kind): Move from here.
10351         (tdesc_type): Likewise.
10352         (tdesc_type_up): Likewise.
10353         (tdesc_feature): Likewise.
10354         (tdesc_create_reg): Likewise.
10355
10356 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10357
10358         * Makefile.in: Add arch/tdesc.c
10359         * common/tdesc.c: New file.
10360         * common/tdesc.h (tdesc_element_visitor): Move to here.
10361         (tdesc_element): Likewise.
10362         (tdesc_reg): Likewise.
10363         (tdesc_reg_up): Likewise.
10364         * regformats/regdef.h (reg): Add offset to constructors.
10365         * target-descriptions.c (tdesc_element_visitor): Move from here.
10366         (tdesc_element): Likewise.
10367         (tdesc_reg): Likewise.
10368         (tdesc_reg_up): Likewise.
10369
10370 2018-04-17  Tom Tromey  <tom@tromey.com>
10371
10372         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10373         discriminant field.
10374
10375 2018-04-17  Tom Tromey  <tom@tromey.com>
10376
10377         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10378
10379 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10380
10381         * symtab.c (print_symbol_info): Skip printing filename and line
10382         number when `last' is NULL.
10383         (symtab_symbol_info): Use empty string instead of NULL for first
10384         invocation of print_symbol_info.
10385         (rbreak_command): Pass NULL to `last' parameter of
10386         print_symbol_info.
10387
10388 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10389
10390         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10391         instead of nullptr.
10392
10393 2018-04-16  Pedro Alves  <palves@redhat.com>
10394
10395         * MAINTAINERS (sh): Remove.
10396         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10397         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10398         (ALLDEPFILES): Remove sh64-tdep.c.
10399         * NEWS: Mentions that support for SH-5/SH64 is removed.
10400         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10401         (sh*-*-openbsd*): Ditto.
10402         (sh64-*-elf*): Remove.
10403         (sh*): Remove.
10404         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10405         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10406         * sh-tdep.c: No longer include "sh64-tdep.h".
10407         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10408         * sh64-tdep.c, sh64-tdep.h: Remove files.
10409
10410 2018-04-16  Pedro Alves  <palves@redhat.com>
10411
10412         * MAINTAINERS: Remove m88k.
10413         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10414         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10415         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10416         * NEWS: Mention that support for m88k was removed.
10417         * configure.host (m88*-*-*): Remove support.
10418         * configure.nat (m88k-*-*): Remove support.
10419         * configure.tgt (m88*-*-openbsd*): Remove.
10420         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10421
10422 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10423
10424         * configure.tgt (x86_tobjs): New variable.
10425         (amd64_tobjs, i386_tobjs): Use it.
10426
10427 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10428
10429         * symtab.c (print_symbol_info): Precede the symbol definition by
10430         the line number when available.
10431         * NEWS: Advertise this enhancement.
10432
10433 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10434
10435         * NEWS (New options): announce set/show record btrace cpu.
10436         * btrace.c: Include record-btrace.h.
10437         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10438         the vendor is unknown.
10439         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10440         Maybe overwrite the btrace configuration's cpu.
10441         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10442         (btrace_fetch): Add cpu parameter.  Update callers.
10443         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10444         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10445         errata workarounds if the vendor is unknown.
10446         * python/py-record-btrace.c: Include record-btrace.h.
10447         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10448         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10449         * record-btrace.c (record_btrace_cpu_state_kind): New.
10450         (record_btrace_cpu): New.
10451         (set_record_btrace_cpu_cmdlist): New.
10452         (record_btrace_get_cpu): New.
10453         (require_btrace_thread, record_btrace_info)
10454         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10455         (cmd_set_record_btrace_cpu_none): New.
10456         (cmd_set_record_btrace_cpu_auto): New.
10457         (cmd_set_record_btrace_cpu): New.
10458         (cmd_show_record_btrace_cpu): New.
10459         (_initialize_record_btrace): Initialize set/show record btrace cpu
10460         commands.
10461         * record-btrace.h (record_btrace_get_cpu): New.
10462
10463 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10464
10465         * record.c (set_record_command): Fix typo in message.
10466
10467 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10468
10469         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10470
10471 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10472
10473         * infrun.c (process_event_stop_test): Call
10474         gdbarch_in_indirect_branch_thunk.
10475         * gdbarch.sh (in_indirect_branch_thunk): New.
10476         * gdbarch.c: Regenerated.
10477         * gdbarch.h: Regenerated.
10478         * x86-tdep.h: New.
10479         * x86-tdep.c: New.
10480         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10481         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10482         (ALLDEPFILES): Add x86-tdep.c.
10483         * arch-utils.h (default_in_indirect_branch_thunk): New.
10484         * arch-utils.c (default_in_indirect_branch_thunk): New.
10485         * i386-tdep: Include x86-tdep.h.
10486         (i386_in_indirect_branch_thunk): New.
10487         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10488         function.
10489         * amd64-tdep: Include x86-tdep.h.
10490         (amd64_in_indirect_branch_thunk): New.
10491         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10492
10493 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10494
10495         PR gdb/23053
10496         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10497         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10498         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10499         regression.
10500
10501 2018-04-12  Tom Tromey  <tom@tromey.com>
10502
10503         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10504         (rust_evaluate_subexp): Likewise.
10505
10506 2018-04-12  Pedro Alves  <palves@redhat.com>
10507
10508         * procfs.c (procfs_detach): Make forward declaration's prototype
10509         match definition's protototype.
10510         (proc_get_LDT_entry): Remove stale do_cleanups call.
10511
10512 2018-04-12  Pedro Alves  <palves@redhat.com>
10513
10514         * target.h (target_ops::to_has_exited): Delete.
10515         (target_has_exited): Delete.
10516         * target-delegates.c: Regenerate.
10517
10518 2018-04-11  Pedro Alves  <palves@redhat.com>
10519
10520         * target.c (fileio_fh_t::t): Add comment.
10521         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10522         (target_fileio_close): Handle a NULL target.
10523         (invalidate_fileio_fh): New.
10524         (target_close): Call it.
10525         * remote.c (remote_hostio_send_command): No longer check whether
10526         remote_desc is open.
10527
10528 2018-04-11  Pedro Alves  <palves@redhat.com>
10529
10530         * target.c (fileio_fh_t): Make it a named struct instead of a
10531         typedef.
10532         (fileio_fh_t::is_closed): New method.
10533         (DEF_VEC_O (fileio_fh_t)): Remove.
10534         (fileio_fhandles): Now a std::vector.
10535         (is_closed_fileio_fh): Delete.
10536         (acquire_fileio_fd): Adjust.  Rename parameters.
10537         (release_fileio_fd): Adjust.
10538         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10539         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10540         (target_fileio_close): Adjust.
10541
10542 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10543
10544         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10545         index.
10546
10547 2018-04-10  Pedro Alves  <palves@redhat.com>
10548
10549         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10550         (scoped_finish_thread_state): New class.
10551         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10552         cleanup.
10553         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10554         (fetch_inferior_event, normal_stop): Likewise.
10555         * thread.c (finish_thread_state_cleanup): Delete.
10556
10557 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10558             Pedro Alves  <palves@redhat.com>
10559
10560         * value.c: Include "selftest.h" and "common/array-view.h".
10561         (struct range) <operator ==>: New.
10562         (test_ranges_contain): New.
10563         (check_ranges_vector): New.
10564         (test_insert_into_bit_range_vector): New.
10565         (_initialize_values): Register selftests.
10566         * common/array-view.h (operator==, operator!=): New.
10567
10568 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10569
10570         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10571         an iterator.
10572         * inline-frame.c: Include <algorithm>.
10573         (struct inline_state): Add constructor.
10574         (inline_state_s): Remove.
10575         (DEF_VEC_O(inline_state_s)): Remove.
10576         (inline_states): Change type to std::vector.
10577         (find_inline_frame_state): Adjust to std::vector.
10578         (allocate_inline_frame_state): Remove.
10579         (clear_inline_frame_state): Adjust to std::vector.
10580         (skip_inline_frames): Adjust to std::vector.
10581
10582 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10583
10584         * tracepoint.h (struct trace_state_variable): Add constructor.
10585         <name>: Change type to std::string.
10586         * tracepoint.c (tsv_s): Remove.
10587         (DEF_VEC_O(tsv_s)): Remove.
10588         (tvariables): Change to std::vector.
10589         (create_trace_state_variable): Adjust to std::vector.
10590         (find_trace_state_variable): Likewise.
10591         (find_trace_state_variable_by_number): Likewise.
10592         (delete_trace_state_variable): Likewise.
10593         (trace_variable_command): Adjust to std::string.
10594         (delete_trace_variable_command): Likewise.
10595         (tvariables_info_1): Adjust to std::vector.
10596         (save_trace_state_variables): Likewise.
10597         (start_tracing): Likewise.
10598         (merge_uploaded_trace_state_variables): Adjust to std::vector
10599         and std::string.
10600         * target.h (struct target_ops)
10601         <to_download_trace_state_variable>: Pass reference to
10602         trace_state_variable.
10603         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10604         * target-delegates.c: Re-generate.
10605         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10606         (mi_tsv_deleted): Likewise.
10607         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10608         * remote.c (remote_download_trace_state_variable): Change
10609         pointer to reference and adjust.
10610         * make-target-delegates (parse_argtypes): Handle references.
10611         (write_function_header): Likewise.
10612         (munge_type): Likewise.
10613
10614 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10615
10616         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10617         string_view-selftests.c.
10618         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10619         testsuite.
10620         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10621         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10622         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10623         * unittests/basic_string_view/element_access/char/1.cc:
10624         Likewise.
10625         * unittests/basic_string_view/element_access/char/empty.cc:
10626         Likewise.
10627         * unittests/basic_string_view/element_access/char/front_back.cc:
10628         Likewise.
10629         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10630         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10631         Likewise.
10632         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10633         Likewise.
10634         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10635         Likewise.
10636         * unittests/basic_string_view/operations/compare/char/1.cc:
10637         Likewise.
10638         * unittests/basic_string_view/operations/compare/char/13650.cc:
10639         Likewise.
10640         * unittests/basic_string_view/operations/copy/char/1.cc:
10641         Likewise.
10642         * unittests/basic_string_view/operations/data/char/1.cc:
10643         Likewise.
10644         * unittests/basic_string_view/operations/find/char/1.cc:
10645         Likewise.
10646         * unittests/basic_string_view/operations/find/char/2.cc:
10647         Likewise.
10648         * unittests/basic_string_view/operations/find/char/3.cc:
10649         Likewise.
10650         * unittests/basic_string_view/operations/find/char/4.cc:
10651         Likewise.
10652         * unittests/basic_string_view/operations/rfind/char/1.cc:
10653         Likewise.
10654         * unittests/basic_string_view/operations/rfind/char/2.cc:
10655         Likewise.
10656         * unittests/basic_string_view/operations/rfind/char/3.cc:
10657         Likewise.
10658         * unittests/basic_string_view/operations/substr/char/1.cc:
10659         Likewise.
10660         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10661         * unittests/string_view-selftests.c: New file.
10662
10663 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10664
10665         * unittests/basic_string_view/capacity/1.cc: New file.
10666         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10667         * unittests/basic_string_view/cons/char/1.cc: New file.
10668         * unittests/basic_string_view/cons/char/2.cc: New file.
10669         * unittests/basic_string_view/cons/char/3.cc: New file.
10670         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10671         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10672         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10673         * unittests/basic_string_view/element_access/char/1.cc: New file.
10674         * unittests/basic_string_view/element_access/char/2.cc: New file.
10675         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10676         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10677         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10678         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10679         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10680         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10681         * unittests/basic_string_view/include.cc: New file.
10682         * unittests/basic_string_view/inserters/char/1.cc: New file.
10683         * unittests/basic_string_view/inserters/char/2.cc: New file.
10684         * unittests/basic_string_view/inserters/char/3.cc: New file.
10685         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10686         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10687         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10688         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10689         * unittests/basic_string_view/literals/types.cc: New file.
10690         * unittests/basic_string_view/literals/values.cc: New file.
10691         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10692         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10693         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10694         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10695         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10696         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10697         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10698         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10699         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10700         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10701         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10702         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10703         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10704         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10705         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10706         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10707         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10708         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10709         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10710         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10711         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10712         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10713         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10714         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10715         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10716         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10717         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10718         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10719         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10720         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10721         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10722         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10723         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10724         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10725         * unittests/basic_string_view/operators/char/2.cc: New file.
10726         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10727         * unittests/basic_string_view/range_access/char/1.cc: New file.
10728         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10729         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10730         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10731         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10732         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10733         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10734         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10735         * unittests/basic_string_view/typedefs.cc: New file.
10736         * unittests/basic_string_view/types/1.cc: New file.
10737
10738 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10739
10740         * common/gdb_string_view.h: Remove libstdc++ implementation
10741         details, adjust to gdb reality.
10742         * common/gdb_string_view.tcc: Likewise.
10743         * cli/cli-script.c (struct string_view): Remove.
10744         (user_args) <m_args>: Change element type to gdb::string_view.
10745         (user_args::insert_args): Adjust.
10746
10747 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10748
10749         * common/gdb_string_view.h: New file.
10750         * common/gdb_string_view.tcc: New file.
10751
10752 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10753
10754         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10755         * configure: Re-generate.
10756
10757 2018-04-09  Pedro Alves  <palves@redhat.com>
10758
10759         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10760         (set_target_gdbarch): Call
10761         gdb::observers::architecture_changed.notify instead of
10762         observer_notify_architecture_changed.
10763
10764 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10765
10766         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10767         (do_restore_current_traceframe_cleanup): Remove.
10768         (restore_current_traceframe_cleanup_dtor): Remove.
10769         (make_cleanup_restore_current_traceframe): Remove.
10770         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10771         New.
10772         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10773         * infrun.c (fetch_inferior_event): Use
10774         scoped_restore_current_traceframe.
10775
10776 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10777
10778         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10779         Remove.
10780         <n_allocated_type_units>: Remove.
10781         <all_type_units>: Change to std::vector.
10782         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10783         to std::vector change.
10784         (dwarf2_per_objfile::get_cutu): Likewise.
10785         (dwarf2_per_objfile::get_tu): Likewise.
10786         (create_signatured_type_table_from_index): Likewise.
10787         (create_signatured_type_table_from_debug_names): Likewise.
10788         (dw2_symtab_iter_next): Likewise.
10789         (dw2_print_stats): Likewise.
10790         (dw2_expand_all_symtabs): Likewise.
10791         (dw2_expand_marked_cus): Likewise.
10792         (dw2_debug_names_iterator::next): Likewise.
10793         (dwarf2_initialize_objfile): Likewise.
10794         (add_signatured_type_cu_to_table): Likewise.
10795         (create_all_type_units): Likewise.
10796         (add_type_unit): Likewise.
10797         (struct tu_abbrev_offset): Add constructor.
10798         (build_type_psymtabs_1): Adjust to std::vector change.
10799         (print_tu_stats): Likewise.
10800         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10801         (write_debug_names): Likewise.
10802
10803 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10804
10805         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10806         Make an std::vector.
10807         <n_comp_units>: Remove.
10808         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10809         to std::vector change.
10810         (dwarf2_per_objfile::get_cutu): Likewise.
10811         (dwarf2_per_objfile::get_cu): Likewise.
10812         (create_cus_from_index): Likewise.
10813         (create_addrmap_from_index): Likewise.
10814         (create_addrmap_from_aranges): Likewise.
10815         (dwarf2_read_index): Likewise.
10816         (dw2_find_last_source_symtab): Likewise.
10817         (dw2_map_symtabs_matching_filename): Likewise.
10818         (dw2_symtab_iter_next): Likewise.
10819         (dw2_print_stats): Likewise.
10820         (dw2_expand_all_symtabs): Likewise.
10821         (dw2_expand_symtabs_with_fullname): Likewise.
10822         (dw2_expand_marked_cus): Likewise.
10823         (dw2_map_symbol_filenames): Likewise.
10824         (create_cus_from_debug_names): Likewise.
10825         (dwarf2_read_debug_names): Likewise.
10826         (dw2_debug_names_iterator::next): Likewise.
10827         (dwarf2_initialize_objfile): Likewise.
10828         (set_partial_user): Likewise.
10829         (dwarf2_build_psymtabs_hard): Likewise.
10830         (read_comp_units_from_section): Remove arguments, adjust to
10831         std::vector change.
10832         (create_all_comp_units): Adjust to std::vector and
10833         read_comp_units_from_section changes.
10834         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10835         change.
10836         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10837         (psyms_seen_size): Likewise.
10838         (write_gdbindex): Likewise.
10839         (write_debug_names): Likewise.
10840
10841 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10842
10843         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10844         with dwarf2_per_objfile.
10845         (create_cus_from_index): Likewise.
10846         (create_signatured_type_table_from_index): Likewise.
10847         (dwarf2_read_index): Likewise.
10848         (dwarf2_initialize_objfile): Likewise.
10849         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10850         per_cu rather than get_dwarf2_per_objfile.
10851
10852 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10853
10854         * dwarf2read.h (struct signatured_type): Forward declare.
10855         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10856         New methods.
10857         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10858         (dw2_get_cutu): ...this.
10859         (dwarf2_per_objfile::get_cu): Rename from...
10860         (dw2_get_cu): ...this.
10861         (dwarf2_per_objfile::get_tu): New.
10862         (create_addrmap_from_index): Adjust.
10863         (create_addrmap_from_aranges): Adjust.
10864         (dw2_find_last_source_symtab): Adjust.
10865         (dw2_map_symtabs_matching_filename): Adjust.
10866         (dw2_symtab_iter_next): Adjust.
10867         (dw2_print_stats): Adjust.
10868         (dw2_expand_all_symtabs): Adjust.
10869         (dw2_expand_symtabs_with_fullname): Adjust.
10870         (dw2_expand_marked_cus): Adjust.
10871         (dw_expand_symtabs_matching_file_matcher): Adjust.
10872         (dw2_map_symbol_filenames): Adjust.
10873         (dw2_debug_names_iterator::next): Adjust.
10874         (dwarf2_initialize_objfile): Adjust.
10875         (set_partial_user): Adjust.
10876         (dwarf2_build_psymtabs_hard): Adjust.
10877
10878 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10879
10880         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10881         Remove unused variables.
10882         (dw2_map_symtabs_matching_filename): Likewise.
10883         (dwarf2_record_block_ranges): Likewise.
10884         (dwarf2_read_addr_index): Likewise.
10885         (follow_die_offset): Likewise.
10886
10887 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10888
10889         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10890         to symbol_file_add_main.
10891
10892 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10893
10894         PR mi/22299
10895         * mi/mi-console.c (do_fputc_async_safe): New.
10896         (mi_console_file::write_async_safe): New.
10897         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10898         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10899         New.
10900         * ui-file.c (ui_file::putstrn): Adjust call to
10901         fputstrn_unfiltered.
10902         * utils.c (printchar): Replace do_fputs and do_fprintf
10903         parameters by do_fputc.
10904         (fputstr_filtered): Adjust call to printchar.
10905         (fputstr_unfiltered): Likewise.
10906         (fputstrn_filtered): Likewise.
10907         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10908         printchar.
10909         * utils.h (do_fputc_ftype): New typedef.
10910         (fputstrn_unfiltered): Add do_fputc parameter.
10911
10912 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10913
10914         * regformats/i386/i386-avx.dat: Remove.
10915
10916 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10917
10918         PR gdb/22979
10919         * amd64-tdep.c (amd64_none_init_abi): New function.
10920         (amd64_x32_none_init_abi): New function.
10921         (_initialize_amd64_tdep): Register handlers for x86-64 and
10922         x64_32 with GDB_OSABI_NONE.
10923         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10924         GDB_OSABI_NONE osabi.
10925
10926 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10927
10928         PR gdb/22980
10929         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10930         GDB_OSABI_NONE.
10931         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10932         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10933
10934 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10935
10936         * common/byte-vector.h (char_vector): New type.
10937         * target.h (target_read_alloc): Return
10938         gdb::optional<byte_vector>.
10939         (target_read_stralloc): Return gdb::optional<char_vector>.
10940         (target_get_osdata): Return gdb::optional<char_vector>.
10941         * target.c (target_read_alloc_1): Templatize.  Replacement
10942         manual memory management with vector.
10943         (target_read_alloc): Change return type, adjust.
10944         (target_read_stralloc): Change return type, adjust.
10945         (target_get_osdata): Change return type, adjust.
10946         * auxv.c (struct auxv_info) <length>: Remove.
10947         <data>: Change type to gdb::optional<byte_vector>.
10948         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10949         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10950         (target_auxv_search): Adjust.
10951         (fprint_target_auxv): Adjust.
10952         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10953         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10954         (linux_make_corefile_notes): Adjust.
10955         * osdata.c (get_osdata): Adjust.
10956         * remote.c (remote_get_threads_with_qxfer): Adjust.
10957         (remote_memory_map): Adjust.
10958         (remote_traceframe_info): Adjust.
10959         (btrace_read_config): Adjust.
10960         (remote_read_btrace): Adjust.
10961         (remote_pid_to_exec_file): Adjust.
10962         * solib-aix.c (solib_aix_get_library_list): Adjust.
10963         * solib-dsbt.c (decode_loadmap): Don't free buf.
10964         (dsbt_get_initial_loadmaps): Adjust.
10965         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10966         * solib-target.c (solib_target_current_sos): Adjust.
10967         * tracepoint.c (sdata_make_value): Adjust.
10968         * xml-support.c (xinclude_start_include): Adjust.
10969         (xml_fetch_content_from_file): Adjust.
10970         * xml-support.h (xml_fetch_another): Change return type.
10971         (xml_fetch_content_from_file): Change return type.
10972         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10973         * xml-tdesc.c (file_read_description_xml): Adjust.
10974         (fetch_available_features_from_target): Change return type.
10975         (target_fetch_description_xml): Adjust.
10976         (target_read_description_xml): Adjust.
10977
10978 2018-04-06  Tom Tromey  <tom@tromey.com>
10979
10980         * value.c (~value): Update.
10981         (struct value) <contents>: Now unique_xmalloc_ptr.
10982         (value_contents_bits_eq, allocate_value_contents)
10983         (value_contents_raw, value_contents_all_raw)
10984         (value_contents_for_printing, value_contents_for_printing_const)
10985         (set_value_enclosing_type): Update.
10986
10987 2018-04-06  Tom Tromey  <tom@tromey.com>
10988
10989         * value.c (range_s): Remove typedef, VEC.
10990         (struct range): Add operator<.
10991         (range_lessthan): Remove.
10992         (ranges_contain): Change type.
10993         (~value): Update.
10994         (struct value) <unavailable, optimized_out>: Now std::vector.
10995         (value_entirely_available)
10996         (value_entirely_covered_by_range_vector)
10997         (value_entirely_unavailable, value_entirely_optimized_out):
10998         Update.
10999         (insert_into_bit_range_vector): Change argument type.
11000         (find_first_range_overlap): Likewise.
11001         (struct ranges_and_idx, value_contents_bits_eq)
11002         (require_not_optimized_out, require_available): Update.
11003         (ranges_copy_adjusted): Change argument types.
11004         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11005
11006 2018-04-06  Tom Tromey  <tom@tromey.com>
11007
11008         * value.c (~value): Update.
11009         (struct value) <parent>: Now a value_ref_ptr.
11010         (value_parent, set_value_parent, value_address, value_copy):
11011         Update.
11012
11013 2018-04-06  Tom Tromey  <tom@tromey.com>
11014
11015         * value.c (struct value): Add constructor, destructor, and member
11016         initializers.
11017         (allocate_value_lazy, value_decref): Update.
11018
11019 2018-04-06  Tom Tromey  <tom@tromey.com>
11020
11021         * value.c (struct value) <released, next>: Remove.
11022         (all_values): Now a std::vector.
11023         (allocate_value_lazy): Update.
11024         (value_next): Remove.
11025         (value_mark, value_free_to_mark, release_value)
11026         (value_release_to_mark): Update.
11027
11028 2018-04-06  Tom Tromey  <tom@tromey.com>
11029
11030         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11031         (free_value_chain): Remove.
11032         * value.c (free_value_chain): Remove.
11033         (value_release_to_mark): Return a std::vector.
11034         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11035         std::vector.
11036         (check_condition): Update.
11037         * eval.c (fetch_subexp_value): Change "val_chain" to a
11038         std::vector.
11039         * breakpoint.c (update_watchpoint): Update.
11040         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11041
11042 2018-04-06  Tom Tromey  <tom@tromey.com>
11043
11044         * value.h (free_all_values): Remove.
11045         * value.c (free_all_values): Remove.
11046
11047 2018-04-06  Tom Tromey  <tom@tromey.com>
11048
11049         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11050         (value_history_chain, value_history_count): Remove.
11051         (value_history): New global.
11052         (record_latest_value, access_value_history, show_values)
11053         (preserve_values): Update.
11054
11055 2018-04-06  Tom Tromey  <tom@tromey.com>
11056
11057         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11058         * varobj.c (varobj_set_display_format, varobj_set_value)
11059         (install_default_visualizer, construct_visualizer)
11060         (install_new_value, ~varobj, varobj_get_value_type)
11061         (my_value_of_variable, varobj_editable_p): Update.
11062         * c-varobj.c (c_describe_child, c_value_of_variable)
11063         (cplus_number_of_children, cplus_describe_child): Update.
11064         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11065         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11066         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11067
11068 2018-04-06  Tom Tromey  <tom@tromey.com>
11069
11070         * printcmd.c (last_examine_address): Change type to
11071         value_ref_ptr.
11072         (do_examine, x_command): Update.
11073
11074 2018-04-06  Tom Tromey  <tom@tromey.com>
11075
11076         * value.c (release_value): Update.
11077         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11078         (struct bpstats) <val>: Now a value_ref_ptr.
11079         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11080         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11081         (~watchpoint, print_it_watchpoint, watch_command_1)
11082         (invalidate_bp_value_on_memory_change): Update.
11083
11084 2018-04-06  Tom Tromey  <tom@tromey.com>
11085
11086         * varobj.c (varobj_clear_saved_item)
11087         (update_dynamic_varobj_children, install_new_value, ~varobj):
11088         Update.
11089         * value.h (value_incref): Move declaration earlier.
11090         (value_decref): Rename from value_free.
11091         (struct value_ref_policy): New.
11092         (value_ref_ptr): New typedef.
11093         (struct value_deleter): Remove.
11094         (gdb_value_up): Remove typedef.
11095         (release_value): Change return type.
11096         (release_value_or_incref): Remove.
11097         * value.c (set_value_parent): Update.
11098         (value_incref): Change return type.
11099         (value_decref): Rename from value_free.
11100         (value_free_to_mark, free_all_values, free_value_chain): Update.
11101         (release_value): Return value_ref_ptr.
11102         (release_value_or_incref): Remove.
11103         (record_latest_value, set_internalvar, clear_internalvar):
11104         Update.
11105         * stack.c (info_frame_command): Don't call value_free.
11106         * python/py-value.c (valpy_dealloc, valpy_new)
11107         (value_to_value_object): Update.
11108         * printcmd.c (do_examine): Update.
11109         * opencl-lang.c (lval_func_free_closure): Update.
11110         * mi/mi-main.c (register_changed_p): Don't call value_free.
11111         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11112         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11113         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11114         value_free.
11115         * guile/scm-value.c (vlscm_free_value_smob)
11116         (vlscm_scm_from_value): Update.
11117         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11118         (frame_unwind_register_unsigned, get_frame_register_bytes)
11119         (put_frame_register_bytes): Don't call value_free.
11120         * findvar.c (address_from_register): Don't call value_free.
11121         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11122         * dwarf2loc.c (entry_data_value_free_closure)
11123         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11124         (dwarf2_evaluate_loc_desc_full): Update.
11125         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11126         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11127         (~watchpoint, watch_command_1)
11128         (invalidate_bp_value_on_memory_change): Update.
11129         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11130
11131 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11132
11133         PR gdb/23022
11134         * warning.m4: Add -Wno-error=deprecated-register.
11135         * configure: Re-generate.
11136
11137 2018-04-05  Tom Tromey  <tom@tromey.com>
11138
11139         * linespec.h: Remove include of "vec.h".
11140
11141 2018-04-05  Tom Tromey  <tom@tromey.com>
11142
11143         * linespec.c (typep): Remove typedef.
11144         (find_methods, find_superclass_methods): Take a std::vector.
11145         (find_method): Use std::vector.
11146
11147 2018-04-05  Tom Tromey  <tom@tromey.com>
11148
11149         * utils.c (compare_strings): Remove.
11150         * utils.h (compare_strings): Remove.
11151         * objc-lang.h (find_imps): Update.
11152         * objc-lang.c (find_methods): Take a std::vector.
11153         (uniquify_strings, find_imps): Likewise.
11154         * linespec.c (find_methods): Take a std::vector.
11155         (decode_objc): Use std::vector.
11156         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11157         a std::vector.
11158         (find_method, find_function_symbols): Use std::vector.
11159
11160 2018-04-05  Tom Tromey  <tom@tromey.com>
11161
11162         * completer.c (completion_tracker::completion_tracker): Remove
11163         cast.
11164         (completion_tracker::discard_completions): Likewise.
11165         * breakpoint.c (ambiguous_names_p): Remove cast.
11166         * ada-lang.c (_initialize_ada_language): Remove cast.
11167         * utils.h (streq): Update.
11168         (streq_hash): Add new declaration.
11169         * utils.c (streq): Return bool.
11170         (streq_hash): New function.
11171
11172 2018-04-05  Tom Tromey  <tom@tromey.com>
11173
11174         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11175         Remove a string copy.
11176
11177 2018-04-05  Tom Tromey  <tom@tromey.com>
11178
11179         * linespec.c (filter_results): Use std::vector.
11180         (decode_line_2, decode_line_full): Update.
11181
11182 2018-04-05  Tom Tromey  <tom@tromey.com>
11183
11184         * linespec.c (canonical_to_fullform): Return std::string.
11185         (filter_results): Update.
11186         (struct decode_line_2_item): Add constructor.
11187         <fullform, displayform>: Now std::string.
11188         (decode_line_2_compare_items): Now a std::sort comparator.
11189         (decode_line_2): Update.
11190
11191 2018-04-05  Tom Tromey  <tom@tromey.com>
11192
11193         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11194         (unexpected_linespec_error): Update.
11195         (linespec_parse_basic, parse_linespec): Update.
11196
11197 2018-04-05  Tom Tromey  <tom@tromey.com>
11198
11199         * linespec.c (linespec_parse_basic): Reindent.
11200
11201 2018-04-05  Tom Tromey  <tom@tromey.com>
11202
11203         * minsyms.h (iterate_over_minimal_symbols): Update.
11204         * minsyms.c (iterate_over_minimal_symbols): Take a
11205         gdb::function_view.
11206         * linespec.c (struct collect_minsyms): Remove.
11207         (compare_msyms): Now a std::sort comparator.
11208         (add_minsym): Add parameters.
11209         (search_minsyms_for_name): Update.  Use std::vector.
11210
11211 2018-04-03  Tom Tromey  <tom@tromey.com>
11212
11213         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11214         gdb::byte_vector.
11215
11216 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11217
11218         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11219
11220 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11221
11222         PR gdb/16959
11223         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11224         printing static type.
11225
11226 2018-04-01  Tom Tromey  <tom@tromey.com>
11227
11228         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11229         (rs6000_xfer_shared_libraries): Update.
11230
11231 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11232
11233         * common/gdb_vecs.h (char_ptr): Remove.
11234         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11235
11236 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11237
11238         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11239         with std::vector.
11240         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11241
11242 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11243
11244         * tracepoint.h (struct uploaded_tp): Initialize fields.
11245         <actions, step_actions, cmd_strings>: Change type to
11246         std::vector<char *>.
11247         * tracepoint.c (get_uploaded_tp): Allocate with new.
11248         (free_uploaded_tps): Free with delete.
11249         (parse_tracepoint_definition): Adjust to std::vector change.
11250         * breakpoint.c (read_uploaded_action): Likewise.
11251         (create_tracepoint_from_upload): Likewise.
11252         * ctf.c (ctf_write_uploaded_tp): Likewise.
11253         (SET_ARRAY_FIELD): Likewise.
11254         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11255
11256 2018-03-30  Tom Tromey  <tom@tromey.com>
11257
11258         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11259         std::unique_ptr.
11260         (svr4_keep_data_in_core): Update.
11261         (svr4_read_so_list): Update.
11262
11263 2018-03-30  Tom Tromey  <tom@tromey.com>
11264
11265         * windows-nat.c (handle_output_debug_string, handle_exception):
11266         Update.
11267         * target.h (target_read_string): Update.
11268         * target.c (target_read_string): Change "string" to
11269         unique_xmalloc_ptr.
11270         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11271         Update.
11272         * solib-frv.c (frv_current_sos): Update.
11273         * solib-dsbt.c (dsbt_current_sos): Update.
11274         * solib-darwin.c (darwin_current_sos): Update.
11275         * linux-thread-db.c (inferior_has_bug): Update.
11276         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11277         Update.  Remove alloca.
11278         * ada-lang.c (ada_main_name): Update.
11279
11280 2018-03-30  Tom Tromey  <tom@tromey.com>
11281
11282         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11283         (struct dwo_file_deleter): New.
11284         (dwo_file_up): New typedef.
11285         (open_and_init_dwo_file): Use dwo_file_up.
11286         (free_dwo_file_cleanup): Remove.
11287
11288 2018-03-30  Tom Tromey  <tom@tromey.com>
11289
11290         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11291         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11292
11293 2018-03-30  Tom Tromey  <tom@tromey.com>
11294
11295         * dwarf2read.c (class free_cached_comp_units): New class.
11296         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11297         (free_cached_comp_units): Remove function.
11298
11299 2018-03-30  Tom Tromey  <tom@tromey.com>
11300
11301         * utils.h (make_cleanup_unpush_target): Remove.
11302         * inf-ptrace.c (struct target_unpusher): New.
11303         (target_unpush_up) New typedef.
11304         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11305         target_unpush_up.
11306         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11307
11308 2018-03-27  Tom Tromey  <tom@tromey.com>
11309
11310         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11311
11312 2018-03-27  Pedro Alves  <palves@redhat.com>
11313             Tom Tromey  <tom@tromey.com>
11314
11315         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11316         destructor.  Now a class.
11317         (gdb_readline_wrapper_cleanup): Remove function.
11318         (gdb_readline_wrapper): Remove cleanups.
11319
11320 2018-03-27  Tom Tromey  <tom@tromey.com>
11321
11322         * typeprint.h (struct type_print_options) <local_typedefs,
11323         global_typedefs>: Remove "struct" keyword.
11324         (class typedef_hash_table): New class.
11325         (recursively_update_typedef_hash, add_template_parameters)
11326         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11327         (find_typedef_in_hash): Don't declare.
11328         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11329         (typedef_hash_table::recursively_update): Rename from
11330         recursively_update_typedef_hash.  Now a member.
11331         (typedef_hash_table::add_template_parameters): Rename from
11332         add_template_parameters.  Now a member.
11333         (typedef_hash_table::typedef_hash_table): Now a constructor;
11334         rename from create_typedef_hash.
11335         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11336         rename from free_typedef_hash.
11337         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11338         (do_free_global_table): Remove.
11339         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11340         from copy_type_recursive.
11341         (create_global_typedef_table): Remove.
11342         (typedef_hash_table::find_global_typedef): Now a member of
11343         typedef_hash_table.
11344         (typedef_hash_table::find_typedef): Rename from
11345         find_typedef_in_hash; now a member.
11346         (whatis_exp): Update.
11347         * extension.h (struct ext_lang_type_printers): Add constructor and
11348         destructor.
11349         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11350         declare.
11351         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11352         Now a constructor; rename from start_ext_lang_type_printers.
11353         (ext_lang_type_printers): Now a destructor; rename from
11354         free_ext_lang_type_printers.
11355         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11356         Update.
11357         (c_type_print_base_struct_union): Update.  Remove cleanups.
11358
11359 2018-03-27  Tom Tromey  <tom@tromey.com>
11360
11361         * dwarf-index-write.c: Include <cmath>.
11362
11363 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11364
11365         * NEWS: Add entry describing new "set|show varsize-limit" command.
11366         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11367         command.
11368         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11369         "set variable".
11370
11371 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11372
11373         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11374         dwarf-index-write.c
11375         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11376         * dwarf-index-common.c: New file.
11377         * dwarf-index-common.h: New file.
11378         * dwarf-index-write.c: New file.
11379         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11380         (struct dwarf2_section_info): Move from here.
11381         (dwarf2_section_info_def): Likewise.
11382         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11383         (offset_type): Likewise.
11384         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11385         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11386         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11387         (byte_swap): Likewise.
11388         (MAYBE_SWAP): Likewise.
11389         (dwarf2_per_cu_ptr): Likewise.
11390         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11391         (struct tu_stats): Likewise.
11392         (struct dwarf2_per_objfile): Likewise.
11393         (struct dwarf2_per_cu_data): Likewise.
11394         (struct signatured_type): Likewise.
11395         (sig_type_ptr): Likewise.
11396         (DEF_VEC_P (sig_type_ptr)): Likewise.
11397         (INDEX4_SUFFIX): Likewise.
11398         (INDEX5_SUFFIX): Likewise.
11399         (DEBUG_STR_SUFFIX): Likewise.
11400         (dwarf2_read_section): Make non-static.
11401         (mapped_index_string_hash): Move from here.
11402         (dwarf5_djb_hash): Likewise.
11403         (file_write): Likewise.
11404         (class data_buf): Likewise.
11405         (struct symtab_index_entry): Likewise.
11406         (struct mapped_symtab): Likewise.
11407         (find_slot): Likewise.
11408         (hash_expand): Likewise.
11409         (add_index_entry): Likewise.
11410         (uniquify_cu_indices): Likewise.
11411         (class c_str_view): Likewise.
11412         (class c_str_view_hasher): Likewise.
11413         (class vector_hasher): Likewise.
11414         (write_hash_table): Likewise.
11415         (psym_index_map): Likewise.
11416         (struct addrmap_index_data): Likewise.
11417         (add_address_entry): Likewise.
11418         (add_address_entry_worker): Likewise.
11419         (write_address_map): Likewise.
11420         (symbol_kind): Likewise.
11421         (write_psymbols): Likewise.
11422         (struct signatured_type_index_data): Likewise.
11423         (write_one_signatured_type): Likewise.
11424         (recursively_count_psymbols): Likewise.
11425         (recursively_write_psymbols): Likewise.
11426         (class debug_names): Likewise.
11427         (check_dwarf64_offsets): Likewise.
11428         (psyms_seen_size): Likewise.
11429         (write_gdbindex): Likewise.
11430         (write_debug_names): Likewise.
11431         (assert_file_size): Likewise.
11432         (write_psymtabs_to_index): Likewise.
11433         (save_gdb_index_command): Likewise.
11434         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11435         command.
11436         * dwarf2read.h: New file.
11437
11438 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11439
11440         PR gdb/22670
11441         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11442         symbol name if the CU's language stores symbol names in linkage
11443         format.
11444         * language.h (struct language_defn)
11445         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11446         all instances of this struct.
11447
11448 2018-03-26  Tom Tromey  <tom@tromey.com>
11449
11450         * stack.c (backtrace_command_1): Remove verbose code.
11451
11452 2018-03-26  Tom Tromey  <tom@tromey.com>
11453
11454         * python/py-framefilter.c (py_print_type): Don't catch
11455         exceptions.  Return void.
11456         (py_print_value): Likewise.
11457         (py_print_single_arg): Likewise.
11458         (enumerate_args): Don't catch exceptions.
11459         (py_print_args): Likewise.
11460         (py_print_frame): Likewise.
11461         (gdbpy_apply_frame_filter): Catch exceptions here.
11462
11463 2018-03-26  Tom Tromey  <tom@tromey.com>
11464
11465         * stack.c (_initialize_stack): Remove trailing newlines from help
11466         text.  Add "Usage" line to "backtrace" help.
11467
11468 2018-03-26  Tom Tromey  <tom@tromey.com>
11469
11470         PR python/16486:
11471         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11472
11473 2018-03-26  Tom Tromey  <tom@tromey.com>
11474
11475         * python/py-framefilter.c (py_print_single_arg): Return
11476         EXT_LANG_BT_ERROR from catch.
11477
11478 2018-03-26  Tom Tromey  <tom@tromey.com>
11479
11480         PR backtrace/15584:
11481         * stack.c (backtrace_command_1): Move some code into no-filters
11482         "if".
11483
11484 2018-03-26  Tom Tromey  <tom@tromey.com>
11485
11486         * python/py-framefilter.c (throw_quit_or_print_exception): New
11487         function.
11488         (gdbpy_apply_frame_filter): Use it.
11489
11490 2018-03-26  Tom Tromey  <tom@tromey.com>
11491
11492         PR cli/17716:
11493         * python/py-framefilter.c (py_print_type, py_print_value)
11494         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11495         RETURN_MASK_ERROR.
11496
11497 2018-03-26  Tom Tromey  <tom@tromey.com>
11498
11499         * python/py-framefilter.c (enumerate_args): Use
11500         gdb::unique_xmalloc_ptr.
11501
11502 2018-03-26  Tom Tromey  <tom@tromey.com>
11503
11504         * python/py-framefilter.c (py_print_frame): Return
11505         EXT_LANG_BT_OK.
11506         (gdbpy_apply_frame_filter): Update comment.
11507         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11508         Remove.
11509         <EXT_LANG_BT_NO_FILTERS>: Change value.
11510
11511 2018-03-26  Tom Tromey  <tom@tromey.com>
11512
11513         PR backtrace/15582:
11514         * stack.c (backtrace_command): Parse "hide" argument.
11515         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11516         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11517         constant.
11518
11519 2018-03-26  Tom Tromey  <tom@tromey.com>
11520
11521         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11522         add "flags".
11523         (backtrace_command): Remove "fulltrace", add "flags".
11524
11525 2018-03-26  Tom Tromey  <tom@tromey.com>
11526
11527         * stack.c (backtrace_command): Rewrite command line parsing.
11528
11529 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11530
11531         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11532
11533 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11534
11535         * filename-seen-cache.h: Add include guard.
11536
11537 2018-03-26  Keith Seitz  <keiths@redhat.com>
11538
11539         * symfile.c (place_section): Remove "struct" from section_addr_info
11540         in comment.
11541         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11542         "struct" keyword from section_addr_info.
11543
11544 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11545
11546         * regformats/regdef.h (reg): Add constructors.
11547
11548 2018-03-25  Pedro Alves  <palves@redhat.com>
11549
11550         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11551         if then/else bodies in var_func_name extraction.
11552
11553 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11554
11555         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11556         lookup_minimal_symbol() to find symbol entry.
11557         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11558
11559 2018-03-23  Keith Seitz  <keiths@redhat.com>
11560
11561         PR c++/22968
11562         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11563         nested type definitions for C++, too.
11564
11565 2018-03-23  Tom Tromey  <tom@tromey.com>
11566
11567         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11568         a typedef.
11569         (macho_register_oso): Remove.
11570         (macho_symtab_read): Take a std::vector.
11571         (oso_el_compare_name): Now a std::sort comparator.
11572         (macho_symfile_read_all_oso): Take a std::vector.
11573         (macho_symfile_read): Use std::vector.  Remove cleanups.
11574
11575 2018-03-22  Tom Tromey  <tom@tromey.com>
11576
11577         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11578         (record_full_goto_bookmark): Use std::string.
11579
11580 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11581
11582         PR tdep/18295
11583         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11584         a single mask.
11585
11586 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11587
11588         * rs6000-tdep.c (store_insn_p): New function.
11589         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11590         and cr_reg to their unshifted values. Use store_insn_p to
11591         match LR saves using either R1 or fdata->alloca_reg. Use
11592         store_insn_p to match CR saves. Set alloca_reg_offset
11593         when alloca_reg and framep are set. Remove lr_reg shift
11594         when assigning to fdata->lr_register.
11595
11596 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11597
11598         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11599         command line args instead of emitting a warning.
11600
11601 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11602
11603         * tracepoint.h (struct static_tracepoint_marker): Initialize
11604         fields, define default constructor, move constructor and move
11605         assignment, disable the rest.
11606         <str_id, extra>: Make std::string.
11607         (release_static_tracepoint_marker): Remove.
11608         (free_current_marker): Remove.
11609         * tracepoint.c (free_current_marker): Remove.
11610         (parse_static_tracepoint_marker_definition): Adjust to
11611         std::string, use new hex2str overload.
11612         (release_static_tracepoint_marker): Remove.
11613         (print_one_static_tracepoint_marker): Get marker by reference
11614         and adjust to std::string.
11615         (info_static_tracepoint_markers_command): Adjust to std::vector
11616         changes
11617         * target.h (static_tracepoint_marker_p): Remove typedef.
11618         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11619         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11620         bool.
11621         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11622         * target-debug.h
11623         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11624         (target_debug_print_std_vector_static_tracepoint_marker): New.
11625         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11626         to...
11627         (target_debug_print_static_tracepoint_marker_p): ... this.
11628         * target-delegates.c: Re-generate.
11629         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11630         Make std::string.
11631         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11632         (decode_static_tracepoint_spec): Adjust to std::vector.
11633         (tracepoint_print_one_detail): Adjust to std::string.
11634         (strace_marker_decode_location): Adjust to std::string.
11635         (update_static_tracepoint): Adjust to std::string, remove call
11636         to release_static_tracepoint_marker.
11637         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11638         Adjust to std::vector.
11639         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11640         (remote_static_tracepoint_markers_by_strid): Adjust to
11641         std::vector.
11642         * common/rsp-low.h (hex2str): New overload with explicit count
11643         of bytes.
11644         * common/rsp-low.c (hex2str): New overload with explicit count
11645         of bytes.
11646         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11647         (_initialize_rsp_low_selftests): Add test_hex2str test.
11648         * unittests/tracepoint-selftests.c
11649         (test_parse_static_tracepoint_marker_definition): Adjust to
11650         std::string.
11651
11652 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11653
11654         * tracepoint.c (parse_static_tracepoint_marker_definition):
11655         Consider case where the definition is followed by more
11656         definitions.
11657         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11658         tracepoint-selftests.c.
11659         * unittests/tracepoint-selftests.c: New.
11660
11661 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11662
11663         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11664         Carvalho.
11665
11666 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11667
11668         * symtab.c (find_pc_sect_line): fixed indentation.
11669
11670 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11671
11672         * symtab.c (find_pc_sect_line): now uses binary search.
11673
11674 2018-03-19  Tom Tromey  <tom@tromey.com>
11675
11676         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11677         "IDENT" production.
11678
11679 2018-03-19  Pedro Alves  <palves@redhat.com>
11680             Tom Tromey  <tom@tromey.com>
11681
11682         * unittests/observable-selftests.c: New file.
11683         * common/observable.h: New file.
11684         * observable.h: New file.
11685         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11686         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11687         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11688         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11689         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11690         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11691         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11692         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11693         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11694         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11695         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11696         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11697         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11698         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11699         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11700         tui/tui-interp.c, valops.c: Update all users.
11701         * tui/tui-hooks.c (tui_bp_created_observer)
11702         (tui_bp_deleted_observer, tui_bp_modified_observer)
11703         (tui_inferior_exit_observer, tui_before_prompt_observer)
11704         (tui_normal_stop_observer, tui_register_changed_observer):
11705         Remove.
11706         (tui_observers_token): New global.
11707         (attach_or_detach, tui_attach_detach_observers): New functions.
11708         (tui_install_hooks, tui_remove_hooks): Use
11709         tui_attach_detach_observers.
11710         * record-btrace.c (record_btrace_thread_observer): Remove.
11711         (record_btrace_thread_observer_token): New global.
11712         * observer.sh: Remove.
11713         * observer.c: Rename to observable.c.
11714         * observable.c (namespace gdb_observers): Define new objects.
11715         (observer_debug): Move into gdb_observers namespace.
11716         (struct observer, struct observer_list, xalloc_observer_list_node)
11717         (xfree_observer_list_node, generic_observer_attach)
11718         (generic_observer_detach, generic_observer_notify): Remove.
11719         (_initialize_observer): Update.
11720         Don't include observer.inc.
11721         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11722         (clean mostlyclean): Likewise.
11723         (observer.h, observer.inc): Remove targets.
11724         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11725         (COMMON_SFILES): Use observable.c, not observer.c.
11726         * .gitignore: Remove observer.h.
11727
11728 2018-03-18  Tom Tromey  <tom@tromey.com>
11729
11730         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11731         gdb::def_vector.
11732         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11733
11734 2018-03-17  Tom Tromey  <tom@tromey.com>
11735
11736         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11737
11738 2018-03-17  Tom Tromey  <tom@tromey.com>
11739
11740         * target.c (class scoped_target_fd): New.
11741         (target_fileio_close_cleanup): Remove.
11742         (target_fileio_read_alloc_1): Use scoped_target_fd.
11743
11744 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11745
11746         * silent-rules.mk: New.
11747         * Makefile.in: Include silent-rules.mk
11748         (srcdir, VPATH, top_srcdir): Move up.
11749         (COMPILE): Add ECHO_CXX.
11750         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11751         (init.c): Add ECHO_INIT_C.
11752         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11753         (version.c): Add ECHO_GEN.
11754         (printcmd.o): Add ECHO_CXX.
11755         (target-float.o): Add ECHO_CXX.
11756         (ada-exp.o): Add ECHO_CXX.
11757         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11758         (insight$(EXEEXT)): Add ECHO_CXXLD.
11759         * gnulib/configure.ac: Add AM_SILENT_RULES.
11760         * gnulib/aclocal.m4: Re-generate.
11761         * gnulib/configure: Re-generate.
11762         * gnulib/import/Makefile.in: Re-generate.
11763
11764 2018-03-16  Tom Tromey  <tom@tromey.com>
11765
11766         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11767         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11768         * utils.c (do_free_section_addr_info)
11769         (make_cleanup_free_section_addr_info): Remove.
11770         * symfile.h (struct other_sections): Add constructor.
11771         (struct section_addr_info): Remove.
11772         (section_addr_info): New typedef.
11773         (struct sym_fns) <sym_offsets>: Change type of parameter.
11774         (build_section_addr_info_from_objfile)
11775         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11776         (default_symfile_offsets, symbol_file_add)
11777         (symbol_file_add_from_bfd)
11778         (build_section_addr_info_from_section_table): Update.
11779         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11780         * symfile.c (alloc_section_addr_info): Remove.
11781         (build_section_addr_info_from_section_table): Change return type.
11782         Update.
11783         (build_section_addr_info_from_bfd)
11784         (build_section_addr_info_from_objfile): Likewise.
11785         (free_section_addr_info): Remove.
11786         (relative_addr_info_to_section_offsets): Change type of "addrs".
11787         (addrs_section_compar): Now a std::sort comparator.
11788         (addrs_section_sort): Change return type.
11789         (addr_info_make_relative): Change type of "addrs".  Update.
11790         (default_symfile_offsets, syms_from_objfile_1)
11791         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11792         (symbol_file_add_separate): Update.
11793         (symbol_file_add): Change type of "addrs".  Update.
11794         (add_symbol_file_command): Update.  Remove cleanups.
11795         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11796         cleanups.
11797         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11798         * solib.c (solib_read_symbols): Update.
11799         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11800         * machoread.c (macho_symfile_offsets): Update.
11801         * jit.c (jit_bfd_try_read_symtab): Update.
11802
11803 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11804
11805         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11806         unittests/utils-selftests.c.
11807         * unittests/utils-selftests.c: New file.
11808
11809 2018-03-14  Tom Tromey  <tom@tromey.com>
11810
11811         PR cli/14977:
11812         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11813         for NULL.
11814
11815 2018-03-14  Tom Tromey  <tom@tromey.com>
11816
11817         PR cli/19918:
11818         * printcmd.c (printf_pointer): Allow "-" in format.
11819
11820 2018-03-14  Tom Tromey  <tom@tromey.com>
11821
11822         * printcmd.c (_initialize_printcmd): Add usage to printf.
11823
11824 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11825
11826         * MAINTAINERS: Update my email address.
11827
11828 2018-03-13  Tom Tromey  <tom@tromey.com>
11829
11830         * machoread.c (macho_check_dsym): Change filenamep to a
11831         std::string*.
11832         (macho_symfile_read): Update.
11833         * symfile.c (load_command): Use std::string.
11834
11835 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11836
11837         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11838         to error message string.
11839         (riscv_register_name): Use xsnprintf instead of sprintf.
11840         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11841         internal_error.
11842         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11843         error.
11844         (riscv_push_dummy_call): Likewise.
11845
11846 2018-03-12  Tom Tromey  <tom@tromey.com>
11847
11848         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11849         Use gdb::byte_vector.
11850         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11851
11852 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11853
11854         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11855         parameter type to readable_regcache.
11856         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11857         the declaration.
11858
11859 2018-03-11  Tom Tromey  <tom@tromey.com>
11860
11861         * dwarf2read.c (struct nextfield): Add initializers.
11862         (struct nextfnfield): Remove.
11863         (struct fnfieldlist): Add initializers.  Remove "length" and
11864         "head", use std::vector.
11865         (struct decl_field_list): Remove.
11866         (struct field_info): Add initializers.
11867         <fields, baseclasses>: Now std::vector.
11868         <nbaseclasses, nfnfields, typedef_field_list_count,
11869         nested_types_list_count>: Remove.
11870         (dwarf2_add_field, dwarf2_add_type_defn)
11871         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11872         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11873         (process_structure_scope): Update.
11874
11875 2018-03-11  Tom Tromey  <tom@tromey.com>
11876
11877         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11878         for use by std::sort.
11879         (build_type_psymtabs_1): Use std::vector.
11880
11881 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11882
11883         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11884         and LIBMPFR in the printed configuration.
11885
11886 2018-03-08  Tom Tromey  <tom@tromey.com>
11887
11888         * source.c (get_filename_and_charpos): Use scoped_fd.
11889         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11890         (procfs_pidlist): Likewise.
11891         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11892         (iterate_over_mappings): Likewise.
11893
11894 2018-03-08  Tom Tromey  <tom@tromey.com>
11895
11896         * infcall.c (struct call_return_meta_info)
11897         <stack_temporaries_enabled>: Remove.
11898         (get_call_return_value, call_function_by_hand_dummy): Update.
11899         * thread.c (disable_thread_stack_temporaries): Remove.
11900         (enable_thread_stack_temporaries): Remove.
11901         (thread_stack_temporaries_enabled_p): Return bool.
11902         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11903         (get_last_thread_stack_temporary): Update.
11904         * eval.c (evaluate_subexp): Update.
11905         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11906         class, not a function.
11907         (value_ptr, value_vec): Remove typedefs.
11908         (class thread_info) <stack_temporaries_enabled>: Now bool.
11909         <stack_temporaries>: Now a std::vector.
11910         (thread_stack_temporaries_enabled_p)
11911         (value_in_thread_stack_temporaries): Return bool.
11912
11913 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11914
11915         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11916         (getpkt_or_notif_sane_1): Likewise.
11917
11918 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11919
11920         * build-id.c (build_id_to_debug_bfd): Use std::string.
11921
11922 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11923
11924         * build-id.c (find_separate_debug_file_by_buildid): Return
11925         std::string.
11926         * build-id.h (find_separate_debug_file_by_buildid): Return
11927         std::string.
11928         * coffread.c (coff_symfile_read): Adjust to std::string.
11929         * elfread.c (elf_symfile_read): Adjust to std::string.
11930         * symfile.c (separate_debug_file_exists): Change parameter to
11931         std::string.
11932         (find_separate_debug_file): Return std::string.
11933         (find_separate_debug_file_by_debuglink): Return std::string.
11934         * symfile.h (find_separate_debug_file_by_debuglink): Return
11935         std::string.
11936
11937 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11938
11939         * common/xml-utils.c (xml_escape_text): Move code to...
11940         (xml_escape_text_append): ... this new function.
11941         * common/xml-utils.h (xml_escape_text_append): New declaration.
11942         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11943         New function.
11944         (_initialize_xml_utils): register test_xml_escape_text_append as
11945         a selftest.
11946
11947 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11948
11949         * defs.h: Remove MAX_REGISTER_SIZE.
11950         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11951         asserts.
11952         * python/py-unwind.c (pyuw_sniffer): Likewise.
11953
11954 2018-03-07  Tom Tromey  <tom@tromey.com>
11955
11956         * linux-tdep.c (linux_info_proc): Update.
11957         * target.h (struct target_ops) <to_fileio_readlink>: Return
11958         optional<string>.
11959         (target_fileio_readlink): Return optional<string>.
11960         * remote.c (remote_hostio_readlink): Return optional<string>.
11961         * inf-child.c (inf_child_fileio_readlink): Return
11962         optional<string>.
11963         * target.c (target_fileio_readlink): Return optional<string>.
11964
11965 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11966
11967         * regcache.c (cooked_read_test): Add riscv to the list of
11968         architectures that have a save_reggroup.
11969
11970 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11971
11972         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11973         value is not a dynamic class object.
11974
11975 2018-03-06  Tom Tromey  <tom@tromey.com>
11976
11977         * rust-exp.y: Formatting fixes.
11978
11979 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11980
11981         * riscv-tdep.c (riscv_register_name): Remove target description
11982         support.
11983         (riscv_gdbarch_init): Remove target description check.
11984
11985 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11986
11987         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11988         comment.
11989         * riscv-tdep.h: Likewise.
11990
11991 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11992
11993         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11994         (riscv_pseudo_register_write): Delete.
11995         (riscv_gdbarch_init): Remove all use of pseudo registers.
11996
11997 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11998
11999         * record-btrace.c (btrace_print_lines): Replace cleanup
12000         parameter with RAII equivalents.
12001         (btrace_insn_history): Replace cleanup with RAII equivalents.
12002         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12003         make_cleanup_ui_out_tuple_begin_end): Remove.
12004         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12005         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12006         make_cleanup_ui_out_list_begin_end): Remove.
12007
12008 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12009
12010         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12011         parameter types to std::vector.  Use bool.
12012         (record_btrace_wait): Replace VEC(tp_t) with
12013         std::vector<thread_info *>.
12014         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12015
12016 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12017
12018         * record-btrace.c (record_btrace_disable_callback): Remove.
12019         (struct scoped_btrace_disable): New.
12020         (record_btrace_open): Use scoped_btrace_disable.
12021
12022 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12023
12024         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12025         reading values from registers.
12026
12027 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12028
12029         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12030         where appropriate.
12031
12032 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12033
12034         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12035         change parameter type.  Use GDB's print functions, and use
12036         core_addr_to_string where appropriate.
12037         (riscv_push_dummy_call): Use core_addr_to_string where
12038         appropriate, update call to riscv_print_arg_location, and reindent
12039         a few lines.
12040         (riscv_return_value): Update call to riscv_print_arg_location.
12041
12042 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12043             Tim Newsome <tim@sifive.com>
12044             Albert Ou <a0u@eecs.berkeley.edu>
12045             Darius Rad <darius@bluespec.com>
12046
12047         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12048         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12049         (ALLDEPFILES): Add riscv-tdep.c
12050         * configure.tgt: Add riscv support.
12051         * riscv-tdep.c: New file.
12052         * riscv-tdep.h: New file.
12053         * NEWS: Mention new target.
12054         * MAINTAINERS: Add entry for riscv.
12055
12056 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12057
12058         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12059         fields within aggregates.
12060
12061 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12062
12063         * record-btrace.c (btrace_print_lines): Change type of flags to
12064         gdb_disassembly_flags.
12065
12066 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12067
12068         * fbsd-nat.c: Include "inf-ptrace.h".
12069         (USE_SIGTRAP_SIGINFO): Conditionally define.
12070         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12071         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12072         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12073         function.
12074         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12075         Likewise.
12076         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12077         Likewise.
12078         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12079         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12080         "supports_stopped_by_hw_breakpoint" target methods.
12081
12082 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12083
12084         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12085         * fbsd-nat.c (debug_fbsd_nat): New variable.
12086         (show_fbsd_nat_debug): New function.
12087         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12088         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12089
12090 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12091
12092         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12093         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12094         prototype.
12095         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12096         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12097         method.
12098
12099 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12100
12101         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12102         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12103
12104 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12105
12106         * charset.c (struct charset_vector): New.
12107         (charsets): Change type to charset_vector.
12108         (find_charset_names): Adjust.
12109         (add_one): Adjust.
12110         (_initialize_charset): Adjust.
12111
12112 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12113
12114         * progspace.h (struct program_space) <deleted_solibs>: Change
12115         type to std::vector<std::string>.
12116         * progspace.c (clear_program_space_solib_cache): Adjust.
12117         * breakpoint.c (print_solib_event): Adjust.
12118         (check_status_catch_solib): Adjust.
12119         * solib.c (update_solib_list): Adjust.
12120         * ui-out.h (class ui_out) <field_string>: New overload.
12121         * ui-out.c (ui_out::field_string): New overload.
12122
12123 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12124
12125         * progspace.h (struct program_space): Add constructor and
12126         destructor, initialize fields.
12127         (add_program_space): Remove.
12128         * progspace.c (add_program_space): Rename to...
12129         (program_space::program_space): ... this.
12130         (release_program_space): Rename to...
12131         (program_space::~program_space): ... this.
12132         (delete_program_space): Use delete to delete program_space.
12133         (initialize_progspace): Use new to allocate program_space.
12134         * inferior.c (add_inferior_with_spaces): Likewise.
12135         (clone_inferior_command): Likewise.
12136         * infrun.c (follow_fork_inferior): Likewise.
12137         (handle_vfork_child_exec_or_exit): Likewise.
12138
12139 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12140
12141         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12142         (delim_string_to_char_ptr_vec): Return std::vector of
12143         gdb::unique_xmalloc_ptr.
12144         (dirnames_to_char_ptr_vec_append): Take std::vector of
12145         gdb::unique_xmalloc_ptr.
12146         (dirnames_to_char_ptr_vec): Return std::vector of
12147         gdb::unique_xmalloc_ptr.
12148         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12149         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12150         (delim_string_to_char_ptr_vec): Return an std::vector of
12151         gdb::unique_xmalloc_ptr, adjust the code.
12152         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12153         gdb::unique_xmalloc_ptr, adjust the code.
12154         (dirnames_to_char_ptr_vec): Return an std::vector of
12155         gdb::unique_xmalloc_ptr, adjust the code.
12156         * auto-load.c (auto_load_safe_path_vec): Change type to
12157         std::vector of gdb::unique_xmalloc_ptr.
12158         (auto_load_expand_dir_vars): Return an std::vector of
12159         gdb::unique_xmalloc_ptr, adjust the code.
12160         (auto_load_safe_path_vec_update): Adjust.
12161         (filename_is_in_auto_load_safe_path_vec): Adjust.
12162         (auto_load_objfile_script_1): Adjust.
12163         * build-id.c (build_id_to_debug_bfd): Adjust.
12164         * linux-thread-db.c (thread_db_load_search): Adjust.
12165         * source.c (add_path): Adjust.
12166         (openp): Adjust.
12167         * symfile.c (find_separate_debug_file): Adjust.
12168         * utils.c (do_free_char_ptr_vec): Remove.
12169         (make_cleanup_free_char_ptr_vec): Remove.
12170
12171 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12172
12173         PR gdb/22907
12174         * common/pathstuff.c: Conditionally include "<windows.h>".
12175
12176 2018-03-01  Georg Sauthoff  <mail@georg.so>
12177
12178         PR gdb/22888
12179         * gcore.in: Quote variables and switch interpreter to bash.
12180
12181 2018-03-01  Tom Tromey  <tom@tromey.com>
12182
12183         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12184         assertion.  Add assertion for discriminant_index.
12185         (quirk_rust_enum): Use correct base type name in univariant case.
12186
12187 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12188
12189         * record.c (get_call_history_modifiers): Return a
12190         record_print_flags.
12191         (cmd_record_call_history): Adjust.
12192         * record-btrace.c (record_btrace_call_history): Adjust.
12193         (record_btrace_call_history_range): Adjust.
12194         (record_btrace_call_history_from): Adjust.
12195         * target-debug.h (target_debug_print_record_print_flags): New.
12196         * target-delegates.c: Re-generate.
12197         * target.c (target_call_history): Change flags type.
12198         (target_call_history_from): Likewise.
12199         (target_call_history_range): Likewise.
12200         * target.h (struct target_ops) <target_call_history>: Likewise.
12201         (target_call_history_from): Likewise.
12202         (target_call_history_range): Likewise.
12203
12204 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12205             Simon Marchi  <simon.marchi@polymtl.ca>
12206
12207         * common/common-utils.c: Include "sys/stat.h".
12208         (is_regular_file): Move here from "source.c"; change return
12209         type to "bool".
12210         * common/common-utils.h (is_regular_file): New prototype.
12211         * common/pathstuff.c (contains_dir_separator): New function.
12212         * common/pathstuff.h (contains_dir_separator): New prototype.
12213         * source.c: Don't include "sys/stat.h".
12214         (is_regular_file): Move to "common/common-utils.c".
12215
12216 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12217
12218         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12219         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12220         * auto-load.c: Include "common/pathstuff.h".
12221         * common/common-def.h (current_directory): Move here.
12222         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12223         function.
12224         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12225         prototype.
12226         * common/pathstuff.c: New file.
12227         * common/pathstuff.h: New file.
12228         * compile/compile.c: Include "common/pathstuff.h".
12229         * defs.h (current_directory): Move to "common/common-defs.h".
12230         * dwarf2read.c: Include "common/pathstuff.h".
12231         * exec.c: Likewise.
12232         * guile/scm-safe-call.c: Likewise.
12233         * linux-thread-db.c: Likewise.
12234         * main.c: Likewise.
12235         * nto-tdep.c: Likewise.
12236         * objfiles.c: Likewise.
12237         * source.c: Likewise.
12238         * symtab.c: Likewise.
12239         * utils.c: Include "common/pathstuff.h".
12240         (gdb_realpath): Move to "common/pathstuff.c".
12241         (gdb_realpath_keepfile): Likewise.
12242         (gdb_abspath): Likewise.
12243         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12244         (gdb_realpath_keepfile): Likewise.
12245         (gdb_abspath): Likewise.
12246
12247 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12248
12249         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12250         wildcard process pid for super_resume for kernels with a
12251         specific bug.
12252
12253 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12254
12255         * compile/compile.c (get_args): Add additional comments
12256         explaining function.
12257
12258 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12259             Tom Tromey  <tom@tromey.com>
12260
12261         * target.h (memory_write_request_s): Remove typedef.  Don't define
12262         VEC.
12263         (target_write_memory_blocks): Change argument to std::vector.
12264         (struct memory_write_request): Add constructor.
12265         * target-memory.c (compare_block_starting_address): Return bool.
12266         Change argument types.
12267         (claim_memory): Change arguments to use std::vector.
12268         (split_regular_and_flash_blocks, blocks_to_erase)
12269         (compute_garbled_blocks): Likewise.
12270         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12271         (target_write_memory_blocks): Change argument to std::vector.
12272         * symfile.c (struct load_section_data): Add constructor and
12273         destructor.  Use std::vector for "requests".
12274         (struct load_progress_data): Add initializers.
12275         (load_section_callback): Update.  Use "new".
12276         (clear_memory_write_data): Remove.
12277         (generic_load): Update.
12278
12279 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12280
12281         * arch/aarch64.h: Use common/tdesc.h.
12282
12283 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12284
12285         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12286         architecture with a 64-bit ABI.
12287
12288 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12289
12290         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12291         ahead of target description loading.
12292
12293 2018-02-26  Tom Tromey  <tom@tromey.com>
12294
12295         * stack.c (backtrace_command_1): Update.
12296         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12297         of "flags".
12298         * python/py-framefilter.c (py_print_frame)
12299         (gdbpy_apply_frame_filter): Change type of "flags".
12300         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12301         of "flags".
12302         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12303         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12304         * extension.h (enum frame_filter_flag): Rename from
12305         frame_filter_flags.
12306         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12307         (apply_ext_lang_frame_filter): Change type of "flags".
12308         * extension.c (apply_ext_lang_frame_filter): Change type of
12309         "flags".
12310         * extension-priv.h (struct extension_language_ops)
12311         <apply_frame_filter>: Change type of "flags".
12312
12313 2018-02-26  Tom Tromey  <tom@tromey.com>
12314
12315         PR python/16497:
12316         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12317         off-by-one in py_end computation.
12318         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12319         PRINT_MORE_FRAMES.
12320         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12321         constant.
12322
12323 2018-02-26  Tom Tromey  <tom@tromey.com>
12324
12325         * dwarf2read.c (struct variant_field): New.
12326         (struct nextfield) <variant>: New field.
12327         (dwarf2_add_field): Handle DW_TAG_variant_part.
12328         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12329         discriminated union.
12330         (read_structure_type): Handle DW_TAG_variant_part.
12331         (handle_struct_member_die): New function, extracted from
12332         process_structure_scope.  Handle DW_TAG_variant.
12333         (process_structure_scope): Handle discriminated unions.  Call
12334         handle_struct_member_die.
12335
12336 2018-02-26  Tom Tromey  <tom@tromey.com>
12337
12338         * rust-lang.h (rust_last_path_segment): Declare.
12339         * rust-lang.c (rust_last_path_segment): Now public.  Change
12340         contract.
12341         (struct disr_info): Remove.
12342         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12343         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12344         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12345         (rust_enum_p, rust_enum_variant): New function.
12346         (rust_underscore_fields): Remove "offset" parameter.
12347         (rust_print_enum): New function.
12348         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12349         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12350         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12351         enums.
12352         (rust_internal_print_type): New function, from rust_print_type.
12353         Remove enum code.
12354         (rust_print_type): Call rust_internal_print_type.
12355         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12356         Update enum handling.
12357         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12358         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12359         (rust_union_quirks): New functions.
12360         (process_full_comp_unit, process_full_type_unit): Call
12361         rust_union_quirks.
12362         (process_structure_scope): Update rust_unions if necessary.
12363
12364 2018-02-26  Tom Tromey  <tom@tromey.com>
12365
12366         * value.h (value_union_variant): Declare.
12367         * valops.c (value_union_variant): New function.
12368         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12369         (struct discriminant_info): New.
12370         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12371         enumerator.
12372         (struct main_type) <flag_discriminated_union>: New field.
12373
12374 2018-02-26  Tom Tromey  <tom@tromey.com>
12375
12376         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12377         unittests/unpack-selftests.c.
12378         * unittests/unpack-selftests.c: New file.
12379         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12380
12381 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12382
12383         * dwarf2read.c (struct partial_die_info) <read>: New method.
12384         (read_partial_die): Remove the declaration.
12385         (load_partial_dies): Update.
12386         (partial_die_info::partial_die_info):
12387         (read_partial_die): Change it to partial_die_info::read.
12388
12389 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12390
12391         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12392         (fixup_partial_die): Remove declaration.
12393         (scan_partial_symbols): Update.
12394         (partial_die_parent_scope): Likewise.
12395         (partial_die_full_name): Likewise.
12396         (fixup_partial_die): Change it to partial_die_info::fixup.
12397
12398 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12399
12400         * dwarf2read.c (read_partial_die): Update the declaration.
12401         (load_partial_dies): Caller update.
12402         (read_partial_die): Remove one argument abbrev_len.
12403
12404 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12405
12406         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12407         assignment operator.
12408         (load_partial_dies): Use ctor and copy ctor.
12409         (read_partial_die): Update.
12410         (dwarf2_cu::find_partial_die): Use ctor.
12411
12412 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12413
12414         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12415         (find_partial_die_in_comp_unit): Change it to
12416         dwarf2_cu::find_partial_die.
12417         (find_partial_die): Update.
12418
12419 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12420
12421         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12422         is NULL.
12423
12424 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12425
12426         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12427
12428 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12429
12430         * arch/amd64.h: Use common/tdesc.h.
12431         * arch/i386.c: Likewise.
12432         * arch/i386.h: Likewise.
12433         * arch/tic6x.c: Likewise.
12434         * arch/tdesc.h: Move file from here...
12435         * common/tdesc.h: ...to here.
12436         * features/aarch64-core.c: Regenerate.
12437         * features/aarch64-fpu.c: Regenerate.
12438         * features/i386/32bit-avx.c: Regenerate.
12439         * features/i386/32bit-avx512.c: Regenerate.
12440         * features/i386/32bit-core.c: Regenerate.
12441         * features/i386/32bit-linux.c: Regenerate.
12442         * features/i386/32bit-mpx.c: Regenerate.
12443         * features/i386/32bit-pkeys.c: Regenerate.
12444         * features/i386/32bit-sse.c: Regenerate.
12445         * features/i386/64bit-avx.c: Regenerate.
12446         * features/i386/64bit-avx512.c: Regenerate.
12447         * features/i386/64bit-core.c: Regenerate.
12448         * features/i386/64bit-linux.c: Regenerate.
12449         * features/i386/64bit-mpx.c: Regenerate.
12450         * features/i386/64bit-pkeys.c: Regenerate.
12451         * features/i386/64bit-segments.c: Regenerate.
12452         * features/i386/64bit-sse.c: Regenerate.
12453         * features/i386/x32-core.c: Regenerate.
12454         * features/tic6x-c6xp.c: Regenerate.
12455         * features/tic6x-core.c: Regenerate.
12456         * features/tic6x-gp.c: Regenerate.
12457         * target-descriptions.c: Use common/tdesc.h.
12458         * target-descriptions.h: Likewise.
12459
12460 2018-02-24  Tom Tromey  <tom@tromey.com>
12461
12462         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12463         (try_thread_db_load_from_dir, thread_db_load_search): Use
12464         std::string.
12465         (info_auto_load_libthread_db_compare): Return bool.  Change
12466         argument types.
12467         (info_auto_load_libthread_db): Use std::vector, std::string.
12468         Remove cleanups.
12469
12470 2018-02-24  Tom Tromey  <tom@tromey.com>
12471
12472         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12473         std::string.
12474         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12475         std::string*.
12476         * gdbarch.c: Rebuild.
12477         * gdbarch.h: Rebuild.
12478         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12479         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12480         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12481         std::string*.
12482
12483 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12484
12485         * gdbtypes.h (sect_offset): Change type to uint64_t.
12486         (sect_offset_str): New function.
12487         * dwarf2read.c (create_addrmap_from_aranges): Use
12488         sect_offset_str.
12489         (error_check_comp_unit_head): Likewise.
12490         (create_debug_type_hash_table): Likewise.
12491         (read_cutu_die_from_dwo): Likewise.
12492         (init_cutu_and_read_dies): Likewise.
12493         (init_cutu_and_read_dies_no_follow): Likewise.
12494         (process_psymtab_comp_unit_reader): Likewise.
12495         (partial_die_parent_scope): Likewise.
12496         (peek_die_abbrev): Likewise.
12497         (process_queue): Likewise.
12498         (dwarf2_physname): Likewise.
12499         (read_namespace_alias): Likewise.
12500         (read_import_statement): Likewise.
12501         (create_dwo_cu_reader): Likewise.
12502         (create_cus_hash_table): Likewise.
12503         (lookup_dwo_cutu): Likewise.
12504         (inherit_abstract_dies): Likewise.
12505         (read_func_scope): Likewise.
12506         (read_call_site_scope): Likewise.
12507         (dwarf2_add_member_fn): Likewise.
12508         (read_common_block): Likewise.
12509         (read_module_type): Likewise.
12510         (read_typedef): Likewise.
12511         (read_subrange_type): Likewise.
12512         (load_partial_dies): Likewise.
12513         (read_partial_die): Likewise.
12514         (find_partial_die): Likewise.
12515         (read_str_index): Likewise.
12516         (dwarf2_string_attr): Likewise.
12517         (build_error_marker_type): Likewise.
12518         (lookup_die_type): Likewise.
12519         (dump_die_shallow): Likewise.
12520         (follow_die_ref): Likewise.
12521         (dwarf2_fetch_die_loc_sect_off): Likewise.
12522         (dwarf2_fetch_constant_bytes): Likewise.
12523         (follow_die_sig): Likewise.
12524         (get_signatured_type): Likewise.
12525         (get_DW_AT_signature_type): Likewise.
12526         (dwarf2_find_containing_comp_unit): Likewise.
12527         (set_die_type): Likewise.
12528
12529 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12530
12531         * arch/aarch64.c: Include "common-defs.h".
12532         * arch/amd64.c: Likewise.
12533         * arch/i386.c: Likewise.
12534
12535 2018-02-21  Tom Tromey  <tom@tromey.com>
12536
12537         * value.h: (extract_field_op): Update.
12538         * eval.c (extract_field_op): Return a const char *.
12539         * expression.h (parse_expression_for_completion): Update.
12540         * completer.c (complete_expression): Update.
12541         (add_struct_fields): Make fieldname const.
12542         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12543         (mark_completion_tag, parse_exp_in_context_1): Update.
12544         (parse_expression_for_completion): Change "name" to
12545         unique_xmalloc_ptr*.
12546
12547 2018-02-21  Tom Tromey  <tom@tromey.com>
12548
12549         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12550
12551 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12552
12553         * avr-tdep.c (avr_read_pc): Change parameter type to
12554         readable_regcache.
12555         * gdbarch.sh (read_pc): Likewise.
12556         * gdbarch.c: Re-generated.
12557         * gdbarch.h: Re-generated.
12558         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12559         readable_regcache.
12560         * ia64-tdep.c (ia64_read_pc): Likewise.
12561         * mips-tdep.c (mips_read_pc): Likewise.
12562         * spu-tdep.c (spu_read_pc): Likewise.
12563
12564 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12565
12566         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12567         * regcache-dump.c: New file.
12568         * regcache.c: Move register_dump to regcache-dump.c.
12569         (maintenance_print_registers): Likewise.
12570         (maintenance_print_raw_registers): Likewise.
12571         (maintenance_print_cooked_registers): Likewise.
12572         (maintenance_print_register_groups): Likewise.
12573         (maintenance_print_remote_registers): Likewise.
12574         (_initialize_regcache): Likewise.
12575         * regcache.h (register_dump): Moved from regcache.c.
12576
12577 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12578
12579         * regcache.c (regcache::regcache): Update.
12580         (regcache::invalidate): Move it to detached_regcache::invalidate.
12581         (get_thread_arch_aspace_regcache): Update.
12582         (regcache::raw_update): Update.
12583         (regcache::cooked_read): Remove some code.
12584         (regcache::cooked_read_value): Likewise.
12585         (regcache::raw_write): Remove assert on m_readonly_p.
12586         (regcache::raw_supply_integer): Move it to
12587         detached_regcache::raw_supply_integer.
12588         (regcache::raw_supply_zeroed): Likewise.
12589         * regcache.h (detached_regcache) <raw_supply_integer>: New
12590         declaration.
12591         <raw_supply_zeroed, invalidate>: Likewise.
12592         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12593         <invalidate>: Likewise.
12594         <m_readonly_p>: Removed.
12595
12596 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12597
12598         * infcmd.c (get_return_value): Let stop_regs point to
12599         get_current_regcache.
12600         * regcache.c (regcache::regcache): Remove.
12601         (register_dump_reg_buffer): New class.
12602         (regcache_print): Adjust.
12603         * regcache.h (regcache): Remove constructors.
12604
12605 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12606
12607         * regcache.c (class register_dump): New class.
12608         (register_dump_regcache, register_dump_none): New class.
12609         (register_dump_remote, register_dump_groups): New class.
12610         (regcache_print): Update.
12611         * regcache.h (regcache_dump_what): Move it to regcache.c.
12612         (regcache) <dump>: Remove.
12613
12614 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12615
12616         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12617          reg_buffer_rw *.
12618         (jit_unwind_reg_set_impl): Call raw_supply.
12619         (jit_frame_sniffer): Use reg_buffer_rw.
12620         * record-full.c (record_full_core_regbuf): Change its type.
12621         (record_full_core_open_1): Use reg_buffer_rw.
12622         (record_full_close): Likewise.
12623         (record_full_core_fetch_registers): Use regcache->raw_supply.
12624         (record_full_core_store_registers): Likewise.
12625         * regcache.c (regcache::get_register_status): Move it to
12626         reg_buffer.
12627         (regcache_raw_set_cached_value): Remove.
12628         (regcache::raw_set_cached_value): Remove.
12629         (regcache::raw_write): Call raw_supply.
12630         (regcache::raw_supply): Move it to reg_buffer_rw.
12631         * regcache.h (regcache_raw_set_cached_value): Remove.
12632         (reg_buffer_rw): New class.
12633
12634 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12635
12636         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12637         readonly_detached_regcache.
12638         (dummy_frame_prev_register): Use regcache->cooked_read.
12639         * frame.c (frame_save_as_regcache): Change return type.
12640         (frame_pop): Update.
12641         * frame.h (frame_save_as_regcache): Update declaration.
12642         * inferior.h (get_infcall_suspend_state_regcache): Update
12643         declaration.
12644         * infrun.c (infcall_suspend_state) <registers>: use
12645         readonly_detached_regcache.
12646         (save_infcall_suspend_state): Don't use regcache_dup.
12647         (get_infcall_suspend_state_regcache): Change return type.
12648         * linux-fork.c (struct fork_info) <savedregs>: Change to
12649         readonly_detached_regcache.
12650         <pc>: New field.
12651         (fork_save_infrun_state): Don't use regcache_dup.
12652         (info_checkpoints_command): Adjust.
12653         * mi/mi-main.c (register_changed_p): Update declaration.
12654         (mi_cmd_data_list_changed_registers): Use
12655         readonly_detached_regcache.
12656         (register_changed_p): Change parameter type to
12657         readonly_detached_regcache.
12658         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12659         readonly_detached_regcache.
12660         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12661         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12662         New.
12663         (regcache::save): Move it to reg_buffer.
12664         (regcache::restore): Change parameter type.
12665         (regcache_dup): Remove.
12666         * regcache.h (reg_buffer) <save>: New method.
12667         (readonly_detached_regcache): New class.
12668         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12669         readonly_detached_regcache.
12670         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12671
12672 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12673
12674         * frame.c (frame_save_as_regcache): Use regcache method save.
12675         (frame_pop): Use regcache method restore.
12676         * infrun.c (restore_infcall_suspend_state): Likewise.
12677         * linux-fork.c (fork_load_infrun_state): Likewise.
12678         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12679         save.
12680         * regcache.c (regcache_save): Remove.
12681         (regcache::restore): More asserts.
12682         (regcache_cpy): Remove.
12683         * regcache.h (regcache_save): Remove the declaration.
12684         (regcache::restore): Move from private to public.
12685         Remove the friend declaration of regcache_cpy.
12686         (regcache_cpy): Remove declaration.
12687
12688 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12689
12690         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12691         parameter type to 'readable_regcache *'.
12692         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12693         * arm-tdep.c (arm_neon_quad_read): Likewise.
12694         (arm_pseudo_read): Likewise.
12695         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12696         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12697         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12698         * gdbarch.c: Re-generated.
12699         * gdbarch.h: Re-generated.
12700         * gdbarch.sh (pseudo_register_read): Change parameter type to
12701         'readable_regcache *'.
12702         (pseudo_register_read_value): Likewise.
12703         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12704         (h8300_pseudo_register_read): Likewise.
12705         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12706         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12707         (i386_pseudo_register_read_into_value): Likewise.
12708         (i386_pseudo_register_read_value): Likewise.
12709         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12710         declaration.
12711         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12712         * m32c-tdep.c (m32c_raw_read): Likewise.
12713         (m32c_read_flg): Likewise.
12714         (m32c_banked_register): Likewise.
12715         (m32c_banked_read): Likewise.
12716         (m32c_sb_read): Likewise.
12717         (m32c_part_read): Likewise.
12718         (m32c_cat_read): Likewise.
12719         (m32c_r3r2r1r0_read): Likewise.
12720         (m32c_pseudo_register_read): Likewise.
12721         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12722         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12723         (mep_pseudo_cr64_read): Likewise.
12724         (mep_pseudo_register_read): Likewise.
12725         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12726         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12727         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12728         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12729         (regcache::cooked_read): Likewise.
12730         (regcache::cooked_read_value): Likewise.
12731         (regcache_cooked_read_signed):
12732         (regcache::cooked_read): Likewise.
12733         * regcache.h (readable_regcache): New class.
12734         (regcache): Inherit readable_regcache.  Move some methods to
12735         readable_regcache.
12736         * rl78-tdep.c (rl78_pseudo_register_read): Change
12737         parameter type to 'readable_regcache *'.
12738         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12739         (e500_pseudo_register_read): Change parameter type to
12740         'readable_regcache *'.
12741         (dfp_pseudo_register_read): Likewise.
12742         (vsx_pseudo_register_read): Likewise.
12743         (efpr_pseudo_register_read): Likewise.
12744         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12745         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12746         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12747         (sh64_pseudo_register_read): Likewise.
12748         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12749         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12750         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12751         (spu_pseudo_register_read): Likewise.
12752         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12753         (xtensa_pseudo_register_read): Likewise.
12754
12755 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12756
12757         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12758         (regcache::arch): Move it to reg_buffer::arch.
12759         (regcache::register_buffer): Likewise.
12760         (regcache::assert_regnum): Likewise.
12761         (regcache::num_raw_registers): Likewise.
12762         * regcache.h (reg_buffer): New class.
12763         (regcache): Inherit reg_buffer.
12764
12765 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12766
12767         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12768         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12769
12770 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12771
12772         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12773
12774 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12775
12776         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12777         (SFILES): Remove common/*.c files.
12778         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12779         * common/common.host: Add common reference.
12780         * configure.ac: Likewise.
12781         * configure: Regenerate.
12782
12783 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12784
12785         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12786         (block_initialize_namespace): Use new.
12787         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12788         (dwarf2_free_objfile): Use delete.
12789         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12790         (copy_type_recursive): Use new.
12791         * gdb_obstack.h (allocate_on_obstack): New.
12792
12793 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12794
12795         PR gdb/22849
12796         * inferior.c (exit_inferior_1): Reset inf->control.
12797
12798 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12799
12800         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12801         declaration.
12802
12803 2018-02-14  Pedro Alves  <palves@redhat.com>
12804
12805         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12806         frame_cleanup_after_sniffer on exception.
12807
12808 2018-02-14  Tom Tromey  <tom@tromey.com>
12809
12810         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12811         const.
12812         (solib_bfd_open): Make pathname const.
12813         * solib.c (solib_bfd_open): Make pathname const.
12814         * solib-spu.c (spu_bfd_fopen): Make name const.
12815         (spu_bfd_open): Make pathname const.
12816         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12817         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12818
12819 2018-02-14  Tom Tromey  <tom@tromey.com>
12820
12821         * symfile.c (symfile_bfd_open): Update.
12822         * source.h (openp, source_full_path_of, find_and_open_source):
12823         Change argument type to unique_xmalloc_ptr.
12824         * source.c (openp): Take a unique_xmalloc_ptr.
12825         (source_full_path_of, find_and_open_source): Likewise.
12826         (open_source_file, symtab_to_fullname): Update.
12827         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12828         unique_xmalloc_ptr.
12829         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12830         (exec_file_find): Update.
12831         * psymtab.c (psymtab_to_fullname): Update.
12832         * nto-tdep.h (nto_find_and_open_solib): Update.
12833         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12834         unique_xmalloc_ptr.
12835         * exec.c (exec_file_attach): Update.
12836         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12837         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12838
12839 2018-02-14  Tom Tromey  <tom@tromey.com>
12840
12841         * solib.c: Include source.h.
12842         * nto-tdep.c: Include source.h.
12843         * mi/mi-cmd-env.c: Include source.h.
12844         * infcmd.c: Include source.h.
12845         * exec.c: Include source.h.
12846         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12847         (add_path, directory_switch, source_path, init_source_path): Move
12848         declarations...
12849         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12850         (add_path, directory_switch, source_path, init_source_path):
12851         ...here.
12852
12853 2018-02-14  Tom Tromey  <tom@tromey.com>
12854
12855         * solist.h (exec_file_find, solib_find): Return
12856         unique_xmalloc_ptr.
12857         (solib_bfd_fopen): Take a const char *.
12858         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12859         (exec_file_find, solib_find): Likewise.
12860         (solib_bfd_fopen): Do not take ownership of "pathname".
12861         (solib_bfd_open): Use unique_xmalloc_ptr.
12862         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12863         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12864         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12865         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12866
12867 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12868
12869         * ada-lang.c (name_match_type_from_name): Remove reference to
12870         ada_name_for_lookup in function's documentation.
12871         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12872
12873 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12874
12875         * defs.h (enum openp_flags): New enum.
12876         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12877         Move to enum openp_flags.
12878         (openp_flags): New enum flags.
12879         (openp): Change parameter type to openp_flags.
12880         * source.c (openp): Change parameter type to openp_flags.
12881         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12882         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12883
12884 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12885
12886         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12887         per-command.
12888
12889 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12890
12891         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12892         into...
12893         (class dwarf2_queue_guard): ...the destructor of this new class.
12894         (dw2_do_instantiate_symtab): Create instance of the new class
12895         dwarf2_queue_guard, remove cleanup.
12896
12897 2018-02-09  Tom Tromey  <tom@tromey.com>
12898
12899         * source.c (find_source_lines): Don't reference past the end of
12900         the vector.
12901
12902 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12903
12904         * remote.c (remote_btrace_maybe_reopen): Change error message.
12905         * btrace.c (btrace_enable): Likewise.
12906         (parse_xml_btrace): Likewise.
12907         (parse_xml_btrace_conf): Likewise.
12908
12909 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12910
12911         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12912         (linux_enable_pt, linux_enable_bts): Call
12913         diagnose_perf_event_open_fail.
12914
12915 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12916
12917         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12918         Remove parameter and change return type.  Update callers.  Move it.
12919         (linux_enable_bts, linux_enable_pt): Improve error message.
12920         (linux_enable_pt): Remove zero buffer size check.
12921         (linux_enable_btrace): Improve error messages.  Remove NULL return
12922         check.
12923
12924 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12925
12926         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12927         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12928         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12929         (linux_supports_pt, linux_supports_btrace): Remove.
12930         (linux_enable_bts): Call cpu_supports_bts.
12931         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12932         * remote.c (remote_supports_btrace): Remove.
12933         (init_remote_ops): Remove remote_supports_btrace.
12934         * target-delegates.c: Regenerated.
12935         * target.c (target_supports_btrace): Remove.
12936         * target.h (target_ops) <to_supports_btrace>: Remove
12937         (target_supports_btrace): Remove.
12938         * x86-linux-nat.c (x86_linux_create_target): Remove
12939         linux_supports_btrace.
12940
12941 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12942
12943         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12944         btrace failed.
12945         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12946         exception and use message in own exception.
12947
12948 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12949
12950         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12951         (perf_event_pt_event_type): Use gdb_file_up.
12952         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12953         scoped_fd, and scoped_mmap.
12954
12955 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12956
12957         * common/scoped_mmap.h: New.
12958         * unittests/scoped_mmap-selftest.c: New.
12959         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12960         unittests/scoped_mmap-selftest.c.
12961
12962 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12963
12964         * common/scoped_fd.h: New.
12965         * unittests/scoped_fd-selftest.c: New.
12966         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12967         unittests/scoped_fd-selftest.c.
12968
12969 2018-02-09  Tom Tromey  <tom@tromey.com>
12970
12971         * auto-load.c (auto_load_section_scripts): Use
12972         gdb::unique_xmalloc_ptr.
12973
12974 2018-02-09  Tom Tromey  <tom@tromey.com>
12975
12976         * auto-load.c (execute_script_contents): Use std::string.
12977
12978 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12979
12980         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12981         Python function, rather than a new command.
12982
12983 2018-02-08  Tom Tromey  <tom@tromey.com>
12984
12985         * solib.c (solib_find_1): Use std::string.
12986         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12987
12988 2018-02-08  Tom Tromey  <tom@tromey.com>
12989
12990         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12991
12992 2018-02-08  Tom Tromey  <tom@tromey.com>
12993
12994         * source.c (find_source_lines): Use gdb::def_vector.
12995
12996 2018-02-08  Tom Tromey  <tom@tromey.com>
12997
12998         * macrocmd.c (struct temporary_macro_definition): New.
12999         (macro_define_command): Use temporary_macro_definition.  Remove
13000         cleanups.
13001         (free_macro_definition_ptr): Remove.
13002
13003 2018-02-08  Tom Tromey  <tom@tromey.com>
13004
13005         * macroexp.c (maybe_expand): Use std::string.
13006
13007 2018-02-08  Tom Tromey  <tom@tromey.com>
13008
13009         * macroexp.c (struct macro_buffer): Add initializers for some
13010         members.
13011         (init_buffer, init_shared_buffer, free_buffer)
13012         (free_buffer_return_text): Remove.
13013         (macro_buffer): New constructors.
13014         (~macro_buffer): New destructor.
13015         (macro_buffer::set_shared): New method.
13016         (macro_buffer::resize_buffer, macro_buffer::appendc)
13017         (macro_buffer::appendmem): Now methods, not free functions.
13018         (set_token, append_tokens_without_splicing, stringify)
13019         (macro_stringify): Update.
13020         (gather_arguments): Change return type.  Remove argc_p argument,
13021         add args_ptr argument.  Use std::vector.
13022         (substitute_args): Remove argc argument.  Accept std::vector.
13023         (expand): Update.  Use std::vector.
13024         (scan, macro_expand, macro_expand_next): Update.
13025
13026 2018-02-08  Tom Tromey  <tom@tromey.com>
13027
13028         * symtab.c (default_collect_symbol_completion_matches_break_on):
13029         Use unique_xmalloc_ptr.
13030         * macroscope.h: (sal_macro_scope, user_macro_scope)
13031         (default_macro_scope): Return unique_xmalloc_ptr.
13032         * macroscope.c (sal_macro_scope, user_macro_scope)
13033         (default_macro_scope): Return unique_xmalloc_ptr.
13034         * macroexp.h (macro_expand, macro_expand_once): Return
13035         unique_xmalloc_ptr.
13036         * macroexp.c (macro_expand, macro_expand_once): Return
13037         unique_xmalloc_ptr.
13038         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13039         (info_macro_command, info_macros_command): Use
13040         unique_xmalloc_ptr.
13041         * compile/compile-c-support.c (write_macro_definitions): Use
13042         unique_xmalloc_ptr.
13043         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13044
13045 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13046
13047         * value.c (value_static_field): Assign field type instead of
13048         containing type when returning an optimized out value.
13049
13050 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13051
13052         * ft32-tdep.c (ft32_read_pc): Remove.
13053         (ft32_write_pc): Remove.
13054         (ft32_gdbarch_init): Update.
13055         * m32r-tdep.c (m32r_read_pc): Remove.
13056         (m32r_gdbarch_init): Update.
13057         * mep-tdep.c (mep_read_pc): Remove.
13058         (mep_gdbarch_init): Update.
13059         * microblaze-tdep.c (microblaze_write_pc): Remove.
13060         (microblaze_gdbarch_init): Update.
13061         * mn10300-tdep.c (mn10300_read_pc): Remove.
13062         (mn10300_write_pc): Remove.
13063         (mn10300_gdbarch_init): Update.
13064         * moxie-tdep.c (moxie_read_pc): Remove.
13065         (moxie_write_pc): Remove.
13066         (moxie_gdbarch_init): Update.
13067
13068 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13069
13070         * expprint.c (print_subexp_standard): Handle
13071         OP_F77_UNDETERMINED_ARGLIST.
13072         (dump_subexp_body_standard): Likewise.
13073
13074 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13075
13076         * target-descriptions.c (tdesc_element_visitor) Add empty
13077         implementations.
13078         (tdesc_type): Move make_gdb_type from here.
13079         (tdesc_type_builtin): Likewise.
13080         (tdesc_type_vector): Likewise.
13081         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13082         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13083         (make_gdb_type_union): Likewise.
13084         (make_gdb_type_flags): Likewise.
13085         (make_gdb_type_enum): Likewise.
13086         (make_gdb_type): New function.
13087         (tdesc_register_type): Use static make_gdb_type.
13088
13089 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13090
13091         * infcmd.c (default_print_one_register_info): Align natural-format
13092         column values consistently one under another.
13093         (pad_to_column): New function.
13094
13095 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13096
13097         * dwarf2read.c (dwarf2_physname): Move commment.
13098
13099 2018-02-01  Leszek Swirski  <leszeks@google.com>
13100
13101         * varobj.c (varobj_formatted_print_options): Allow recursive
13102         pretty printing if pretty printing is enabled.
13103
13104 2018-02-01  Leszek Swirski  <leszeks@google.com>
13105
13106         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13107         names after a structop as a filename.
13108
13109 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13110
13111         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13112         (arm_record_coproc_data_proc): Likewise.
13113
13114 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13115
13116         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13117
13118 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13119
13120         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13121         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13122
13123 2018-01-31  Pedro Alves  <palves@redhat.com>
13124
13125         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13126         * inflow.c (child_terminal_save_inferior): Wrap reference to
13127         tcgetpgrp in HAVE_TERMIOS_H.
13128         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13129         _WIN32.
13130         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13131         always iterate over all inferiors.
13132         (gdbsim_cntrl_c): Adjust.
13133         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13134
13135 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13136
13137         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13138         index type is objfile-owned if the element type is as well.
13139
13140 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13141
13142         GDB 8.1 released.
13143
13144 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13145
13146         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13147         "features/s390x-linux64.c".
13148         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13149         s390_linux32 and s390x_linux64.
13150         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13151         default tdesc.
13152         * s390-tdep.c: Include "features/s390-linux32.c" and
13153         "features/s390x-linux64.c".
13154         (s390_tdesc_valid): Add check for tdesc_has_registers.
13155         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13156         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13157         tdesc_s390x_linux64.
13158         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13159         tdesc_s390x_linux64 to...
13160         * s390-tdep.h: ...here.
13161
13162 2018-01-30  Pedro Alves  <palves@redhat.com>
13163
13164         PR gdb/13211
13165         * config.in, configure: Regenerate.
13166         * configure.ac: Check for getpgid.
13167         * go32-nat.c (go32_pass_ctrlc): New.
13168         (go32_target): Install it.
13169         * inf-child.c (inf_child_target): Install
13170         child_terminal_save_inferior, child_pass_ctrlc and
13171         child_interrupt.
13172         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13173         (inf_ptrace_target): No longer install it.
13174         * infcmd.c (interrupt_target_1): Adjust.
13175         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13176         (child_interrupt): Declare.
13177         (inferior::terminal_state): New.
13178         * inflow.c (struct terminal_info): Update comments.
13179         (inferior_process_group): Delete.
13180         (terminal_is_ours): Delete.
13181         (gdb_tty_state): New.
13182         (child_terminal_init): Adjust.
13183         (is_gdb_terminal, sharing_input_terminal_1)
13184         (sharing_input_terminal): New functions.
13185         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13186         Set the process's actual process group in the foreground if
13187         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13188         mark terminal as the inferior's if not sharing GDB's terminal.
13189         Don't check attach_flag.
13190         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13191         pass down a target_terminal_state.
13192         (child_terminal_save_inferior): New, factored out from ...
13193         (child_terminal_ours_1): ... this.  Handle
13194         target_terminal_state::is_ours_for_output.
13195         (child_interrupt, child_pass_ctrlc): New.
13196         (inflow_inferior_exit): Clear the inferior's terminal_state.
13197         (copy_terminal_info): Copy the inferior's terminal state.
13198         (_initialize_inflow): Remove reference to terminal_is_ours.
13199         * inflow.h (inferior_process_group): Delete.
13200         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13201         * procfs.c (procfs_target): Don't install procfs_interrupt.
13202         (procfs_interrupt): Delete.
13203         * remote.c (remote_serial_quit_handler): Adjust.
13204         (remote_interrupt): Remove ptid parameter.  Adjust.
13205         * target-delegates.c: Regenerate.
13206         * target.c: Include "terminal.h".
13207         (target_terminal::terminal_state): Rename to ...
13208         (target_terminal::m_terminal_state): ... this.
13209         (target_terminal::init): Adjust.
13210         (target_terminal::inferior): Adjust to per-inferior
13211         terminal_state.
13212         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13213         (target_terminal::ours, target_terminal::ours_for_output): Use
13214         target_terminal_is_ours_kind.
13215         (target_interrupt): Remove ptid parameter.  Adjust.
13216         (default_target_pass_ctrlc): Adjust.
13217         * target.h (target_ops::to_terminal_save_inferior): New field.
13218         (target_ops::to_interrupt): Remove ptid_t parameter.
13219         (target_interrupt): Remove ptid_t parameter.  Update comment.
13220         (target_pass_ctrlc): Update comment.
13221         * target/target.h (target_terminal_state): New scoped enum,
13222         factored out of ...
13223         (target_terminal::terminal_state): ... here.
13224         (target_terminal::inferior): Update comments.
13225         (target_terminal::restore_inferior): New.
13226         (target_terminal::is_inferior, target_terminal::is_ours)
13227         (target_terminal::is_ours_for_output): Adjust.
13228         (target_terminal::scoped_restore_terminal_state): Adjust to
13229         rename, and call restore_inferior() instead of inferior().
13230         (target_terminal::scoped_restore_terminal_state::m_state): Change
13231         type.
13232         (target_terminal::terminal_state): Rename to ...
13233         (target_terminal::m_terminal_state): ... this and change type.
13234
13235 2018-01-30  Pedro Alves  <palves@redhat.com>
13236
13237         * linux-nat.c (wait_for_signal): New function.
13238         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13239         directly.
13240         (async_terminal_is_ours)
13241         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13242         (linux_nat_add_target): Don't override
13243         to_terminal_inferior/to_terminal_ours.
13244
13245 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13246
13247         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13248
13249 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13250
13251         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13252         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13253         dwarf2_per_objfile_free here.
13254         (dwarf2_per_objfile_free): Remove.
13255         (_initialize_dwarf2_read): Don't register
13256         dwarf2_per_objfile_free as a registry cleanup.
13257
13258 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13259
13260         Avoid compilation errors in MinGW native builds
13261
13262         The error is triggered by including python-internal.h, and the
13263         error message is:
13264
13265              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13266                       from build-gnulib/import/math.h:27,
13267                       from d:/usr/Python26/include/pyport.h:235,
13268                       from d:/usr/Python26/include/Python.h:58,
13269                       from python/python-internal.h:94,
13270                       from python/py-arch.c:24:
13271              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13272         using ::hypot;
13273                 ^~~~~
13274
13275         This happens because Python headers define 'hypot' to expand t
13276         '_hypot' in the Windows builds.
13277         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13278         'hypoth'.  This avoids a compilation error.
13279
13280 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13281
13282         * MAINTAINERS (Write After Approval): Fix ordering.
13283
13284 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13285
13286         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13287
13288 2018-01-26  Alan Modra  <amodra@gmail.com>
13289
13290         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13291         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13292         Remove nop.  Make const.  Comment.
13293         (powerpc32_plt_stub_so_2): New.
13294         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13295         Correct count.  Update uses.
13296         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13297         Move common code reading PLT entry word.  Correct
13298         powerpc32_plt_stub PLT address calculation.
13299         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13300         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13301         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13302         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13303         (ppc64_standard_linkage8): Likewise.
13304         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13305         Correct insns description.
13306         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13307
13308 2018-01-24  Pedro Alves  <palves@redhat.com>
13309
13310         GCC PR libstdc++/83906
13311         * gdbtypes.c (operator==(const dynamic_prop &,
13312         const dynamic_prop &)): New.
13313         (operator==(const range_bounds &, const range_bounds &)): New.
13314         (check_types_equal): Use them instead of memcmp.
13315         * gdbtypes.h (operator==(const dynamic_prop &,
13316         const dynamic_prop &)): Declare.
13317         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13318         (operator==(const range_bounds &, const range_bounds &)): Declare.
13319         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13320
13321 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13322
13323         * s390-linux-tdep.c (s390_record_address_mask)
13324         (s390_record_calc_disp_common, s390_record_calc_disp)
13325         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13326         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13327         (s390_process_record): Move to s390-tdep.c.
13328         (s390_linux_init_abi_any): Adjust.
13329         * s390-tdep.c (s390_record_address_mask)
13330         (s390_record_calc_disp_common, s390_record_calc_disp)
13331         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13332         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13333         (s390_process_record): Moved from s390-linux-tdep.c
13334         (s390_gdbarch_init): Adjust.
13335
13336 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13337
13338         * s390-linux-nat.c (s390-tdep.h): New include.
13339         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13340         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13341         (ALLDEPFILES): Add s390-tdep.c.
13342         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13343         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13344         * s390-tdep.h: ...this.  New file.
13345         * s390-linux-tdep.c (s390-tdep.h): New include.
13346         (_initialize_s390_tdep): Rename to...
13347         (_initialize_s390_linux_tdep): ...this and adjust.
13348         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13349         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13350         s390-tdep.h.
13351         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13352         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13353         (s390_is_partial_instruction, s390_software_single_step)
13354         (is_non_branch_ril, s390_displaced_step_copy_insn)
13355         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13356         (s390_prologue_data, s390_addr, s390_store, s390_load)
13357         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13358         (s390_register_call_saved, s390_guess_tracepoint_registers)
13359         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13360         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13361         (s390_pseudo_register_name, s390_pseudo_register_type)
13362         (s390_pseudo_register_read, s390_pseudo_register_write)
13363         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13364         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13365         (s390_addr_bits_remove, s390_address_class_type_flags)
13366         (s390_address_class_type_flags_to_name)
13367         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13368         (s390_function_arg_float, s390_function_arg_vector)
13369         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13370         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13371         (s390_frame_align, s390_register_return_value, s390_return_value)
13372         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13373         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13374         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13375         (s390_trad_frame_prev_register, s390_unwind_cache)
13376         (s390_prologue_frame_unwind_cache)
13377         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13378         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13379         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13380         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13381         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13382         (s390_frame_base_address, s390_local_base_address)
13383         (s390_frame_base, s390_gcc_target_options)
13384         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13385         (s390_validate_reg_range, s390_tdesc_valid)
13386         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13387         * s390-tdep.c: ...this.  New file.
13388
13389 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13390
13391         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13392         (s390_process_record, s390_gdbarch_tdep_alloc)
13393         (s390_linux_init_abi_any): Use/set new hook.
13394
13395 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13396
13397         * s390-linux-tdep.c (osabi.h): New include.
13398         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13399         (s390_linux_init_abi_any): New functions.
13400         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13401
13402 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13403
13404         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13405         tdesc_has_registers check
13406
13407 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13408
13409         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13410         (s390_validate_reg_range): New macro.
13411         (s390_gdbarch_init): Adjust.
13412
13413 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13414
13415         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13416         (s390_gdbarch_tdep_alloc): Adjust.
13417         (s390_gdbarch_init): Adjust.
13418
13419 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13420
13421         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13422         <have_tdb>: Change type to bool.
13423         (s390_gdbarch_tdep_alloc): Adjust.
13424         (s390_gdbarch_init): Adjust.
13425
13426 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13427
13428         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13429         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13430         (s390_gdbarch_tdep_alloc): New function.
13431         (s390_gdbarch_init): Allocate tdep at start and use its fields
13432         instead of separate variables.
13433
13434 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13435
13436         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13437         when looking for cached gdbarch and add comment for remaining.
13438
13439 2018-01-22  Pedro Alves  <palves@redhat.com>
13440             Sergio Durigan Junior  <sergiodj@redhat.com>
13441
13442         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13443         case.
13444
13445 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13446
13447         * MAINTAINERS: Update my company e-mail address.
13448
13449 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13450
13451         * regcache.c (cooked_write_test): New function.
13452         (_initialize_regcache): Register the test.
13453
13454 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13455
13456         * ia64-tdep.c (ia64_pseudo_register_read): Call
13457         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13458         * m32c-tdep.c (m32c_cat_read): Likewise.
13459         (m32c_r3r2r1r0_read): Likewise.
13460         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13461         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13462
13463 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13464
13465         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13466         method raw_read instead of regcache_raw_read.
13467         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13468         * arm-tdep.c (arm_neon_quad_read): Likewise.
13469         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13470         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13471         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13472         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13473         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13474         (i386_pseudo_register_read_into_value): Likewise.
13475         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13476         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13477         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13478         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13479         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13480         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13481         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13482         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13483         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13484
13485 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13486
13487         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13488         * configure.tgt: Remove target mt.
13489         * mt-tdep.c: Remove.
13490         * regcache.c (cooked_read_test): Remove the check for mt.
13491
13492 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13493
13494         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13495         instead of gdbarch_pseudo_register_read_value.
13496
13497 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13498
13499         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13500         language is Ada.
13501
13502 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13503
13504         * linespec.c (create_sals_line_offset): Remove code that preserved
13505         the symtab_and_line's line number.
13506
13507 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13508
13509         * varobj.c (varobj_create): Don't set valid_block when creating a
13510         floating varobj.
13511
13512 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13513
13514         * varobj.c (varobj_create): Remove out of date comment.
13515
13516 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13517
13518         PR mi/20395
13519         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13520         updating innermost block.
13521         * parse.c (innermost_block_tracker::update): Take extra type
13522         parameter, and check types match before updating innermost block.
13523         (write_dollar_variable): Update innermost block for registers.
13524         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13525         (innermost_block_tracker::innermost_block_tracker): Initialise
13526         m_types member.
13527         (innermost_block_tracker::reset): Take type parameter.
13528         (innermost_block_tracker::update): Take type parameter, and pass
13529         type through as needed.
13530         (innermost_block_tracker::m_types): New member.
13531         * varobj.c (varobj_create): Pass type when reseting innermost
13532         block.
13533
13534 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13535
13536         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13537         * ada-lang.c (resolve_subexp): Likewise.
13538         * breakpoint.c (set_breakpoint_condition) Likewise.
13539         (watch_command_1) Likewise.
13540         * c-exp.y (variable): Likewise.
13541         * d-exp.y (PrimaryExpression): Likewise.
13542         * f-exp.y (variable): Likewise.
13543         * go-exp.y (variable): Likewise.
13544         * m2-exp.y (variable): Likewise.
13545         * objfiles.c (objfile::~objfile): Likewise.
13546         * p-exp.y (variable): Likewise.
13547         * parse.c (innermost_block): Change type.
13548         * parser-defs.h (class innermost_block_tracker): New.
13549         (innermost_block): Change to innermost_block_tracker.
13550         * printcmd.c (display_command): Switch to innermost_block API.
13551         (do_one_display): Likewise.
13552         * rust-exp.y (do_one_display): Likewise.
13553         * symfile.c (clear_symtab_users): Likewise.
13554         * varobj.c (varobj_create): Switch to innermost_block API, replace
13555         use of innermost_block with block stored on varobj object.
13556
13557 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13558
13559         * expression.h (innermost_block): Remove declaration.
13560         * varobj.c: Add 'parser-defs.h' include.
13561
13562 2018-01-19  Tom Tromey  <tom@tromey.com>
13563
13564         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13565         symbols in the static and global blocks.
13566
13567 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13568
13569         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13570         gdb_ptrace.h, and move including gdb_wait.h ...
13571         * nat/linux-ptrace.h: ... to here.
13572
13573 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13574
13575         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13576         inf_ptrace_detach_success.
13577         (inf_ptrace_detach_success): Add inferior parameter, use it
13578         instead of inferior_ptid, pass it to detach_inferior.
13579         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13580         parameter.
13581         * inferior.c (detach_inferior): Add overload that takes an
13582         inferior object.
13583         * inferior.h (detach_inferior): Likewise.
13584         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13585         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13586         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13587
13588 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13589
13590         * target.h (struct target_ops) <to_detach>: Add inferior
13591         parameter.
13592         (target_detach): Likewise.
13593         * target.c (dispose_inferior): Pass inferior down.
13594         (target_detach): Pass inferior down.  Assert that it is equal to
13595         the current inferior.
13596         * aix-thread.c (aix_thread_detach): Pass inferior down.
13597         * corefile.c (core_file_command): Pass current_inferior() down.
13598         * corelow.c (core_detach): Add inferior parameter.
13599         * darwin-nat.c (darwin_detach): Likewise.
13600         * gnu-nat.c (gnu_detach): Likewise.
13601         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13602         * infcmd.c (detach_command): Pass current_inferior() down to
13603         target_detach.
13604         * infrun.c (follow_fork_inferior): Pass parent_inf to
13605         target_detach.
13606         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13607         target_detach.
13608         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13609         * linux-thread-db.c (thread_db_detach): Likewise.
13610         * nto-procfs.c (procfs_detach): Likewise.
13611         * procfs.c (procfs_detach): Likewise.
13612         * record.c (record_detach): Likewise.
13613         * record.h (struct inferior): Forward-declare.
13614         (record_detach): Add inferior parameter.
13615         * remote-sim.c (gdbsim_detach): Likewise.
13616         * remote.c (remote_detach_1): Likewise.
13617         (remote_detach): Likewise.
13618         (extended_remote_detach): Likewise.
13619         * sol-thread.c (sol_thread_detach): Likewise.
13620         * target-debug.h (target_debug_print_inferior_p): New macro.
13621         * target-delegates.c: Re-generate.
13622         * top.c (kill_or_detach): Pass inferior down to target_detach.
13623         * windows-nat.c (windows_detach): Add inferior parameter.
13624
13625 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13626
13627         * target.h (struct target_ops) <to_detach>: Remove args
13628         parameter.
13629         (target_detach): Likewise.
13630         * target.c (dispose_inferior): Adjust.
13631         (target_detach): Remove args parameter, adjust.
13632         * aix-thread.c (aix_thread_detach): Adjust.
13633         * corefile.c (core_file_command): Adjust.
13634         * corelow.c (core_detach): Adjust.
13635         * darwin-nat.c (darwin_detach): Adjust.
13636         * gnu-nat.c (gnu_detach): Adjust.
13637         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13638         * infcmd.c (detach_command): Adjust
13639         * infrun.c (follow_fork_inferior): Adjust.
13640         (handle_vfork_child_exec_or_exit): Adjust.
13641         * linux-fork.c (linux_fork_detach): Remove args parameter.
13642         * linux-fork.h (linux_fork_detach): Likewise.
13643         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13644         * linux-thread-db.c (thread_db_detach): Likewise.
13645         * nto-procfs.c (procfs_detach): Likewise.
13646         * procfs.c (procfs_detach): Likewise.
13647         (do_detach): Remove signo parameter.
13648         * record.c (record_detach): Remove args parameter.
13649         * record.h (record_detach): Likewise.
13650         * remote-sim.c (gdbsim_detach): Likewise.
13651         * remote.c (remote_detach_1): Likewise.
13652         (remote_detach): Likewise.
13653         (extended_remote_detach): Likewise.
13654         * sol-thread.c (sol_thread_detach): Likewise.
13655         * target-delegates.c: Re-generate.
13656         * top.c (struct qt_args) <args>: Remove field.
13657         (kill_or_detach): Don't pass args.
13658         (quit_force): Don't set args.
13659         * windows-nat.c (windows_detach): Remove args parameter.
13660
13661 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13662
13663         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13664         (arm_linux_init_abi): Install it.
13665
13666 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13667
13668         * osabi.c (gdb_osabi_names): Extend the regexp for
13669         arm-linux-gnueabihf.
13670
13671 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13672
13673         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13674         m_abbrevs.
13675         (abbrev_table::add_abbrev): Update.
13676         (abbrev_table::lookup_abbrev): Update.
13677
13678 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13679
13680         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13681
13682 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13683
13684         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13685         to "std::string".
13686
13687 2018-01-17  Tom Tromey  <tom@tromey.com>
13688
13689         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13690
13691 2018-01-17  Tom Tromey  <tom@tromey.com>
13692
13693         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13694         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13695         (create_array_type_with_stride): Update.
13696         * dwarf2read.c (set_die_type): Update.
13697
13698 2018-01-17  Tom Tromey  <tom@tromey.com>
13699
13700         * dwarf2read.c (delayed_method_info): Remove typedef.
13701         (dwarf2_cu::method_info): Now a std::vector.
13702         (add_to_method_list): Update.
13703         (free_delayed_list): Remove.
13704         (compute_delayed_physnames): Update.
13705         (process_full_comp_unit, process_full_type_unit): Clear the method
13706         list.  Remove cleanups.
13707         (psymtab_include_file_name): Add name_holder parameter.  Use
13708         unique_xmalloc_ptr.
13709         (dwarf_decode_lines): Update.
13710
13711 2018-01-17  Tom Tromey  <tom@tromey.com>
13712             Simon Marchi  <simon.marchi@ericsson.com>
13713
13714         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13715         (dwarf2_per_objfile::free_cached_comp_units)
13716         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13717         (init_cutu_and_read_dies_no_follow): Update.
13718         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13719         (dwarf2_cu::~dwarf2_cu): New.
13720         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13721         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13722
13723 2018-01-17  Tom Tromey  <tom@tromey.com>
13724             Simon Marchi  <simon.marchi@ericsson.com>
13725
13726         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13727         (struct die_reader_specs) <abbrev_table>: New member.
13728         (struct abbrev_table): Add constructor.
13729         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13730         <abbrev_obstack>: Now an auto_obstack.
13731         (abbrev_table_up): New typedef.
13732         (init_cu_die_reader): Add abbrev_table parameter.
13733         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13734         Add result_dwo_abbrev_table.
13735         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13736         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13737         Update.
13738         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13739         parameter.
13740         (skip_children): Update.
13741         (abbrev_table::alloc_abbrev): Rename from
13742         abbrev_table_alloc_abbrev.
13743         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13744         (abbrev_table::lookup_abbrev): Rename from
13745         abbrev_table_lookup_abbrev.
13746         (abbrev_table_read_table): Return abbrev_table_up.
13747         (abbrev_table_free, abbrev_table_free_cleanup)
13748         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13749         (load_partial_dies): Update.
13750
13751 2018-01-17  Tom Tromey  <tom@tromey.com>
13752
13753         * dwarf2read.c (dwarf2_compute_name): Update comment.
13754         (read_func_scope, read_variable): Update.
13755         (new_symbol): Remove.
13756         (new_symbol_full): Rename to new_symbol.
13757
13758 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13759
13760         PR gdb/16577
13761         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13762         a warning instead of throwing an error, set section size to 0 and return
13763         NULL.
13764         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13765
13766 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13767
13768         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13769         std::string.
13770         (linux_ptrace_attach_fail_reason_string): Likewise.
13771         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13772         Likewise.
13773         (linux_ptrace_attach_fail_reason_string): Likewise.
13774         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13775
13776 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13777
13778         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13779
13780 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13781
13782         PR gdb/21559
13783         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13784         checking for fs_base/gs_base fields in struct user_regs_struct.
13785         * configure: Regenerate.
13786
13787 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13788
13789         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13790         function.
13791         (aarch64_linux_init_abi): Install it to gdbarch hook
13792         gcc_target_options.
13793
13794 2018-01-15  Pedro Alves  <palves@redhat.com>
13795
13796         * common/signals-state-save-restore.c
13797         (save_original_signals_state): Fix typos.
13798
13799 2017-01-12  Tom Tromey  <tom@tromey.com>
13800             Sergio Durigan Junior  <sergiodj@redhat.com>
13801
13802         * Makefile.in (install-only): Install gdb-add-index.
13803
13804 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13805
13806         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13807
13808 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13809
13810         * infrun.c (keep_going_pass_signal): Clear step-over info when
13811         insert_breakpoints fails.
13812
13813 2018-01-11  Pedro Alves  <palves@redhat.com>
13814
13815         PR gdb/22583
13816         * infrun.c (resume): Rename to ...
13817         (resume_1): ... this.
13818         (resume): Reimplement as wrapper around resume_1.
13819
13820 2018-01-11  Pedro Alves  <palves@redhat.com>
13821
13822         PR remote/22597
13823         * remote.c (remote_parse_stop_reply): Default to the last-set
13824         general thread instead of to 'magic_null_ptid'.
13825
13826 2018-01-10  Pedro Alves  <palves@redhat.com>
13827
13828         * language.h (language_get_symbol_name_matcher): Rename ...
13829         (get_symbol_name_matcher): ... this.
13830         * language.c (language_get_symbol_name_matcher): Ditto.
13831         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13832         callers adjusted.
13833
13834 2018-01-10  Pedro Alves  <palves@redhat.com>
13835
13836         PR gdb/22670
13837         * dwarf2read.c
13838         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13839         Adjust to use language_get_symbol_name_matcher instead of
13840         language_defn::la_get_symbol_name_matcher.
13841         * language.c (language_get_symbol_name_matcher): If in Ada mode
13842         and the lookup name is a verbatim match, return Ada's matcher.
13843         * language.h (language_get_symbol_name_matcher): Adjust comment.
13844         (ada_lookup_name_info::verbatim_p):: New method.
13845
13846 2018-01-10  Pedro Alves  <palves@redhat.com>
13847
13848         PR gdb/22670
13849         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13850         minsym's language is language_auto or language_cplus, pass down
13851         language_ada instead.
13852         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13853
13854 2018-01-10  Pedro Alves  <palves@redhat.com>
13855
13856         PR gdb/22670
13857         * minsyms.c (linkage_name_str): New function.
13858         (iterate_over_minimal_symbols): Use it.
13859
13860 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13861
13862         * NEWS: Document that 'info proc' now works on FreeBSD.
13863
13864 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13865
13866         * configure.ac: Check for kinfo_getfile in libutil.
13867         * configure: Regenerate.
13868         * config.in: Regenerate.
13869         * fbsd-nat.c: Include "fbsd-tdep.h".
13870         (fbsd_fetch_cmdline): New.
13871         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13872         rather than calling error.
13873         (fbsd_info_proc): New.
13874         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13875         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13876         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13877
13878 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13879
13880         * fbsd-nat.c (struct free_deleter): Remove.
13881         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13882
13883 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13884
13885         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13886         NULL for an empty pathname.
13887
13888 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13889
13890         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13891         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13892         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13893         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13894         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13895         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13896         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13897         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13898         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13899         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13900         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13901         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13902         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13903         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13904         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13905
13906 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13907
13908         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13909         (gnu_xfer_auxv): New function.
13910         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13911         TARGET_OBJECT_AUXV.
13912
13913 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13914             Simon Marchi  <simon.marchi@ericsson.com>
13915
13916         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13917         common/selftest.c.
13918         (COMMON_OBS): Remove selftest.o.
13919         * configure.ac: Append selftest-arch.c and common/selftest.c to
13920         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13921         * configure: Re-generated.
13922         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13923         GDB_SELF_TEST.
13924         (maintenance_info_selftests): Likewise.
13925
13926 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13927
13928         * ada-valprint.c (val_print_packed_array_elements): Use
13929         proper number of elements when printing an array indexed
13930         by an enumeration type.
13931
13932 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13933
13934         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13935         (dw2_get_file_names_reader): Adjust.
13936         (lookup_dwo_signatured_type): Adjust.
13937         (lookup_dwp_signatured_type): Adjust.
13938         (lookup_signatured_type): Adjust.
13939         (create_type_unit_group): Adjust.
13940         (get_type_unit_group): Adjust.
13941         (process_psymtab_comp_unit_reader): Adjust.
13942         (build_type_psymtabs_reader): Adjust.
13943         (scan_partial_symbols): Adjust.
13944         (add_partial_symbol): Adjust.
13945         (add_partial_subprogram): Adjust.
13946         (peek_die_abbrev): Adjust.
13947         (fixup_go_packaging): Adjust.
13948         (process_imported_unit_die): Adjust.
13949         (dwarf2_compute_name): Adjust.
13950         (dwarf2_physname): Adjust.
13951         (read_import_statement): Adjust.
13952         (handle_DW_AT_stmt_list): Adjust.
13953         (read_file_scope): Adjust.
13954         (read_func_scope): Adjust.
13955         (read_lexical_block_scope): Adjust.
13956         (read_call_site_scope): Adjust.
13957         (read_variable): Adjust.
13958         (dwarf2_rnglists_process): Adjust.
13959         (dwarf2_ranges_process): Adjust.
13960         (dwarf2_ranges_read): Adjust.
13961         (dwarf2_get_pc_bounds): Adjust.
13962         (dwarf2_record_block_ranges): Adjust.
13963         (dwarf2_add_field): Adjust.
13964         (dwarf2_add_member_fn): Adjust.
13965         (read_structure_type): Adjust.
13966         (process_structure_scope): Adjust.
13967         (read_enumeration_type): Adjust.
13968         (read_array_type): Adjust.
13969         (mark_common_block_symbol_computed): Adjust.
13970         (read_common_block): Adjust.
13971         (read_namespace_type): Adjust.
13972         (read_namespace): Adjust.
13973         (read_module_type): Adjust.
13974         (read_tag_pointer_type): Adjust.
13975         (read_tag_ptr_to_member_type): Adjust.
13976         (read_tag_string_type): Adjust.
13977         (read_subroutine_type): Adjust.
13978         (read_typedef): Adjust.
13979         (read_base_type): Adjust.
13980         (attr_to_dynamic_prop): Adjust.
13981         (read_subrange_type): Adjust.
13982         (read_unspecified_type): Adjust.
13983         (dwarf2_read_abbrevs): Adjust.
13984         (load_partial_dies): Adjust.
13985         (read_partial_die): Adjust.
13986         (find_partial_die): Adjust.
13987         (guess_partial_die_structure_name): Adjust.
13988         (fixup_partial_die): Adjust.
13989         (read_attribute_value): Adjust.
13990         (read_addr_index): Adjust.
13991         (read_addr_index_from_leb128): Adjust.
13992         (read_str_index): Adjust.
13993         (dwarf2_string_attr): Adjust.
13994         (get_debug_line_section): Adjust.
13995         (dwarf_decode_line_header): Adjust.
13996         (lnp_state_machine::check_line_address): Adjust.
13997         (dwarf_decode_lines_1): Adjust.
13998         (dwarf_decode_lines): Adjust.
13999         (dwarf2_start_symtab): Adjust.
14000         (var_decode_location): Adjust.
14001         (new_symbol_full): Adjust.
14002         (dwarf2_const_value_data): Adjust.
14003         (dwarf2_const_value_attr): Adjust.
14004         (dwarf2_const_value): Adjust.
14005         (die_type): Adjust.
14006         (die_containing_type): Adjust.
14007         (build_error_marker_type): Adjust.
14008         (lookup_die_type): Adjust.
14009         (guess_full_die_structure_name): Adjust.
14010         (anonymous_struct_prefix): Adjust.
14011         (determine_prefix): Adjust.
14012         (dwarf2_name): Adjust.
14013         (follow_die_ref_or_sig): Adjust.
14014         (follow_die_offset): Adjust.
14015         (follow_die_ref): Adjust.
14016         (follow_die_sig_1): Adjust.
14017         (follow_die_sig): Adjust.
14018         (get_signatured_type): Adjust.
14019         (get_DW_AT_signature_type): Adjust.
14020         (decode_locdesc): Adjust.
14021         (dwarf_decode_macros): Adjust.
14022         (cu_debug_loc_section): Adjust.
14023         (fill_in_loclist_baton): Adjust.
14024         (dwarf2_symbol_mark_computed): Adjust.
14025         (init_one_comp_unit): Don't assign
14026         dwarf2_cu::dwarf2_per_objfile.
14027         (set_die_type): Adjust.
14028
14029 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14030
14031         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14032         <dwarf2_per_objfile>: New field.
14033         (dwarf2_per_objfile): Remove global.
14034         (get_dwarf2_per_objfile): New function.
14035         (set_dwarf2_per_objfile): New function.
14036         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14037         dwarf2_per_objfile.
14038         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14039         (read_abbrev_offset): Likewise.
14040         (read_indirect_string): Likewise.
14041         (read_indirect_line_string): Likewise.
14042         (read_indirect_string_at_offset): Likewise.
14043         (read_indirect_string_from_dwz): Likewise.
14044         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14045         dwarf2_per_objfile.
14046         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14047         (create_all_comp_units): Change objfile parameter to
14048         dwarf2_per_objfile.
14049         (create_all_type_units): Likewise.
14050         (process_queue): Add dwarf2_per_objfile parameter.
14051         (read_and_check_comp_unit_head): Likewise.
14052         (lookup_dwo_unit_in_dwp): Likewise.
14053         (get_dwp_file): Likewise.
14054         (process_cu_includes): Likewise.
14055         (struct free_dwo_file_cleanup_data): New struct.
14056         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14057         set_dwarf2_per_objfile.
14058         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14059         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14060         context, adjust calls.
14061         (dw2_instantiate_symtab): Likewise.
14062         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14063         (dw2_get_cu): Likewise.
14064         (create_cu_from_index_list): Change objfile parameter to
14065         dwarf2_per_objfile.
14066         (create_cus_from_index_list): Get dwarf2_per_objfile from
14067         context, adjust calls.
14068         (create_cus_from_index): Likewise.
14069         (create_signatured_type_table_from_index): Change objfile
14070         parameter to dwarf2_per_objfile.
14071         (create_signatured_type_table_from_debug_names): Change objfile
14072         parameter to dwarf2_per_objfile.
14073         (create_addrmap_from_index): Likewise.
14074         (create_addrmap_from_aranges): Likewise.
14075         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14076         (dw2_setup): Remove.
14077         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14078         context.
14079         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14080         get_dwarf2_per_objfile.
14081         (dw2_forget_cached_source_info): Likewise.
14082         (dw2_map_symtabs_matching_filename): Likewise.
14083         (struct dw2_symtab_iterator) <index>: Remove.
14084         <dwarf2_per_objfile>: New field.
14085         (dw2_symtab_iter_init): Replace index parameter with
14086         dwarf2_per_objfile.
14087         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14088         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14089         (dw2_print_stats): Likewise.
14090         (dw2_dump): Likewise.
14091         (dw2_expand_symtabs_for_function): Likewise.
14092         (dw2_expand_all_symtabs): Likewise.
14093         (dw2_expand_symtabs_with_fullname): Likewise.
14094         (dw2_expand_marked_cus): Replace index and objfile parameters
14095         with dwarf2_per_objfile.
14096         (dw_expand_symtabs_matching_file_matcher): Add
14097         dwarf2_per_objfile parameter and adjust calls.
14098         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14099         adjust calls.
14100         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14101         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14102         adjust calls.
14103         (create_cus_from_debug_names_list): Replace objfile parameter
14104         with dwarf2_per_objfile and adjust calls.
14105         (create_cus_from_debug_names): Likewise.
14106         (dwarf2_read_debug_names): Likewise.
14107         (mapped_debug_names::namei_to_name): Adjust call.
14108         (dw2_debug_names_iterator::next): Likewise.
14109         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14110         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14111         (dw2_debug_names_dump): Likewise.
14112         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14113         (dw2_debug_names_expand_symtabs_matching): Likewise.
14114         (dwarf2_initialize_objfile): Likewise.
14115         (dwarf2_build_psymtabs): Likewise.
14116         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14117         this_cu.
14118         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14119         (read_and_check_comp_unit_head): Likewise.
14120         (read_abbrev_offset): Likewise.
14121         (create_debug_type_hash_table): Likewise.
14122         (create_debug_types_hash_table): Likewise.
14123         (create_all_type_units): Replace objfile parameter with
14124         dwarf2_per_objfile.
14125         (add_type_unit): Add dwarf2_per_objfile parameter.
14126         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14127         with dwarf2_per_objfile.
14128         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14129         (lookup_dwp_signatured_type): Likewise.
14130         (lookup_signatured_type): Likewise.
14131         (read_cutu_die_from_dwo): Likewise.
14132         (init_tu_and_read_dwo_dies): Likewise.
14133         (init_cutu_and_read_dies): Likewise.
14134         (init_cutu_and_read_dies_no_follow): Likewise.
14135         (allocate_type_unit_groups_table): Add objfile parameter.
14136         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14137         (get_type_unit_group): Likewise.
14138         (process_psymtab_comp_unit): Update call.
14139         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14140         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14141         (print_tu_stats): Likewise.
14142         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14143         in void* parameter.
14144         (build_type_psymtabs): Change objfile parameter to
14145         dwarf2_per_objfile.
14146         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14147         passed in void* parameter.
14148         (process_skeletonless_type_units): Change objfile parameter to
14149         dwarf2_per_objfile.
14150         (set_partial_user): Likewise.
14151         (dwarf2_build_psymtabs_hard): Likewise.
14152         (read_comp_units_from_section): Likewise.
14153         (create_all_comp_units): Likewise.
14154         (scan_partial_symbols): Update calls.
14155         (add_partial_symbol): Likewise.
14156         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14157         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14158         (process_queue): Add dwarf2_per_objfile parameter.
14159         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14160         (compute_compunit_symtab_includes): Likewise.
14161         (process_cu_includes): Add dwarf2_per_objfile parameter.
14162         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14163         (process_full_type_unit): Likewise.
14164         (process_imported_unit_die): Update call.
14165         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14166         (read_file_scope): Likewise.
14167         (allocate_dwo_file_hash_table): Add objfile parameter.
14168         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14169         (create_cus_hash_table): Likewise.
14170         (create_dwp_hash_table): Likewise.
14171         (create_dwo_unit_in_dwp_v1): Likewise.
14172         (create_dwp_v2_section): Likewise.
14173         (create_dwo_unit_in_dwp_v2): Likewise.
14174         (lookup_dwo_unit_in_dwp): Likewise.
14175         (try_open_dwop_file): Likewise.
14176         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14177         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14178         cleanup to include a reference to dwarf2_per_objfile.
14179         (open_dwp_file): Add dwarf2_per_objfile parameter.
14180         (open_and_init_dwp_file): Likewise.
14181         (get_dwp_file): Likewise.
14182         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14183         (queue_and_load_all_dwo_tus): Update call.
14184         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14185         data.
14186         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14187         (dwarf2_ranges_process): Likewise.
14188         (dwarf2_get_pc_bounds): Likewise.
14189         (mark_common_block_symbol_computed): Likewise.
14190         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14191         (dwarf2_read_abbrevs): Update call.
14192         (read_partial_die): Use dwarf2_per_objfile from cu.
14193         (find_partial_die): Likewise.
14194         (fixup_partial_die): Likewise.
14195         (read_attribute_value): Likewise.
14196         (read_indirect_string_at_offset_from): Add objfile parameter.
14197         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14198         parameter.
14199         (read_indirect_string_from_dwz): Add objfile parameter.
14200         (read_indirect_string): Add objfile parameter.
14201         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14202         (read_addr_index): Use dwarf2_per_objfile from cu.
14203         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14204         call dw2_setup.
14205         (read_str_index): Use dwarf2_per_objfile from cu.
14206         (get_debug_line_section): Likewise.
14207         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14208         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14209         (new_symbol_full): Use dwarf2_per_objfile from cu.
14210         (build_error_marker_type): Likewise.
14211         (lookup_die_type): Likewise.
14212         (determine_prefix): Likewise.
14213         (follow_die_offset): Likewise.
14214         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14215         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14216         (dwarf2_fetch_die_type_sect_off): Likewise.
14217         (dwarf2_get_die_type): Likewise.
14218         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14219         (get_signatured_type): Likewise.
14220         (get_DW_AT_signature_type): Likewise.
14221         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14222         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14223         (cu_debug_loc_section): Likewise.
14224         (fill_in_loclist_baton): Likewise.
14225         (dwarf2_symbol_mark_computed): Likewise.
14226         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14227         dwarf2_per_objfile.
14228         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14229         parameter.
14230         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14231         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14232         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14233         (set_die_type): Use dwarf2_free_objfile from cu.
14234         (get_die_type_at_offset): Likewise.
14235         (dwarf2_per_objfile_free): Don't assign global variable.
14236         (debug_names) <constructor>: Add dwarf2_per_objfile
14237         parameter, update m_debugstrlookup construction.
14238         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14239         parameter.
14240         <m_dwarf2_per_objfile>: New field.
14241         <lookup>: Use m_dwarf2_per_objfile.
14242         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14243         (psyms_seen_size): Likewise.
14244         (write_gdbindex): Replace objfile parameter with
14245         dwarf2_per_objfile.
14246         (write_debug_names): Likewise.
14247         (write_psymtabs_to_index): Likewise.
14248         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14249         calls.
14250
14251 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14252
14253         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14254         <dwarf2_per_objfile>: New field.
14255         (struct dwarf2_per_cu_data) <objfile>: Remove.
14256         <dwarf2_per_objfile>: New field.
14257         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14258         of objfile.
14259         (create_signatured_type_table_from_index): Likewise.
14260         (create_debug_type_hash_table): Likewise.
14261         (fill_in_sig_entry_from_dwo_entry): Likewise.
14262         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14263         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14264         objfile.
14265         (create_partial_symtab): Access objfile through
14266         dwarf2_per_objfile.
14267         (process_psymtab_comp_unit_reader): Likewise.
14268         (read_comp_units_from_section): Likewise.
14269         (scan_partial_symbols): Likewise.
14270         (add_partial_symbol): Likewise.
14271         (add_partial_subprogram): Likewise.
14272         (peek_die_abbrev): Likewise.
14273         (fixup_go_packaging): Likewise.
14274         (process_full_comp_unit): Likewise.
14275         (process_full_type_unit): Likewise.
14276         (process_imported_unit_die): Likewise.
14277         (dwarf2_compute_name): Likewise.
14278         (dwarf2_physname): Likewise.
14279         (read_import_statement): Likewise.
14280         (create_cus_hash_table): Assign dwarf2_physname instead of
14281         objfile.
14282         (read_func_scope): Access objfile through dwarf2_per_objfile.
14283         (read_lexical_block_scope): Likewise.
14284         (read_call_site_scope): Likewise.
14285         (read_variable): Likewise.
14286         (dwarf2_rnglists_process): Likewise.
14287         (dwarf2_ranges_process): Likewise.
14288         (dwarf2_ranges_read): Likewise.
14289         (dwarf2_record_block_ranges): Likewise.
14290         (dwarf2_add_field): Likewise.
14291         (dwarf2_add_member_fn): Likewise.
14292         (read_structure_type): Likewise.
14293         (process_structure_scope): Likewise.
14294         (read_enumeration_type): Likewise.
14295         (read_array_type): Likewise.
14296         (read_common_block): Likewise.
14297         (read_namespace_type): Likewise.
14298         (read_namespace): Likewise.
14299         (read_module_type): Likewise.
14300         (read_tag_pointer_type): Likewise.
14301         (read_tag_ptr_to_member_type): Likewise.
14302         (read_tag_string_type): Likewise.
14303         (read_subroutine_type): Likewise.
14304         (read_typedef): Likewise.
14305         (read_base_type): Likewise.
14306         (attr_to_dynamic_prop): Likewise.
14307         (read_subrange_type): Likewise.
14308         (read_unspecified_type): Likewise.
14309         (load_partial_dies): Likewise.
14310         (read_partial_die): Likewise.
14311         (find_partial_die): Likewise.
14312         (guess_partial_die_structure_name): Likewise.
14313         (fixup_partial_die): Likewise.
14314         (read_attribute_value): Likewise.
14315         (read_addr_index_from_leb128): Likewise.
14316         (dwarf2_read_addr_index): Likewise.
14317         (dwarf2_string_attr): Likewise.
14318         (lnp_state_machine::check_line_address): Likewise.
14319         (dwarf_decode_lines_1): Likewise.
14320         (dwarf_decode_lines): Likewise.
14321         (dwarf2_start_symtab): Likewise.
14322         (var_decode_location): Likewise.
14323         (new_symbol_full): Likewise.
14324         (dwarf2_const_value_data): Likewise.
14325         (dwarf2_const_value_attr): Likewise.
14326         (dwarf2_const_value): Likewise.
14327         (die_type): Likewise.
14328         (die_containing_type): Likewise.
14329         (lookup_die_type): Likewise.
14330         (guess_full_die_structure_name): Likewise.
14331         (anonymous_struct_prefix): Likewise.
14332         (dwarf2_name): Likewise.
14333         (follow_die_ref_or_sig): Likewise.
14334         (follow_die_offset): Likewise.
14335         (follow_die_ref): Likewise.
14336         (dwarf2_fetch_die_loc_sect_off): Likewise.
14337         (dwarf2_fetch_constant_bytes): Likewise.
14338         (dwarf2_fetch_die_type_sect_off): Likewise.
14339         (dwarf2_get_die_type): Likewise.
14340         (follow_die_sig): Likewise.
14341         (decode_locdesc): Likewise.
14342         (dwarf2_per_cu_objfile): Likewise.
14343         (dwarf2_per_cu_text_offset): Likewise.
14344         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14345         objfile.
14346         (set_die_type): Access objfile through
14347         dwarf2_per_objfile.
14348
14349 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14350
14351         * valprint.c (converted_character_d): Remove typedef.
14352         (DEF_VEC_O (converted_character_d)): Remove.
14353         (count_next_character): Use std::vector.
14354         (print_converted_chars_to_obstack): Likewise.
14355         (generic_printstr): Likewise.
14356
14357 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14358
14359         * xml-support.h (struct gdb_xml_value): Add constructor.
14360         <value>: Change type to unique_xmalloc_ptr.
14361         (gdb_xml_value_s): Remove typedef.
14362         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14363         (gdb_xml_element_start_handler): Change parameter type to
14364         std::vector.
14365         (xml_find_attribute): Likewise.
14366         * xml-support.c (xml_find_attribute): Change parameter type to
14367         std::vector and adjust.
14368         (gdb_xml_values_cleanup): Remove.
14369         (gdb_xml_parser::start_element): Adjust to std::vector.
14370         (xinclude_start_include): Change paraeter type to std::vector
14371         and adjust.
14372         * btrace.c (check_xml_btrace_version): Likewise.
14373         (parse_xml_btrace_block): Likewise.
14374         (parse_xml_btrace_pt_config_cpu): Likewise.
14375         (parse_xml_btrace_pt): Likewise.
14376         (parse_xml_btrace_conf_bts): Likewise.
14377         (parse_xml_btrace_conf_pt): Likewise.
14378         * memory-map.c (memory_map_start_memory): Likewise.
14379         (memory_map_start_property): Likewise.
14380         * osdata.c (osdata_start_osdata): Likewise.
14381         (osdata_start_item): Likewise.
14382         (osdata_start_column): Likewise.
14383         * remote.c (start_thread): Likewise.
14384         * solib-aix.c (library_list_start_library): Likewise.
14385         (library_list_start_list): Likewise.
14386         * solib-svr4.c (library_list_start_library): Likewise.
14387         (svr4_library_list_start_list): Likewise.
14388         * solib-target.c (library_list_start_segment): Likewise.
14389         (library_list_start_section): Likewise.
14390         (library_list_start_library): Likewise.
14391         (library_list_start_list): Likewise.
14392         * tracepoint.c (traceframe_info_start_memory): Likewise.
14393         (traceframe_info_start_tvar): Likewise.
14394         * xml-syscall.c (syscall_start_syscall): Likewise.
14395         * xml-tdesc.c (tdesc_start_target): Likewise.
14396         (tdesc_start_feature): Likewise.
14397         (tdesc_start_reg): Likewise.
14398         (tdesc_start_union): Likewise.
14399         (tdesc_start_struct): Likewise.
14400         (tdesc_start_flags): Likewise.
14401         (tdesc_start_enum): Likewise.
14402         (tdesc_start_field): Likewise.
14403         (tdesc_start_enum_value): Likewise.
14404         (tdesc_start_vector): Likewise.
14405
14406 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14407
14408         * extension.h (struct xmethod_worker) <clone>: Remove.
14409         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14410         Remove.
14411         (python_xmethod_worker::clone): Remove.
14412         * valops.c (find_overload_match): Use std::move instead of
14413         clone.
14414
14415 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14416
14417         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14418         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14419         <free_xmethod_worker_data>: Remove.
14420         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14421         <get_xmethod_arg_types>: Remove.
14422         <get_xmethod_result_type>: Remove.
14423         <invoke_xmethod>: Remove.
14424         * extension.c (new_xmethod_worker): Remove.
14425         (clone_xmethod_worker): Remove.
14426         (get_matching_xmethod_workers): Return void, pass std::vector by
14427         pointer.
14428         (get_xmethod_arg_types): Rename to...
14429         (xmethod_worker::get_arg_types): ... this, and adjust.
14430         (get_xmethod_result_type): Rename to...
14431         (xmethod_worker::get_result_type): ... this, and adjust.
14432         (invoke_xmethod): Remove.
14433         (free_xmethod_worker): Remove.
14434         (free_xmethod_worker_vec): Remove.
14435         * extension.h (enum ext_lang_rc): Move here from
14436         extension-priv.h.
14437         (struct xmethod_worker): Add constructor and destructor.
14438         <data>: Remove.
14439         <value>: Remove.
14440         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14441         virtual pure methods.
14442         <get_arg_types, get_result_type>: New methods.
14443         (xmethod_worker_ptr): Remove typedef.
14444         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14445         (xmethod_worker_vec): Remove typedef.
14446         (xmethod_worker_up): New typedef.
14447         (invoke_xmethod): Remove.
14448         (clone_xmethod_worker): Remove.
14449         (free_xmethod_worker): Remove.
14450         (free_xmethod_worker_vec): Remove.
14451         (get_xmethod_arg_types): Remove.
14452         (get_xmethod_result_type): Remove.
14453         * valops.c (find_method_list): Use std::vector, don't use
14454         intermediate vector.
14455         (value_find_oload_method_list): Use std::vector.
14456         (find_overload_match): Use std::vector.
14457         (find_oload_champ): Use std::vector.
14458         * value.c (value_free): Use operator delete.
14459         (value_of_xmethod): Rename to...
14460         (value_from_xmethod): ... this.  Don't assign
14461         xmethod_worker::value, take rvalue-reference.
14462         (result_type_of_xmethod): Adjust.
14463         (call_xmethod): Adjust.
14464         * value.h: Include extension.h.
14465         (struct xmethod_worker): Don't forward-declare.
14466         (value_of_xmethod): Rename to...
14467         (value_from_xmethod): ... this, take rvalue-reference.
14468         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14469         (struct python_xmethod_worker): ... this, add constructor and
14470         destructor.
14471         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14472         (gdbpy_free_xmethod_worker_data): Rename to...
14473         (python_xmethod_worker::~python_xmethod_worker): ... this and
14474         adjust.
14475         (gdbpy_clone_xmethod_worker_data): Rename to...
14476         (python_xmethod_worker::clone): ... this and adjust.
14477         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14478         temporary vector.
14479         (gdbpy_get_xmethod_arg_types): Rename to...
14480         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14481         (gdbpy_get_xmethod_result_type): Rename to...
14482         (python_xmethod_worker::do_get_result_type): ... this and
14483         adjust.
14484         (gdbpy_invoke_xmethod): Rename to...
14485         (python_xmethod_worker::invoke): ... this and adjust.
14486         (new_python_xmethod_worker): Rename to...
14487         (python_xmethod_worker::python_xmethod_worker): ... this and
14488         adjust.
14489         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14490         Remove.
14491         (gdbpy_free_xmethod_worker_data): Remove.
14492         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14493         (gdbpy_get_xmethod_arg_types): Remove.
14494         (gdbpy_get_xmethod_result_type): Remove.
14495         (gdbpy_invoke_xmethod): Remove.
14496         * python/python.c (python_extension_ops): Remove obsolete
14497         callbacks.
14498
14499 2018-01-05  Pedro Alves  <palves@redhat.com>
14500
14501         PR gdb/18653
14502         * common/signals-state-save-restore.c
14503         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14504         find a custom handler preinstalled, instead of internal erroring.
14505         But only warn if !quiet.
14506         * common/signals-state-save-restore.h
14507         (save_original_signals_state): New parameter 'quiet'.
14508         * main.c (captured_main_1): Move save_original_signals_state call
14509         after option handling, and pass QUIET.
14510
14511 2018-01-05  Pedro Alves  <palves@redhat.com>
14512
14513         * spu-tdep.c (spu_catch_start): Pass
14514         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14515
14516 2018-01-05  Pedro Alves  <palves@redhat.com>
14517
14518         PR gdb/22670
14519         * ada-lang.c (literal_symbol_name_matcher): New function.
14520         (ada_get_symbol_name_matcher): Use it for
14521         symbol_name_match_type::SEARCH_NAME.
14522         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14523         it down instead of assuming symbol_name_match_type::FULL.
14524         * block.h (block_lookup_symbol): New parameter 'match_type'.
14525         * c-valprint.c (print_unpacked_pointer): Use
14526         lookup_symbol_search_name instead of lookup_symbol.
14527         * compile/compile-object-load.c (get_out_value_type): Pass down
14528         symbol_name_match_type::SEARCH_NAME.
14529         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14530         symbol_name_match_type::FULL.
14531         * cp-support.c (cp_get_symbol_name_matcher): Handle
14532         symbol_name_match_type::SEARCH_NAME.
14533         * infrun.c (insert_exception_resume_breakpoint): Use
14534         lookup_symbol_search_name.
14535         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14536         * psymtab.c (maintenance_check_psymtabs): Use
14537         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14538         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14539         SYMBOL_SEARCH_NAME.
14540         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14541         if symbol_name_match_type::SEARCH_NAME.
14542         (lookup_symbol_in_language): Pass down
14543         symbol_name_match_type::FULL.
14544         (lookup_symbol_search_name): New.
14545         (lookup_language_this): Pass down
14546         symbol_name_match_type::SEARCH_NAME.
14547         (lookup_symbol_aux, lookup_local_symbol): New parameter
14548         'match_type'.  Pass it down.
14549         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14550         (lookup_symbol_search_name): New declaration.
14551         (lookup_symbol_in_block): New 'match_type' parameter.
14552
14553 2018-01-05  Pedro Alves  <palves@redhat.com>
14554
14555         PR gdb/22670
14556         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14557         ada_lookup_symbol.
14558         (ada_lookup_symbol): Reimplement in terms of
14559         ada_lookup_symbol_list, bits factored out from
14560         ada_lookup_encoded_symbol.
14561
14562 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14563
14564         * ada-exp.y (write_object_renaming): When subscripting an array
14565         using a symbol as the index, pass the block in call to
14566         ada_lookup_encoded_symbol when looking that symbol up.
14567
14568 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14569
14570         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14571         TYPE_INDEX_TYPE.
14572
14573 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14574
14575         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14576         the case where VALUE_LVAL (val0) is not lval_memory.
14577
14578 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14579
14580         * ada-valprint.c (print_optional_low_bound): Handle
14581         character-indexed array printing like boolean-indexed array
14582         printing.
14583
14584 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14585
14586         * NEWS: Create a new section for the next release branch.
14587         Rename the section of the current branch, now that it has
14588         been cut.
14589
14590 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14591
14592         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14593         * version.in: Bump version to 8.1.50.DATE-git.
14594
14595 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14596
14597         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14598         Add field.
14599         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14600         Add field.
14601         (default_exception_support_info) <catch_handlers_sym>: Add field.
14602         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14603         (ada_exception_name_addr_1): Add "catch handlers" handling.
14604         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14605         Update all callers.
14606         (create_excep_cond_exprs) <ex>: Add parameter.
14607         (re_set_exception): Update create_excep_cond_exprs call.
14608         (print_it_exception, print_one_exception, print_mention_exception)
14609         (print_recreate_exception): Add "catch handler" handling.
14610         (allocate_location_catch_handlers, re_set_catch_handlers)
14611         (check_status_catch_handlers, print_it_catch_handlers)
14612         (print_one_catch_handlers, print_mention_catch_handlers)
14613         (print_recreate_catch_handlers): New function.
14614         (catch_handlers_breakpoint_ops): New variable.
14615         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14616         Add parameter.  Add "catch handler" handling.
14617         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14618         Add "catch handler" handling.
14619         (ada_exception_catchpoint_cond_string): Add "catch handler"
14620         handling.
14621         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14622         call.
14623         (catch_ada_handlers_command): New function.
14624         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14625         operations structure.
14626         (_initialize_ada_language): Add "catch handlers" command entry.
14627         * NEWS: Document "catch handlers" feature.
14628
14629 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14630
14631         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14632         account when creating the array type of the slice.
14633         (ada_value_slice): Likewise.
14634
14635 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14636
14637         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14638         New enum value.
14639         (create_array_type_with_stride): Add byte_stride_prop parameter.
14640         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14641         New parameter.  Update all callers in this file.
14642         (array_type_has_dynamic_stride): New function.
14643         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14644         of arrays with dynamic byte strides.
14645         * dwarf2read.c (read_array_type): Add support for dynamic
14646         DW_AT_byte_stride attributes.
14647
14648 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14649
14650         * dwarf2read.c (read_unspecified_type): Treat
14651         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14652
14653 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14654
14655         Update copyright year range in all GDB files.
14656
14657 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14658
14659         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14660         and gdb/testsuite/gdb.base/step-line.c.
14661
14662 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14663
14664         * copyright.py (main): Dump the contents of
14665         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14666         even if BY_HAND is empty.
14667
14668 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14669
14670         * top.c (print_gdb_version): Update Copyright year in version
14671         message.
14672
14673 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14674
14675         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14676
14677 For older changes see ChangeLog-2017.
14678 \f
14679 Local Variables:
14680 mode: change-log
14681 left-margin: 8
14682 fill-column: 74
14683 version-control: never
14684 coding: utf-8
14685 End: