gdb/riscv: Give user-friendly names for CSRs
[external/binutils.git] / gdb / ChangeLog
1 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
2
3         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
4         for CSRs.
5
6 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
7
8         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
9         have_nonsteppable_watchpoint attribute to 1.
10
11 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
12
13         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
14         register names.
15         (struct register_alias): Rename to...
16         (struct riscv_register_alias): ...this, and update comment.
17         (riscv_register_aliases): Update type, and alias names.  Remove
18         CSR names from this list.
19         (riscv_register_name): Use riscv_gdb_reg_names for int and float
20         register names.  Add an extra assertion.
21         (riscv_is_regnum_a_named_csr): New function.
22         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
23
24 2018-10-22  Jim Wilson  <jimw@sifive.com>
25
26         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
27         FP reg smaller than FP reg size, and fill with -1 instead of 0.
28
29         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
30         (riscv_register_type): Use them.
31         (riscv_print_one_register_info): Handle union of floats same as float.
32         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
33         riscv_fpreg_q_type fields.
34
35 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
36
37         * gdbarch.sh (gdbarch_num_cooked_regs): New.
38         * gdbarch.h: Re-generate.
39         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
40         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
41         * eval.c (evaluate_subexp_standard): Likewise.
42         * findvar.c (value_of_register): Likewise.
43         (value_of_register_lazy): Likewise.
44         (address_from_register): Likewise.
45         * frame.c (get_frame_register_bytes): Likewise.
46         * gdbarch-selftests.c (register_to_value_test): Likewise.
47         * h8300-tdep.c (h8300_register_type): Likewise.
48         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
49         (i386_svr4_reg_to_regnum): Likewise.
50         * infcmd.c (default_print_registers_info): Likewise.
51         (registers_info): Likewise.
52         (print_vector_info): Likewise.
53         (default_print_float_info): Likewise.
54         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
55         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
56         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
57         (mi_cmd_data_list_changed_registers): Likewise.
58         (mi_cmd_data_list_register_values): Likewise.
59         (mi_cmd_data_write_register_values): Likewise.
60         (mi_cmd_trace_frame_collected): Likewise.
61         * mips-tdep.c (print_gp_register_row): Likewise.
62         (mips_print_registers_info): Likewise.
63         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
64         * regcache.c (init_regcache_descr): Likewise.
65         (register_size): Likewise.
66         (register_dump::dump): Likewise.
67         (cooked_read_test): Likewise.
68         (cooked_write_test): Likewise.
69         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
70         (rs6000_gdbarch_init): Likewise.
71         * stabsread.c (stab_reg_to_regnum): Likewise.
72         * stack.c (info_frame_command): Likewise.
73         * target-descriptions.c (tdesc_register_name): Likewise.
74         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
75         * tui/tui-regs.c (tui_show_register_group): Likewise.
76         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
77         (user_reg_map_regnum_to_name): Likewise.
78         (value_of_user_reg): Likewise.
79         (maintenance_print_user_registers): Likewise.
80         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
81         (xtensa_register_name): Likewise.
82         (xtensa_register_type): Likewise.
83         (xtensa_reg_to_regnum): Likewise.
84         (xtensa_pseudo_register_read): Likewise.
85         (xtensa_pseudo_register_write): Likewise.
86
87 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
88
89         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
90         correctly-sized buffer with raw_read.
91         (amd64_pseudo_register_write): Use correctly-sized buffer for
92         raw_read/raw_write.
93
94 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
95
96         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
97         in add_prefix_cmd of set print type.
98
99 2018-10-19  Tom Tromey  <tom@tromey.com>
100
101         PR tui/18388:
102         * NEWS: Mention tabset deprecation.
103         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
104         (update_tab_width): New function.
105         (tui_set_tab_width, tui_show_tab_width): New functions.
106         (tui_set_tab_width_command): Use update_tab_width.
107         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
108         Add new "set tui tab-width" command.
109         * tui/tui-source.c (tui_set_source_content): Update.
110         * tui/tui-disasm.c (tui_set_disassem_content): Update.
111         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
112         Don't declare.
113         (tui_tab_width): Declare.
114         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
115         (tui_set_default_tab_len): Remove.
116
117 2018-10-19  Tom Tromey  <tom@tromey.com>
118
119         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
120         (key_is_backspace, tui_getc): Don't declare.
121         * tui/tui-io.c (key_is_start_sequence): Now static.
122         (key_is_end_sequence, key_is_backspace): Remove.
123         (tui_getc): Now static.
124
125 2018-10-19  Tom Tromey  <tom@tromey.com>
126
127         * symfile.c (reread_symbols): Clear "static_links".
128
129 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
130
131         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
132         define.
133         (aarch64_linux_sigframe_init): Extra boundary checks.
134
135 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
136
137         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
138         the possibly non-existent tdesc type 'vec128', but the type of raw
139         register v16 instead.
140
141 2018-10-19  Gary Benson <gbenson@redhat.com>
142
143         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
144
145 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
146
147         PR cli/23785
148         * cli/cli-dump.c (restore_binary_file): Check if "file" is
149         NULL.
150
151 2018-10-17  Paul Koning  <paul_koning@dell.com>
152
153         * charset.c (convert_between_encodings): Fix unsigned overflow.
154
155 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
156
157         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
158         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
159         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
160         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
161         New functions.
162         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
163         and fbsd_info_proc_mappings_header.
164         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
165         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
166         New.
167
168 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
169
170         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
171         Solaris Maintainer.
172
173 2018-10-15  Tom Tromey  <tom@tromey.com>
174
175         * tui/tui.c (strcat_to_buf): Remove casts.
176         * tui/tui-winsource.c (tui_show_source_line)
177         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
178         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
179         * tui/tui-windata.c (tui_first_data_item_displayed)
180         (tui_delete_data_content_windows, tui_erase_data_content)
181         (tui_display_all_data, tui_display_data_from)
182         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
183         * tui/tui-win.c (tui_set_win_height)
184         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
185         casts.
186         * tui/tui-win.c (tui_resize_all): Remove casts.
187         (tui_scroll_backward_command, tui_set_focus)
188         (tui_set_tab_width_command): Likewise.
189         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
190         * tui/tui-regs.c (tui_show_register_group): Remove cast.
191         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
192         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
193         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
194         Remove casts.
195
196 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
197
198         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
199         AArch64/ARM maintainer.
200
201 2018-10-11  Gary Benson <gbenson@redhat.com>
202
203         * interps.h (interp::m_name): Make private and mutable.
204         * interps.c (interp::~interp): Free m_name.
205
206 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
207             Simon Marchi <simark@simark.ca>
208
209         * README (`configure' options): Add documentation for new
210         "--enable-unit-tests" option.
211         * acinclude.m4: Include "selftest.m4".
212         * configure: Regenerate.
213         * configure.ac: Use "GDB_AC_SELFTEST".
214         * maint.c (maintenance_selftest): Update message informing
215         that selftests have been disabled.
216         (maintenance_info_selftests): Likewise.
217         * selftest.m4: New file.
218
219 2018-10-10  Gary Benson <gbenson@redhat.com>
220
221         * remote.c (remote_target::remote_send_printf): Add
222         missing va_end found by Coverity.
223
224 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
225
226         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
227
228 2018-10-09  Tom Tromey  <tom@tromey.com>
229
230         * configure: Rebuild.
231         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
232         * NEWS: Update --enable-ubsan documentation.
233
234 2018-10-09  Gary Benson <gbenson@redhat.com>
235
236         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
237         found by Coverity.
238
239 2018-10-08  Tom Tromey  <tom@tromey.com>
240
241         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
242         variable.
243         (riscv_fbsd_init_abi): Likewise.
244
245 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
246         * valops.c (value_struct_elt_for_reference): Rename local variable
247         to work around the shadowing a previous local warning.
248
249 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
250
251         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
252         * NEWS: Mention new FreeBSD/riscv native configuration.
253         * configure.host: Add riscv*-*-freebsd*.
254         * configure.nat: Likewise.
255         * riscv-fbsd-nat.c: New file.
256
257 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
258
259         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
260         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
261         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
262         * NEWS: Mention new FreeBSD/riscv target.
263         * configure.tgt: Add riscv*-*-freebsd*.
264         * riscv-fbsd-tdep.c: New file.
265         * riscv-fbsd-tdep.h: New file.
266
267 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
268
269         * regcache.h (struct regcache_map_entry): Note that this type can
270         be used with traditional frame caches.
271         * trad-frame.c (trad_frame_set_reg_regmap): New.
272         * trad-frame.h (trad_frame_set_reg_regmap): New.
273
274 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
275
276         PR c++/16841
277         * valops.c (get_virtual_base_offset): New function.
278         (value_struct_elt_for_reference): Use it to get virtual base offset
279         and add it in calculating class member address.
280
281 2018-10-08   John Darrington <john@darrington.wattle.id.au>
282
283     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
284       (check_producer): Check if the producer is codewarrior.
285       (producer_is_codewarrior): New function.
286       (lnp_state_machine::record_line): Ignore is_stmt flag for records
287        produced by codewarrior.
288       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
289
290 2018-10-06  Tom Tromey  <tom@tromey.com>
291
292         PR python/19399:
293         * python/py-inferior.c: Add "architecture" entry.
294         (infpy_architecture): New function.
295
296 2018-10-06  Tom Tromey  <tom@tromey.com>
297
298         PR python/21765:
299         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
300         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
301         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
302         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
303
304 2018-10-06  Tom Tromey  <tom@tromey.com>
305
306         PR build/17077:
307         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
308         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
309         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
310         #include.
311
312 2018-10-06  Tom Tromey  <tom@tromey.com>
313
314         * python/py-breakpoint.c (bppy_get_location): Handle a
315         bp_breakpoint without a location.
316
317 2018-10-06  Tom Tromey  <tom@tromey.com>
318
319         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
320         (_RegEx): Reformat help text.
321         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
322         (AnyCallerIs, AnyCallerMatches): Reformat help text.
323         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
324         text.
325         * python/lib/gdb/command/xmethods.py (InfoXMethod)
326         (EnableXMethod, DisableXMethod): Remove help indentation.
327         Capitalize meta-syntactic variables.
328         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
329         (EnableUnwinder, DisableUnwinder): Remove help indentation.
330         Capitalize meta-syntactic variables.
331         * python/lib/gdb/command/explore.py (ExploreCommand)
332         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
333         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
334         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
335         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
336         Remove help indentation.
337         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
338         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
339         (DisableFrameFilter, SetFrameFilterPriority)
340         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
341
342 2018-10-06  Tom Tromey  <tom@tromey.com>
343
344         PR tui/28819:
345         * tui/tui-io.c (gdb_wgetch): New function.
346         (tui_mld_getc, tui_getc): Use it.
347
348 2018-10-05  Tom Tromey  <tom@tromey.com>
349
350         * sol-thread.c (sol_thread_target::wait): Rename inner
351         "save_ptid".
352
353 2018-10-04  Tom Tromey  <tom@tromey.com>
354
355         * configure: Rebuild.
356         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
357
358 2018-10-04  Tom Tromey  <tom@tromey.com>
359
360         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
361         declaration of "block".
362
363 2018-10-04  Tom Tromey  <tom@tromey.com>
364
365         * common/filestuff.c (fdwalk): Remove inner declaration of
366         "result".
367
368 2018-10-04  Tom Tromey  <tom@tromey.com>
369
370         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
371         "structs_addr" and hoist declaration.
372
373 2018-10-04  Tom Tromey  <tom@tromey.com>
374
375         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
376         variable "size".
377
378 2018-10-04  Tom Tromey  <tom@tromey.com>
379
380         * mdebugread.c (parse_partial_symbols): Use std::string.
381
382 2018-10-04  Tom Tromey  <tom@tromey.com>
383
384         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
385         * p-valprint.c (pascal_val_print): Split inner "i" variable.
386         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
387         header.
388         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
389         more inner scope.
390         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
391         * varobj.c (varobj_update): Rename inner "newobj",
392         "type_changed".
393         * valprint.c (generic_emit_char): Rename inner "buf".
394         * valops.c (find_overload_match): Rename inner "temp".
395         (value_struct_elt_for_reference): Declare "v" in more inner
396         scope.
397         * v850-tdep.c (v850_push_dummy_call): Rename "len".
398         * unittests/array-view-selftests.c (run_tests): Rename inner
399         "vec".
400         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
401         header.
402         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
403         "tsv" in more inner scope.
404         (print_one_static_tracepoint_marker): Rename inner
405         "tuple_emitter".
406         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
407         (tic6x_push_dummy_call): Don't redeclare "addr".
408         * target-float.c: Declare "dto" lower.
409         * symtab.c (lookup_local_symbol): Rename inner "sym".
410         (find_pc_sect_line): Rename inner "pc".
411         * stack.c (print_frame): Don't redeclare "gdbarch".
412         (return_command): Rename inner "gdbarch".
413         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
414         "sp".
415         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
416         header.
417         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
418         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
419         scope.
420         * remote.c (remote_target::update_thread_list): Don't redeclare
421         "tp".
422         (remote_target::process_initial_stop_replies): Rename inner
423         "thread".
424         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
425         (remote_target::wait_as): Don't redeclare "stop_reply".
426         (remote_target::get_thread_local_address): Rename inner
427         "result".
428         (remote_target::get_tib_address): Likewise.
429
430         * regcache.c (cooked_read_test): Rename "regnum".
431         * record-btrace.c (cmd_record_btrace_start): Rename inner
432         "exception".
433         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
434         loop header.
435         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
436         header.
437         (ppu2spu_sniffer): Rename inner "buf".
438         * parse.c (operator_check_standard): Rename inner "type",
439         "objfile".
440         * p-valprint.c (pascal_val_print): Introduce new scope for
441         "low_bound", "high_bound".
442         * p-exp.y (yylex): Declare "i" in loop header.
443         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
444         Lower declaration of "s".
445         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
446         header.
447         (nios2_push_dummy_call): Rename "len".
448         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
449         "buf".
450         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
451         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
452         (linux_xfer_osdata_modules): Likewise.
453         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
454         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
455         (mips_o64_push_dummy_call): Likewise.
456         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
457         "op".
458         * mi/mi-main.c (list_available_thread_groups): Rename inner
459         "tuple_emitter".
460         (mi_cmd_data_read_memory): Rename inner "opts".
461         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
462         "tuple_emitter".
463         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
464         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
465         more inner scope.
466         (parse_partial_symbols): Rename inner "pst", "p", "name"
467         * main.c (captured_main_1): Rename inner "i"s.
468         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
469         "oso2".
470         * linux-tdep.c (linux_info_proc): Rename inner "filename".
471         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
472         * infrun.c (handle_no_resumed): Don't redeclare "thread".
473         (handle_signal_stop): Rename inner "gdbarch".
474         (handle_command): Declare "signum" in loop header.
475         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
476         "status".
477         (examine_prologue): Rename inner "sol" and "sof".
478         (ia64_extract_return_value): Rename inner "val".  Declare another
479         "val" in a more inner scope.
480         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
481         inner scope.
482         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
483         "except".
484         * findvar.c (default_read_var_value): Don't redeclare "addr".
485         * f-exp.y (yylex): Declare "i" in loop header.
486         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
487         Rename inner "type", "expect_type".
488         (evaluate_subexp_for_sizeof): Rename inner "pc".
489         * elfread.c (elf_symfile_read): Rename inner "abfd".
490         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
491         "bytes_read".
492         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
493         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
494         (dwarf_decode_line_header): Rename inner "lh".
495         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
496         "offset".  Declare "i" in loop header.
497         (disassemble_dwarf_expression): Rename inner "addr_size".
498         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
499         inner "result".
500         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
501         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
502         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
503         "inner_list_emitter".
504         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
505         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
506         declaration in a block.
507         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
508         * cp-valprint.c (cp_print_value_fields): Don't redeclare
509         "obstack_final_size".
510         * cp-support.c (inspect_type): Declare "i" in loop header.
511         * compile/compile.c (compile_instance::insert_symbol_error):
512         Rename inner "e".
513         * common/agent.c (agent_run_command): Remove inner "ret"
514         declaration.
515         * coffread.c (coff_symfile_read): Rename inner "name".
516         (coff_symfile_read): Rename inner "abfd".
517         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
518         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
519         "high".
520         * c-exp.y (lex_one_token): Move "len" declaration lower.
521         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
522         "gdbarch".
523         (create_exception_master_breakpoint): Likewise.  Don't redeclare
524         "b".
525         (watch_command_1): Declare "mark" later.
526         (clear_command): Don't shadow "a" or "b".
527         (delete_command): Rename inner "b".
528         (delete_trace_command): Likewise.
529         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
530         "op".
531         (arm_gdbarch_init): Remove inner "e_flags".
532         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
533         "offset" in inner blocks.
534
535 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
536
537         * dwarf-index-write.c (file_write): Don't write if the vector is
538         empty.
539
540 2018-10-05  Tom de Vries  <tdevries@suse.de>
541
542         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
543         PyArg_ParseTuple call.
544
545 2018-10-05  Tom de Vries  <tdevries@suse.de>
546
547         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
548         PyArg_ParseTuple call.
549
550 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
551
552         * psymtab.c (recursively_search_psymtabs): Reformat parameters
553         to avoid exceeding 80 characters per line limit.
554
555 2018-10-04  Tom Tromey  <tom@tromey.com>
556
557         * symfile.c (syms_from_objfile_1, finish_new_objfile)
558         (reread_symbols): Update.
559         * complaints.h (clear_complaints): Remove argument.
560         * complaints.c (enum complaint_series): Remove.
561         (series): Remove global.
562         (complaint_internal): Update.
563         (clear_complaints): Remove argument.
564
565 2018-10-04  Tom Tromey  <tom@tromey.com>
566
567         * symfile.c (symbol_file_add_with_addrs): Do not print "no
568         debugging symbols" message if there is a separate debug objfile.
569
570 2018-10-04  Tom Tromey  <tom@tromey.com>
571
572         PR cli/19551:
573         * symfile.c (symbol_file_add_with_addrs): Update output.
574         * psymtab.c (require_partial_symbols): Update output.
575
576 2018-10-04  Tom Tromey  <tom@tromey.com>
577
578         PR cli/22234:
579         * complaints.c: Emit \n.
580
581 2018-10-04  Tom Tromey  <tom@tromey.com>
582
583         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
584         (separate_debug_file_exists, find_separate_debug_file)
585         (add_symbol_file_command, reread_symbols, allocate_symtab)
586         (allocate_compunit_symtab): Use filtered printing, not
587         unfiltered.
588         * psymtab.c (require_partial_symbols, dump_psymtab)
589         (allocate_psymtab): Use filtered printing, not unfiltered.
590
591 2018-10-04  Tom Tromey  <tom@tromey.com>
592
593         * complaints.c (complaint_internal): Correctly check complaint
594         count.
595
596 2018-10-04  Tom Tromey  <tom@tromey.com>
597
598         * complaints.h (struct complaints): Remove declaration.
599         * complaints.c (clear_complaints): Remove an unused variable.
600
601 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
602
603         * MAINTAINERS (Write After Approval): Add self.
604
605 2018-10-03  Tom Tromey  <tom@tromey.com>
606
607         * guile/scm-value.c (gdbscm_value_to_string): Initialize
608         "buffer_contents".
609         * coffread.c (coff_symtab_read): Initialize "newobj".
610
611 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
612
613         * dwarf2read.c (read_func_scope): Remove struct keyword in
614         range-based for.
615
616 2018-10-03  Tom Tromey  <tom@tromey.com>
617
618         * README: Mention --enable-ubsan.
619         * NEWS: Mention --enable-ubsan.
620         * acinclude.m4: Include sanitize.m4.
621         * configure: Rebuild.
622         * configure.ac: Call AM_GDB_UBSAN.
623         * sanitize.m4: New file.
624
625 2018-10-03  Tom Tromey  <tom@tromey.com>
626
627         * expression.h (enum exp_opcode): Use uint8_t as base type.
628         * expprint.c (op_name): Handle invalid opcodes.
629
630 2018-10-03  Tom Tromey  <tom@tromey.com>
631
632         * parse.c (prefixify_expression): Add assert.
633         (parse_exp_in_context_1): Throw exception if the expression is
634         empty.
635
636 2018-10-03  Tom Tromey  <tom@tromey.com>
637
638         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
639
640 2018-10-03  Tom Tromey  <tom@tromey.com>
641
642         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
643
644 2018-10-03  Tom Tromey  <tom@tromey.com>
645
646         * dwarf2read.c (read_subrange_type): Make "negative_mask"
647         unsigned.
648
649 2018-10-03  Tom Tromey  <tom@tromey.com>
650
651         * findvar.c (extract_integer): Do work in an unsigned type.
652
653 2018-10-03  Tom Tromey  <tom@tromey.com>
654
655         * common/enum-flags.h (enum_flags::operator~): Add static assert.
656         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
657         base type.
658         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
659         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
660         type.
661         * c-lang.h (enum c_string_type_values): Use unsigned as base
662         type.
663         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
664
665 2018-10-03  Tom Tromey  <tom@tromey.com>
666
667         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
668         <~dwarf2_frame_state_reg_info>: Update.
669         <dwarf2_frame_state_reg_info>: Update.
670         <alloc_regs>: Add assertion.  Update.
671         <reg>: Now a std::vector.
672         <num_regs>: Remove.
673         <swap>: Update.
674         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
675         (execute_cfa_program_test, dwarf2_frame_cache): Update.
676
677 2018-10-03  Tom Tromey  <tom@tromey.com>
678
679         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
680
681 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
682
683         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
684
685 2018-10-02  Tom Tromey  <tom@tromey.com>
686
687         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
688
689 2018-10-02  John Darrington <john@darrington.wattle.id.au>
690
691         * NEWS: Mention changed commands.
692         * ser-uds.c: New file.
693         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
694         * configure: Regenerate.
695         * Makefile.in: Add new file.
696         * serial.c (serial_open): Check if filename is a socket
697           and lookup the appropriate interface accordingly.
698
699 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
700
701         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
702         define.
703         (AARCH64_EXTRA_MAGIC): Likewise.
704         (AARCH64_FPSIMD_MAGIC): Likewise.
705         (AARCH64_SVE_MAGIC): Likewise.
706         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
707         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
708         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
709         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
710         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
711         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
712         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
713         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
714         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
715         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
716         (read_aarch64_ctx): Add function.
717         (aarch64_linux_sigframe_init): Detect FP registers.
718
719 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
720
721         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
722         (AARCH64_D0_REGNUM): Likewise.
723         (AARCH64_S0_REGNUM): Likewise.
724         (AARCH64_H0_REGNUM): Likewise.
725         (AARCH64_B0_REGNUM): Likewise.
726         (AARCH64_SVE_V0_REGNUM): Likewise.
727         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
728         (AARCH64_D0_REGNUM): Likewise.
729         (AARCH64_S0_REGNUM): Likewise.
730         (AARCH64_H0_REGNUM): Likewise.
731         (AARCH64_B0_REGNUM): Likewise.
732         (AARCH64_SVE_V0_REGNUM): Likewise.
733
734 2018-10-01  Gary Benson <gbenson@redhat.com>
735
736         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
737         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
738         prfpregset_t instead of gdb_prfpregset_t.
739         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
740         * configure, config.in: Rebuild.
741
742 2018-10-01  Gary Benson <gbenson@redhat.com>
743
744         * common/gdb_proc_service.h: New file, factored out from...
745         * gdb_proc_service.h: Moved common code to the above file.
746         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
747
748 2018-10-01  Gary Benson <gbenson@redhat.com>
749
750         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
751         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
752
753 2018-10-01  Gary Benson <gbenson@redhat.com>
754
755         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
756         (AC_CHECK_HEADERS): Check for linux/elf.h.
757         * configure, config.in: Rebuild.
758         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
759         doesn't define elf_fpregset_t.
760
761 2018-10-01  Gary Benson <gbenson@redhat.com>
762
763         * gdb_proc_service.h: Whitespace change.
764
765 2018-10-01  Tom Tromey  <tom@tromey.com>
766
767         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
768         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
769         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
770
771 2018-10-01  Tom Tromey  <tom@tromey.com>
772
773         * README: Minor change.
774
775 2018-09-30  Pedro Alves  <palves@redhat.com>
776
777         * darwin-nat-info.c (darwin_debug_regions_recurse)
778         (info_mach_exceptions_command): Remove unused local variables.
779         * darwin-nat.c (darwin_decode_notify_message)
780         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
781         (darwin_stop_inferior, darwin_setup_exceptions)
782         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
783         (darwin_nat_target::attach, darwin_nat_target::detach)
784         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
785         local variables.
786         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
787         variables.
788
789 2018-09-29  Tom Tromey  <tom@tromey.com>
790
791         * README: Remove some leftover text.
792
793 2018-09-29  Tom Tromey  <tom@tromey.com>
794
795         * PROBLEMS: Rewrite.
796         * README: Update.
797
798 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
799
800         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
801         case with explicit breakpoint kind.
802         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
803         'additional_info' and related logic.
804         (riscv_debug_breakpoints): New variable.
805         (riscv_breakpoint_kind_from_pc): Use the length of the existing
806         instruction to determine the breakpoint kind.
807         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
808         flag.  Update description of 'set/show riscv
809         use-compressed-breakpoints' flag.
810
811 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
812
813         (NEWS): Mention changes to frame related commands.
814         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
815         (add_prefix_cmd_suppress_notification): New function.
816         (add_com_suppress_notification): Call
817         add_cmd_suppress_notification.
818         * command.h (add_cmd_suppress_notification): Declare.
819         (add_prefix_cmd_suppress_notification): Declare.
820         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
821         (parse_frame_specification): Moved from stack.c, with
822         simplification to handle a single argument.
823         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
824         switch to the selected frame.  Add a header comment.
825         * stack.c: Remove 'safe-ctype.h' include.
826         (find_frame_for_function): Add declaration.
827         (find_frame_for_address): New function.
828         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
829         (frame_selection_by_function_completer): New function.
830         (info_frame_command): Rename to...
831         (info_frame_command_core): ...this, and update parameter types.
832         (select_frame_command): Rename to...
833         (select_frame_command_core): ...this, and update parameter types.
834         (frame_command): Rename to...
835         (frame_command_core): ...this, and update parameter types.
836         (class frame_command_helper): New class to wrap implementations of
837         frame related sub-commands.
838         (frame_apply_cmd_list): New static global.
839         (frame_cmd_list): Make static.
840         (select_frame_cmd_list): New global for sub-commands.
841         (info_frame_cmd_list): New global for sub-commands.
842         (_initialize_stack): Register sub-commands for 'frame',
843         'select-frame', and 'info frame'.  Update 'frame apply' commands
844         to use frame_apply_cmd_list.  Move function local static
845         frame_apply_list to file static frame_apply_cmd_list for
846         consistency.
847         * stack.h (select_frame_command): Delete declarationn.
848         (select_frame_for_mi): Declare new function.
849
850 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
851
852         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
853         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
854         and NOP.
855
856 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
857
858         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
859
860 2018-09-26  Tom Tromey  <tom@tromey.com>
861
862         * valops.c (auto_abandon): Remove dead code.
863
864 2018-09-26  Tom Tromey  <tom@tromey.com>
865
866         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
867
868 2018-09-24  Tom Tromey  <tom@tromey.com>
869
870         * common/pathstuff.c (get_standard_cache_dir): Make
871         "xdg_cache_home" and "home" const.
872         * top.c (init_history): Make "tmpenv" const.
873         * main.c (get_init_files): Make "homedir" const.
874
875 2018-09-23  Tom Tromey  <tom@tromey.com>
876
877         PR python/18852:
878         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
879
880 2018-09-23  Tom Tromey  <tom@tromey.com>
881
882         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
883         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
884         * python/python-internal.h (gdbpy_handle_exception): Declare.
885         * python/py-utils.c (gdbpy_handle_exception): New function.
886
887 2018-09-23  Tom Tromey  <tom@tromey.com>
888
889         PR python/17284:
890         * python/py-type.c (typy_template_argument): Check for negative
891         argument number.
892
893 2018-09-23  Tom Tromey  <tom@tromey.com>
894
895         PR python/14062:
896         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
897
898 2018-09-23  Tom Tromey  <tom@tromey.com>
899
900         PR python/18170:
901         * python/py-value.c (valpy_int): Allow conversion from pointer
902         type.
903
904 2018-09-23  Tom Tromey  <tom@tromey.com>
905
906         PR python/20126:
907         * python/py-value.c (valpy_int): Respect type sign.
908
909 2018-09-23  Tom Tromey  <tom@tromey.com>
910
911         PR python/18352;
912         * python/py-value.c (valpy_float): Allow conversions from int or
913         char.
914         (valpy_int, valpy_long): Allow conversions from float.
915
916 2018-09-23  Tom Tromey  <tom@tromey.com>
917
918         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
919         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
920
921 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
922
923         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
924         __sighndlr.
925         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
926
927 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
928
929         * windows-nat.c (windows_nat_target::wait): Remove a spurious
930         target_terminal::ours().
931
932 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
933
934         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
935         of vl to ULONGEST.
936
937 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
938
939         * breakpoint.c (update_inserted_breakpoint_locations): Remove
940         redundant condition.
941
942 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
943
944         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
945
946         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
947         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
948         * sol-thread.c (ps_pdmodel): Don't guard definition.
949
950         * procfs.c: Fix formatting.
951
952         * procfs.c (sysset_t_alloc): Remove.
953         (create_procinfo): Use XNEW instead of sysset_t_alloc.
954         (procfs_debug_inferior): Likewise.
955         (procfs_set_exec_trap): Likewise.
956         (proc_set_traced_sysentry): Don't allocate argp dynamically.
957         (proc_set_traced_sysexit): Likewise.
958
959         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
960         (dead_procinfo): Likewise.
961         (proc_warn): Likewise.
962         (proc_error): Likewise.
963         (proc_get_LDT_entry): Likewise.
964         (do_attach): Likewise.
965         (procfs_target::pid_to_str): Likewise.
966         (iterate_over_mappings): Likewise.
967
968         * procfs.c (create_procinfo): Fix ARI warning.
969         (proc_get_status): Likewise.
970         (proc_stop_process): Likewise.
971         (proc_run_process): Likewise.
972         (proc_kill): Likewise.
973         (proc_get_LDT_entry): Likewise.
974         (procfs_find_LDT_entry): Likewise.
975         (proc_update_threads): Likewise.
976         (proc_iterate_over_threads): Likewise.
977         (do_attach): Likewise.
978         (procfs_xfer_memory): Likewise.
979         (invalidate_cache): Likewise.
980         (procfs_target::resume): Likewise.
981         (procfs_init_inferior): Likewise.
982         (procfs_set_exec_trap): Likewise.
983         (procfs_target::thread_alive): Likewise.
984         (procfs_target::pid_to_exec_file): Likewise.
985         (iterate_over_mappings): Likewise.
986         (procfs_target::make_corefile_notes): Likewise.
987         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
988
989         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
990         (procfs_find_LDT_entry): Likewise.
991         * sol-thread.c (ps_lgetLDT): Likewise.
992
993 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
994
995         PR tdep/17903
996         * procfs.c (procfs_target): Declare pid_to_exec_file.
997         (procfs_target::pid_to_exec_file): New.
998
999 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1000
1001         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1002         renaming.
1003         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1004         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1005
1006 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1007
1008         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1009         (supply_fpregset, fill_fpregset): Move ...
1010         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1011         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1012         Remove references to ioctl-based procfs.
1013         Include <sys/reg.h>.
1014         Remove PR_MODEL_NATIVE guards.
1015         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1016         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1017
1018 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1019
1020         PR gdb/20981:
1021         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1022         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1023         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1024
1025 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1026
1027         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1028         (fbsd_print_sockaddr_in6): Likewise.
1029
1030 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1031             Chris January  <chris.january@arm.com>
1032
1033         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1034         (evaluate_subexp_standard): Return a dummy type when
1035         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1036         OP_F77_UNDETERMINED_ARGLIST case.
1037         * expression.h (enum noside): Update comment.
1038
1039 2018-09-19  George Vasick <george.vasick@oracle.com>
1040
1041         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1042
1043 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1044             April Chin <april.chin@oracle.com>
1045             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1046
1047         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1048         uint_t lwpid_t.
1049         (create_procinfo): Print pids in /proc without leading zeros.
1050
1051 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1052
1053         * nios2-tdep.c (nios2_gcc_target_options): New.
1054         (nios2_gdb_arch_init): Install new hook.
1055
1056 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1057
1058         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1059         New file.
1060         * update-gnulib.sh: Apply patch.
1061         * configure: Re-generate.
1062
1063 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1064
1065         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1066         description.  Make "info proc" command descriptions more
1067         consistent.
1068
1069 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1070
1071         * NEWS: Mention 'info proc files' command.
1072
1073 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1074
1075         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1076         descriptors for IP_FILES and IP_ALL.
1077
1078 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1079
1080         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1081         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1082         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1083         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1084         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1085         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1086         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1087         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1088         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1089         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1090         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1091         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1092         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1093         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1094         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1095         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1096         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1097         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1098         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1099         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1100         (struct fbsd_sockaddr_un): New types.
1101         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1102         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1103         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1104         (fbsd_core_info_proc_files): New functions.
1105         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1106         IP_ALL.
1107         * fbsd-tdep.h (fbsd_info_proc_files_header)
1108         (fbsd_info_proc_files_entry): New.
1109
1110 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1111
1112         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1113         * infcmd.c (info_proc_cmd_files): New function.
1114         (_initialize_infcmd): Register 'info proc files' command.
1115
1116 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1117
1118         * gnulib/aclocal-m4-deps.mk: Re-generate.
1119         * gnulib/aclocal.m4: Re-generate.
1120         * gnulib/config.in: Re-generate.
1121         * gnulib/configure: Re-generate.
1122         * gnulib/import/Makefile.am: Re-generate.
1123         * gnulib/import/Makefile.in: Re-generate.
1124         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1125         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1126         * gnulib/import/arpa_inet.in.h: New file.
1127         * gnulib/import/inet_ntop.c: New file.
1128         * gnulib/import/m4/arpa_inet_h.m4: New file.
1129         * gnulib/import/m4/inet_ntop.m4: New file.
1130         * gnulib/import/m4/netinet_in_h.m4: New file.
1131         * gnulib/import/m4/socklen.m4: New file.
1132         * gnulib/import/m4/sockpfaf.m4: New file.
1133         * gnulib/import/m4/stdalign.m4: New file.
1134         * gnulib/import/m4/sys_uio_h.m4: New file.
1135         * gnulib/import/netinet_in.in.h: New file.
1136         * gnulib/import/stdalign.in.h: New file.
1137         * gnulib/import/sys_socket.c: New file.
1138         * gnulib/import/sys_socket.in.h: New file.
1139         * gnulib/import/sys_uio.in.h: New file.
1140         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1141         module.
1142
1143 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1144
1145         * gnulib/aclocal-m4-deps.mk: New file.
1146         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1147         deterministically.
1148
1149 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1150
1151         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1152         KVE_PATH.
1153
1154 2018-09-18  Tom Tromey  <tom@tromey.com>
1155
1156         * compile/compile-object-load.c (struct
1157         link_hash_table_cleanup_data): Add constructor and destructor.
1158         Use DISABLE_COPY_AND_ASSIGN.
1159         (~link_hash_table_cleanup_data): Rename from
1160         link_hash_table_free.  Now a destructor.
1161         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1162
1163 2018-09-18  Tom Tromey  <tom@tromey.com>
1164
1165         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1166         * compile/compile-object-load.c (struct munmap_list): Move to
1167         header file.
1168         (munmap_list::add): Rename from munmap_list_add; rewrite.
1169         (munmap_list::~munmap_list): Rename from munmap_list_free.
1170         (munmap_listp_free_cleanup): Remove.
1171         (compile_object_load): Update.
1172         * compile/compile-object-load.h (struct munmap_list): Move from
1173         compile-object-load.c.  Rewrite.
1174
1175 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1176
1177         * aarch64-tdep.c (pass_in_v): Use register size.
1178         (aarch64_extract_return_value): Likewise.
1179         (aarch64_store_return_value): Likewise.
1180
1181 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1182
1183         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1184         rlim_t.
1185
1186 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1187
1188         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1189         Fix short help line.
1190
1191 2018-09-17  Tom Tromey  <tom@tromey.com>
1192
1193         PR python/20445:
1194         * configure: Rebuild.
1195         * configure.ac: Conditionally use -DNDEBUG for Python.
1196
1197 2018-09-17  Tom Tromey  <tom@tromey.com>
1198
1199         * configure: Rebuild.
1200         * configure.ac: Use gmp as a library dependency when checking for
1201         mpfr.
1202
1203 2018-09-17  Pedro Alves  <palves@redhat.com>
1204
1205         * python/py-inferior.c (find_inferior_object): Delete.
1206
1207 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1208
1209         * compile/compile-cplus-types.c
1210         (compile_cplus_instance::enter_scope): Don't use new_scope after
1211         std::move.
1212
1213 2018-09-17  Tom Tromey  <tom@tromey.com>
1214
1215         * common/pathstuff.c (get_standard_cache_dir): Use
1216         ~/Library/Caches on macOS.
1217         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1218
1219 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1220
1221         PR python/23669
1222         * breakpoint.c (commands_cmd_element): New.
1223         (_initialize_breakpoint): Assign commands_cmd_element.
1224         * breakpoint.h (commands_cmd_element): New.
1225         * cli/cli-script.c (while_cmd_element, if_command,
1226         define_cmd_element): New.
1227         (command_name_equals): Remove.
1228         (process_next_line): Compare commands by pointer, not by name.
1229         (_initialize_cli_script): Assign the various cmd_list_element
1230         variables.
1231         * compile/compile.c (compile_cmd_element): New.
1232         (_initialize_compile): Assign compile_cmd_element.
1233         * compile/compile.h (compile_cmd_element): New.
1234         * guile/guile.c (guile_cmd_element): New.
1235         (install_gdb_commands): Assign guile_cmd_element.
1236         * guile/guile.h (guile_cmd_element): New.
1237         * python/python.c (python_cmd_element): New.
1238         (_initialize_python): Assign python_cmd_element.
1239         * python/python.h (python_cmd_element): New.
1240         * tracepoint.c (while_stepping_cmd_element): New.
1241         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1242         * tracepoint.h (while_stepping_cmd_element): New.
1243
1244 2018-09-17  Tom Tromey  <tom@tromey.com>
1245
1246         * infrun.c (save_infcall_suspend_state): Return
1247         infcall_suspend_state_up.
1248         (save_infcall_control_state): Return infcall_control_state_up.
1249         * inferior.h (save_infcall_suspend_state)
1250         (save_infcall_control_state): Declare later.  Return unique
1251         pointers.
1252
1253 2018-09-17  Tom Tromey  <tom@tromey.com>
1254
1255         * infrun.c (struct stop_context): Declare constructor,
1256         destructor, "changed" method.
1257         (stop_context::stop_context): Rename from save_stop_context.
1258         (stop_context::~stop_context): Rename from
1259         release_stop_context_cleanup.
1260         (normal_stop): Update.
1261         (stop_context::changed): Rename from stop_context_changed.  Return
1262         bool.
1263
1264 2018-09-17  Tom Tromey  <tom@tromey.com>
1265
1266         * inferior.h (struct infcall_suspend_state_deleter): New.
1267         (infcall_suspend_state_up): New typedef.
1268         (struct infcall_control_state_deleter): New.
1269         (infcall_control_state_up): New typedef.
1270         (make_cleanup_restore_infcall_suspend_state)
1271         (make_cleanup_restore_infcall_control_state): Don't declare.
1272         * infcall.c (call_function_by_hand_dummy): Update.
1273         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1274         (make_cleanup_restore_infcall_suspend_state): Remove.
1275         (do_restore_infcall_control_state_cleanup)
1276         (make_cleanup_restore_infcall_control_state): Remove.
1277
1278 2018-09-17  Tom Tromey  <tom@tromey.com>
1279
1280         * gdbthread.h (struct thread_control_state): Add initializer.
1281         (class thread_info) <control>: Remove initializer.
1282         * inferior.h (struct inferior_control_state): Add initializer.
1283         (class inferior) <control>: Remove initializer.
1284         (exit_inferior_1): Update.
1285         * infrun.c (struct infcall_control_state): Add constructors.
1286         (save_infcall_control_state): Use new.
1287         (restore_infcall_control_state, discard_infcall_control_state):
1288         Use delete.
1289
1290 2018-09-17  Tom Tromey  <tom@tromey.com>
1291
1292         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1293         unique_ptr.
1294         <siginfo_data>: Now a unique_xmalloc_ptr.
1295         (save_infcall_suspend_state, restore_infcall_suspend_state)
1296         (discard_infcall_suspend_state)
1297         (get_infcall_suspend_state_regcache): Update.
1298
1299 2018-09-17  Tom Tromey  <tom@tromey.com>
1300
1301         * gdbthread.h (struct thread_suspend_state): Add initializers.
1302         (class thread_info) <suspend>: Remove initializer.
1303         * infrun.c (struct infcall_suspend_state): Add initializers.
1304         (save_infcall_suspend_state): Use new.
1305         (discard_infcall_suspend_state): Use delete.
1306
1307 2018-09-16  Tom Tromey  <tom@tromey.com>
1308
1309         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1310         Remove.
1311         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1312         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1313         (py_varobj_iter_new): Likewise.
1314         (py_varobj_get_iterator): Use gdbpy_ref.
1315
1316 2018-09-16  Tom Tromey  <tom@tromey.com>
1317
1318         * python/py-threadevent.c (py_get_event_thread): Simplify.
1319         * python/py-inferior.c (infpy_thread_from_thread_handle):
1320         Return immediately after calling thread_to_thread_object.  Use
1321         Py_RETURN_NONE.
1322         (thread_to_thread_object): Set the exception on a NULL return.
1323
1324 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1325
1326         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1327
1328 2018-09-16  Tom Tromey  <tom@tromey.com>
1329
1330         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1331         Remove.
1332
1333 2018-09-16  Tom Tromey  <tom@tromey.com>
1334
1335         * python/python-internal.h (thread_to_thread_object): Change
1336         return type.
1337         * python/py-inferior.c (thread_to_thread_object): Return a new
1338         reference.
1339         (infpy_thread_from_thread_handle): Update.
1340         * python/py-infthread.c (gdbpy_selected_thread): Update.
1341         * python/py-stopevent.c (create_stop_event_object): Update.
1342         * python/py-threadevent.c (py_get_event_thread): Return a new
1343         reference.
1344         (py_get_event_thread): Update.
1345         * python/py-event.h (py_get_event_thread): Change return type.
1346         * python/py-continueevent.c (create_continue_event_object):
1347         Update.
1348
1349 2018-09-16  Tom Tromey  <tom@tromey.com>
1350
1351         * python/py-progspace.c (pspy_get_objfiles): Update.
1352         * python/python-internal.h (objfile_to_objfile_object): Change
1353         return type.
1354         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1355         Update.
1356         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1357         Update.
1358         * python/python.c (gdbpy_get_current_objfile): Update.
1359         (gdbpy_objfiles): Update.
1360         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1361         Update.
1362         (objfile_to_objfile_object): Return a new reference.
1363         * python/py-symtab.c (stpy_get_objfile): Update.
1364         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1365         Update.
1366
1367 2018-09-16  Tom Tromey  <tom@tromey.com>
1368
1369         * python/py-inferior.c (infpy_get_progspace): Update.
1370         * python/python-internal.h (pspace_to_pspace_object): Change
1371         return type.
1372         * python/py-newobjfileevent.c
1373         (create_clear_objfiles_event_object): Update.
1374         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1375         Update.
1376         * python/python.c (gdbpy_get_current_progspace): Update.
1377         (gdbpy_progspaces): Update.
1378         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1379         reference.
1380         * python/py-objfile.c (objfpy_get_progspace): Update.
1381         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1382         Update.
1383
1384 2018-09-16  Tom Tromey  <tom@tromey.com>
1385
1386         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1387         (solib_name, block_for_pc, find_pc_line): New functions.
1388         (execute_unwinders): Update.
1389         * python/py-block.c (gdbpy_block_for_pc): Remove.
1390         * python/py-inferior.c (infpy_get_progspace): New function.
1391         (inferior_object_getset) <progspace>: Add.
1392         * python/py-progspace.c (pspy_objfiles): Rewrite.
1393         (pspy_solib_name, pspy_block_for_pc)
1394         (pspy_find_pc_line, pspy_is_valid): New functions.
1395         (progspace_object_methods): Add entries for solib_name,
1396         block_for_pc, find_pc_line, is_valid.
1397         * python/python-internal.h (gdbpy_block_for_pc)
1398         (build_objfiles_list): Don't declare.
1399         * python/python.c: Don't include solib.h.
1400         (gdbpy_solib_name, gdbpy_find_pc_line)
1401         (gdbpy_get_current_progspace, build_objfiles_list)
1402         (gdbpy_objfiles): Remove.
1403         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1404         solib_name, find_pc_line>: Remove entries.
1405
1406 2018-09-16  Tom Tromey  <tom@tromey.com>
1407
1408         * top.c (new_ui_command): Use GNU style for metasyntactic
1409         variables.
1410         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1411         variables.
1412         * maint.c (maintenance_translate_address): Remove "<>" around
1413         text.
1414         * interps.c (interpreter_exec_cmd): Use GNU style for
1415         metasyntactic variables.
1416         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1417         metasyntactic variables.
1418         * tracepoint.c (tfind_range_command): Use GNU style for
1419         metasyntactic variables.
1420         (tfind_outside_command): Likewise.
1421         (_initialize_tracepoint): Likewise.
1422         * remote.c (extended_remote_target::create_inferior): Use GNU
1423         style for metasyntactic variables.
1424         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1425         metasyntactic variables.
1426         (adi_assign_command): Likewise.
1427
1428 2018-09-16  Tom Tromey  <tom@tromey.com>
1429
1430         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1431         metasyntactic variables.  Print message if no disassembler options
1432         are available.
1433
1434 2018-09-15  Tom Tromey  <tom@tromey.com>
1435
1436         * infcmd.c (get_inferior_args): Return const char *.
1437         * inferior.h (get_inferior_args): Return type now const.
1438         * linux-tdep.c (linux_fill_prpsinfo): Update.
1439         * procfs.c (procfs_target::make_corefile_notes): Update.
1440
1441 2018-09-07  Tom Tromey  <tom@tromey.com>
1442
1443         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1444         inside the TRY.
1445
1446 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1447
1448         * nios2-tdep.c (nios2_type_align): New.
1449         (nios2_gdb_arch_init): Install type_align hook.
1450
1451 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1452
1453         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1454         type that is neither object file owned, nor gdbarch owned.
1455         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1456         gdbarch is non-NULL.
1457         (alloc_type_instance): Allocate non-objfile owned types on the
1458         gdbarch obstack.
1459         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1460         using TYPE_ALLOC to ensure memory is allocated on the correct
1461         obstack.
1462         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1463         obstack, or the gdbarch obstack.
1464         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1465
1466 2018-09-14  Tom Tromey  <tom@tromey.com>
1467
1468         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1469         block.
1470
1471 2018-09-14  Tom Tromey  <tom@tromey.com>
1472
1473         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1474
1475 2018-09-13  Tom Tromey  <tom@tromey.com>
1476
1477         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1478         static.
1479
1480 2018-09-13  Tom Tromey  <tom@tromey.com>
1481
1482         * exec.c (try_open_exec_file): Use std::string.
1483
1484 2018-09-13  Tom Tromey  <tom@tromey.com>
1485
1486         * utils.h (gdb_bfd_errmsg): Return std::string.
1487         * exec.c (exec_file_attach): Update.
1488         * compile/compile-object-load.c (compile_object_load): Update.
1489         * utils.c (gdb_bfd_errmsg): Return std::string.
1490
1491 2018-09-13  Tom Tromey  <tom@tromey.com>
1492
1493         * procfs.c (struct procinfo_deleter): New.
1494         (procinfo_up): New typedef.
1495         (do_destroy_procinfo_cleanup): Remove.
1496         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1497
1498 2018-09-13  Tom Tromey  <tom@tromey.com>
1499
1500         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1501
1502 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1503 2018-09-13  Tom Tromey  <tom@tromey.com>
1504
1505         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1506         (pspy_get_objfiles): New function.
1507         (progspace_object_methods): New.
1508         (pspace_object_type): Add tp_methods callback.
1509         * python/python-internal.h (build_objfiles_list): New
1510         declaration.
1511         * python/python.c (build_objfiles_list): New function.
1512         (gdbpy_objfiles): Implement using build_objfiles_list.
1513         * NEWS: Mention the Progspace.objfiles method.
1514
1515 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1516
1517         * python/py-inferior.c (infpy_get_progspace): New function.
1518         (inferior_object_getset): Add progspace property.
1519         * NEWS: Mention the new property.
1520
1521 2018-09-13  Tom Tromey  <tom@tromey.com>
1522
1523         PR rust/23650:
1524         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1525
1526 2018-09-13  Tom Tromey  <tom@tromey.com>
1527
1528         PR rust/23626:
1529         * rust-lang.c (rust_enum_variant): Now static.
1530         (rust_empty_enum_p): New function.
1531         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1532         Handle empty enum.
1533
1534 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1535
1536         * python/py-inferior.c (infpy_repr): New.
1537         (inferior_object_type): Register infpy_repr.
1538         * python/py-objfile.c (objfpy_repr): New.
1539         (objfile_object_type): Register objfpy_repr.
1540
1541 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1542
1543         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1544
1545 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1546
1547         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1548         typo.
1549
1550 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1551
1552         * common/common-utils.c: Don't include '<sys/stat.h>'.
1553         (is_regular_file): Move to...
1554         * common/filestuff.c (is_regular_file): ... here.
1555         * common/common-utils.h (is_regular_file): Move to...
1556         * common/filestuff.h (is_regular_file): ... here.
1557
1558 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1559
1560         * skip.c (debug_skip): New variable.
1561         (skiplist_entry::do_skip_file_p): Add debug output.
1562         (skiplist_entry::do_skip_gfile_p): Likewise.
1563         (skiplist_entry::skip_function_p): Likewise.
1564         (_initialize_step_skip): Create debug command.
1565         * NEWS: Mention set/show debug skip.
1566
1567 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1568
1569         * darwin-nat.c (should_disable_startup_with_shell):
1570         New function.
1571         (darwin_nat_target::create_inferior): Add call.
1572
1573 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1574
1575         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1576         inf_port, msg_state>: Initialize.
1577         (struct darwin_thread_info) <signaled, single_step>: Change
1578         type and initialize.
1579         (struct darwin_thread_info) <event>: Initialize.
1580
1581 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1582
1583         PR gdb/23555
1584         PR gdb/23558
1585         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1586         guesses.
1587
1588 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1589
1590         Revert:
1591         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1592
1593         PR gdb/23555
1594         PR gdb/23558
1595         * gnulib/aclocal.m4: Regenerate.
1596         * gnulib/config.in: Regenerate.
1597         * gnulib/configure: Regenerate.
1598         * gnulib/import/Makefile.am: Update.
1599         * gnulib/import/Makefile.in: Update.
1600         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1601         * gnulib/import/_Noreturn.h: ... this.
1602         * gnulib/import/alloca.in.h: Update.
1603         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1604         * gnulib/import/arg-nonnull.h: ... this.
1605         * gnulib/import/assure.h: Update.
1606         * gnulib/import/at-func.c: Update.
1607         * gnulib/import/basename-lgpl.c: Update.
1608         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1609         * gnulib/import/c++defs.h: ... this.
1610         * gnulib/import/canonicalize-lgpl.c: Update.
1611         * gnulib/import/cdefs.h: Update.
1612         * gnulib/import/chdir-long.c: Update.
1613         * gnulib/import/chdir-long.h: Update.
1614         * gnulib/import/cloexec.c: Update.
1615         * gnulib/import/cloexec.h: Update.
1616         * gnulib/import/close.c: Update.
1617         * gnulib/import/closedir.c: Update.
1618         * gnulib/import/config.charset: Update.
1619         * gnulib/import/dirent-private.h: Update.
1620         * gnulib/import/dirent.in.h: Update.
1621         * gnulib/import/dirfd.c: Update.
1622         * gnulib/import/dirname-lgpl.c: Update.
1623         * gnulib/import/dirname.h: Update.
1624         * gnulib/import/dosname.h: Update.
1625         * gnulib/import/dup-safer-flag.c: Update.
1626         * gnulib/import/dup-safer.c: Update.
1627         * gnulib/import/dup.c: Update.
1628         * gnulib/import/dup2.c: Update.
1629         * gnulib/import/errno.in.h: Update.
1630         * gnulib/import/error.c: Update.
1631         * gnulib/import/error.h: Update.
1632         * gnulib/import/exitfail.c: Update.
1633         * gnulib/import/exitfail.h: Update.
1634         * gnulib/import/extra/update-copyright: Update.
1635         * gnulib/import/fchdir.c: Update.
1636         * gnulib/import/fcntl.c: Update.
1637         * gnulib/import/fcntl.in.h: Update.
1638         * gnulib/import/fd-hook.c: Update.
1639         * gnulib/import/fd-hook.h: Update.
1640         * gnulib/import/fd-safer-flag.c: Update.
1641         * gnulib/import/fd-safer.c: Update.
1642         * gnulib/import/fdopendir.c: Update.
1643         * gnulib/import/filename.h: Update.
1644         * gnulib/import/filenamecat-lgpl.c: Update.
1645         * gnulib/import/filenamecat.h: Update.
1646         * gnulib/import/flexmember.h: Update.
1647         * gnulib/import/float+.h: Update.
1648         * gnulib/import/float.c: Update.
1649         * gnulib/import/float.in.h: Update.
1650         * gnulib/import/fnmatch.c: Update.
1651         * gnulib/import/fnmatch.in.h: Update.
1652         * gnulib/import/fnmatch_loop.c: Update.
1653         * gnulib/import/fpucw.h: Update.
1654         * gnulib/import/frexp.c: Update.
1655         * gnulib/import/frexpl.c: Update.
1656         * gnulib/import/fstat.c: Update.
1657         * gnulib/import/fstatat.c: Update.
1658         * gnulib/import/getcwd-lgpl.c: Update.
1659         * gnulib/import/getcwd.c: Update.
1660         * gnulib/import/getdtablesize.c: Update.
1661         * gnulib/import/getlogin_r.c: Update.
1662         * gnulib/import/getprogname.c: Update.
1663         * gnulib/import/getprogname.h: Update.
1664         * gnulib/import/gettext.h: Update.
1665         * gnulib/import/gettimeofday.c: Update.
1666         * gnulib/import/glob-libc.h: Update.
1667         * gnulib/import/glob.c: Update.
1668         * gnulib/import/glob.in.h: Update.
1669         * gnulib/import/glob_internal.h: Update.
1670         * gnulib/import/glob_pattern_p.c: Update.
1671         * gnulib/import/globfree.c: Update.
1672         * gnulib/import/hard-locale.c: Update.
1673         * gnulib/import/hard-locale.h: Update.
1674         * gnulib/import/intprops.h: Update.
1675         * gnulib/import/inttypes.in.h: Update.
1676         * gnulib/import/isnan.c: Update.
1677         * gnulib/import/isnand-nolibm.h: Update.
1678         * gnulib/import/isnand.c: Update.
1679         * gnulib/import/isnanl-nolibm.h: Update.
1680         * gnulib/import/isnanl.c: Update.
1681         * gnulib/import/itold.c: Update.
1682         * gnulib/import/libc-config.h: Update.
1683         * gnulib/import/limits.in.h: Update.
1684         * gnulib/import/localcharset.c: Update.
1685         * gnulib/import/localcharset.h: Update.
1686         * gnulib/import/localtime-buffer.c: Update.
1687         * gnulib/import/localtime-buffer.h: Update.
1688         * gnulib/import/lstat.c: Update.
1689         * gnulib/import/m4/00gnulib.m4: Update.
1690         * gnulib/import/m4/__inline.m4: Update.
1691         * gnulib/import/m4/absolute-header.m4: Update.
1692         * gnulib/import/m4/alloca.m4: Update.
1693         * gnulib/import/m4/builtin-expect.m4: Update.
1694         * gnulib/import/m4/canonicalize.m4: Update.
1695         * gnulib/import/m4/chdir-long.m4: Update.
1696         * gnulib/import/m4/close.m4: Update.
1697         * gnulib/import/m4/closedir.m4: Update.
1698         * gnulib/import/m4/configmake.m4: Update.
1699         * gnulib/import/m4/d-ino.m4: Update.
1700         * gnulib/import/m4/d-type.m4: Update.
1701         * gnulib/import/m4/dirent_h.m4: Update.
1702         * gnulib/import/m4/dirfd.m4: Update.
1703         * gnulib/import/m4/dirname.m4: Update.
1704         * gnulib/import/m4/double-slash-root.m4: Update.
1705         * gnulib/import/m4/dup.m4: Update.
1706         * gnulib/import/m4/dup2.m4: Update.
1707         * gnulib/import/m4/eealloc.m4: Update.
1708         * gnulib/import/m4/environ.m4: Update.
1709         * gnulib/import/m4/errno_h.m4: Update.
1710         * gnulib/import/m4/error.m4: Update.
1711         * gnulib/import/m4/exponentd.m4: Update.
1712         * gnulib/import/m4/exponentl.m4: Update.
1713         * gnulib/import/m4/extensions.m4: Update.
1714         * gnulib/import/m4/extern-inline.m4: Update.
1715         * gnulib/import/m4/fchdir.m4: Update.
1716         * gnulib/import/m4/fcntl-o.m4: Update.
1717         * gnulib/import/m4/fcntl.m4: Update.
1718         * gnulib/import/m4/fcntl_h.m4: Update.
1719         * gnulib/import/m4/fdopendir.m4: Update.
1720         * gnulib/import/m4/filenamecat.m4: Update.
1721         * gnulib/import/m4/flexmember.m4: Update.
1722         * gnulib/import/m4/float_h.m4: Update.
1723         * gnulib/import/m4/fnmatch.m4: Update.
1724         * gnulib/import/m4/fnmatch_h.m4: Update.
1725         * gnulib/import/m4/fpieee.m4: Update.
1726         * gnulib/import/m4/frexp.m4: Update.
1727         * gnulib/import/m4/frexpl.m4: Update.
1728         * gnulib/import/m4/fstat.m4: Update.
1729         * gnulib/import/m4/fstatat.m4: Update.
1730         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1731         * gnulib/import/m4/getcwd-path-max.m4: Update.
1732         * gnulib/import/m4/getcwd.m4: Update.
1733         * gnulib/import/m4/getdtablesize.m4: Update.
1734         * gnulib/import/m4/getlogin.m4: Update.
1735         * gnulib/import/m4/getlogin_r.m4: Update.
1736         * gnulib/import/m4/getpagesize.m4: Update.
1737         * gnulib/import/m4/getprogname.m4: Update.
1738         * gnulib/import/m4/gettimeofday.m4: Update.
1739         * gnulib/import/m4/glibc21.m4: Update.
1740         * gnulib/import/m4/glob.m4: Update.
1741         * gnulib/import/m4/glob_h.m4: Update.
1742         * gnulib/import/m4/gnulib-cache.m4: Update.
1743         * gnulib/import/m4/gnulib-common.m4: Update.
1744         * gnulib/import/m4/gnulib-comp.m4: Update.
1745         * gnulib/import/m4/gnulib-tool.m4: Update.
1746         * gnulib/import/m4/hard-locale.m4: Update.
1747         * gnulib/import/m4/include_next.m4: Update.
1748         * gnulib/import/m4/inttypes-pri.m4: Update.
1749         * gnulib/import/m4/inttypes.m4: Update.
1750         * gnulib/import/m4/isnand.m4: Update.
1751         * gnulib/import/m4/isnanl.m4: Update.
1752         * gnulib/import/m4/largefile.m4: Update.
1753         * gnulib/import/m4/limits-h.m4: Update.
1754         * gnulib/import/m4/localcharset.m4: Update.
1755         * gnulib/import/m4/locale-fr.m4: Update.
1756         * gnulib/import/m4/locale-ja.m4: Update.
1757         * gnulib/import/m4/locale-zh.m4: Update.
1758         * gnulib/import/m4/localtime-buffer.m4: Update.
1759         * gnulib/import/m4/longlong.m4: Update.
1760         * gnulib/import/m4/lstat.m4: Update.
1761         * gnulib/import/m4/malloc.m4: Update.
1762         * gnulib/import/m4/malloca.m4: Update.
1763         * gnulib/import/m4/math_h.m4: Update.
1764         * gnulib/import/m4/mbrtowc.m4: Update.
1765         * gnulib/import/m4/mbsinit.m4: Update.
1766         * gnulib/import/m4/mbsrtowcs.m4: Update.
1767         * gnulib/import/m4/mbstate_t.m4: Update.
1768         * gnulib/import/m4/memchr.m4: Update.
1769         * gnulib/import/m4/memmem.m4: Update.
1770         * gnulib/import/m4/mempcpy.m4: Update.
1771         * gnulib/import/m4/memrchr.m4: Update.
1772         * gnulib/import/m4/mkdir.m4: Update.
1773         * gnulib/import/m4/mkstemp.m4: Update.
1774         * gnulib/import/m4/mmap-anon.m4: Update.
1775         * gnulib/import/m4/mode_t.m4: Update.
1776         * gnulib/import/m4/msvc-inval.m4: Update.
1777         * gnulib/import/m4/msvc-nothrow.m4: Update.
1778         * gnulib/import/m4/multiarch.m4: Update.
1779         * gnulib/import/m4/nocrash.m4: Update.
1780         * gnulib/import/m4/off_t.m4: Update.
1781         * gnulib/import/m4/onceonly.m4: Update.
1782         * gnulib/import/m4/open-cloexec.m4: Update.
1783         * gnulib/import/m4/open.m4: Update.
1784         * gnulib/import/m4/openat.m4: Update.
1785         * gnulib/import/m4/opendir.m4: Update.
1786         * gnulib/import/m4/pathmax.m4: Update.
1787         * gnulib/import/m4/rawmemchr.m4: Update.
1788         * gnulib/import/m4/readdir.m4: Update.
1789         * gnulib/import/m4/readlink.m4: Update.
1790         * gnulib/import/m4/realloc.m4: Update.
1791         * gnulib/import/m4/rename.m4: Update.
1792         * gnulib/import/m4/rewinddir.m4: Update.
1793         * gnulib/import/m4/rmdir.m4: Update.
1794         * gnulib/import/m4/save-cwd.m4: Update.
1795         * gnulib/import/m4/secure_getenv.m4: Update.
1796         * gnulib/import/m4/setenv.m4: Update.
1797         * gnulib/import/m4/signal_h.m4: Update.
1798         * gnulib/import/m4/ssize_t.m4: Update.
1799         * gnulib/import/m4/stat-time.m4: Update.
1800         * gnulib/import/m4/stat.m4: Update.
1801         * gnulib/import/m4/std-gnu11.m4: Update.
1802         * gnulib/import/m4/stdbool.m4: Update.
1803         * gnulib/import/m4/stddef_h.m4: Update.
1804         * gnulib/import/m4/stdint.m4: Update.
1805         * gnulib/import/m4/stdio_h.m4: Update.
1806         * gnulib/import/m4/stdlib_h.m4: Update.
1807         * gnulib/import/m4/strchrnul.m4: Update.
1808         * gnulib/import/m4/strdup.m4: Update.
1809         * gnulib/import/m4/strerror.m4: Update.
1810         * gnulib/import/m4/string_h.m4: Update.
1811         * gnulib/import/m4/strstr.m4: Update.
1812         * gnulib/import/m4/strtok_r.m4: Update.
1813         * gnulib/import/m4/sys_socket_h.m4: Update.
1814         * gnulib/import/m4/sys_stat_h.m4: Update.
1815         * gnulib/import/m4/sys_time_h.m4: Update.
1816         * gnulib/import/m4/sys_types_h.m4: Update.
1817         * gnulib/import/m4/tempname.m4: Update.
1818         * gnulib/import/m4/time_h.m4: Update.
1819         * gnulib/import/m4/unistd-safer.m4: Update.
1820         * gnulib/import/m4/unistd_h.m4: Update.
1821         * gnulib/import/m4/warn-on-use.m4: Update.
1822         * gnulib/import/m4/wchar_h.m4: Update.
1823         * gnulib/import/m4/wchar_t.m4: Update.
1824         * gnulib/import/m4/wctype_h.m4: Update.
1825         * gnulib/import/m4/wint_t.m4: Update.
1826         * gnulib/import/malloc.c: Update.
1827         * gnulib/import/malloc/scratch_buffer.h: Update.
1828         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1829         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1830         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1831         * gnulib/import/malloca.c: Update.
1832         * gnulib/import/malloca.h: Update.
1833         * gnulib/import/malloca.valgrind: Update.
1834         * gnulib/import/math.in.h: Update.
1835         * gnulib/import/mbrtowc.c: Update.
1836         * gnulib/import/mbsinit.c: Update.
1837         * gnulib/import/mbsrtowcs-impl.h: Update.
1838         * gnulib/import/mbsrtowcs-state.c: Update.
1839         * gnulib/import/mbsrtowcs.c: Update.
1840         * gnulib/import/memchr.c: Update.
1841         * gnulib/import/memmem.c: Update.
1842         * gnulib/import/mempcpy.c: Update.
1843         * gnulib/import/memrchr.c: Update.
1844         * gnulib/import/mkdir.c: Update.
1845         * gnulib/import/mkstemp.c: Update.
1846         * gnulib/import/msvc-inval.c: Update.
1847         * gnulib/import/msvc-inval.h: Update.
1848         * gnulib/import/msvc-nothrow.c: Update.
1849         * gnulib/import/msvc-nothrow.h: Update.
1850         * gnulib/import/open.c: Update.
1851         * gnulib/import/openat-die.c: Update.
1852         * gnulib/import/openat-priv.h: Update.
1853         * gnulib/import/openat-proc.c: Update.
1854         * gnulib/import/openat.c: Update.
1855         * gnulib/import/openat.h: Update.
1856         * gnulib/import/opendir.c: Update.
1857         * gnulib/import/pathmax.h: Update.
1858         * gnulib/import/pipe-safer.c: Update.
1859         * gnulib/import/rawmemchr.c: Update.
1860         * gnulib/import/readdir.c: Update.
1861         * gnulib/import/readlink.c: Update.
1862         * gnulib/import/realloc.c: Update.
1863         * gnulib/import/ref-add.sin: Update.
1864         * gnulib/import/ref-del.sin: Update.
1865         * gnulib/import/rename.c: Update.
1866         * gnulib/import/rewinddir.c: Update.
1867         * gnulib/import/rmdir.c: Update.
1868         * gnulib/import/same-inode.h: Update.
1869         * gnulib/import/save-cwd.c: Update.
1870         * gnulib/import/save-cwd.h: Update.
1871         * gnulib/import/scratch_buffer.h: Update.
1872         * gnulib/import/secure_getenv.c: Update.
1873         * gnulib/import/setenv.c: Update.
1874         * gnulib/import/signal.in.h: Update.
1875         * gnulib/import/stat-time.c: Update.
1876         * gnulib/import/stat-time.h: Update.
1877         * gnulib/import/stat-w32.c: Update.
1878         * gnulib/import/stat-w32.h: Update.
1879         * gnulib/import/stat.c: Update.
1880         * gnulib/import/stdbool.in.h: Update.
1881         * gnulib/import/stddef.in.h: Update.
1882         * gnulib/import/stdint.in.h: Update.
1883         * gnulib/import/stdio.in.h: Update.
1884         * gnulib/import/stdlib.in.h: Update.
1885         * gnulib/import/str-two-way.h: Update.
1886         * gnulib/import/strchrnul.c: Update.
1887         * gnulib/import/strdup.c: Update.
1888         * gnulib/import/streq.h: Update.
1889         * gnulib/import/strerror-override.c: Update.
1890         * gnulib/import/strerror-override.h: Update.
1891         * gnulib/import/strerror.c: Update.
1892         * gnulib/import/string.in.h: Update.
1893         * gnulib/import/stripslash.c: Update.
1894         * gnulib/import/strnlen1.c: Update.
1895         * gnulib/import/strnlen1.h: Update.
1896         * gnulib/import/strstr.c: Update.
1897         * gnulib/import/strtok_r.c: Update.
1898         * gnulib/import/sys_stat.in.h: Update.
1899         * gnulib/import/sys_time.in.h: Update.
1900         * gnulib/import/sys_types.in.h: Update.
1901         * gnulib/import/tempname.c: Update.
1902         * gnulib/import/tempname.h: Update.
1903         * gnulib/import/time.in.h: Update.
1904         * gnulib/import/unistd--.h: Update.
1905         * gnulib/import/unistd-safer.h: Update.
1906         * gnulib/import/unistd.in.h: Update.
1907         * gnulib/import/unsetenv.c: Update.
1908         * gnulib/import/verify.h: Update.
1909         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1910         * gnulib/import/wchar.in.h: Update.
1911         * gnulib/import/wctype.in.h: Update.
1912         * gnulib/import/xalloc-oversized.h: Update.
1913         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1914         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1915
1916 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1917
1918         * record-btrace.c (get_thread_current_frame): Remove
1919         old_inferior_ptid.
1920
1921 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1922
1923         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1924         with check_tag to 1 if and only if the type is tagged and the
1925         component being searched cannot been found in the current
1926         view. Otherwise, always call ada_to_fixed_type with
1927         check_tag to 0.
1928
1929 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1930
1931         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1932         declaration.
1933         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1934         * ada-varobj.c (ada_varobj_get_number_of_children,
1935         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1936
1937 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1938
1939         * ada-valprint.c (ada_value_print): Use type instead of
1940         enclosing type.
1941
1942 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1943
1944         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1945         an array of access to unconstrained array.
1946
1947 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1948
1949         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1950         (ada_check_typedef): Use it.
1951
1952 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1953
1954         * ada-varobj.c (ada_varobj_describe_struct_child)
1955         (ada_varobj_describe_child): Handle union case like struct one.
1956
1957 2018-09-10  Tom Tromey  <tom@tromey.com>
1958
1959         PR python/18380:
1960         * python/python.c (_initialize_python): Make example in "python"
1961         help work in Python 3.
1962
1963 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1964
1965         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1966         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1967         $(EXEEXT) to the script, as it is not a program.
1968
1969 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1970
1971         * python/py-prettyprint.c (pretty_print_one_value): Return
1972         gdbpy_ref<>.
1973         (print_string_repr): Adjust.
1974         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1975         * python/python-internal.h (apply_varobj_pretty_printer): Return
1976         gdbpy_ref<>.
1977         * varobj.c (varobj_value_get_print_value): Adjust.
1978
1979 2018-09-08  Tom Tromey  <tom@tromey.com>
1980
1981         PR python/16047:
1982         * python/py-prettyprint.c (pretty_print_one_value): Check for
1983         to_string method.
1984
1985 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1986
1987         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1988         replace_operator_with_call.
1989
1990 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1991
1992         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1993
1994 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1995
1996         * ada-typeprint.c (print_range): Print the bounds using TYPE
1997         rather than its TYPE_TARGET_TYPE.
1998
1999 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2000
2001         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2002         call to ada_to_fixed_value_create.
2003
2004 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2005
2006         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2007
2008 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2009
2010         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2011         by calls to error.
2012
2013 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2014
2015         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2016         Move update of loop variable "fi".
2017
2018 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2019
2020         * ada-lang.c (value_assign_to_component): In the case of
2021         big-endian targets, extract the bits of the given VAL
2022         using an src_offset of zero if container is not a scalar.
2023
2024 2018-09-06  Simon Ser  <contact@emersion.fr>
2025
2026         PR gdb/23105
2027         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2028         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2029         * fbsd-tdep.c (fbsd_make_note_desc): New.
2030         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2031         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2032         * target.h (enum target_object) Add FreeBSD-specific
2033         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2034
2035 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2036
2037         * compile/compile-c.h (generate_c_for_variable_locations):
2038         Change reference to pointer.
2039         * compile/compile-c-support.c (compile_program) <compute>:
2040         Likewise.
2041         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2042         (generate_c_for_for_one_variable): Likewise
2043         (generate_c_for_variable_locations): Likewise
2044         * compile/compile-c-types.c (compile_c_instance::convert_type):
2045         Likewise
2046         * compile/compile-cplus-symbols.c (convert_one_symbol):
2047         std::move the scope passed to enter_scope.
2048         * compile/compile-cplus-types.c
2049         (compile_cplus_instance::enter_scope): Make parameter
2050         rvalue-reference.
2051         (compile_cplus_instance::new_scope): Change reference to
2052         pointer.
2053         (compile_cplus_instance::convert_type): Likewise
2054         (compile_cplus_convert_typedef): std::move the scope passed to
2055         enter_scope.
2056         (compile_cplus_convert_struct_or_union): Likewise.
2057         (compile_cplus_convert_enum): Likewise.
2058         (compile_cplus_convert_namespace): Likewise.
2059         * compile/compile-cplus.h (compile_cplus_instance)
2060         <enter_scope>: Make parameter rvalue-reference.
2061         * compile/compile-internal.h (compile_instance)
2062         <get_cached_type>: Likewise
2063         * compile/compile-loc2c.c (push): Likewise
2064         (pushf): Likewise
2065         (unary): Likewise
2066         (binary): Likewise
2067         (print_label): Likewise
2068         (pushf_register_address): Likewise
2069         (pushf_register): Likewise
2070         (do_compile_dwarf_expr_to_c): Likewise
2071         (compile_dwarf_expr_to_c): Likewise
2072         (compile_dwarf_bounds_to_c): Likewise
2073         * compile/compile.c (compile_instance::get_cached_type):
2074         Likewise
2075         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2076         (compile_dwarf_bounds_to_c): Likewise
2077         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2078         (dwarf2_compile_property_to_c): Likewise
2079         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2080         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2081         Likewise
2082
2083 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2084
2085         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2086         * tui/tui-data.c (init_content_element): Don't initialize it.
2087
2088 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2089
2090         * tui/tui-data.h (struct tui_win_info)
2091         <detail::opaque>: Remove.
2092         * tui/tui-data.c (init_win_info): Remove assignment.
2093
2094 2018-09-05  Tom Tromey  <tom@tromey.com>
2095
2096         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2097         -Wformat-nonliteral.
2098         * target-float.c (host_float_ops<T>::to_string)
2099         (host_float_ops<T>::from_string): Use
2100         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2101         * configure: Rebuild.
2102
2103 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2104
2105         * printcmd.c (printf_c_string): Use
2106         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2107         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2108
2109 2018-09-05  Tom Tromey  <tom@tromey.com>
2110
2111         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2112
2113 2018-09-05  Tom de Vries  <tdevries@suse.de>
2114
2115         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2116         with resolve_abstract_p == true.
2117         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2118         defaulting to false. Propagate resolve_abstract_p to
2119         dwarf2_fetch_die_loc_sect_off.
2120         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2121         parameter, defaulting to false.
2122         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2123         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2124         parameter.
2125         * dwarf2read.h (struct die_info): Forward-declare.
2126         (die_info_ptr): New typedef.
2127         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2128
2129 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2130
2131         GDB 8.2 released.
2132
2133 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2134             Pedro Alves  <palves@redhat.com>
2135
2136         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2137         "aclocal-m4-deps.mk".  Include file here.
2138         $(srcdir)/aclocal.m4: Add "configure.ac".
2139         * gnulib/aclocal-m4-deps.mk: New file.
2140         * gnulib/update-gnulib.sh: Automatically update
2141         "aclocal-m4-deps.mk".
2142
2143 2018-09-04  Tom Tromey  <tom@tromey.com>
2144
2145         * configure: Rebuild.
2146         * configure.ac: Remove multi-ice code.
2147
2148 2018-09-04  Tom Tromey  <tom@tromey.com>
2149
2150         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2151         (ada-exp.o): Update.
2152
2153 2018-09-04  Tom Tromey  <tom@tromey.com>
2154
2155         * Makefile.in (printcmd.o, target-float.o): Remove.
2156         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2157
2158 2018-09-04  Tom Tromey  <tom@tromey.com>
2159
2160         * gnulib/Makefile.in: Remove obsolete comment.
2161         * Makefile.in: Remove obsolete comment.
2162
2163 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2164
2165         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2166         line with '+'.
2167
2168 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2169
2170         * riscv-tdep.c: Add 'prologue-value.h' include.
2171         (struct riscv_unwind_cache): New struct.
2172         (riscv_debug_unwinder): New global.
2173         (riscv_scan_prologue): Update arguments, capture register details
2174         from prologue scan.
2175         (riscv_skip_prologue): Reformat arguments line, move end of
2176         prologue calculation into riscv_scan_prologue.
2177         (riscv_frame_cache): Update return type, create
2178         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2179         details.
2180         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2181         (riscv_frame_prev_register): Use the trad_frame within the
2182         riscv_unwind_cache.
2183         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2184         flag.
2185
2186 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2187
2188         * trad-frame.h (trad_frame_set_realreg): Declare.
2189         (trad_frame_set_addr): Declare.
2190         * trad-frame.c (trad_frame_set_realreg): Define new function.
2191         (trad_frame_set_addr): Define new function.
2192         (trad_frame_set_reg_realreg): Use new function.
2193         (trad_frame_set_reg_addr): Use new function.
2194
2195 2018-09-01  Keith Seitz  <keiths@redhat.com>
2196
2197         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2198         pulongest instead of "%lld".
2199         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2200         ATTRIBUTE_UNUSED.
2201
2202 2018-08-31  Tom Tromey  <tom@tromey.com>
2203
2204         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2205         variant part type.
2206
2207 2018-08-31  Pedro Alves  <palves@redhat.com>
2208
2209         * gdbarch.h: Regenerate.
2210
2211 2018-08-31  Pedro Alves  <palves@redhat.com>
2212
2213         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2214         * target.h (Hardware watchpoint interfaces): Describe
2215         continuable/steppable/non-steppable watchpoints.
2216         * gdbarch.h, gdbarch.c: Regenerate.
2217
2218 2018-08-31  Pedro Alves  <palves@redhat.com>
2219
2220         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2221         Delete.
2222         * s390-linux-nat.c
2223         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2224         * target.h (target_ops::have_continuable_watchpoint): Delete.
2225         (target_have_continuable_watchpoint): Delete.
2226         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2227         * target-delegates.c: Regenerate.
2228
2229 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2230
2231         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2232         the files present in "gnulib/import/m4/".
2233
2234 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2235
2236         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2237         c.sw, c.swsp, and c.sdsp.
2238
2239 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2240
2241         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2242         (riscv_read_misa_reg): Don't cache value read into inferior data.
2243         (riscv_new_inferior_data): Delete.
2244         (riscv_inferior_data_cleanup): Delete.
2245         (riscv_inferior_data): Delete.
2246         (riscv_invalidate_inferior_data): Delete.
2247         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2248
2249 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2250
2251         * compile/compile-cplus-types.c
2252         (compile_cplus_instance::leave_scope): Take the address of scope
2253         object.
2254         (compile_cplus_instance::convert_qualified_base): Compare quals
2255         to 0.
2256
2257 2018-08-30  Keith Seitz  <keiths@redhat.com>
2258
2259         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2260         Use "%s" and host_address_to_string instead of "%p" in printf.
2261
2262 2018-08-29  Keith Seitz  <keiths@redhat.com>
2263
2264         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2265         and compile-cplus-types.c.
2266         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2267         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2268         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2269         Declare.
2270         * compile/compile-c-support.c: Include compile-cplus.h.
2271         (load_libcompile): Templatize.
2272         (get_compile_context): "New" function.
2273         (c_get_compile_context): Use get_compile_context.
2274         (cplus_get_compile_context): New function.
2275         (cplus_push_user_expression, cplus_pop_user_expression)
2276         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2277         (cplus_compute_program): Define new structs/functions.
2278         * compile/compile-cplus-symmbols.c: New file.
2279         * compile/compile-cplus-types.c: New file.
2280         * compile/compile-cplus.h: New file.
2281         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2282         Declare.
2283         * compile/compile-object-load.c (get_out_value_type): Use
2284         strncmp_iw when comparing symbol names.
2285         (compile_object_load): Add mst_bss and mst_data.
2286         * compile/compile.c (_initialize_compile): Remove
2287         -Wno-implicit-function-declaration from `compile_args'.
2288         * compile/gcc-cp-plugin.h: New file.
2289         * NEWS: Mention C++ compile support and new debug options.
2290
2291 2018-08-29  Keith Seitz  <keiths@redhat.com>
2292
2293         * linespec.c (collect_info::add_symbol): Make virtual.
2294         (struct symbol_searcher_collect_info): New struct.
2295         (symbol_searcher::find_all_symbols): New method.
2296         * symtab.h (class symbol_searcher): New class.
2297
2298 2018-08-29  Keith Seitz  <keiths@redhat.com>
2299
2300         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2301         Change to vector of block_symbol.  Update all users.
2302         (struct collect_info) <symbols>: Likewise.
2303         (collect_info::add_symbol): Take block_symbol as argument.
2304         Update all callers.
2305         (decode_compound_collector) <m_symbols>: Change type to vector
2306         of block_symbol.  Update all users.
2307         (decode_compound_collector::operator ()): Change parameter type
2308         to block_symbol.
2309         (find_method, find_function_symbols, find_linespec_symbols)
2310         (find_label_symbols_in_block, find_label_symbols): Change symbol
2311         vectors to block_symbol vectors.
2312         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2313         block_symbol.
2314
2315 2018-08-29  Keith Seitz  <keiths@redhat.com>
2316
2317         * linespec.c (symbolp): Remove typedef and VEC definitions.
2318         (bound_minimal_symbol_d): Likewise.
2319
2320 2018-08-29  Keith Seitz  <keiths@redhat.com>
2321
2322         * linespec.c (decode_compound_collector::decode_compound_collector):
2323         Remove initialization for `m_symtabs'.
2324         (decode_compound_collector::release_symbols): Change return type
2325         to std::vector.  Update all callers.
2326         (class decode_compound_collector) <m_symbols>: Change type to
2327         std::vector.
2328         (lookup_prefix_sym): Change return type to std::vector.  Update all
2329         callers.
2330         (compare_symbols): Remove.
2331         (std_compare_symbols): Rename to `compare_symbols'.
2332         (find_method): Change `sym_classes' parameter to std::vector.
2333         Update all callers.  Use std::sort to sort sym_classes.
2334         (find_linespec_symbols): Remove cleanup.
2335
2336 2018-08-29  Keith Seitz  <keiths@redhat.com>
2337
2338         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2339         std::vector.  Update all users.
2340         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2341         (struct collect_info) <minimal_symbols>: Likewise.
2342         (compare_msymbols): Return bool.  Change parameters to const
2343         bound_minimal_symbol references.
2344         (find_method, find_function_symbols, find_linespec_symbols): Change
2345         `minsyms' parameter to std::vector.  Update all callers.
2346
2347 2018-08-29  Keith Seitz  <keiths@redhat.com>
2348
2349         * linespec.c (struct linespec) <label_symbols>: Change type to
2350         std::vector.  Update all users.
2351         (find_label_symbols_in_block): Change `result' parameter to
2352         std::vector.  Update all callers.
2353         (find_label_symbols): Return std::vector.  Update all callers.
2354
2355 2018-08-29  Keith Seitz  <keiths@redhat.com>
2356
2357         * linespec.c (struct linespec) <function_symbols>: Change type to
2358         std::vector.  Update all users.
2359         (struct collect_info) <function_symbols>: Likewise.
2360         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2361         (std_compare_symbols): New function.
2362         (find_method, find_function_symbols, find_linespec_symbols)
2363         (find_label_symbols_in_block): Change `symbols' parameter to
2364         std::vector.  Update all callers.
2365         (find_label_symbols): Likewise for `function_symbols' and
2366         `label_funcs_ret'.
2367
2368 2018-08-29  Keith Seitz  <keiths@redhat.com>
2369
2370         * linespec.c (symtab_vector_up): Define.
2371         (struct linespec) <file_symtabs>: Change type to std::vector *.
2372         Update all uses.
2373         (struct collect_info) <file_symtabs>: Likewise.
2374         (collect_symtabs_from_filename): Return symtab_vector_up.
2375         Update all callers.
2376         (decode_objc): Remove cleanup.
2377         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2378         (symtab_collector::release_symtabs): Return symtab_vector_up.
2379         Update all callers.
2380         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2381         Update all users.
2382         (collect_symtabs_from_filename, symtabs_from_filename): Return
2383         symtab_vector_up.  Update all callers.
2384
2385 2018-08-29  Tom Tromey  <tom@tromey.com>
2386
2387         * csky-tdep.c (csky_analyze_prologue): Use
2388         core_addr_to_string_nz.
2389
2390 2018-08-29  Tom Tromey  <tom@tromey.com>
2391
2392         * windows-nat.c (struct xlate_exception) <them>: Change type to
2393         DWORD.
2394         (xlate): Fix formatting.  Remove last entry.
2395         (struct xlate_exception, xlate): Comment out.
2396         (windows_nat_target::resume): Use ranged for.
2397
2398 2018-08-29  Jim Wilson  <jimw@sifive.com>
2399
2400         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2401         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2402         of NT_PRFPREG.
2403         (riscv_linux_nat_target::store_registers): Likewise.
2404
2405 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2406
2407         PR gdb/23555
2408         PR gdb/23558
2409         * gnulib/aclocal.m4: Regenerate.
2410         * gnulib/config.in: Regenerate.
2411         * gnulib/configure: Regenerate.
2412         * gnulib/import/Makefile.am: Update.
2413         * gnulib/import/Makefile.in: Update.
2414         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2415         * gnulib/import/_Noreturn.h: ... this.
2416         * gnulib/import/alloca.in.h: Update.
2417         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2418         * gnulib/import/arg-nonnull.h: ... this.
2419         * gnulib/import/assure.h: Update.
2420         * gnulib/import/at-func.c: Update.
2421         * gnulib/import/basename-lgpl.c: Update.
2422         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2423         * gnulib/import/c++defs.h: ... this.
2424         * gnulib/import/canonicalize-lgpl.c: Update.
2425         * gnulib/import/cdefs.h: Update.
2426         * gnulib/import/chdir-long.c: Update.
2427         * gnulib/import/chdir-long.h: Update.
2428         * gnulib/import/cloexec.c: Update.
2429         * gnulib/import/cloexec.h: Update.
2430         * gnulib/import/close.c: Update.
2431         * gnulib/import/closedir.c: Update.
2432         * gnulib/import/config.charset: Update.
2433         * gnulib/import/dirent-private.h: Update.
2434         * gnulib/import/dirent.in.h: Update.
2435         * gnulib/import/dirfd.c: Update.
2436         * gnulib/import/dirname-lgpl.c: Update.
2437         * gnulib/import/dirname.h: Update.
2438         * gnulib/import/dosname.h: Update.
2439         * gnulib/import/dup-safer-flag.c: Update.
2440         * gnulib/import/dup-safer.c: Update.
2441         * gnulib/import/dup.c: Update.
2442         * gnulib/import/dup2.c: Update.
2443         * gnulib/import/errno.in.h: Update.
2444         * gnulib/import/error.c: Update.
2445         * gnulib/import/error.h: Update.
2446         * gnulib/import/exitfail.c: Update.
2447         * gnulib/import/exitfail.h: Update.
2448         * gnulib/import/extra/update-copyright: Update.
2449         * gnulib/import/fchdir.c: Update.
2450         * gnulib/import/fcntl.c: Update.
2451         * gnulib/import/fcntl.in.h: Update.
2452         * gnulib/import/fd-hook.c: Update.
2453         * gnulib/import/fd-hook.h: Update.
2454         * gnulib/import/fd-safer-flag.c: Update.
2455         * gnulib/import/fd-safer.c: Update.
2456         * gnulib/import/fdopendir.c: Update.
2457         * gnulib/import/filename.h: Update.
2458         * gnulib/import/filenamecat-lgpl.c: Update.
2459         * gnulib/import/filenamecat.h: Update.
2460         * gnulib/import/flexmember.h: Update.
2461         * gnulib/import/float+.h: Update.
2462         * gnulib/import/float.c: Update.
2463         * gnulib/import/float.in.h: Update.
2464         * gnulib/import/fnmatch.c: Update.
2465         * gnulib/import/fnmatch.in.h: Update.
2466         * gnulib/import/fnmatch_loop.c: Update.
2467         * gnulib/import/fpucw.h: Update.
2468         * gnulib/import/frexp.c: Update.
2469         * gnulib/import/frexpl.c: Update.
2470         * gnulib/import/fstat.c: Update.
2471         * gnulib/import/fstatat.c: Update.
2472         * gnulib/import/getcwd-lgpl.c: Update.
2473         * gnulib/import/getcwd.c: Update.
2474         * gnulib/import/getdtablesize.c: Update.
2475         * gnulib/import/getlogin_r.c: Update.
2476         * gnulib/import/getprogname.c: Update.
2477         * gnulib/import/getprogname.h: Update.
2478         * gnulib/import/gettext.h: Update.
2479         * gnulib/import/gettimeofday.c: Update.
2480         * gnulib/import/glob-libc.h: Update.
2481         * gnulib/import/glob.c: Update.
2482         * gnulib/import/glob.in.h: Update.
2483         * gnulib/import/glob_internal.h: Update.
2484         * gnulib/import/glob_pattern_p.c: Update.
2485         * gnulib/import/globfree.c: Update.
2486         * gnulib/import/hard-locale.c: Update.
2487         * gnulib/import/hard-locale.h: Update.
2488         * gnulib/import/intprops.h: Update.
2489         * gnulib/import/inttypes.in.h: Update.
2490         * gnulib/import/isnan.c: Update.
2491         * gnulib/import/isnand-nolibm.h: Update.
2492         * gnulib/import/isnand.c: Update.
2493         * gnulib/import/isnanl-nolibm.h: Update.
2494         * gnulib/import/isnanl.c: Update.
2495         * gnulib/import/itold.c: Update.
2496         * gnulib/import/libc-config.h: Update.
2497         * gnulib/import/limits.in.h: Update.
2498         * gnulib/import/localcharset.c: Update.
2499         * gnulib/import/localcharset.h: Update.
2500         * gnulib/import/localtime-buffer.c: Update.
2501         * gnulib/import/localtime-buffer.h: Update.
2502         * gnulib/import/lstat.c: Update.
2503         * gnulib/import/m4/00gnulib.m4: Update.
2504         * gnulib/import/m4/__inline.m4: Update.
2505         * gnulib/import/m4/absolute-header.m4: Update.
2506         * gnulib/import/m4/alloca.m4: Update.
2507         * gnulib/import/m4/builtin-expect.m4: Update.
2508         * gnulib/import/m4/canonicalize.m4: Update.
2509         * gnulib/import/m4/chdir-long.m4: Update.
2510         * gnulib/import/m4/close.m4: Update.
2511         * gnulib/import/m4/closedir.m4: Update.
2512         * gnulib/import/m4/configmake.m4: Update.
2513         * gnulib/import/m4/d-ino.m4: Update.
2514         * gnulib/import/m4/d-type.m4: Update.
2515         * gnulib/import/m4/dirent_h.m4: Update.
2516         * gnulib/import/m4/dirfd.m4: Update.
2517         * gnulib/import/m4/dirname.m4: Update.
2518         * gnulib/import/m4/double-slash-root.m4: Update.
2519         * gnulib/import/m4/dup.m4: Update.
2520         * gnulib/import/m4/dup2.m4: Update.
2521         * gnulib/import/m4/eealloc.m4: Update.
2522         * gnulib/import/m4/environ.m4: Update.
2523         * gnulib/import/m4/errno_h.m4: Update.
2524         * gnulib/import/m4/error.m4: Update.
2525         * gnulib/import/m4/exponentd.m4: Update.
2526         * gnulib/import/m4/exponentl.m4: Update.
2527         * gnulib/import/m4/extensions.m4: Update.
2528         * gnulib/import/m4/extern-inline.m4: Update.
2529         * gnulib/import/m4/fchdir.m4: Update.
2530         * gnulib/import/m4/fcntl-o.m4: Update.
2531         * gnulib/import/m4/fcntl.m4: Update.
2532         * gnulib/import/m4/fcntl_h.m4: Update.
2533         * gnulib/import/m4/fdopendir.m4: Update.
2534         * gnulib/import/m4/filenamecat.m4: Update.
2535         * gnulib/import/m4/flexmember.m4: Update.
2536         * gnulib/import/m4/float_h.m4: Update.
2537         * gnulib/import/m4/fnmatch.m4: Update.
2538         * gnulib/import/m4/fnmatch_h.m4: Update.
2539         * gnulib/import/m4/fpieee.m4: Update.
2540         * gnulib/import/m4/frexp.m4: Update.
2541         * gnulib/import/m4/frexpl.m4: Update.
2542         * gnulib/import/m4/fstat.m4: Update.
2543         * gnulib/import/m4/fstatat.m4: Update.
2544         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2545         * gnulib/import/m4/getcwd-path-max.m4: Update.
2546         * gnulib/import/m4/getcwd.m4: Update.
2547         * gnulib/import/m4/getdtablesize.m4: Update.
2548         * gnulib/import/m4/getlogin.m4: Update.
2549         * gnulib/import/m4/getlogin_r.m4: Update.
2550         * gnulib/import/m4/getpagesize.m4: Update.
2551         * gnulib/import/m4/getprogname.m4: Update.
2552         * gnulib/import/m4/gettimeofday.m4: Update.
2553         * gnulib/import/m4/glibc21.m4: Update.
2554         * gnulib/import/m4/glob.m4: Update.
2555         * gnulib/import/m4/glob_h.m4: Update.
2556         * gnulib/import/m4/gnulib-cache.m4: Update.
2557         * gnulib/import/m4/gnulib-common.m4: Update.
2558         * gnulib/import/m4/gnulib-comp.m4: Update.
2559         * gnulib/import/m4/gnulib-tool.m4: Update.
2560         * gnulib/import/m4/hard-locale.m4: Update.
2561         * gnulib/import/m4/include_next.m4: Update.
2562         * gnulib/import/m4/inttypes-pri.m4: Update.
2563         * gnulib/import/m4/inttypes.m4: Update.
2564         * gnulib/import/m4/isnand.m4: Update.
2565         * gnulib/import/m4/isnanl.m4: Update.
2566         * gnulib/import/m4/largefile.m4: Update.
2567         * gnulib/import/m4/limits-h.m4: Update.
2568         * gnulib/import/m4/localcharset.m4: Update.
2569         * gnulib/import/m4/locale-fr.m4: Update.
2570         * gnulib/import/m4/locale-ja.m4: Update.
2571         * gnulib/import/m4/locale-zh.m4: Update.
2572         * gnulib/import/m4/localtime-buffer.m4: Update.
2573         * gnulib/import/m4/longlong.m4: Update.
2574         * gnulib/import/m4/lstat.m4: Update.
2575         * gnulib/import/m4/malloc.m4: Update.
2576         * gnulib/import/m4/malloca.m4: Update.
2577         * gnulib/import/m4/math_h.m4: Update.
2578         * gnulib/import/m4/mbrtowc.m4: Update.
2579         * gnulib/import/m4/mbsinit.m4: Update.
2580         * gnulib/import/m4/mbsrtowcs.m4: Update.
2581         * gnulib/import/m4/mbstate_t.m4: Update.
2582         * gnulib/import/m4/memchr.m4: Update.
2583         * gnulib/import/m4/memmem.m4: Update.
2584         * gnulib/import/m4/mempcpy.m4: Update.
2585         * gnulib/import/m4/memrchr.m4: Update.
2586         * gnulib/import/m4/mkdir.m4: Update.
2587         * gnulib/import/m4/mkstemp.m4: Update.
2588         * gnulib/import/m4/mmap-anon.m4: Update.
2589         * gnulib/import/m4/mode_t.m4: Update.
2590         * gnulib/import/m4/msvc-inval.m4: Update.
2591         * gnulib/import/m4/msvc-nothrow.m4: Update.
2592         * gnulib/import/m4/multiarch.m4: Update.
2593         * gnulib/import/m4/nocrash.m4: Update.
2594         * gnulib/import/m4/off_t.m4: Update.
2595         * gnulib/import/m4/onceonly.m4: Update.
2596         * gnulib/import/m4/open-cloexec.m4: Update.
2597         * gnulib/import/m4/open.m4: Update.
2598         * gnulib/import/m4/openat.m4: Update.
2599         * gnulib/import/m4/opendir.m4: Update.
2600         * gnulib/import/m4/pathmax.m4: Update.
2601         * gnulib/import/m4/rawmemchr.m4: Update.
2602         * gnulib/import/m4/readdir.m4: Update.
2603         * gnulib/import/m4/readlink.m4: Update.
2604         * gnulib/import/m4/realloc.m4: Update.
2605         * gnulib/import/m4/rename.m4: Update.
2606         * gnulib/import/m4/rewinddir.m4: Update.
2607         * gnulib/import/m4/rmdir.m4: Update.
2608         * gnulib/import/m4/save-cwd.m4: Update.
2609         * gnulib/import/m4/secure_getenv.m4: Update.
2610         * gnulib/import/m4/setenv.m4: Update.
2611         * gnulib/import/m4/signal_h.m4: Update.
2612         * gnulib/import/m4/ssize_t.m4: Update.
2613         * gnulib/import/m4/stat-time.m4: Update.
2614         * gnulib/import/m4/stat.m4: Update.
2615         * gnulib/import/m4/std-gnu11.m4: Update.
2616         * gnulib/import/m4/stdbool.m4: Update.
2617         * gnulib/import/m4/stddef_h.m4: Update.
2618         * gnulib/import/m4/stdint.m4: Update.
2619         * gnulib/import/m4/stdio_h.m4: Update.
2620         * gnulib/import/m4/stdlib_h.m4: Update.
2621         * gnulib/import/m4/strchrnul.m4: Update.
2622         * gnulib/import/m4/strdup.m4: Update.
2623         * gnulib/import/m4/strerror.m4: Update.
2624         * gnulib/import/m4/string_h.m4: Update.
2625         * gnulib/import/m4/strstr.m4: Update.
2626         * gnulib/import/m4/strtok_r.m4: Update.
2627         * gnulib/import/m4/sys_socket_h.m4: Update.
2628         * gnulib/import/m4/sys_stat_h.m4: Update.
2629         * gnulib/import/m4/sys_time_h.m4: Update.
2630         * gnulib/import/m4/sys_types_h.m4: Update.
2631         * gnulib/import/m4/tempname.m4: Update.
2632         * gnulib/import/m4/time_h.m4: Update.
2633         * gnulib/import/m4/unistd-safer.m4: Update.
2634         * gnulib/import/m4/unistd_h.m4: Update.
2635         * gnulib/import/m4/warn-on-use.m4: Update.
2636         * gnulib/import/m4/wchar_h.m4: Update.
2637         * gnulib/import/m4/wchar_t.m4: Update.
2638         * gnulib/import/m4/wctype_h.m4: Update.
2639         * gnulib/import/m4/wint_t.m4: Update.
2640         * gnulib/import/malloc.c: Update.
2641         * gnulib/import/malloc/scratch_buffer.h: Update.
2642         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2643         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2644         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2645         * gnulib/import/malloca.c: Update.
2646         * gnulib/import/malloca.h: Update.
2647         * gnulib/import/malloca.valgrind: Update.
2648         * gnulib/import/math.in.h: Update.
2649         * gnulib/import/mbrtowc.c: Update.
2650         * gnulib/import/mbsinit.c: Update.
2651         * gnulib/import/mbsrtowcs-impl.h: Update.
2652         * gnulib/import/mbsrtowcs-state.c: Update.
2653         * gnulib/import/mbsrtowcs.c: Update.
2654         * gnulib/import/memchr.c: Update.
2655         * gnulib/import/memmem.c: Update.
2656         * gnulib/import/mempcpy.c: Update.
2657         * gnulib/import/memrchr.c: Update.
2658         * gnulib/import/mkdir.c: Update.
2659         * gnulib/import/mkstemp.c: Update.
2660         * gnulib/import/msvc-inval.c: Update.
2661         * gnulib/import/msvc-inval.h: Update.
2662         * gnulib/import/msvc-nothrow.c: Update.
2663         * gnulib/import/msvc-nothrow.h: Update.
2664         * gnulib/import/open.c: Update.
2665         * gnulib/import/openat-die.c: Update.
2666         * gnulib/import/openat-priv.h: Update.
2667         * gnulib/import/openat-proc.c: Update.
2668         * gnulib/import/openat.c: Update.
2669         * gnulib/import/openat.h: Update.
2670         * gnulib/import/opendir.c: Update.
2671         * gnulib/import/pathmax.h: Update.
2672         * gnulib/import/pipe-safer.c: Update.
2673         * gnulib/import/rawmemchr.c: Update.
2674         * gnulib/import/readdir.c: Update.
2675         * gnulib/import/readlink.c: Update.
2676         * gnulib/import/realloc.c: Update.
2677         * gnulib/import/ref-add.sin: Update.
2678         * gnulib/import/ref-del.sin: Update.
2679         * gnulib/import/rename.c: Update.
2680         * gnulib/import/rewinddir.c: Update.
2681         * gnulib/import/rmdir.c: Update.
2682         * gnulib/import/same-inode.h: Update.
2683         * gnulib/import/save-cwd.c: Update.
2684         * gnulib/import/save-cwd.h: Update.
2685         * gnulib/import/scratch_buffer.h: Update.
2686         * gnulib/import/secure_getenv.c: Update.
2687         * gnulib/import/setenv.c: Update.
2688         * gnulib/import/signal.in.h: Update.
2689         * gnulib/import/stat-time.c: Update.
2690         * gnulib/import/stat-time.h: Update.
2691         * gnulib/import/stat-w32.c: Update.
2692         * gnulib/import/stat-w32.h: Update.
2693         * gnulib/import/stat.c: Update.
2694         * gnulib/import/stdbool.in.h: Update.
2695         * gnulib/import/stddef.in.h: Update.
2696         * gnulib/import/stdint.in.h: Update.
2697         * gnulib/import/stdio.in.h: Update.
2698         * gnulib/import/stdlib.in.h: Update.
2699         * gnulib/import/str-two-way.h: Update.
2700         * gnulib/import/strchrnul.c: Update.
2701         * gnulib/import/strdup.c: Update.
2702         * gnulib/import/streq.h: Update.
2703         * gnulib/import/strerror-override.c: Update.
2704         * gnulib/import/strerror-override.h: Update.
2705         * gnulib/import/strerror.c: Update.
2706         * gnulib/import/string.in.h: Update.
2707         * gnulib/import/stripslash.c: Update.
2708         * gnulib/import/strnlen1.c: Update.
2709         * gnulib/import/strnlen1.h: Update.
2710         * gnulib/import/strstr.c: Update.
2711         * gnulib/import/strtok_r.c: Update.
2712         * gnulib/import/sys_stat.in.h: Update.
2713         * gnulib/import/sys_time.in.h: Update.
2714         * gnulib/import/sys_types.in.h: Update.
2715         * gnulib/import/tempname.c: Update.
2716         * gnulib/import/tempname.h: Update.
2717         * gnulib/import/time.in.h: Update.
2718         * gnulib/import/unistd--.h: Update.
2719         * gnulib/import/unistd-safer.h: Update.
2720         * gnulib/import/unistd.in.h: Update.
2721         * gnulib/import/unsetenv.c: Update.
2722         * gnulib/import/verify.h: Update.
2723         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2724         * gnulib/import/wchar.in.h: Update.
2725         * gnulib/import/wctype.in.h: Update.
2726         * gnulib/import/xalloc-oversized.h: Update.
2727         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2728         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2729
2730 2018-08-16  Gary Benson <gbenson@redhat.com>
2731
2732         PR gdb/13000:
2733         * gdb/main.c (captured_main_1): Exit with nonzero status
2734         in batch mode if the last command to be executed failed.
2735         * NEWS: Mention the above.
2736
2737 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2738
2739         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2740         end of warning message.
2741
2742 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2743
2744         PR gdb/22943:
2745         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2746         (aarch64_extract_return_value): Use
2747         aapcs_is_vfp_call_or_return_candidate.
2748         (aarch64_return_in_memory): Likewise.
2749         (aarch64_store_return_value): Likewise.
2750
2751 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2752
2753         * aarch64-tdep.c
2754         (aapcs_is_vfp_call_or_return_candidate): Make static
2755         (pass_in_v_or_stack): Remove function.
2756         (pass_in_v_vfp_candidate): New function.
2757         (aarch64_push_dummy_call): Check for float register candidates.
2758
2759 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2760
2761         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2762         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2763         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2764
2765 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2766
2767         PR build/23399
2768         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2769         (struct ipa_sym_addresses): Rename to...
2770         (struct ipa_sym_addresses_common): ... this.
2771         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2772
2773 2018-08-28  Tom Tromey  <tom@tromey.com>
2774
2775         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2776         (token_fifo): Now a std::vector.
2777         (yylex, c_parse): Update.
2778         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2779         (token_fifo): Now a std::vector.
2780         (yylex, d_parse): Update.
2781         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2782         (token_fifo): Now a std::vector.
2783         (yylex, go_parse): Update.
2784
2785 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2786
2787         * parser-defs.h (struct type_stack) <elements>: Change type to
2788         std::vector<union type_stack_elt>.
2789         <depth, size>: Remove.
2790         * parse.c (parse_exp_in_context_1): Adjust.
2791         (type_stack_reserve): Remove.
2792         (check_type_stack_depth): Remove.
2793         (insert_into_type_stack): Adjust to std::vector.
2794         (insert_type): Likewise.
2795         (push_type): Likewise.
2796         (push_type_int): Likewise.
2797         (insert_type_address_space): Likewise.
2798         (pop_type): Likewise.
2799         (pop_type_int): Likewise.
2800         (pop_typelist): Likewise.
2801         (pop_type_stack): Likewise.
2802         (append_type_stack): Likewise.
2803         (push_type_stack): Likewise.
2804         (get_type_stack): Likewise.
2805         (type_stack_cleanup): Likewise.
2806         (push_typelist): Likewise.
2807         (follow_types): Likewise.
2808         (_initialize_parse): Likewise.
2809
2810 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2811
2812         * NEWS: Mention csky target.
2813
2814 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2815             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2816             Don Breazeal  <donb@codesourcery.com>
2817
2818         * csky-linux-tdep.c: New file.
2819         * csky-tdep.c: Likewise.
2820         * csky-tdep.h: Likewise.
2821         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2822         csky-tdep.o.
2823         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2824         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2825         * configure.tgt: Add csky support.
2826
2827 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2828
2829         * python/py-framefilter.c (py_print_frame): Print frame architecture
2830         when printing on an MI output.
2831
2832 2018-08-27  Tom Tromey  <tom@tromey.com>
2833
2834         PR build/23087:
2835         * configure: Rebuild.
2836         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2837
2838 2018-08-27  Tom Tromey  <tom@tromey.com>
2839
2840         * aarch64-linux-tdep.c
2841         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2842         casts to int.
2843
2844 2018-08-27  Tom Tromey  <tom@tromey.com>
2845
2846         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2847         unsigned.
2848         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2849         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2850         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2851         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2852         unsigned.
2853
2854 2018-08-27  Tom Tromey  <tom@tromey.com>
2855
2856         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2857         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2858
2859 2018-08-27  Tom Tromey  <tom@tromey.com>
2860
2861         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2862         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2863         ULONGEST_MAX.
2864         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2865         ULONGEST_MAX.
2866         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2867         ULONGEST_MAX.
2868         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2869         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2870         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2871         ULONGEST_MAX.
2872         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2873         (ppc64_linux_sigaction_tramp_frame)
2874         (ppc32_linux_sighandler_tramp_frame)
2875         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2876         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2877         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2878         * mn10300-linux-tdep.c (am33_linux_sigframe)
2879         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2880         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2881         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2882         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2883         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2884         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2885         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2886         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2887         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2888         * microblaze-linux-tdep.c
2889         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2890         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2891         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2892         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2893         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2894         * common/common-types.h (ULONGEST_MAX): New define.
2895         (CORE_ADDR_MAX): Fix formatting.
2896         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2897         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2898         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2899         (arm_linux_rt_sigreturn_tramp_frame)
2900         (arm_eabi_linux_sigreturn_tramp_frame)
2901         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2902         (thumb2_eabi_linux_sigreturn_tramp_frame)
2903         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2904         (arm_linux_restart_syscall_tramp_frame)
2905         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2906         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2907         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2908         ULONGEST_MAX.
2909         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2910
2911 2018-08-27  Tom Tromey  <tom@tromey.com>
2912
2913         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2914         CORE_ADDR_MAX.
2915         * mips-tdep.c (mips_deal_with_atomic_sequence)
2916         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2917         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2918         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2919         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2920         CORE_ADDR_MAX.
2921         * aarch64-tdep.c (aarch64_software_single_step): Use
2922         CORE_ADDR_MAX.
2923
2924 2018-08-27  Tom Tromey  <tom@tromey.com>
2925
2926         * linespec.c (complete_linespec_component): Add cast to "char".
2927         * completer.c (completion_tracker::build_completion_result): Add
2928         cast to "char".
2929
2930 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2931
2932         * solist.h (struct solist, struct target_so_ops): Fix
2933         indentation.
2934
2935 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2936
2937         * ada-tasks.c (ada_task_info_s): Remove typedef.
2938         (DEF_VEC_O(ada_task_info_s)): Remove.
2939         (struct ada_tasks_inferior_data): Initialize fields.
2940         <task_list>: Make an std::vector.
2941         (get_ada_tasks_inferior_data): Allocate with new.
2942         (ada_get_task_number): Adjust.
2943         (get_task_number_from_id): Likewise.
2944         (valid_task_id): Likewise.
2945         (ada_get_task_info_from_ptid): Likewise.
2946         (iterate_over_live_ada_tasks): Likewise.
2947         (add_ada_task): Likewise.
2948         (read_known_tasks): Likewise.
2949         (ada_build_task_list): Likewise.
2950         (print_ada_task_info): Likewise.
2951         (info_task): Likewise.
2952         (task_command_1): Likewise.
2953
2954 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2955
2956         * ada-lang.c (add_angle_brackets): Return std::string.
2957
2958 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2959
2960         * python/py-threadevent.c (py_get_event_thread): Initialize
2961         pythread.
2962
2963 2018-08-24  Pedro Alves  <palves@redhat.com>
2964
2965         * python/py-bpevent.c (create_breakpoint_event_object): Use
2966         copy-initialization.
2967         * python/py-continueevent.c (emit_continue_event): Use
2968         copy-initialization.
2969         * python/py-exitedevent.c (create_exited_event_object): Return a
2970         gdbpy_ref<>.
2971         (emit_exited_event): Use copy-initialization.
2972         * python/py-inferior.c (python_new_inferior)
2973         (python_inferior_deleted, add_thread_object): Use
2974         copy-initialization.
2975         * python/py-infevents.c (create_inferior_call_event_object)
2976         (create_register_changed_event_object)
2977         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2978         (emit_inferior_call_event, emit_memory_changed_event)
2979         (emit_register_changed_event): Use copy-initialization.
2980         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2981         Return a gdbpy_ref<>.
2982         (emit_new_objfile_event): Use copy-initialization.
2983         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2984         (emit_clear_objfiles_event): Use copy-initialization.
2985         * python/py-signalevent.c (create_signal_event_object): Use
2986         copy-initialization.
2987         * python/py-threadevent.c (create_thread_event_object): Use
2988         copy-initialization.
2989
2990 2018-08-24  Pedro Alves  <palves@redhat.com>
2991             Simon Marchi  <simon.marchi@ericsson.com>
2992
2993         PR gdb/23379
2994         * python/py-continueevent.c: Include "gdbthread.h".
2995         (create_continue_event_object): Add intro comment.  Add 'ptid'
2996         parameter.  Use it to find thread to pass to
2997         create_thread_event_object.
2998         (emit_continue_event): Pass PTID down to
2999         create_continue_event_object.
3000         * python/py-event.h (py_get_event_thread): Declare.
3001         (create_thread_event_object): Remove default from 'thread'
3002         parameter.
3003         * python/py-stopevent.c (create_stop_event_object): Use
3004         py_get_event_thread.
3005         * python/py-threadevent.c (get_event_thread): Rename to ...
3006         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3007         and use it to find the thread.
3008         (create_thread_event_object): Assert that THREAD isn't null.
3009         Don't find the event thread here.
3010
3011 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3012
3013         * block.h (blockrange, blockranges): New struct declarations.
3014         (struct block): Add new field named `ranges'.
3015         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3016         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3017         macros for accessing ranges in struct block.
3018         (make_blockranges): New declaration.
3019         block.c (make_blockranges): New function.
3020         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3021         for block.
3022         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3023         * blockframe.c (cache_pc_function_block): New static global.
3024         (clear_pc_function_cache): Clear cache_pc_function_block.
3025         (find_pc_partial_function): Move comment to symtab.h.  Add
3026         support for non-contiguous blocks.
3027         * cli/cli-cmds.c (block.h): Include.
3028         (print_disassembly): Handle printing of non-contiguous blocks.
3029         (disassemble_current_function): Likewise.
3030         (disassemble_command): Likewise.
3031
3032         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3033         BLOCK_START.
3034         * blockframe.c (get_pc_function_start): Likewise.
3035         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3036         (gcc_symbol_address): Likewise.
3037         * compile/compile-object-run.c (compile_object_run): Likewise.
3038         * compile/compile.c (get_expr_block_and_pc): Likewise.
3039         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3040         (func_addr_to_tail_call_list): Likewise.
3041         * findvar.c (default_read_var_value): Likewise.
3042         * inline-frame.c (inline_frame_this_id): Likewise.
3043         (skip-inline_frames): Likewise.
3044         * infcmd.c (until_next_command): Likewise.
3045         * linespec.c (convert_linespec_to_sals): Likewise.
3046         * parse.c (parse_exp_in_context_1): Likewise.
3047         * printcmd.c (build_address_symbolic): likewise.
3048         (info_address_command): Likewise.
3049         symtab.c (find_function_start_sal): Likewise.
3050         (skip_prologue_sal): Likewise.
3051         (find_function_alias_target): Likewise.
3052         (find_gnu_ifunc): Likewise.
3053         * stack.c (find_frame_funname): Likewise.
3054         * symtab.c (fixup_symbol_section): Likewise.
3055         (find_function_start_sal): Likewise.
3056         (skip_prologue_sal): Likewsie.
3057         (find_function_alias_target): Likewise.
3058         (find_gnu_ifunc): Likewise.
3059         * tracepoint.c (info_scope_command): Likewise.
3060         * value.c (value_fn_field): Likewise.
3061
3062         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3063         in place of find_pc_partial_function.
3064         * blockframe.c (find_function_entry_range_from_pc): New function.
3065         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3066         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3067         for each range in a block.
3068
3069
3070 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3071
3072         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3073         incrementation.
3074
3075 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3076
3077         * solib-svr4.c (read_program_headers_from_bfd): Return
3078         gdb::optional<gdb::byte_vector>.
3079         (svr4_exec_displacement): Adjust.
3080
3081 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3082
3083         * solib-svr4.c (read_program_header): Return
3084         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3085         (find_program_interpreter): Return
3086         gdb::optional<gdb::byte_vector>.
3087         (scan_dyntag_auxv): Adjust.
3088         (enable_break): Adjust.
3089         (svr4_exec_displacement): Adjust.
3090
3091 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3092
3093         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3094         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3095
3096 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3097
3098         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3099         string_vprintf.
3100         * guile/scm-utils.c (gdbscm_printf): Likewise.
3101         * serial.c (serial_printf): Likewise.
3102         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3103
3104 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3105
3106         * stack.c (print_frame): Print frame architecture when printing on
3107         an MI output.
3108         * NEWS: Mention new "arch" attribute in frame output.
3109
3110 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3111
3112         * arch/aarch64.h (aarch64_regnum): Update comment.
3113
3114 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3115
3116         * NEWS: Add SVE to 8.2 section.
3117
3118 2018-08-21  Pedro Alves  <palves@redhat.com>
3119
3120         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3121         out from gdbscm_parse_function_args.
3122         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3123         gdbscm_parse_function_args_1.
3124
3125 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3126
3127         PR gdb/17816
3128         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3129         operator.
3130
3131 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3132
3133         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3134
3135 2018-08-19  Michael Spang  <spang@google.com>
3136
3137         PR gdb/11786
3138         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3139         for PT_TLS segments.
3140
3141 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3142
3143         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3144         dwarf_variable_value.
3145         * dwarf2-frame.c (class dwarf_expr_executor):
3146         Add override for dwarf_variable_value.
3147         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3148         (class symbol_needs_eval_context): Likewise.
3149         (indirect_synthetic_pointer): Add forward declaration.
3150         (sect_variable_value): New function.
3151         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3152         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3153         for DW_OP_GNU_variable_value.
3154
3155 2018-08-16  Tom Tromey  <tom@tromey.com>
3156
3157         * top.c (read_command_file): Update.
3158         (command_line_input): Remove "repeat" argument.
3159         * ada-lang.c (get_selections): Update.
3160         * linespec.c (decode_line_2): Update.
3161         * defs.h (command_line_input): Remove argument.
3162         * cli/cli-script.c (read_next_line): Update.
3163         * python/py-gdb-readline.c: Update.
3164
3165 2018-08-17  Tom Tromey  <tom@tromey.com>
3166
3167         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3168         command_line_input.
3169
3170 2018-08-15  Tom Tromey  <tom@tromey.com>
3171
3172         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3173
3174 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3175
3176         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3177         If used, use find_pc_partial_function to find address range
3178         to disassemble.
3179         * mi/mi-main.c (mi_cmd_list_features): Report
3180         "data-disassemble-a-option" feature.
3181         * NEWS: Mention new -data-disassemble option -a.
3182
3183 2018-08-13  Tom Tromey  <tom@tromey.com>
3184
3185         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3186
3187 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3188
3189         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3190         (aarch64_linux_collect_sve_regset): Likewise.
3191         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3192         * regcache.h (regcache_map_entry_size): New function.
3193
3194 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3195
3196         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3197         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3198         (SVE_HEADER_VL_LENGTH): Likewise.
3199         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3200         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3201         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3202         (SVE_HEADER_SIZE_OFFSET): Likewise.
3203         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3204         (SVE_HEADER_VL_OFFSET): Likewise.
3205         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3206         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3207         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3208         (SVE_HEADER_SIZE): Likewise.
3209         (aarch64_linux_core_read_vq): Add function.
3210         (aarch64_linux_core_read_description): Check for SVE section.
3211
3212 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3213
3214         * aarch64-fbsd-tdep.c
3215         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3216         collect_size.
3217         * aarch64-linux-tdep.c
3218         (aarch64_linux_iterate_over_regset_sections): Likewise.
3219         * alpha-linux-tdep.c
3220         (alpha_linux_iterate_over_regset_sections):
3221         * alpha-nbsd-tdep.c
3222         (alphanbsd_iterate_over_regset_sections): Likewise.
3223         * amd64-fbsd-tdep.c
3224         (amd64fbsd_iterate_over_regset_sections): Likewise.
3225         * amd64-linux-tdep.c
3226         (amd64_linux_iterate_over_regset_sections): Likewise.
3227         * arm-bsd-tdep.c
3228         (armbsd_iterate_over_regset_sections): Likewise.
3229         * arm-fbsd-tdep.c
3230         (arm_fbsd_iterate_over_regset_sections): Likewise.
3231         * arm-linux-tdep.c
3232         (arm_linux_iterate_over_regset_sections): Likewise.
3233         * corelow.c (get_core_registers_cb): Likewise.
3234         (core_target::fetch_registers): Likewise.
3235         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3236         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3237         * gdbarch.h (void): Regenerate.
3238         * gdbarch.sh: Add supply_size and collect_size.
3239         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3240         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3241         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3242         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3243         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3244         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3245         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3246         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3247         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3248         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3249         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3250         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3251         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3252         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3253         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3254         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3255         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3256         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3257         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3258         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3259         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3260         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3261         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3262         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3263         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3264         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3265         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3266         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3267         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3268         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3269
3270 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3271
3272         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3273         with string_printf.
3274
3275 2018-08-10  Keith Seitz  <keiths@redhat.com>
3276
3277         * compile/compile-c-support.c (add_code_header, add_code_footer):
3278         Move into policy class.
3279         (c_push_user_expression, pop_user_expression_nop)
3280         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3281         (compile_program): New host class.
3282         (c_compile_program): New typedef.
3283         (c_compute_porgram): Use c_compile_program.
3284
3285 2018-08-10  Keith Seitz  <keiths@redhat.com>
3286
3287         * compile/compile-internal.h (compile_instance::~compile_instance):
3288         Remove calls to htab_delete.
3289         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3290         * compile.c (compile_instance::compile_instance): Initialize
3291         htab unique pointers.
3292         (compile_instance::get_cached_type, compile_instance::insert_type)
3293         (compile_instance::error_symbol_once): Update for unique_ptr.
3294
3295 2018-08-10  Keith Seitz  <keiths@redhat.com>
3296
3297         * compile/compile-c-symbols.c (struct symbol_error)
3298         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3299         (compile_instance::insert_symbol_error)
3300         (compile_instance::error_symbol_once): Move to ...
3301         * compile/compile.c: ... here.
3302
3303 2018-08-10  Keith Seitz  <keiths@redhat.com>
3304
3305         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3306         instead of `new_compile_instance'.
3307         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3308         Update description.
3309         If the symbol error map is not initialized, create it.
3310         (generate_c_for_for_one_symbol): Do not check/initialize
3311         the symbol error map.
3312         * compile/compile-c-types.c (compile_c_instance): Make a class.
3313         Update all callers.
3314         (compile_instance::compile_instance): Initialize the type cache.
3315         (get_cached_type): New function.
3316         (insert_type): Update description.
3317         (compile_c_instance::m_default_cflags): Define.
3318         (convert_type): Update description.  Use get_cached_type.
3319         (delete_instance): Moved to destructor.
3320         (new_compile_instance): Moved to constructor.
3321         * compile/compile-c.h (compile_c_instance): Make class inheriting
3322         from compile_instance.
3323         <base>: Remove field.
3324         <type_map, symbol_err_map>: Move to base class.
3325         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3326         * compile/compile-internal.h (compile_instance): Make class.
3327         <type_map_t, symbol_err_map_t>: Define.
3328         <fe>: Rename to `m_gcc_fe'.
3329         <scope, block, gcc_target_options>: Add `m_' prefix.
3330         <m_type_map, m_symbol_err_map>: New fields, moved from
3331         compile_c_instance.
3332         <destroy>: Remove.
3333         (convert_type, new_compile_instance): Remove.
3334         * compile/compile.c (cleanup_compile_instance): Remove.
3335         (compile_to_object): Use unique_ptr to eliminate cleanups.
3336         (compile_instance::set_print_callback, compile_instance::version)
3337         (compile_instance::set_verbose)
3338         (compile_instance::set_driver_filename)
3339         (compile_instance::set_triplet_regexp)
3340         (compile_instance::set_arguments)
3341         (compile_instance::set_source_file)
3342         (compile_instance::compile): Define.
3343
3344 2018-08-10  Keith Seitz  <keiths@redhat.com>
3345
3346         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3347         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3348         gcc-c-fe.def to define C plugin.
3349         (delete_instance): Delete `c_plugin'.
3350         (new_compile_instance): Initialize `c_plugin'.
3351         * compile/compile-c.h: Include gcc_c_plugin.h.
3352         (struct compile_c_instance) <c_plugin>: New member.
3353         * gcc-c-plugin.h: New file.
3354         Update all callers with API change.
3355
3356 2018-08-10  Keith Seitz  <keiths@redhat.com>
3357
3358         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3359         (HFILES_NO_SRCDIR): ... to here.
3360         Add compile-internal.h and compile-c.h.
3361         * compile/compile-c-support.c: Include compile-c.h.
3362         * compile/compile-c-symbols.c: Include compile-c.h.
3363         (generate_c_for_variable_locations): Update comment.
3364         * compile/compile-c-types.c: Include compile-c.h.
3365         * compile/compile-c.h: New file -- moved C language declarations
3366         from other files here.
3367         * compile/compile-internal.h: Do not include hashtab.h or
3368         common/enum-flags.h.
3369         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3370         (gcc_convert_symbol, gcc_symbol_address)
3371         (generate_c_for_variable_locations, c_get_mode_for_size)
3372         (c_get_range_decl_name): Definitions moved to compile-c.h.
3373         * compile/compile-loc2c.c: Include compile-c.h.
3374
3375 2018-08-10  Keith Seitz  <keiths@redhat.com>
3376
3377         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3378         (c_symbol_substitution_name): ... this.
3379         Update all callers.
3380
3381 2018-08-10  Keith Seitz  <keiths@redhat.com>
3382
3383         * compile/compile-c-support.c (c_compute_program): Use
3384         unique_xmalloc_ptr to eliminate cleanup.
3385         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3386         Return a unique_xmalloc_ptr and eliminate cleanup.
3387         * compile/compile-internal.h (generate_c_for_variable_locations):
3388         Return unique_xmalloc_ptr and update description.
3389
3390 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3391
3392         * corelow.c (core_target::get_core_register_section): Rename
3393         min_size to section_min_size.
3394
3395 2018-08-09  Jim Wilson  <jimw@sifive.com>
3396
3397         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3398         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3399         * NEWS: Mention new GNU/Linux RISC-V target.
3400         * configure.host: Add riscv*-*-linux*.
3401         * configure.nat: Add riscv*.
3402         * configure.tgt: Add riscv*-*-linux*.
3403         * riscv-linux-nat.c: New file.
3404         * riscv-linux-tdep.c: New file.
3405
3406 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3407
3408         * infrun.c (resume): Make static, add forward declaration.
3409         (proceed): Update header comment.
3410         * infrun.h (resume): Delete declaration.
3411
3412 2018-08-09  Tom Tromey  <tom@tromey.com>
3413
3414         * riscv-tdep.h: Minor formatting fixes.
3415
3416 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3417
3418         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3419         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3420         (test_mkdir_recursive): Likewise.
3421         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3422
3423 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3424
3425         * valarith.c (value_subscripted_rvalue): If an array is not in
3426         memory, and we don't know the upper bound, then we can't know that
3427         the requested element exists or not.
3428
3429 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3430
3431         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3432         (target_options_to_string): Add comment.
3433
3434 2018-08-08  Tom Tromey  <tom@tromey.com>
3435
3436         * unittests/scoped_mmap-selftests.c: Check result of "write".
3437
3438 2018-08-08  Jim Wilson  <jimw@sifive.com>
3439
3440         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3441         (decode_register_index_short): New.
3442         (decode_j_type_insn, decode_cj_type_insn): New.
3443         (decode_b_type_insn, decode_cb_type_insn): New.
3444         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3445         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3446         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3447         is_c_sw_insn instead of is_sw_insn.
3448         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3449         (riscv_software_single_step): New.
3450         * riscv-tdep.h (riscv_software_single_step): Declare.
3451
3452         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3453         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3454
3455 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3456
3457         PR gdb/18050:
3458         * target.c (dispose_inferior): Don't dispose of inferiors that are
3459         already killed.
3460
3461 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3462
3463         * remote.c (remote_target::download_tracepoint): Change char* to
3464         const char*.
3465
3466 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3467
3468         * target.h (target_options_to_string): Return an std::string.
3469         * target.c (str_comma_list_concat_elem): Return void, use
3470         std::string.
3471         (do_option): Likewise.
3472         (target_options_to_string): Return an std::string.
3473         * linux-nat.c (linux_nat_target::wait): Adjust.
3474         * target-debug.h (target_debug_print_options): Adjust.
3475
3476 2018-08-07  Tom Tromey  <tom@tromey.com>
3477
3478         * Makefile.in (CPPFLAGS): New variable.
3479         (INTERNAL_CPPFLAGS): Use it.
3480
3481 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3482
3483         * NEWS: Mention the index cache.
3484
3485 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3486
3487         * common/pathstuff.h (get_standard_cache_dir): New.
3488         * common/pathstuff.c (get_standard_cache_dir): New.
3489         * build-id.h (build_id_to_string): New.
3490         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3491         DEBUG_STR_SUFFIX): Move to here.
3492         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3493         DEBUG_STR_SUFFIX): Move from there.
3494         (write_psymtabs_to_index): Make non-static, add basename
3495         parameter.  Write to temporary files, rename when done.
3496         (save_gdb_index_command): Adjust call to
3497         write_psymtabs_to_index.
3498         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3499         field.
3500         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3501         (get_gdb_index_contents_from_cache): New.
3502         (get_gdb_index_contents_from_cache_dwz): New.
3503         (dwarf2_initialize_objfile): Read index from cache.
3504         (dwarf2_build_psymtabs): Save to index.
3505         * dwarf-index-cache.h: New file.
3506         * dwarf-index-cache.c: New file.
3507         * dwarf-index-write.h: New file.
3508
3509 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3510
3511         * gnulib/aclocal.m4: Re-generate.
3512         * gnulib/config.in: Re-generate.
3513         * gnulib/configure: Re-generate.
3514         * gnulib/import/Makefile.am: Re-generate.
3515         * gnulib/import/Makefile.in: Re-generate.
3516         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3517         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3518         * gnulib/import/m4/mkdir.m4: New file.
3519         * gnulib/import/mkdir.c: New file.
3520         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3521         module.
3522
3523 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3524
3525         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3526         * common/scoped_mmap.c: New file.
3527         * common/scoped_mmap.h (destroy): New method.
3528         (~scoped_mmap, reset): Use destroy.
3529         (scoped_mmap): New move constructor.
3530         (mmap_file): New declaration.
3531         * unittests/scoped_mmap-selftests.c (test_normal,
3532         test_invalid_filename, run_tests): New functions.
3533         (_initialize_scoped_mmap_selftests): Register selftest.
3534
3535 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3536
3537         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3538         (read_gdb_index_from_buffer): ... this.  Remove section
3539         parameter, add buffer parameter.
3540         (get_gdb_index_contents_ftype,
3541         get_gdb_index_contents_dwz_ftype): New typedefs.
3542         (dwarf2_read_gdb_index): Add callback parameters to get the
3543         index contents.
3544         (get_gdb_index_contents_from_section): New.
3545         (dwarf2_initialize_objfile): Update call to
3546         dwarf2_read_gdb_index.
3547
3548 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3549
3550         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3551         (gdb_open_cloexec): Likewise.
3552         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3553         (commandline_from_pid): Likewise.
3554         (linux_xfer_osdata_threads): Likewise.
3555         (linux_xfer_osdata_fds): Likewise.
3556         * ada-lang.c (is_package_name): Likewise.
3557         * auxv.c (procfs_xfer_auxv): Likewise.
3558         * breakpoint.c (print_one_breakpoint_location): Use
3559         uiout::field_fmt.
3560         (print_one_catch_solib): Use string_printf.
3561         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3562         (add_pe_forwarded_sym): Likewise.
3563         * dwarf2read.c (create_type_unit_group): Likewise.
3564         (build_error_marker_type): Likewise.
3565         * infcall.c (get_function_name): Likewise.
3566         * valprint.c (print_converted_chars_to_obstack): Likewise.
3567         * xtensa-tdep.c (xtensa_register_type): Likewise.
3568
3569 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3570
3571         * remote.c (remote_target::download_tracepoint): Fix format
3572         string errors.
3573
3574 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3575
3576         * tracefile.c: Include common/byte-vector.h.
3577         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3578         with trace_regblock_size if needed.  Update uses of buf.
3579
3580 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3581
3582         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3583         std::vector<unsigned char>.
3584         * tracepoint.c (collection_list::collection_list): Remove
3585         m_regs_mask initializer from initializer list.  Resize
3586         m_regs_mask using the largest remote register number.
3587         (collection_list::add_remote_register): Remove size check on
3588         m_regs_mask.  Use at to access element.
3589         (collection_list::stringify): Change type of temp_buf to
3590         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3591         stringify the register mask.  Use pack_hex_byte for the register
3592         mask.
3593
3594 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3595
3596         * tracepoint.h (class collection_list) <add_register>: Remove.
3597         <add_remote_register, add_ax_registers, add_local_register>:
3598         Declare.
3599         <add_memrange>: Add scope parameter.
3600         * tracepoint.c (encode_actions_1): Likewise.
3601         (collection_list::add_register): Rename to ...
3602         (collection_list::add_remote_register): ... this.  Update
3603         comment.
3604         (collection_list::add_ax_registers, add_local_register): New
3605         methods.
3606         (collection_list::add_memrange): Add scope parameter.  Call
3607         add_local_register instead of add_register.
3608         (finalize_tracepoint_aexpr): New function.
3609         (collection_list::collect_symbol): Update calls to add_memrange.
3610         Call add_local_register instead of add_register.  Call
3611         add_ax_registers.  Call finalize_tracepoint_aexpr.
3612         (encode_actions_1): Get remote regnos for $reg action.  Call
3613         add_remote_register, add_ax_registers, and add_local_register.
3614         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3615         (validate_actionline): Call finalize_tracepoint_aexpr.
3616
3617 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3618
3619         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3620         Replace array buf with gdb::char_vector buf, of size
3621         get_remote_packet_size ().  Replace references to buf and
3622         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3623         and xsnprintf with snprintf.  Raise errors if the buffer is too
3624         small.
3625
3626 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3627
3628         * remote.c (remote_target::download_tracepoint): Fix the has_more
3629         predicate in the QTDP action list iteration.
3630
3631 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3632
3633         * remote.c (remote_target::download_tracepoint): Fix indentation
3634         in for block.
3635
3636 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3637
3638         * proc-api.c (_initialize_proc_api): Remove c, unused.
3639         * procfs.c (procfs_init_inferior): Remove signals, unused.
3640         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3641         unused.
3642
3643 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3644             Andrew Burgess  <andrew.burgess@embecosm.com>
3645
3646         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3647         'W_STOPCODE (0)' as this could be ambiguous.
3648
3649 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3650
3651         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3652         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3653         "ai_socktype").
3654
3655 2018-08-02  Tom Tromey  <tom@tromey.com>
3656
3657         PR symtab/16842.
3658         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3659         symbols.
3660         (process_structure_scope): Likewise.
3661
3662 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3663
3664         PR gdb/22629:
3665         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3666         kill inferior.
3667
3668 2018-08-02  Tom Tromey  <tom@tromey.com>
3669
3670         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3671         (darwin_suspend_inferior, darwin_resume_inferior)
3672         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3673         (darwin_check_new_threads): Check result of get_darwin_inferior.
3674
3675 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3676
3677         GDB 8.1.1 released.
3678
3679 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3680
3681         * varobj.c (varobj_get_path_expr_parent): Report an error if
3682         parent is a dynamic varobj.
3683
3684 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3685
3686         * gnulib/aclocal.m4: Re-generate.
3687         * gnulib/config.in: Re-generate.
3688         * gnulib/configure: Re-generate.
3689         * gnulib/import/Makefile.in: Re-generate.
3690         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3691         * gnulib/import/m4/onceonly.m4: Re-generate.
3692
3693 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3694
3695         * target-descriptions.c (struct xml_test_tdesc): New.
3696         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3697         (record_xml_tdesc): Update.
3698         (maintenance_check_xml_descriptions): Update.
3699         * target-descriptions.h (record_xml_tdesc): Update comment.
3700
3701 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3702
3703         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3704         checking array bounds are defined.
3705
3706 2018-07-30  Tom Tromey  <tom@tromey.com>
3707
3708         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3709         irreflexivity violation.
3710
3711 2018-07-30  Tom Tromey  <tom@tromey.com>
3712
3713         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3714         * value.c (unpack_long): Remove lint code.
3715         * valops.c (value_ind): Remove lint code.
3716         * valarith.c (value_x_binop, value_x_unop, value_equal)
3717         (value_pos): Remove lint code.
3718
3719 2018-07-28  Tom de Vries  <tdevries@suse.de>
3720
3721         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3722         with undefined upper bound as <optimized out>.
3723
3724 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3725
3726         * gcore.in: Rename variable "name" to "prefix".  Expand
3727         "usage" text.
3728
3729 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3730
3731         * windows-nat.c (windows_nat_target::create_inferior): Update to
3732         call close() in global namespace.
3733
3734 2018-07-26  Tom Tromey  <tom@tromey.com>
3735
3736         * dwarf-index-write.c (add_address_entry): Don't add objfile
3737         offsets.
3738         * dbxread.c (find_stab_function): Rename from
3739         find_stab_function_addr.  Return a bound_minimal_symbol.
3740         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3741         Don't add objfile offsets.
3742         (end_psymtab): Use raw_text_low, raw_text_high,
3743         MSYMBOL_VALUE_RAW_ADDRESS.
3744         (read_ofile_symtab): Update.
3745         (process_one_symbol): Update.
3746         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3747         offsets.
3748         (dw2_relocate): Remove.
3749         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3750         searching addrmap.
3751         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3752         Update.
3753         (process_psymtab_comp_unit_reader, add_partial_symbol)
3754         (add_partial_subprogram, dwarf2_ranges_read): Update.
3755         (load_partial_dies): Update.
3756         (add_address_entry): Don't add objfile offsets.
3757         (dwarf2_build_include_psymtabs): Update.
3758         (create_addrmap_from_aranges): Don't add objfile offsets.
3759         (dw2_find_pc_sect_compunit_symtab): Update.
3760         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3761         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3762         Update.
3763         (parse_partial_symbols): Don't add objfile offsets.  Use
3764         raw_text_low, raw_text_high.  Update.
3765         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3766         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3767         or call 'relocate' quick function.  Clear psymbol_map.
3768         * psympriv.h (struct partial_symbol) <address>: Add section
3769         offset.
3770         <set_unrelocated_address>: Rename from set_address.
3771         <raw_text_low, raw_text_high>: New methods.
3772         <text_low, text_high>: Add objfile parameter.
3773         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3774         set_unrelocated_address.
3775         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3776         (find_pc_psymbol): Update.
3777         (fixup_psymbol_section, relocate_psymtabs): Remove.
3778         (dump_psymtab, psym_functions): Update.
3779         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3780         parameter.
3781         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3782         (start_psymtab_common): Update.
3783         * symfile-debug.c (debug_qf_relocate): Remove.
3784         (debug_sym_quick_functions): Update.
3785         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3786         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3787         Update.
3788
3789 2018-07-26  Tom Tromey  <tromey@redhat.com>
3790
3791         * dbxread.c (end_psymtab): Use text_high_valid and
3792         text_low_valid.
3793         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3794         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3795         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3796         Update comment.
3797         <text_low_valid, text_high_valid>: New fields.
3798         <set_text_low, set_text_high>: Update.
3799         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3800
3801 2018-07-26  Tom Tromey  <tom@tromey.com>
3802
3803         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3804         Update.
3805         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3806         textlow and texthigh fields.
3807         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3808         Update.
3809         * mdebugread.c (parse_lines, parse_partial_symbols)
3810         (psymtab_to_symtab_1): Update.
3811         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3812         Rename fields.  Update comment.  Now private.
3813         <text_low, text_high, set_text_low, set_text_high>: New methods.
3814         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3815         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3816         (start_psymtab_common, maintenance_info_psymtabs)
3817         (maintenance_check_psymtabs): Update.
3818         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3819         texthigh fields.
3820         (scan_xcoff_symtab): Update.
3821
3822 2018-07-26  Tom Tromey  <tromey@redhat.com>
3823
3824         * psympriv.h (struct partial_symbol) <unrelocated_address,
3825         address, set_address>: New methods.
3826         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3827         (fixup_psymbol_section, relocate_psymtabs): Update.
3828         (print_partial_symbols): Add 'objfile' parameter.  Update.
3829         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3830         Update.
3831
3832 2018-07-26  Tom Tromey  <tom@tromey.com>
3833
3834         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3835         (debug_names::write_psymbols): Update.
3836         * psympriv.h (struct partial_symbol): Derive from
3837         general_symbol_info.
3838         <obj_section>: New method.
3839         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3840         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3841         (find_pc_sect_psymbol, fixup_psymbol_section)
3842         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3843         (print_partial_symbols, recursively_search_psymtabs)
3844         (compare_psymbols, psymbol_hash, psymbol_compare)
3845         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3846         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3847
3848 2018-07-26  Tom Tromey  <tromey@redhat.com>
3849
3850         * dbxread.c (end_psymtab): Remove dead code.
3851
3852 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3853
3854         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3855         DWARF unwinders are disabled.
3856         * dwarf2-frame.c: Add dwarf2read.h include.
3857         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3858         disabled.
3859         (dwarf2_frame_unwinders_enabled_p): Define.
3860         (show_dwarf_unwinders_enabled_p): New function.
3861         (_initialize_dwarf2_frame): Register switch to control DWARF
3862         unwinder use.
3863         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3864         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3865         (show_dwarf_cmdlist): Remove static keyword.
3866         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3867         (show_dwarf_cmdlist): Declare.
3868         * NEWS: Document new feature.
3869
3870 2018-07-26  Tom de Vries  <tdevries@suse.de>
3871
3872         PR breakpoints/23366
3873         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3874
3875 2018-07-26  Tom de Vries  <tdevries@suse.de>
3876
3877         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3878         DW_AT_count can't be translated to a dynamic prop.
3879
3880 2018-07-25  Tom de Vries  <tdevries@suse.de>
3881
3882         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3883         try/catch.
3884
3885 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3886
3887         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3888
3889 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3890
3891         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3892
3893 2018-07-24  Keith Seitz  <keiths@redhat.comt
3894
3895         PR symtab/23010
3896         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3897         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3898         instead of add_symbol_to_list.
3899         (read_file_scope): Call prepare_one_comp_unit before reading
3900         any other DIEs.
3901
3902 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3903
3904         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3905
3906 2018-07-24  Tom Tromey  <tom@tromey.com>
3907
3908         * utils.c (malloc, realloc, free): Don't declare.
3909         * configure, config.in: Rebuild.
3910         * configure.ac: Don't check for declarations of free, malloc, or
3911         realloc.
3912
3913 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3914
3915         * aarch64-linux-nat.c
3916         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3917         variable.
3918         * arm-linux-nat.c (fetch_regs): Likewise.
3919         (store_regs): Likewise.
3920         (fetch_vfp_regs): Likewise.
3921         (store_vfp_regs): Likewise.
3922         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3923         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3924         (arm_linux_nat_target::insert_watchpoint): Likewise.
3925         (arm_linux_nat_target::remove_watchpoint): Likewise.
3926         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3927         Likewise.
3928         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3929         Likewise.
3930         * ppc-linux-nat.c (fetch_register): Likewise.
3931         (fetch_all_gp_regs): Likewise.
3932         (fetch_ppc_registers): Likewise.
3933         (store_all_gp_regs): Likewise.
3934         (store_ppc_registers): Likewise.
3935         (hwdebug_insert_point): Likewise.
3936         (can_use_watchpoint_cond_accel): Likewise.
3937         * remote-sim.c (gdb_os_write_stdout): Likewise.
3938
3939 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3940             Tom Tromey  <tom@tromey.com>
3941
3942         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3943         test for it.
3944         * configure: Rebuild.
3945
3946 2018-07-22  Tom Tromey  <tom@tromey.com>
3947
3948         * regformats/regdat.sh: Define xmltarget_${name} inside
3949         #ifndef IN_PROCESS_AGENT.
3950
3951 2018-07-22  Tom Tromey  <tom@tromey.com>
3952
3953         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3954
3955 2018-07-22  Tom Tromey  <tom@tromey.com>
3956
3957         * symfile.c (reread_symbols): Notify iter, not objfile.
3958
3959 2018-07-22  Tom Tromey  <tom@tromey.com>
3960
3961         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3962         Use arch_ops.
3963         (ravenscar_thread_target::prepare_to_store): Likewise.
3964
3965 2018-07-22  Tom Tromey  <tom@tromey.com>
3966
3967         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3968         unused variable.  Call value_fetch_lazy when needed.
3969         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3970         Remove unused variable.  Call value_fetch_lazy when needed.
3971
3972 2018-07-22  Tom Tromey  <tom@tromey.com>
3973
3974         * m32c-tdep.c (mark_dma): Return void.
3975         (make_regs): Remove unused declarations.
3976
3977 2018-07-22  Tom Tromey  <tom@tromey.com>
3978
3979         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3980         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3981         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3982         bkscm_get_valid_block_smob_arg_unsafe for effect.
3983
3984 2018-07-22  Tom Tromey  <tom@tromey.com>
3985
3986         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3987         value_type.
3988
3989 2018-07-22  Tom Tromey  <tom@tromey.com>
3990
3991         * windows-nat.c (saved_context): Conditionally define.
3992         * remote.c (remote_target::remote_btrace_maybe_reopen):
3993         Conditionally declare "warned".
3994         * inflow.c (sigquit_ours): Conditionally define.
3995         (new_tty): Move "tty" declaration inside #if.
3996         * guile/guile.c (guile_datadir): Conditionally define.
3997         * charset.c (set_be_le_names): Move some declarations inside #if.
3998         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3999         #if.
4000         (parse_xml_btrace_conf): Likewise.
4001
4002 2018-07-22  Tom Tromey  <tom@tromey.com>
4003
4004         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4005
4006 2018-07-22  Tom Tromey  <tom@tromey.com>
4007
4008         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4009         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4010         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4011         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4012         * stack.c (frame_apply_level_command): Remove unused variable.
4013         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4014         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4015         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4016         unused variable.
4017         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4018         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4019         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4020         variable.
4021         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4022         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4023         variable.
4024         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4025         Remove unused variable.
4026         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4027         variable.
4028         * common/tdesc.c (print_xml_feature::visit): Remove unused
4029         variable.
4030         * compile/compile-object-load.c (store_regs): Remove unused
4031         variables.
4032         * complaints.c (clear_complaints): Remove unused variable.
4033         * corelow.c (core_target_open): Remove unused variable.
4034         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4035         variable.
4036         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4037         variable.
4038         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4039         variable.
4040         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4041         variable.
4042         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4043         variable.
4044         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4045         variable.
4046         * ia64-tdep.c (examine_prologue): Remove unused variable.
4047         * infcall.c (run_inferior_call): Remove unused variable.
4048         * inferior.c (exit_inferior): Remove unused variable.
4049         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4050         * linespec.c (decode_line_2): Remove unused variable.
4051         * linux-nat.c (super_close): Remove.
4052         * linux-tdep.c (linux_info_proc): Remove unused variable.
4053         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4054         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4055         Remove unused variable.
4056         * parse.c (find_minsym_type_and_address): Remove unused variable.
4057         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4058         variable.
4059         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4060         variable.
4061         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4062         variables.
4063         * record-btrace.c (record_btrace_target::store_registers): Remove
4064         unused variable.
4065         (cmd_show_record_btrace_cpu): Remove unused variable.
4066         * riscv-tdep.c (riscv_register_reggroup_p)
4067         (riscv_push_dummy_call, riscv_return_value): Remove unused
4068         variable.
4069         * rust-exp.y (literal): Remove unused variable.
4070         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4071         unused variable.
4072         <STRUCTOP_ANONYMOUS>: Likewise.
4073         * s390-linux-tdep.c (s390_linux_init_abi_31)
4074         (s390_linux_init_abi_64): Remove unused variable.
4075         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4076         (file_select_thread, net_windows_open, _initialize_ser_windows):
4077         Remove unused variables.
4078         * symtab.c (find_pc_sect_line): Remove unused variable.
4079         * target-memory.c (compute_garbled_blocks): Remove unused
4080         variable.
4081         (target_write_memory_blocks): Remove unused variable.
4082         * target.c (target_stack::unpush): Remove unused variables.
4083         * tracepoint.c (start_tracing, all_tracepoint_actions)
4084         (merge_uploaded_trace_state_variables)
4085         (print_one_static_tracepoint_marker): Remove unused variable.
4086         * unittests/basic_string_view/element_access/char/1.cc (test01):
4087         Remove unused variable.
4088         * windows-nat.c (windows_continue, windows_add_all_dlls)
4089         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4090         Remove unused variables.
4091
4092 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4093
4094         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4095         attr_profile in HAVE_ELF.
4096         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4097         HAVE_ELF.
4098
4099 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4100
4101         * frame.c (frame_register_unwind): Change parameter name.
4102         (frame_unwind_register): Likewise.
4103         (frame_unwind_register_value): Likewise.
4104         (frame_unwind_register_signed): Likewise.
4105         (frame_unwind_register_unsigned): Likewise.
4106         * frame.h (frame_register_unwind): Likewise.
4107         (frame_unwind_register): Likewise.
4108         (frame_unwind_register_value): Likewise.
4109         (frame_unwind_register_signed): Likewise.
4110         (frame_unwind_register_unsigned): Likewise.
4111         (frame_unwind_arch): Likewise.
4112
4113 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4114
4115         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4116         ISA maintenance.
4117
4118 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4119
4120         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4121         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4122         hand.
4123
4124 2018-07-20  Keith Seitz  <keiths@redhat.com>
4125
4126         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4127         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4128         m_compunit_symtab, m_language>: Add "m_" prefix.
4129         Update all uses.
4130         * buildsym.c: Update all uses.
4131
4132 2018-07-20  Tom Tromey  <tom@tromey.com>
4133
4134         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4135         * buildsym.h (record_line_ftype): Remove typedef.
4136
4137 2018-07-20  Tom Tromey  <tom@tromey.com>
4138
4139         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4140         (end_expandable_symtab): Likewise.
4141         (end_symtab_get_static_block): Likewise.
4142         (end_symtab_from_static_block): Likewise.
4143         * buildsym-legacy.c (augment_type_symtab): Remove.
4144         (end_expandable_symtab): Remove.
4145         (end_symtab_get_static_block): Remove.
4146         (end_symtab_from_static_block): Remove.
4147
4148 2018-07-20  Tom Tromey  <tom@tromey.com>
4149
4150         * dwarf2read.c: Include buildsym.h.
4151         (struct dwarf2_cu) <builder>: New method.
4152         (fixup_go_packaging): Update.
4153         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4154         use scoped_free_pendings.
4155         (using_directives): Add "cu" parameter, remove "language".
4156         (read_import_statement, setup_type_unit_groups, )
4157         (read_func_scope, read_lexical_block_scope)
4158         (dwarf2_record_block_ranges, read_namespace): Update.
4159         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4160         (lnp_state_machine::handle_end_sequence): Update.
4161         (class lnp_state_machine) <m_cu>: New member.
4162         <m_record_line_callback>: Remove.
4163         <m_currently_recording_lines>: New member.
4164         (lnp_state_machine::handle_set_file): Update.
4165         (noop_record_line): Remove.
4166         (dwarf_record_line_p): Add cu parameter.
4167         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4168         (lnp_state_machine::record_line)
4169         (lnp_state_machine::lnp_state_machine)
4170         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4171         (dwarf_decode_lines): Update.
4172         (dwarf2_start_subfile): Add cu parameter.
4173         (dwarf2_start_symtab, new_symbol): Update.
4174         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4175         Remove dwarf2_per_objfile parameter.
4176         (dwarf_decode_macros): Update.
4177
4178 2018-07-20  Tom Tromey  <tom@tromey.com>
4179
4180         * stabsread.c (define_symbol): Update.
4181         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4182         * dwarf2read.c (new_symbol): Update.
4183         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4184         * cp-namespace.c: Include buildsym.h.
4185         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4186         * buildsym-legacy.c (get_buildsym_compunit): New function.
4187
4188 2018-07-20  Tom Tromey  <tom@tromey.com>
4189
4190         * xcoffread.c: Include buildsym-legacy.h.
4191         * windows-nat.c: Include buildsym-legacy.h.
4192         * stabsread.c: Include buildsym-legacy.h.
4193         * mdebugread.c: Include buildsym-legacy.h.
4194         * buildsym-legacy.h: New file.
4195         * buildsym-legacy.c: New file, from buildsym.c.
4196         * go32-nat.c: Include buildsym-legacy.h.
4197         * dwarf2read.c: Include buildsym-legacy.h.
4198         * dbxread.c: Include buildsym-legacy.h.
4199         * cp-namespace.c: Include buildsym-legacy.h.
4200         * coffread.c: Include buildsym-legacy.h.
4201         * buildsym.h: Move some contents to buildsym-legacy.h.
4202         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4203         buildsym-legacy.c.
4204         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4205
4206 2018-07-20  Tom Tromey  <tom@tromey.com>
4207
4208         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4209         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4210         (buildsym_compunit::buildsym_compunit)
4211         (buildsym_compunit::~buildsym_compunit)
4212         (buildsym_compunit::get_macro_table): Define.
4213
4214 2018-07-20  Tom Tromey  <tom@tromey.com>
4215
4216         * buildsym.c (reset_symtab_globals): Remove.
4217         (buildsym_compunit::end_symtab_from_static_block): Update.
4218         (buildsym_compunit::augment_type_symtab): Update.
4219         (end_symtab_from_static_block): Call free_buildsym_compunit.
4220         (augment_type_symtab, end_symtab, end_expandable_symtab):
4221         Likewise.
4222
4223 2018-07-20  Tom Tromey  <tom@tromey.com>
4224
4225         * arch-utils.c: Do not include buildsym.h.
4226         * mipsread.c: Do not include buildsym.h.
4227         * machoread.c: Do not include buildsym.h.
4228         * elfread.c: Do not include buildsym.h.
4229
4230 2018-07-20  Tom Tromey  <tom@tromey.com>
4231
4232         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4233         initialization.
4234         (buildsym_compunit): Add new constructor.
4235         (struct buildsym_compunit) <get_last_source_file, finish_block,
4236         record_block_range, start_subfile, patch_subfile_names,
4237         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4238         set_last_source_start_addr, get_last_source_start_addr,
4239         get_local_using_directives, set_local_using_directives,
4240         get_global_using_directives, outermost_context_p,
4241         get_current_context_stack, get_context_stack_depth,
4242         get_current_subfile, get_local_symbols, get_file_symbols,
4243         get_global_symbols, record_debugformat, record_producer,
4244         push_context, pop_context, end_symtab_get_static_block,
4245         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4246         New public methods.
4247         <record_pending_block, finish_block_internal, make_blockvector,
4248         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4249         private methods.
4250         Update all users.
4251
4252 2018-05-22  Tom Tromey  <tom@tromey.com>
4253
4254         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4255         parameter.
4256         (finish_block_internal): Update.
4257
4258 2018-07-20  Tom Tromey  <tom@tromey.com>
4259
4260         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4261         parameter.
4262         (finish_block_internal): Update.
4263
4264 2018-07-20  Tom Tromey  <tom@tromey.com>
4265
4266         * buildsym.h (EXTERN): Don't define or undef.
4267         * buildsym.c (EXTERN): Don't define.
4268
4269 2018-07-20  Tom Tromey  <tom@tromey.com>
4270
4271         * buildsym.c: Remove TODO comment.
4272
4273 2018-07-20  Tom Tromey  <tom@tromey.com>
4274
4275         * coffread.c (coff_symtab_read): Update.
4276         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4277         (xcoff_new_init): Update.
4278         * mipsread.c (mipscoff_new_init): Update.
4279         * mdebugread.c (mdebug_build_psymtabs): Update.
4280         * elfread.c (elf_new_init): Update.
4281         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4282         Update.
4283         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4284         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4285         (stabsect_build_psymtabs): Update.
4286         * buildsym.h (buildsym_init): Don't declare.
4287         * buildsym.c: Update comment.
4288         (prepare_for_building): Remove.
4289         (start_symtab, restart_symtab): Update.
4290         (reset_symtab_globals): Update comment.
4291         (buildsym_init): Remove.
4292
4293 2018-07-20  Tom Tromey  <tom@tromey.com>
4294
4295         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4296         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4297         (read_enum_type, common_block_start, common_block_end)
4298         (cleanup_undefined_types_1, finish_global_stabs): Update.
4299         * mdebugread.c (psymtab_to_symtab_1): Update.
4300         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4301         (read_lexical_block_scope, new_symbol): Update.
4302         * dbxread.c (process_one_symbol): Update.
4303         * coffread.c (coff_symtab_read, process_coff_symbol)
4304         (coff_read_enum_type): Update.
4305         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4306         declare.
4307         (get_local_symbols, get_file_symbols, get_global_symbols): New
4308         functions.
4309         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4310         m_global_symbols.
4311         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4312         (~scoped_free_pendings): Update.
4313         (finish_block, prepare_for_building, reset_symtab_globals)
4314         (end_symtab_get_static_block, end_symtab_with_blockvector)
4315         (augment_type_symtab, push_context): Update.
4316         (get_local_symbols, get_file_symbols, get_global_symbols): New
4317         functions.
4318         (buildsym_init): Update.
4319
4320 2018-07-20  Tom Tromey  <tom@tromey.com>
4321
4322         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4323         (process_full_type_unit): Likewise.
4324         (dwarf2_start_symtab): Set list_in_scope.
4325
4326 2018-07-20  Tom Tromey  <tom@tromey.com>
4327
4328         * dwarf2read.c (process_psymtab_comp_unit_reader)
4329         (build_type_psymtabs_reader): Do not set list_in_scope.
4330
4331 2018-07-20  Tom Tromey  <tom@tromey.com>
4332
4333         * buildsym.c (free_pendings): Remove.
4334         (add_symbol_to_list, scoped_free_pendings)
4335         (finish_block_internal, buildsym_init): Update.
4336
4337 2018-07-20  Tom Tromey  <tom@tromey.com>
4338
4339         * xcoffread.c (read_xcoff_symtab): Update.
4340         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4341         Update.
4342         * dbxread.c (process_one_symbol): Update.
4343         * coffread.c (coff_symtab_read): Update.
4344         * buildsym.h (finish_block): Update.
4345         * buildsym.c (finish_block): Remove "listhead" argument.
4346         (end_symtab_get_static_block): Update.
4347
4348 2018-07-20  Tom Tromey  <tom@tromey.com>
4349
4350         * buildsym.h (class scoped_free_pendings): Remove constructor.
4351         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4352         method.
4353         <m_pending_block_obstack, m_pending_blocks>: New members.
4354         (pending_block_obstack, pending_blocks): Remove.
4355         (scoped_free_pendings::scoped_free_pendings): Default.
4356         (~scoped_free_pendings): Update.
4357         (free_pending_blocks): Remove.
4358         (finish_block_internal, record_pending_block, make_blockvector)
4359         (end_symtab_get_static_block, augment_type_symtab, push_context)
4360         (buildsym_init): Update.
4361
4362 2018-07-20  Tom Tromey  <tom@tromey.com>
4363
4364         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4365         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4366         members.
4367         (pending_addrmap, pending_addrmap_obstack)
4368         (pending_addrmap_interesting): Remove.
4369         (scoped_free_pendings, record_block_range, make_blockvector)
4370         (prepare_for_building, reset_symtab_globals, buildsym_init):
4371         Update.
4372
4373 2018-07-20  Tom Tromey  <tom@tromey.com>
4374
4375         * xcoffread.c (process_linenos): Update.
4376         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4377         * mdebugread.c (psymtab_to_symtab_1): Update.
4378         * dwarf2read.c (setup_type_unit_groups)
4379         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4380         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4381         * dbxread.c (process_one_symbol): Update.
4382         * coffread.c (coff_symtab_read, enter_linenos)
4383         (process_coff_symbol): Update.
4384         * buildsym.h (current_subfile): Don't declare.
4385         (get_current_subfile): Declare.
4386         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4387         member.
4388         (start_subfile, free_buildsym_compunit, push_subfile)
4389         (prepare_for_building, start_symtab): Update.
4390         (get_current_subfile): New function.
4391
4392 2018-07-20  Tom Tromey  <tom@tromey.com>
4393
4394         * coffread.c (coff_symtab_read): Update.
4395         * xcoffread.c (read_xcoff_symtab): Update.
4396         * dwarf2read.c (new_symbol): Update.
4397         (read_func_scope, read_lexical_block_scope): Update.
4398         * dbxread.c (process_one_symbol): Update.
4399         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4400         (outermost_context_p): Remove macro.
4401         (outermost_context_p, get_current_context_stack)
4402         (get_context_stack_depth): Declare.
4403         (pop_context): Return struct context_stack.
4404         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4405         member.
4406         (context_stack_size): Remove.
4407         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4408         (prepare_for_building, end_symtab_get_static_block)
4409         (augment_type_symtab, push_context): Update.
4410         (pop_context): Return struct context_stack.
4411         (outermost_context_p, get_current_context_stack)
4412         (get_context_stack_depth): New functions.
4413         (buildsym_init): Update.
4414
4415 2018-07-20  Tom Tromey  <tom@tromey.com>
4416
4417         * rust-exp.y: Now a pure parser.  Update all rules.
4418         (%union): Move earlier.
4419         (current_parser, work_obstack): Remove globals.
4420         (rust_parser, ~rust_parser): Update.
4421         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4422         lex_character, lex_number, lex_string, lex_identifier,
4423         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4424         convert_name, convert_params_to_expression,
4425         convert_ast_to_expression, ast_basic_type, ast_operation,
4426         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4427         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4428         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4429         ast_array_type, ast_slice_type, ast_reference_type,
4430         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4431         (rust_parse): Update.
4432         (rustyyerror, rustyylex): Add parser parameter.
4433         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4434         (rust_lex_stringish_test, rust_lex_test_sequence)
4435         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4436         (rust_lex_test_push_back, rust_lex_tests): Update.
4437
4438 2018-07-19  Pedro Alves  <palves@redhat.com>
4439
4440         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4441         gdb::unique_xmalloc_ptr.
4442         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4443         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4444         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4445         copy-initialization.
4446         * guile/scm-pretty-print.c (ppscm_print_children): Use
4447         gdb::unique_xmalloc_ptr instead of cleanups.
4448         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4449         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4450         gdb::unique_xmalloc_ptr.
4451         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4452         Adjust to use gdb::unique_xmalloc_ptr.
4453         * guile/scm-utils.c (extract_arg): Adjust.
4454         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4455         gdb::unique_xmalloc_ptr instead of a cleanup.
4456
4457 2018-07-19  Tom Tromey  <tom@tromey.com>
4458
4459         * utils.c (do_value_free_to_mark)
4460         (make_cleanup_value_free_to_mark): Remove.
4461         * utils.h (make_cleanup_value_free_to_mark): Remove.
4462
4463 2018-07-19  Pedro Alves  <palves@redhat.com>
4464
4465         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4466         forwarding reference.
4467
4468 2018-07-18  Pedro Alves  <palves@redhat.com>
4469
4470         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4471         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4472         cleanup.
4473
4474 2018-07-18  Pedro Alves  <palves@redhat.com>
4475
4476         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4477         exceptions.
4478         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4479         (gdbscm_wrap): New.
4480         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4481         directly instead of a cleanup.
4482         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4483         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4484         (vlscm_binop_gdbthrow): New, factored out from ...
4485         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4486         (vlscm_rich_compare): Use gdbscm_wrap.
4487         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4488         instead of a cleanup.
4489         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4490         cleanup.
4491         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4492         Use xfree directly instead of a cleanup.
4493         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4494         Adjust to use gdbscm_wrap and scoped_value_mark.
4495         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4496         (gdbscm_value_address, gdbscm_value_dereference)
4497         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4498         scoped_value_mark.
4499         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4500         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4501         scoped_value_mark.
4502         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4503         gdbscm_wrap and scoped_value_mark.
4504         (gdbscm_value_to_string): Use xfree directly instead of a
4505         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4506         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4507         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4508         scoped_value_mark.
4509         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4510         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4511         scoped_value_mark.
4512         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4513         gdbscm_wrap.
4514
4515 2018-07-18  Tom de Vries  <tdevries@suse.de>
4516
4517         * findvar.c (default_read_var_value): Also resolve dynamic type for
4518         LOC_OPTIMIZED_OUT vars.
4519
4520 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4521
4522         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4523         decoding.
4524
4525 2018-07-17  Tom Tromey  <tom@tromey.com>
4526
4527         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4528         (compute_enum_list, pascm_set_param_value_x)
4529         (gdbscm_parameter_value): Update.
4530         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4531         (gdbscm_scm_to_host_string): Update.
4532         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4533         Update.
4534         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4535         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4536         * guile/scm-string.c (gdbscm_scm_to_string): Return
4537         unique_xmalloc_ptr.
4538         (gdbscm_scm_to_host_string): Likewise.
4539
4540 2018-07-17  Tom Tromey  <tom@tromey.com>
4541
4542         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4543         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4544         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4545         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4546         unique_xmalloc_ptr.
4547
4548 2018-07-17  Tom Tromey  <tom@tromey.com>
4549
4550         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4551         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4552         Update.
4553         * guile/scm-cmd.c (cmdscm_function): Update.
4554         * guile/scm-pretty-print.c
4555         (ppscm_print_exception_unless_memory_error): Update.
4556         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4557         Return unique_xmalloc_ptr.
4558
4559 2018-07-17  Tom Tromey  <tom@tromey.com>
4560
4561         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4562         Use string_printf.
4563
4564 2018-07-17  Jim Wilson  <jimw@sifive.com>
4565
4566         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4567         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4568         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4569         unecessary braces after EF_RISCV_RVC test.  Delete call to
4570         set_gdbarch_decr_pc_after_break.
4571
4572         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4573         RISCV_LAST_FP_REGNUM + 1.
4574         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4575
4576 2018-07-17  Tom Tromey  <tom@tromey.com>
4577
4578         * configure.ac: Remove --disable-gdbcli.
4579         * configure: Rebuild.
4580         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4581         (SUBDIR_CLI_CFLAGS): Remove.
4582         (SFILES): Use SUBDIR_CLI_SRCS.
4583         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4584
4585 2018-07-17  Tom Tromey  <tom@tromey.com>
4586
4587         PR gdb/18624:
4588         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4589
4590 2018-07-16  Jim Wilson  <jimw@sifive.com>
4591
4592         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4593
4594 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4595
4596         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4597         variable.
4598         (libunwind_frame_sniffer): Likewise.
4599         (libunwind_frame_prev_register): Likewise.
4600         (libunwind_sigtramp_frame_sniffer): Likewise.
4601         * ia64-tdep.c (ia64_access_reg): Likewise.
4602         (ia64_access_rse_reg): Likewise.
4603         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4604         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4605
4606 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4607
4608         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4609
4610 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4611
4612         * remote-sim.c (gdbsim_target::close,
4613         gdbsim_target::mourn_inferior): Remove unused variables.
4614
4615 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4616
4617         * ia64-tdep.c (ktab_buf): New global.
4618         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4619         (get_kernel_table): Adjust.
4620
4621 2018-07-16  Tom Tromey  <tom@tromey.com>
4622
4623         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4624         * dwarf2read.c (using_directives, new_symbol): Use
4625         outermost_context_p.
4626         * dbxread.c (process_one_symbol): Use outermost_context_p.
4627         * coffread.c (coff_symtab_read): Use outermost_context_p.
4628
4629 2018-07-16  Tom Tromey  <tom@tromey.com>
4630
4631         * dwarf2read.c (using_directives, read_func_scope)
4632         (read_lexical_block_scope): Update.
4633         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4634         * buildsym.h (local_using_directives, global_using_directives):
4635         Don't declare.
4636         (get_local_using_directives, set_local_using_directives)
4637         (get_global_using_directives): Declare.
4638         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4639         m_global_using_directives>: New members.
4640         (finish_block_internal, prepare_for_building)
4641         (reset_symtab_globals, end_symtab_get_static_block)
4642         (push_context): Update.
4643         (get_local_using_directives, set_local_using_directives)
4644         (get_global_using_directives): New functions.
4645         (buildsym_init): Update.
4646
4647 2018-07-16  Tom Tromey  <tom@tromey.com>
4648
4649         * xcoffread.c (xcoff_initial_scan): Don't call
4650         free_pending_blocks.
4651         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4652         * buildsym.h (class scoped_free_pendings): Add constructor.
4653         (free_pending_blocks): Don't declare.
4654         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4655         (free_pending_blocks): Now static.
4656
4657 2018-07-16  Tom Tromey  <tom@tromey.com>
4658
4659         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4660         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4661         member.
4662         (struct subfile_stack): Remove.
4663         (subfile_stack): Remove.
4664         (push_subfile, pop_subfile, buildsym_init): Update.
4665
4666 2018-07-16  Tom Tromey  <tom@tromey.com>
4667
4668         * buildsym.c (push_subfile): Use gdb_assert.
4669         (pop_subfile): Use gdb_assert.
4670
4671 2018-07-16  Tom Tromey  <tom@tromey.com>
4672
4673         * buildsym.h (merge_symbol_lists): Remove.
4674         * buildsym.c (merge_symbol_lists): Remove.
4675
4676 2018-07-16  Tom Tromey  <tom@tromey.com>
4677
4678         * stabsread.c (scan_file_globals): Update comment.
4679         * stabsread.h (scan_file_globals): Move from buildsym.h.
4680         * buildsym.h (scan_file_globals): Move to stabsread.h.
4681
4682 2018-07-16  Tom Tromey  <tom@tromey.com>
4683
4684         * xcoffread.c (xcoff_new_init): Update.
4685         * mipsread.c (mipscoff_new_init): Update.
4686         * mdebugread.c (mdebug_build_psymtabs): Update.
4687         * elfread.c (elf_new_init): Update.
4688         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4689         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4690         * buildsym.h (buildsym_new_init): Don't declare.
4691         * buildsym.c (buildsym_new_init): Remove.
4692
4693 2018-07-16  Tom Tromey  <tom@tromey.com>
4694
4695         * stabsread.h (within_function): Move from buildsym.h.
4696         * stabsread.c (start_stabs): Clear within_function.
4697         * coffread.c (coff_start_symtab): Clear within_function.
4698         * buildsym.h (within_function): Move to stabsread.h.
4699         * buildsym.c (prepare_for_building): Update.
4700
4701 2018-07-16  Tom Tromey  <tom@tromey.com>
4702
4703         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4704         * dwarf2read.c (dwarf2_start_symtab): Don't set
4705         processing_gcc_compilation.
4706         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4707
4708 2018-07-16  Tom Tromey  <tom@tromey.com>
4709
4710         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4711         (next_symbol_text_func): Move from buildsym.h.
4712         * stabsread.c (hashname): Move from buildsym.c.
4713         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4714         (next_symbol_text_func, hashname): Move to stabsread.h.
4715         * buildsym.c: Don't include bcache.h
4716         (hashname): Move to stasbread.c.
4717
4718 2018-07-16  Tom Tromey  <tom@tromey.com>
4719
4720         * buildsym.h (context_stack_size): Don't declare.
4721         * buildsym.c (context_stack_size): New global.
4722
4723 2018-07-16  Tom Tromey  <tom@tromey.com>
4724
4725         * dbxread.c (processing_acc_compilation): New global.
4726         * buildsym.h (processing_acc_compilation): Don't declare.
4727
4728 2018-07-16  Tom Tromey  <tom@tromey.com>
4729
4730         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4731         * dbxread.c (read_ofile_symtab): Update.
4732         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4733         * buildsym.h (last_source_start_addr): Remove.
4734         (set_last_source_start_addr, get_last_source_start_addr):
4735         Declare.
4736         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4737         parameter.
4738         (struct buildsym_compunit) <m_last_source_start_addr>: New
4739         member.
4740         (prepare_for_building): Remove start_addr parameter.
4741         (start_symtab, restart_symtab, end_symtab_get_static_block)
4742         (end_symtab_with_blockvector): Update.
4743         (set_last_source_start_addr, get_last_source_start_addr): New
4744         functions.
4745
4746 2018-07-16  Tom Tromey  <tom@tromey.com>
4747
4748         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4749         member.
4750         (have_line_numbers): Remove.
4751         (record_line, prepare_for_building, end_symtab_get_static_block)
4752         (augment_type_symtab): Update.
4753
4754 2018-07-16  Tom Tromey  <tom@tromey.com>
4755
4756         * buildsym.c (~buildsym_compunit): Free the macro table.
4757         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4758         methods.
4759         <m_pending_macros>: New member.
4760         (pending_macros): Remove.
4761         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4762         (reset_symtab_globals, end_symtab_get_static_block)
4763         (end_symtab_with_blockvector, augment_type_symtab)
4764         (buildsym_init): Update.
4765
4766 2018-07-16  Tom Tromey  <tom@tromey.com>
4767
4768         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4769         parameter.
4770         (buildsym_compunit::set_last_source_file): New method.
4771         <m_last_source_file>: New member.
4772         (prepare_for_building): Remove "name" parameter.
4773         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4774         (last_source_file): Remove.
4775         (set_last_source_file, get_last_source_file): Update.
4776
4777 2018-07-16  Tom Tromey  <tom@tromey.com>
4778
4779         * buildsym.c (prepare_for_building): Add assert.
4780
4781 2018-07-16  Tom Tromey  <tom@tromey.com>
4782
4783         * buildsym.c (~buildsym_compunit): Update.
4784         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4785         (start_subfile, patch_subfile_names)
4786         (end_symtab_with_blockvector): Update.
4787
4788 2018-07-16  Tom Tromey  <tom@tromey.com>
4789
4790         * buildsym.c (struct buildsym_compunit): Add constructor,
4791         destructor, initializers.
4792         (start_buildsym_compunit): Remove.
4793         (free_buildsym_compunit): Use "delete".
4794         (start_symtab, restart_symtab): Use "new".
4795
4796 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4797
4798         * symfile.c (set_objfile_default_section_offset): Remove struct
4799         keyword.
4800
4801 2018-07-14  Stafford Horne  <shorne@gmail.com>
4802
4803         * (Responsible Maintainers): Add myself as or1k maintainer.
4804
4805 2018-07-13  Tom Tromey  <tom@tromey.com>
4806
4807         * symfile.c (set_objfile_default_section_offset): Use extra braces
4808         around initializer.
4809
4810 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4811
4812         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4813         non-branching basr.
4814
4815 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4816
4817         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4818         unittests/cli-utils-selftests.c
4819         * unittests/cli-utils-selftests.c: New file.
4820
4821 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4822
4823         * NEWS: Mention new commands. Mention change to 'thread apply'.
4824
4825 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4826
4827         * thread.c (thr_try_catch_cmd): New function.
4828         (thread_apply_all_command): Handle qcs flags.
4829         (thread_apply_command): Handle qcs flags.
4830         (taas_command): New function.
4831         (tfaas_command): New function.
4832         (_initialize_thread): Update to setup the new commands 'taas
4833         and 'tfaas'. Change doc string for 'thread apply'.
4834
4835 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4836
4837         * stack.c: (trailing_outermost_frame): New function, mostly
4838         extracted from backtrace_command_1.
4839         (leading_innermost_frame): New function.
4840         (backtrace_command_1): Update to call trailing_outermost_frame.
4841         (frame_apply_command_count): New function.
4842         (frame_apply_level_command): New function.
4843         (frame_apply_all_command): New function.
4844         (frame_apply_command): New function.
4845         (faas_command): New function.
4846         (frame_cmd_list): New variable.
4847         (_initialize_stack): Update to setup the new commands 'frame apply'
4848         and 'faas'.
4849
4850 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4851
4852         * cli-utils.c (number_or_range_parser::get_number): Only handle
4853         numbers or convenience var as numbers.
4854         (parse_flags): New function.
4855         (parse_flags_qcs): New function.
4856         (number_or_range_parser::finished): Ensure parsing end is detected
4857         before end of string.
4858         * cli-utils.h (parse_flags): New function.
4859         (parse_flags_qcs): New function.
4860         (number_or_range_parser): Remove m_finished bool.
4861         (number_or_range_parser::skip_range): Set m_in_range to false.
4862
4863 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4864
4865         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4866         on Windows.
4867
4868 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4869             Jan Kratochvil  <jan.kratochvil@redhat.com>
4870             Paul Fertser  <fercerpav@gmail.com>
4871             Tsutomu Seki  <sekiriki@gmail.com>
4872             Pedro Alves  <palves@redhat.com>
4873
4874         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4875         'unittests/parse-connection-spec-selftests.c'.
4876         (COMMON_SFILES): Add 'common/netstuff.c'.
4877         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4878         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4879         * common/netstuff.c: New file.
4880         * common/netstuff.h: New file.
4881         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4882         (wait_for_connect): Update comment.  New parameter
4883         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4884         Use 'sock' directly instead of 'scb->fd'.
4885         (try_connect): New function, with code from 'net_open'.
4886         (net_open): Rewrite main loop to deal with multiple
4887         sockets/addresses.  Handle IPv6-style hostnames; implement
4888         support for IPv6 connections.
4889         * unittests/parse-connection-spec-selftests.c: New file.
4890
4891 2018-07-11  Pedro Alves  <palves@redhat.com>
4892
4893         PR gdb/23377
4894         * remote.c (remote_target::remote_detach_pid): Call
4895         set_current_process.
4896
4897 2018-07-11  Pedro Alves  <palves@redhat.com>
4898
4899         * h8300-tdep.c (h8300_gdbarch_init): Remove
4900         set_gdbarch_ecoff_reg_to_regnum calls.
4901
4902 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4903
4904         PR c++/23373
4905         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4906         offsets/sizes for static members of a class/struct.
4907
4908 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4909
4910         * target-descriptions.c (tdesc_register_bitsize): Rename.
4911         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4912         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4913         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4914
4915 2018-07-10  Tom Tromey  <tom@tromey.com>
4916
4917         * breakpoint.c (moribund_locations): Now static and a
4918         std::vector.
4919         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4920         (build_bpstat_chain, update_global_location_list)
4921         (breakpoint_retire_moribund): Update.
4922         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4923         VEC.
4924
4925 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4926
4927         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4928         (riscv_register_reggroup_p): Use new function, remove unneeded
4929         parenthesis.
4930         (riscv_push_dummy_call): Extend assert to compare against xlen or
4931         flen based on register type.
4932
4933 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4934
4935         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4936
4937 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4938
4939         * remote.c (show_hardware_watchpoint_limit): New function.
4940         (show_hardware_watchpoint_length_limit): New function.
4941         (show_hardware_breakpoint_limit): New function.
4942         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4943         where appropriate, update help text.
4944
4945 2018-07-09  Tom Tromey  <tom@tromey.com>
4946
4947         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4948         (CLIBS): Don't mention NAT_CLIBS.
4949
4950 2018-07-09  Tom Tromey  <tom@tromey.com>
4951
4952         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4953         (LIBGDB_OBS, clean mostlyclean): Update.
4954         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4955
4956 2018-07-09  Tom Tromey  <tom@tromey.com>
4957
4958         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4959         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4960         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4961
4962 2018-07-09  Tom Tromey  <tom@tromey.com>
4963
4964         * Makefile.in (ALLDEPFILES): Remove exec.c.
4965         (COMMON_OBS): Remove exec.o.
4966         (COMMON_SFILES): Add exec.c.
4967
4968 2018-07-09  Tom Tromey  <tom@tromey.com>
4969
4970         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4971
4972 2018-07-09  Tom Tromey  <tom@tromey.com>
4973
4974         * Makefile.in (clean mostlyclean): Remove stamp-version.
4975         (version.c): Depend on stamp-version.
4976         (stamp-version): New rule, from version.c rule.
4977
4978 2018-07-09  Tom Tromey  <tom@tromey.com>
4979
4980         * Makefile.in (init.c): Depend on stamp-init.
4981         (stamp-init): New rule, from init.c rule.
4982         (clean mostlyclean): Remove stamp-init.
4983
4984 2018-07-09  Tom Tromey  <tom@tromey.com>
4985
4986         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4987         SUBDIR_GCC_COMPILE_SRCS.
4988
4989 2018-07-09  Tom Tromey  <tom@tromey.com>
4990
4991         * Makefile.in (init.c): Remove some unused sed rules.
4992
4993 2018-07-09  Tom Tromey  <tom@tromey.com>
4994
4995         * Makefile.in (TSOBS): Remove.
4996         (INIT_FILES): Update.
4997         (LIBGDB_OBS): Update.
4998         (COMMON_SFILES): Add inflow.c.
4999         (SFILES): Remove inflow.c.
5000
5001 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5002
5003         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5004
5005 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5006
5007         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5008         get_saveloc_name, is_signal_frame_name, step_name,
5009         init_remote_name, create_addr_space_name,
5010         destroy_addr_space_name, search_unwind_table_name,
5011         find_dyn_list_name): Constify.
5012
5013 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5014
5015         * darwin-nat.c (darwin_pthread_kill): New function.
5016         (darwin_resume_thread): Use darwin_pthread_kill.
5017
5018 2018-07-05  Tom de Vries  <tdevries@suse.de>
5019
5020         * macroexp.c (macro_buffer) <operator=>: New member function.
5021
5022 2018-07-04  Tom Tromey  <tom@tromey.com>
5023
5024         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5025
5026 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5027
5028         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5029         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5030         * maint.c: Likewise.
5031         * top.c: Likewise.
5032
5033 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5034
5035         * NEWS: Create a new section for the next release branch.
5036         Rename the section of the current branch, now that it has
5037         been cut.
5038
5039 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5040
5041         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5042         * version.in: Bump version to 8.2.50.DATE-git.
5043
5044 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5045             Pedro Alves  <palves@redhat.com>
5046
5047         * linux-nat.c (linux_init_ptrace): Rename to ...
5048         (linux_init_ptrace_procfs): ... this.  Call
5049         linux_proc_init_warnings.
5050         (linux_nat_target::post_attach)
5051         (linux_nat_target::post_startup_inferior): Adjust.
5052         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5053         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5054
5055 2018-07-04  Tom de Vries  <tdevries@suse.de>
5056
5057         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5058         check ...
5059         (read_comp_unit_head): ... here.
5060
5061 2018-07-03  Tom Tromey  <tom@tromey.com>
5062
5063         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5064         (stop_tracing, tstatus_command)
5065         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5066         (print_one_static_tracepoint_marker): Update.
5067         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5068         std::vector.
5069         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5070         VEC.
5071         (all_tracepoints, static_tracepoints_here): Return std::vector.
5072
5073 2018-07-03  Tom Tromey  <tom@tromey.com>
5074
5075         * common/ptid.c (ptid_equal): Remove.
5076         * common/ptid.h (ptid_equal): Don't declare.
5077         * ada-tasks.c: Update.
5078         * breakpoint.c: Update.
5079         * common/agent.c: Update.
5080         * corelow.c: Update.
5081         * darwin-nat-info.c: Update.
5082         * darwin-nat.c: Update.
5083         * dcache.c: Update.
5084         * dtrace-probe.c: Update.
5085         * dummy-frame.c: Update.
5086         * fbsd-nat.c: Update.
5087         * frame.c: Update.
5088         * gdbthread.h: Update.
5089         * gnu-nat.c: Update.
5090         * go32-nat.c: Update.
5091         * inf-loop.c: Update.
5092         * inf-ptrace.c: Update.
5093         * infcall.c: Update.
5094         * infcmd.c: Update.
5095         * inflow.c: Update.
5096         * infrun.c: Update.
5097         * linux-fork.c: Update.
5098         * linux-nat.c: Update.
5099         * linux-thread-db.c: Update.
5100         * mi/mi-cmd-var.c: Update.
5101         * mi/mi-interp.c: Update.
5102         * mi/mi-main.c: Update.
5103         * nto-procfs.c: Update.
5104         * ppc-linux-tdep.c: Update.
5105         * procfs.c: Update.
5106         * python/py-inferior.c: Update.
5107         * python/py-record-btrace.c: Update.
5108         * python/py-record.c: Update.
5109         * ravenscar-thread.c: Update.
5110         * regcache.c: Update.
5111         * remote-sim.c: Update.
5112         * remote.c: Update.
5113         * sol-thread.c: Update.
5114         * solib.c: Update.
5115         * target.c: Update.
5116         * tui/tui-stack.c: Update.
5117         * varobj.c: Update.
5118         * windows-nat.c: Update.
5119         * windows-tdep.c: Update.
5120
5121 2018-07-03  Tom Tromey  <tom@tromey.com>
5122
5123         * common/ptid.c (ptid_match): Remove.
5124         * common/ptid.h (ptid_match): Don't declare.
5125         * fbsd-nat.c: Update.
5126         * infcmd.c: Update.
5127         * infrun.c: Update.
5128         * linux-nat.c: Update.
5129         * record-btrace.c: Update.
5130         * regcache.c: Update.
5131         * remote.c: Update.
5132
5133 2018-07-03  Tom Tromey  <tom@tromey.com>
5134
5135         * common/ptid.c (ptid_tid_p): Remove.
5136         * common/ptid.h (ptid_tid_p): Don't declare.
5137         * sol-thread.c: Update.
5138
5139 2018-07-03  Tom Tromey  <tom@tromey.com>
5140
5141         * common/ptid.c (ptid_lwp_p): Remove.
5142         * common/ptid.h (ptid_lwp_p): Don't declare.
5143         * fbsd-nat.c: Update.
5144         * linux-nat.c: Update.
5145         * nat/linux-procfs.c: Update.
5146         * nat/x86-linux-dregs.c: Update.
5147         * sol-thread.c: Update.
5148
5149 2018-07-03  Tom Tromey  <tom@tromey.com>
5150
5151         * common/ptid.c (ptid_is_pid): Remove.
5152         * common/ptid.h (ptid_is_pid): Don't declare.
5153         * infrun.c: Update.
5154         * linux-nat.c: Update.
5155         * mi/mi-interp.c: Update.
5156         * remote.c: Update.
5157         * thread.c: Update.
5158
5159 2018-07-03  Tom Tromey  <tom@tromey.com>
5160
5161         * common/ptid.c (ptid_get_tid): Remove.
5162         * common/ptid.h (ptid_get_tid): Don't declare.
5163         * ada-tasks.c: Update.
5164         * aix-thread.c: Update.
5165         * bsd-uthread.c: Update.
5166         * darwin-nat.c: Update.
5167         * fbsd-nat.c: Update.
5168         * i386-darwin-nat.c: Update.
5169         * infrun.c: Update.
5170         * linux-tdep.c: Update.
5171         * nto-procfs.c: Update.
5172         * ppc-ravenscar-thread.c: Update.
5173         * python/py-infthread.c: Update.
5174         * ravenscar-thread.c: Update.
5175         * sol-thread.c: Update.
5176         * sparc-ravenscar-thread.c: Update.
5177         * windows-nat.c: Update.
5178
5179 2018-07-03  Tom Tromey  <tom@tromey.com>
5180
5181         * common/ptid.c (ptid_get_lwp): Remove.
5182         * common/ptid.h (ptid_get_lwp): Don't declare.
5183         * aarch64-linux-nat.c: Update.
5184         * ada-tasks.c: Update.
5185         * aix-thread.c: Update.
5186         * amd64-linux-nat.c: Update.
5187         * arm-linux-nat.c: Update.
5188         * corelow.c: Update.
5189         * fbsd-nat.c: Update.
5190         * fbsd-tdep.c: Update.
5191         * gnu-nat.c: Update.
5192         * i386-cygwin-tdep.c: Update.
5193         * i386-gnu-nat.c: Update.
5194         * i386-linux-nat.c: Update.
5195         * ia64-linux-nat.c: Update.
5196         * inf-ptrace.c: Update.
5197         * infrun.c: Update.
5198         * linux-fork.c: Update.
5199         * linux-nat.c: Update.
5200         * linux-tdep.c: Update.
5201         * linux-thread-db.c: Update.
5202         * mips-linux-nat.c: Update.
5203         * nat/aarch64-linux-hw-point.c: Update.
5204         * nat/aarch64-linux.c: Update.
5205         * nat/linux-btrace.c: Update.
5206         * nat/linux-osdata.c: Update.
5207         * nat/linux-procfs.c: Update.
5208         * nat/x86-linux-dregs.c: Update.
5209         * obsd-nat.c: Update.
5210         * ppc-fbsd-nat.c: Update.
5211         * ppc-linux-nat.c: Update.
5212         * procfs.c: Update.
5213         * python/py-infthread.c: Update.
5214         * ravenscar-thread.c: Update.
5215         * remote.c: Update.
5216         * s390-linux-nat.c: Update.
5217         * sol-thread.c: Update.
5218         * sol2-tdep.c: Update.
5219         * spu-linux-nat.c: Update.
5220         * x86-linux-nat.c: Update.
5221         * xtensa-linux-nat.c: Update.
5222
5223 2018-07-03  Tom Tromey  <tom@tromey.com>
5224
5225         * common/ptid.c (ptid_get_pid): Remove.
5226         * common/ptid.h (ptid_get_pid): Don't declare.
5227         * aarch64-linux-nat.c: Update.
5228         * ada-lang.c: Update.
5229         * aix-thread.c: Update.
5230         * alpha-bsd-nat.c: Update.
5231         * amd64-fbsd-nat.c: Update.
5232         * amd64-linux-nat.c: Update.
5233         * arm-linux-nat.c: Update.
5234         * arm-nbsd-nat.c: Update.
5235         * auxv.c: Update.
5236         * break-catch-syscall.c: Update.
5237         * breakpoint.c: Update.
5238         * bsd-uthread.c: Update.
5239         * corelow.c: Update.
5240         * ctf.c: Update.
5241         * darwin-nat.c: Update.
5242         * fbsd-nat.c: Update.
5243         * fbsd-tdep.c: Update.
5244         * gcore.c: Update.
5245         * gnu-nat.c: Update.
5246         * hppa-nbsd-nat.c: Update.
5247         * hppa-obsd-nat.c: Update.
5248         * i386-fbsd-nat.c: Update.
5249         * ia64-linux-nat.c: Update.
5250         * inf-ptrace.c: Update.
5251         * infcmd.c: Update.
5252         * inferior.c: Update.
5253         * inferior.h: Update.
5254         * inflow.c: Update.
5255         * infrun.c: Update.
5256         * linux-fork.c: Update.
5257         * linux-nat.c: Update.
5258         * linux-tdep.c: Update.
5259         * linux-thread-db.c: Update.
5260         * m68k-bsd-nat.c: Update.
5261         * mi/mi-interp.c: Update.
5262         * mi/mi-main.c: Update.
5263         * mips-linux-nat.c: Update.
5264         * mips-nbsd-nat.c: Update.
5265         * mips64-obsd-nat.c: Update.
5266         * nat/aarch64-linux-hw-point.c: Update.
5267         * nat/aarch64-linux.c: Update.
5268         * nat/linux-btrace.c: Update.
5269         * nat/linux-osdata.c: Update.
5270         * nat/linux-procfs.c: Update.
5271         * nat/x86-linux-dregs.c: Update.
5272         * nto-procfs.c: Update.
5273         * obsd-nat.c: Update.
5274         * ppc-linux-nat.c: Update.
5275         * ppc-nbsd-nat.c: Update.
5276         * ppc-obsd-nat.c: Update.
5277         * proc-service.c: Update.
5278         * procfs.c: Update.
5279         * python/py-inferior.c: Update.
5280         * python/py-infthread.c: Update.
5281         * ravenscar-thread.c: Update.
5282         * record.c: Update.
5283         * remote-sim.c: Update.
5284         * remote.c: Update.
5285         * rs6000-nat.c: Update.
5286         * s390-linux-nat.c: Update.
5287         * sh-nbsd-nat.c: Update.
5288         * sol-thread.c: Update.
5289         * sparc-nat.c: Update.
5290         * sparc64-tdep.c: Update.
5291         * spu-linux-nat.c: Update.
5292         * spu-tdep.c: Update.
5293         * target-debug.h: Update.
5294         * target.c: Update.
5295         * thread.c: Update.
5296         * tid-parse.c: Update.
5297         * tracefile-tfile.c: Update.
5298         * vax-bsd-nat.c: Update.
5299         * windows-nat.c: Update.
5300         * x86-linux-nat.c: Update.
5301         * x86-nat.c: Update.
5302
5303 2018-07-03  Tom Tromey  <tom@tromey.com>
5304
5305         * common/ptid.c (pid_to_ptid): Remove.
5306         * common/ptid.h (pid_to_ptid): Don't declare.
5307         * aix-thread.c: Update.
5308         * arm-linux-nat.c: Update.
5309         * common/ptid.c: Update.
5310         * common/ptid.h: Update.
5311         * corelow.c: Update.
5312         * ctf.c: Update.
5313         * darwin-nat.c: Update.
5314         * fbsd-nat.c: Update.
5315         * fork-child.c: Update.
5316         * gnu-nat.c: Update.
5317         * go32-nat.c: Update.
5318         * inf-ptrace.c: Update.
5319         * infcmd.c: Update.
5320         * inferior.c: Update.
5321         * infrun.c: Update.
5322         * linux-fork.c: Update.
5323         * linux-nat.c: Update.
5324         * nat/aarch64-linux-hw-point.c: Update.
5325         * nat/fork-inferior.c: Update.
5326         * nat/x86-linux-dregs.c: Update.
5327         * nto-procfs.c: Update.
5328         * obsd-nat.c: Update.
5329         * procfs.c: Update.
5330         * progspace.c: Update.
5331         * remote.c: Update.
5332         * rs6000-nat.c: Update.
5333         * s390-linux-nat.c: Update.
5334         * sol-thread.c: Update.
5335         * spu-linux-nat.c: Update.
5336         * target.c: Update.
5337         * top.c: Update.
5338         * tracefile-tfile.c: Update.
5339         * windows-nat.c: Update.
5340
5341 2018-07-03  Tom Tromey  <tom@tromey.com>
5342
5343         * common/ptid.h (ptid_build): Don't declare.
5344         * common/ptid.c (ptid_build): Remove.
5345         * aix-thread.c: Update.
5346         * bsd-kvm.c: Update.
5347         * bsd-uthread.c: Update.
5348         * common/agent.c: Update.
5349         * common/ptid.c: Update.
5350         * common/ptid.h: Update.
5351         * corelow.c: Update.
5352         * darwin-nat.c: Update.
5353         * fbsd-nat.c: Update.
5354         * gnu-nat.c: Update.
5355         * linux-fork.c: Update.
5356         * linux-nat.c: Update.
5357         * linux-thread-db.c: Update.
5358         * nat/linux-osdata.c: Update.
5359         * nat/linux-procfs.c: Update.
5360         * nto-procfs.c: Update.
5361         * obsd-nat.c: Update.
5362         * proc-service.c: Update.
5363         * procfs.c: Update.
5364         * ravenscar-thread.c: Update.
5365         * remote-sim.c: Update.
5366         * remote.c: Update.
5367         * sol-thread.c: Update.
5368         * target.c: Update.
5369         * windows-nat.c: Update.
5370
5371 2018-07-03  Tom Tromey  <tom@tromey.com>
5372
5373         * infrun.c (follow_exec): Use exit_inferior_silent.
5374         * inferior.c (exit_inferior_num_silent): Remove.
5375         * inferior.h (exit_inferior_num_silent): Don't declare.
5376
5377 2018-07-03  Tom Tromey  <tom@tromey.com>
5378
5379         PR cli/23340:
5380         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5381         inferior_ptid on error.
5382
5383 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5384             Simon Marchi  <simon.marchi@polymtl.ca>
5385
5386         PR tdep/8282
5387         * disasm.h (gdb_disassembler): Add
5388         `m_disassembler_options_holder'. member
5389         * disasm.c (get_all_disassembler_options): New function.
5390         (gdb_disassembler::gdb_disassembler): Use it.
5391         (gdb_buffered_insn_length_init_dis): Likewise.
5392         (gdb_buffered_insn_length): Adjust accordingly.
5393         (set_disassembler_options): Handle options with arguments.
5394         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5395         line if showing options with descriptions.
5396         (disassembler_options_completer): Adapt to using the
5397         `disasm_options_and_args_t' structure.
5398         * mips-tdep.c (mips_disassembler_options): New variable.
5399         (mips_disassembler_options_o32): Likewise.
5400         (mips_disassembler_options_n32): Likewise.
5401         (mips_disassembler_options_n64): Likewise.
5402         (gdb_print_insn_mips): Don't set `disassembler_options'.
5403         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5404         functions.
5405         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5406         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5407         `gdbarch_disassembler_options_implicit' and
5408         `gdbarch_valid_disassembler_options'.
5409         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5410         `disasm_options_and_args_t' structure.
5411         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5412         method.
5413         (valid_disassembler_options): Switch from `disasm_options_t' to
5414         the `disasm_options_and_args_t' structure.
5415         * NEWS: Document `set disassembler-options' support for the MIPS
5416         target.
5417         * gdbarch.h: Regenerate.
5418         * gdbarch.c: Regenerate.
5419
5420 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5421
5422         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5423
5424 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5425
5426         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5427         parameter in call to amd64_target_description.
5428         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5429         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5430         (amd64fbsd_init_abi): Likewise.
5431         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5432         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5433         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5434         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5435
5436 2018-06-29  Pedro Alves  <palves@redhat.com>
5437
5438         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5439         "segments" parameter.
5440         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5441         (_initialize_amd64_tdep): Update call to
5442         amd64_create_target_description.
5443         (amd64_target_description): Add "segments" parameter.  Adjust
5444         the implementation to use it.
5445         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5446         call to amd64_create_target_description.
5447         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5448         * gdb/arch/amd64.h (amd64_create_target_description): Add
5449         "segments" register.
5450         * gdb/arch/amd64.c (amd64_create_target_description): Add
5451         "segments" parameter.  Call create_feature_i386_64bit_segments
5452         only if SEGMENTS is true.
5453         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5454         call to amd64_create_target_description.
5455
5456 2018-06-29  Pedro Alves  <palves@redhat.com>
5457
5458         * thread.c (thread_target_id_str): New, factored out from ...
5459         (print_thread_info_1): ... here.  Use it to compute the max
5460         "Target Id" column width.
5461
5462 2018-06-29  Pedro Alves  <palves@redhat.com>
5463
5464         * remote.c (remote_target::extra_thread_info): Delete
5465         'display_buf' and 'n' locals.  from the cache, regardless of
5466         packet mechanims is in use.  Use cache for qThreadExtra and qP
5467         methods too.
5468
5469 2018-06-29  Pedro Alves  <palves@redhat.com>
5470
5471         * blockframe.c (find_pc_sect_containing_function): New function.
5472         * breakpoint.c (print_breakpoint_location): Don't call
5473         find_pc_sect_function.
5474         * linespec.c (create_sals_line_offset): Record the location's
5475         symbol in the sal.
5476         * linespec.c (convert_address_location_to_sals): Fill in sal's
5477         symbol with find_pc_sect_containing_function.
5478         * symtab.c (find_function_start_sal): Rename to ...
5479         (find_function_start_sal_1): ... this.
5480         (find_function_start_sal): Reimplement as wrapper around
5481         find_function_start_sal_1, and use
5482         find_pc_sect_containing_function to fill in the sal's symbol.
5483         (find_function_start_sal(symbol*, bool)): Adjust.
5484         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5485         comments.
5486         (find_pc_sect_containing_function): Declare.
5487
5488 2018-06-29  Pedro Alves  <palves@redhat.com>
5489
5490         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5491         true if the the location has no symbol.
5492
5493 2018-06-28  Tom Tromey  <tom@tromey.com>
5494
5495         * NEWS: Mention --enable-codesign.
5496         * silent-rules.mk (ECHO_SIGN): New variable.
5497         * configure.ac: Add --enable-codesign.
5498         * configure: Rebuild.
5499         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5500         (gdb$(EXEEXT)): Optionally invoke codesign.
5501
5502 2018-06-28  Pedro Alves  <palves@redhat.com>
5503
5504         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5505         comments.
5506         (switch_to_thread_no_regs): Adjust comment.
5507         * infcmd.c (stop_pc): Delete.
5508         (post_create_inferior, info_program_command): Replace references
5509         to stop_pc with references to thread_info->suspend.stop_pc.
5510         * inferior.h (stop_pc): Delete declaration.
5511         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5512         (handle_inferior_event_1, handle_signal_stop)
5513         (process_event_stop_test, keep_going_stepped_thread)
5514         (handle_step_into_function, handle_step_into_function_backward)
5515         (print_stop_location): Replace references to stop_pc with
5516         references to thread_info->suspend.stop_pc.
5517         (struct infcall_suspend_state) <stop_pc>: Delete field.
5518         (save_infcall_suspend_state, restore_infcall_suspend_state):
5519         Remove references to inf_stat->stop_pc.
5520         * linux-fork.c (fork_load_infrun_state): Likewise.
5521         * record-btrace.c (record_btrace_set_replay): Likewise.
5522         * record-full.c (record_full_goto_entry): Likewise.
5523         * remote.c (print_one_stopped_thread): Likewise.
5524         * target.c (target_resume): Extend comment.
5525         * thread.c (set_executing_thread): New.
5526         (set_executing): Use it.
5527         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5528         Remove references to stop_pc.
5529
5530 2018-06-28  Pedro Alves  <palves@redhat.com>
5531
5532         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5533         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5534
5535 2018-06-28  Tom Tromey  <tom@tromey.com>
5536
5537         * coffread.c (coff_symfile_finish): Update.
5538         * xcoffread.c (xcoff_symfile_finish): Update.
5539         * elfread.c (elf_symfile_finish): Update.
5540         * symfile.h (dwarf2_free_objfile): Don't declare.
5541         * dwarf2read.c (_initialize_dwarf2_read): Use
5542         register_objfile_data_with_cleanup.
5543         (dwarf2_free_objfile): Now static.  Change signature.
5544
5545 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5546
5547         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5548         option "-o" to add-symbol-file-load to add an offset to each
5549         section's load address.
5550         * symfile.c (set_objfile_default_section_offset): New function.
5551
5552 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5553
5554         * symfile.c (add_symbol_file_command): Make sure that sections
5555         with the same name are sorted in the same order.
5556
5557 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5558
5559         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5560         require the second argument.  If omitted, load sections at the
5561         addresses specified in the file.
5562
5563 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5564
5565         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5566         (_initialize_symfile): Add option "-o" to symbol-file to add an
5567         offset to each section of the symbol file.
5568
5569 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5570
5571         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5572
5573 2018-06-27  Tom Tromey  <tom@tromey.com>
5574
5575         * stack.c (_initialize_stack): Update "func" help text.
5576
5577 2018-06-27  Tom Tromey  <tom@tromey.com>
5578
5579         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5580         std::vector.
5581         (unwind_infopy_str, pyuw_create_unwind_info)
5582         (unwind_infopy_add_saved_register, pyuw_sniffer)
5583         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5584         Update.
5585         (struct saved_reg): Add constructor.
5586         <value>: Now a gdbpy_ref<>.
5587
5588 2018-06-27  Tom Tromey  <tom@tromey.com>
5589
5590         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5591
5592 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5593
5594         * gdb-gdb.py.in: Format using autopep8.
5595
5596 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5597
5598         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5599         (type_lookup_function): Recognize CORE_ADDR values.
5600
5601 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5602
5603         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5604         print tag_name.
5605
5606 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5607
5608         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5609         <__lt__>: Add.
5610
5611 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5612
5613         * gdb-gdb.py: Move to...
5614         * gdb-gdb.py.in: ... here.
5615         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5616         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5617         dependencies.
5618         (distclean): Remove gdb-gdb.py when cleaning.
5619         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5620         * configure: Re-generate.
5621
5622 2018-06-27  Pedro Alves  <palves@redhat.com>
5623
5624         * proc-service.c (get_ps_regcache): New.
5625         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5626         (ps_lsetfpregs): Use it.
5627
5628 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5629
5630         PR gdb/21695
5631         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5632         (dwarf_decode_lines_1): Adjust.
5633
5634 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5635
5636         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5637         override.
5638         <info_proc>: Likewise.
5639
5640 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5641
5642         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5643         to windows_fetch_one_register, and only handle the case of
5644         fetching one register.  Move the code that reloads the context
5645         and iterates over all registers if R is negative to...
5646         (windows_nat_target::fetch_registers): ... here.
5647         (do_windows_store_inferior_registers): Rename to
5648         windows_store_one_register, and only handle the case of storing
5649         one register.  Move the code that handles the case where r is
5650         negative to...
5651         (windows_nat_target::store_registers) ... here.
5652
5653 2018-06-26  Tom Tromey  <tom@tromey.com>
5654
5655         PR rust/22574:
5656         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5657         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5658         Update.
5659         (rust_internal_print_type): Add podata parameter.
5660         (rust_print_type): Update.
5661
5662 2018-06-26  Tom Tromey  <tom@tromey.com>
5663
5664         * typeprint.h (struct print_offset_data) <update, finish,
5665         maybe_print_hole>: New methods.
5666         <indentation>: New constant.
5667         * typeprint.c (print_offset_data::indentation): Define.
5668         (print_offset_data::maybe_print_hole, print_offset_data::update)
5669         (print_offset_data::finish): Move from c-typeprint.c and rename.
5670         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5671         (print_spaces_filtered_with_print_options): Update.
5672         (c_print_type_union_field_offset, maybe_print_hole)
5673         (c_print_type_struct_field_offset): Move to typeprint.c and
5674         rename.
5675         (c_type_print_base_struct_union): Update.
5676
5677 2018-06-25  Pedro Alves  <palves@redhat.com>
5678
5679         * gdbthread.h (thread_info_ref, delete_thread)
5680         (delete_thread_silent, first_thread_of_inferior)
5681         (any_thread_of_inferior, switch_to_thread)
5682         (enable_thread_stack_temporaries)
5683         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5684         (get_last_thread_stack_temporary)
5685         (value_in_thread_stack_temporaries, can_access_registers_thread):
5686         Spell out "struct thread_info" instead of just "thread_info".
5687         * inferior.h (notice_new_inferior): Likewise.
5688
5689 2018-06-25  Pedro Alves  <palves@redhat.com>
5690
5691         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5692         pass thread_info pointer to delete_thread.
5693         (windows_nat_target::detach): Pass inferior pointer to
5694         detach_inferior.
5695         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5696         delete_thread.
5697         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5698         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5699         and pass a thread_info pointer to delete_thread.
5700         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5701         pass thread_info pointer to delete_thread.
5702         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5703         delete_thread_silent call.
5704         * procfs.c (procfs_target::detach): Pass inferior pointer to
5705         detach_inferior.
5706         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5707         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5708         delete_thread_silent call.
5709         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5710         pass thread_info pointer to delete_thread.
5711         (windows_nat_target::detach): Pass inferior pointer to
5712         delete_inferior.
5713
5714 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5715
5716         * regcache.c (readable_regcache::read_part): Fix asserts.
5717         (reg_buffer::raw_collect_part): New function.
5718         (regcache::write_part): Fix asserts.
5719         (reg_buffer::raw_supply_part): New function.
5720         (regcache::transfer_regset_register): New helper function.
5721         (regcache::transfer_regset): Call new functions.
5722         (regcache_supply_regset): Use gdb_byte*.
5723         (regcache::supply_regset): Likewise.
5724         (regcache_collect_regset): Likewise.
5725         (regcache::collect_regset): Likewise.
5726         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5727         (reg_buffer::raw_supply_part): Likewise.
5728         (regcache::transfer_regset_register): Likewise.
5729         (regcache::transfer_regset): Use gdb_byte*.
5730
5731 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5732
5733         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5734
5735 2018-06-21  Pedro Alves  <palves@redhat.com>
5736
5737         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5738         instead of a ptid_t.  All callers adjusted.
5739         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5740         adjusted.
5741         (print_ada_task_info, display_current_task_id, task_command_1):
5742         Adjust.
5743         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5744         inferior_thread.
5745         (breakpoint_kind): Adjust.
5746         (remove_breakpoints_pid): Rename to ...
5747         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5748         pointer.  All callers adjusted.
5749         (bpstat_clear_actions): Use inferior_thread.
5750         (get_bpstat_thread): New.
5751         (bpstat_do_actions): Use it.
5752         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5753         to take a thread_info pointer.  All callers adjusted.
5754         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5755         (breakpoint_re_set_thread): Use inferior_thread.
5756         * breakpoint.h (struct inferior): Forward declare.
5757         (bpstat_stop_status): Update.
5758         (remove_breakpoints_pid): Delete.
5759         (remove_breakpoints_inf): New.
5760         * bsd-uthread.c (bsd_uthread_target::wait)
5761         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5762         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5763         (maint_btrace_packet_history_cmd)
5764         (maint_btrace_clear_packet_history_cmd): Adjust.
5765         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5766         inferior_thread.
5767         * cli/cli-interp.c: Include "inferior.h".
5768         * common/refcounted-object.h (struct
5769         refcounted_object_ref_policy): New.
5770         * compile/compile-object-load.c: Include gdbthread.h.
5771         (store_regs): Use inferior_thread.
5772         * corelow.c (core_target::close): Use current_inferior.
5773         (core_target_open): Adjust to use first_thread_of_inferior and use
5774         the current inferior.
5775         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5776         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5777         <thread>: ... this new field.  All references adjusted.
5778         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5779         Take a thread_info pointer instead of a ptid_t.
5780         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5781         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5782         thread_info pointer instead of a ptid_t.
5783         * elfread.c: Include "inferior.h".
5784         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5785         Use inferior_thread.
5786         * eval.c (evaluate_subexp): Likewise.
5787         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5788         inferior_thread.
5789         * gdb_proc_service.h (struct thread_info): Forward declare.
5790         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5791         <thread>: ... this new field.  All references adjusted.
5792         * gdbarch.h, gdbarch.c: Regenerate.
5793         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5794         'thread' parameter.  All implementations and callers adjusted.
5795         * gdbthread.h (thread_info) <set_running>: New method.
5796         (delete_thread, delete_thread_silent): Take a thread_info pointer
5797         instead of a ptid.
5798         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5799         (first_thread_of_process): Delete, replaced by ...
5800         (first_thread_of_inferior): ... this new function.  All callers
5801         adjusted.
5802         (any_live_thread_of_process): Delete, replaced by ...
5803         (any_live_thread_of_inferior): ... this new function.  All callers
5804         adjusted.
5805         (switch_to_thread, switch_to_no_thread): Declare.
5806         (is_executing): Delete.
5807         (enable_thread_stack_temporaries): Update comment.
5808         <enable_thread_stack_temporaries>: Take a thread_info pointer
5809         instead of a ptid_t.  Incref the thread.
5810         <~enable_thread_stack_temporaries>: Decref the thread.
5811         <m_ptid>: Delete
5812         <m_thr>: New.
5813         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5814         (get_last_thread_stack_temporary)
5815         (value_in_thread_stack_temporaries, can_access_registers_thread):
5816         Take a thread_info pointer instead of a ptid_t.  All callers
5817         adjusted.
5818         * infcall.c (get_call_return_value): Use inferior_thread.
5819         (run_inferior_call): Work with thread pointers instead of ptid_t.
5820         (call_function_by_hand_dummy): Work with thread pointers instead
5821         of ptid_t.  Use thread_info_ref.
5822         * infcmd.c (proceed_thread_callback): Access thread's state
5823         directly.
5824         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5825         access thread's state directly.
5826         (continue_command): Use inferior_thread.
5827         (info_program_command): Use find_thread_ptid and access thread
5828         state directly.
5829         (proceed_after_attach_callback): Use thread state directly.
5830         (notice_new_inferior): Take a thread_info pointer instead of a
5831         ptid_t.  All callers adjusted.
5832         (exit_inferior): Take an inferior pointer instead of a pid.  All
5833         callers adjusted.
5834         (exit_inferior_silent): New.
5835         (detach_inferior): Delete.
5836         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5837         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5838         (detach_inferior_command, kill_inferior_command): Use
5839         find_inferior_id instead of valid_gdb_inferior_id and
5840         gdb_inferior_id_to_pid.
5841         (inferior_command): Use inferior and thread pointers.
5842         * inferior.h (struct thread_info): Forward declare.
5843         (notice_new_inferior): Take a thread_info pointer instead of a
5844         ptid_t.  All callers adjusted.
5845         (detach_inferior): Delete declaration.
5846         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5847         instead of a pid.  All callers adjusted.
5848         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5849         (valid_gdb_inferior_id): Delete.
5850         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5851         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5852         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5853         ...
5854         <inf>: ... this new field.
5855         <step_ptid>: Delete, replaced by ...
5856         <step_thread>: ... this new field.
5857         (get_displaced_stepping_state): Take an inferior pointer instead
5858         of a pid.  All callers adjusted.
5859         (displaced_step_in_progress_any_inferior): Adjust.
5860         (displaced_step_in_progress_thread): Take a thread pointer instead
5861         of a ptid_t.  All callers adjusted.
5862         (displaced_step_in_progress, add_displaced_stepping_state): Take
5863         an inferior pointer instead of a pid.  All callers adjusted.
5864         (get_displaced_step_closure_by_addr): Adjust.
5865         (remove_displaced_stepping_state): Take an inferior pointer
5866         instead of a pid.  All callers adjusted.
5867         (displaced_step_prepare_throw, displaced_step_prepare)
5868         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5869         All callers adjusted.
5870         (start_step_over): Adjust.
5871         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5872         displaced step queue.
5873         (do_target_resume): Adjust.
5874         (fetch_inferior_event): Use inferior_thread.
5875         (context_switch, get_inferior_stop_soon): Take an
5876         execution_control_state pointer instead of a ptid_t.  All callers
5877         adjusted.
5878         (switch_to_thread_cleanup): Delete.
5879         (stop_all_threads): Use scoped_restore_current_thread.
5880         * inline-frame.c: Include "gdbthread.h".
5881         (inline_state) <inline_state>: Take a thread pointer instead of a
5882         ptid_t.  All callers adjusted.
5883         <ptid>: Delete, replaced by ...
5884         <thread>: ... this new field.
5885         (find_inline_frame_state): Take a thread pointer instead of a
5886         ptid_t.  All callers adjusted.
5887         (skip_inline_frames, step_into_inline_frame)
5888         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5889         pointer instead of a ptid_t.  All callers adjusted.
5890         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5891         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5892         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5893         pointers directly.
5894         * linux-nat.c (get_detach_signal): Likewise.
5895         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5896         (thread_db_notice_clone): Adjust.
5897         (thread_db_find_new_threads_silently)
5898         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5899         a thread pointer instead of a ptid_t.  All callers adjusted.
5900         * mi/mi-cmd-var.c: Include "inferior.h".
5901         (mi_cmd_var_update_iter): Update to use thread pointers.
5902         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5903         inferior directly.
5904         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5905         out to ...
5906         (mi_output_running): ... this new function.
5907         (mi_on_resume_1): Adjust to use it.
5908         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5909         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5910         directly.
5911         (interrupt_thread_callback): : Adjust to use thread and inferior
5912         pointers.
5913         * proc-service.c: Include "gdbthread.h".
5914         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5915         * progspace-and-thread.c: Include "inferior.h".
5916         * progspace.c: Include "inferior.h".
5917         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5918         hold a reference to an inferior_object.
5919         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5920         inferior_thread.
5921         * python/py-inferior.c (struct inferior_object): Give the type a
5922         tag name instead of a typedef.
5923         (python_on_normal_stop): No need to check if the current thread is
5924         listed.
5925         (inferior_to_inferior_object): Change return type to
5926         inferior_object.  All callers adjusted.
5927         (find_thread_object): Delete, bits factored out to ...
5928         (thread_to_thread_object): ... this new function.
5929         * python/py-infthread.c (create_thread_object): Use
5930         inferior_to_inferior_object.
5931         (thpy_is_stopped): Use thread pointer directly.
5932         (gdbpy_selected_thread): Use inferior_thread.
5933         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5934         field, replaced with ...
5935         <thread>: ... this new field.  All users adjusted.
5936         (btpy_insn_or_gap_new): Drop const.
5937         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5938         callers adjusted.
5939         * python/py-record.c: Include "gdbthread.h".
5940         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5941         a ptid_t.  All callers adjusted.
5942         (gdbpy_current_recording): Use inferior_thread.
5943         * python/py-record.h (recpy_record_object) <ptid>: Delete
5944         field, replaced with ...
5945         <thread>: ... this new field.  All users adjusted.
5946         (recpy_element_object) <ptid>: Delete
5947         field, replaced with ...
5948         <thread>: ... this new field.  All users adjusted.
5949         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5950         a ptid_t.  All callers adjusted.
5951         * python/py-threadevent.c: Include "gdbthread.h".
5952         (get_event_thread): Use thread_to_thread_object.
5953         * python/python-internal.h (struct inferior_object): Forward
5954         declare.
5955         (find_thread_object, find_inferior_object): Delete declarations.
5956         (thread_to_thread_object, inferior_to_inferior_object): New
5957         declarations.
5958         * record-btrace.c: Include "inferior.h".
5959         (require_btrace_thread): Use inferior_thread.
5960         (record_btrace_frame_sniffer)
5961         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5962         (get_thread_current_frame): Use scoped_restore_current_thread and
5963         switch_to_thread.
5964         (get_thread_current_frame): Use thread pointer directly.
5965         (record_btrace_replay_at_breakpoint): Use thread's inferior
5966         pointer directly.
5967         * record-full.c: Include "inferior.h".
5968         * regcache.c: Include "gdbthread.h".
5969         (get_thread_arch_regcache): Use the inferior's address space
5970         directly.
5971         (get_thread_regcache, registers_changed_thread): New.
5972         * regcache.h (get_thread_regcache(thread_info *thread)): New
5973         overload.
5974         (registers_changed_thread): New.
5975         (remote_target) <remote_detach_1>: Swap order of parameters.
5976         (remote_add_thread): <remote_add_thread>: Return the new thread.
5977         (get_remote_thread_info(ptid_t)): New overload.
5978         (remote_target::remote_notice_new_inferior): Use thread pointers
5979         directly.
5980         (remote_target::process_initial_stop_replies): Use
5981         thread_info::set_running.
5982         (remote_target::remote_detach_1, remote_target::detach)
5983         (extended_remote_target::detach): Adjust.
5984         * stack.c (frame_show_address): Use inferior_thread.
5985         * target-debug.h (target_debug_print_thread_info_pp): New.
5986         * target-delegates.c: Regenerate.
5987         * target.c (default_thread_address_space): Delete.
5988         (memory_xfer_partial_1): Use current_inferior.
5989         (target_detach): Use current_inferior.
5990         (target_thread_address_space): Delete.
5991         (generic_mourn_inferior): Use current_inferior.
5992         * target.h (struct target_ops) <thread_address_space>: Delete.
5993         (target_thread_address_space): Delete.
5994         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5995         pointers directly.
5996         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5997         thread pointer instead of a ptid_t.  Adjust all callers.
5998         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5999         (first_thread_of_process): Delete, replaced by ...
6000         (first_thread_of_inferior): ... this new function.  All callers
6001         adjusted.
6002         (any_thread_of_process): Rename to ...
6003         (any_thread_of_inferior): ... this, and take an inferior pointer.
6004         (any_live_thread_of_process): Rename to ...
6005         (any_live_thread_of_inferior): ... this, and take an inferior
6006         pointer.
6007         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6008         (value_in_thread_stack_temporaries)
6009         (get_last_thread_stack_temporary): Take a thread pointer instead
6010         of a ptid_t.  Adjust all callers.
6011         (thread_info::set_running): New.
6012         (validate_registers_access): Use inferior_thread.
6013         (can_access_registers_ptid): Rename to ...
6014         (can_access_registers_thread): ... this, and take a thread
6015         pointer.
6016         (print_thread_info_1): Adjust to compare thread pointers instead
6017         of ptids.
6018         (switch_to_no_thread, switch_to_thread): Make extern.
6019         (scoped_restore_current_thread::~scoped_restore_current_thread):
6020         Use m_thread pointer directly.
6021         (scoped_restore_current_thread::scoped_restore_current_thread):
6022         Use inferior_thread.
6023         (thread_command): Use thread pointer directly.
6024         (thread_num_make_value_helper): Use inferior_thread.
6025         * top.c (execute_command): Use inferior_thread.
6026         * tui/tui-interp.c: Include "inferior.h".
6027         * varobj.c (varobj_create): Use inferior_thread.
6028         (value_of_root_1): Use find_thread_global_id instead of
6029         global_thread_id_to_ptid.
6030
6031 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6032
6033         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6034         possible.
6035         (regcache::write_part): Likewise.
6036         (readable_regcache::cooked_read_part): Update comment.
6037         (readable_regcache::cooked_write_part): Likewise.
6038         * regcache.h: (readable_regcache::read_part): Likewise.
6039         (regcache::write_part): Likewise.
6040
6041 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6042             Dirk Schubert  <dirk.schubert@arm.com>
6043
6044         * aarch64-linux-nat.c (post_attach): New.
6045         (aarch64_linux_nat_target::post_attach): Override post_attach to
6046         record the number of hardware debug registers.
6047
6048 2018-06-20  Tom Tromey  <tom@tromey.com>
6049
6050         * python/py-param.c (add_setshow_generic): Make parameters const.
6051         (parmpy_init): Update.
6052
6053 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6054
6055         * regcache.h (regcache_cooked_read_ftype): Rename to...
6056         (register_read_ftype): ...this, change type to function_view.
6057         (class reg_buffer) <save>: Remove src parameter.
6058         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6059         parameter non-const in first overload.  Remove src parameter in
6060         second overload.
6061         * regcache.c (do_cooked_read): Remove.
6062         (readonly_detached_regcache::readonly_detached_regcache): Make
6063         parameter non-const, adjust call to other constructor.
6064         (reg_buffer::save): Remove src parameter.
6065         * frame.c (do_frame_register_read): Remove.
6066         (frame_save_as_regcache): Use lambda function.
6067         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6068         parameter to ppu2spu_data *.
6069         (ppu2spu_sniffer): Use lambda function.
6070
6071 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6072
6073         * record-full.c (record_full_target::insert_breakpoint): Remove
6074         "struct" keyword, add const.
6075
6076 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6077
6078         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6079         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6080         * configure.ac: Remove AC_PREREQ, add missing quoting.
6081         * gnulib/configure.ac: Modernize usage of
6082         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6083         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6084         (AUTOMAKE_VERSION): Bump to 1.15.1.
6085         * configure: Re-generate.
6086         * config.in: Re-generate.
6087         * aclocal.m4: Re-generate.
6088         * gnulib/aclocal.m4: Re-generate.
6089         * gnulib/config.in: Re-generate.
6090         * gnulib/configure: Re-generate.
6091         * gnulib/import/Makefile.in: Re-generate.
6092
6093 2018-06-19  Pedro Alves  <palves@redhat.com>
6094
6095         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6096         (lookup_minimal_symbol_by_pc_section): ... here with
6097         gdb_assert_not_reached added.
6098
6099 2018-06-19  Pedro Alves  <palves@redhat.com>
6100
6101         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6102         parameter with a block parameter.  Compare location's block symbol
6103         with the frame's block instead of addresses.
6104         (skip_inline_frames): Pass the current block instead of the
6105         frame's address.  Break out as soon as we determine the frame
6106         should not be skipped.
6107
6108 2018-06-18  Tom Tromey  <tom@tromey.com>
6109
6110         * solib-aix.c (solib_aix_get_section_offsets): Return
6111         unique_xmalloc_ptr.
6112         (solib_aix_solib_create_inferior_hook): Update.
6113
6114 2018-06-18  Tom Tromey  <tom@tromey.com>
6115
6116         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6117
6118 2018-06-18  Tom Tromey  <tom@tromey.com>
6119
6120         * solib-frv.c (frv_relocate_main_executable): Use
6121         unique_xmalloc_ptr.
6122         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6123         unique_xmalloc_ptr.
6124
6125 2018-06-18  Tom Tromey  <tom@tromey.com>
6126
6127         * objfiles.h (inhibit_section_map_updates): Update.
6128         (resume_section_map_updates, resume_section_map_updates_cleanup):
6129         Remove.
6130         * solib-svr4.c (svr4_handle_solib_event): Update.
6131         * objfiles.c (inhibit_section_map_updates): Return
6132         scoped_restore_tmpl<int>.
6133         (resume_section_map_updates, resume_section_map_updates_cleanup):
6134         Remove.
6135
6136 2018-06-18  Tom Tromey  <tom@tromey.com>
6137
6138         * valprint.h (read_string): Update.
6139         * valprint.c (read_string): Change type of "buffer".
6140         (val_print_string): Update.
6141         * python/py-value.c (valpy_string): Update.
6142         * language.h (struct language_defn) <la_get_string>: Change
6143         type of "buffer".
6144         (default_get_string, c_get_string): Update.
6145         * language.c (default_get_string): Change type of "buffer".
6146         * guile/scm-value.c (gdbscm_value_to_string): Update.
6147         * c-lang.c (c_get_string): Change type of "buffer".
6148
6149 2018-06-18  Tom Tromey  <tom@tromey.com>
6150
6151         * ser-mingw.c (struct pipe_state_destroyer): New.
6152         (pipe_state_up): New typedef.
6153         (cleanup_pipe_state): Remove.
6154         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6155
6156 2018-06-18  Tom Tromey  <tom@tromey.com>
6157
6158         * rust-lang.h (rust_yyerror): Don't declare.
6159         * rust-lang.c (rust_language_defn): Update.
6160         * rust-exp.y (yyerror): Now static.
6161         * parse.c (parse_exp_in_context_1): Update.
6162         * p-lang.h (p_yyerror): Don't declare.
6163         * p-lang.c (p_language_defn): Update.
6164         * p-exp.y (yyerror): Now static.
6165         * opencl-lang.c (opencl_language_defn): Update.
6166         * objc-lang.c (objc_language_defn): Update.
6167         * m2-lang.h (m2_yyerror): Don't declare.
6168         * m2-lang.c (m2_language_defn): Update.
6169         * m2-exp.y (yyerror): Now static.
6170         * language.h (struct language_defn) <la_error>: Remove.
6171         * language.c (unk_lang_error): Remove.
6172         (unknown_language_defn, auto_language_defn): Remove.
6173         * go-lang.h (go_yyerror): Don't declare.
6174         * go-lang.c (go_language_defn): Update.
6175         * go-exp.y (yyerror): Now static.
6176         * f-lang.h (f_yyerror): Don't declare.
6177         * f-lang.c (f_language_defn): Update.
6178         * f-exp.y (yyerror): Now static.
6179         * d-lang.h (d_yyerror): Don't declare.
6180         * d-lang.c (d_language_defn): Update.
6181         * d-exp.y (yyerror): Now static.
6182         * c-lang.h (c_yyerror): Don't declare.
6183         * c-lang.c (c_language_defn, cplus_language_defn)
6184         (asm_language_defn, minimal_language_defn): Update.
6185         * c-exp.y (yyerror): Now static.
6186         * ada-lang.h (ada_yyerror): Don't declare.
6187         * ada-lang.c (ada_language_defn): Update.
6188         * ada-exp.y (yyerror): Now static.
6189
6190 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6191
6192         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6193         (store_sveregs_to_thread): Likewise.
6194         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6195         (aarch64_linux_store_inferior_registers): Likewise.
6196         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6197         function.
6198         (aarch64_sve_regs_copy_to_regcache): Likewise.
6199         (aarch64_sve_regs_copy_from_regcache): Likewise.
6200         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6201         declaration.
6202         (aarch64_sve_regs_copy_to_regcache): Likewise.
6203         (aarch64_sve_regs_copy_from_regcache): Likewise.
6204         (sve_context): Structure from Linux headers.
6205         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6206         (SVE_SIG_ZREG_SIZE): Likewise.
6207         (SVE_SIG_PREG_SIZE): Likewise.
6208         (SVE_SIG_FFR_SIZE): Likewise.
6209         (SVE_SIG_REGS_OFFSET): Likewise.
6210         (SVE_SIG_ZREGS_OFFSET): Likewise.
6211         (SVE_SIG_ZREG_OFFSET): Likewise.
6212         (SVE_SIG_ZREGS_SIZE): Likewise.
6213         (SVE_SIG_PREGS_OFFSET): Likewise.
6214         (SVE_SIG_PREG_OFFSET): Likewise.
6215         (SVE_SIG_PREGS_SIZE): Likewise.
6216         (SVE_SIG_FFR_OFFSET): Likewise.
6217         (SVE_SIG_REGS_SIZE): Likewise.
6218         (SVE_SIG_CONTEXT_SIZE): Likewise.
6219         (SVE_PT_REGS_MASK): Likewise.
6220         (SVE_PT_REGS_FPSIMD): Likewise.
6221         (SVE_PT_REGS_SVE): Likewise.
6222         (SVE_PT_VL_INHERIT): Likewise.
6223         (SVE_PT_VL_ONEXEC): Likewise.
6224         (SVE_PT_REGS_OFFSET): Likewise.
6225         (SVE_PT_FPSIMD_OFFSET): Likewise.
6226         (SVE_PT_FPSIMD_SIZE): Likewise.
6227         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6228         (SVE_PT_SVE_PREG_SIZE): Likewise.
6229         (SVE_PT_SVE_FFR_SIZE): Likewise.
6230         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6231         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6232         (__SVE_SIG_TO_PT): Likewise.
6233         (SVE_PT_SVE_OFFSET): Likewise.
6234         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6235         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6236         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6237         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6238         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6239         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6240         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6241         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6242         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6243         (SVE_PT_SVE_SIZE): Likewise.
6244         (SVE_PT_SIZE): Likewise.
6245         (HAS_SVE_STATE): New define.
6246
6247 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6248
6249         * nat/aarch64-sve-linux-sigcontext.h: New file.
6250         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6251         new files.
6252         (SVE_VQ_MIN): Likewise.
6253         (SVE_VQ_MAX): Likewise.
6254         (SVE_VL_MIN): Likewise.
6255         (SVE_VL_MAX): Likewise.
6256         (SVE_NUM_ZREGS): Likewise.
6257         (SVE_NUM_PREGS): Likewise.
6258         (sve_vl_valid): Likewise.
6259         (struct user_sve_header): Likewise.
6260
6261 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6262             Richard Bunt <Richard.Bunt@arm.com>
6263
6264         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6265         was requested by GDB.
6266
6267 2018-06-15  Tom de Vries  <tdevries@suse.de>
6268
6269         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6270
6271 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6272
6273         * gnulib/update-gnulib.sh: Print expected versions of
6274         autoconf/aclocal.
6275
6276 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6277
6278         * arch-utils.c (default_type_align): Use type_length_units.
6279         * gdbtypes.c (type_align): Use type_length_units.
6280
6281 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6282
6283         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6284         of 'define' command.
6285
6286 2018-06-14  Tom de Vries  <tdevries@suse.de>
6287
6288         PR cli/22573
6289         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6290         get_no_prettyformat_print_options.
6291
6292 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6293
6294         * sparc-nat.h: Include target.h.
6295         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6296         <fetch_registers>: Remove this argument in function call.
6297         <store_registers>: Remove this argument in function call, remove
6298         extra semicolon.
6299         <low_forget_process>: Call sparc64_forget_process instead of
6300         sparc_forget_process.
6301
6302 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6303
6304         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6305         (procfs_target::make_corefile_notes): Adjust to new
6306         target_read_alloc return type.
6307
6308 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6309             Stephen Roberts  <stephen.roberts@arm.com>
6310
6311         PR gdb/22882
6312         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6313         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6314         Move should_notify_stop local into more inner scope.
6315
6316 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6317             Stephen Roberts  <stephen.roberts@arm.com>
6318
6319         PR gdb/22882
6320         * infrun.c (resume_1): Add call to mark_async_event_handler.
6321
6322 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6323
6324         * infrun.c (do_target_wait): Change old version of $pc printed.
6325
6326 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6327
6328         * dwarf2read.c (read_index_from_section): Rename to...
6329         (read_gdb_index_from_section): ... this, update all callers.
6330         (dwarf2_read_index): Rename to...
6331         (dwarf2_read_gdb_index): ... this, update all callers.
6332
6333 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6334
6335         * gdb/hppa-linux-nat.c
6336         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6337         hppa_linux_nat_target::fetch_registers.
6338
6339 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6340
6341         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6342         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6343         (AARCH64_DWARF_SVE_FFR): Likewise.
6344         (AARCH64_DWARF_SVE_P0): Likewise.
6345         (AARCH64_DWARF_SVE_Z0): Likewise.
6346
6347 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6348
6349         * common/common-regcache.h (raw_compare): New function.
6350         * regcache.c (regcache::raw_compare): Likewise.
6351         * regcache.h (regcache::raw_compare): New declaration.
6352
6353 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6354
6355         * common/common-regcache.h (reg_buffer_common): New structure.
6356         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6357         (reg_buffer::raw_supply): Likewise.
6358         (reg_buffer::raw_supply_integer): Likewise.
6359         (reg_buffer::raw_supply_zeroed): Likewise.
6360         (reg_buffer::raw_collect): Likewise.
6361         (reg_buffer::raw_collect_integer): Likewise.
6362         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6363         (reg_buffer::raw_supply): Likewise.
6364         (reg_buffer::raw_supply_integer): Likewise.
6365         (reg_buffer::raw_supply_zeroed): Likewise.
6366         (reg_buffer::raw_collect): Likewise.
6367         (reg_buffer::raw_collect_integer): Likewise.
6368
6369 2018-06-10  Tom Tromey  <tom@tromey.com>
6370
6371         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6372         (class remote_state) <stop_reply_queue>: Now std::vector.
6373         (remote_state::~remote_state)
6374         (remote_target::stop_reply_queue_length): Update.
6375         (struct queue_iter_param, remove_child_of_pending_fork)
6376         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6377         (check_pending_event_prevents_wildcard_vcont_callback)
6378         (remove_stop_reply_for_inferior)
6379         (remove_stop_reply_of_remote_state)
6380         (remote_notif_remove_once_on_match)
6381         (stop_reply_match_ptid_and_ws)
6382         (remote_kill_child_of_pending_fork): Remove.
6383         (remote_target::remove_new_fork_children)
6384         (remote_target::check_pending_events_prevent_wildcard_vcont)
6385         (remote_target::discard_pending_stop_replies)
6386         (remote_target::discard_pending_stop_replies_in_queue)
6387         (remote_target::remote_notif_remove_queued_reply)
6388         (remote_target::queued_stop_reply)
6389         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6390         (remote_target::wait, remote_target::kill_new_fork_children)
6391         (remote_target::async): Update.
6392
6393 2018-06-10  Tom Tromey  <tom@tromey.com>
6394
6395         * record-full.c (record_full_arch_list_cleanups): Remove.
6396         (record_full_message): Use try/catch.
6397         (record_full_wait_cleanups): Remove.
6398         (record_full_wait_1): Use try/catch.
6399         (record_full_restore): Likewise.
6400
6401 2018-06-10  Tom Tromey  <tom@tromey.com>
6402
6403         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6404         declare VEC.  Add constructor.
6405         <in_target_beneath>: Now bool.
6406         (record_full_breakpoints): Now a std::vector, static.
6407         (record_full_sync_record_breakpoints)
6408         (record_full_init_record_breakpoints)
6409         (record_full_target::insert_breakpoint)
6410         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6411
6412 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6413
6414         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6415         * serial.c (serial_interface_lookup): Remove struct keyword.
6416
6417 2018-06-10  Tom Tromey  <tom@tromey.com>
6418
6419         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6420         method.
6421         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6422         a method.
6423         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6424         method.
6425         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6426         "beneath" as a method.
6427         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6428         Use "beneath" as a method.
6429
6430 2018-06-10  Tom Tromey  <tom@tromey.com>
6431
6432         * tracefile.c (struct trace_file_writer_deleter): New.
6433         <operator()>: Rename from trace_file_writer_xfree.
6434         (trace_file_writer_up): New typedef.
6435         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6436
6437 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6438
6439         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6440         <m_registers, m_register_status>: Change type to
6441         std::unique_ptr.
6442         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6443         XCNEWVEC.
6444
6445 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6446
6447         * common/common-regcache.h (enum register_status): Add
6448         underlying type "signed char".
6449         * regcache.h (reg_buffer) <m_register_status>: Change type to
6450         register_status *.
6451         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6452         register_status instead of signed char.
6453         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6454         (reg_buffer::get_register_status): Remove cast.
6455         (readable_regcache::raw_read): Remove cast.
6456         (readable_regcache::cooked_read): Remove cast.
6457
6458 2018-06-09  Tom Tromey  <tom@tromey.com>
6459
6460         * source.c (reverse_search_command, forward_search_command): Use
6461         scoped_fd.
6462
6463 2018-06-09  Tom Tromey  <tom@tromey.com>
6464
6465         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6466         (serial_ops_list): Now static, std::vector.
6467         (serial_interface_lookup, serial_add_interface): Update.
6468
6469 2018-06-09  Tom Tromey  <tom@tromey.com>
6470
6471         * dwarf2read.c (process_cu_includes): Update.
6472         (process_full_comp_unit): Update.
6473         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6474         std::vector.
6475
6476 2018-06-08  Paul Koning  <paul_koning@dell.com>
6477
6478         PR gdb/23252
6479
6480         * python/python.c (do_start_initialization):
6481         Avoid call to internal Python API.
6482         (init__gdb_module): New function.
6483
6484 2018-06-08  Gary Benson <gbenson@redhat.com>
6485
6486         * linux-thread-db.c (valprint.h): New include.
6487         (struct check_thread_db_info): New structure.
6488         (check_thread_db_on_load, tdb_testinfo): New static globals.
6489         (check_thread_db, check_thread_db_callback): New functions.
6490         (try_thread_db_load_1): Run integrity checks if requested.
6491         (maintenance_check_libthread_db): New function.
6492         (_initialize_thread_db): Register "maint check libthread-db"
6493         and "maint set/show check-libthread-db".
6494         * NEWS: Mention the above new commands.
6495
6496 2018-06-08  Tom Tromey  <tom@tromey.com>
6497
6498         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6499         now a method.
6500
6501 2018-06-08  Tom Tromey  <tom@tromey.com>
6502
6503         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6504
6505 2018-06-08  Tom Tromey  <tom@tromey.com>
6506
6507         * common/btrace-common.h (struct btrace_data): Add constructor,
6508         destructor, move assignment operator.
6509         <empty, clear, fini>: New methods.
6510         <format>: Initialize.
6511         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6512         (btrace_data_empty): Don't declare.
6513         * common/btrace-common.c (btrace_data_init): Remove.
6514         (btrace_data::fini): Rename from btrace_data_fini.
6515         (btrace_data::empty): Rename from btrace_data_empty.
6516         (btrace_data::clear): Rename from btrace_data_clear.  Return
6517         bool.
6518         * btrace.h (make_cleanup_btrace_data): Don't declare.
6519         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6520         (parse_xml_btrace): Update.
6521         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6522         (maint_btrace_clear_packet_history_cmd): Update.
6523
6524 2018-06-07  Pedro Alves  <palves@redhat.com>
6525
6526         * target.h (target_ops) <beneath>: Now a method.  All references
6527         updated.
6528         (class target_stack): New.
6529         * target.c (g_target_stack): New.
6530         (g_current_top_target): Delete.
6531         (current_top_target): Get the top target out of g_target_stack.
6532         (target_stack::push, target_stack::unpush): New.
6533         (push_target, unpush_target): Reimplement.
6534         (target_is_pushed): Reimplement in terms of g_target_stack.
6535         (target_ops::beneath, target_stack::find_beneath): New.
6536
6537 2018-06-07  Pedro Alves  <palves@redhat.com>
6538
6539         * target.h (find_target_beneath): Delete declaration.
6540         * target.c (find_target_beneath): Delete definition.
6541         * aix-thread.c: All callers of find_target_beneath adjusted to
6542         call target_ops::beneath instead.
6543         * bsd-uthread.c: Likewise.
6544         * linux-thread-db.c: Likewise.
6545         * ravenscar-thread.c: Likewise.
6546         * sol-thread.c: Likewise.
6547         * spu-multiarch.c: Likewise.
6548
6549 2018-06-07  Pedro Alves  <palves@redhat.com>
6550
6551         * target.h (target_ops) <beneath>: Now a method.  All references
6552         updated.
6553         (target_ops) <m_beneath>: New.
6554         * target.c (target_ops::beneath): New.
6555         * corelow.c: Adjust all references to target_ops::beneath.
6556         * linux-thread-db.c: Likewise.
6557         * make-target-delegates: Likewise.
6558         * record-btrace.c: Likewise.
6559         * record-full.c: Likewise.
6560         * remote.c: Likewise.
6561         * target.c: Likewise.
6562         * target-delegates.c: Regenerate.
6563
6564 2018-06-07  Pedro Alves  <palves@redhat.com>
6565
6566         * target.h (target_stack): Delete.
6567         (current_top_target): Declare function.
6568         * target.c (target_stack): Delete.
6569         (g_current_top_target): New.
6570         (current_top_target): New function.
6571         * auxv.c: Use current_top_target instead of target_stack
6572         throughout.
6573         * avr-tdep.c: Likewise.
6574         * breakpoint.c: Likewise.
6575         * corefile.c: Likewise.
6576         * elfread.c: Likewise.
6577         * eval.c: Likewise.
6578         * exceptions.c: Likewise.
6579         * frame.c: Likewise.
6580         * gdbarch-selftests.c: Likewise.
6581         * gnu-v3-abi.c: Likewise.
6582         * ia64-tdep.c: Likewise.
6583         * ia64-vms-tdep.c: Likewise.
6584         * infcall.c: Likewise.
6585         * infcmd.c: Likewise.
6586         * infrun.c: Likewise.
6587         * linespec.c: Likewise.
6588         * linux-tdep.c: Likewise.
6589         * minsyms.c: Likewise.
6590         * ppc-linux-nat.c: Likewise.
6591         * ppc-linux-tdep.c: Likewise.
6592         * procfs.c: Likewise.
6593         * regcache.c: Likewise.
6594         * remote.c: Likewise.
6595         * rs6000-tdep.c: Likewise.
6596         * s390-linux-nat.c: Likewise.
6597         * s390-tdep.c: Likewise.
6598         * solib-aix.c: Likewise.
6599         * solib-darwin.c: Likewise.
6600         * solib-dsbt.c: Likewise.
6601         * solib-spu.c: Likewise.
6602         * solib-svr4.c: Likewise.
6603         * solib-target.c: Likewise.
6604         * sparc-tdep.c: Likewise.
6605         * sparc64-tdep.c: Likewise.
6606         * spu-tdep.c: Likewise.
6607         * symfile.c: Likewise.
6608         * symtab.c: Likewise.
6609         * target-descriptions.c: Likewise.
6610         * target-memory.c: Likewise.
6611         * target.c: Likewise.
6612         * target.h: Likewise.
6613         * tracefile-tfile.c: Likewise.
6614         * tracepoint.c: Likewise.
6615         * valops.c: Likewise.
6616         * valprint.c: Likewise.
6617         * value.c: Likewise.
6618         * windows-tdep.c: Likewise.
6619         * mi/mi-main.c: Likewise.
6620
6621 2018-06-07  Tom Tromey  <tom@tromey.com>
6622
6623         * valprint.h (build_address_symbolic): Declare.
6624         * printcmd.c (print_address_symbolic): Update.
6625         (build_address_symbolic): Change "name" and "filename" to
6626         std::string.
6627         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6628         Update.
6629         * defs.h (build_address_symbolic): Remove declaration.
6630
6631 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6632
6633         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6634         (aarch64_vnv_type): Add function.
6635         (aarch64_pseudo_register_name): Add V regs for SVE.
6636         (aarch64_pseudo_register_type): Likewise.
6637         (aarch64_pseudo_register_reggroup_p): Likewise.
6638         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6639         (aarch64_pseudo_read_value): Add V regs for SVE.
6640         (aarch64_pseudo_write_2): Use V0 offset for SVE
6641         (aarch64_pseudo_write): Add V regs for SVE.
6642         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6643
6644 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6645
6646         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6647         (sve_vl_from_vq): Likewise.
6648
6649 2018-06-05  Tom Tromey  <tom@tromey.com>
6650
6651         * cli/cli-cmds.c (show_version): Update.
6652         * top.c (print_gdb_version): Add "interactive" parameter.
6653         Update.
6654         * main.c (captured_main_1): Update.
6655         * top.h (print_gdb_version): Add "interactive" parameter and a
6656         comment.
6657
6658 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6659
6660         * common/enum-flags.h: Add trailing semicolon to example in
6661         comment.
6662
6663 2018-06-05  Tom Tromey  <tom@tromey.com>
6664
6665         PR cli/12326:
6666         * NEWS: Add entry about pager.
6667         * utils.c (pagination_disabled_for_command): New global.
6668         (prompt_for_continue): Allow "c" response to prompt.
6669         (reinitialize_more_filter): Clear
6670         pagination_disabled_for_command.
6671         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6672
6673 2018-06-04  Tom Tromey  <tom@tromey.com>
6674
6675         * ada-lang.h (ada_lookup_symbol_list): Update.
6676         * ada-lang.c (resolve_subexp): Update.
6677         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6678         parameter.
6679         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6680         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6681         results parameter to std::vector.
6682         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6683         Update.
6684         * ada-exp.y (block_lookup): Update.
6685         (select_possible_type_sym): Change type of syms.  Remove nsyms
6686         parameter.
6687         (write_var_or_type, write_name_assoc): Update.
6688
6689 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6690
6691         * windows-nat.c (windows_nat_target::xfer_partial): Return
6692         TARGET_XFER_E_IO if we need to delegate to the target beneath
6693         but BENEATH is NULL.
6694
6695 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6696
6697         * Makefile.in (config.status): Add configure.nat as a
6698         dependency.
6699
6700 2018-06-04  Tom Tromey  <tom@tromey.com>
6701
6702         * cp-name-parser.y (cpname_state): Add method declarations.
6703         (HANDLE_QUAL): Update.
6704         (cpname_state::d_grab, cpname_state::fill_comp)
6705         (cpname_state::make_operator, cpname_state::make_dtor)
6706         (cpname_state::make_builtin_type, cpname_state::make_name)
6707         (cpname_state::d_qualify, cpname_state::d_int_type)
6708         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6709         (%union): Move earlier.
6710
6711 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6712
6713         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6714
6715 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6716
6717         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6718         (aarch64_pseudo_write_1): Likewise.
6719         (aarch64_pseudo_read_value): Use helper.
6720         (aarch64_pseudo_write): Likewise.
6721
6722 2018-06-04  Pedro Alves  <palves@redhat.com>
6723
6724         * darwin-nat.c (darwin_ops): Delete.
6725         (darwin_attach_pid): Use get_native_target.
6726
6727 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6728
6729         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6730         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6731
6732 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6733
6734         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6735         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6736         (aarch64_gdbarch_init): Check for SVE.
6737         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6738
6739 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6740
6741         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6742         * aarch64-tdep.h (aarch64_read_description): Likewise.
6743         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6744         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6745         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6746         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6747         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6748
6749 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6750
6751         * value.c (value_fetch_lazy_bitfield): New.
6752         (value_fetch_lazy_memory): New.
6753         (value_fetch_lazy_register): New.
6754         (value_fetch_lazy): Factor out to smaller functions.
6755
6756 2018-06-01  Tom Tromey  <tom@tromey.com>
6757
6758         * cp-name-parser.y (backslashable, represented): Now const.
6759
6760 2018-06-01  Tom Tromey  <tom@tromey.com>
6761
6762         * cp-name-parser.y: Include parser-defs.h.
6763         (parser_fprintf): Remove declaration.
6764
6765 2018-06-01  Tom Tromey  <tom@tromey.com>
6766
6767         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6768         %parse-param.
6769         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6770         (global_result): Remove globals.
6771         (struct cpname_state): New.
6772         (yyparse): Don't declare.
6773         (yylex, yyerror): Move declarations after %union.
6774         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6775         (make_name): Add state parameter.
6776         Update all callers.
6777         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6778         parameter.
6779         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6780         Update.
6781         (yylex): Add lvalp, state parameters.
6782         (yyerror): Add state parameter.
6783         (cp_demangled_name_to_comp): Update.
6784
6785 2018-06-01  Tom Tromey  <tom@tromey.com>
6786
6787         * cp-name-parser.y (parser_fprintf): Declare.
6788         (GDB_YY_REMAP_PREFIX): Define.
6789         Include yy-remap.h.  Don't redefine yy* identifiers.
6790
6791 2018-06-01  Tom Tromey  <tom@tromey.com>
6792
6793         * python/py-type.c (typy_legacy_template_argument): Update.
6794         * cp-support.h (cp_demangled_name_to_comp): Update.
6795         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6796         parameter to be a "std::string *".
6797         (main): Update.
6798
6799 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6800
6801         * ada-lex.l: Include "diagnostics.h" instead of
6802         "common/diagnostics.h".
6803         * unittests/environ-selftests.c: Likewise.
6804         * common/diagnostics.h: Moved to ../include.
6805
6806 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6807
6808         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6809         to language_mode_manual while calling breakpoint_re_set_one.
6810
6811 2018-06-01  Tom Tromey  <tom@tromey.com>
6812
6813         * valops.c (value_cast_structs, destructor_name_p): Update.
6814         * symtab.c (gdb_mangle_name): Update.
6815         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6816         Update.
6817         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6818         (pascal_object_print_value_fields, pascal_object_print_value):
6819         Update.
6820         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6821         * linespec.c (find_methods): Update.
6822         * gdbtypes.h (type_name_no_tag): Remove.
6823         (type_name_or_error): Rename from type_name_no_tag_or_error.
6824         * gdbtypes.c (type_name_no_tag): Remove.
6825         (type_name_or_error): Rename from type_name_no_tag_or_error.
6826         (lookup_struct_elt_type, check_typedef): Update.
6827         * expprint.c (print_subexp_standard): Update.
6828         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6829         * d-namespace.c (d_lookup_nested_symbol): Update.
6830         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6831         (cp_print_class_member): Update.
6832         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6833         * completer.c (add_struct_fields): Update.
6834         * c-typeprint.c (cp_type_print_derivation_info)
6835         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6836         Update.
6837         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6838         (ada_prefer_type, ada_is_exception_sym): Update.
6839
6840 2018-06-01  Tom Tromey  <tom@tromey.com>
6841
6842         * valops.c (enum_constant_from_type, value_namespace_elt)
6843         (value_maybe_namespace_elt): Update.
6844         * valarith.c (find_size_for_pointer_math): Update.
6845         * target-descriptions.c (make_gdb_type): Update.
6846         * symmisc.c (print_symbol): Update.
6847         * stabsread.c (define_symbol, read_type)
6848         (complain_about_struct_wipeout, add_undefined_type)
6849         (cleanup_undefined_types_1): Update.
6850         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6851         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6852         (rust_internal_print_type, rust_composite_type)
6853         (rust_evaluate_funcall, rust_evaluate_subexp)
6854         (rust_inclusive_range_type_p): Update.
6855         * python/py-type.c (typy_get_tag): Update.
6856         * p-typeprint.c (pascal_type_print_base): Update.
6857         * mdebugread.c (parse_symbol, parse_type): Update.
6858         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6859         Update.
6860         * guile/scm-type.c (gdbscm_type_tag): Update.
6861         * go-lang.c (sixg_string_p): Update.
6862         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6863         Update.
6864         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6865         (TYPE_TAG_NAME): Remove.
6866         * gdbtypes.c (type_name_no_tag): Simplify.
6867         (check_typedef, check_types_equal, recursive_dump_type)
6868         (copy_type_recursive, arch_composite_type): Update.
6869         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6870         in summary mode when needed.
6871         * eval.c (evaluate_funcall): Update.
6872         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6873         (process_structure_scope, read_enumeration_type)
6874         (read_namespace_type, read_module_type, determine_prefix): Update.
6875         * cp-support.c (inspect_type): Update.
6876         * coffread.c (process_coff_symbol, decode_base_type): Update.
6877         * c-varobj.c (c_is_path_expr_parent): Update.
6878         * c-typeprint.c (c_type_print_base_struct_union): Update.
6879         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6880         summary when using C language.
6881         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6882         (gen_maybe_namespace_elt): Update.
6883         * ada-lang.c (ada_type_name): Simplify.
6884         (empty_record, ada_template_to_fixed_record_type_1)
6885         (template_to_static_fixed_type)
6886         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6887
6888 2018-06-01  Tom Tromey  <tom@tromey.com>
6889
6890         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6891         c_print_type.
6892         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6893         (c_print_type): Update.
6894         (c_print_type): New overload.
6895         (c_type_print_varspec_prefix, c_type_print_args)
6896         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6897         (c_type_print_base_struct_union, c_type_print_base_1)
6898         (cp_type_print_method_args): Add "language" parameter.
6899         (c_type_print_base): Update.
6900         * c-lang.h (c_print_type): Add new overload.
6901
6902 2018-06-01  Tom Tromey  <tom@tromey.com>
6903
6904         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6905         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6906
6907 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6908
6909         * aarch64-tdep.c (aarch64_sve_register_names): New const
6910         var.
6911         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6912         (AARCH64_SVE_Z_REGS_NUM): New define.
6913         (AARCH64_SVE_P_REGS_NUM): Likewise.
6914         (AARCH64_SVE_NUM_REGS): Likewise.
6915
6916 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6917
6918         * nat/linux-ptrace.h [__alpha__]
6919         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6920         definitions.
6921
6922 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6923
6924         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6925         the endianness selected.
6926         * NEWS: Document `set endian auto' mode operation update.
6927
6928 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6929
6930         * Makefile.in: Add new header.
6931         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6932         (sve_vl_from_vg): Likewise.
6933         (sve_vq_from_vl): Likewise.
6934         (sve_vl_from_vq): Likewise.
6935         (sve_vq_from_vg): Likewise.
6936         (sve_vg_from_vq): Likewise.
6937         * configure.nat: Add new c file.
6938         * nat/aarch64-sve-linux-ptrace.c: New file.
6939         * nat/aarch64-sve-linux-ptrace.h: New file.
6940
6941 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6942
6943         * aarch64-linux-nat.c (aarch64_linux_read_description):
6944         Add parmeter zero.
6945         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6946         Likewise.
6947         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6948         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6949         (aarch64_gdbarch_init): Add parmeter zero.
6950         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6951         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6952         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6953         parmeter.
6954         * doc/gdb.texinfo: Describe SVE feature
6955         * features/aarch64-sve.c: New file.
6956
6957 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6958
6959         PR gdb/23210
6960         * gdbarch.sh (significant_addr_bit): Default to zero when
6961         not set by target architecture.
6962         * gdbarch.c: Re-generated.
6963         * utils.c (address_significant): Update.
6964
6965 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6966
6967         * stack.c (func_command): Remove trailing newline in call to error.
6968
6969 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6970
6971         * regcache.h (regcache_raw_collect): Remove, update callers to
6972         use regcache::raw_collect.
6973         * regcache.c (regcache_raw_collect): Remove.
6974
6975 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6976
6977         * regcache.h (regcache_raw_supply): Remove, update callers to
6978         use detached_regcache::raw_supply.
6979         * regcache.c (regcache_raw_supply): Remove.
6980
6981 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6982
6983         * regcache.h (regcache_cooked_write_part): Remove, update
6984         callers to use regcache::cooked_write_part.
6985         * regcache.c (regcache_cooked_write_part): Remove.
6986
6987 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6988
6989         * regcache.h (regcache_cooked_read_part): Remove, update callers
6990         to use readable_regcache::cooked_read_part.
6991         * regcache.c (regcache_cooked_read_part): Remove.
6992
6993 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6994
6995         * regcache.h (regcache_cooked_read_value): Remove, update
6996         callers to use readable_regcache::cooked_read_value.
6997         * regcache.c (regcache_cooked_read_value): Remove.
6998
6999 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7000
7001         * regcache.h (regcache_cooked_write): Remove, update callers to
7002         use regcache::cooked_write.
7003         * regcache.c (regcache_cooked_write): Remove.
7004
7005 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7006
7007         * regcache.h (regcache_invalidate): Remove, update callers to
7008         use detached_regcache::invalidate instead.
7009         * regcache.c (regcache_invalidate): Remove.
7010
7011 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7012
7013         * regcache.h (regcache_raw_write_part): Remove, update callers
7014         to use regcache::raw_write_part instead.
7015         * regcache.c (regcache_raw_write_part): Remove.
7016
7017 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7018
7019         * regcache.h (regcache_raw_read_part): Remove, update callers to
7020         use readable_regcache::raw_read_part instead.
7021         * regcache.c (regcache_raw_read_part): Remove.
7022
7023 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7024
7025         * regcache.h (regcache_cooked_read): Remove, update callers to
7026         use readable_regcache::cooked_read instead.
7027         * regcache.c (regcache_cooked_read): Remove.
7028
7029 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7030
7031         * regcache.h (regcache_raw_write): Remove, update callers to use
7032         regcache::raw_write instead.
7033         * regcache.c (regcache_raw_write): Remove.
7034
7035 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7036
7037         * regcache.h (regcache_raw_read): Remove, update callers to use
7038         readable_regcache::raw_read instead.
7039         * regcache.c (regcache_raw_read): Remove.
7040
7041 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7042
7043         * regcache.h (regcache_raw_update): Remove, update callers to
7044         use readable_regcache::raw_update instead.
7045         * regcache.c (regcache_raw_update): Remove.
7046
7047 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7048
7049         * regcache.h (regcache_register_status): Remove, update callers
7050         to use reg_buffer::get_register_status directly instead.
7051         * regcache.c (regcache_register_status): Remove.
7052
7053 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7054
7055         * regcache.h (regcache_get_ptid): Remove, update all callers to
7056         call regcache::ptid instead.
7057         * regcache.c (regcache_get_ptid): Remove.
7058
7059 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7060
7061         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7062
7063 2018-05-30  Pedro Alves  <palves@redhat.com>
7064
7065         * common/common-exceptions.h (exception_rethrow): Use
7066         ATTRIBUTE_NORETURN.
7067
7068 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7069
7070         * breakpoint.c (print_solib_event, check_status_catch_solib):
7071         Remove struct keyword in range-based for loops.
7072         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7073         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7074         Likewise.
7075         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7076         Likewise.
7077         * symfile.c (addr_info_make_relative): Likewise.
7078         * thread.c (value_in_thread_stack_temporaries): Likewise.
7079
7080 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7081
7082         PR gdb/16841
7083         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7084         aggregate type to get its real type before accessing it.
7085
7086 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7087
7088         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7089         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7090         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7091         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7092         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7093         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7094         * printcmd.c (info_address_command): Likewise.
7095
7096 2018-05-29  Tom Tromey  <tom@tromey.com>
7097
7098         * windows-nat.c (handle_exception): Update fall-through comment.
7099
7100 2018-05-29  Tom Tromey  <tom@tromey.com>
7101
7102         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7103         (struct program_space) <added_solibs>: Now a std::vector.
7104         * breakpoint.c (print_solib_event): Update.
7105         (check_status_catch_solib): Update.
7106         * progspace.c (clear_program_space_solib_cache): Update.
7107         * solib.c (update_solib_list): Update.
7108
7109 2018-05-29  Tom Tromey  <tom@tromey.com>
7110
7111         * python/py-type.c (typy_richcompare): Update.
7112         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7113         * gdbtypes.h (types_deeply_equal): Return bool.
7114         (types_equal): Likewise.
7115         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7116         declare VEC.
7117         (check_types_equal): Change worklist to std::vector.  Return
7118         bool.
7119         (struct type_equality_entry): Add constructor.
7120         (compare_maybe_null_strings): Return bool.
7121         (check_types_worklist): Return bool.  Change worklist to
7122         std::vector.
7123         (types_deeply_equal): Use std::vector.
7124         (types_equal): Return bool.
7125         (compare_maybe_null_strings): Simplify.
7126
7127 2018-05-29  Tom Tromey  <tom@tromey.com>
7128
7129         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7130
7131 2018-05-29  Tom Tromey  <tom@tromey.com>
7132
7133         * objc-lang.h: Don't include cp-support.h.
7134         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7135         declare VEC.
7136
7137 2018-05-27  Tom Tromey  <tom@tromey.com>
7138
7139         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7140
7141 2018-05-25  Tom Tromey  <tom@tromey.com>
7142
7143         * value.c (value::location): Initialize.
7144
7145 2018-05-25  Tom Tromey  <tom@tromey.com>
7146
7147         * dbxread.c (init_bincl_list): Remove.
7148         (bincl_list): Now a std::vector.
7149         (bincls_allocated, next_bincl): Remove.
7150         (free_bincl_list, do_free_bincl_list_cleanup)
7151         (make_cleanup_free_bincl_list): Remove.
7152         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7153         unique_xmalloc_ptr.
7154         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7155         (struct header_file_location): Add constructor.
7156         (add_bincl_to_list): Remove.
7157
7158 2018-05-25  Tom Tromey  <tom@tromey.com>
7159
7160         * tui/tui.c (tui_enable): Update.
7161         * mi/mi-interp.c (mi_interp::init): Update.
7162         * interps.h (class interp) <name>: New method.
7163         <m_name>: Rename from name.
7164         (~scoped_restore_interp): Update.
7165         * interps.c (interp::interp): Update.
7166         (interp_add, interp_set, interp_lookup_existing)
7167         (current_interp_named_p): Update.
7168
7169 2018-05-25  Tom Tromey  <tom@tromey.com>
7170
7171         * interps.c (interp_name): Remove.
7172         * mi/mi-interp.c (mi_interp::init): Update.
7173         * interps.h (interp_name): Remove.
7174         (~scoped_restore_interp): Update.
7175         * tui/tui.c (tui_enable): Update.
7176
7177 2018-05-25  Tom Tromey  <tom@tromey.com>
7178
7179         * utils.c (fputs_maybe_filtered): Update.
7180         * linespec.c (decode_line_full): Update.
7181         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7182         (mi_print_breakpoint_for_event, mi_solib_loaded)
7183         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7184         (mi_user_selected_context_changed): Update.
7185         * mi/mi-main.c (mi_execute_command): Update.
7186         * cli/cli-script.c (execute_control_command): Update.
7187         * python/python.c (execute_gdb_command): Update.
7188         * solib.c (info_sharedlibrary_command): Update.
7189         * interps.c (interp_ui_out): Remove.
7190         * interps.h (interp_ui_out): Remove.
7191
7192 2018-05-25  Tom Tromey  <tom@tromey.com>
7193
7194         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7195         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7196         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7197
7198 2018-05-25  Tom Tromey  <tom@tromey.com>
7199
7200         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7201         * interps.c (interp_exec): Use scoped_restore.
7202
7203 2018-05-25  Tom Tromey  <tom@tromey.com>
7204
7205         * remote.c (remote_target::remote_file_get): Use
7206         gdb::byte_vector.
7207         (remote_target::remote_file_put): Likewise.
7208
7209 2018-05-25  Tom Tromey  <tom@tromey.com>
7210
7211         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7212         a std::string.
7213         (get_pe_section_index, add_pe_exported_sym): Update.
7214         (read_pe_exported_syms): Use gdb::def_vector.
7215
7216 2018-05-25  Tom Tromey  <tom@tromey.com>
7217
7218         * frame.c (remove_prev_frame): Remove.
7219         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7220
7221 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7222
7223         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7224         Remove prototypes.
7225         * mips-linux-nat.c (supply_fpregset): Always call
7226         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7227         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7228         `mips_fill_fpregset'.
7229         * mips-linux-tdep.c (mips_supply_fpregset)
7230         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7231         (mips_fill_fpregset_wrapper): Remove functions.
7232         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7233         (mips_linux_fpregset): Remove variable.
7234         (mips_linux_iterate_over_regset_sections): Use
7235         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7236         (mips_linux_o32_sigframe_init): Remove comment.
7237
7238 2018-05-25  Pedro Alves  <palves@redhat.com>
7239
7240         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7241         (struct readahead_cache, struct packet_reg, struct
7242         remote_arch_state, class remote_state): Move higher up in the
7243         file.
7244         (remote_target::m_remote_state): Now an object instead of a pointer.
7245         (remote_target::get_remote_state): Adjust.
7246
7247 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7248
7249         * stack.c (select_and_print_frame): Delete.
7250         (struct function_bounds): Move struct within function.
7251         (func_command): Most content moved into new function
7252         find_frame_for_function, use new function, print result, add
7253         function comment.
7254         (find_frame_for_function): New function, now returns a result.
7255
7256 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7257
7258         * stack.c (iterate_over_block_arg_vars): Fix comment.
7259         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7260
7261 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7262
7263         PR gdb/23203
7264         * frame.c
7265         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7266         Define.
7267         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7268         Define.
7269         * frame.h (class scoped_restore_selected_frame): New class.
7270         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7271         of any exception, use scoped_restore_selected_frame to restore the
7272         frame instead.
7273
7274 2018-05-24  Pedro Alves  <palves@redhat.com>
7275
7276         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7277         override.
7278
7279 2018-05-23  Tom Tromey  <tom@tromey.com>
7280
7281         * complaints.c (struct complaints): Remove.
7282         (symfile_complaint_book): Remove.
7283         (series): New global.
7284         (complaint_internal): Update.
7285         (clear_complaints): Update.
7286
7287 2018-05-23  Tom Tromey  <tom@tromey.com>
7288
7289         * complaints.c (counters): New global.
7290         (struct complain): Remove.
7291         (struct complaints) <root>: Remove.
7292         (complaint_sentinel): Remove.
7293         (symfile_complaint_book): Update.
7294         (find_complaint) Remove.
7295         (complaint_internal, clear_complaints): Update.
7296
7297 2018-05-23  Tom Tromey  <tom@tromey.com>
7298
7299         * complaints.c (struct complain) <file, line>: Remove.
7300         (find_complaint): Remove file, line parameters.
7301         (complaint_internal): Update.
7302
7303 2018-05-23  Tom Tromey  <tom@tromey.com>
7304
7305         * complaints.c (vcomplaint): Remove.
7306         (complaint_internal) Merge in contents of vcomplaint.
7307
7308 2018-05-23  Tom Tromey  <tom@tromey.com>
7309
7310         * complaints.c (struct complaints) <explanation>: Remove.
7311         (symfile_explanations): Remove.
7312         (symfile_complaint_book): Update.
7313         (vcomplaint): Update.
7314         (struct explanation): Remove.
7315
7316 2018-05-23  Tom Tromey  <tom@tromey.com>
7317
7318         * complaints.c (symfile_complaints): Remove.
7319         (complaint_internal): Remove "complaints" parameter.
7320         (clear_complaints, vcomplaint): Remove "c" parameter.
7321         (get_complaints): Remove.
7322         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7323         (dwarf2_debug_line_missing_file_complaint)
7324         (dwarf2_debug_line_missing_end_sequence_complaint)
7325         (dwarf2_complex_location_expr_complaint)
7326         (dwarf2_const_value_length_mismatch_complaint)
7327         (dwarf2_section_buffer_overflow_complaint)
7328         (dwarf2_macro_malformed_definition_complaint)
7329         (dwarf2_invalid_attrib_class_complaint)
7330         (create_addrmap_from_index, dw2_symtab_iter_next)
7331         (dw2_expand_marked_cus)
7332         (dw2_debug_names_iterator::find_vec_in_debug_names)
7333         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7334         (create_debug_type_hash_table, init_cutu_and_read_dies)
7335         (partial_die_parent_scope, add_partial_enumeration)
7336         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7337         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7338         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7339         (create_cus_hash_table, create_dwp_hash_table)
7340         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7341         (dwarf2_rnglists_process, dwarf2_ranges_process)
7342         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7343         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7344         (handle_struct_member_die, process_structure_scope)
7345         (read_array_type, read_common_block, read_module_type)
7346         (read_tag_pointer_type, read_typedef, read_base_type)
7347         (read_subrange_type, load_partial_dies, partial_die_info::read)
7348         (partial_die_info::read, partial_die_info::read)
7349         (partial_die_info::read, read_checked_initial_length_and_offset)
7350         (dwarf2_string_attr, read_formatted_entries)
7351         (dwarf_decode_line_header)
7352         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7353         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7354         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7355         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7356         (get_signatured_type, get_DW_AT_signature_type)
7357         (decode_locdesc, file_file_name, consume_improper_spaces)
7358         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7359         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7360         (dwarf2_symbol_mark_computed, set_die_type)
7361         (read_attribute_value): Update.
7362         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7363         Update.
7364         * dbxread.c (unknown_symtype_complaint)
7365         (lbrac_mismatch_complaint, repeated_header_complaint)
7366         (set_namestring, function_outside_compilation_unit_complaint)
7367         (read_dbx_symtab, process_one_symbol): Update.
7368         * gdbtypes.c (stub_noname_complaint): Update.
7369         * windows-nat.c (handle_unload_dll): Update.
7370         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7371         (decode_base_type): Update.
7372         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7373         (eb_complaint, record_include_begin, record_include_end)
7374         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7375         (process_xcoff_symbol, read_symbol)
7376         (function_outside_compilation_unit_complaint)
7377         (scan_xcoff_symtab): Update.
7378         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7379         * buildsym.c (finish_block_internal, make_blockvector)
7380         (end_symtab_get_static_block, augment_type_symtab): Update.
7381         * dtrace-probe.c (dtrace_process_dof)
7382         (dtrace_static_probe_ops::get_probes): Update.
7383         * complaints.h (struct complaint): Don't declare.
7384         (symfile_complaints): Remove.
7385         (complaint_internal): Remove "complaints" parameter.
7386         (complaint): Likewise.
7387         (clear_complaints): Likewise.
7388         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7389         (reread_symbols): Update.
7390         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7391         (dwarf2_frame_cache, decode_frame_entry): Update.
7392         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7393         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7394         (info_selectors_command): Update.
7395         * macrotab.c (macro_include, check_for_redefinition)
7396         (macro_undef): Update.
7397         * objfiles.c (filter_overlapping_sections): Update.
7398         * stabsread.c (invalid_cpp_abbrev_complaint)
7399         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7400         (define_symbol, error_type, read_type, rs6000_builtin_type)
7401         (stabs_method_name_from_physname, read_member_functions)
7402         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7403         (attach_fields_to_type, complain_about_struct_wipeout)
7404         (read_range_type, read_args, common_block_start)
7405         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7406         Update.
7407         * mdebugread.c (index_complaint, unknown_ext_complaint)
7408         (basic_type_complaint, bad_tag_guess_complaint)
7409         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7410         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7411         (parse_procedure, parse_lines)
7412         (function_outside_compilation_unit_complaint)
7413         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7414         (bad_tag_guess_complaint, reg_value_complaint): Update.
7415         * cp-support.c (demangled_name_complaint): Update.
7416         * macroscope.c (sal_macro_scope): Update.
7417         * dwarf-index-write.c (class debug_names): Update.
7418
7419 2018-05-23  Tom Tromey  <tom@tromey.com>
7420
7421         * complaints.c (clear_complaints): Remove "noisy" parameter.
7422         * complaints.h (clear_complaints): Update.
7423         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7424         (reread_symbols): Update.
7425
7426 2018-05-23  Tom Tromey  <tom@tromey.com>
7427
7428         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7429         SUBSEQUENT_MESSAGE.
7430         (vcomplaint, clear_complaints): Update.
7431         (symfile_explanations): Remove some messages.
7432
7433 2018-05-23  Tom Tromey  <tom@tromey.com>
7434
7435         * complaints.c (internal_complaint): Remove.
7436         * complaints.h (internal_complaint): Remove.
7437
7438 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7439
7440         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7441
7442 2018-05-22  Pedro Alves  <palves@redhat.com>
7443
7444         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7445         (remote_fileio_badfd, remote_fileio_return_errno)
7446         (remote_fileio_return_success, remote_fileio_func_open)
7447         (remote_fileio_func_open, remote_fileio_func_close)
7448         (remote_fileio_func_read, remote_fileio_func_write)
7449         (remote_fileio_func_lseek, remote_fileio_func_rename)
7450         (remote_fileio_func_unlink, remote_fileio_func_stat)
7451         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7452         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7453         remote_target parameter.
7454         (remote_fio_func_map) <func>: Add remote_target parameter.
7455         (do_remote_fileio_request, remote_fileio_request):
7456         * remote-fileio.h (remote_fileio_request):
7457         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7458         remote_target parameter.
7459         (remote_notif_process, handle_notification): Adjust to pass down
7460         the remote.
7461         (remote_notif_state_allocate): Add remote_target parameter.  Save
7462         it.
7463         * remote-notif.h (struct remote_target): Forward declare.
7464         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7465         remote_target parameter.
7466         (struct remote_notif_state) <remote>: New field.
7467         (remote_notif_ack, remote_notif_parse): Add remote_target
7468         parameter.
7469         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7470         remote_target parameter.
7471         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7472         (threads_listing_context, rmt_thread_action, protocol_feature)
7473         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7474         (packet_result, struct threads_listing_context, remote_state):
7475         Move definitions and declarations higher up.
7476         (remote_target) <~remote_target>: Declare.
7477         (remote_download_command_source, remote_file_put, remote_file_get)
7478         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7479         (remote_hostio_pread_vFile, remote_hostio_send_command)
7480         (remote_hostio_set_filesystem, remote_hostio_open)
7481         (remote_hostio_close, remote_hostio_unlink, remote_state)
7482         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7483         (get_memory_write_packet_size, get_memory_read_packet_size)
7484         (append_pending_thread_resumptions, remote_detach_1)
7485         (append_resumption, remote_resume_with_vcont)
7486         (add_current_inferior_and_thread, wait_ns, wait_as)
7487         (process_stop_reply, remote_notice_new_inferior)
7488         (process_initial_stop_replies, remote_add_thread)
7489         (btrace_sync_conf, remote_btrace_maybe_reopen)
7490         (remove_new_fork_children, kill_new_fork_children)
7491         (discard_pending_stop_replies, stop_reply_queue_length)
7492         (check_pending_events_prevent_wildcard_vcont)
7493         (discard_pending_stop_replies_in_queue, stop_reply)
7494         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7495         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7496         (remote_interrupt_as, remote_interrupt_ns)
7497         (remote_get_noisy_reply, remote_query_attached)
7498         (remote_add_inferior, remote_current_thread, get_current_thread)
7499         (set_thread, set_general_thread, set_continue_thread)
7500         (set_general_process, write_ptid)
7501         (remote_unpack_thread_info_response, remote_get_threadinfo)
7502         (parse_threadlist_response, remote_get_threadlist)
7503         (remote_threadlist_iterator, remote_get_threads_with_ql)
7504         (remote_get_threads_with_qxfer)
7505         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7506         (get_offsets, remote_check_symbols, remote_supported_packet)
7507         (remote_query_supported, remote_packet_size)
7508         (remote_serial_quit_handler, remote_detach_pid)
7509         (remote_vcont_probe, remote_resume_with_hc)
7510         (send_interrupt_sequence, interrupt_query)
7511         (remote_notif_get_pending_events, fetch_register_using_p)
7512         (send_g_packet, process_g_packet, fetch_registers_using_g)
7513         (store_register_using_P, store_registers_using_G)
7514         (set_remote_traceframe, check_binary_download)
7515         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7516         (remote_xfer_live_readonly_partial, remote_read_bytes)
7517         (remote_send_printf, remote_flash_write, readchar)
7518         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7519         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7520         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7521         (extended_remote_disable_randomization, extended_remote_run)
7522         (send_environment_packet, extended_remote_environment_support)
7523         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7524         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7525         (packet_command): Now methods of ...
7526         (remote_target): ... this class.
7527         (m_remote_state) <remote_target>: New field.
7528         (struct remote_state) <stop_reply_queue,
7529         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7530         fields.
7531         (remote_state::remote_state): Allocate stop_reply_queue.
7532         (remote_state): Delete global.
7533         (get_remote_state_raw): Delete.
7534         (remote_target::get_remote_state): Allocate m_remote_state on
7535         demand.
7536         (get_current_remote_target): New.
7537         (remote_ops, extended_remote_ops): Delete.
7538         (wait_forever_enabled_p, remote_async_inferior_event_token):
7539         Delete, moved to struct remote_state.
7540         (remote_target::close): Delete self.  Destruction bits split to
7541         ...
7542         (remote_target::~remote_target): ... this.
7543         (show_memory_packet_size): Adjust to use
7544         get_current_remote_target.
7545         (struct protocol_feature) <func>: Add remote_target parameter.
7546         All callers adjusted.
7547         (curr_quit_handler_target): New.
7548         (remote_serial_quit_handler): Reimplement.
7549         (remote_target::open_1): Adjust to use get_current_remote_target.
7550         Heap-allocate remote_target/extended_remote_target instances.
7551         (vcont_builder::vcont_builder): Add remote_target parameter, and
7552         save it in m_remote.  All callers adjusted.
7553         (vcont_builder::m_remote): New field.
7554         (vcont_builder::restart, vcont_builder::flush)
7555         (vcont_builder::push_action): Use it.
7556         (remote_target::commit_resume): Use it.
7557         (struct queue_iter_param) <remote>: New field.
7558         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7559         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7560         (check_pending_event_prevents_wildcard_vcont_callback)
7561         (remote_target::check_pending_events_prevent_wildcard_vcont)
7562         (remote_target::discard_pending_stop_replies)
7563         (remote_target::discard_pending_stop_replies_in_queue)
7564         (remote_target::remote_notif_remove_queued_reply): Fill in
7565         'remote' field.
7566         (remote_notif_get_pending_events): New.
7567         (remote_target::readchar, remote_target::remote_serial_write):
7568         Save/restore curr_quit_handler_target.
7569         (putpkt): New.
7570         (kill_new_fork_children): Fill in 'remote' field.
7571         (packet_command): Use get_current_remote_target, defer to
7572         remote_target method of same name.
7573         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7574         parameter, and save it in m_remote.  All callers adjusted.
7575         (scoped_remote_fd::release): Use m_remote.
7576         (scoped_remote_fd::m_remote): New field.
7577         (remote_file_put, remote_file_get, remote_file_delete): Use
7578         get_current_remote_target, defer to remote_target method of same
7579         name.
7580         (remote_btrace_reset): Add remote_state paremeter.  Update all
7581         callers.
7582         (remote_async_inferior_event_handler). Pass down 'data'.
7583         (remote_new_objfile): Use get_current_remote_target.
7584         (remote_target::vcont_r_supported): New.
7585         (set_range_stepping): Use get_current_remote_target and
7586         remote_target::vcont_r_supported.
7587         (_initialize_remote): Don't allocate 'remote_state' and
7588         'stop_reply_queue' globals.
7589         * remote.h (struct remote_target): Forward declare.
7590         (getpkt, putpkt, remote_notif_get_pending_events): Add
7591         'remote_target' parameter.
7592
7593 2018-05-22  Pedro Alves  <palves@redhat.com>
7594
7595         * remote.c (vcont_builder): Now a class.  Make all data members
7596         private.
7597         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7598         Declare methods.
7599         (vcont_builder_restart): Rename to ...
7600         (vcont_builder::restart): ... this.
7601         (vcont_builder_flush): Rename to ...
7602         (vcont_builder::flush): ... this.
7603         (vcont_builder_push_action): Rename to ...
7604         (vcont_builder::push_action): ... this.
7605         (remote_target::commit_resume): Adjust.
7606
7607 2018-05-22  Pedro Alves  <palves@redhat.com>
7608
7609         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7610         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7611         (get_fixed_memory_packet_size): New.
7612         (get_memory_packet_size): Use it.
7613         (set_memory_packet_size): Don't override the config size with
7614         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7615         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7616         Don't refer to get_memory_packet_size if not connected to a remote
7617         target.  Show "(default)" if configured size is 0.
7618
7619 2018-05-22  Pedro Alves  <palves@redhat.com>
7620
7621         * remote.c (remote_target::mourn_inferior): Move
7622         discard_pending_stop_replies call here from ...
7623         (_initialize_remote): ... here.
7624
7625 2018-05-22  Pedro Alves  <palves@redhat.com>
7626
7627         * remote.c (compare_section_command): Remove set_general_process
7628         call.
7629
7630 2018-05-22  Pedro Alves  <palves@redhat.com>
7631
7632         * remote.c (struct packet_reg, struct remote_arch_state):
7633         Move higher up in the file.
7634         (remote_state) <m_arch_states>: Store remote_arch_state values
7635         instead of remote_arch_state pointers.
7636         (remote_state::get_remote_arch_state): Adjust.
7637
7638 2018-05-22  Pedro Alves  <palves@redhat.com>
7639
7640         * remote.c: Include <unordered_map>.
7641         (remote_state): Now a class.
7642         (remote_state) <get_remote_arch_state>: Declare method.
7643         <get_remote_arch_state>: New field.
7644         (remote_arch_state) <remote_arch_state>: Declare ctor.
7645         <regs>: Now a unique_ptr.
7646         (remote_gdbarch_data_handle): Delete.
7647         (get_remote_arch_state): Delete.
7648         (remote_state::get_remote_arch_state): New.
7649         (get_remote_state): Adjust to call remote_state's
7650         get_remote_arch_state method.
7651         (init_remote_state): Delete, bits factored out to ...
7652         (remote_arch_state::remote_arch_state): ... this new method.
7653         (get_remote_packet_size, get_memory_packet_size)
7654         (process_g_packet, remote_target::fetch_registers)
7655         (remote_target::prepare_to_store, store_registers_using_G)
7656         (remote_target::store_registers, remote_target::get_trace_status):
7657         Adjust to call remote_state's method.
7658         (_initialize_remote): Remove reference to
7659         remote_gdbarch_data_handle.
7660
7661 2018-05-22  Pedro Alves  <palves@redhat.com>
7662
7663         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7664         pread>: New method declarations.
7665         (remote_target::open_1): Adjust.
7666         (readahead_cache_invalidate): Rename to ...
7667         (readahead_cache::invalidate): ... this, and adjust to be a class
7668         method.
7669         (readahead_cache_invalidate_fd): Rename to ...
7670         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7671         class method.
7672         (remote_hostio_pwrite): Adjust.
7673         (remote_hostio_pread_from_cache): Rename to ...
7674         (readahead_cache::pread): ... this, and adjust to be a class
7675         method.
7676         (remote_hostio_close): Adjust.
7677
7678 2018-05-22  Pedro Alves  <palves@redhat.com>
7679
7680         * remote.c (remote_hostio_close_cleanup): Delete.
7681         (class scoped_remote_fd): New.
7682         (remote_file_put, remote_file_get): Use it.
7683
7684 2018-05-22  Pedro Alves  <palves@redhat.com>
7685
7686         (struct vCont_action_support): Use bool and initialize all fields.
7687         (struct readahead_cache): Initialize all fields.
7688         (remote_state): Use bool and initialize all fields.
7689         (remote_state::remote_state, remote_state::~remote_state): New.
7690         (new_remote_state): Delete.
7691         (_initialize_remote): Use new to allocate remote_state.
7692
7693 2018-05-22  Pedro Alves  <palves@redhat.com>
7694             張俊芝  <zjz@zjz.name>
7695
7696         PR gdb/22973
7697         * c-exp.y: Include "c-support.h".
7698         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7699         of tolower.  Use c_ident_is_alpha to scan names.
7700         * c-lang.c: Include "c-support.h".
7701         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7702         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7703         * c-support.h: New file, with bits factored out from ...
7704         * cp-name-parser.y: ... this file.
7705         Include "c-support.h".
7706         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7707         c-support.h and renamed.
7708         (symbol_end, yylex): Adjust.
7709
7710 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7711
7712         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7713         parameter type to CORE_ADDR.
7714         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7715         parameter type in declaration to CORE_ADDR.
7716         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7717         target_auxv_search to get AT_HWCAP and use the result to get the
7718         target description.
7719         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7720         to CORE_ADDR. Remove the cast of the return value to unsigned
7721         long. Fix error predicate of target_auxv_search.
7722         (ppc_linux_nat_target::read_description): Change the type of the
7723         hwcap variable to CORE_ADDR.
7724
7725 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7726
7727         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7728         if the size of fpscr is larger than 32 bits.
7729
7730 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7731
7732         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7733         (ppc32_linux_vsxregmap): New global.
7734         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7735         regcache_supply_regset, and regcache_collect_regset.
7736         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7737         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7738         (fetch_vsx_register, store_vsx_register): Remove.
7739         (fetch_vsx_registers): Add regno parameter. Get regset using
7740         ppc_linux_vsxregset. Use regset to supply registers.
7741         (store_vsx_registers): Add regno parameter. Get regset using
7742         ppc_linux_vsxregset. Use regset to collect registers.
7743         (fetch_register): Call fetch_vsx_registers instead of
7744         fetch_vsx_register.
7745         (store_register): Call store_vsx_registers instead of
7746         store_vsx_register.
7747         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7748         new regno parameter.
7749         (store_ppc_registers): Call store_vsx_registers with -1 for the
7750         new regno parameter.
7751         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7752         (ppc_collect_vsxregset): Remove.
7753
7754 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7755
7756         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7757         offset fields.
7758         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7759         for vector register offset fields.
7760         (ppc64_fbsd_reg_offsets): Likewise.
7761         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7762         to vector register offset fields.
7763         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7764         to vector register offset fields.
7765         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7766         vector register offset fields.
7767         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7768         initializers for vector register offset fields.
7769         (rs6000_aix64_reg_offsets): Likewise.
7770         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7771         (ppc_supply_vrregset): Remove.
7772         (ppc_collect_vrregset): Remove.
7773         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7774         (ppc_linux_vrregset) : New function.
7775         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7776         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7777         (ppc32_linux_vrregset): Remove.
7778         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7779         and use result instead of ppc32_linux_vrregset.
7780         (ppc32_linux_reg_offsets): Remove initializers for vector register
7781         offset fields.
7782         (ppc64_linux_reg_offsets): Likewise.
7783         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7784         * ppc-linux-nat.c: Include regset.h.
7785         (gdb_vrregset_t): Adjust comment to account for little-endian
7786         mode.
7787         (supply_vrregset, fill_vrregset): Remove.
7788         (fetch_altivec_register, store_altivec_register): Remove.
7789         (fetch_altivec_registers): Add regno parameter. Get regset using
7790         ppc_linux_vrregset. Use regset to supply registers.
7791         (store_altivec_registers): Add regno parameter. Get regset using
7792         ppc_linux_vrregset. Use regset to collect registers.
7793         (fetch_register): Call fetch_altivec_registers instead of
7794         fetch_altivec_register.
7795         (store_register): Call store_altivec_registers instead of
7796         store_altivec_register.
7797         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7798         the new regno parameter.
7799         (store_ppc_registers): Call store_altivec_registers with -1 for
7800         the new regno parameter.
7801
7802 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7803
7804         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7805         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7806         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7807         (gdb_vrregset_t): Change array type size to
7808         PPC_LINUX_SIZEOF_VRREGSET.
7809         (gdb_vsxregset_t): Change array type size to
7810         PPC_LINUX_SIZEOF_VSXREGSET.
7811         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7812         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7813         PPC_LINUX_SIZEOF_VSXREGSET.
7814
7815 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7816
7817         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7818         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7819         nat/ppc-linux.c.
7820         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7821         ppc_linux_target_wordsize with tid.
7822         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7823         wordsize with tid.
7824         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7825         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7826         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7827         tid parameter. Remove static specifier.
7828         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7829         (ppc_linux_target_wordsize): New declaration.
7830
7831 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7832
7833         * arch/ppc-linux-common.c: New file.
7834         * arch/ppc-linux-common.h: New file.
7835         * arch/ppc-linux-tdesc.h: New file.
7836         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7837         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7838         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7839         arch/ppc-linux-tdesc.h.
7840         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7841         arch/ppc-linux-tdesc.h.
7842         (ppc_linux_nat_target::read_description): Remove target
7843         description matching code. Fill a ppc_linux_features struct and
7844         call ppc_linux_match_description with it. Move comment about ISA
7845         2.05 to ppc-linux-common.c.
7846         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7847         arch/ppc-linux-tdesc.h.
7848         (ppc_linux_core_read_description): Remove target description
7849         matching code. Fill a ppc_linux_features struct and call
7850         ppc_linux_match_description with it.
7851         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7852         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7853         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7854         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7855         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7856         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7857         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7858         (tdesc_powerpc_e500l): Remove.
7859
7860 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7861
7862         * ada-lang.c (catch_assert_command): Pass empty string instead
7863         of NULL for excep_string argument.
7864
7865 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7866
7867         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7868         the width of the requested register exceeds the width of the
7869         `ptrace' data type.
7870
7871 2018-05-21  Tom Tromey  <tom@tromey.com>
7872
7873         * printcmd.c (output_command): Remove.
7874         (output_command_const): Rename to output_command.
7875         * valprint.h (output_command): Rename from output_command_const.
7876         * tracepoint.c (trace_dump_actions): Call output_command.
7877
7878 2018-05-21  Tom Tromey  <tom@tromey.com>
7879
7880         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7881         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7882         * ada-lang.h (create_ada_exception_catchpoint): Update.
7883         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7884         std::string.
7885         (create_excep_cond_exprs, ~ada_catchpoint)
7886         (should_stop_exception, print_one_exception)
7887         (print_mention_exception, print_recreate_exception): Update.
7888         (ada_get_next_arg): Remove.
7889         (catch_ada_exception_command_split): Use std::string.  Change type
7890         of "excep_string", "cond_string".
7891         (catch_ada_exception_command): Update.
7892         (create_ada_exception_catchpoint): Change type of excep_string.
7893         (ada_exception_sal): Remove excep_string parameter.
7894         (~ada_catchpoint): Remove.
7895
7896 2018-05-21  Tom Tromey  <tom@tromey.com>
7897
7898         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7899         cleanup.
7900
7901 2018-05-21  Tom Tromey  <tom@tromey.com>
7902
7903         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7904         Return unique_xmalloc_ptr.
7905         (print_it_exception): Update.
7906
7907 2018-05-21  Tom Tromey  <tom@tromey.com>
7908
7909         * tracepoint.c (trace_dump_actions): Use std::string.
7910
7911 2018-05-21  Tom Tromey  <tom@tromey.com>
7912
7913         * symfile.c (reread_symbols): Use std::string for original_name.
7914
7915 2018-05-21  Tom Tromey  <tom@tromey.com>
7916
7917         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7918         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7919         constructor.
7920
7921 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7922
7923         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7924         instance to...
7925         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7926         * objfiles.c (get_objfile_bfd_data): Allocate
7927         objfile_per_bfd_storage with obstack_new when allocating on
7928         obstack.
7929
7930 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7931
7932         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7933         OBSTACK_ZALLOC.
7934         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7935         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7936         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7937         (add_pending): Likewise.
7938         (parse_symbol): Likewise.
7939         (parse_partial_symbols): Likewise.
7940         (psymtab_to_symtab_1): Likewise.
7941         (new_psymtab): Likewise.
7942         (elfmdebug_build_psymtabs): Likewise.
7943         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7944         * objfiles.c (get_objfile_bfd_data): Likewise.
7945         (objfile_register_static_link): Likewise.
7946         * psymtab.c (allocate_psymtab): Likewise.
7947         * stabsread.c (read_member_functions): Likewise.
7948         * xcoffread.c (xcoff_end_psymtab): Likewise.
7949
7950 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7951
7952         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7953         compiler supports std::is_trivially_constructible.
7954         * common/poison.h: Include obstack.h.
7955         (IsMallocable): Define to is_trivially_constructible if the
7956         compiler supports it, define to true_type otherwise.
7957         (xobnew): New.
7958         (XOBNEW): Redefine.
7959         (xobnewvec): New.
7960         (XOBNEWVEC): Redefine.
7961         * gdb_obstack.h (obstack_zalloc): New.
7962         (OBSTACK_ZALLOC): Redefine.
7963         (obstack_calloc): New.
7964         (OBSTACK_CALLOC): Redefine.
7965         (obstack_new): New.
7966         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7967         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7968         gdbarch.c.
7969         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7970         obstack_calloc/obstack_zalloc.
7971         (gdbarch_obstack_zalloc): Remove.
7972         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7973
7974 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7975
7976         * stack.c (backtrace_command_1): Remove useless variable int i.
7977
7978 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7979
7980         * stack.c (print_frame_info): Fix comment.
7981
7982 2018-05-18  Tom Tromey  <tom@tromey.com>
7983
7984         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7985         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7986         (~dwarf2_per_objfile): Update
7987         (dwarf2_get_dwz_file): Use new.
7988         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7989         unique_ptr.
7990
7991 2018-05-18  Tom Tromey  <tom@tromey.com>
7992
7993         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7994         unique_ptr.
7995         * dwarf2read.c (struct dwp_file): Add constructor and
7996         initializers.
7997         (open_and_init_dwp_file): Return a unique_ptr.
7998         (dwarf2_per_objfile, create_dwp_hash_table)
7999         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8000         (lookup_dwo_unit_in_dwp): Update.
8001         (open_and_init_dwp_file, get_dwp_file): Update.
8002
8003 2018-05-18  Tom Tromey  <tom@tromey.com>
8004
8005         * dwarf2read.c (dwarf2_per_objfile): Update.
8006         (struct mapped_index): Add initializers.
8007         (dwarf2_read_index): Use new.
8008         (dw2_symtab_iter_init): Update.
8009         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8010         unique_ptr.
8011
8012 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8013
8014         * dwarf2read.c (mapped_index) <total_size>: Remove.
8015
8016 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8017
8018         * unittests/format_pieces-selftests.c (test_format_specifier):
8019         Add ARI comments.
8020
8021 2018-05-18  Tom Tromey  <tom@tromey.com>
8022
8023         * c-typeprint.c (maybe_print_hole): New function.
8024         (c_print_type_struct_field_offset): Update.
8025         (c_type_print_base_struct_union): Call maybe_print_hole.
8026
8027 2018-05-17  Keith Seitz  <keiths@redhat.com>
8028
8029         * breakpoint.c (build_bpstat_chain): New function, moved from
8030         bpstat_stop_status.
8031         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8032         If no stop chain is passed, call build_bpstat_chain to build it.
8033         * breakpoint.h (build_bpstat_chain): Declare.
8034         (bpstat_stop_status): Move documentation here from breakpoint.c.
8035         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8036         build the stop chain and pass it to skip_inline_frames.
8037         Pass this stop chain to bpstat_stop_status.
8038         * inline-frame.c: Include breakpoint.h.
8039         (stopped_by_user_bp_inline_frame): New function.
8040         (skip_inline_frames): Add parameter `stop_chain'.
8041         Move documention to inline-frame.h.
8042         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8043         whether the frame should be elided.
8044         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8045         Add moved documentation and update for new parameter.
8046
8047 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8048
8049         PR cli/14975
8050         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8051         unittests/format_pieces-selftests.c.
8052         * common/format.h (format_piece) <operator==>: New.
8053         (format_pieces) <operator[]>: Remove.
8054         * common/format.c (format_pieces::format_pieces): Handle \e.
8055         * unittests/format_pieces-selftests.c: New.
8056
8057 2018-05-17  Tom Tromey  <tom@tromey.com>
8058
8059         PR symtab/23010:
8060         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8061         (dw2_instantiate_symtab): Add skip_partial parameter.
8062         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8063         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8064         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8065         (dw2_expand_symtabs_matching_one)
8066         (dw2_find_pc_sect_compunit_symtab)
8067         (dw2_debug_names_lookup_symbol)
8068         (dw2_debug_names_expand_symtabs_for_function): Update.
8069         (init_cutu_and_read_dies): Add skip_partial parameter.
8070         (process_psymtab_comp_unit, build_type_psymtabs_1)
8071         (process_skeletonless_type_unit, load_partial_comp_unit)
8072         (psymtab_to_symtab_1): Update.
8073         (load_full_comp_unit): Add skip_partial parameter.
8074         (process_imported_unit_die, dwarf2_read_addr_index)
8075         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8076         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8077         (read_signatured_type): Update.
8078
8079 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8080
8081         * value.c (release_value): Remove unused variable.
8082         (record_latest_value): Likewise.
8083         (access_value_history): Likewise.
8084         (preserve_values): Likewise.
8085
8086 2018-05-17  Tom Tromey  <tom@tromey.com>
8087
8088         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8089         Initialize.
8090
8091 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8092
8093         PR gdb/22286
8094         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8095         Also handle registers whose width is not a multiple of
8096         PTRACE_TYPE_RET.
8097         (linux_nat_trad_target::store_register): Likewise.
8098
8099 2018-05-16  Tom Tromey  <tom@tromey.com>
8100
8101         * gdbcore.h (core_bfd): Redefine.
8102         * corelow.c (core_target::close): Update.
8103         (core_target_open): Update.
8104         * progspace.h (struct program_space) <cbfd>: Now a
8105         gdb_bfd_ref_ptr.
8106
8107 2018-05-16  Tom Tromey  <tom@tromey.com>
8108
8109         PR cli/19551:
8110         * symfile-add-flags.h (enum symfile_add_flags)
8111         <SYMFILE_NOT_FILENAME>: New constant.
8112         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8113         objfile name from BFD.
8114         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8115         * minidebug.c (find_separate_debug_file_in_section): Put
8116         ".gnu_debugdata" into BFD's file name.
8117
8118 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8119
8120         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8121         Remove.
8122
8123 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8124
8125         PR binutils/21446
8126         * aarch64-tdep.c (aarch64_analyze_prologue,
8127         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8128         Indicate not interested in errors.
8129
8130 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8131
8132         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8133         Supply the MIPS_ZERO_REGNUM register.
8134
8135 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8136
8137         * mips-tdep.c (mask_address_var): Make variable static.
8138
8139 2018-05-14  Tom Tromey  <tom@tromey.com>
8140
8141         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8142
8143 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8144
8145         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8146         FXSAVE_ADDR for the mxcsr register.
8147
8148 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8149
8150         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8151
8152 2018-05-11  Pedro Alves  <palves@redhat.com>
8153
8154         * corelow.c (core_target) <core_target>: No longer inline.
8155         Initialize m_core_gdbarch, m_core_vec and build the section table
8156         here.
8157         <~core_target>: New.
8158         <core_gdbarch, get_core_register_section>: New methods.
8159         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8160         factored out from ...
8161         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8162         (core_ops): Delete.
8163         (sniff_core_bfd): Add gdbarch parameter.
8164         (core_close): Delete, merged into ...
8165         (core_target::close): ... here.  Delete self.
8166         (core_close_cleanup): Delete.
8167         (core_target_open): Allocate a core_target on the heap.  Use a
8168         unique_ptr instead of a cleanup.  Bits moved into the core_target
8169         ctor.  Adjust to use core_target methods instead of globals.
8170         (get_core_register_section): Rename to ...
8171         (core_target::get_core_register_section): ... this and adjust.
8172         (struct get_core_registers_cb_data): New.
8173         (get_core_registers_cb): Use it.  Use bool.
8174         (core_target::fetch_registers, core_target::files_info)
8175         (core_target::xfer_partial, core_target::read_description)
8176         (core_target::pid_to, core_target::thread_name): Adjust to
8177         reference class fields instead of globals.
8178         * target.h (struct target_ops_deleter, target_ops_up): New.
8179
8180 2018-05-11  Pedro Alves  <palves@redhat.com>
8181
8182         * corefile.c (core_file_command): Move to corelow.c.
8183         * corelow.c (the_core_target): Delete.
8184         (core_file_command): Moved from corefile.c.  Check exec_bfd
8185         instead of the_core_target.  Use target_detach instead of calling
8186         into the_core_target directly.
8187         (maybe_say_no_core_file_now): New.
8188         (core_target::detach): Use it.
8189         (_initialize_corelow): Remove references to the_core_target.
8190         * gdbcore.h (the_core_target): Delete.
8191
8192 2018-05-11  Tom Tromey  <tromey@redhat.com>
8193             Pedro Alves  <palves@redhat.com>
8194
8195         * corefile.c (core_bfd): Remove.
8196         * gdbcore.h (core_bfd): Now a macro.
8197         * progspace.h (struct program_space) <cbfd>: New field.
8198
8199 2018-05-11  Tom Tromey  <tom@tromey.com>
8200
8201         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8202         gdb::def_vector.
8203
8204 2018-05-10  Tom Tromey  <tom@tromey.com>
8205
8206         * configure: Rebuild.
8207         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8208
8209 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8210
8211         PR server/23158:
8212         * regformats/regdat.sh: Adjust script, following the addition
8213         of the new expedite_regs parameter to init_target_desc.
8214
8215 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8216     
8217         PR gdb/23127
8218         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8219         set_gdbarch_significant_addr_bit.
8220         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8221         set_gdbarch_significant_addr_bit.
8222         * utils.c (address_significant): Update to sign extend addr.
8223
8224 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8225
8226         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8227         (xtensa_linux_init_abi): Limit tdep->num_regs by
8228         tdep->num_nopriv_regs.
8229         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8230         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8231         not initialized.
8232
8233 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8234
8235         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8236
8237 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8238
8239         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8240         (I387_MXCSR_INIT_VAL): New constant.
8241         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8242         buffer if it was supplied by the inferior.
8243         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8244         (i387_xsave_get_clear_bv): New function.
8245         (i387_supply_xsave): Only read x87 control registers from the
8246         xsave buffer if the feature is enabled, and the state will have
8247         been written, otherwise, provide a suitable default.
8248         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8249         including x87 control registers.  Update control registers if they
8250         have changed from the default value, and mark features as enabled
8251         as required.
8252         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8253
8254 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8255
8256         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8257
8258 2018-05-07  Tom Tromey  <tom@tromey.com>
8259
8260         * configure: Rebuild.
8261         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8262
8263 2018-05-07  Tom Tromey  <tom@tromey.com>
8264
8265         PR tdep/20362:
8266         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8267         bit.  Use correct value for VDIV.
8268
8269 2018-05-04  Tom Tromey  <tom@tromey.com>
8270
8271         * configure: Rebuild.
8272         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8273
8274 2018-05-04  Tom Tromey  <tom@tromey.com>
8275
8276         * linux-record.c (record_linux_system_call) <case
8277         RECORD_SYS_RECVFROM>: Add "break".
8278
8279 2018-05-04  Tom Tromey  <tom@tromey.com>
8280
8281         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8282         Add missing "break".
8283         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8284         Add missing "break".
8285
8286 2018-05-04  Tom Tromey  <tom@tromey.com>
8287
8288         * rs6000-tdep.c (ppc_process_record_op4)
8289         (ppc_process_record_op63): Add fall-through comment.
8290
8291 2018-05-04  Tom Tromey  <tom@tromey.com>
8292
8293         * i386-tdep.c (i386_process_record): Add fall-through comment.
8294
8295 2018-05-04  Tom Tromey  <tom@tromey.com>
8296
8297         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8298         comment.
8299
8300 2018-05-04  Tom Tromey  <tom@tromey.com>
8301
8302         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8303         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8304         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8305         comment.
8306         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8307         comment.
8308         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8309         comment.
8310
8311 2018-05-04  Tom Tromey  <tom@tromey.com>
8312
8313         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8314
8315 2018-05-04  Tom Tromey  <tom@tromey.com>
8316
8317         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8318         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8319         * symfile.c (section_is_mapped): Fix fall-through comment.
8320         * stabsread.c (define_symbol, read_member_functions): Fix
8321         fall-through comment.
8322         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8323         comment.
8324         * remote.c (remote_wait_as): Fix fall-through comment.
8325         * p-exp.y (yylex): Fix fall-through comment.
8326         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8327         comment.
8328         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8329         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8330         * jv-exp.y (yylex): Fix fall-through comment.
8331         * go-exp.y (lex_one_token): Fix fall-through comment.
8332         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8333         fall-through comment.
8334         * f-exp.y (yylex): Fix fall-through comment.
8335         * dwarf2read.c (process_die): Fix fall-through comments.
8336         * dbxread.c (process_one_symbol): Fix fall-through comment.
8337         * d-exp.y (lex_one_token): Fix fall-through comment.
8338         * cp-name-parser.y (yylex): Fix fall-through comment.
8339         * coffread.c (coff_symtab_read): Fix fall-through comment.
8340         * c-exp.y (lex_one_token): Fix fall-through comment.
8341         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8342         comment.
8343         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8344         comment.
8345
8346 2018-05-04  Tom Tromey  <tom@tromey.com>
8347
8348         PR python/22730:
8349         * NEWS: Mention gdb.execute change.
8350         * gdbcmd.h (execute_control_command): Don't declare.
8351         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8352         execute_control_commands, execute_control_commands_to_string.
8353         * cli/cli-script.h (execute_control_commands)
8354         (execute_control_commands_to_string): Declare.
8355         (execute_control_command): Add from_tty parameter.
8356         * cli/cli-script.c (execute_control_commands)
8357         (execute_control_commands_to_string): New functions.
8358         (execute_user_command): Use execute_control_commands.
8359         (execute_control_command_1): Add "from_tty" parameter.  Update.
8360         (execute_control_command): Likewise.
8361
8362 2018-05-04  Tom Tromey  <tom@tromey.com>
8363
8364         PR python/22731:
8365         * NEWS: Mention that breakpoint commands are writable.
8366         * python/py-breakpoint.c (bppy_set_commands): New function.
8367         (breakpoint_object_getset) <"commands">: Use it.
8368
8369 2018-05-04  Tom Tromey  <tom@tromey.com>
8370
8371         * tracepoint.c (actions_command): Update.
8372         * mi/mi-cmd-break.c (mi_command_line_array)
8373         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8374         (mi_read_next_line): Remove.
8375         (mi_cmd_break_commands): Update.
8376         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8377         function_view.
8378         * cli/cli-script.c (get_command_line): Update.
8379         (process_next_line): Use function_view.  Constify.
8380         (recurse_read_control_structure, read_command_lines)
8381         (read_command_lines_1): Change argument types to function_view.
8382         (do_define_command, document_command): Update.
8383         * breakpoint.h (check_tracepoint_command): Don't declare.
8384         * breakpoint.c (check_tracepoint_command): Remove.
8385         (commands_command_1, create_tracepoint_from_upload): Update.
8386
8387 2018-05-04  Tom Tromey  <tom@tromey.com>
8388
8389         PR gdb/11750:
8390         * cli/cli-script.h (enum command_control_type) <define_control>:
8391         New constant.
8392         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8393         (build_command_line, execute_control_command_1)
8394         (process_next_line): Likewise.
8395         (do_define_command): New function, extracted from define_command.
8396         (define_command): Use it.
8397
8398 2018-05-04  Tom Tromey  <tom@tromey.com>
8399
8400         * tracepoint.c (actions_command): Update.
8401         * cli/cli-script.h (read_command_lines): Update.
8402         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8403         (MAX_TMPBUF): Remove define.
8404         (define_command): Use string_printf.
8405         (document_command): Likewise.
8406         * breakpoint.c (commands_command_1): Update.
8407
8408 2018-05-04  Tom Tromey  <tom@tromey.com>
8409
8410         * top.c (execute_command): Update.
8411         * cli/cli-script.h (print_command_lines): Now varargs.
8412         * cli/cli-script.c (print_command_lines): Now varargs.
8413         (execute_control_command_1) <case while_control, case if_control>:
8414         Update.
8415
8416 2018-05-04  Tom Tromey  <tom@tromey.com>
8417
8418         * tracepoint.c (all_tracepoint_actions): Rename from
8419         all_tracepoint_actions_and_cleanup.  Change return type.
8420         (actions_command, encode_actions_1, encode_actions)
8421         (trace_dump_actions, tdump_command): Update.
8422         * remote.c (remote_download_command_source): Update.
8423         * python/python.c (gdbpy_eval_from_control_command)
8424         (python_command, python_interactive_command): Update.
8425         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8426         * guile/guile.c (guile_command)
8427         (gdbscm_eval_from_control_command, guile_command): Update.
8428         * compile/compile.c (compile_code_command)
8429         (compile_print_command, compile_to_object): Update.
8430         * cli/cli-script.h (struct command_lines_deleter): New.
8431         (counted_command_line): New typedef.
8432         (struct command_line): Add constructor, destructor.
8433         <body_list>: Remove.
8434         <body_list_0, body_list_1>: New members.
8435         (command_line_up): Remove typedef.
8436         (read_command_lines, read_command_lines_1, get_command_line):
8437         Update.
8438         (copy_command_lines): Don't declare.
8439         * cli/cli-script.c (build_command_line): Use "new".
8440         (get_command_line): Return counted_command_line.
8441         (print_command_lines, execute_user_command)
8442         (execute_control_command_1, while_command, if_command): Update.
8443         (realloc_body_list): Remove.
8444         (process_next_line, recurse_read_control_structure): Update.
8445         (read_command_lines, read_command_lines_1): Return counted_command_line.
8446         (free_command_lines): Use "delete".
8447         (copy_command_lines): Remove.
8448         (define_command, document_command, show_user_1): Update.
8449         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8450         a counted_command_line.
8451         * breakpoint.h (counted_command_line): Remove typedef.
8452         (breakpoint_set_commands): Update.
8453         * breakpoint.c (check_no_tracepoint_commands)
8454         (validate_commands_for_breakpoint): Update.
8455         (breakpoint_set_commands): Change commands to be a
8456         counted_command_line.
8457         (commands_command_1, update_dprintf_command_list)
8458         (create_tracepoint_from_upload): Update.
8459
8460 2018-05-04  Tom Tromey  <tom@tromey.com>
8461
8462         * cli/cli-decode.h (cmd_list_element): New constructor.
8463         (~cmd_list_element): New destructor.
8464         (struct cmd_list_element): Add initializers.
8465         * cli/cli-decode.c (do_add_cmd): Use "new".
8466         (delete_cmd): Use "delete".
8467
8468 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8469             Pedro Alves <palves@redhat.com>
8470
8471         PR breakpoints/19806 and support for PR external/20207.
8472         * NEWS: Mention Aarch64 watchpoint improvements.
8473         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8474         watchpoints and PR external/20207 watchpoints.
8475         * nat/aarch64-linux-hw-point.c
8476         (kernel_supports_any_contiguous_range): New.
8477         (aarch64_watchpoint_offset): New.
8478         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8479         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8480         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8481         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8482         next_addr_orig_p.  Support PR external/20207 watchpoints.
8483         (aarch64_downgrade_regs): New.
8484         (aarch64_dr_state_insert_one_point): New parameters offset and
8485         addr_orig.
8486         (aarch64_dr_state_remove_one_point): Likewise.
8487         (aarch64_handle_breakpoint): Update caller.
8488         (aarch64_handle_aligned_watchpoint): Likewise.
8489         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8490         aligned_offset.
8491         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8492         aarch64_downgrade_regs.
8493         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8494         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8495         (DR_CONTROL_MASK): ... this.
8496         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8497         (unsigned int aarch64_watchpoint_offset): New prototype.
8498         (aarch64_linux_set_debug_regs): Remove const from state.
8499         * utils.c (align_up, align_down): Move to ...
8500         * common/common-utils.c (align_up, align_down): ... here.
8501         * utils.h (align_up, align_down): Move to ...
8502         * common/common-utils.h (align_up, align_down): ... here.
8503
8504 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8505
8506         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8507         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8508         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8509         Re-implement to match the ABI as summarized in GCC's
8510         gcc/config/sparc/sparc.c.  All callers updated.
8511         (sparc32_store_arguments): Remove assertion.
8512
8513 2018-05-04  Tom Tromey  <tom@tromey.com>
8514
8515         * printcmd.c: Don't include tui.h.
8516         (decode_format): Use skip_spaces.
8517
8518 2018-05-04  Tom Tromey  <tom@tromey.com>
8519
8520         PR gdb/22619:
8521         * printcmd.c (last_count): New global.
8522         (x_command): Use saved count when repeating.
8523
8524 2018-05-04  Tom Tromey  <tom@tromey.com>
8525
8526         * nto-procfs.c (do_closedir_cleanup): Remove.
8527         (procfs_pidlist): Use gdb_dir_up.
8528         * procfs.c (do_closedir_cleanup): Remove.
8529         (proc_update_threads): Use gdb_dir_up.
8530         * common/filestuff.h (struct gdb_dir_deleter): New.
8531         (gdb_dir_up): New typedef.
8532
8533 2018-05-04  Tom Tromey  <tom@tromey.com>
8534
8535         * ada-lang.c (print_mention_exception): Use std::string.
8536
8537 2018-05-04  Tom Tromey  <tom@tromey.com>
8538
8539         * ada-lang.c (create_excep_cond_exprs): Update.
8540         (ada_exception_catchpoint_cond_string): Use std::string.
8541
8542 2018-05-04  Tom Tromey  <tom@tromey.com>
8543
8544         * ada-lang.c (xget_renaming_scope): Return std::string.
8545         (old_renaming_is_invisible): Update.
8546
8547 2018-05-04  Tom Tromey  <tom@tromey.com>
8548
8549         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8550         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8551
8552 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8553
8554         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8555
8556 2018-05-04  Tom Tromey  <tom@tromey.com>
8557
8558         * remote.c (remote_query_supported_append): Change type.
8559         (remote_check_symbols): Update.
8560
8561 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8562
8563         PR gdb/11420
8564         * configure.ac: Prepend libpython.
8565         * python/python-config.py: Likewise.
8566         * configure: Regenerate.
8567
8568 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8569
8570         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8571
8572 2018-05-03  Pedro Alves  <palves@redhat.com>
8573
8574         * s390-linux-nat.c
8575         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8576         override.  Write 'true' instead of '1'.
8577         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8578         declaration.
8579
8580 2018-05-02  Pedro Alves  <palves@redhat.com>
8581
8582         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8583         add_inf_child_target.
8584         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8585         add_inf_child_target.
8586         * aix-thread.c (aix_thread_target_info): New.
8587         (aix_thread_target) <shortname, longname, doc>: Delete.
8588         <info>: New.
8589         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8590         add_inf_child_target.
8591         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8592         add_inf_child_target.
8593         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8594         add_inf_child_target.
8595         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8596         add_inf_child_target.
8597         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8598         add_inf_child_target.
8599         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8600         add_inf_child_target.
8601         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8602         add_inf_child_target.
8603         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8604         add_inf_child_target.
8605         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8606         add_inf_child_target.
8607         * bfd-target.c (target_bfd_target_info): New.
8608         (target_bfd) <shortname, longname, doc>: Delete.
8609         <info>: New.
8610         * bsd-kvm.c (bsd_kvm_target_info): New.
8611         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8612         <info>: New.
8613         (bsd_kvm_target::open): Rename to ...
8614         (bsd_kvm_target_open): ... this.  Adjust.
8615         * bsd-uthread.c (bsd_uthread_target_info): New.
8616         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8617         <info>: New.
8618         * corefile.c (core_file_command): Adjust.
8619         * corelow.c (core_target_info): New.
8620         (core_target) <shortname, longname, doc>: Delete.
8621         <info>: New.
8622         (core_target::open): Rename to ...
8623         (core_target_open): ... this.  Adjust.
8624         * ctf.c (ctf_target_info): New.
8625         (ctf_target) <shortname, longname, doc>: Delete.
8626         <info>: New.
8627         (ctf_target::open): Rename to ...
8628         (ctf_target_open): ... this.
8629         (_initialize_ctf): Adjust.
8630         * exec.c (exec_target_info): New.
8631         (exec_target) <shortname, longname, doc>: Delete.
8632         <info>: New.
8633         (exec_target::open): Rename to ...
8634         (exec_target_open): ... this.
8635         * gdbcore.h (core_target_open): Declare.
8636         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8637         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8638         add_inf_child_target.
8639         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8640         add_inf_child_target.
8641         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8642         add_inf_child_target.
8643         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8644         add_inf_child_target.
8645         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8646         add_inf_child_target.
8647         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8648         add_inf_child_target.
8649         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8650         add_inf_child_target.
8651         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8652         add_inf_child_target.
8653         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8654         add_inf_child_target.
8655         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8656         add_inf_child_target.
8657         * inf-child.c (inf_child_target_info): New.
8658         (inf_child_target::info): New.
8659         (inf_child_open_target): Remove 'target' parameter.  Use
8660         get_native_target instead.
8661         (inf_child_target::open): Delete.
8662         (add_inf_child_target): New.
8663         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8664         Delete.
8665         <info>: New.
8666         (add_inf_child_target): Declare.
8667         (inf_child_open_target): Declare.
8668         * linux-thread-db.c (thread_db_target_info): New.
8669         (thread_db_target) <shortname, longname, doc>: Delete.
8670         <info>: New.
8671         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8672         add_inf_child_target.
8673         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8674         add_inf_child_target.
8675         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8676         add_inf_child_target.
8677         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8678         add_inf_child_target.
8679         * make-target-delegates (print_class): Adjust.
8680         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8681         add_inf_child_target.
8682         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8683         add_inf_child_target.
8684         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8685         add_inf_child_target.
8686         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8687         add_inf_child_target.
8688         * nto-procfs.c (nto_native_target_info): New.
8689         (nto_procfs_target_native) <shortname, longname, doc>:
8690         Delete.
8691         <info>: New.
8692         (nto_procfs_target_info): New.
8693         (nto_procfs_target_procfs) <shortname, longname, doc>:
8694         Delete.
8695         <info>: New.
8696         (init_procfs_targets): Adjust.
8697         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8698         add_inf_child_target.
8699         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8700         add_inf_child_target.
8701         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8702         add_inf_child_target.
8703         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8704         add_inf_child_target.
8705         * ravenscar-thread.c (ravenscar_target_info): New.
8706         (ravenscar_thread_target) <shortname, longname, doc>:
8707         Delete.
8708         <info>: New.
8709         * record-btrace.c (record_btrace_target_info):
8710         (record_btrace_target) <shortname, longname, doc>: Delete.
8711         <info>: New.
8712         (record_btrace_target::open): Rename to ...
8713         (record_btrace_target_open): ... this.  Adjust.
8714         * record-full.c (record_longname, record_doc): New.
8715         (record_full_base_target) <shortname, longname, doc>: Delete.
8716         <info>: New.
8717         (record_full_target_info): New.
8718         (record_full_target): <shortname>: Delete.
8719         <info>: New.
8720         (record_full_core_open_1, record_full_open_1): Update comments.
8721         (record_full_base_target::open): Rename to ...
8722         (record_full_open): ... this.
8723         (cmd_record_full_restore): Update.
8724         (_initialize_record_full): Update.
8725         * remote-sim.c (remote_sim_target_info): New.
8726         (gdbsim_target) <shortname, longname, doc>: Delete.
8727         <info>: New.
8728         (gdbsim_target::open): Rename to ...
8729         (gdbsim_target_open): ... this.
8730         (_initialize_remote_sim): Adjust.
8731         * remote.c (remote_doc): New.
8732         (remote_target_info): New.
8733         (remote_target) <shortname, longname, doc>: Delete.
8734         <info>: New.
8735         (extended_remote_target_info): New.
8736         (extended_remote_target) <shortname, longname, doc>: Delete.
8737         <info>: New.
8738         (remote_target::open_1): Make static.  Adjust.
8739         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8740         * s390-linux-nat.c (_initialize_s390_nat): Use
8741         add_inf_child_target.
8742         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8743         add_inf_child_target.
8744         * sol-thread.c (thread_db_target_info): New.
8745         (sol_thread_target) <shortname, longname, doc>: Delete.
8746         <info>: New.
8747         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8748         add_inf_child_target.
8749         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8750         add_inf_child_target.
8751         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8752         add_inf_child_target.
8753         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8754         add_inf_child_target.
8755         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8756         add_inf_child_target.
8757         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8758         add_inf_child_target.
8759         * spu-linux-nat.c (_initialize_spu_nat): Use
8760         add_inf_child_target.
8761         * spu-multiarch.c (spu_multiarch_target_info): New.
8762         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8763         <info>: New.
8764         * target-delegates.c: Regenerate.
8765         * target.c: Include <unordered_map>.
8766         (target_ops_p): Delete.
8767         (DEF_VEC_P(target_ops_p)): Delete.
8768         (target_factories): New.
8769         (test_target_info): New.
8770         (test_target_ops::info): New.
8771         (open_target): Adjust to use target_factories.
8772         (add_target_with_completer): Rename to ...
8773         (add_target): ... this.  Change prototype.  Register target_info
8774         and open callback in target_factories.  Register target_info in
8775         command context instead of target_ops.
8776         (add_target): Delete old implementation.
8777         (add_deprecated_target_alias): Change prototype.  Adjust.
8778         (the_native_target): New.
8779         (set_native_target, get_native_target): New.
8780         (find_default_run_target): Use the_native_target.
8781         (find_attach_target, find_run_target): Simplify.
8782         (target_ops::open): Delete.
8783         (dummy_target_info): New.
8784         (dummy_target::shortname, dummy_target::longname)
8785         (dummy_target::doc): Delete.
8786         (dummy_target::info): New.
8787         (debug_target::shortname, debug_target::longname)
8788         (debug_target::doc): Delete.
8789         (debug_target::info): New.
8790         * target.h (struct target_info): New.
8791         (target_ops::~target_ops): Add comment.
8792         (target_ops::info): New.
8793         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8794         longer virtual.  Implement in terms of target_info.
8795         (set_native_target, get_native_target): Declare.
8796         (target_open_ftype): New.
8797         (add_target, add_target_with_completer)
8798         (add_deprecated_target_alias): Change prototype.
8799         (test_target) <shortname, longname, doc>: Delete.
8800         <info>: New.
8801         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8802         add_inf_child_target.
8803         * tracefile-tfile.c (tfile_target_info): New.
8804         (tfile_target) <shortname, longname, doc>: Delete.
8805         <info>: New.
8806         (tfile_target::open): Rename to ...
8807         (tfile_target_open): ... this.
8808         (_initialize_tracefile_tfile): Adjust.
8809         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8810         add_inf_child_target.
8811         * windows-nat.c (_initialize_windows_nat): Use
8812         add_inf_child_target.
8813         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8814         add_inf_child_target.
8815
8816 2018-05-02  Pedro Alves  <palves@redhat.com>
8817
8818         * linux-nat.h (linux_nat_target) <low_new_thread,
8819         low_delete_thread, low_new_fork, low_forget_process,
8820         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8821         New virtual methods.
8822         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8823         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8824         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8825         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8826         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8827         Delete.
8828         * linux-fork.c (delete_fork): Adjust to call low method.
8829         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8830         (linux_nat_new_fork, linux_nat_forget_process_hook)
8831         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8832         (linux_nat_status_is_event):
8833         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8834         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8835         to call low method.
8836         (sigtrap_is_event): Rename to ...
8837         (linux_nat_target::low_status_is_event): ... this.
8838         (linux_nat_set_status_is_event): Delete.
8839         (save_stop_reason, linux_nat_wait_1)
8840         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8841         low methods.
8842         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8843         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8844         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8845         (linux_nat_set_prepare_to_resume): Delete.
8846         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8847         low virtual methods.
8848         * amd64-linux-nat.c: Likewise.
8849         * arm-linux-nat.c: Likewise.
8850         * i386-linux-nat.c: Likewise.
8851         * ia64-linux-nat.c: Likewise.
8852         * mips-linux-nat.c: Likewise.
8853         * ppc-linux-nat.c: Likewise.
8854         * s390-linux-nat.c: Likewise.
8855         * sparc64-linux-nat.c: Likewise.
8856         * x86-linux-nat.c: Likewise.
8857         * x86-linux-nat.h: Include "nat/x86-linux.h".
8858         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8859         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8860         Override methods.
8861
8862 2018-05-02  Pedro Alves  <palves@redhat.com>
8863
8864         * target.h (target_ops)
8865         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8866         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8867         stopped_by_watchpoint, have_continuable_watchpoint,
8868         stopped_data_address, watchpoint_addr_within_range,
8869         can_accel_watchpoint_condition, can_run, thread_alive,
8870         has_all_memory, has_memory, has_stack, has_registers,
8871         has_execution, can_async_p, is_async_p, supports_non_stop,
8872         always_non_stop_p, can_execute_reverse, supports_multi_process,
8873         supports_enable_disable_tracepoint,
8874         supports_disable_randomization, supports_string_tracing,
8875         supports_evaluation_of_breakpoint_conditions,
8876         can_run_breakpoint_commands, filesystem_is_local,
8877         can_download_tracepoint, get_trace_state_variable_value,
8878         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8879         record_is_replaying, record_will_replay,
8880         augmented_libraries_svr4_read>: Adjust to return bool.
8881         * aarch64-linux-nat.c: All implementations adjusted.
8882         * aix-thread.c: All implementations adjusted.
8883         * arm-linux-nat.c: All implementations adjusted.
8884         * breakpoint.c: All implementations adjusted.
8885         * bsd-kvm.c: All implementations adjusted.
8886         * bsd-uthread.c: All implementations adjusted.
8887         * corelow.c: All implementations adjusted.
8888         * ctf.c: All implementations adjusted.
8889         * darwin-nat.c: All implementations adjusted.
8890         * darwin-nat.h: All implementations adjusted.
8891         * exec.c: All implementations adjusted.
8892         * fbsd-nat.c: All implementations adjusted.
8893         * fbsd-nat.h: All implementations adjusted.
8894         * gnu-nat.c: All implementations adjusted.
8895         * gnu-nat.h: All implementations adjusted.
8896         * go32-nat.c: All implementations adjusted.
8897         * ia64-linux-nat.c: All implementations adjusted.
8898         * inf-child.c: All implementations adjusted.
8899         * inf-child.h: All implementations adjusted.
8900         * inf-ptrace.c: All implementations adjusted.
8901         * inf-ptrace.h: All implementations adjusted.
8902         * linux-nat.c: All implementations adjusted.
8903         * linux-nat.h: All implementations adjusted.
8904         * mips-linux-nat.c: All implementations adjusted.
8905         * nto-procfs.c: All implementations adjusted.
8906         * ppc-linux-nat.c: All implementations adjusted.
8907         * procfs.c: All implementations adjusted.
8908         * ravenscar-thread.c: All implementations adjusted.
8909         * record-btrace.c: All implementations adjusted.
8910         * record-full.c: All implementations adjusted.
8911         * remote-sim.c: All implementations adjusted.
8912         * remote.c: All implementations adjusted.
8913         * s390-linux-nat.c: All implementations adjusted.
8914         * sol-thread.c: All implementations adjusted.
8915         * spu-multiarch.c: All implementations adjusted.
8916         * target-delegates.c: All implementations adjusted.
8917         * target.c: All implementations adjusted.
8918         * target.h: All implementations adjusted.
8919         * tracefile-tfile.c: All implementations adjusted.
8920         * tracefile.c: All implementations adjusted.
8921         * tracefile.h: All implementations adjusted.
8922         * windows-nat.c: All implementations adjusted.
8923         * x86-linux-nat.h: All implementations adjusted.
8924         * x86-nat.h: All implementations adjusted.
8925
8926 2018-05-02  Pedro Alves  <palves@redhat.com>
8927
8928         * make-target-delegates (scan_target_h): Don't trim lines here.
8929         Replace sequences of tabs and/or whitespace with a single
8930         whitespace.
8931         (top level, parsing methods): Trim each line before processing it
8932         here.
8933
8934 2018-05-02  Pedro Alves  <palves@redhat.com>
8935             John Baldwin  <jhb@freebsd.org>
8936
8937         * target.h (enum strata) <debug_stratum>: New.
8938         (struct target_ops) <all delegation methods>: Replace by C++
8939         virtual methods, and drop "to_" prefix.  All references updated
8940         throughout.
8941         <to_shortname, to_longname, to_doc, to_data,
8942         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8943         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8944         virtual methods.  All references updated throughout.
8945         <can_attach, supports_terminal_ours, can_create_inferior,
8946         get_thread_control_capabilities, attach_no_wait>: New
8947         virtual methods.
8948         <insert_breakpoint, remove_breakpoint>: Now
8949         TARGET_DEFAULT_NORETURN methods.
8950         <info_proc>: Now returns bool.
8951         <to_magic>: Delete.
8952         (OPS_MAGIC): Delete.
8953         (current_target): Delete.  All references replaced by references
8954         to ...
8955         (target_stack): ... this.  New.
8956         (target_shortname, target_longname): Adjust.
8957         (target_can_run): Now a function declaration.
8958         (default_child_has_all_memory, default_child_has_memory)
8959         (default_child_has_stack, default_child_has_registers)
8960         (default_child_has_execution): Remove target_ops parameter.
8961         (complete_target_initialization): Delete.
8962         (memory_breakpoint_target): New template class.
8963         (test_target_ops): Refactor as a C++ class with virtual methods.
8964         * make-target-delegates (NAME_PART): Tighten.
8965         (POINTER_PART, CP_SYMBOL): New.
8966         (SIMPLE_RETURN_PART): Reimplement.
8967         (VEC_RETURN_PART): Expect less.
8968         (RETURN_PART, VIRTUAL_PART): New.
8969         (METHOD): Adjust to C++ virtual methods.
8970         (scan_target_h): Remove reference to C99.
8971         (dname): Output "target_ops::" prefix.
8972         (write_function_header): Adjust to output a C++ class method.
8973         (write_declaration): New.
8974         (write_delegator): Adjust to output a C++ class method.
8975         (tdname): Output "dummy_target::" prefix.
8976         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8977         method.
8978         (tdefault_names, debug_names): Delete.
8979         (return_types, tdefaults, styles, argtypes_array): New.
8980         (top level): All methods are delegators.
8981         (print_class): New.
8982         (top level): Print dummy_target and debug_target classes.
8983         * target-delegates.c: Regenerate.
8984         * target-debug.h (target_debug_print_enum_info_proc_what)
8985         (target_debug_print_thread_control_capabilities)
8986         (target_debug_print_thread_info_p): New.
8987         * target.c (dummy_target): Delete.
8988         (the_dummy_target, the_debug_target): New.
8989         (target_stack): Now extern.
8990         (set_targetdebug): Push/unpush debug target.
8991         (default_child_has_all_memory, default_child_has_memory)
8992         (default_child_has_stack, default_child_has_registers)
8993         (default_child_has_execution): Remove target_ops parameter.
8994         (complete_target_initialization): Delete.
8995         (add_target_with_completer): No longer call
8996         complete_target_initialization.
8997         (target_supports_terminal_ours): Use regular delegation.
8998         (update_current_target): Delete.
8999         (push_target): No longer check magic number.  Don't call
9000         update_current_target.
9001         (unpush_target): Don't call update_current_target.
9002         (target_is_pushed): No longer check magic number.
9003         (target_require_runnable): Skip for all stratums over
9004         process_stratum.
9005         (target_ops::info_proc): New.
9006         (target_info_proc): Use find_target_at and
9007         find_default_run_target.
9008         (target_supports_disable_randomization): Use regular delegation.
9009         (target_get_osdata): Use find_target_at.
9010         (target_ops::open, target_ops::close, target_ops::can_attach)
9011         (target_ops::attach, target_ops::can_create_inferior)
9012         (target_ops::create_inferior, target_ops::can_run)
9013         (target_can_run): New.
9014         (default_fileio_target): Use regular delegation.
9015         (target_ops::fileio_open, target_ops::fileio_pwrite)
9016         (target_ops::fileio_pread, target_ops::fileio_fstat)
9017         (target_ops::fileio_close, target_ops::fileio_unlink)
9018         (target_ops::fileio_readlink): New.
9019         (target_fileio_open_1, target_fileio_unlink)
9020         (target_fileio_readlink): Always call the target method.  Handle
9021         FILEIO_ENOSYS.
9022         (return_zero, return_zero_has_execution): Delete.
9023         (init_dummy_target): Delete.
9024         (dummy_target::dummy_target, dummy_target::shortname)
9025         (dummy_target::longname, dummy_target::doc)
9026         (debug_target::debug_target, debug_target::shortname)
9027         (debug_target::longname, debug_target::doc): New.
9028         (target_supports_delete_record): Use regular delegation.
9029         (setup_target_debug): Delete.
9030         (maintenance_print_target_stack): Skip debug_stratum.
9031         (initialize_targets): Instantiate the_dummy_target and
9032         the_debug_target.
9033         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9034         use target_stack.
9035         (target_auxv_search, fprint_target_auxv): Adjust.
9036         (info_auxv_command): Adjust to use target_stack.
9037         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9038         * exceptions.c (print_flush): Handle a NULL target_stack.
9039         * regcache.c (target_ops_no_register): Refactor as class with
9040         virtual methods.
9041
9042         * exec.c (exec_target): New class.
9043         (exec_ops): Now an exec_target.
9044         (exec_open, exec_close_1, exec_get_section_table)
9045         (exec_xfer_partial, exec_files_info, exec_has_memory)
9046         (exec_make_note_section): Refactor as exec_target methods.
9047         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9048         Delete.
9049         (exec_target::find_memory_regions): New.
9050         (_initialize_exec): Don't call init_exec_ops.
9051         * gdbcore.h (exec_file_clear): Delete.
9052
9053         * corefile.c (core_target): Delete.
9054         (core_file_command): Adjust.
9055         * corelow.c (core_target): New class.
9056         (the_core_target): New.
9057         (core_close): Remove target_ops parameter.
9058         (core_close_cleanup): Adjust.
9059         (core_target::close): New.
9060         (core_open, core_detach, get_core_registers, core_files_info)
9061         (core_xfer_partial, core_thread_alive, core_read_description)
9062         (core_pid_to_str, core_thread_name, core_has_memory)
9063         (core_has_stack, core_has_registers, core_info_proc): Rework as
9064         core_target methods.
9065         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9066         (_initialize_corelow): Initialize the_core_target.
9067         * gdbcore.h (core_target): Delete.
9068         (the_core_target): New.
9069
9070         * ctf.c: (ctf_target): New class.
9071         (ctf_ops): Now a ctf_target.
9072         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9073         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9074         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9075         methods.
9076         (init_ctf_ops): Delete.
9077         (_initialize_ctf): Don't call it.
9078         * tracefile-tfile.c (tfile_target): New class.
9079         (tfile_ops): Now a tfile_target.
9080         (tfile_open, tfile_close, tfile_files_info)
9081         (tfile_get_tracepoint_status, tfile_trace_find)
9082         (tfile_fetch_registers, tfile_xfer_partial)
9083         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9084         Refactor as tfile_target methods.
9085         (tfile_xfer_partial_features): Remove target_ops parameter.
9086         (init_tfile_ops): Delete.
9087         (_initialize_tracefile_tfile): Don't call it.
9088         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9089         (tracefile_has_stack, tracefile_has_registers)
9090         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9091         tracefile_target methods.
9092         (init_tracefile_ops): Delete.
9093         (tracefile_target::tracefile_target): New.
9094         * tracefile.h: Include "target.h".
9095         (tracefile_target): New class.
9096         (init_tracefile_ops): Delete.
9097
9098         * spu-multiarch.c (spu_multiarch_target): New class.
9099         (spu_ops): Now a spu_multiarch_target.
9100         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9101         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9102         (spu_search_memory, spu_mourn_inferior): Refactor as
9103         spu_multiarch_target methods.
9104         (init_spu_ops): Delete.
9105         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9106         complete_target_initialization.
9107
9108         * ravenscar-thread.c (ravenscar_thread_target): New class.
9109         (ravenscar_ops): Now a ravenscar_thread_target.
9110         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9111         (ravenscar_thread_alive, ravenscar_pid_to_str)
9112         (ravenscar_fetch_registers, ravenscar_store_registers)
9113         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9114         (ravenscar_stopped_by_hw_breakpoint)
9115         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9116         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9117         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9118         methods.
9119         (init_ravenscar_thread_ops): Delete.
9120         (_initialize_ravenscar): Remove references to
9121         init_ravenscar_thread_ops and complete_target_initialization.
9122
9123         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9124         (bsd_uthread_target): New class.
9125         (bsd_uthread_ops): Now a bsd_uthread_target.
9126         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9127         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9128         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9129         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9130         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9131         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9132         (bsd_uthread_target): Delete function.
9133         (_initialize_bsd_uthread): Remove reference to
9134         complete_target_initialization.
9135
9136         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9137         (target_bfd): ... this new class.
9138         (target_bfd_xfer_partial, target_bfd_get_section_table)
9139         (target_bfd_close): Refactor as target_bfd methods.
9140         (target_bfd::~target_bfd): New.
9141         (target_bfd_reopen): Adjust.
9142         (target_bfd::close): New.
9143
9144         * record-btrace.c (record_btrace_target): New class.
9145         (record_btrace_ops): Now a record_btrace_target.
9146         (record_btrace_open, record_btrace_stop_recording)
9147         (record_btrace_disconnect, record_btrace_close)
9148         (record_btrace_async, record_btrace_info)
9149         (record_btrace_insn_history, record_btrace_insn_history_range)
9150         (record_btrace_insn_history_from, record_btrace_call_history)
9151         (record_btrace_call_history_range)
9152         (record_btrace_call_history_from, record_btrace_record_method)
9153         (record_btrace_is_replaying, record_btrace_will_replay)
9154         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9155         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9156         (record_btrace_store_registers, record_btrace_prepare_to_store)
9157         (record_btrace_to_get_unwinder)
9158         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9159         (record_btrace_commit_resume, record_btrace_wait)
9160         (record_btrace_stop, record_btrace_can_execute_reverse)
9161         (record_btrace_stopped_by_sw_breakpoint)
9162         (record_btrace_supports_stopped_by_sw_breakpoint)
9163         (record_btrace_stopped_by_hw_breakpoint)
9164         (record_btrace_supports_stopped_by_hw_breakpoint)
9165         (record_btrace_update_thread_list, record_btrace_thread_alive)
9166         (record_btrace_goto_begin, record_btrace_goto_end)
9167         (record_btrace_goto, record_btrace_stop_replaying_all)
9168         (record_btrace_execution_direction)
9169         (record_btrace_prepare_to_generate_core)
9170         (record_btrace_done_generating_core): Refactor as
9171         record_btrace_target methods.
9172         (init_record_btrace_ops): Delete.
9173         (_initialize_record_btrace): Remove reference to
9174         init_record_btrace_ops.
9175         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9176         the execution_direction global.
9177         (record_full_base_target, record_full_target)
9178         (record_full_core_target): New classes.
9179         (record_full_ops): Now a record_full_target.
9180         (record_full_core_ops): Now a record_full_core_target.
9181         (record_full_target::detach, record_full_target::disconnect)
9182         (record_full_core_target::disconnect)
9183         (record_full_target::mourn_inferior, record_full_target::kill):
9184         New.
9185         (record_full_open, record_full_close, record_full_async): Refactor
9186         as methods of the record_full_base_target class.
9187         (record_full_resume, record_full_commit_resume): Refactor
9188         as methods of the record_full_target class.
9189         (record_full_wait, record_full_stopped_by_watchpoint)
9190         (record_full_stopped_data_address)
9191         (record_full_stopped_by_sw_breakpoint)
9192         (record_full_supports_stopped_by_sw_breakpoint)
9193         (record_full_stopped_by_hw_breakpoint)
9194         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9195         methods of the record_full_base_target class.
9196         (record_full_store_registers, record_full_xfer_partial)
9197         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9198         Refactor as methods of the record_full_target class.
9199         (record_full_can_execute_reverse, record_full_get_bookmark)
9200         (record_full_goto_bookmark, record_full_execution_direction)
9201         (record_full_record_method, record_full_info, record_full_delete)
9202         (record_full_is_replaying, record_full_will_replay)
9203         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9204         (record_full_stop_replaying): Refactor as methods of the
9205         record_full_base_target class.
9206         (record_full_core_resume, record_full_core_kill)
9207         (record_full_core_fetch_registers)
9208         (record_full_core_prepare_to_store)
9209         (record_full_core_store_registers, record_full_core_xfer_partial)
9210         (record_full_core_insert_breakpoint)
9211         (record_full_core_remove_breakpoint)
9212         (record_full_core_has_execution): Refactor
9213         as methods of the record_full_core_target class.
9214         (record_full_base_target::supports_delete_record): New.
9215         (init_record_full_ops): Delete.
9216         (init_record_full_core_ops): Delete.
9217         (record_full_save): Refactor as method of the
9218         record_full_base_target class.
9219         (_initialize_record_full): Remove references to
9220         init_record_full_ops and init_record_full_core_ops.
9221
9222         * remote.c (remote_target, extended_remote_target): New classes.
9223         (remote_ops): Now a remote_target.
9224         (extended_remote_ops): Now an extended_remote_target.
9225         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9226         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9227         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9228         (remote_pass_signals, remote_set_syscall_catchpoint)
9229         (remote_program_signals, )
9230         (remote_thread_always_alive): Remove target_ops parameter.
9231         (remote_thread_alive, remote_thread_name)
9232         (remote_update_thread_list, remote_threads_extra_info)
9233         (remote_static_tracepoint_marker_at)
9234         (remote_static_tracepoint_markers_by_strid)
9235         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9236         (remote_open): Refactor as methods of remote_target.
9237         (extended_remote_open, extended_remote_detach)
9238         (extended_remote_attach, extended_remote_post_attach):
9239         (extended_remote_supports_disable_randomization)
9240         (extended_remote_create_inferior): : Refactor as method of
9241         extended_remote_target.
9242         (remote_set_permissions, remote_open_1, remote_detach)
9243         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9244         (remote_resume, remote_commit_resume, remote_stop)
9245         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9246         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9247         (remote_prepare_to_store, remote_store_registers)
9248         (remote_flash_erase, remote_flash_done, remote_files_info)
9249         (remote_kill, remote_mourn, remote_insert_breakpoint)
9250         (remote_remove_breakpoint, remote_insert_watchpoint)
9251         (remote_watchpoint_addr_within_range)
9252         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9253         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9254         (remote_supports_stopped_by_sw_breakpoint)
9255         (remote_stopped_by_hw_breakpoint)
9256         (remote_supports_stopped_by_hw_breakpoint)
9257         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9258         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9259         (remote_verify_memory): Refactor as methods of remote_target.
9260         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9261         parameter.
9262         (remote_xfer_partial, remote_get_memory_xfer_limit)
9263         (remote_search_memory, remote_rcmd, remote_memory_map)
9264         (remote_pid_to_str, remote_get_thread_local_address)
9265         (remote_get_tib_address, remote_read_description): Refactor as
9266         methods of remote_target.
9267         (remote_target::fileio_open, remote_target::fileio_pwrite)
9268         (remote_target::fileio_pread, remote_target::fileio_close): New.
9269         (remote_hostio_readlink, remote_hostio_fstat)
9270         (remote_filesystem_is_local, remote_can_execute_reverse)
9271         (remote_supports_non_stop, remote_supports_disable_randomization)
9272         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9273         (remote_supports_enable_disable_tracepoint)
9274         (remote_supports_string_tracing)
9275         (remote_can_run_breakpoint_commands, remote_trace_init)
9276         (remote_download_tracepoint, remote_can_download_tracepoint)
9277         (remote_download_trace_state_variable, remote_enable_tracepoint)
9278         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9279         (remote_trace_start, remote_get_trace_status)
9280         (remote_get_tracepoint_status, remote_trace_stop)
9281         (remote_trace_find, remote_get_trace_state_variable_value)
9282         (remote_save_trace_data, remote_get_raw_trace_data)
9283         (remote_set_disconnected_tracing, remote_core_of_thread)
9284         (remote_set_circular_trace_buffer, remote_traceframe_info)
9285         (remote_get_min_fast_tracepoint_insn_len)
9286         (remote_set_trace_buffer_size, remote_set_trace_notes)
9287         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9288         (remote_disable_btrace, remote_teardown_btrace)
9289         (remote_read_btrace, remote_btrace_conf)
9290         (remote_augmented_libraries_svr4_read, remote_load)
9291         (remote_pid_to_exec_file, remote_can_do_single_step)
9292         (remote_execution_direction, remote_thread_handle_to_thread_info):
9293         Refactor as methods of remote_target.
9294         (init_remote_ops, init_extended_remote_ops): Delete.
9295         (remote_can_async_p, remote_is_async_p, remote_async)
9296         (remote_thread_events, remote_upload_tracepoints)
9297         (remote_upload_trace_state_variables): Refactor as methods of
9298         remote_target.
9299         (_initialize_remote): Remove references to init_remote_ops and
9300         init_extended_remote_ops.
9301
9302         * remote-sim.c (gdbsim_target): New class.
9303         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9304         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9305         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9306         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9307         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9308         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9309         Refactor as methods of gdbsim_target.
9310         (gdbsim_ops): Now a gdbsim_target.
9311         (init_gdbsim_ops): Delete.
9312         (gdbsim_cntrl_c): Adjust.
9313         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9314
9315         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9316         (the_amd64_linux_nat_target): New.
9317         (amd64_linux_fetch_inferior_registers)
9318         (amd64_linux_store_inferior_registers): Refactor as methods of
9319         amd64_linux_nat_target.
9320         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9321         * i386-linux-nat.c: Don't include "linux-nat.h".
9322         (i386_linux_nat_target): New class.
9323         (the_i386_linux_nat_target): New.
9324         (i386_linux_fetch_inferior_registers)
9325         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9326         as methods of i386_linux_nat_target.
9327         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9328         * inf-child.c (inf_child_ops): Delete.
9329         (inf_child_fetch_inferior_registers)
9330         (inf_child_store_inferior_registers): Delete.
9331         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9332         methods of inf_child_target.
9333         (inf_child_target::supports_terminal_ours)
9334         (inf_child_target::terminal_init)
9335         (inf_child_target::terminal_inferior)
9336         (inf_child_target::terminal_ours_for_output)
9337         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9338         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9339         New.
9340         (inf_child_open, inf_child_disconnect, inf_child_close)
9341         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9342         (inf_child_post_startup_inferior, inf_child_can_run)
9343         (inf_child_pid_to_exec_file): Refactor as methods of
9344         inf_child_target.
9345         (inf_child_follow_fork): Delete.
9346         (inf_child_target::can_create_inferior)
9347         (inf_child_target::can_attach): New.
9348         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9349         (inf_child_target::has_stack, inf_child_target::has_registers)
9350         (inf_child_target::has_execution): New.
9351         (inf_child_fileio_open, inf_child_fileio_pwrite)
9352         (inf_child_fileio_pread, inf_child_fileio_fstat)
9353         (inf_child_fileio_close, inf_child_fileio_unlink)
9354         (inf_child_fileio_readlink, inf_child_use_agent)
9355         (inf_child_can_use_agent): Refactor as methods of
9356         inf_child_target.
9357         (return_zero, inf_child_target): Delete.
9358         (inf_child_target::inf_child_target): New.
9359         * inf-child.h: Include "target.h".
9360         (inf_child_target): Delete function prototype.
9361         (inf_child_target): New class.
9362         (inf_child_open_target, inf_child_mourn_inferior)
9363         (inf_child_maybe_unpush_target): Delete.
9364         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9365         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9366         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9367         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9368         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9369         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9370         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9371         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9372         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9373         methods of inf_ptrace_target.
9374         (inf_ptrace_target): Delete function.
9375         * inf-ptrace.h: Include "inf-child.h".
9376         (inf_ptrace_target): Delete function declaration.
9377         (inf_ptrace_target): New class.
9378         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9379         * linux-nat.c (linux_target): New.
9380         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9381         (linux_nat_target::~linux_nat_target): New.
9382         (linux_child_post_attach, linux_child_post_startup_inferior)
9383         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9384         (linux_child_remove_fork_catchpoint)
9385         (linux_child_insert_vfork_catchpoint)
9386         (linux_child_remove_vfork_catchpoint)
9387         (linux_child_insert_exec_catchpoint)
9388         (linux_child_remove_exec_catchpoint)
9389         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9390         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9391         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9392         (linux_nat_stopped_data_address)
9393         (linux_nat_stopped_by_sw_breakpoint)
9394         (linux_nat_supports_stopped_by_sw_breakpoint)
9395         (linux_nat_stopped_by_hw_breakpoint)
9396         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9397         (linux_nat_kill, linux_nat_mourn_inferior)
9398         (linux_nat_xfer_partial, linux_nat_thread_alive)
9399         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9400         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9401         (linux_child_static_tracepoint_markers_by_strid)
9402         (linux_nat_is_async_p, linux_nat_can_async_p)
9403         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9404         (linux_nat_supports_multi_process)
9405         (linux_nat_supports_disable_randomization, linux_nat_async)
9406         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9407         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9408         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9409         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9410         methods of linux_nat_target.
9411         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9412         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9413         parameter.
9414         (check_stopped_by_watchpoint): Adjust.
9415         (linux_xfer_partial): Delete.
9416         (linux_target_install_ops, linux_target, linux_nat_add_target):
9417         Delete.
9418         (linux_nat_target::linux_nat_target): New.
9419         * linux-nat.h: Include "inf-ptrace.h".
9420         (linux_nat_target): New.
9421         (linux_target, linux_target_install_ops, linux_nat_add_target):
9422         Delete function declarations.
9423         (linux_target): Declare global.
9424         * linux-thread-db.c (thread_db_target): New.
9425         (thread_db_target::thread_db_target): New.
9426         (thread_db_ops): Delete.
9427         (the_thread_db_target): New.
9428         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9429         (thread_db_update_thread_list, thread_db_pid_to_str)
9430         (thread_db_extra_thread_info)
9431         (thread_db_thread_handle_to_thread_info)
9432         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9433         (thread_db_resume): Refactor as methods of thread_db_target.
9434         (init_thread_db_ops): Delete.
9435         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9436         * x86-linux-nat.c: Don't include "linux-nat.h".
9437         (super_post_startup_inferior): Delete.
9438         (x86_linux_nat_target::~x86_linux_nat_target): New.
9439         (x86_linux_child_post_startup_inferior)
9440         (x86_linux_read_description, x86_linux_enable_btrace)
9441         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9442         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9443         methods of x86_linux_nat_target.
9444         (x86_linux_create_target): Delete.  Bits folded ...
9445         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9446         pointer.
9447         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9448         (x86_linux_nat_target): New class.
9449         (x86_linux_create_target): Delete.
9450         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9451         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9452         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9453         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9454         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9455         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9456         make extern.
9457         (x86_use_watchpoints): Delete.
9458         * x86-nat.h: Include "breakpoint.h" and "target.h".
9459         (x86_use_watchpoints): Delete.
9460         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9461         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9462         (x86_insert_watchpoint, x86_remove_watchpoint)
9463         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9464         (x86_stopped_by_hw_breakpoint): New declarations.
9465         (x86_nat_target): New template class.
9466
9467         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9468         (the_ppc_linux_nat_target): New.
9469         (ppc_linux_fetch_inferior_registers)
9470         (ppc_linux_can_use_hw_breakpoint)
9471         (ppc_linux_region_ok_for_hw_watchpoint)
9472         (ppc_linux_ranged_break_num_registers)
9473         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9474         (ppc_linux_insert_mask_watchpoint)
9475         (ppc_linux_remove_mask_watchpoint)
9476         (ppc_linux_can_accel_watchpoint_condition)
9477         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9478         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9479         (ppc_linux_watchpoint_addr_within_range)
9480         (ppc_linux_masked_watch_num_registers)
9481         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9482         (ppc_linux_read_description): Refactor as methods of
9483         ppc_linux_nat_target.
9484         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9485
9486         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9487         (procfs_target): New class.
9488         (the_procfs_target): New.
9489         (procfs_target): Delete function.
9490         (procfs_auxv_parse, procfs_attach, procfs_detach)
9491         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9492         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9493         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9494         (procfs_create_inferior, procfs_update_thread_list)
9495         (procfs_thread_alive, procfs_pid_to_str)
9496         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9497         (procfs_stopped_data_address, procfs_insert_watchpoint)
9498         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9499         (proc_find_memory_regions, procfs_info_proc)
9500         (procfs_make_note_section): Refactor as methods of procfs_target.
9501         (_initialize_procfs): Adjust.
9502         * sol-thread.c (sol_thread_target): New class.
9503         (sol_thread_ops): Now a sol_thread_target.
9504         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9505         (sol_thread_fetch_registers, sol_thread_store_registers)
9506         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9507         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9508         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9509         (init_sol_thread_ops): Delete.
9510         (_initialize_sol_thread): Adjust.  Remove references to
9511         init_sol_thread_ops and complete_target_initialization.
9512
9513         * windows-nat.c (windows_nat_target): New class.
9514         (windows_fetch_inferior_registers)
9515         (windows_store_inferior_registers, windows_resume, windows_wait)
9516         (windows_attach, windows_detach, windows_pid_to_exec_file)
9517         (windows_files_info, windows_create_inferior)
9518         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9519         (windows_close, windows_pid_to_str, windows_xfer_partial)
9520         (windows_get_tib_address, windows_get_ada_task_ptid)
9521         (windows_thread_name, windows_thread_alive): Refactor as
9522         windows_nat_target methods.
9523         (do_initial_windows_stuff): Adjust.
9524         (windows_target): Delete function.
9525         (_initialize_windows_nat): Adjust.
9526
9527         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9528         (darwin_mourn_inferior, darwin_kill_inferior)
9529         (darwin_create_inferior, darwin_attach, darwin_detach)
9530         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9531         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9532         (darwin_supports_multi_process): Refactor as darwin_nat_target
9533         methods.
9534         (darwin_resume_to, darwin_files_info): Delete.
9535         (_initialize_darwin_inferior): Rename to ...
9536         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9537         * darwin-nat.h: Include "inf-child.h".
9538         (darwin_nat_target): New class.
9539         (darwin_complete_target): Delete.
9540         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9541         (darwin_target): New.
9542         (i386_darwin_fetch_inferior_registers)
9543         (i386_darwin_store_inferior_registers): Refactor as methods of
9544         darwin_nat_target.
9545         (darwin_complete_target): Delete, with ...
9546         (_initialize_i386_darwin_nat): ... bits factored out here.
9547
9548         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9549         (the_alpha_linux_nat_target): New.
9550         (alpha_linux_register_u_offset): Refactor as
9551         alpha_linux_nat_target method.
9552         (_initialize_alpha_linux_nat): Adjust.
9553         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9554         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9555         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9556         methods of linux_nat_trad_target.
9557         (linux_trad_target): Delete.
9558         * linux-nat-trad.h (linux_trad_target): Delete function.
9559         (linux_nat_trad_target): New class.
9560         * mips-linux-nat.c (mips_linux_nat_target): New class.
9561         (super_fetch_registers, super_store_registers, super_close):
9562         Delete.
9563         (the_mips_linux_nat_target): New.
9564         (mips64_linux_regsets_fetch_registers)
9565         (mips64_linux_regsets_store_registers)
9566         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9567         (mips_linux_register_u_offset, mips_linux_read_description)
9568         (mips_linux_can_use_hw_breakpoint)
9569         (mips_linux_stopped_by_watchpoint)
9570         (mips_linux_stopped_data_address)
9571         (mips_linux_region_ok_for_hw_watchpoint)
9572         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9573         (mips_linux_close): Refactor as methods of mips_linux_nat.
9574         (_initialize_mips_linux_nat): Adjust to C++ification.
9575
9576         * aix-thread.c (aix_thread_target): New class.
9577         (aix_thread_ops): Now an aix_thread_target.
9578         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9579         (aix_thread_fetch_registers, aix_thread_store_registers)
9580         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9581         (aix_thread_thread_alive, aix_thread_pid_to_str)
9582         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9583         Refactor as methods of aix_thread_target.
9584         (init_aix_thread_ops): Delete.
9585         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9586         and complete_target_initialization.
9587         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9588         (rs6000_nat_target): New class.
9589         (the_rs6000_nat_target): New.
9590         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9591         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9592         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9593         (super_create_inferior): Delete.
9594         (_initialize_rs6000_nat): Adjust to C++ification.
9595
9596         * arm-linux-nat.c (arm_linux_nat_target): New class.
9597         (the_arm_linux_nat_target): New.
9598         (arm_linux_fetch_inferior_registers)
9599         (arm_linux_store_inferior_registers, arm_linux_read_description)
9600         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9601         (arm_linux_remove_hw_breakpoint)
9602         (arm_linux_region_ok_for_hw_watchpoint)
9603         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9604         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9605         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9606         arm_linux_nat_target.
9607         (_initialize_arm_linux_nat): Adjust to C++ification.
9608
9609         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9610         (the_aarch64_linux_nat_target): New.
9611         (aarch64_linux_fetch_inferior_registers)
9612         (aarch64_linux_store_inferior_registers)
9613         (aarch64_linux_child_post_startup_inferior)
9614         (aarch64_linux_read_description)
9615         (aarch64_linux_can_use_hw_breakpoint)
9616         (aarch64_linux_insert_hw_breakpoint)
9617         (aarch64_linux_remove_hw_breakpoint)
9618         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9619         (aarch64_linux_region_ok_for_hw_watchpoint)
9620         (aarch64_linux_stopped_data_address)
9621         (aarch64_linux_stopped_by_watchpoint)
9622         (aarch64_linux_watchpoint_addr_within_range)
9623         (aarch64_linux_can_do_single_step): Refactor as methods of
9624         aarch64_linux_nat_target.
9625         (super_post_startup_inferior): Delete.
9626         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9627
9628         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9629         (the_hppa_linux_nat_target): New.
9630         (hppa_linux_fetch_inferior_registers)
9631         (hppa_linux_store_inferior_registers): Refactor as methods of
9632         hppa_linux_nat_target.
9633         (_initialize_hppa_linux_nat): Adjust to C++ification.
9634
9635         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9636         (the_ia64_linux_nat_target): New.
9637         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9638         (ia64_linux_stopped_data_address)
9639         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9640         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9641         ia64_linux_nat_target methods.
9642         (super_xfer_partial): Delete.
9643         (_initialize_ia64_linux_nat): Adjust to C++ification.
9644
9645         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9646         (the_m32r_linux_nat_target): New.
9647         (m32r_linux_fetch_inferior_registers)
9648         (m32r_linux_store_inferior_registers): Refactor as
9649         m32r_linux_nat_target methods.
9650         (_initialize_m32r_linux_nat): Adjust to C++ification.
9651
9652         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9653         (the_m68k_linux_nat_target): New.
9654         (m68k_linux_fetch_inferior_registers)
9655         (m68k_linux_store_inferior_registers): Refactor as
9656         m68k_linux_nat_target methods.
9657         (_initialize_m68k_linux_nat): Adjust to C++ification.
9658
9659         * s390-linux-nat.c (s390_linux_nat_target): New class.
9660         (the_s390_linux_nat_target): New.
9661         (s390_linux_fetch_inferior_registers)
9662         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9663         (s390_insert_watchpoint, s390_remove_watchpoint)
9664         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9665         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9666         (s390_auxv_parse, s390_read_description): Refactor as methods of
9667         s390_linux_nat_target.
9668         (_initialize_s390_nat): Adjust to C++ification.
9669
9670         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9671         (the_sparc_linux_nat_target): New.
9672         (_initialize_sparc_linux_nat): Adjust to C++ification.
9673         * sparc-nat.c (sparc_fetch_inferior_registers)
9674         (sparc_store_inferior_registers): Remove target_ops parameter.
9675         * sparc-nat.h (sparc_fetch_inferior_registers)
9676         (sparc_store_inferior_registers): Remove target_ops parameter.
9677         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9678         (the_sparc64_linux_nat_target): New.
9679         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9680
9681         * spu-linux-nat.c (spu_linux_nat_target): New class.
9682         (the_spu_linux_nat_target): New.
9683         (spu_child_post_startup_inferior, spu_child_post_attach)
9684         (spu_child_wait, spu_fetch_inferior_registers)
9685         (spu_store_inferior_registers, spu_xfer_partial)
9686         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9687         methods.
9688         (_initialize_spu_nat): Adjust to C++ification.
9689
9690         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9691         (the_tilegx_linux_nat_target): New.
9692         (fetch_inferior_registers, store_inferior_registers):
9693         Refactor as methods.
9694         (_initialize_tile_linux_nat): Adjust to C++ification.
9695
9696         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9697         (the_xtensa_linux_nat_target): New.
9698         (xtensa_linux_fetch_inferior_registers)
9699         (xtensa_linux_store_inferior_registers): Refactor as
9700         xtensa_linux_nat_target methods.
9701         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9702
9703         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9704         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9705         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9706         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9707         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9708         (fbsd_stopped_by_sw_breakpoint)
9709         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9710         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9711         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9712         (fbsd_post_startup_inferior, fbsd_post_attach)
9713         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9714         (fbsd_set_syscall_catchpoint)
9715         (super_xfer_partial, super_resume, super_wait)
9716         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9717         (fbsd_handle_debug_trap): Remove target_ops parameter.
9718         (fbsd_nat_add_target): Delete.
9719         * fbsd-nat.h: Include "inf-ptrace.h".
9720         (fbsd_nat_add_target): Delete.
9721         (USE_SIGTRAP_SIGINFO): Define.
9722         (fbsd_nat_target): New class.
9723
9724         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9725         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9726         (amd64bsd_target): Delete.
9727         * amd64-bsd-nat.h: New file.
9728         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9729         "x86-bsd-nat.h".
9730         (amd64_fbsd_nat_target): New class.
9731         (the_amd64_fbsd_nat_target): New.
9732         (amd64fbsd_read_description): Refactor as method of
9733         amd64_fbsd_nat_target.
9734         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9735         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9736         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9737         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9738         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9739         (i386bsd_target): Delete.
9740         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9741         (i386bsd_fetch_inferior_registers)
9742         (i386bsd_store_inferior_registers): Declare.
9743         (i386_bsd_nat_target): New class.
9744         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9745         (the_i386_fbsd_nat_target): New.
9746         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9747         i386_fbsd_nat_target methods.
9748         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9749         (_initialize_i386fbsd_nat): Adjust to C++ification.
9750         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9751         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9752         (_initialize_x86_bsd_nat): Adjust to C++ification.
9753         * x86-bsd-nat.h: Include "x86-nat.h".
9754         (x86bsd_target): Delete declaration.
9755         (x86bsd_nat_target): New class.
9756
9757         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9758         (the_aarch64_fbsd_nat_target): New.
9759         (aarch64_fbsd_fetch_inferior_registers)
9760         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9761         aarch64_fbsd_nat_target.
9762         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9763         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9764         (the_alpha_bsd_nat_target): New.
9765         (alphabsd_fetch_inferior_registers)
9766         (alphabsd_store_inferior_registers): Refactor as
9767         alpha_bsd_nat_target methods.
9768         (_initialize_alphabsd_nat): Refactor as methods of
9769         alpha_bsd_nat_target.
9770         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9771         (the_amd64_nbsd_nat_target): New.
9772         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9773         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9774         (the_amd64_obsd_nat_target): New.
9775         (_initialize_amd64obsd_nat): Adjust to C++ification.
9776         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9777         (the_arm_fbsd_nat_target): New.
9778         (arm_fbsd_fetch_inferior_registers)
9779         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9780         (_initialize_arm_fbsd_nat): Refactor as methods of
9781         arm_fbsd_nat_target.
9782         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9783         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9784         (the_arm_netbsd_nat_target): New.
9785         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9786         arm_netbsd_nat_target.
9787         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9788         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9789         (the_hppa_nbsd_nat_target): New.
9790         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9791         hppa_nbsd_nat_target methods.
9792         (_initialize_hppanbsd_nat): Adjust to C++ification.
9793         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9794         (the_hppa_obsd_nat_target): New.
9795         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9796         methods of hppa_obsd_nat_target.
9797         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9798         add_target.
9799         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9800         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9801         add_target.
9802         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9803         (_initialize_i386obsd_nat): Use add_target.
9804         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9805         (the_m68k_bsd_nat_target): New.
9806         (m68kbsd_fetch_inferior_registers)
9807         (m68kbsd_store_inferior_registers): Refactor as methods of
9808         m68k_bsd_nat_target.
9809         (_initialize_m68kbsd_nat): Adjust to C++ification.
9810         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9811         (the_mips_fbsd_nat_target): New.
9812         (mips_fbsd_fetch_inferior_registers)
9813         (mips_fbsd_store_inferior_registers): Refactor as methods of
9814         mips_fbsd_nat_target.
9815         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9816         add_target.
9817         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9818         (the_mips_nbsd_nat_target): New.
9819         (mipsnbsd_fetch_inferior_registers)
9820         (mipsnbsd_store_inferior_registers): Refactor as methods of
9821         mips_nbsd_nat_target.
9822         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9823         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9824         (the_mips64_obsd_nat_target): New.
9825         (mips64obsd_fetch_inferior_registers)
9826         (mips64obsd_store_inferior_registers): Refactor as methods of
9827         mips64_obsd_nat_target.
9828         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9829         add_target.
9830         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9831         nbsd_nat_target.
9832         * nbsd-nat.h: Include "inf-ptrace.h".
9833         (nbsd_nat_target): New class.
9834         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9835         (obsd_wait): Refactor as methods of obsd_nat_target.
9836         (obsd_add_target): Delete.
9837         * obsd-nat.h: Include "inf-ptrace.h".
9838         (obsd_nat_target): New class.
9839         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9840         (the_ppc_fbsd_nat_target): New.
9841         (ppcfbsd_fetch_inferior_registers)
9842         (ppcfbsd_store_inferior_registers): Refactor as methods of
9843         ppc_fbsd_nat_target.
9844         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9845         add_target.
9846         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9847         (the_ppc_nbsd_nat_target): New.
9848         (ppcnbsd_fetch_inferior_registers)
9849         (ppcnbsd_store_inferior_registers): Refactor as methods of
9850         ppc_nbsd_nat_target.
9851         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9852         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9853         (the_ppc_obsd_nat_target): New.
9854         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9855         methods of ppc_obsd_nat_target.
9856         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9857         add_target.
9858         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9859         (the_sh_nbsd_nat_target): New.
9860         (shnbsd_fetch_inferior_registers)
9861         (shnbsd_store_inferior_registers): Refactor as methods of
9862         sh_nbsd_nat_target.
9863         (_initialize_shnbsd_nat): Adjust to C++ification.
9864         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9865         (inf_ptrace_xfer_partial): Delete.
9866         (sparc_xfer_partial, sparc_target): Delete.
9867         * sparc-nat.h (sparc_fetch_inferior_registers)
9868         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9869         (sparc_target): Delete function declaration.
9870         (sparc_target): New template class.
9871         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9872         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9873         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9874         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9875         add_target.
9876         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9877         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9878         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9879         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9880         add_target.
9881         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9882         (the_vax_bsd_nat_target): New.
9883         (vaxbsd_fetch_inferior_registers)
9884         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9885         methods.
9886         (_initialize_vaxbsd_nat): Adjust to C++ification.
9887
9888         * bsd-kvm.c (bsd_kvm_target): New class.
9889         (bsd_kvm_ops): Now a bsd_kvm_target.
9890         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9891         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9892         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9893         bsd_kvm_target.
9894         (bsd_kvm_return_one): Delete.
9895         (bsd_kvm_add_target): Adjust to C++ification.
9896
9897         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9898         (nto_procfs_target_procfs): New classes.
9899         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9900         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9901         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9902         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9903         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9904         (procfs_remove_hw_breakpoint, procfs_resume)
9905         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9906         (procfs_kill_inferior, procfs_store_registers)
9907         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9908         as methods of nto_procfs_target.
9909         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9910         (nto_native_ops): Delete.
9911         (procfs_open, procfs_native_open): Delete.
9912         (nto_native_ops): Now an nto_procfs_target_native.
9913         (init_procfs_targets): Adjust to C++ification.
9914         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9915         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9916         Refactor as methods of nto_procfs_target.
9917
9918         * go32-nat.c (go32_nat_target): New class.
9919         (the_go32_nat_target): New.
9920         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9921         (go32_store_registers, go32_xfer_partial, go32_files_info)
9922         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9923         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9924         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9925         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9926         (go32_target): Delete.
9927         (_initialize_go32_nat): Adjust to C++ification.
9928
9929         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9930         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9931         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9932         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9933         gnu_nat_target.
9934         (gnu_target): Delete.
9935         * gnu-nat.h (gnu_target): Delete.
9936         (gnu_nat_target): New class.
9937         * i386-gnu-nat.c (gnu_base_target): New.
9938         (i386_gnu_nat_target): New class.
9939         (the_i386_gnu_nat_target): New.
9940         (_initialize_i386gnu_nat): Adjust to C++ification.
9941
9942 2018-05-02  Pedro Alves  <palves@redhat.com>
9943
9944         * bfd-target.c (target_bfd_xclose): Rename to ...
9945         (target_bfd_close): ... this.
9946         (target_bfd_reopen): Adjust.
9947         * target.c (target_close): Remove references to to_xclose.
9948         * target.h (target_ops::to_xclose): Delete.
9949         (target_ops::to_close): Update comments.
9950
9951 2018-05-02  Pedro Alves  <palves@redhat.com>
9952
9953         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9954         "linux-nat.h".
9955         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9956         * inf-ptrace.c (inf_ptrace_register_u_offset)
9957         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9958         (inf_ptrace_store_register, inf_ptrace_store_registers)
9959         (inf_ptrace_trad_target): Move to ...
9960         * linux-nat-trad.c: ... this new file.
9961         * linux-nat-trad.h: New file.
9962         * linux-nat.c (linux_target_install_ops): Make extern.
9963         (linux_trad_target): Delete.
9964         * linux-nat.h (linux_trad_target): Delete declaration.
9965         (linux_target_install_ops): Declare.
9966         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9967         "linux-nat.h".
9968
9969 2018-05-02  Pedro Alves  <palves@redhat.com>
9970
9971         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9972         procfs_target/add_target here.
9973         * procfs.c (procfs_target): Make static.
9974         (_initialize_procfs): Call add_target here.
9975         * procfs.h (struct target_ops): Remove forward declaration.
9976         (procfs_target): Remove declaration.
9977         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9978
9979 2018-05-02  Pedro Alves  <palves@redhat.com>
9980
9981         * procfs.c (procfs_stopped_by_watchpoint)
9982         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9983         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9984         Forward declare.
9985         (procfs_use_watchpoints): Delete, move contents...
9986         (procfs_target): ... here.
9987         * procfs.h (procfs_use_watchpoints): Delete declaration.
9988         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9989         procfs_use_watchpoints.
9990         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9991         procfs_use_watchpoints.
9992
9993 2018-05-02  Tom Tromey  <tom@tromey.com>
9994
9995         PR python/20084:
9996         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9997         and var_zuinteger_unlimited.
9998         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9999         and PARAM_ZUINTEGER_UNLIMITED.
10000         (set_parameter_value): Handle var_zuinteger and
10001         var_zuinteger_unlimited.
10002         (add_setshow_generic): Likewise.
10003         (parmpy_init): Likewise.
10004
10005 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10006
10007         PR rust/23124
10008         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10009         pointer is not null before dereferencing it.
10010
10011 2018-04-30  Tom Tromey  <tom@tromey.com>
10012
10013         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10014         is_mi_like_p.
10015
10016 2018-04-30  Tom Tromey  <tom@tromey.com>
10017
10018         * breakpoint.c (mention): Remove use of is_mi_like_p.
10019         (print_mention_ranged_breakpoint): Likewise.
10020         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10021         of is_mi_like_p.
10022
10023 2018-04-30  Tom Tromey  <tom@tromey.com>
10024
10025         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10026
10027 2018-04-30  Tom Tromey  <tom@tromey.com>
10028
10029         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10030         (info_spu_event_command): Remove some uses of is_mi_like_p.
10031
10032 2018-04-30  Tom Tromey  <tom@tromey.com>
10033
10034         * python/py-framefilter.c (py_print_single_arg)
10035         (enumerate_locals, py_print_args, py_print_frame): Remove some
10036         uses of is_mi_like_p.
10037
10038 2018-04-30  Tom Tromey  <tom@tromey.com>
10039
10040         * ui-out.c: Update.
10041         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10042         * ui-out.h (ui_out::is_mi_like_p): Now const.
10043         (ui_out::do_is_mi_like_p): Now const.
10044         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10045
10046 2018-04-30  Tom Tromey  <tom@tromey.com>
10047
10048         * varobj.c (varobj_set_visualizer): Use new_reference.
10049         * python/python.c (gdbpy_decode_line): Use new_reference.
10050         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10051         new_reference.
10052
10053 2018-04-30  Tom Tromey  <tom@tromey.com>
10054
10055         * varobj.c (install_new_value): Use new_reference.
10056         * value.h (value_incref): Return void.  Swap intro comment with
10057         value_decref.
10058         * value.c (set_value_parent): Use new_reference.
10059         (value_incref): Return void.  Update intro comment.
10060         (release_value): Use new_reference.
10061         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10062
10063 2018-04-30  Tom Tromey  <tom@tromey.com>
10064
10065         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10066         * gdb_bfd.h (new_bfd_ref): Remove.
10067         (gdb_bfd_open): Update comment.
10068         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10069         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10070         (gdb_bfd_fdopenr): Use new_reference.
10071         * exec.c (exec_file_attach): Use new_reference.
10072
10073 2018-04-30  Tom Tromey  <tom@tromey.com>
10074
10075         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10076         method.
10077
10078 2018-04-30  Tom Tromey  <tom@tromey.com>
10079
10080         * jit.c (jit_read_code_entry): Use type_align.
10081         * i386-tdep.c (i386_gdbarch_init): Don't call
10082         set_gdbarch_long_long_align_bit.
10083         * gdbarch.sh: Remove long_long_align_bit.
10084         * gdbarch.c, gdbarch.h: Rebuild.
10085         * arc-tdep.c (arc_type_align): New function.
10086         (arc_gdbarch_init): Use arc_type_align.  Don't call
10087         set_gdbarch_long_long_align_bit.
10088
10089 2018-04-30  Tom Tromey  <tom@tromey.com>
10090
10091         * rust-lang.c (rust_type_alignment): Remove.
10092         (rust_composite_type): Use type_align.
10093
10094 2018-04-30  Tom Tromey  <tom@tromey.com>
10095
10096         * NEWS: Mention Type.align.
10097         * python/py-type.c (typy_get_alignof): New function.
10098         (type_object_getset): Add "alignof".
10099
10100 2018-04-30  Tom Tromey  <tom@tromey.com>
10101
10102         PR exp/17095:
10103         * NEWS: Update.
10104         * std-operator.def (UNOP_ALIGNOF): New operator.
10105         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10106         New.
10107         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10108         * c-lang.c (c_op_print_tab): Add alignof.
10109         * c-exp.y (ALIGNOF): New token.
10110         (exp): Add "ALIGNOF" production.
10111         (ident_tokens): Add _Alignof and alignof.
10112
10113 2018-04-30  Tom Tromey  <tom@tromey.com>
10114
10115         * i386-tdep.c (i386_type_align): New function.
10116         (i386_gdbarch_init): Update.
10117         * gdbarch.sh (type_align): New method.
10118         * gdbarch.c, gdbarch.h: Rebuild.
10119         * arch-utils.h (default_type_align): Declare.
10120         * arch-utils.c (default_type_align): New function.
10121         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10122         (struct type) <align_log2>: New field.
10123         <instance_flags>: Now a bitfield.
10124         (TYPE_RAW_ALIGN): New macro.
10125         (type_align, type_raw_align, set_type_align): Declare.
10126         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10127         functions.
10128         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10129         (get_alignment, maybe_set_alignment): New functions.
10130         (read_structure_type, read_enumeration_type, read_array_type)
10131         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10132         (read_subrange_type, read_base_type): Set type alignment.
10133
10134 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10135
10136         * dwarf2read.c (read_index_from_section): Use bool.
10137
10138 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10139
10140         PR gdb/22950
10141         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10142         with #ifdef.
10143
10144 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10145
10146         PR build/22873
10147         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10148         last step, and do it atomically.
10149
10150 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10151
10152         * compile/compile-c-types.c (convert_int, convert_float):
10153         Update for C FE v1.
10154
10155 2018-04-27  Tom Tromey  <tom@tromey.com>
10156
10157         PR rust/22545:
10158         * rust-lang.c (rust_inclusive_range_type_p): New function.
10159         (rust_range): Handle inclusive ranges.
10160         (rust_compute_range): Likewise.
10161         * rust-exp.y (struct rust_op) <inclusive>: New field.
10162         (DOTDOTEQ): New constant.
10163         (range_expr): Add "..=" productions.
10164         (operator_tokens): Add "..=" token.
10165         (ast_range): Add "inclusive" parameter.
10166         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10167         ranges.
10168         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10169         bounds values.
10170         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10171         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10172         Update comments.
10173         * expprint.c (print_subexp_standard): Handle new bounds values.
10174         (dump_subexp_body_standard): Likewise.
10175
10176 2018-04-27  Tom Tromey  <tom@tromey.com>
10177
10178         * configure: Rebuild.
10179         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10180         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10181         "OVERRIDE".
10182         (class symbol_needs_eval_context): Likewise.
10183         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10184         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10185         "virtual".
10186         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10187         "override".
10188         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10189         * aarch64-tdep.c (instruction_reader::read): Use "override".
10190         (instruction_reader_test::read): Likewise.
10191         * arm-tdep.c (instruction_reader::read): Use "override".
10192         (instruction_reader_thumb::read): Likewise.
10193
10194 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10195
10196         PR remote/9665
10197         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10198         instead of remote_send.
10199         (remote_send): Remove.
10200
10201 2018-04-26  Pedro Alves  <palves@redhat.com>
10202
10203         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10204         find_function_start_sal instead of find_pc_line.
10205
10206 2018-04-26  Pedro Alves  <palves@redhat.com>
10207
10208         * breakpoint.c (set_breakpoint_location_function): Handle
10209         mst_data_gnu_ifunc.
10210         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10211         * elfread.c (elf_symtab_read): Give data symbols with
10212         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10213         (elf_rel_plt_read): Update comment.
10214         * linespec.c (convert_linespec_to_sals): Handle
10215         mst_data_gnu_ifunc.
10216         (minsym_found): Handle mst_data_gnu_ifunc.
10217         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10218         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10219         * parse.c (find_minsym_type_and_address): Handle
10220         mst_data_gnu_ifunc.
10221         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10222         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10223         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10224         comment.
10225         <mst_data_gnu_ifunc>: New enumerator.
10226
10227 2018-04-26  Pedro Alves  <palves@redhat.com>
10228
10229         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10230         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10231         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10232         Handle it.
10233         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10234         (lookup_minimal_symbol_by_pc): Adjust.
10235         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10236         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10237         * minsyms.h (lookup_msym_prefer): New enum.
10238         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10239         parameter by a lookup_msym_prefer parameter.
10240
10241 2018-04-26  Pedro Alves  <palves@redhat.com>
10242
10243         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10244         ends in "@plt" instead of looking at the symbol's section.
10245
10246 2018-04-26  Pedro Alves  <palves@redhat.com>
10247
10248         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10249         all references.
10250         (find_pc_partial_function_gnu_ifunc): Rename to ...
10251         (find_pc_partial_function): ... this, and remove references to
10252         'is_gnu_ifunc_p'.
10253         (find_pc_partial_function): Delete old implementation.
10254         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10255
10256 2018-04-26  Pedro Alves  <palves@redhat.com>
10257
10258         * linespec.c (struct bound_minimal_symbol_search_key): New.
10259         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10260         skip first line if we found a GNU ifunc minimal symbol by name.
10261         (compare_msymbols): Change parameters to work with a destructured
10262         lhs minsym.
10263         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10264         functions.
10265
10266 2018-04-26  Pedro Alves  <palves@redhat.com>
10267
10268         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10269         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10270         address/name.
10271         (add_location_to_breakpoint): Store the minsym and the objfile in
10272         the breakpoint location.
10273         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10274         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10275         Record the minsym in the sal.
10276         * symtab.h (symtab_and_line) <msymbol>: New field.
10277
10278 2018-04-26  Pedro Alves  <palves@redhat.com>
10279
10280         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10281         unless we actually resolved the ifunc.
10282
10283 2018-04-26  Pedro Alves  <palves@redhat.com>
10284
10285         * c-exp.y (variable production): Prefer ifunc minsyms over
10286         regular function symbols.
10287         * symtab.c (find_gnu_ifunc): New function.
10288         * minsyms.h (lookup_msym_prefer): New enum.
10289         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10290         parameter by a lookup_msym_prefer parameter.
10291         * symtab.h (find_gnu_ifunc): New declaration.
10292
10293 2018-04-26  Pedro Alves  <palves@redhat.com>
10294
10295         * blockframe.c (find_gnu_ifunc_target_type): New function.
10296         (find_function_type): New.
10297         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10298         return a value with a memory address.
10299         (eval_call): For calls to GNU ifunc functions, try to find the
10300         type of the target function from the type that the resolver
10301         returns.
10302         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10303         symbols.
10304         * infcall.c (find_function_return_type): Delete.
10305         (find_function_addr): Add 'function_type' parameter.  For calls to
10306         GNU ifunc functions, try to find the type of the target function
10307         from the type that the resolver returns, and return it via
10308         FUNCTION_TYPE.
10309         (call_function_by_hand_dummy): Adjust to use the function type
10310         returned by find_function_addr.
10311         (find_function_addr): Add 'function_type' parameter and move
10312         description here.
10313         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10314         declarations.
10315
10316 2018-04-26  Pedro Alves  <palves@redhat.com>
10317
10318         * c-exp.y (variable production): Skip finding an alias for ifunc
10319         symbols.
10320
10321 2018-04-26  Pedro Alves  <palves@redhat.com>
10322
10323         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10324
10325 2018-04-25  Pedro Alves  <palves@redhat.com>
10326
10327         * infcmd.c (kill_command): Print the pid as string, not the whole
10328         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10329         message.
10330         * remote.c (remote_detach_1): Print the pid as string, not the
10331         whole thread's ptid.
10332
10333 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10334             Sergio Durigan Junior  <sergiodj@redhat.com>
10335             Pedro Alves  <palves@redhat.com>
10336
10337         * infcmd.c (kill_command): Print message when inferior has
10338         been killed.
10339         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10340         '1'.
10341         (add_inferior): Improve message printed when
10342         'print_inferior_events' is on.
10343         (exit_inferior): Remove message printed when
10344         'print_inferior_events' is on.
10345         (detach_inferior): Improve message printed when
10346         'print_inferior_events' is on.
10347         (initialize_inferiors): Use 'add_inferior_silent' to set
10348         'current_inferior_'.
10349         * inferior.h (print_inferior_events): Declare here as
10350         'extern'.
10351         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10352         '[Detaching...]' messages when 'print_inferior_events' is on.
10353         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10354         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10355         'Detaching after fork from child...', replace it by '... from
10356         parent...'.
10357         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10358         prefix/suffix when printing 'Detaching...' messages.  Print
10359         them when 'print_inferior_events' is on.
10360         * remote.c (remote_detach_1): Print message when detaching
10361         from inferior and '!is_fork_parent'.
10362
10363 2018-04-24  Tom Tromey  <tom@tromey.com>
10364
10365         * cli-out.h: Reindent.
10366
10367 2018-04-24  Tom Tromey  <tom@tromey.com>
10368
10369         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10370         (cli_ui_out::do_field_string): Use fputs_filtered.
10371         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10372
10373 2018-04-23  Tom Tromey  <tom@tromey.com>
10374
10375         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10376         gdb::unique_xmalloc_ptr.
10377
10378 2018-04-23  Tom Tromey  <tom@tromey.com>
10379
10380         * configure: Rebuild.
10381
10382 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10383
10384         PR gdb/23095
10385         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10386         prepare_for_testing.  Set normal_bp to r_debug_state if target
10387         is bsd.
10388
10389 2018-04-21  Pedro Alves  <palves@redhat.com>
10390             Rajendra SY  <rajendra.sy@gmail.com>
10391
10392         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10393         * remote.c (extended_remote_attach): In all-stop mode, mark the
10394         thread as executing.
10395
10396 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10397
10398         * thread.c (thread_apply_all_command): Fix comment.
10399         (thread_command): Fix comment.
10400
10401 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10402
10403         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10404         parameter.
10405         * features/aarch64-core.c (create_feature_aarch64_core):
10406         Regenerate.
10407         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10408         Likewise.
10409         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10410         Likewise.
10411         * features/i386/32bit-avx512.c
10412         (create_feature_i386_32bit_avx512): Likewise.
10413         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10414         Likewise.
10415         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10416         Likewise.
10417         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10418         Likewise.
10419         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10420         Likewise.
10421         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10422         Likewise.
10423         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10424         Likewise.
10425         * features/i386/64bit-avx512.c
10426         (create_feature_i386_64bit_avx512): Likewise.
10427         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10428         Likewise.
10429         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10430         Likewise.
10431         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10432         Likewise.
10433         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10434         Likewise.
10435         * features/i386/64bit-segments.c
10436         (create_feature_i386_64bit_segments): Likewise.
10437         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10438         Likewise.
10439         * features/i386/x32-core.c
10440         (create_feature_i386_x32_core): Likewise.
10441         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10442         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10443         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10444         * target-descriptions.c: In generated code, don't pass xml
10445         filename.
10446
10447 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10448
10449         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10450         (print_xml_feature::visit_post): Likewise.
10451         (print_xml_feature::visit): Likewise.
10452         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10453         (print_xml_feature): Add new class.
10454         * regformats/regdat.sh: Null xmltarget on feature targets.
10455         * target-descriptions.c (struct target_desc): Add xmltarget.
10456         (maintenance_check_tdesc_xml_convert): Add unittest function.
10457         (tdesc_get_features_xml): Add function to get xml.
10458         (maintenance_check_xml_descriptions): Test xml generation.
10459         * xml-tdesc.c (string_read_description_xml): Add function.
10460         * xml-tdesc.h (string_read_description_xml): Add declaration.
10461
10462 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10463
10464         * features/Makefile: Add feature marker to targets with new style
10465         target descriptions.
10466         * regformats/aarch64.dat: Regenerate.
10467         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10468         * regformats/i386/amd64-avx-linux.dat: Likewise.
10469         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10470         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10471         * regformats/i386/amd64-linux.dat: Likewise.
10472         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10473         * regformats/i386/amd64.dat: Likewise.
10474         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10475         * regformats/i386/i386-avx-linux.dat: Likewise.
10476         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10477         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10478         * regformats/i386/i386-linux.dat: Likewise.
10479         * regformats/i386/i386-mmx-linux.dat: Likewise.
10480         * regformats/i386/i386-mpx-linux.dat: Likewise.
10481         * regformats/i386/i386.dat: Likewise.
10482         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10483         * regformats/i386/x32-avx-linux.dat: Likewise.
10484         * regformats/i386/x32-linux.dat: Likewise.
10485         * regformats/tic6x-c62x-linux.dat: Likewise.
10486         * regformats/tic6x-c64x-linux.dat: Likewise.
10487         * regformats/tic6x-c64xp-linux.dat: Likewise.
10488         * regformats/regdat.sh: Parse feature marker.
10489
10490 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10491
10492         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10493         (tdesc_osabi_name): Likewise.
10494         * target-descriptions.c (tdesc_architecture_name): Add new
10495         function.
10496         (tdesc_osabi_name): Likewise.
10497
10498 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10499
10500         * common/tdesc.c (tdesc_predefined_type): Move to here.
10501         (tdesc_named_type): Likewise.
10502         (tdesc_create_vector): Likewise.
10503         (tdesc_create_struct): Likewise.
10504         (tdesc_set_struct_size): Likewise.
10505         (tdesc_create_union): Likewise.
10506         (tdesc_create_flags): Likewise.
10507         (tdesc_create_enum): Likewise.
10508         (tdesc_add_field): Likewise.
10509         (tdesc_add_typed_bitfield): Likewise.
10510         (tdesc_add_bitfield): Likewise.
10511         (tdesc_add_flag): Likewise.
10512         (tdesc_add_enum_value): Likewise.
10513         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10514         (struct tdesc_type_vector): Likewise.
10515         (struct tdesc_type_field): Likewise.
10516         (struct tdesc_type_with_fields): Likewise.
10517         (tdesc_create_enum): Add declaration.
10518         (tdesc_add_typed_bitfield): Likewise.
10519         (tdesc_add_enum_value): Likewise.
10520         * target-descriptions.c (tdesc_type_field): Move from here.
10521         (tdesc_type_builtin): Likewise.
10522         (tdesc_type_vector): Likewise.
10523         (tdesc_type_with_fields): Likewise.
10524         (tdesc_predefined_types): Likewise.
10525         (tdesc_named_type): Likewise.
10526         (tdesc_create_vector): Likewise.
10527         (tdesc_create_struct): Likewise.
10528         (tdesc_set_struct_size): Likewise.
10529         (tdesc_create_union): Likewise.
10530         (tdesc_create_flags): Likewise.
10531         (tdesc_create_enum): Likewise.
10532         (tdesc_add_field): Likewise.
10533         (tdesc_add_typed_bitfield): Likewise.
10534         (tdesc_add_bitfield): Likewise.
10535         (tdesc_add_flag): Likewise.
10536         (tdesc_add_enum_value): Likewise.
10537         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10538         (tdesc_add_typed_bitfield): Likewise.
10539         (tdesc_add_enum_value): Likewise.
10540
10541 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10542
10543         * common/tdesc.c (tdesc_feature::accept): Move to here.
10544         (tdesc_feature::operator==): Likewise.
10545         (tdesc_create_reg): Likewise.
10546         * common/tdesc.h (tdesc_type_kind): Likewise.
10547         (struct tdesc_type): Likewise.
10548         (struct tdesc_feature): Likewise.
10549         * regformats/regdat.sh: Create a feature.
10550         * target-descriptions.c (tdesc_type_kind): Move from here.
10551         (tdesc_type): Likewise.
10552         (tdesc_type_up): Likewise.
10553         (tdesc_feature): Likewise.
10554         (tdesc_create_reg): Likewise.
10555
10556 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10557
10558         * Makefile.in: Add arch/tdesc.c
10559         * common/tdesc.c: New file.
10560         * common/tdesc.h (tdesc_element_visitor): Move to here.
10561         (tdesc_element): Likewise.
10562         (tdesc_reg): Likewise.
10563         (tdesc_reg_up): Likewise.
10564         * regformats/regdef.h (reg): Add offset to constructors.
10565         * target-descriptions.c (tdesc_element_visitor): Move from here.
10566         (tdesc_element): Likewise.
10567         (tdesc_reg): Likewise.
10568         (tdesc_reg_up): Likewise.
10569
10570 2018-04-17  Tom Tromey  <tom@tromey.com>
10571
10572         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10573         discriminant field.
10574
10575 2018-04-17  Tom Tromey  <tom@tromey.com>
10576
10577         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10578
10579 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10580
10581         * symtab.c (print_symbol_info): Skip printing filename and line
10582         number when `last' is NULL.
10583         (symtab_symbol_info): Use empty string instead of NULL for first
10584         invocation of print_symbol_info.
10585         (rbreak_command): Pass NULL to `last' parameter of
10586         print_symbol_info.
10587
10588 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10589
10590         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10591         instead of nullptr.
10592
10593 2018-04-16  Pedro Alves  <palves@redhat.com>
10594
10595         * MAINTAINERS (sh): Remove.
10596         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10597         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10598         (ALLDEPFILES): Remove sh64-tdep.c.
10599         * NEWS: Mentions that support for SH-5/SH64 is removed.
10600         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10601         (sh*-*-openbsd*): Ditto.
10602         (sh64-*-elf*): Remove.
10603         (sh*): Remove.
10604         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10605         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10606         * sh-tdep.c: No longer include "sh64-tdep.h".
10607         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10608         * sh64-tdep.c, sh64-tdep.h: Remove files.
10609
10610 2018-04-16  Pedro Alves  <palves@redhat.com>
10611
10612         * MAINTAINERS: Remove m88k.
10613         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10614         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10615         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10616         * NEWS: Mention that support for m88k was removed.
10617         * configure.host (m88*-*-*): Remove support.
10618         * configure.nat (m88k-*-*): Remove support.
10619         * configure.tgt (m88*-*-openbsd*): Remove.
10620         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10621
10622 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10623
10624         * configure.tgt (x86_tobjs): New variable.
10625         (amd64_tobjs, i386_tobjs): Use it.
10626
10627 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10628
10629         * symtab.c (print_symbol_info): Precede the symbol definition by
10630         the line number when available.
10631         * NEWS: Advertise this enhancement.
10632
10633 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10634
10635         * NEWS (New options): announce set/show record btrace cpu.
10636         * btrace.c: Include record-btrace.h.
10637         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10638         the vendor is unknown.
10639         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10640         Maybe overwrite the btrace configuration's cpu.
10641         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10642         (btrace_fetch): Add cpu parameter.  Update callers.
10643         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10644         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10645         errata workarounds if the vendor is unknown.
10646         * python/py-record-btrace.c: Include record-btrace.h.
10647         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10648         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10649         * record-btrace.c (record_btrace_cpu_state_kind): New.
10650         (record_btrace_cpu): New.
10651         (set_record_btrace_cpu_cmdlist): New.
10652         (record_btrace_get_cpu): New.
10653         (require_btrace_thread, record_btrace_info)
10654         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10655         (cmd_set_record_btrace_cpu_none): New.
10656         (cmd_set_record_btrace_cpu_auto): New.
10657         (cmd_set_record_btrace_cpu): New.
10658         (cmd_show_record_btrace_cpu): New.
10659         (_initialize_record_btrace): Initialize set/show record btrace cpu
10660         commands.
10661         * record-btrace.h (record_btrace_get_cpu): New.
10662
10663 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10664
10665         * record.c (set_record_command): Fix typo in message.
10666
10667 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10668
10669         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10670
10671 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10672
10673         * infrun.c (process_event_stop_test): Call
10674         gdbarch_in_indirect_branch_thunk.
10675         * gdbarch.sh (in_indirect_branch_thunk): New.
10676         * gdbarch.c: Regenerated.
10677         * gdbarch.h: Regenerated.
10678         * x86-tdep.h: New.
10679         * x86-tdep.c: New.
10680         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10681         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10682         (ALLDEPFILES): Add x86-tdep.c.
10683         * arch-utils.h (default_in_indirect_branch_thunk): New.
10684         * arch-utils.c (default_in_indirect_branch_thunk): New.
10685         * i386-tdep: Include x86-tdep.h.
10686         (i386_in_indirect_branch_thunk): New.
10687         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10688         function.
10689         * amd64-tdep: Include x86-tdep.h.
10690         (amd64_in_indirect_branch_thunk): New.
10691         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10692
10693 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10694
10695         PR gdb/23053
10696         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10697         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10698         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10699         regression.
10700
10701 2018-04-12  Tom Tromey  <tom@tromey.com>
10702
10703         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10704         (rust_evaluate_subexp): Likewise.
10705
10706 2018-04-12  Pedro Alves  <palves@redhat.com>
10707
10708         * procfs.c (procfs_detach): Make forward declaration's prototype
10709         match definition's protototype.
10710         (proc_get_LDT_entry): Remove stale do_cleanups call.
10711
10712 2018-04-12  Pedro Alves  <palves@redhat.com>
10713
10714         * target.h (target_ops::to_has_exited): Delete.
10715         (target_has_exited): Delete.
10716         * target-delegates.c: Regenerate.
10717
10718 2018-04-11  Pedro Alves  <palves@redhat.com>
10719
10720         * target.c (fileio_fh_t::t): Add comment.
10721         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10722         (target_fileio_close): Handle a NULL target.
10723         (invalidate_fileio_fh): New.
10724         (target_close): Call it.
10725         * remote.c (remote_hostio_send_command): No longer check whether
10726         remote_desc is open.
10727
10728 2018-04-11  Pedro Alves  <palves@redhat.com>
10729
10730         * target.c (fileio_fh_t): Make it a named struct instead of a
10731         typedef.
10732         (fileio_fh_t::is_closed): New method.
10733         (DEF_VEC_O (fileio_fh_t)): Remove.
10734         (fileio_fhandles): Now a std::vector.
10735         (is_closed_fileio_fh): Delete.
10736         (acquire_fileio_fd): Adjust.  Rename parameters.
10737         (release_fileio_fd): Adjust.
10738         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10739         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10740         (target_fileio_close): Adjust.
10741
10742 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10743
10744         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10745         index.
10746
10747 2018-04-10  Pedro Alves  <palves@redhat.com>
10748
10749         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10750         (scoped_finish_thread_state): New class.
10751         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10752         cleanup.
10753         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10754         (fetch_inferior_event, normal_stop): Likewise.
10755         * thread.c (finish_thread_state_cleanup): Delete.
10756
10757 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10758             Pedro Alves  <palves@redhat.com>
10759
10760         * value.c: Include "selftest.h" and "common/array-view.h".
10761         (struct range) <operator ==>: New.
10762         (test_ranges_contain): New.
10763         (check_ranges_vector): New.
10764         (test_insert_into_bit_range_vector): New.
10765         (_initialize_values): Register selftests.
10766         * common/array-view.h (operator==, operator!=): New.
10767
10768 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10769
10770         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10771         an iterator.
10772         * inline-frame.c: Include <algorithm>.
10773         (struct inline_state): Add constructor.
10774         (inline_state_s): Remove.
10775         (DEF_VEC_O(inline_state_s)): Remove.
10776         (inline_states): Change type to std::vector.
10777         (find_inline_frame_state): Adjust to std::vector.
10778         (allocate_inline_frame_state): Remove.
10779         (clear_inline_frame_state): Adjust to std::vector.
10780         (skip_inline_frames): Adjust to std::vector.
10781
10782 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10783
10784         * tracepoint.h (struct trace_state_variable): Add constructor.
10785         <name>: Change type to std::string.
10786         * tracepoint.c (tsv_s): Remove.
10787         (DEF_VEC_O(tsv_s)): Remove.
10788         (tvariables): Change to std::vector.
10789         (create_trace_state_variable): Adjust to std::vector.
10790         (find_trace_state_variable): Likewise.
10791         (find_trace_state_variable_by_number): Likewise.
10792         (delete_trace_state_variable): Likewise.
10793         (trace_variable_command): Adjust to std::string.
10794         (delete_trace_variable_command): Likewise.
10795         (tvariables_info_1): Adjust to std::vector.
10796         (save_trace_state_variables): Likewise.
10797         (start_tracing): Likewise.
10798         (merge_uploaded_trace_state_variables): Adjust to std::vector
10799         and std::string.
10800         * target.h (struct target_ops)
10801         <to_download_trace_state_variable>: Pass reference to
10802         trace_state_variable.
10803         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10804         * target-delegates.c: Re-generate.
10805         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10806         (mi_tsv_deleted): Likewise.
10807         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10808         * remote.c (remote_download_trace_state_variable): Change
10809         pointer to reference and adjust.
10810         * make-target-delegates (parse_argtypes): Handle references.
10811         (write_function_header): Likewise.
10812         (munge_type): Likewise.
10813
10814 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10815
10816         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10817         string_view-selftests.c.
10818         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10819         testsuite.
10820         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10821         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10822         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10823         * unittests/basic_string_view/element_access/char/1.cc:
10824         Likewise.
10825         * unittests/basic_string_view/element_access/char/empty.cc:
10826         Likewise.
10827         * unittests/basic_string_view/element_access/char/front_back.cc:
10828         Likewise.
10829         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10830         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10831         Likewise.
10832         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10833         Likewise.
10834         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10835         Likewise.
10836         * unittests/basic_string_view/operations/compare/char/1.cc:
10837         Likewise.
10838         * unittests/basic_string_view/operations/compare/char/13650.cc:
10839         Likewise.
10840         * unittests/basic_string_view/operations/copy/char/1.cc:
10841         Likewise.
10842         * unittests/basic_string_view/operations/data/char/1.cc:
10843         Likewise.
10844         * unittests/basic_string_view/operations/find/char/1.cc:
10845         Likewise.
10846         * unittests/basic_string_view/operations/find/char/2.cc:
10847         Likewise.
10848         * unittests/basic_string_view/operations/find/char/3.cc:
10849         Likewise.
10850         * unittests/basic_string_view/operations/find/char/4.cc:
10851         Likewise.
10852         * unittests/basic_string_view/operations/rfind/char/1.cc:
10853         Likewise.
10854         * unittests/basic_string_view/operations/rfind/char/2.cc:
10855         Likewise.
10856         * unittests/basic_string_view/operations/rfind/char/3.cc:
10857         Likewise.
10858         * unittests/basic_string_view/operations/substr/char/1.cc:
10859         Likewise.
10860         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10861         * unittests/string_view-selftests.c: New file.
10862
10863 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10864
10865         * unittests/basic_string_view/capacity/1.cc: New file.
10866         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10867         * unittests/basic_string_view/cons/char/1.cc: New file.
10868         * unittests/basic_string_view/cons/char/2.cc: New file.
10869         * unittests/basic_string_view/cons/char/3.cc: New file.
10870         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10871         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10872         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10873         * unittests/basic_string_view/element_access/char/1.cc: New file.
10874         * unittests/basic_string_view/element_access/char/2.cc: New file.
10875         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10876         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10877         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10878         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10879         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10880         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10881         * unittests/basic_string_view/include.cc: New file.
10882         * unittests/basic_string_view/inserters/char/1.cc: New file.
10883         * unittests/basic_string_view/inserters/char/2.cc: New file.
10884         * unittests/basic_string_view/inserters/char/3.cc: New file.
10885         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10886         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10887         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10888         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10889         * unittests/basic_string_view/literals/types.cc: New file.
10890         * unittests/basic_string_view/literals/values.cc: New file.
10891         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10892         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10893         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10894         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10895         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10896         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10897         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10898         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10899         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10900         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10901         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10902         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10903         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10904         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10905         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10906         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10907         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10908         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10909         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10910         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10911         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10912         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10913         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10914         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10915         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10916         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10917         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10918         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10919         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10920         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10921         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10922         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10923         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10924         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10925         * unittests/basic_string_view/operators/char/2.cc: New file.
10926         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10927         * unittests/basic_string_view/range_access/char/1.cc: New file.
10928         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10929         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10930         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10931         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10932         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10933         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10934         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10935         * unittests/basic_string_view/typedefs.cc: New file.
10936         * unittests/basic_string_view/types/1.cc: New file.
10937
10938 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10939
10940         * common/gdb_string_view.h: Remove libstdc++ implementation
10941         details, adjust to gdb reality.
10942         * common/gdb_string_view.tcc: Likewise.
10943         * cli/cli-script.c (struct string_view): Remove.
10944         (user_args) <m_args>: Change element type to gdb::string_view.
10945         (user_args::insert_args): Adjust.
10946
10947 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10948
10949         * common/gdb_string_view.h: New file.
10950         * common/gdb_string_view.tcc: New file.
10951
10952 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10953
10954         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10955         * configure: Re-generate.
10956
10957 2018-04-09  Pedro Alves  <palves@redhat.com>
10958
10959         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10960         (set_target_gdbarch): Call
10961         gdb::observers::architecture_changed.notify instead of
10962         observer_notify_architecture_changed.
10963
10964 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10965
10966         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10967         (do_restore_current_traceframe_cleanup): Remove.
10968         (restore_current_traceframe_cleanup_dtor): Remove.
10969         (make_cleanup_restore_current_traceframe): Remove.
10970         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10971         New.
10972         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10973         * infrun.c (fetch_inferior_event): Use
10974         scoped_restore_current_traceframe.
10975
10976 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10977
10978         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10979         Remove.
10980         <n_allocated_type_units>: Remove.
10981         <all_type_units>: Change to std::vector.
10982         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10983         to std::vector change.
10984         (dwarf2_per_objfile::get_cutu): Likewise.
10985         (dwarf2_per_objfile::get_tu): Likewise.
10986         (create_signatured_type_table_from_index): Likewise.
10987         (create_signatured_type_table_from_debug_names): Likewise.
10988         (dw2_symtab_iter_next): Likewise.
10989         (dw2_print_stats): Likewise.
10990         (dw2_expand_all_symtabs): Likewise.
10991         (dw2_expand_marked_cus): Likewise.
10992         (dw2_debug_names_iterator::next): Likewise.
10993         (dwarf2_initialize_objfile): Likewise.
10994         (add_signatured_type_cu_to_table): Likewise.
10995         (create_all_type_units): Likewise.
10996         (add_type_unit): Likewise.
10997         (struct tu_abbrev_offset): Add constructor.
10998         (build_type_psymtabs_1): Adjust to std::vector change.
10999         (print_tu_stats): Likewise.
11000         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11001         (write_debug_names): Likewise.
11002
11003 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11004
11005         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11006         Make an std::vector.
11007         <n_comp_units>: Remove.
11008         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11009         to std::vector change.
11010         (dwarf2_per_objfile::get_cutu): Likewise.
11011         (dwarf2_per_objfile::get_cu): Likewise.
11012         (create_cus_from_index): Likewise.
11013         (create_addrmap_from_index): Likewise.
11014         (create_addrmap_from_aranges): Likewise.
11015         (dwarf2_read_index): Likewise.
11016         (dw2_find_last_source_symtab): Likewise.
11017         (dw2_map_symtabs_matching_filename): Likewise.
11018         (dw2_symtab_iter_next): Likewise.
11019         (dw2_print_stats): Likewise.
11020         (dw2_expand_all_symtabs): Likewise.
11021         (dw2_expand_symtabs_with_fullname): Likewise.
11022         (dw2_expand_marked_cus): Likewise.
11023         (dw2_map_symbol_filenames): Likewise.
11024         (create_cus_from_debug_names): Likewise.
11025         (dwarf2_read_debug_names): Likewise.
11026         (dw2_debug_names_iterator::next): Likewise.
11027         (dwarf2_initialize_objfile): Likewise.
11028         (set_partial_user): Likewise.
11029         (dwarf2_build_psymtabs_hard): Likewise.
11030         (read_comp_units_from_section): Remove arguments, adjust to
11031         std::vector change.
11032         (create_all_comp_units): Adjust to std::vector and
11033         read_comp_units_from_section changes.
11034         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11035         change.
11036         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11037         (psyms_seen_size): Likewise.
11038         (write_gdbindex): Likewise.
11039         (write_debug_names): Likewise.
11040
11041 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11042
11043         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11044         with dwarf2_per_objfile.
11045         (create_cus_from_index): Likewise.
11046         (create_signatured_type_table_from_index): Likewise.
11047         (dwarf2_read_index): Likewise.
11048         (dwarf2_initialize_objfile): Likewise.
11049         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11050         per_cu rather than get_dwarf2_per_objfile.
11051
11052 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11053
11054         * dwarf2read.h (struct signatured_type): Forward declare.
11055         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11056         New methods.
11057         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11058         (dw2_get_cutu): ...this.
11059         (dwarf2_per_objfile::get_cu): Rename from...
11060         (dw2_get_cu): ...this.
11061         (dwarf2_per_objfile::get_tu): New.
11062         (create_addrmap_from_index): Adjust.
11063         (create_addrmap_from_aranges): Adjust.
11064         (dw2_find_last_source_symtab): Adjust.
11065         (dw2_map_symtabs_matching_filename): Adjust.
11066         (dw2_symtab_iter_next): Adjust.
11067         (dw2_print_stats): Adjust.
11068         (dw2_expand_all_symtabs): Adjust.
11069         (dw2_expand_symtabs_with_fullname): Adjust.
11070         (dw2_expand_marked_cus): Adjust.
11071         (dw_expand_symtabs_matching_file_matcher): Adjust.
11072         (dw2_map_symbol_filenames): Adjust.
11073         (dw2_debug_names_iterator::next): Adjust.
11074         (dwarf2_initialize_objfile): Adjust.
11075         (set_partial_user): Adjust.
11076         (dwarf2_build_psymtabs_hard): Adjust.
11077
11078 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11079
11080         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11081         Remove unused variables.
11082         (dw2_map_symtabs_matching_filename): Likewise.
11083         (dwarf2_record_block_ranges): Likewise.
11084         (dwarf2_read_addr_index): Likewise.
11085         (follow_die_offset): Likewise.
11086
11087 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11088
11089         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11090         to symbol_file_add_main.
11091
11092 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11093
11094         PR mi/22299
11095         * mi/mi-console.c (do_fputc_async_safe): New.
11096         (mi_console_file::write_async_safe): New.
11097         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11098         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11099         New.
11100         * ui-file.c (ui_file::putstrn): Adjust call to
11101         fputstrn_unfiltered.
11102         * utils.c (printchar): Replace do_fputs and do_fprintf
11103         parameters by do_fputc.
11104         (fputstr_filtered): Adjust call to printchar.
11105         (fputstr_unfiltered): Likewise.
11106         (fputstrn_filtered): Likewise.
11107         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11108         printchar.
11109         * utils.h (do_fputc_ftype): New typedef.
11110         (fputstrn_unfiltered): Add do_fputc parameter.
11111
11112 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11113
11114         * regformats/i386/i386-avx.dat: Remove.
11115
11116 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11117
11118         PR gdb/22979
11119         * amd64-tdep.c (amd64_none_init_abi): New function.
11120         (amd64_x32_none_init_abi): New function.
11121         (_initialize_amd64_tdep): Register handlers for x86-64 and
11122         x64_32 with GDB_OSABI_NONE.
11123         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11124         GDB_OSABI_NONE osabi.
11125
11126 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11127
11128         PR gdb/22980
11129         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11130         GDB_OSABI_NONE.
11131         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11132         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11133
11134 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11135
11136         * common/byte-vector.h (char_vector): New type.
11137         * target.h (target_read_alloc): Return
11138         gdb::optional<byte_vector>.
11139         (target_read_stralloc): Return gdb::optional<char_vector>.
11140         (target_get_osdata): Return gdb::optional<char_vector>.
11141         * target.c (target_read_alloc_1): Templatize.  Replacement
11142         manual memory management with vector.
11143         (target_read_alloc): Change return type, adjust.
11144         (target_read_stralloc): Change return type, adjust.
11145         (target_get_osdata): Change return type, adjust.
11146         * auxv.c (struct auxv_info) <length>: Remove.
11147         <data>: Change type to gdb::optional<byte_vector>.
11148         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11149         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11150         (target_auxv_search): Adjust.
11151         (fprint_target_auxv): Adjust.
11152         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11153         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11154         (linux_make_corefile_notes): Adjust.
11155         * osdata.c (get_osdata): Adjust.
11156         * remote.c (remote_get_threads_with_qxfer): Adjust.
11157         (remote_memory_map): Adjust.
11158         (remote_traceframe_info): Adjust.
11159         (btrace_read_config): Adjust.
11160         (remote_read_btrace): Adjust.
11161         (remote_pid_to_exec_file): Adjust.
11162         * solib-aix.c (solib_aix_get_library_list): Adjust.
11163         * solib-dsbt.c (decode_loadmap): Don't free buf.
11164         (dsbt_get_initial_loadmaps): Adjust.
11165         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11166         * solib-target.c (solib_target_current_sos): Adjust.
11167         * tracepoint.c (sdata_make_value): Adjust.
11168         * xml-support.c (xinclude_start_include): Adjust.
11169         (xml_fetch_content_from_file): Adjust.
11170         * xml-support.h (xml_fetch_another): Change return type.
11171         (xml_fetch_content_from_file): Change return type.
11172         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11173         * xml-tdesc.c (file_read_description_xml): Adjust.
11174         (fetch_available_features_from_target): Change return type.
11175         (target_fetch_description_xml): Adjust.
11176         (target_read_description_xml): Adjust.
11177
11178 2018-04-06  Tom Tromey  <tom@tromey.com>
11179
11180         * value.c (~value): Update.
11181         (struct value) <contents>: Now unique_xmalloc_ptr.
11182         (value_contents_bits_eq, allocate_value_contents)
11183         (value_contents_raw, value_contents_all_raw)
11184         (value_contents_for_printing, value_contents_for_printing_const)
11185         (set_value_enclosing_type): Update.
11186
11187 2018-04-06  Tom Tromey  <tom@tromey.com>
11188
11189         * value.c (range_s): Remove typedef, VEC.
11190         (struct range): Add operator<.
11191         (range_lessthan): Remove.
11192         (ranges_contain): Change type.
11193         (~value): Update.
11194         (struct value) <unavailable, optimized_out>: Now std::vector.
11195         (value_entirely_available)
11196         (value_entirely_covered_by_range_vector)
11197         (value_entirely_unavailable, value_entirely_optimized_out):
11198         Update.
11199         (insert_into_bit_range_vector): Change argument type.
11200         (find_first_range_overlap): Likewise.
11201         (struct ranges_and_idx, value_contents_bits_eq)
11202         (require_not_optimized_out, require_available): Update.
11203         (ranges_copy_adjusted): Change argument types.
11204         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11205
11206 2018-04-06  Tom Tromey  <tom@tromey.com>
11207
11208         * value.c (~value): Update.
11209         (struct value) <parent>: Now a value_ref_ptr.
11210         (value_parent, set_value_parent, value_address, value_copy):
11211         Update.
11212
11213 2018-04-06  Tom Tromey  <tom@tromey.com>
11214
11215         * value.c (struct value): Add constructor, destructor, and member
11216         initializers.
11217         (allocate_value_lazy, value_decref): Update.
11218
11219 2018-04-06  Tom Tromey  <tom@tromey.com>
11220
11221         * value.c (struct value) <released, next>: Remove.
11222         (all_values): Now a std::vector.
11223         (allocate_value_lazy): Update.
11224         (value_next): Remove.
11225         (value_mark, value_free_to_mark, release_value)
11226         (value_release_to_mark): Update.
11227
11228 2018-04-06  Tom Tromey  <tom@tromey.com>
11229
11230         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11231         (free_value_chain): Remove.
11232         * value.c (free_value_chain): Remove.
11233         (value_release_to_mark): Return a std::vector.
11234         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11235         std::vector.
11236         (check_condition): Update.
11237         * eval.c (fetch_subexp_value): Change "val_chain" to a
11238         std::vector.
11239         * breakpoint.c (update_watchpoint): Update.
11240         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11241
11242 2018-04-06  Tom Tromey  <tom@tromey.com>
11243
11244         * value.h (free_all_values): Remove.
11245         * value.c (free_all_values): Remove.
11246
11247 2018-04-06  Tom Tromey  <tom@tromey.com>
11248
11249         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11250         (value_history_chain, value_history_count): Remove.
11251         (value_history): New global.
11252         (record_latest_value, access_value_history, show_values)
11253         (preserve_values): Update.
11254
11255 2018-04-06  Tom Tromey  <tom@tromey.com>
11256
11257         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11258         * varobj.c (varobj_set_display_format, varobj_set_value)
11259         (install_default_visualizer, construct_visualizer)
11260         (install_new_value, ~varobj, varobj_get_value_type)
11261         (my_value_of_variable, varobj_editable_p): Update.
11262         * c-varobj.c (c_describe_child, c_value_of_variable)
11263         (cplus_number_of_children, cplus_describe_child): Update.
11264         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11265         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11266         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11267
11268 2018-04-06  Tom Tromey  <tom@tromey.com>
11269
11270         * printcmd.c (last_examine_address): Change type to
11271         value_ref_ptr.
11272         (do_examine, x_command): Update.
11273
11274 2018-04-06  Tom Tromey  <tom@tromey.com>
11275
11276         * value.c (release_value): Update.
11277         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11278         (struct bpstats) <val>: Now a value_ref_ptr.
11279         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11280         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11281         (~watchpoint, print_it_watchpoint, watch_command_1)
11282         (invalidate_bp_value_on_memory_change): Update.
11283
11284 2018-04-06  Tom Tromey  <tom@tromey.com>
11285
11286         * varobj.c (varobj_clear_saved_item)
11287         (update_dynamic_varobj_children, install_new_value, ~varobj):
11288         Update.
11289         * value.h (value_incref): Move declaration earlier.
11290         (value_decref): Rename from value_free.
11291         (struct value_ref_policy): New.
11292         (value_ref_ptr): New typedef.
11293         (struct value_deleter): Remove.
11294         (gdb_value_up): Remove typedef.
11295         (release_value): Change return type.
11296         (release_value_or_incref): Remove.
11297         * value.c (set_value_parent): Update.
11298         (value_incref): Change return type.
11299         (value_decref): Rename from value_free.
11300         (value_free_to_mark, free_all_values, free_value_chain): Update.
11301         (release_value): Return value_ref_ptr.
11302         (release_value_or_incref): Remove.
11303         (record_latest_value, set_internalvar, clear_internalvar):
11304         Update.
11305         * stack.c (info_frame_command): Don't call value_free.
11306         * python/py-value.c (valpy_dealloc, valpy_new)
11307         (value_to_value_object): Update.
11308         * printcmd.c (do_examine): Update.
11309         * opencl-lang.c (lval_func_free_closure): Update.
11310         * mi/mi-main.c (register_changed_p): Don't call value_free.
11311         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11312         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11313         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11314         value_free.
11315         * guile/scm-value.c (vlscm_free_value_smob)
11316         (vlscm_scm_from_value): Update.
11317         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11318         (frame_unwind_register_unsigned, get_frame_register_bytes)
11319         (put_frame_register_bytes): Don't call value_free.
11320         * findvar.c (address_from_register): Don't call value_free.
11321         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11322         * dwarf2loc.c (entry_data_value_free_closure)
11323         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11324         (dwarf2_evaluate_loc_desc_full): Update.
11325         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11326         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11327         (~watchpoint, watch_command_1)
11328         (invalidate_bp_value_on_memory_change): Update.
11329         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11330
11331 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11332
11333         PR gdb/23022
11334         * warning.m4: Add -Wno-error=deprecated-register.
11335         * configure: Re-generate.
11336
11337 2018-04-05  Tom Tromey  <tom@tromey.com>
11338
11339         * linespec.h: Remove include of "vec.h".
11340
11341 2018-04-05  Tom Tromey  <tom@tromey.com>
11342
11343         * linespec.c (typep): Remove typedef.
11344         (find_methods, find_superclass_methods): Take a std::vector.
11345         (find_method): Use std::vector.
11346
11347 2018-04-05  Tom Tromey  <tom@tromey.com>
11348
11349         * utils.c (compare_strings): Remove.
11350         * utils.h (compare_strings): Remove.
11351         * objc-lang.h (find_imps): Update.
11352         * objc-lang.c (find_methods): Take a std::vector.
11353         (uniquify_strings, find_imps): Likewise.
11354         * linespec.c (find_methods): Take a std::vector.
11355         (decode_objc): Use std::vector.
11356         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11357         a std::vector.
11358         (find_method, find_function_symbols): Use std::vector.
11359
11360 2018-04-05  Tom Tromey  <tom@tromey.com>
11361
11362         * completer.c (completion_tracker::completion_tracker): Remove
11363         cast.
11364         (completion_tracker::discard_completions): Likewise.
11365         * breakpoint.c (ambiguous_names_p): Remove cast.
11366         * ada-lang.c (_initialize_ada_language): Remove cast.
11367         * utils.h (streq): Update.
11368         (streq_hash): Add new declaration.
11369         * utils.c (streq): Return bool.
11370         (streq_hash): New function.
11371
11372 2018-04-05  Tom Tromey  <tom@tromey.com>
11373
11374         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11375         Remove a string copy.
11376
11377 2018-04-05  Tom Tromey  <tom@tromey.com>
11378
11379         * linespec.c (filter_results): Use std::vector.
11380         (decode_line_2, decode_line_full): Update.
11381
11382 2018-04-05  Tom Tromey  <tom@tromey.com>
11383
11384         * linespec.c (canonical_to_fullform): Return std::string.
11385         (filter_results): Update.
11386         (struct decode_line_2_item): Add constructor.
11387         <fullform, displayform>: Now std::string.
11388         (decode_line_2_compare_items): Now a std::sort comparator.
11389         (decode_line_2): Update.
11390
11391 2018-04-05  Tom Tromey  <tom@tromey.com>
11392
11393         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11394         (unexpected_linespec_error): Update.
11395         (linespec_parse_basic, parse_linespec): Update.
11396
11397 2018-04-05  Tom Tromey  <tom@tromey.com>
11398
11399         * linespec.c (linespec_parse_basic): Reindent.
11400
11401 2018-04-05  Tom Tromey  <tom@tromey.com>
11402
11403         * minsyms.h (iterate_over_minimal_symbols): Update.
11404         * minsyms.c (iterate_over_minimal_symbols): Take a
11405         gdb::function_view.
11406         * linespec.c (struct collect_minsyms): Remove.
11407         (compare_msyms): Now a std::sort comparator.
11408         (add_minsym): Add parameters.
11409         (search_minsyms_for_name): Update.  Use std::vector.
11410
11411 2018-04-03  Tom Tromey  <tom@tromey.com>
11412
11413         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11414         gdb::byte_vector.
11415
11416 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11417
11418         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11419
11420 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11421
11422         PR gdb/16959
11423         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11424         printing static type.
11425
11426 2018-04-01  Tom Tromey  <tom@tromey.com>
11427
11428         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11429         (rs6000_xfer_shared_libraries): Update.
11430
11431 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11432
11433         * common/gdb_vecs.h (char_ptr): Remove.
11434         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11435
11436 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11437
11438         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11439         with std::vector.
11440         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11441
11442 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11443
11444         * tracepoint.h (struct uploaded_tp): Initialize fields.
11445         <actions, step_actions, cmd_strings>: Change type to
11446         std::vector<char *>.
11447         * tracepoint.c (get_uploaded_tp): Allocate with new.
11448         (free_uploaded_tps): Free with delete.
11449         (parse_tracepoint_definition): Adjust to std::vector change.
11450         * breakpoint.c (read_uploaded_action): Likewise.
11451         (create_tracepoint_from_upload): Likewise.
11452         * ctf.c (ctf_write_uploaded_tp): Likewise.
11453         (SET_ARRAY_FIELD): Likewise.
11454         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11455
11456 2018-03-30  Tom Tromey  <tom@tromey.com>
11457
11458         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11459         std::unique_ptr.
11460         (svr4_keep_data_in_core): Update.
11461         (svr4_read_so_list): Update.
11462
11463 2018-03-30  Tom Tromey  <tom@tromey.com>
11464
11465         * windows-nat.c (handle_output_debug_string, handle_exception):
11466         Update.
11467         * target.h (target_read_string): Update.
11468         * target.c (target_read_string): Change "string" to
11469         unique_xmalloc_ptr.
11470         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11471         Update.
11472         * solib-frv.c (frv_current_sos): Update.
11473         * solib-dsbt.c (dsbt_current_sos): Update.
11474         * solib-darwin.c (darwin_current_sos): Update.
11475         * linux-thread-db.c (inferior_has_bug): Update.
11476         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11477         Update.  Remove alloca.
11478         * ada-lang.c (ada_main_name): Update.
11479
11480 2018-03-30  Tom Tromey  <tom@tromey.com>
11481
11482         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11483         (struct dwo_file_deleter): New.
11484         (dwo_file_up): New typedef.
11485         (open_and_init_dwo_file): Use dwo_file_up.
11486         (free_dwo_file_cleanup): Remove.
11487
11488 2018-03-30  Tom Tromey  <tom@tromey.com>
11489
11490         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11491         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11492
11493 2018-03-30  Tom Tromey  <tom@tromey.com>
11494
11495         * dwarf2read.c (class free_cached_comp_units): New class.
11496         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11497         (free_cached_comp_units): Remove function.
11498
11499 2018-03-30  Tom Tromey  <tom@tromey.com>
11500
11501         * utils.h (make_cleanup_unpush_target): Remove.
11502         * inf-ptrace.c (struct target_unpusher): New.
11503         (target_unpush_up) New typedef.
11504         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11505         target_unpush_up.
11506         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11507
11508 2018-03-27  Tom Tromey  <tom@tromey.com>
11509
11510         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11511
11512 2018-03-27  Pedro Alves  <palves@redhat.com>
11513             Tom Tromey  <tom@tromey.com>
11514
11515         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11516         destructor.  Now a class.
11517         (gdb_readline_wrapper_cleanup): Remove function.
11518         (gdb_readline_wrapper): Remove cleanups.
11519
11520 2018-03-27  Tom Tromey  <tom@tromey.com>
11521
11522         * typeprint.h (struct type_print_options) <local_typedefs,
11523         global_typedefs>: Remove "struct" keyword.
11524         (class typedef_hash_table): New class.
11525         (recursively_update_typedef_hash, add_template_parameters)
11526         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11527         (find_typedef_in_hash): Don't declare.
11528         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11529         (typedef_hash_table::recursively_update): Rename from
11530         recursively_update_typedef_hash.  Now a member.
11531         (typedef_hash_table::add_template_parameters): Rename from
11532         add_template_parameters.  Now a member.
11533         (typedef_hash_table::typedef_hash_table): Now a constructor;
11534         rename from create_typedef_hash.
11535         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11536         rename from free_typedef_hash.
11537         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11538         (do_free_global_table): Remove.
11539         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11540         from copy_type_recursive.
11541         (create_global_typedef_table): Remove.
11542         (typedef_hash_table::find_global_typedef): Now a member of
11543         typedef_hash_table.
11544         (typedef_hash_table::find_typedef): Rename from
11545         find_typedef_in_hash; now a member.
11546         (whatis_exp): Update.
11547         * extension.h (struct ext_lang_type_printers): Add constructor and
11548         destructor.
11549         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11550         declare.
11551         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11552         Now a constructor; rename from start_ext_lang_type_printers.
11553         (ext_lang_type_printers): Now a destructor; rename from
11554         free_ext_lang_type_printers.
11555         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11556         Update.
11557         (c_type_print_base_struct_union): Update.  Remove cleanups.
11558
11559 2018-03-27  Tom Tromey  <tom@tromey.com>
11560
11561         * dwarf-index-write.c: Include <cmath>.
11562
11563 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11564
11565         * NEWS: Add entry describing new "set|show varsize-limit" command.
11566         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11567         command.
11568         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11569         "set variable".
11570
11571 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11572
11573         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11574         dwarf-index-write.c
11575         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11576         * dwarf-index-common.c: New file.
11577         * dwarf-index-common.h: New file.
11578         * dwarf-index-write.c: New file.
11579         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11580         (struct dwarf2_section_info): Move from here.
11581         (dwarf2_section_info_def): Likewise.
11582         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11583         (offset_type): Likewise.
11584         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11585         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11586         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11587         (byte_swap): Likewise.
11588         (MAYBE_SWAP): Likewise.
11589         (dwarf2_per_cu_ptr): Likewise.
11590         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11591         (struct tu_stats): Likewise.
11592         (struct dwarf2_per_objfile): Likewise.
11593         (struct dwarf2_per_cu_data): Likewise.
11594         (struct signatured_type): Likewise.
11595         (sig_type_ptr): Likewise.
11596         (DEF_VEC_P (sig_type_ptr)): Likewise.
11597         (INDEX4_SUFFIX): Likewise.
11598         (INDEX5_SUFFIX): Likewise.
11599         (DEBUG_STR_SUFFIX): Likewise.
11600         (dwarf2_read_section): Make non-static.
11601         (mapped_index_string_hash): Move from here.
11602         (dwarf5_djb_hash): Likewise.
11603         (file_write): Likewise.
11604         (class data_buf): Likewise.
11605         (struct symtab_index_entry): Likewise.
11606         (struct mapped_symtab): Likewise.
11607         (find_slot): Likewise.
11608         (hash_expand): Likewise.
11609         (add_index_entry): Likewise.
11610         (uniquify_cu_indices): Likewise.
11611         (class c_str_view): Likewise.
11612         (class c_str_view_hasher): Likewise.
11613         (class vector_hasher): Likewise.
11614         (write_hash_table): Likewise.
11615         (psym_index_map): Likewise.
11616         (struct addrmap_index_data): Likewise.
11617         (add_address_entry): Likewise.
11618         (add_address_entry_worker): Likewise.
11619         (write_address_map): Likewise.
11620         (symbol_kind): Likewise.
11621         (write_psymbols): Likewise.
11622         (struct signatured_type_index_data): Likewise.
11623         (write_one_signatured_type): Likewise.
11624         (recursively_count_psymbols): Likewise.
11625         (recursively_write_psymbols): Likewise.
11626         (class debug_names): Likewise.
11627         (check_dwarf64_offsets): Likewise.
11628         (psyms_seen_size): Likewise.
11629         (write_gdbindex): Likewise.
11630         (write_debug_names): Likewise.
11631         (assert_file_size): Likewise.
11632         (write_psymtabs_to_index): Likewise.
11633         (save_gdb_index_command): Likewise.
11634         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11635         command.
11636         * dwarf2read.h: New file.
11637
11638 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11639
11640         PR gdb/22670
11641         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11642         symbol name if the CU's language stores symbol names in linkage
11643         format.
11644         * language.h (struct language_defn)
11645         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11646         all instances of this struct.
11647
11648 2018-03-26  Tom Tromey  <tom@tromey.com>
11649
11650         * stack.c (backtrace_command_1): Remove verbose code.
11651
11652 2018-03-26  Tom Tromey  <tom@tromey.com>
11653
11654         * python/py-framefilter.c (py_print_type): Don't catch
11655         exceptions.  Return void.
11656         (py_print_value): Likewise.
11657         (py_print_single_arg): Likewise.
11658         (enumerate_args): Don't catch exceptions.
11659         (py_print_args): Likewise.
11660         (py_print_frame): Likewise.
11661         (gdbpy_apply_frame_filter): Catch exceptions here.
11662
11663 2018-03-26  Tom Tromey  <tom@tromey.com>
11664
11665         * stack.c (_initialize_stack): Remove trailing newlines from help
11666         text.  Add "Usage" line to "backtrace" help.
11667
11668 2018-03-26  Tom Tromey  <tom@tromey.com>
11669
11670         PR python/16486:
11671         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11672
11673 2018-03-26  Tom Tromey  <tom@tromey.com>
11674
11675         * python/py-framefilter.c (py_print_single_arg): Return
11676         EXT_LANG_BT_ERROR from catch.
11677
11678 2018-03-26  Tom Tromey  <tom@tromey.com>
11679
11680         PR backtrace/15584:
11681         * stack.c (backtrace_command_1): Move some code into no-filters
11682         "if".
11683
11684 2018-03-26  Tom Tromey  <tom@tromey.com>
11685
11686         * python/py-framefilter.c (throw_quit_or_print_exception): New
11687         function.
11688         (gdbpy_apply_frame_filter): Use it.
11689
11690 2018-03-26  Tom Tromey  <tom@tromey.com>
11691
11692         PR cli/17716:
11693         * python/py-framefilter.c (py_print_type, py_print_value)
11694         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11695         RETURN_MASK_ERROR.
11696
11697 2018-03-26  Tom Tromey  <tom@tromey.com>
11698
11699         * python/py-framefilter.c (enumerate_args): Use
11700         gdb::unique_xmalloc_ptr.
11701
11702 2018-03-26  Tom Tromey  <tom@tromey.com>
11703
11704         * python/py-framefilter.c (py_print_frame): Return
11705         EXT_LANG_BT_OK.
11706         (gdbpy_apply_frame_filter): Update comment.
11707         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11708         Remove.
11709         <EXT_LANG_BT_NO_FILTERS>: Change value.
11710
11711 2018-03-26  Tom Tromey  <tom@tromey.com>
11712
11713         PR backtrace/15582:
11714         * stack.c (backtrace_command): Parse "hide" argument.
11715         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11716         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11717         constant.
11718
11719 2018-03-26  Tom Tromey  <tom@tromey.com>
11720
11721         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11722         add "flags".
11723         (backtrace_command): Remove "fulltrace", add "flags".
11724
11725 2018-03-26  Tom Tromey  <tom@tromey.com>
11726
11727         * stack.c (backtrace_command): Rewrite command line parsing.
11728
11729 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11730
11731         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11732
11733 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11734
11735         * filename-seen-cache.h: Add include guard.
11736
11737 2018-03-26  Keith Seitz  <keiths@redhat.com>
11738
11739         * symfile.c (place_section): Remove "struct" from section_addr_info
11740         in comment.
11741         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11742         "struct" keyword from section_addr_info.
11743
11744 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11745
11746         * regformats/regdef.h (reg): Add constructors.
11747
11748 2018-03-25  Pedro Alves  <palves@redhat.com>
11749
11750         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11751         if then/else bodies in var_func_name extraction.
11752
11753 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11754
11755         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11756         lookup_minimal_symbol() to find symbol entry.
11757         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11758
11759 2018-03-23  Keith Seitz  <keiths@redhat.com>
11760
11761         PR c++/22968
11762         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11763         nested type definitions for C++, too.
11764
11765 2018-03-23  Tom Tromey  <tom@tromey.com>
11766
11767         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11768         a typedef.
11769         (macho_register_oso): Remove.
11770         (macho_symtab_read): Take a std::vector.
11771         (oso_el_compare_name): Now a std::sort comparator.
11772         (macho_symfile_read_all_oso): Take a std::vector.
11773         (macho_symfile_read): Use std::vector.  Remove cleanups.
11774
11775 2018-03-22  Tom Tromey  <tom@tromey.com>
11776
11777         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11778         (record_full_goto_bookmark): Use std::string.
11779
11780 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11781
11782         PR tdep/18295
11783         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11784         a single mask.
11785
11786 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11787
11788         * rs6000-tdep.c (store_insn_p): New function.
11789         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11790         and cr_reg to their unshifted values. Use store_insn_p to
11791         match LR saves using either R1 or fdata->alloca_reg. Use
11792         store_insn_p to match CR saves. Set alloca_reg_offset
11793         when alloca_reg and framep are set. Remove lr_reg shift
11794         when assigning to fdata->lr_register.
11795
11796 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11797
11798         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11799         command line args instead of emitting a warning.
11800
11801 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11802
11803         * tracepoint.h (struct static_tracepoint_marker): Initialize
11804         fields, define default constructor, move constructor and move
11805         assignment, disable the rest.
11806         <str_id, extra>: Make std::string.
11807         (release_static_tracepoint_marker): Remove.
11808         (free_current_marker): Remove.
11809         * tracepoint.c (free_current_marker): Remove.
11810         (parse_static_tracepoint_marker_definition): Adjust to
11811         std::string, use new hex2str overload.
11812         (release_static_tracepoint_marker): Remove.
11813         (print_one_static_tracepoint_marker): Get marker by reference
11814         and adjust to std::string.
11815         (info_static_tracepoint_markers_command): Adjust to std::vector
11816         changes
11817         * target.h (static_tracepoint_marker_p): Remove typedef.
11818         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11819         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11820         bool.
11821         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11822         * target-debug.h
11823         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11824         (target_debug_print_std_vector_static_tracepoint_marker): New.
11825         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11826         to...
11827         (target_debug_print_static_tracepoint_marker_p): ... this.
11828         * target-delegates.c: Re-generate.
11829         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11830         Make std::string.
11831         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11832         (decode_static_tracepoint_spec): Adjust to std::vector.
11833         (tracepoint_print_one_detail): Adjust to std::string.
11834         (strace_marker_decode_location): Adjust to std::string.
11835         (update_static_tracepoint): Adjust to std::string, remove call
11836         to release_static_tracepoint_marker.
11837         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11838         Adjust to std::vector.
11839         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11840         (remote_static_tracepoint_markers_by_strid): Adjust to
11841         std::vector.
11842         * common/rsp-low.h (hex2str): New overload with explicit count
11843         of bytes.
11844         * common/rsp-low.c (hex2str): New overload with explicit count
11845         of bytes.
11846         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11847         (_initialize_rsp_low_selftests): Add test_hex2str test.
11848         * unittests/tracepoint-selftests.c
11849         (test_parse_static_tracepoint_marker_definition): Adjust to
11850         std::string.
11851
11852 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11853
11854         * tracepoint.c (parse_static_tracepoint_marker_definition):
11855         Consider case where the definition is followed by more
11856         definitions.
11857         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11858         tracepoint-selftests.c.
11859         * unittests/tracepoint-selftests.c: New.
11860
11861 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11862
11863         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11864         Carvalho.
11865
11866 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11867
11868         * symtab.c (find_pc_sect_line): fixed indentation.
11869
11870 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11871
11872         * symtab.c (find_pc_sect_line): now uses binary search.
11873
11874 2018-03-19  Tom Tromey  <tom@tromey.com>
11875
11876         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11877         "IDENT" production.
11878
11879 2018-03-19  Pedro Alves  <palves@redhat.com>
11880             Tom Tromey  <tom@tromey.com>
11881
11882         * unittests/observable-selftests.c: New file.
11883         * common/observable.h: New file.
11884         * observable.h: New file.
11885         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11886         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11887         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11888         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11889         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11890         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11891         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11892         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11893         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11894         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11895         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11896         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11897         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11898         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11899         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11900         tui/tui-interp.c, valops.c: Update all users.
11901         * tui/tui-hooks.c (tui_bp_created_observer)
11902         (tui_bp_deleted_observer, tui_bp_modified_observer)
11903         (tui_inferior_exit_observer, tui_before_prompt_observer)
11904         (tui_normal_stop_observer, tui_register_changed_observer):
11905         Remove.
11906         (tui_observers_token): New global.
11907         (attach_or_detach, tui_attach_detach_observers): New functions.
11908         (tui_install_hooks, tui_remove_hooks): Use
11909         tui_attach_detach_observers.
11910         * record-btrace.c (record_btrace_thread_observer): Remove.
11911         (record_btrace_thread_observer_token): New global.
11912         * observer.sh: Remove.
11913         * observer.c: Rename to observable.c.
11914         * observable.c (namespace gdb_observers): Define new objects.
11915         (observer_debug): Move into gdb_observers namespace.
11916         (struct observer, struct observer_list, xalloc_observer_list_node)
11917         (xfree_observer_list_node, generic_observer_attach)
11918         (generic_observer_detach, generic_observer_notify): Remove.
11919         (_initialize_observer): Update.
11920         Don't include observer.inc.
11921         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11922         (clean mostlyclean): Likewise.
11923         (observer.h, observer.inc): Remove targets.
11924         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11925         (COMMON_SFILES): Use observable.c, not observer.c.
11926         * .gitignore: Remove observer.h.
11927
11928 2018-03-18  Tom Tromey  <tom@tromey.com>
11929
11930         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11931         gdb::def_vector.
11932         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11933
11934 2018-03-17  Tom Tromey  <tom@tromey.com>
11935
11936         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11937
11938 2018-03-17  Tom Tromey  <tom@tromey.com>
11939
11940         * target.c (class scoped_target_fd): New.
11941         (target_fileio_close_cleanup): Remove.
11942         (target_fileio_read_alloc_1): Use scoped_target_fd.
11943
11944 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11945
11946         * silent-rules.mk: New.
11947         * Makefile.in: Include silent-rules.mk
11948         (srcdir, VPATH, top_srcdir): Move up.
11949         (COMPILE): Add ECHO_CXX.
11950         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11951         (init.c): Add ECHO_INIT_C.
11952         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11953         (version.c): Add ECHO_GEN.
11954         (printcmd.o): Add ECHO_CXX.
11955         (target-float.o): Add ECHO_CXX.
11956         (ada-exp.o): Add ECHO_CXX.
11957         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11958         (insight$(EXEEXT)): Add ECHO_CXXLD.
11959         * gnulib/configure.ac: Add AM_SILENT_RULES.
11960         * gnulib/aclocal.m4: Re-generate.
11961         * gnulib/configure: Re-generate.
11962         * gnulib/import/Makefile.in: Re-generate.
11963
11964 2018-03-16  Tom Tromey  <tom@tromey.com>
11965
11966         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11967         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11968         * utils.c (do_free_section_addr_info)
11969         (make_cleanup_free_section_addr_info): Remove.
11970         * symfile.h (struct other_sections): Add constructor.
11971         (struct section_addr_info): Remove.
11972         (section_addr_info): New typedef.
11973         (struct sym_fns) <sym_offsets>: Change type of parameter.
11974         (build_section_addr_info_from_objfile)
11975         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11976         (default_symfile_offsets, symbol_file_add)
11977         (symbol_file_add_from_bfd)
11978         (build_section_addr_info_from_section_table): Update.
11979         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11980         * symfile.c (alloc_section_addr_info): Remove.
11981         (build_section_addr_info_from_section_table): Change return type.
11982         Update.
11983         (build_section_addr_info_from_bfd)
11984         (build_section_addr_info_from_objfile): Likewise.
11985         (free_section_addr_info): Remove.
11986         (relative_addr_info_to_section_offsets): Change type of "addrs".
11987         (addrs_section_compar): Now a std::sort comparator.
11988         (addrs_section_sort): Change return type.
11989         (addr_info_make_relative): Change type of "addrs".  Update.
11990         (default_symfile_offsets, syms_from_objfile_1)
11991         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11992         (symbol_file_add_separate): Update.
11993         (symbol_file_add): Change type of "addrs".  Update.
11994         (add_symbol_file_command): Update.  Remove cleanups.
11995         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11996         cleanups.
11997         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11998         * solib.c (solib_read_symbols): Update.
11999         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12000         * machoread.c (macho_symfile_offsets): Update.
12001         * jit.c (jit_bfd_try_read_symtab): Update.
12002
12003 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12004
12005         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12006         unittests/utils-selftests.c.
12007         * unittests/utils-selftests.c: New file.
12008
12009 2018-03-14  Tom Tromey  <tom@tromey.com>
12010
12011         PR cli/14977:
12012         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12013         for NULL.
12014
12015 2018-03-14  Tom Tromey  <tom@tromey.com>
12016
12017         PR cli/19918:
12018         * printcmd.c (printf_pointer): Allow "-" in format.
12019
12020 2018-03-14  Tom Tromey  <tom@tromey.com>
12021
12022         * printcmd.c (_initialize_printcmd): Add usage to printf.
12023
12024 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12025
12026         * MAINTAINERS: Update my email address.
12027
12028 2018-03-13  Tom Tromey  <tom@tromey.com>
12029
12030         * machoread.c (macho_check_dsym): Change filenamep to a
12031         std::string*.
12032         (macho_symfile_read): Update.
12033         * symfile.c (load_command): Use std::string.
12034
12035 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12036
12037         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12038         to error message string.
12039         (riscv_register_name): Use xsnprintf instead of sprintf.
12040         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12041         internal_error.
12042         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12043         error.
12044         (riscv_push_dummy_call): Likewise.
12045
12046 2018-03-12  Tom Tromey  <tom@tromey.com>
12047
12048         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12049         Use gdb::byte_vector.
12050         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12051
12052 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12053
12054         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12055         parameter type to readable_regcache.
12056         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12057         the declaration.
12058
12059 2018-03-11  Tom Tromey  <tom@tromey.com>
12060
12061         * dwarf2read.c (struct nextfield): Add initializers.
12062         (struct nextfnfield): Remove.
12063         (struct fnfieldlist): Add initializers.  Remove "length" and
12064         "head", use std::vector.
12065         (struct decl_field_list): Remove.
12066         (struct field_info): Add initializers.
12067         <fields, baseclasses>: Now std::vector.
12068         <nbaseclasses, nfnfields, typedef_field_list_count,
12069         nested_types_list_count>: Remove.
12070         (dwarf2_add_field, dwarf2_add_type_defn)
12071         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12072         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12073         (process_structure_scope): Update.
12074
12075 2018-03-11  Tom Tromey  <tom@tromey.com>
12076
12077         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12078         for use by std::sort.
12079         (build_type_psymtabs_1): Use std::vector.
12080
12081 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12082
12083         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12084         and LIBMPFR in the printed configuration.
12085
12086 2018-03-08  Tom Tromey  <tom@tromey.com>
12087
12088         * source.c (get_filename_and_charpos): Use scoped_fd.
12089         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12090         (procfs_pidlist): Likewise.
12091         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12092         (iterate_over_mappings): Likewise.
12093
12094 2018-03-08  Tom Tromey  <tom@tromey.com>
12095
12096         * infcall.c (struct call_return_meta_info)
12097         <stack_temporaries_enabled>: Remove.
12098         (get_call_return_value, call_function_by_hand_dummy): Update.
12099         * thread.c (disable_thread_stack_temporaries): Remove.
12100         (enable_thread_stack_temporaries): Remove.
12101         (thread_stack_temporaries_enabled_p): Return bool.
12102         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12103         (get_last_thread_stack_temporary): Update.
12104         * eval.c (evaluate_subexp): Update.
12105         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12106         class, not a function.
12107         (value_ptr, value_vec): Remove typedefs.
12108         (class thread_info) <stack_temporaries_enabled>: Now bool.
12109         <stack_temporaries>: Now a std::vector.
12110         (thread_stack_temporaries_enabled_p)
12111         (value_in_thread_stack_temporaries): Return bool.
12112
12113 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12114
12115         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12116         (getpkt_or_notif_sane_1): Likewise.
12117
12118 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12119
12120         * build-id.c (build_id_to_debug_bfd): Use std::string.
12121
12122 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12123
12124         * build-id.c (find_separate_debug_file_by_buildid): Return
12125         std::string.
12126         * build-id.h (find_separate_debug_file_by_buildid): Return
12127         std::string.
12128         * coffread.c (coff_symfile_read): Adjust to std::string.
12129         * elfread.c (elf_symfile_read): Adjust to std::string.
12130         * symfile.c (separate_debug_file_exists): Change parameter to
12131         std::string.
12132         (find_separate_debug_file): Return std::string.
12133         (find_separate_debug_file_by_debuglink): Return std::string.
12134         * symfile.h (find_separate_debug_file_by_debuglink): Return
12135         std::string.
12136
12137 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12138
12139         * common/xml-utils.c (xml_escape_text): Move code to...
12140         (xml_escape_text_append): ... this new function.
12141         * common/xml-utils.h (xml_escape_text_append): New declaration.
12142         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12143         New function.
12144         (_initialize_xml_utils): register test_xml_escape_text_append as
12145         a selftest.
12146
12147 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12148
12149         * defs.h: Remove MAX_REGISTER_SIZE.
12150         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12151         asserts.
12152         * python/py-unwind.c (pyuw_sniffer): Likewise.
12153
12154 2018-03-07  Tom Tromey  <tom@tromey.com>
12155
12156         * linux-tdep.c (linux_info_proc): Update.
12157         * target.h (struct target_ops) <to_fileio_readlink>: Return
12158         optional<string>.
12159         (target_fileio_readlink): Return optional<string>.
12160         * remote.c (remote_hostio_readlink): Return optional<string>.
12161         * inf-child.c (inf_child_fileio_readlink): Return
12162         optional<string>.
12163         * target.c (target_fileio_readlink): Return optional<string>.
12164
12165 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12166
12167         * regcache.c (cooked_read_test): Add riscv to the list of
12168         architectures that have a save_reggroup.
12169
12170 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12171
12172         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12173         value is not a dynamic class object.
12174
12175 2018-03-06  Tom Tromey  <tom@tromey.com>
12176
12177         * rust-exp.y: Formatting fixes.
12178
12179 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12180
12181         * riscv-tdep.c (riscv_register_name): Remove target description
12182         support.
12183         (riscv_gdbarch_init): Remove target description check.
12184
12185 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12186
12187         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12188         comment.
12189         * riscv-tdep.h: Likewise.
12190
12191 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12192
12193         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12194         (riscv_pseudo_register_write): Delete.
12195         (riscv_gdbarch_init): Remove all use of pseudo registers.
12196
12197 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12198
12199         * record-btrace.c (btrace_print_lines): Replace cleanup
12200         parameter with RAII equivalents.
12201         (btrace_insn_history): Replace cleanup with RAII equivalents.
12202         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12203         make_cleanup_ui_out_tuple_begin_end): Remove.
12204         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12205         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12206         make_cleanup_ui_out_list_begin_end): Remove.
12207
12208 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12209
12210         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12211         parameter types to std::vector.  Use bool.
12212         (record_btrace_wait): Replace VEC(tp_t) with
12213         std::vector<thread_info *>.
12214         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12215
12216 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12217
12218         * record-btrace.c (record_btrace_disable_callback): Remove.
12219         (struct scoped_btrace_disable): New.
12220         (record_btrace_open): Use scoped_btrace_disable.
12221
12222 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12223
12224         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12225         reading values from registers.
12226
12227 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12228
12229         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12230         where appropriate.
12231
12232 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12233
12234         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12235         change parameter type.  Use GDB's print functions, and use
12236         core_addr_to_string where appropriate.
12237         (riscv_push_dummy_call): Use core_addr_to_string where
12238         appropriate, update call to riscv_print_arg_location, and reindent
12239         a few lines.
12240         (riscv_return_value): Update call to riscv_print_arg_location.
12241
12242 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12243             Tim Newsome <tim@sifive.com>
12244             Albert Ou <a0u@eecs.berkeley.edu>
12245             Darius Rad <darius@bluespec.com>
12246
12247         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12248         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12249         (ALLDEPFILES): Add riscv-tdep.c
12250         * configure.tgt: Add riscv support.
12251         * riscv-tdep.c: New file.
12252         * riscv-tdep.h: New file.
12253         * NEWS: Mention new target.
12254         * MAINTAINERS: Add entry for riscv.
12255
12256 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12257
12258         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12259         fields within aggregates.
12260
12261 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12262
12263         * record-btrace.c (btrace_print_lines): Change type of flags to
12264         gdb_disassembly_flags.
12265
12266 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12267
12268         * fbsd-nat.c: Include "inf-ptrace.h".
12269         (USE_SIGTRAP_SIGINFO): Conditionally define.
12270         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12271         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12272         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12273         function.
12274         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12275         Likewise.
12276         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12277         Likewise.
12278         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12279         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12280         "supports_stopped_by_hw_breakpoint" target methods.
12281
12282 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12283
12284         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12285         * fbsd-nat.c (debug_fbsd_nat): New variable.
12286         (show_fbsd_nat_debug): New function.
12287         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12288         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12289
12290 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12291
12292         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12293         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12294         prototype.
12295         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12296         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12297         method.
12298
12299 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12300
12301         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12302         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12303
12304 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12305
12306         * charset.c (struct charset_vector): New.
12307         (charsets): Change type to charset_vector.
12308         (find_charset_names): Adjust.
12309         (add_one): Adjust.
12310         (_initialize_charset): Adjust.
12311
12312 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12313
12314         * progspace.h (struct program_space) <deleted_solibs>: Change
12315         type to std::vector<std::string>.
12316         * progspace.c (clear_program_space_solib_cache): Adjust.
12317         * breakpoint.c (print_solib_event): Adjust.
12318         (check_status_catch_solib): Adjust.
12319         * solib.c (update_solib_list): Adjust.
12320         * ui-out.h (class ui_out) <field_string>: New overload.
12321         * ui-out.c (ui_out::field_string): New overload.
12322
12323 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12324
12325         * progspace.h (struct program_space): Add constructor and
12326         destructor, initialize fields.
12327         (add_program_space): Remove.
12328         * progspace.c (add_program_space): Rename to...
12329         (program_space::program_space): ... this.
12330         (release_program_space): Rename to...
12331         (program_space::~program_space): ... this.
12332         (delete_program_space): Use delete to delete program_space.
12333         (initialize_progspace): Use new to allocate program_space.
12334         * inferior.c (add_inferior_with_spaces): Likewise.
12335         (clone_inferior_command): Likewise.
12336         * infrun.c (follow_fork_inferior): Likewise.
12337         (handle_vfork_child_exec_or_exit): Likewise.
12338
12339 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12340
12341         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12342         (delim_string_to_char_ptr_vec): Return std::vector of
12343         gdb::unique_xmalloc_ptr.
12344         (dirnames_to_char_ptr_vec_append): Take std::vector of
12345         gdb::unique_xmalloc_ptr.
12346         (dirnames_to_char_ptr_vec): Return std::vector of
12347         gdb::unique_xmalloc_ptr.
12348         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12349         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12350         (delim_string_to_char_ptr_vec): Return an std::vector of
12351         gdb::unique_xmalloc_ptr, adjust the code.
12352         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12353         gdb::unique_xmalloc_ptr, adjust the code.
12354         (dirnames_to_char_ptr_vec): Return an std::vector of
12355         gdb::unique_xmalloc_ptr, adjust the code.
12356         * auto-load.c (auto_load_safe_path_vec): Change type to
12357         std::vector of gdb::unique_xmalloc_ptr.
12358         (auto_load_expand_dir_vars): Return an std::vector of
12359         gdb::unique_xmalloc_ptr, adjust the code.
12360         (auto_load_safe_path_vec_update): Adjust.
12361         (filename_is_in_auto_load_safe_path_vec): Adjust.
12362         (auto_load_objfile_script_1): Adjust.
12363         * build-id.c (build_id_to_debug_bfd): Adjust.
12364         * linux-thread-db.c (thread_db_load_search): Adjust.
12365         * source.c (add_path): Adjust.
12366         (openp): Adjust.
12367         * symfile.c (find_separate_debug_file): Adjust.
12368         * utils.c (do_free_char_ptr_vec): Remove.
12369         (make_cleanup_free_char_ptr_vec): Remove.
12370
12371 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12372
12373         PR gdb/22907
12374         * common/pathstuff.c: Conditionally include "<windows.h>".
12375
12376 2018-03-01  Georg Sauthoff  <mail@georg.so>
12377
12378         PR gdb/22888
12379         * gcore.in: Quote variables and switch interpreter to bash.
12380
12381 2018-03-01  Tom Tromey  <tom@tromey.com>
12382
12383         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12384         assertion.  Add assertion for discriminant_index.
12385         (quirk_rust_enum): Use correct base type name in univariant case.
12386
12387 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12388
12389         * record.c (get_call_history_modifiers): Return a
12390         record_print_flags.
12391         (cmd_record_call_history): Adjust.
12392         * record-btrace.c (record_btrace_call_history): Adjust.
12393         (record_btrace_call_history_range): Adjust.
12394         (record_btrace_call_history_from): Adjust.
12395         * target-debug.h (target_debug_print_record_print_flags): New.
12396         * target-delegates.c: Re-generate.
12397         * target.c (target_call_history): Change flags type.
12398         (target_call_history_from): Likewise.
12399         (target_call_history_range): Likewise.
12400         * target.h (struct target_ops) <target_call_history>: Likewise.
12401         (target_call_history_from): Likewise.
12402         (target_call_history_range): Likewise.
12403
12404 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12405             Simon Marchi  <simon.marchi@polymtl.ca>
12406
12407         * common/common-utils.c: Include "sys/stat.h".
12408         (is_regular_file): Move here from "source.c"; change return
12409         type to "bool".
12410         * common/common-utils.h (is_regular_file): New prototype.
12411         * common/pathstuff.c (contains_dir_separator): New function.
12412         * common/pathstuff.h (contains_dir_separator): New prototype.
12413         * source.c: Don't include "sys/stat.h".
12414         (is_regular_file): Move to "common/common-utils.c".
12415
12416 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12417
12418         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12419         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12420         * auto-load.c: Include "common/pathstuff.h".
12421         * common/common-def.h (current_directory): Move here.
12422         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12423         function.
12424         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12425         prototype.
12426         * common/pathstuff.c: New file.
12427         * common/pathstuff.h: New file.
12428         * compile/compile.c: Include "common/pathstuff.h".
12429         * defs.h (current_directory): Move to "common/common-defs.h".
12430         * dwarf2read.c: Include "common/pathstuff.h".
12431         * exec.c: Likewise.
12432         * guile/scm-safe-call.c: Likewise.
12433         * linux-thread-db.c: Likewise.
12434         * main.c: Likewise.
12435         * nto-tdep.c: Likewise.
12436         * objfiles.c: Likewise.
12437         * source.c: Likewise.
12438         * symtab.c: Likewise.
12439         * utils.c: Include "common/pathstuff.h".
12440         (gdb_realpath): Move to "common/pathstuff.c".
12441         (gdb_realpath_keepfile): Likewise.
12442         (gdb_abspath): Likewise.
12443         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12444         (gdb_realpath_keepfile): Likewise.
12445         (gdb_abspath): Likewise.
12446
12447 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12448
12449         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12450         wildcard process pid for super_resume for kernels with a
12451         specific bug.
12452
12453 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12454
12455         * compile/compile.c (get_args): Add additional comments
12456         explaining function.
12457
12458 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12459             Tom Tromey  <tom@tromey.com>
12460
12461         * target.h (memory_write_request_s): Remove typedef.  Don't define
12462         VEC.
12463         (target_write_memory_blocks): Change argument to std::vector.
12464         (struct memory_write_request): Add constructor.
12465         * target-memory.c (compare_block_starting_address): Return bool.
12466         Change argument types.
12467         (claim_memory): Change arguments to use std::vector.
12468         (split_regular_and_flash_blocks, blocks_to_erase)
12469         (compute_garbled_blocks): Likewise.
12470         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12471         (target_write_memory_blocks): Change argument to std::vector.
12472         * symfile.c (struct load_section_data): Add constructor and
12473         destructor.  Use std::vector for "requests".
12474         (struct load_progress_data): Add initializers.
12475         (load_section_callback): Update.  Use "new".
12476         (clear_memory_write_data): Remove.
12477         (generic_load): Update.
12478
12479 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12480
12481         * arch/aarch64.h: Use common/tdesc.h.
12482
12483 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12484
12485         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12486         architecture with a 64-bit ABI.
12487
12488 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12489
12490         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12491         ahead of target description loading.
12492
12493 2018-02-26  Tom Tromey  <tom@tromey.com>
12494
12495         * stack.c (backtrace_command_1): Update.
12496         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12497         of "flags".
12498         * python/py-framefilter.c (py_print_frame)
12499         (gdbpy_apply_frame_filter): Change type of "flags".
12500         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12501         of "flags".
12502         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12503         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12504         * extension.h (enum frame_filter_flag): Rename from
12505         frame_filter_flags.
12506         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12507         (apply_ext_lang_frame_filter): Change type of "flags".
12508         * extension.c (apply_ext_lang_frame_filter): Change type of
12509         "flags".
12510         * extension-priv.h (struct extension_language_ops)
12511         <apply_frame_filter>: Change type of "flags".
12512
12513 2018-02-26  Tom Tromey  <tom@tromey.com>
12514
12515         PR python/16497:
12516         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12517         off-by-one in py_end computation.
12518         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12519         PRINT_MORE_FRAMES.
12520         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12521         constant.
12522
12523 2018-02-26  Tom Tromey  <tom@tromey.com>
12524
12525         * dwarf2read.c (struct variant_field): New.
12526         (struct nextfield) <variant>: New field.
12527         (dwarf2_add_field): Handle DW_TAG_variant_part.
12528         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12529         discriminated union.
12530         (read_structure_type): Handle DW_TAG_variant_part.
12531         (handle_struct_member_die): New function, extracted from
12532         process_structure_scope.  Handle DW_TAG_variant.
12533         (process_structure_scope): Handle discriminated unions.  Call
12534         handle_struct_member_die.
12535
12536 2018-02-26  Tom Tromey  <tom@tromey.com>
12537
12538         * rust-lang.h (rust_last_path_segment): Declare.
12539         * rust-lang.c (rust_last_path_segment): Now public.  Change
12540         contract.
12541         (struct disr_info): Remove.
12542         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12543         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12544         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12545         (rust_enum_p, rust_enum_variant): New function.
12546         (rust_underscore_fields): Remove "offset" parameter.
12547         (rust_print_enum): New function.
12548         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12549         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12550         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12551         enums.
12552         (rust_internal_print_type): New function, from rust_print_type.
12553         Remove enum code.
12554         (rust_print_type): Call rust_internal_print_type.
12555         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12556         Update enum handling.
12557         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12558         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12559         (rust_union_quirks): New functions.
12560         (process_full_comp_unit, process_full_type_unit): Call
12561         rust_union_quirks.
12562         (process_structure_scope): Update rust_unions if necessary.
12563
12564 2018-02-26  Tom Tromey  <tom@tromey.com>
12565
12566         * value.h (value_union_variant): Declare.
12567         * valops.c (value_union_variant): New function.
12568         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12569         (struct discriminant_info): New.
12570         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12571         enumerator.
12572         (struct main_type) <flag_discriminated_union>: New field.
12573
12574 2018-02-26  Tom Tromey  <tom@tromey.com>
12575
12576         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12577         unittests/unpack-selftests.c.
12578         * unittests/unpack-selftests.c: New file.
12579         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12580
12581 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12582
12583         * dwarf2read.c (struct partial_die_info) <read>: New method.
12584         (read_partial_die): Remove the declaration.
12585         (load_partial_dies): Update.
12586         (partial_die_info::partial_die_info):
12587         (read_partial_die): Change it to partial_die_info::read.
12588
12589 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12590
12591         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12592         (fixup_partial_die): Remove declaration.
12593         (scan_partial_symbols): Update.
12594         (partial_die_parent_scope): Likewise.
12595         (partial_die_full_name): Likewise.
12596         (fixup_partial_die): Change it to partial_die_info::fixup.
12597
12598 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12599
12600         * dwarf2read.c (read_partial_die): Update the declaration.
12601         (load_partial_dies): Caller update.
12602         (read_partial_die): Remove one argument abbrev_len.
12603
12604 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12605
12606         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12607         assignment operator.
12608         (load_partial_dies): Use ctor and copy ctor.
12609         (read_partial_die): Update.
12610         (dwarf2_cu::find_partial_die): Use ctor.
12611
12612 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12613
12614         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12615         (find_partial_die_in_comp_unit): Change it to
12616         dwarf2_cu::find_partial_die.
12617         (find_partial_die): Update.
12618
12619 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12620
12621         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12622         is NULL.
12623
12624 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12625
12626         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12627
12628 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12629
12630         * arch/amd64.h: Use common/tdesc.h.
12631         * arch/i386.c: Likewise.
12632         * arch/i386.h: Likewise.
12633         * arch/tic6x.c: Likewise.
12634         * arch/tdesc.h: Move file from here...
12635         * common/tdesc.h: ...to here.
12636         * features/aarch64-core.c: Regenerate.
12637         * features/aarch64-fpu.c: Regenerate.
12638         * features/i386/32bit-avx.c: Regenerate.
12639         * features/i386/32bit-avx512.c: Regenerate.
12640         * features/i386/32bit-core.c: Regenerate.
12641         * features/i386/32bit-linux.c: Regenerate.
12642         * features/i386/32bit-mpx.c: Regenerate.
12643         * features/i386/32bit-pkeys.c: Regenerate.
12644         * features/i386/32bit-sse.c: Regenerate.
12645         * features/i386/64bit-avx.c: Regenerate.
12646         * features/i386/64bit-avx512.c: Regenerate.
12647         * features/i386/64bit-core.c: Regenerate.
12648         * features/i386/64bit-linux.c: Regenerate.
12649         * features/i386/64bit-mpx.c: Regenerate.
12650         * features/i386/64bit-pkeys.c: Regenerate.
12651         * features/i386/64bit-segments.c: Regenerate.
12652         * features/i386/64bit-sse.c: Regenerate.
12653         * features/i386/x32-core.c: Regenerate.
12654         * features/tic6x-c6xp.c: Regenerate.
12655         * features/tic6x-core.c: Regenerate.
12656         * features/tic6x-gp.c: Regenerate.
12657         * target-descriptions.c: Use common/tdesc.h.
12658         * target-descriptions.h: Likewise.
12659
12660 2018-02-24  Tom Tromey  <tom@tromey.com>
12661
12662         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12663         (try_thread_db_load_from_dir, thread_db_load_search): Use
12664         std::string.
12665         (info_auto_load_libthread_db_compare): Return bool.  Change
12666         argument types.
12667         (info_auto_load_libthread_db): Use std::vector, std::string.
12668         Remove cleanups.
12669
12670 2018-02-24  Tom Tromey  <tom@tromey.com>
12671
12672         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12673         std::string.
12674         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12675         std::string*.
12676         * gdbarch.c: Rebuild.
12677         * gdbarch.h: Rebuild.
12678         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12679         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12680         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12681         std::string*.
12682
12683 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12684
12685         * gdbtypes.h (sect_offset): Change type to uint64_t.
12686         (sect_offset_str): New function.
12687         * dwarf2read.c (create_addrmap_from_aranges): Use
12688         sect_offset_str.
12689         (error_check_comp_unit_head): Likewise.
12690         (create_debug_type_hash_table): Likewise.
12691         (read_cutu_die_from_dwo): Likewise.
12692         (init_cutu_and_read_dies): Likewise.
12693         (init_cutu_and_read_dies_no_follow): Likewise.
12694         (process_psymtab_comp_unit_reader): Likewise.
12695         (partial_die_parent_scope): Likewise.
12696         (peek_die_abbrev): Likewise.
12697         (process_queue): Likewise.
12698         (dwarf2_physname): Likewise.
12699         (read_namespace_alias): Likewise.
12700         (read_import_statement): Likewise.
12701         (create_dwo_cu_reader): Likewise.
12702         (create_cus_hash_table): Likewise.
12703         (lookup_dwo_cutu): Likewise.
12704         (inherit_abstract_dies): Likewise.
12705         (read_func_scope): Likewise.
12706         (read_call_site_scope): Likewise.
12707         (dwarf2_add_member_fn): Likewise.
12708         (read_common_block): Likewise.
12709         (read_module_type): Likewise.
12710         (read_typedef): Likewise.
12711         (read_subrange_type): Likewise.
12712         (load_partial_dies): Likewise.
12713         (read_partial_die): Likewise.
12714         (find_partial_die): Likewise.
12715         (read_str_index): Likewise.
12716         (dwarf2_string_attr): Likewise.
12717         (build_error_marker_type): Likewise.
12718         (lookup_die_type): Likewise.
12719         (dump_die_shallow): Likewise.
12720         (follow_die_ref): Likewise.
12721         (dwarf2_fetch_die_loc_sect_off): Likewise.
12722         (dwarf2_fetch_constant_bytes): Likewise.
12723         (follow_die_sig): Likewise.
12724         (get_signatured_type): Likewise.
12725         (get_DW_AT_signature_type): Likewise.
12726         (dwarf2_find_containing_comp_unit): Likewise.
12727         (set_die_type): Likewise.
12728
12729 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12730
12731         * arch/aarch64.c: Include "common-defs.h".
12732         * arch/amd64.c: Likewise.
12733         * arch/i386.c: Likewise.
12734
12735 2018-02-21  Tom Tromey  <tom@tromey.com>
12736
12737         * value.h: (extract_field_op): Update.
12738         * eval.c (extract_field_op): Return a const char *.
12739         * expression.h (parse_expression_for_completion): Update.
12740         * completer.c (complete_expression): Update.
12741         (add_struct_fields): Make fieldname const.
12742         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12743         (mark_completion_tag, parse_exp_in_context_1): Update.
12744         (parse_expression_for_completion): Change "name" to
12745         unique_xmalloc_ptr*.
12746
12747 2018-02-21  Tom Tromey  <tom@tromey.com>
12748
12749         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12750
12751 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12752
12753         * avr-tdep.c (avr_read_pc): Change parameter type to
12754         readable_regcache.
12755         * gdbarch.sh (read_pc): Likewise.
12756         * gdbarch.c: Re-generated.
12757         * gdbarch.h: Re-generated.
12758         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12759         readable_regcache.
12760         * ia64-tdep.c (ia64_read_pc): Likewise.
12761         * mips-tdep.c (mips_read_pc): Likewise.
12762         * spu-tdep.c (spu_read_pc): Likewise.
12763
12764 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12765
12766         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12767         * regcache-dump.c: New file.
12768         * regcache.c: Move register_dump to regcache-dump.c.
12769         (maintenance_print_registers): Likewise.
12770         (maintenance_print_raw_registers): Likewise.
12771         (maintenance_print_cooked_registers): Likewise.
12772         (maintenance_print_register_groups): Likewise.
12773         (maintenance_print_remote_registers): Likewise.
12774         (_initialize_regcache): Likewise.
12775         * regcache.h (register_dump): Moved from regcache.c.
12776
12777 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12778
12779         * regcache.c (regcache::regcache): Update.
12780         (regcache::invalidate): Move it to detached_regcache::invalidate.
12781         (get_thread_arch_aspace_regcache): Update.
12782         (regcache::raw_update): Update.
12783         (regcache::cooked_read): Remove some code.
12784         (regcache::cooked_read_value): Likewise.
12785         (regcache::raw_write): Remove assert on m_readonly_p.
12786         (regcache::raw_supply_integer): Move it to
12787         detached_regcache::raw_supply_integer.
12788         (regcache::raw_supply_zeroed): Likewise.
12789         * regcache.h (detached_regcache) <raw_supply_integer>: New
12790         declaration.
12791         <raw_supply_zeroed, invalidate>: Likewise.
12792         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12793         <invalidate>: Likewise.
12794         <m_readonly_p>: Removed.
12795
12796 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12797
12798         * infcmd.c (get_return_value): Let stop_regs point to
12799         get_current_regcache.
12800         * regcache.c (regcache::regcache): Remove.
12801         (register_dump_reg_buffer): New class.
12802         (regcache_print): Adjust.
12803         * regcache.h (regcache): Remove constructors.
12804
12805 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12806
12807         * regcache.c (class register_dump): New class.
12808         (register_dump_regcache, register_dump_none): New class.
12809         (register_dump_remote, register_dump_groups): New class.
12810         (regcache_print): Update.
12811         * regcache.h (regcache_dump_what): Move it to regcache.c.
12812         (regcache) <dump>: Remove.
12813
12814 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12815
12816         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12817          reg_buffer_rw *.
12818         (jit_unwind_reg_set_impl): Call raw_supply.
12819         (jit_frame_sniffer): Use reg_buffer_rw.
12820         * record-full.c (record_full_core_regbuf): Change its type.
12821         (record_full_core_open_1): Use reg_buffer_rw.
12822         (record_full_close): Likewise.
12823         (record_full_core_fetch_registers): Use regcache->raw_supply.
12824         (record_full_core_store_registers): Likewise.
12825         * regcache.c (regcache::get_register_status): Move it to
12826         reg_buffer.
12827         (regcache_raw_set_cached_value): Remove.
12828         (regcache::raw_set_cached_value): Remove.
12829         (regcache::raw_write): Call raw_supply.
12830         (regcache::raw_supply): Move it to reg_buffer_rw.
12831         * regcache.h (regcache_raw_set_cached_value): Remove.
12832         (reg_buffer_rw): New class.
12833
12834 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12835
12836         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12837         readonly_detached_regcache.
12838         (dummy_frame_prev_register): Use regcache->cooked_read.
12839         * frame.c (frame_save_as_regcache): Change return type.
12840         (frame_pop): Update.
12841         * frame.h (frame_save_as_regcache): Update declaration.
12842         * inferior.h (get_infcall_suspend_state_regcache): Update
12843         declaration.
12844         * infrun.c (infcall_suspend_state) <registers>: use
12845         readonly_detached_regcache.
12846         (save_infcall_suspend_state): Don't use regcache_dup.
12847         (get_infcall_suspend_state_regcache): Change return type.
12848         * linux-fork.c (struct fork_info) <savedregs>: Change to
12849         readonly_detached_regcache.
12850         <pc>: New field.
12851         (fork_save_infrun_state): Don't use regcache_dup.
12852         (info_checkpoints_command): Adjust.
12853         * mi/mi-main.c (register_changed_p): Update declaration.
12854         (mi_cmd_data_list_changed_registers): Use
12855         readonly_detached_regcache.
12856         (register_changed_p): Change parameter type to
12857         readonly_detached_regcache.
12858         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12859         readonly_detached_regcache.
12860         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12861         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12862         New.
12863         (regcache::save): Move it to reg_buffer.
12864         (regcache::restore): Change parameter type.
12865         (regcache_dup): Remove.
12866         * regcache.h (reg_buffer) <save>: New method.
12867         (readonly_detached_regcache): New class.
12868         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12869         readonly_detached_regcache.
12870         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12871
12872 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12873
12874         * frame.c (frame_save_as_regcache): Use regcache method save.
12875         (frame_pop): Use regcache method restore.
12876         * infrun.c (restore_infcall_suspend_state): Likewise.
12877         * linux-fork.c (fork_load_infrun_state): Likewise.
12878         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12879         save.
12880         * regcache.c (regcache_save): Remove.
12881         (regcache::restore): More asserts.
12882         (regcache_cpy): Remove.
12883         * regcache.h (regcache_save): Remove the declaration.
12884         (regcache::restore): Move from private to public.
12885         Remove the friend declaration of regcache_cpy.
12886         (regcache_cpy): Remove declaration.
12887
12888 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12889
12890         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12891         parameter type to 'readable_regcache *'.
12892         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12893         * arm-tdep.c (arm_neon_quad_read): Likewise.
12894         (arm_pseudo_read): Likewise.
12895         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12896         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12897         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12898         * gdbarch.c: Re-generated.
12899         * gdbarch.h: Re-generated.
12900         * gdbarch.sh (pseudo_register_read): Change parameter type to
12901         'readable_regcache *'.
12902         (pseudo_register_read_value): Likewise.
12903         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12904         (h8300_pseudo_register_read): Likewise.
12905         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12906         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12907         (i386_pseudo_register_read_into_value): Likewise.
12908         (i386_pseudo_register_read_value): Likewise.
12909         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12910         declaration.
12911         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12912         * m32c-tdep.c (m32c_raw_read): Likewise.
12913         (m32c_read_flg): Likewise.
12914         (m32c_banked_register): Likewise.
12915         (m32c_banked_read): Likewise.
12916         (m32c_sb_read): Likewise.
12917         (m32c_part_read): Likewise.
12918         (m32c_cat_read): Likewise.
12919         (m32c_r3r2r1r0_read): Likewise.
12920         (m32c_pseudo_register_read): Likewise.
12921         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12922         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12923         (mep_pseudo_cr64_read): Likewise.
12924         (mep_pseudo_register_read): Likewise.
12925         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12926         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12927         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12928         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12929         (regcache::cooked_read): Likewise.
12930         (regcache::cooked_read_value): Likewise.
12931         (regcache_cooked_read_signed):
12932         (regcache::cooked_read): Likewise.
12933         * regcache.h (readable_regcache): New class.
12934         (regcache): Inherit readable_regcache.  Move some methods to
12935         readable_regcache.
12936         * rl78-tdep.c (rl78_pseudo_register_read): Change
12937         parameter type to 'readable_regcache *'.
12938         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12939         (e500_pseudo_register_read): Change parameter type to
12940         'readable_regcache *'.
12941         (dfp_pseudo_register_read): Likewise.
12942         (vsx_pseudo_register_read): Likewise.
12943         (efpr_pseudo_register_read): Likewise.
12944         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12945         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12946         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12947         (sh64_pseudo_register_read): Likewise.
12948         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12949         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12950         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12951         (spu_pseudo_register_read): Likewise.
12952         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12953         (xtensa_pseudo_register_read): Likewise.
12954
12955 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12956
12957         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12958         (regcache::arch): Move it to reg_buffer::arch.
12959         (regcache::register_buffer): Likewise.
12960         (regcache::assert_regnum): Likewise.
12961         (regcache::num_raw_registers): Likewise.
12962         * regcache.h (reg_buffer): New class.
12963         (regcache): Inherit reg_buffer.
12964
12965 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12966
12967         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12968         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12969
12970 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12971
12972         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12973
12974 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12975
12976         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12977         (SFILES): Remove common/*.c files.
12978         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12979         * common/common.host: Add common reference.
12980         * configure.ac: Likewise.
12981         * configure: Regenerate.
12982
12983 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12984
12985         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12986         (block_initialize_namespace): Use new.
12987         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12988         (dwarf2_free_objfile): Use delete.
12989         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12990         (copy_type_recursive): Use new.
12991         * gdb_obstack.h (allocate_on_obstack): New.
12992
12993 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12994
12995         PR gdb/22849
12996         * inferior.c (exit_inferior_1): Reset inf->control.
12997
12998 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12999
13000         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13001         declaration.
13002
13003 2018-02-14  Pedro Alves  <palves@redhat.com>
13004
13005         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13006         frame_cleanup_after_sniffer on exception.
13007
13008 2018-02-14  Tom Tromey  <tom@tromey.com>
13009
13010         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13011         const.
13012         (solib_bfd_open): Make pathname const.
13013         * solib.c (solib_bfd_open): Make pathname const.
13014         * solib-spu.c (spu_bfd_fopen): Make name const.
13015         (spu_bfd_open): Make pathname const.
13016         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13017         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13018
13019 2018-02-14  Tom Tromey  <tom@tromey.com>
13020
13021         * symfile.c (symfile_bfd_open): Update.
13022         * source.h (openp, source_full_path_of, find_and_open_source):
13023         Change argument type to unique_xmalloc_ptr.
13024         * source.c (openp): Take a unique_xmalloc_ptr.
13025         (source_full_path_of, find_and_open_source): Likewise.
13026         (open_source_file, symtab_to_fullname): Update.
13027         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13028         unique_xmalloc_ptr.
13029         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13030         (exec_file_find): Update.
13031         * psymtab.c (psymtab_to_fullname): Update.
13032         * nto-tdep.h (nto_find_and_open_solib): Update.
13033         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13034         unique_xmalloc_ptr.
13035         * exec.c (exec_file_attach): Update.
13036         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13037         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13038
13039 2018-02-14  Tom Tromey  <tom@tromey.com>
13040
13041         * solib.c: Include source.h.
13042         * nto-tdep.c: Include source.h.
13043         * mi/mi-cmd-env.c: Include source.h.
13044         * infcmd.c: Include source.h.
13045         * exec.c: Include source.h.
13046         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13047         (add_path, directory_switch, source_path, init_source_path): Move
13048         declarations...
13049         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13050         (add_path, directory_switch, source_path, init_source_path):
13051         ...here.
13052
13053 2018-02-14  Tom Tromey  <tom@tromey.com>
13054
13055         * solist.h (exec_file_find, solib_find): Return
13056         unique_xmalloc_ptr.
13057         (solib_bfd_fopen): Take a const char *.
13058         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13059         (exec_file_find, solib_find): Likewise.
13060         (solib_bfd_fopen): Do not take ownership of "pathname".
13061         (solib_bfd_open): Use unique_xmalloc_ptr.
13062         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13063         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13064         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13065         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13066
13067 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13068
13069         * ada-lang.c (name_match_type_from_name): Remove reference to
13070         ada_name_for_lookup in function's documentation.
13071         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13072
13073 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13074
13075         * defs.h (enum openp_flags): New enum.
13076         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13077         Move to enum openp_flags.
13078         (openp_flags): New enum flags.
13079         (openp): Change parameter type to openp_flags.
13080         * source.c (openp): Change parameter type to openp_flags.
13081         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13082         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13083
13084 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13085
13086         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13087         per-command.
13088
13089 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13090
13091         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13092         into...
13093         (class dwarf2_queue_guard): ...the destructor of this new class.
13094         (dw2_do_instantiate_symtab): Create instance of the new class
13095         dwarf2_queue_guard, remove cleanup.
13096
13097 2018-02-09  Tom Tromey  <tom@tromey.com>
13098
13099         * source.c (find_source_lines): Don't reference past the end of
13100         the vector.
13101
13102 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13103
13104         * remote.c (remote_btrace_maybe_reopen): Change error message.
13105         * btrace.c (btrace_enable): Likewise.
13106         (parse_xml_btrace): Likewise.
13107         (parse_xml_btrace_conf): Likewise.
13108
13109 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13110
13111         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13112         (linux_enable_pt, linux_enable_bts): Call
13113         diagnose_perf_event_open_fail.
13114
13115 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13116
13117         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13118         Remove parameter and change return type.  Update callers.  Move it.
13119         (linux_enable_bts, linux_enable_pt): Improve error message.
13120         (linux_enable_pt): Remove zero buffer size check.
13121         (linux_enable_btrace): Improve error messages.  Remove NULL return
13122         check.
13123
13124 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13125
13126         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13127         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13128         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13129         (linux_supports_pt, linux_supports_btrace): Remove.
13130         (linux_enable_bts): Call cpu_supports_bts.
13131         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13132         * remote.c (remote_supports_btrace): Remove.
13133         (init_remote_ops): Remove remote_supports_btrace.
13134         * target-delegates.c: Regenerated.
13135         * target.c (target_supports_btrace): Remove.
13136         * target.h (target_ops) <to_supports_btrace>: Remove
13137         (target_supports_btrace): Remove.
13138         * x86-linux-nat.c (x86_linux_create_target): Remove
13139         linux_supports_btrace.
13140
13141 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13142
13143         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13144         btrace failed.
13145         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13146         exception and use message in own exception.
13147
13148 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13149
13150         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13151         (perf_event_pt_event_type): Use gdb_file_up.
13152         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13153         scoped_fd, and scoped_mmap.
13154
13155 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13156
13157         * common/scoped_mmap.h: New.
13158         * unittests/scoped_mmap-selftest.c: New.
13159         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13160         unittests/scoped_mmap-selftest.c.
13161
13162 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13163
13164         * common/scoped_fd.h: New.
13165         * unittests/scoped_fd-selftest.c: New.
13166         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13167         unittests/scoped_fd-selftest.c.
13168
13169 2018-02-09  Tom Tromey  <tom@tromey.com>
13170
13171         * auto-load.c (auto_load_section_scripts): Use
13172         gdb::unique_xmalloc_ptr.
13173
13174 2018-02-09  Tom Tromey  <tom@tromey.com>
13175
13176         * auto-load.c (execute_script_contents): Use std::string.
13177
13178 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13179
13180         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13181         Python function, rather than a new command.
13182
13183 2018-02-08  Tom Tromey  <tom@tromey.com>
13184
13185         * solib.c (solib_find_1): Use std::string.
13186         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13187
13188 2018-02-08  Tom Tromey  <tom@tromey.com>
13189
13190         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13191
13192 2018-02-08  Tom Tromey  <tom@tromey.com>
13193
13194         * source.c (find_source_lines): Use gdb::def_vector.
13195
13196 2018-02-08  Tom Tromey  <tom@tromey.com>
13197
13198         * macrocmd.c (struct temporary_macro_definition): New.
13199         (macro_define_command): Use temporary_macro_definition.  Remove
13200         cleanups.
13201         (free_macro_definition_ptr): Remove.
13202
13203 2018-02-08  Tom Tromey  <tom@tromey.com>
13204
13205         * macroexp.c (maybe_expand): Use std::string.
13206
13207 2018-02-08  Tom Tromey  <tom@tromey.com>
13208
13209         * macroexp.c (struct macro_buffer): Add initializers for some
13210         members.
13211         (init_buffer, init_shared_buffer, free_buffer)
13212         (free_buffer_return_text): Remove.
13213         (macro_buffer): New constructors.
13214         (~macro_buffer): New destructor.
13215         (macro_buffer::set_shared): New method.
13216         (macro_buffer::resize_buffer, macro_buffer::appendc)
13217         (macro_buffer::appendmem): Now methods, not free functions.
13218         (set_token, append_tokens_without_splicing, stringify)
13219         (macro_stringify): Update.
13220         (gather_arguments): Change return type.  Remove argc_p argument,
13221         add args_ptr argument.  Use std::vector.
13222         (substitute_args): Remove argc argument.  Accept std::vector.
13223         (expand): Update.  Use std::vector.
13224         (scan, macro_expand, macro_expand_next): Update.
13225
13226 2018-02-08  Tom Tromey  <tom@tromey.com>
13227
13228         * symtab.c (default_collect_symbol_completion_matches_break_on):
13229         Use unique_xmalloc_ptr.
13230         * macroscope.h: (sal_macro_scope, user_macro_scope)
13231         (default_macro_scope): Return unique_xmalloc_ptr.
13232         * macroscope.c (sal_macro_scope, user_macro_scope)
13233         (default_macro_scope): Return unique_xmalloc_ptr.
13234         * macroexp.h (macro_expand, macro_expand_once): Return
13235         unique_xmalloc_ptr.
13236         * macroexp.c (macro_expand, macro_expand_once): Return
13237         unique_xmalloc_ptr.
13238         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13239         (info_macro_command, info_macros_command): Use
13240         unique_xmalloc_ptr.
13241         * compile/compile-c-support.c (write_macro_definitions): Use
13242         unique_xmalloc_ptr.
13243         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13244
13245 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13246
13247         * value.c (value_static_field): Assign field type instead of
13248         containing type when returning an optimized out value.
13249
13250 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13251
13252         * ft32-tdep.c (ft32_read_pc): Remove.
13253         (ft32_write_pc): Remove.
13254         (ft32_gdbarch_init): Update.
13255         * m32r-tdep.c (m32r_read_pc): Remove.
13256         (m32r_gdbarch_init): Update.
13257         * mep-tdep.c (mep_read_pc): Remove.
13258         (mep_gdbarch_init): Update.
13259         * microblaze-tdep.c (microblaze_write_pc): Remove.
13260         (microblaze_gdbarch_init): Update.
13261         * mn10300-tdep.c (mn10300_read_pc): Remove.
13262         (mn10300_write_pc): Remove.
13263         (mn10300_gdbarch_init): Update.
13264         * moxie-tdep.c (moxie_read_pc): Remove.
13265         (moxie_write_pc): Remove.
13266         (moxie_gdbarch_init): Update.
13267
13268 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13269
13270         * expprint.c (print_subexp_standard): Handle
13271         OP_F77_UNDETERMINED_ARGLIST.
13272         (dump_subexp_body_standard): Likewise.
13273
13274 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13275
13276         * target-descriptions.c (tdesc_element_visitor) Add empty
13277         implementations.
13278         (tdesc_type): Move make_gdb_type from here.
13279         (tdesc_type_builtin): Likewise.
13280         (tdesc_type_vector): Likewise.
13281         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13282         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13283         (make_gdb_type_union): Likewise.
13284         (make_gdb_type_flags): Likewise.
13285         (make_gdb_type_enum): Likewise.
13286         (make_gdb_type): New function.
13287         (tdesc_register_type): Use static make_gdb_type.
13288
13289 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13290
13291         * infcmd.c (default_print_one_register_info): Align natural-format
13292         column values consistently one under another.
13293         (pad_to_column): New function.
13294
13295 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13296
13297         * dwarf2read.c (dwarf2_physname): Move commment.
13298
13299 2018-02-01  Leszek Swirski  <leszeks@google.com>
13300
13301         * varobj.c (varobj_formatted_print_options): Allow recursive
13302         pretty printing if pretty printing is enabled.
13303
13304 2018-02-01  Leszek Swirski  <leszeks@google.com>
13305
13306         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13307         names after a structop as a filename.
13308
13309 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13310
13311         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13312         (arm_record_coproc_data_proc): Likewise.
13313
13314 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13315
13316         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13317
13318 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13319
13320         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13321         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13322
13323 2018-01-31  Pedro Alves  <palves@redhat.com>
13324
13325         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13326         * inflow.c (child_terminal_save_inferior): Wrap reference to
13327         tcgetpgrp in HAVE_TERMIOS_H.
13328         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13329         _WIN32.
13330         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13331         always iterate over all inferiors.
13332         (gdbsim_cntrl_c): Adjust.
13333         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13334
13335 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13336
13337         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13338         index type is objfile-owned if the element type is as well.
13339
13340 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13341
13342         GDB 8.1 released.
13343
13344 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13345
13346         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13347         "features/s390x-linux64.c".
13348         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13349         s390_linux32 and s390x_linux64.
13350         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13351         default tdesc.
13352         * s390-tdep.c: Include "features/s390-linux32.c" and
13353         "features/s390x-linux64.c".
13354         (s390_tdesc_valid): Add check for tdesc_has_registers.
13355         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13356         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13357         tdesc_s390x_linux64.
13358         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13359         tdesc_s390x_linux64 to...
13360         * s390-tdep.h: ...here.
13361
13362 2018-01-30  Pedro Alves  <palves@redhat.com>
13363
13364         PR gdb/13211
13365         * config.in, configure: Regenerate.
13366         * configure.ac: Check for getpgid.
13367         * go32-nat.c (go32_pass_ctrlc): New.
13368         (go32_target): Install it.
13369         * inf-child.c (inf_child_target): Install
13370         child_terminal_save_inferior, child_pass_ctrlc and
13371         child_interrupt.
13372         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13373         (inf_ptrace_target): No longer install it.
13374         * infcmd.c (interrupt_target_1): Adjust.
13375         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13376         (child_interrupt): Declare.
13377         (inferior::terminal_state): New.
13378         * inflow.c (struct terminal_info): Update comments.
13379         (inferior_process_group): Delete.
13380         (terminal_is_ours): Delete.
13381         (gdb_tty_state): New.
13382         (child_terminal_init): Adjust.
13383         (is_gdb_terminal, sharing_input_terminal_1)
13384         (sharing_input_terminal): New functions.
13385         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13386         Set the process's actual process group in the foreground if
13387         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13388         mark terminal as the inferior's if not sharing GDB's terminal.
13389         Don't check attach_flag.
13390         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13391         pass down a target_terminal_state.
13392         (child_terminal_save_inferior): New, factored out from ...
13393         (child_terminal_ours_1): ... this.  Handle
13394         target_terminal_state::is_ours_for_output.
13395         (child_interrupt, child_pass_ctrlc): New.
13396         (inflow_inferior_exit): Clear the inferior's terminal_state.
13397         (copy_terminal_info): Copy the inferior's terminal state.
13398         (_initialize_inflow): Remove reference to terminal_is_ours.
13399         * inflow.h (inferior_process_group): Delete.
13400         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13401         * procfs.c (procfs_target): Don't install procfs_interrupt.
13402         (procfs_interrupt): Delete.
13403         * remote.c (remote_serial_quit_handler): Adjust.
13404         (remote_interrupt): Remove ptid parameter.  Adjust.
13405         * target-delegates.c: Regenerate.
13406         * target.c: Include "terminal.h".
13407         (target_terminal::terminal_state): Rename to ...
13408         (target_terminal::m_terminal_state): ... this.
13409         (target_terminal::init): Adjust.
13410         (target_terminal::inferior): Adjust to per-inferior
13411         terminal_state.
13412         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13413         (target_terminal::ours, target_terminal::ours_for_output): Use
13414         target_terminal_is_ours_kind.
13415         (target_interrupt): Remove ptid parameter.  Adjust.
13416         (default_target_pass_ctrlc): Adjust.
13417         * target.h (target_ops::to_terminal_save_inferior): New field.
13418         (target_ops::to_interrupt): Remove ptid_t parameter.
13419         (target_interrupt): Remove ptid_t parameter.  Update comment.
13420         (target_pass_ctrlc): Update comment.
13421         * target/target.h (target_terminal_state): New scoped enum,
13422         factored out of ...
13423         (target_terminal::terminal_state): ... here.
13424         (target_terminal::inferior): Update comments.
13425         (target_terminal::restore_inferior): New.
13426         (target_terminal::is_inferior, target_terminal::is_ours)
13427         (target_terminal::is_ours_for_output): Adjust.
13428         (target_terminal::scoped_restore_terminal_state): Adjust to
13429         rename, and call restore_inferior() instead of inferior().
13430         (target_terminal::scoped_restore_terminal_state::m_state): Change
13431         type.
13432         (target_terminal::terminal_state): Rename to ...
13433         (target_terminal::m_terminal_state): ... this and change type.
13434
13435 2018-01-30  Pedro Alves  <palves@redhat.com>
13436
13437         * linux-nat.c (wait_for_signal): New function.
13438         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13439         directly.
13440         (async_terminal_is_ours)
13441         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13442         (linux_nat_add_target): Don't override
13443         to_terminal_inferior/to_terminal_ours.
13444
13445 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13446
13447         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13448
13449 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13450
13451         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13452         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13453         dwarf2_per_objfile_free here.
13454         (dwarf2_per_objfile_free): Remove.
13455         (_initialize_dwarf2_read): Don't register
13456         dwarf2_per_objfile_free as a registry cleanup.
13457
13458 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13459
13460         Avoid compilation errors in MinGW native builds
13461
13462         The error is triggered by including python-internal.h, and the
13463         error message is:
13464
13465              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13466                       from build-gnulib/import/math.h:27,
13467                       from d:/usr/Python26/include/pyport.h:235,
13468                       from d:/usr/Python26/include/Python.h:58,
13469                       from python/python-internal.h:94,
13470                       from python/py-arch.c:24:
13471              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13472         using ::hypot;
13473                 ^~~~~
13474
13475         This happens because Python headers define 'hypot' to expand t
13476         '_hypot' in the Windows builds.
13477         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13478         'hypoth'.  This avoids a compilation error.
13479
13480 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13481
13482         * MAINTAINERS (Write After Approval): Fix ordering.
13483
13484 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13485
13486         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13487
13488 2018-01-26  Alan Modra  <amodra@gmail.com>
13489
13490         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13491         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13492         Remove nop.  Make const.  Comment.
13493         (powerpc32_plt_stub_so_2): New.
13494         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13495         Correct count.  Update uses.
13496         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13497         Move common code reading PLT entry word.  Correct
13498         powerpc32_plt_stub PLT address calculation.
13499         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13500         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13501         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13502         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13503         (ppc64_standard_linkage8): Likewise.
13504         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13505         Correct insns description.
13506         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13507
13508 2018-01-24  Pedro Alves  <palves@redhat.com>
13509
13510         GCC PR libstdc++/83906
13511         * gdbtypes.c (operator==(const dynamic_prop &,
13512         const dynamic_prop &)): New.
13513         (operator==(const range_bounds &, const range_bounds &)): New.
13514         (check_types_equal): Use them instead of memcmp.
13515         * gdbtypes.h (operator==(const dynamic_prop &,
13516         const dynamic_prop &)): Declare.
13517         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13518         (operator==(const range_bounds &, const range_bounds &)): Declare.
13519         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13520
13521 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13522
13523         * s390-linux-tdep.c (s390_record_address_mask)
13524         (s390_record_calc_disp_common, s390_record_calc_disp)
13525         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13526         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13527         (s390_process_record): Move to s390-tdep.c.
13528         (s390_linux_init_abi_any): Adjust.
13529         * s390-tdep.c (s390_record_address_mask)
13530         (s390_record_calc_disp_common, s390_record_calc_disp)
13531         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13532         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13533         (s390_process_record): Moved from s390-linux-tdep.c
13534         (s390_gdbarch_init): Adjust.
13535
13536 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13537
13538         * s390-linux-nat.c (s390-tdep.h): New include.
13539         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13540         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13541         (ALLDEPFILES): Add s390-tdep.c.
13542         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13543         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13544         * s390-tdep.h: ...this.  New file.
13545         * s390-linux-tdep.c (s390-tdep.h): New include.
13546         (_initialize_s390_tdep): Rename to...
13547         (_initialize_s390_linux_tdep): ...this and adjust.
13548         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13549         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13550         s390-tdep.h.
13551         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13552         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13553         (s390_is_partial_instruction, s390_software_single_step)
13554         (is_non_branch_ril, s390_displaced_step_copy_insn)
13555         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13556         (s390_prologue_data, s390_addr, s390_store, s390_load)
13557         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13558         (s390_register_call_saved, s390_guess_tracepoint_registers)
13559         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13560         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13561         (s390_pseudo_register_name, s390_pseudo_register_type)
13562         (s390_pseudo_register_read, s390_pseudo_register_write)
13563         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13564         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13565         (s390_addr_bits_remove, s390_address_class_type_flags)
13566         (s390_address_class_type_flags_to_name)
13567         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13568         (s390_function_arg_float, s390_function_arg_vector)
13569         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13570         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13571         (s390_frame_align, s390_register_return_value, s390_return_value)
13572         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13573         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13574         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13575         (s390_trad_frame_prev_register, s390_unwind_cache)
13576         (s390_prologue_frame_unwind_cache)
13577         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13578         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13579         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13580         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13581         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13582         (s390_frame_base_address, s390_local_base_address)
13583         (s390_frame_base, s390_gcc_target_options)
13584         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13585         (s390_validate_reg_range, s390_tdesc_valid)
13586         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13587         * s390-tdep.c: ...this.  New file.
13588
13589 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13590
13591         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13592         (s390_process_record, s390_gdbarch_tdep_alloc)
13593         (s390_linux_init_abi_any): Use/set new hook.
13594
13595 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13596
13597         * s390-linux-tdep.c (osabi.h): New include.
13598         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13599         (s390_linux_init_abi_any): New functions.
13600         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13601
13602 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13603
13604         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13605         tdesc_has_registers check
13606
13607 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13608
13609         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13610         (s390_validate_reg_range): New macro.
13611         (s390_gdbarch_init): Adjust.
13612
13613 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13614
13615         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13616         (s390_gdbarch_tdep_alloc): Adjust.
13617         (s390_gdbarch_init): Adjust.
13618
13619 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13620
13621         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13622         <have_tdb>: Change type to bool.
13623         (s390_gdbarch_tdep_alloc): Adjust.
13624         (s390_gdbarch_init): Adjust.
13625
13626 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13627
13628         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13629         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13630         (s390_gdbarch_tdep_alloc): New function.
13631         (s390_gdbarch_init): Allocate tdep at start and use its fields
13632         instead of separate variables.
13633
13634 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13635
13636         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13637         when looking for cached gdbarch and add comment for remaining.
13638
13639 2018-01-22  Pedro Alves  <palves@redhat.com>
13640             Sergio Durigan Junior  <sergiodj@redhat.com>
13641
13642         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13643         case.
13644
13645 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13646
13647         * MAINTAINERS: Update my company e-mail address.
13648
13649 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13650
13651         * regcache.c (cooked_write_test): New function.
13652         (_initialize_regcache): Register the test.
13653
13654 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13655
13656         * ia64-tdep.c (ia64_pseudo_register_read): Call
13657         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13658         * m32c-tdep.c (m32c_cat_read): Likewise.
13659         (m32c_r3r2r1r0_read): Likewise.
13660         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13661         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13662
13663 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13664
13665         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13666         method raw_read instead of regcache_raw_read.
13667         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13668         * arm-tdep.c (arm_neon_quad_read): Likewise.
13669         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13670         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13671         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13672         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13673         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13674         (i386_pseudo_register_read_into_value): Likewise.
13675         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13676         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13677         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13678         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13679         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13680         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13681         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13682         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13683         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13684
13685 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13686
13687         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13688         * configure.tgt: Remove target mt.
13689         * mt-tdep.c: Remove.
13690         * regcache.c (cooked_read_test): Remove the check for mt.
13691
13692 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13693
13694         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13695         instead of gdbarch_pseudo_register_read_value.
13696
13697 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13698
13699         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13700         language is Ada.
13701
13702 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13703
13704         * linespec.c (create_sals_line_offset): Remove code that preserved
13705         the symtab_and_line's line number.
13706
13707 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13708
13709         * varobj.c (varobj_create): Don't set valid_block when creating a
13710         floating varobj.
13711
13712 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13713
13714         * varobj.c (varobj_create): Remove out of date comment.
13715
13716 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13717
13718         PR mi/20395
13719         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13720         updating innermost block.
13721         * parse.c (innermost_block_tracker::update): Take extra type
13722         parameter, and check types match before updating innermost block.
13723         (write_dollar_variable): Update innermost block for registers.
13724         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13725         (innermost_block_tracker::innermost_block_tracker): Initialise
13726         m_types member.
13727         (innermost_block_tracker::reset): Take type parameter.
13728         (innermost_block_tracker::update): Take type parameter, and pass
13729         type through as needed.
13730         (innermost_block_tracker::m_types): New member.
13731         * varobj.c (varobj_create): Pass type when reseting innermost
13732         block.
13733
13734 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13735
13736         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13737         * ada-lang.c (resolve_subexp): Likewise.
13738         * breakpoint.c (set_breakpoint_condition) Likewise.
13739         (watch_command_1) Likewise.
13740         * c-exp.y (variable): Likewise.
13741         * d-exp.y (PrimaryExpression): Likewise.
13742         * f-exp.y (variable): Likewise.
13743         * go-exp.y (variable): Likewise.
13744         * m2-exp.y (variable): Likewise.
13745         * objfiles.c (objfile::~objfile): Likewise.
13746         * p-exp.y (variable): Likewise.
13747         * parse.c (innermost_block): Change type.
13748         * parser-defs.h (class innermost_block_tracker): New.
13749         (innermost_block): Change to innermost_block_tracker.
13750         * printcmd.c (display_command): Switch to innermost_block API.
13751         (do_one_display): Likewise.
13752         * rust-exp.y (do_one_display): Likewise.
13753         * symfile.c (clear_symtab_users): Likewise.
13754         * varobj.c (varobj_create): Switch to innermost_block API, replace
13755         use of innermost_block with block stored on varobj object.
13756
13757 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13758
13759         * expression.h (innermost_block): Remove declaration.
13760         * varobj.c: Add 'parser-defs.h' include.
13761
13762 2018-01-19  Tom Tromey  <tom@tromey.com>
13763
13764         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13765         symbols in the static and global blocks.
13766
13767 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13768
13769         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13770         gdb_ptrace.h, and move including gdb_wait.h ...
13771         * nat/linux-ptrace.h: ... to here.
13772
13773 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13774
13775         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13776         inf_ptrace_detach_success.
13777         (inf_ptrace_detach_success): Add inferior parameter, use it
13778         instead of inferior_ptid, pass it to detach_inferior.
13779         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13780         parameter.
13781         * inferior.c (detach_inferior): Add overload that takes an
13782         inferior object.
13783         * inferior.h (detach_inferior): Likewise.
13784         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13785         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13786         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13787
13788 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13789
13790         * target.h (struct target_ops) <to_detach>: Add inferior
13791         parameter.
13792         (target_detach): Likewise.
13793         * target.c (dispose_inferior): Pass inferior down.
13794         (target_detach): Pass inferior down.  Assert that it is equal to
13795         the current inferior.
13796         * aix-thread.c (aix_thread_detach): Pass inferior down.
13797         * corefile.c (core_file_command): Pass current_inferior() down.
13798         * corelow.c (core_detach): Add inferior parameter.
13799         * darwin-nat.c (darwin_detach): Likewise.
13800         * gnu-nat.c (gnu_detach): Likewise.
13801         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13802         * infcmd.c (detach_command): Pass current_inferior() down to
13803         target_detach.
13804         * infrun.c (follow_fork_inferior): Pass parent_inf to
13805         target_detach.
13806         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13807         target_detach.
13808         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13809         * linux-thread-db.c (thread_db_detach): Likewise.
13810         * nto-procfs.c (procfs_detach): Likewise.
13811         * procfs.c (procfs_detach): Likewise.
13812         * record.c (record_detach): Likewise.
13813         * record.h (struct inferior): Forward-declare.
13814         (record_detach): Add inferior parameter.
13815         * remote-sim.c (gdbsim_detach): Likewise.
13816         * remote.c (remote_detach_1): Likewise.
13817         (remote_detach): Likewise.
13818         (extended_remote_detach): Likewise.
13819         * sol-thread.c (sol_thread_detach): Likewise.
13820         * target-debug.h (target_debug_print_inferior_p): New macro.
13821         * target-delegates.c: Re-generate.
13822         * top.c (kill_or_detach): Pass inferior down to target_detach.
13823         * windows-nat.c (windows_detach): Add inferior parameter.
13824
13825 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13826
13827         * target.h (struct target_ops) <to_detach>: Remove args
13828         parameter.
13829         (target_detach): Likewise.
13830         * target.c (dispose_inferior): Adjust.
13831         (target_detach): Remove args parameter, adjust.
13832         * aix-thread.c (aix_thread_detach): Adjust.
13833         * corefile.c (core_file_command): Adjust.
13834         * corelow.c (core_detach): Adjust.
13835         * darwin-nat.c (darwin_detach): Adjust.
13836         * gnu-nat.c (gnu_detach): Adjust.
13837         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13838         * infcmd.c (detach_command): Adjust
13839         * infrun.c (follow_fork_inferior): Adjust.
13840         (handle_vfork_child_exec_or_exit): Adjust.
13841         * linux-fork.c (linux_fork_detach): Remove args parameter.
13842         * linux-fork.h (linux_fork_detach): Likewise.
13843         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13844         * linux-thread-db.c (thread_db_detach): Likewise.
13845         * nto-procfs.c (procfs_detach): Likewise.
13846         * procfs.c (procfs_detach): Likewise.
13847         (do_detach): Remove signo parameter.
13848         * record.c (record_detach): Remove args parameter.
13849         * record.h (record_detach): Likewise.
13850         * remote-sim.c (gdbsim_detach): Likewise.
13851         * remote.c (remote_detach_1): Likewise.
13852         (remote_detach): Likewise.
13853         (extended_remote_detach): Likewise.
13854         * sol-thread.c (sol_thread_detach): Likewise.
13855         * target-delegates.c: Re-generate.
13856         * top.c (struct qt_args) <args>: Remove field.
13857         (kill_or_detach): Don't pass args.
13858         (quit_force): Don't set args.
13859         * windows-nat.c (windows_detach): Remove args parameter.
13860
13861 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13862
13863         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13864         (arm_linux_init_abi): Install it.
13865
13866 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13867
13868         * osabi.c (gdb_osabi_names): Extend the regexp for
13869         arm-linux-gnueabihf.
13870
13871 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13872
13873         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13874         m_abbrevs.
13875         (abbrev_table::add_abbrev): Update.
13876         (abbrev_table::lookup_abbrev): Update.
13877
13878 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13879
13880         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13881
13882 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13883
13884         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13885         to "std::string".
13886
13887 2018-01-17  Tom Tromey  <tom@tromey.com>
13888
13889         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13890
13891 2018-01-17  Tom Tromey  <tom@tromey.com>
13892
13893         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13894         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13895         (create_array_type_with_stride): Update.
13896         * dwarf2read.c (set_die_type): Update.
13897
13898 2018-01-17  Tom Tromey  <tom@tromey.com>
13899
13900         * dwarf2read.c (delayed_method_info): Remove typedef.
13901         (dwarf2_cu::method_info): Now a std::vector.
13902         (add_to_method_list): Update.
13903         (free_delayed_list): Remove.
13904         (compute_delayed_physnames): Update.
13905         (process_full_comp_unit, process_full_type_unit): Clear the method
13906         list.  Remove cleanups.
13907         (psymtab_include_file_name): Add name_holder parameter.  Use
13908         unique_xmalloc_ptr.
13909         (dwarf_decode_lines): Update.
13910
13911 2018-01-17  Tom Tromey  <tom@tromey.com>
13912             Simon Marchi  <simon.marchi@ericsson.com>
13913
13914         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13915         (dwarf2_per_objfile::free_cached_comp_units)
13916         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13917         (init_cutu_and_read_dies_no_follow): Update.
13918         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13919         (dwarf2_cu::~dwarf2_cu): New.
13920         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13921         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13922
13923 2018-01-17  Tom Tromey  <tom@tromey.com>
13924             Simon Marchi  <simon.marchi@ericsson.com>
13925
13926         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13927         (struct die_reader_specs) <abbrev_table>: New member.
13928         (struct abbrev_table): Add constructor.
13929         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13930         <abbrev_obstack>: Now an auto_obstack.
13931         (abbrev_table_up): New typedef.
13932         (init_cu_die_reader): Add abbrev_table parameter.
13933         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13934         Add result_dwo_abbrev_table.
13935         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13936         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13937         Update.
13938         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13939         parameter.
13940         (skip_children): Update.
13941         (abbrev_table::alloc_abbrev): Rename from
13942         abbrev_table_alloc_abbrev.
13943         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13944         (abbrev_table::lookup_abbrev): Rename from
13945         abbrev_table_lookup_abbrev.
13946         (abbrev_table_read_table): Return abbrev_table_up.
13947         (abbrev_table_free, abbrev_table_free_cleanup)
13948         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13949         (load_partial_dies): Update.
13950
13951 2018-01-17  Tom Tromey  <tom@tromey.com>
13952
13953         * dwarf2read.c (dwarf2_compute_name): Update comment.
13954         (read_func_scope, read_variable): Update.
13955         (new_symbol): Remove.
13956         (new_symbol_full): Rename to new_symbol.
13957
13958 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13959
13960         PR gdb/16577
13961         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13962         a warning instead of throwing an error, set section size to 0 and return
13963         NULL.
13964         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13965
13966 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13967
13968         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13969         std::string.
13970         (linux_ptrace_attach_fail_reason_string): Likewise.
13971         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13972         Likewise.
13973         (linux_ptrace_attach_fail_reason_string): Likewise.
13974         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13975
13976 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13977
13978         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13979
13980 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13981
13982         PR gdb/21559
13983         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13984         checking for fs_base/gs_base fields in struct user_regs_struct.
13985         * configure: Regenerate.
13986
13987 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13988
13989         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13990         function.
13991         (aarch64_linux_init_abi): Install it to gdbarch hook
13992         gcc_target_options.
13993
13994 2018-01-15  Pedro Alves  <palves@redhat.com>
13995
13996         * common/signals-state-save-restore.c
13997         (save_original_signals_state): Fix typos.
13998
13999 2017-01-12  Tom Tromey  <tom@tromey.com>
14000             Sergio Durigan Junior  <sergiodj@redhat.com>
14001
14002         * Makefile.in (install-only): Install gdb-add-index.
14003
14004 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14005
14006         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14007
14008 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14009
14010         * infrun.c (keep_going_pass_signal): Clear step-over info when
14011         insert_breakpoints fails.
14012
14013 2018-01-11  Pedro Alves  <palves@redhat.com>
14014
14015         PR gdb/22583
14016         * infrun.c (resume): Rename to ...
14017         (resume_1): ... this.
14018         (resume): Reimplement as wrapper around resume_1.
14019
14020 2018-01-11  Pedro Alves  <palves@redhat.com>
14021
14022         PR remote/22597
14023         * remote.c (remote_parse_stop_reply): Default to the last-set
14024         general thread instead of to 'magic_null_ptid'.
14025
14026 2018-01-10  Pedro Alves  <palves@redhat.com>
14027
14028         * language.h (language_get_symbol_name_matcher): Rename ...
14029         (get_symbol_name_matcher): ... this.
14030         * language.c (language_get_symbol_name_matcher): Ditto.
14031         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14032         callers adjusted.
14033
14034 2018-01-10  Pedro Alves  <palves@redhat.com>
14035
14036         PR gdb/22670
14037         * dwarf2read.c
14038         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14039         Adjust to use language_get_symbol_name_matcher instead of
14040         language_defn::la_get_symbol_name_matcher.
14041         * language.c (language_get_symbol_name_matcher): If in Ada mode
14042         and the lookup name is a verbatim match, return Ada's matcher.
14043         * language.h (language_get_symbol_name_matcher): Adjust comment.
14044         (ada_lookup_name_info::verbatim_p):: New method.
14045
14046 2018-01-10  Pedro Alves  <palves@redhat.com>
14047
14048         PR gdb/22670
14049         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14050         minsym's language is language_auto or language_cplus, pass down
14051         language_ada instead.
14052         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14053
14054 2018-01-10  Pedro Alves  <palves@redhat.com>
14055
14056         PR gdb/22670
14057         * minsyms.c (linkage_name_str): New function.
14058         (iterate_over_minimal_symbols): Use it.
14059
14060 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14061
14062         * NEWS: Document that 'info proc' now works on FreeBSD.
14063
14064 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14065
14066         * configure.ac: Check for kinfo_getfile in libutil.
14067         * configure: Regenerate.
14068         * config.in: Regenerate.
14069         * fbsd-nat.c: Include "fbsd-tdep.h".
14070         (fbsd_fetch_cmdline): New.
14071         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14072         rather than calling error.
14073         (fbsd_info_proc): New.
14074         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14075         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14076         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14077
14078 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14079
14080         * fbsd-nat.c (struct free_deleter): Remove.
14081         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14082
14083 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14084
14085         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14086         NULL for an empty pathname.
14087
14088 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14089
14090         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14091         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14092         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14093         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14094         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14095         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14096         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14097         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14098         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14099         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14100         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14101         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14102         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14103         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14104         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14105
14106 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14107
14108         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14109         (gnu_xfer_auxv): New function.
14110         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14111         TARGET_OBJECT_AUXV.
14112
14113 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14114             Simon Marchi  <simon.marchi@ericsson.com>
14115
14116         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14117         common/selftest.c.
14118         (COMMON_OBS): Remove selftest.o.
14119         * configure.ac: Append selftest-arch.c and common/selftest.c to
14120         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14121         * configure: Re-generated.
14122         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14123         GDB_SELF_TEST.
14124         (maintenance_info_selftests): Likewise.
14125
14126 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14127
14128         * ada-valprint.c (val_print_packed_array_elements): Use
14129         proper number of elements when printing an array indexed
14130         by an enumeration type.
14131
14132 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14133
14134         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14135         (dw2_get_file_names_reader): Adjust.
14136         (lookup_dwo_signatured_type): Adjust.
14137         (lookup_dwp_signatured_type): Adjust.
14138         (lookup_signatured_type): Adjust.
14139         (create_type_unit_group): Adjust.
14140         (get_type_unit_group): Adjust.
14141         (process_psymtab_comp_unit_reader): Adjust.
14142         (build_type_psymtabs_reader): Adjust.
14143         (scan_partial_symbols): Adjust.
14144         (add_partial_symbol): Adjust.
14145         (add_partial_subprogram): Adjust.
14146         (peek_die_abbrev): Adjust.
14147         (fixup_go_packaging): Adjust.
14148         (process_imported_unit_die): Adjust.
14149         (dwarf2_compute_name): Adjust.
14150         (dwarf2_physname): Adjust.
14151         (read_import_statement): Adjust.
14152         (handle_DW_AT_stmt_list): Adjust.
14153         (read_file_scope): Adjust.
14154         (read_func_scope): Adjust.
14155         (read_lexical_block_scope): Adjust.
14156         (read_call_site_scope): Adjust.
14157         (read_variable): Adjust.
14158         (dwarf2_rnglists_process): Adjust.
14159         (dwarf2_ranges_process): Adjust.
14160         (dwarf2_ranges_read): Adjust.
14161         (dwarf2_get_pc_bounds): Adjust.
14162         (dwarf2_record_block_ranges): Adjust.
14163         (dwarf2_add_field): Adjust.
14164         (dwarf2_add_member_fn): Adjust.
14165         (read_structure_type): Adjust.
14166         (process_structure_scope): Adjust.
14167         (read_enumeration_type): Adjust.
14168         (read_array_type): Adjust.
14169         (mark_common_block_symbol_computed): Adjust.
14170         (read_common_block): Adjust.
14171         (read_namespace_type): Adjust.
14172         (read_namespace): Adjust.
14173         (read_module_type): Adjust.
14174         (read_tag_pointer_type): Adjust.
14175         (read_tag_ptr_to_member_type): Adjust.
14176         (read_tag_string_type): Adjust.
14177         (read_subroutine_type): Adjust.
14178         (read_typedef): Adjust.
14179         (read_base_type): Adjust.
14180         (attr_to_dynamic_prop): Adjust.
14181         (read_subrange_type): Adjust.
14182         (read_unspecified_type): Adjust.
14183         (dwarf2_read_abbrevs): Adjust.
14184         (load_partial_dies): Adjust.
14185         (read_partial_die): Adjust.
14186         (find_partial_die): Adjust.
14187         (guess_partial_die_structure_name): Adjust.
14188         (fixup_partial_die): Adjust.
14189         (read_attribute_value): Adjust.
14190         (read_addr_index): Adjust.
14191         (read_addr_index_from_leb128): Adjust.
14192         (read_str_index): Adjust.
14193         (dwarf2_string_attr): Adjust.
14194         (get_debug_line_section): Adjust.
14195         (dwarf_decode_line_header): Adjust.
14196         (lnp_state_machine::check_line_address): Adjust.
14197         (dwarf_decode_lines_1): Adjust.
14198         (dwarf_decode_lines): Adjust.
14199         (dwarf2_start_symtab): Adjust.
14200         (var_decode_location): Adjust.
14201         (new_symbol_full): Adjust.
14202         (dwarf2_const_value_data): Adjust.
14203         (dwarf2_const_value_attr): Adjust.
14204         (dwarf2_const_value): Adjust.
14205         (die_type): Adjust.
14206         (die_containing_type): Adjust.
14207         (build_error_marker_type): Adjust.
14208         (lookup_die_type): Adjust.
14209         (guess_full_die_structure_name): Adjust.
14210         (anonymous_struct_prefix): Adjust.
14211         (determine_prefix): Adjust.
14212         (dwarf2_name): Adjust.
14213         (follow_die_ref_or_sig): Adjust.
14214         (follow_die_offset): Adjust.
14215         (follow_die_ref): Adjust.
14216         (follow_die_sig_1): Adjust.
14217         (follow_die_sig): Adjust.
14218         (get_signatured_type): Adjust.
14219         (get_DW_AT_signature_type): Adjust.
14220         (decode_locdesc): Adjust.
14221         (dwarf_decode_macros): Adjust.
14222         (cu_debug_loc_section): Adjust.
14223         (fill_in_loclist_baton): Adjust.
14224         (dwarf2_symbol_mark_computed): Adjust.
14225         (init_one_comp_unit): Don't assign
14226         dwarf2_cu::dwarf2_per_objfile.
14227         (set_die_type): Adjust.
14228
14229 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14230
14231         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14232         <dwarf2_per_objfile>: New field.
14233         (dwarf2_per_objfile): Remove global.
14234         (get_dwarf2_per_objfile): New function.
14235         (set_dwarf2_per_objfile): New function.
14236         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14237         dwarf2_per_objfile.
14238         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14239         (read_abbrev_offset): Likewise.
14240         (read_indirect_string): Likewise.
14241         (read_indirect_line_string): Likewise.
14242         (read_indirect_string_at_offset): Likewise.
14243         (read_indirect_string_from_dwz): Likewise.
14244         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14245         dwarf2_per_objfile.
14246         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14247         (create_all_comp_units): Change objfile parameter to
14248         dwarf2_per_objfile.
14249         (create_all_type_units): Likewise.
14250         (process_queue): Add dwarf2_per_objfile parameter.
14251         (read_and_check_comp_unit_head): Likewise.
14252         (lookup_dwo_unit_in_dwp): Likewise.
14253         (get_dwp_file): Likewise.
14254         (process_cu_includes): Likewise.
14255         (struct free_dwo_file_cleanup_data): New struct.
14256         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14257         set_dwarf2_per_objfile.
14258         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14259         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14260         context, adjust calls.
14261         (dw2_instantiate_symtab): Likewise.
14262         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14263         (dw2_get_cu): Likewise.
14264         (create_cu_from_index_list): Change objfile parameter to
14265         dwarf2_per_objfile.
14266         (create_cus_from_index_list): Get dwarf2_per_objfile from
14267         context, adjust calls.
14268         (create_cus_from_index): Likewise.
14269         (create_signatured_type_table_from_index): Change objfile
14270         parameter to dwarf2_per_objfile.
14271         (create_signatured_type_table_from_debug_names): Change objfile
14272         parameter to dwarf2_per_objfile.
14273         (create_addrmap_from_index): Likewise.
14274         (create_addrmap_from_aranges): Likewise.
14275         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14276         (dw2_setup): Remove.
14277         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14278         context.
14279         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14280         get_dwarf2_per_objfile.
14281         (dw2_forget_cached_source_info): Likewise.
14282         (dw2_map_symtabs_matching_filename): Likewise.
14283         (struct dw2_symtab_iterator) <index>: Remove.
14284         <dwarf2_per_objfile>: New field.
14285         (dw2_symtab_iter_init): Replace index parameter with
14286         dwarf2_per_objfile.
14287         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14288         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14289         (dw2_print_stats): Likewise.
14290         (dw2_dump): Likewise.
14291         (dw2_expand_symtabs_for_function): Likewise.
14292         (dw2_expand_all_symtabs): Likewise.
14293         (dw2_expand_symtabs_with_fullname): Likewise.
14294         (dw2_expand_marked_cus): Replace index and objfile parameters
14295         with dwarf2_per_objfile.
14296         (dw_expand_symtabs_matching_file_matcher): Add
14297         dwarf2_per_objfile parameter and adjust calls.
14298         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14299         adjust calls.
14300         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14301         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14302         adjust calls.
14303         (create_cus_from_debug_names_list): Replace objfile parameter
14304         with dwarf2_per_objfile and adjust calls.
14305         (create_cus_from_debug_names): Likewise.
14306         (dwarf2_read_debug_names): Likewise.
14307         (mapped_debug_names::namei_to_name): Adjust call.
14308         (dw2_debug_names_iterator::next): Likewise.
14309         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14310         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14311         (dw2_debug_names_dump): Likewise.
14312         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14313         (dw2_debug_names_expand_symtabs_matching): Likewise.
14314         (dwarf2_initialize_objfile): Likewise.
14315         (dwarf2_build_psymtabs): Likewise.
14316         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14317         this_cu.
14318         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14319         (read_and_check_comp_unit_head): Likewise.
14320         (read_abbrev_offset): Likewise.
14321         (create_debug_type_hash_table): Likewise.
14322         (create_debug_types_hash_table): Likewise.
14323         (create_all_type_units): Replace objfile parameter with
14324         dwarf2_per_objfile.
14325         (add_type_unit): Add dwarf2_per_objfile parameter.
14326         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14327         with dwarf2_per_objfile.
14328         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14329         (lookup_dwp_signatured_type): Likewise.
14330         (lookup_signatured_type): Likewise.
14331         (read_cutu_die_from_dwo): Likewise.
14332         (init_tu_and_read_dwo_dies): Likewise.
14333         (init_cutu_and_read_dies): Likewise.
14334         (init_cutu_and_read_dies_no_follow): Likewise.
14335         (allocate_type_unit_groups_table): Add objfile parameter.
14336         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14337         (get_type_unit_group): Likewise.
14338         (process_psymtab_comp_unit): Update call.
14339         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14340         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14341         (print_tu_stats): Likewise.
14342         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14343         in void* parameter.
14344         (build_type_psymtabs): Change objfile parameter to
14345         dwarf2_per_objfile.
14346         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14347         passed in void* parameter.
14348         (process_skeletonless_type_units): Change objfile parameter to
14349         dwarf2_per_objfile.
14350         (set_partial_user): Likewise.
14351         (dwarf2_build_psymtabs_hard): Likewise.
14352         (read_comp_units_from_section): Likewise.
14353         (create_all_comp_units): Likewise.
14354         (scan_partial_symbols): Update calls.
14355         (add_partial_symbol): Likewise.
14356         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14357         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14358         (process_queue): Add dwarf2_per_objfile parameter.
14359         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14360         (compute_compunit_symtab_includes): Likewise.
14361         (process_cu_includes): Add dwarf2_per_objfile parameter.
14362         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14363         (process_full_type_unit): Likewise.
14364         (process_imported_unit_die): Update call.
14365         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14366         (read_file_scope): Likewise.
14367         (allocate_dwo_file_hash_table): Add objfile parameter.
14368         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14369         (create_cus_hash_table): Likewise.
14370         (create_dwp_hash_table): Likewise.
14371         (create_dwo_unit_in_dwp_v1): Likewise.
14372         (create_dwp_v2_section): Likewise.
14373         (create_dwo_unit_in_dwp_v2): Likewise.
14374         (lookup_dwo_unit_in_dwp): Likewise.
14375         (try_open_dwop_file): Likewise.
14376         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14377         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14378         cleanup to include a reference to dwarf2_per_objfile.
14379         (open_dwp_file): Add dwarf2_per_objfile parameter.
14380         (open_and_init_dwp_file): Likewise.
14381         (get_dwp_file): Likewise.
14382         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14383         (queue_and_load_all_dwo_tus): Update call.
14384         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14385         data.
14386         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14387         (dwarf2_ranges_process): Likewise.
14388         (dwarf2_get_pc_bounds): Likewise.
14389         (mark_common_block_symbol_computed): Likewise.
14390         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14391         (dwarf2_read_abbrevs): Update call.
14392         (read_partial_die): Use dwarf2_per_objfile from cu.
14393         (find_partial_die): Likewise.
14394         (fixup_partial_die): Likewise.
14395         (read_attribute_value): Likewise.
14396         (read_indirect_string_at_offset_from): Add objfile parameter.
14397         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14398         parameter.
14399         (read_indirect_string_from_dwz): Add objfile parameter.
14400         (read_indirect_string): Add objfile parameter.
14401         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14402         (read_addr_index): Use dwarf2_per_objfile from cu.
14403         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14404         call dw2_setup.
14405         (read_str_index): Use dwarf2_per_objfile from cu.
14406         (get_debug_line_section): Likewise.
14407         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14408         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14409         (new_symbol_full): Use dwarf2_per_objfile from cu.
14410         (build_error_marker_type): Likewise.
14411         (lookup_die_type): Likewise.
14412         (determine_prefix): Likewise.
14413         (follow_die_offset): Likewise.
14414         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14415         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14416         (dwarf2_fetch_die_type_sect_off): Likewise.
14417         (dwarf2_get_die_type): Likewise.
14418         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14419         (get_signatured_type): Likewise.
14420         (get_DW_AT_signature_type): Likewise.
14421         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14422         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14423         (cu_debug_loc_section): Likewise.
14424         (fill_in_loclist_baton): Likewise.
14425         (dwarf2_symbol_mark_computed): Likewise.
14426         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14427         dwarf2_per_objfile.
14428         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14429         parameter.
14430         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14431         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14432         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14433         (set_die_type): Use dwarf2_free_objfile from cu.
14434         (get_die_type_at_offset): Likewise.
14435         (dwarf2_per_objfile_free): Don't assign global variable.
14436         (debug_names) <constructor>: Add dwarf2_per_objfile
14437         parameter, update m_debugstrlookup construction.
14438         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14439         parameter.
14440         <m_dwarf2_per_objfile>: New field.
14441         <lookup>: Use m_dwarf2_per_objfile.
14442         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14443         (psyms_seen_size): Likewise.
14444         (write_gdbindex): Replace objfile parameter with
14445         dwarf2_per_objfile.
14446         (write_debug_names): Likewise.
14447         (write_psymtabs_to_index): Likewise.
14448         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14449         calls.
14450
14451 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14452
14453         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14454         <dwarf2_per_objfile>: New field.
14455         (struct dwarf2_per_cu_data) <objfile>: Remove.
14456         <dwarf2_per_objfile>: New field.
14457         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14458         of objfile.
14459         (create_signatured_type_table_from_index): Likewise.
14460         (create_debug_type_hash_table): Likewise.
14461         (fill_in_sig_entry_from_dwo_entry): Likewise.
14462         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14463         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14464         objfile.
14465         (create_partial_symtab): Access objfile through
14466         dwarf2_per_objfile.
14467         (process_psymtab_comp_unit_reader): Likewise.
14468         (read_comp_units_from_section): Likewise.
14469         (scan_partial_symbols): Likewise.
14470         (add_partial_symbol): Likewise.
14471         (add_partial_subprogram): Likewise.
14472         (peek_die_abbrev): Likewise.
14473         (fixup_go_packaging): Likewise.
14474         (process_full_comp_unit): Likewise.
14475         (process_full_type_unit): Likewise.
14476         (process_imported_unit_die): Likewise.
14477         (dwarf2_compute_name): Likewise.
14478         (dwarf2_physname): Likewise.
14479         (read_import_statement): Likewise.
14480         (create_cus_hash_table): Assign dwarf2_physname instead of
14481         objfile.
14482         (read_func_scope): Access objfile through dwarf2_per_objfile.
14483         (read_lexical_block_scope): Likewise.
14484         (read_call_site_scope): Likewise.
14485         (read_variable): Likewise.
14486         (dwarf2_rnglists_process): Likewise.
14487         (dwarf2_ranges_process): Likewise.
14488         (dwarf2_ranges_read): Likewise.
14489         (dwarf2_record_block_ranges): Likewise.
14490         (dwarf2_add_field): Likewise.
14491         (dwarf2_add_member_fn): Likewise.
14492         (read_structure_type): Likewise.
14493         (process_structure_scope): Likewise.
14494         (read_enumeration_type): Likewise.
14495         (read_array_type): Likewise.
14496         (read_common_block): Likewise.
14497         (read_namespace_type): Likewise.
14498         (read_namespace): Likewise.
14499         (read_module_type): Likewise.
14500         (read_tag_pointer_type): Likewise.
14501         (read_tag_ptr_to_member_type): Likewise.
14502         (read_tag_string_type): Likewise.
14503         (read_subroutine_type): Likewise.
14504         (read_typedef): Likewise.
14505         (read_base_type): Likewise.
14506         (attr_to_dynamic_prop): Likewise.
14507         (read_subrange_type): Likewise.
14508         (read_unspecified_type): Likewise.
14509         (load_partial_dies): Likewise.
14510         (read_partial_die): Likewise.
14511         (find_partial_die): Likewise.
14512         (guess_partial_die_structure_name): Likewise.
14513         (fixup_partial_die): Likewise.
14514         (read_attribute_value): Likewise.
14515         (read_addr_index_from_leb128): Likewise.
14516         (dwarf2_read_addr_index): Likewise.
14517         (dwarf2_string_attr): Likewise.
14518         (lnp_state_machine::check_line_address): Likewise.
14519         (dwarf_decode_lines_1): Likewise.
14520         (dwarf_decode_lines): Likewise.
14521         (dwarf2_start_symtab): Likewise.
14522         (var_decode_location): Likewise.
14523         (new_symbol_full): Likewise.
14524         (dwarf2_const_value_data): Likewise.
14525         (dwarf2_const_value_attr): Likewise.
14526         (dwarf2_const_value): Likewise.
14527         (die_type): Likewise.
14528         (die_containing_type): Likewise.
14529         (lookup_die_type): Likewise.
14530         (guess_full_die_structure_name): Likewise.
14531         (anonymous_struct_prefix): Likewise.
14532         (dwarf2_name): Likewise.
14533         (follow_die_ref_or_sig): Likewise.
14534         (follow_die_offset): Likewise.
14535         (follow_die_ref): Likewise.
14536         (dwarf2_fetch_die_loc_sect_off): Likewise.
14537         (dwarf2_fetch_constant_bytes): Likewise.
14538         (dwarf2_fetch_die_type_sect_off): Likewise.
14539         (dwarf2_get_die_type): Likewise.
14540         (follow_die_sig): Likewise.
14541         (decode_locdesc): Likewise.
14542         (dwarf2_per_cu_objfile): Likewise.
14543         (dwarf2_per_cu_text_offset): Likewise.
14544         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14545         objfile.
14546         (set_die_type): Access objfile through
14547         dwarf2_per_objfile.
14548
14549 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14550
14551         * valprint.c (converted_character_d): Remove typedef.
14552         (DEF_VEC_O (converted_character_d)): Remove.
14553         (count_next_character): Use std::vector.
14554         (print_converted_chars_to_obstack): Likewise.
14555         (generic_printstr): Likewise.
14556
14557 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14558
14559         * xml-support.h (struct gdb_xml_value): Add constructor.
14560         <value>: Change type to unique_xmalloc_ptr.
14561         (gdb_xml_value_s): Remove typedef.
14562         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14563         (gdb_xml_element_start_handler): Change parameter type to
14564         std::vector.
14565         (xml_find_attribute): Likewise.
14566         * xml-support.c (xml_find_attribute): Change parameter type to
14567         std::vector and adjust.
14568         (gdb_xml_values_cleanup): Remove.
14569         (gdb_xml_parser::start_element): Adjust to std::vector.
14570         (xinclude_start_include): Change paraeter type to std::vector
14571         and adjust.
14572         * btrace.c (check_xml_btrace_version): Likewise.
14573         (parse_xml_btrace_block): Likewise.
14574         (parse_xml_btrace_pt_config_cpu): Likewise.
14575         (parse_xml_btrace_pt): Likewise.
14576         (parse_xml_btrace_conf_bts): Likewise.
14577         (parse_xml_btrace_conf_pt): Likewise.
14578         * memory-map.c (memory_map_start_memory): Likewise.
14579         (memory_map_start_property): Likewise.
14580         * osdata.c (osdata_start_osdata): Likewise.
14581         (osdata_start_item): Likewise.
14582         (osdata_start_column): Likewise.
14583         * remote.c (start_thread): Likewise.
14584         * solib-aix.c (library_list_start_library): Likewise.
14585         (library_list_start_list): Likewise.
14586         * solib-svr4.c (library_list_start_library): Likewise.
14587         (svr4_library_list_start_list): Likewise.
14588         * solib-target.c (library_list_start_segment): Likewise.
14589         (library_list_start_section): Likewise.
14590         (library_list_start_library): Likewise.
14591         (library_list_start_list): Likewise.
14592         * tracepoint.c (traceframe_info_start_memory): Likewise.
14593         (traceframe_info_start_tvar): Likewise.
14594         * xml-syscall.c (syscall_start_syscall): Likewise.
14595         * xml-tdesc.c (tdesc_start_target): Likewise.
14596         (tdesc_start_feature): Likewise.
14597         (tdesc_start_reg): Likewise.
14598         (tdesc_start_union): Likewise.
14599         (tdesc_start_struct): Likewise.
14600         (tdesc_start_flags): Likewise.
14601         (tdesc_start_enum): Likewise.
14602         (tdesc_start_field): Likewise.
14603         (tdesc_start_enum_value): Likewise.
14604         (tdesc_start_vector): Likewise.
14605
14606 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14607
14608         * extension.h (struct xmethod_worker) <clone>: Remove.
14609         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14610         Remove.
14611         (python_xmethod_worker::clone): Remove.
14612         * valops.c (find_overload_match): Use std::move instead of
14613         clone.
14614
14615 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14616
14617         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14618         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14619         <free_xmethod_worker_data>: Remove.
14620         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14621         <get_xmethod_arg_types>: Remove.
14622         <get_xmethod_result_type>: Remove.
14623         <invoke_xmethod>: Remove.
14624         * extension.c (new_xmethod_worker): Remove.
14625         (clone_xmethod_worker): Remove.
14626         (get_matching_xmethod_workers): Return void, pass std::vector by
14627         pointer.
14628         (get_xmethod_arg_types): Rename to...
14629         (xmethod_worker::get_arg_types): ... this, and adjust.
14630         (get_xmethod_result_type): Rename to...
14631         (xmethod_worker::get_result_type): ... this, and adjust.
14632         (invoke_xmethod): Remove.
14633         (free_xmethod_worker): Remove.
14634         (free_xmethod_worker_vec): Remove.
14635         * extension.h (enum ext_lang_rc): Move here from
14636         extension-priv.h.
14637         (struct xmethod_worker): Add constructor and destructor.
14638         <data>: Remove.
14639         <value>: Remove.
14640         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14641         virtual pure methods.
14642         <get_arg_types, get_result_type>: New methods.
14643         (xmethod_worker_ptr): Remove typedef.
14644         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14645         (xmethod_worker_vec): Remove typedef.
14646         (xmethod_worker_up): New typedef.
14647         (invoke_xmethod): Remove.
14648         (clone_xmethod_worker): Remove.
14649         (free_xmethod_worker): Remove.
14650         (free_xmethod_worker_vec): Remove.
14651         (get_xmethod_arg_types): Remove.
14652         (get_xmethod_result_type): Remove.
14653         * valops.c (find_method_list): Use std::vector, don't use
14654         intermediate vector.
14655         (value_find_oload_method_list): Use std::vector.
14656         (find_overload_match): Use std::vector.
14657         (find_oload_champ): Use std::vector.
14658         * value.c (value_free): Use operator delete.
14659         (value_of_xmethod): Rename to...
14660         (value_from_xmethod): ... this.  Don't assign
14661         xmethod_worker::value, take rvalue-reference.
14662         (result_type_of_xmethod): Adjust.
14663         (call_xmethod): Adjust.
14664         * value.h: Include extension.h.
14665         (struct xmethod_worker): Don't forward-declare.
14666         (value_of_xmethod): Rename to...
14667         (value_from_xmethod): ... this, take rvalue-reference.
14668         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14669         (struct python_xmethod_worker): ... this, add constructor and
14670         destructor.
14671         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14672         (gdbpy_free_xmethod_worker_data): Rename to...
14673         (python_xmethod_worker::~python_xmethod_worker): ... this and
14674         adjust.
14675         (gdbpy_clone_xmethod_worker_data): Rename to...
14676         (python_xmethod_worker::clone): ... this and adjust.
14677         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14678         temporary vector.
14679         (gdbpy_get_xmethod_arg_types): Rename to...
14680         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14681         (gdbpy_get_xmethod_result_type): Rename to...
14682         (python_xmethod_worker::do_get_result_type): ... this and
14683         adjust.
14684         (gdbpy_invoke_xmethod): Rename to...
14685         (python_xmethod_worker::invoke): ... this and adjust.
14686         (new_python_xmethod_worker): Rename to...
14687         (python_xmethod_worker::python_xmethod_worker): ... this and
14688         adjust.
14689         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14690         Remove.
14691         (gdbpy_free_xmethod_worker_data): Remove.
14692         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14693         (gdbpy_get_xmethod_arg_types): Remove.
14694         (gdbpy_get_xmethod_result_type): Remove.
14695         (gdbpy_invoke_xmethod): Remove.
14696         * python/python.c (python_extension_ops): Remove obsolete
14697         callbacks.
14698
14699 2018-01-05  Pedro Alves  <palves@redhat.com>
14700
14701         PR gdb/18653
14702         * common/signals-state-save-restore.c
14703         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14704         find a custom handler preinstalled, instead of internal erroring.
14705         But only warn if !quiet.
14706         * common/signals-state-save-restore.h
14707         (save_original_signals_state): New parameter 'quiet'.
14708         * main.c (captured_main_1): Move save_original_signals_state call
14709         after option handling, and pass QUIET.
14710
14711 2018-01-05  Pedro Alves  <palves@redhat.com>
14712
14713         * spu-tdep.c (spu_catch_start): Pass
14714         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14715
14716 2018-01-05  Pedro Alves  <palves@redhat.com>
14717
14718         PR gdb/22670
14719         * ada-lang.c (literal_symbol_name_matcher): New function.
14720         (ada_get_symbol_name_matcher): Use it for
14721         symbol_name_match_type::SEARCH_NAME.
14722         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14723         it down instead of assuming symbol_name_match_type::FULL.
14724         * block.h (block_lookup_symbol): New parameter 'match_type'.
14725         * c-valprint.c (print_unpacked_pointer): Use
14726         lookup_symbol_search_name instead of lookup_symbol.
14727         * compile/compile-object-load.c (get_out_value_type): Pass down
14728         symbol_name_match_type::SEARCH_NAME.
14729         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14730         symbol_name_match_type::FULL.
14731         * cp-support.c (cp_get_symbol_name_matcher): Handle
14732         symbol_name_match_type::SEARCH_NAME.
14733         * infrun.c (insert_exception_resume_breakpoint): Use
14734         lookup_symbol_search_name.
14735         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14736         * psymtab.c (maintenance_check_psymtabs): Use
14737         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14738         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14739         SYMBOL_SEARCH_NAME.
14740         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14741         if symbol_name_match_type::SEARCH_NAME.
14742         (lookup_symbol_in_language): Pass down
14743         symbol_name_match_type::FULL.
14744         (lookup_symbol_search_name): New.
14745         (lookup_language_this): Pass down
14746         symbol_name_match_type::SEARCH_NAME.
14747         (lookup_symbol_aux, lookup_local_symbol): New parameter
14748         'match_type'.  Pass it down.
14749         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14750         (lookup_symbol_search_name): New declaration.
14751         (lookup_symbol_in_block): New 'match_type' parameter.
14752
14753 2018-01-05  Pedro Alves  <palves@redhat.com>
14754
14755         PR gdb/22670
14756         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14757         ada_lookup_symbol.
14758         (ada_lookup_symbol): Reimplement in terms of
14759         ada_lookup_symbol_list, bits factored out from
14760         ada_lookup_encoded_symbol.
14761
14762 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14763
14764         * ada-exp.y (write_object_renaming): When subscripting an array
14765         using a symbol as the index, pass the block in call to
14766         ada_lookup_encoded_symbol when looking that symbol up.
14767
14768 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14769
14770         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14771         TYPE_INDEX_TYPE.
14772
14773 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14774
14775         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14776         the case where VALUE_LVAL (val0) is not lval_memory.
14777
14778 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14779
14780         * ada-valprint.c (print_optional_low_bound): Handle
14781         character-indexed array printing like boolean-indexed array
14782         printing.
14783
14784 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14785
14786         * NEWS: Create a new section for the next release branch.
14787         Rename the section of the current branch, now that it has
14788         been cut.
14789
14790 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14791
14792         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14793         * version.in: Bump version to 8.1.50.DATE-git.
14794
14795 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14796
14797         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14798         Add field.
14799         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14800         Add field.
14801         (default_exception_support_info) <catch_handlers_sym>: Add field.
14802         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14803         (ada_exception_name_addr_1): Add "catch handlers" handling.
14804         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14805         Update all callers.
14806         (create_excep_cond_exprs) <ex>: Add parameter.
14807         (re_set_exception): Update create_excep_cond_exprs call.
14808         (print_it_exception, print_one_exception, print_mention_exception)
14809         (print_recreate_exception): Add "catch handler" handling.
14810         (allocate_location_catch_handlers, re_set_catch_handlers)
14811         (check_status_catch_handlers, print_it_catch_handlers)
14812         (print_one_catch_handlers, print_mention_catch_handlers)
14813         (print_recreate_catch_handlers): New function.
14814         (catch_handlers_breakpoint_ops): New variable.
14815         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14816         Add parameter.  Add "catch handler" handling.
14817         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14818         Add "catch handler" handling.
14819         (ada_exception_catchpoint_cond_string): Add "catch handler"
14820         handling.
14821         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14822         call.
14823         (catch_ada_handlers_command): New function.
14824         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14825         operations structure.
14826         (_initialize_ada_language): Add "catch handlers" command entry.
14827         * NEWS: Document "catch handlers" feature.
14828
14829 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14830
14831         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14832         account when creating the array type of the slice.
14833         (ada_value_slice): Likewise.
14834
14835 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14836
14837         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14838         New enum value.
14839         (create_array_type_with_stride): Add byte_stride_prop parameter.
14840         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14841         New parameter.  Update all callers in this file.
14842         (array_type_has_dynamic_stride): New function.
14843         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14844         of arrays with dynamic byte strides.
14845         * dwarf2read.c (read_array_type): Add support for dynamic
14846         DW_AT_byte_stride attributes.
14847
14848 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14849
14850         * dwarf2read.c (read_unspecified_type): Treat
14851         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14852
14853 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14854
14855         Update copyright year range in all GDB files.
14856
14857 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14858
14859         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14860         and gdb/testsuite/gdb.base/step-line.c.
14861
14862 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14863
14864         * copyright.py (main): Dump the contents of
14865         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14866         even if BY_HAND is empty.
14867
14868 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14869
14870         * top.c (print_gdb_version): Update Copyright year in version
14871         message.
14872
14873 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14874
14875         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14876
14877 For older changes see ChangeLog-2017.
14878 \f
14879 Local Variables:
14880 mode: change-log
14881 left-margin: 8
14882 fill-column: 74
14883 version-control: never
14884 coding: utf-8
14885 End: